Using Hardhat
Hardhat is a popular development framework for Solidity smart contracts.
To work with a local Arthera node or with the Arthera TestNet, HardHat needs to know how to connect to the respective network.
Add the following snippet in the networks
section of the hardhat.config.js
file. (if the networks
section does
not exist, you can add it).
networks: {
arthera: {
url: 'https://rpc.arthera.net',
chainId: 10242,
accounts: []
},
arthera-testnet: {
url: 'https://rpc-test.arthera.net',
chainId: 10243,
accounts: []
}
}
Now you can run your HardHat scripts with npx hardhat run scripts/<YOUR_SCRIPT> --network arthera-testnet
You can view a more complete example of a Hardhat config file here.
A Hardhat template
You can clone or fork this repository to see how Arthera can be integrated in a Hardhat project. It's in TypeScript. You can simply click on the 'Use this template' button, and then select 'Create a new repository' or 'Open in a codespace'.
Contract verification
Arthera Hardhat template includes the Hardhat Deploy plugin. Learn more about contracts verification
Latest update: February 27, 2023