Hardhat
Last updated
Was this helpful?
Last updated
Was this helpful?
The easiest way to get started with writing smart contracts on COTI is to clone the . This template is a simple project that includes all the configurations and packages needed to connect to the Testnet and integrate COTI's privacy features into your own smart contracts.
Let's start by cloning the repository:
Before we can continue with exploring the repository, we have to install the dependencies:
The repository includes a simple privacy-enabled smart contract (PrivateStorage.sol
) which, as the name suggests, accepts encrypted inputs and stores them on-chain using the user's . There is also a short test suite included in the template.
To run the test suite, execute the following command in your terminal:
On your first time running the test suite, you will see the following message printed to the console:
To fund the newly created account, head over to the and send a message to the both in the following format:
Now that you have funded your account, you can run the test suite again: