This project enhances Hardhat's viem sample project with Hardhat Ignition for Conflux eSpace. It is based on the Conflux DevKit devcontainer. For more details, refer to the Conflux Devkit README. You can use this repository in GitHub Codespaces or with VS Code devcontainer support.
On the first execution the system will guide the user in the creation of a mnemonic key to use during development, and will auto configure the first 10 accounts in the node to be ready to be used, this is a one time operation because the local node will persist the blockchain data, so at any time you can continue your development where you left, without the need to reinitialize the accounts or deployed smart contracts.
Once the system is ready to install the package, use npm:
npm install
To start the development node, use:
hh node
To get the balance of the configured keys:
hh balance --network <network>
NOTE: the autocompletion is active, you can use to complete or list the available options, like the available network name
To list all available signer adresses:
hh accounts
To deploy a contract on the local eSpace using Ignition, use:
hh ignition deploy ignition/modules/Lock.ts --network confluxESpaceLocal