Development toolkits
👷 Hardhat​
Hardhat is an Ethereum development environment for professionals. It facilitates performing frequent tasks, such as running tests, automatically checking code for mistakes or interacting with a smart contract. To get started, check out the tutorial created by the team or the Etherlink tutorial.
Using Hardhat with Etherlink​
Hardhat works seamlessly with Etherlink. You can follow the documentation at https://hardhat.org/docs and insert values for Etherlink.
Here is an example hardhat.config.js
file for Etherlink Mainnet and Testnet:
module.exports = {
solidity: "0.8.24",
networks: {
etherlinkMainnet: {
url: "https://node.mainnet.etherlink.com",
accounts: ["<YOUR_PRIVATE_KEY>"],
},
etherlinkTestnet: {
url: "https://node.ghostnet.etherlink.com",
accounts: ["<YOUR_PRIVATE_KEY>"],
},
},
etherscan: {
apiKey: {
etherlinkMainnet: "YOU_CAN_COPY_ME",
etherlinkTestnet: "YOU_CAN_COPY_ME",
},
customChains: [
{
network: "etherlinkMainnet",
chainId: 42793,
urls: {
apiURL: "https://explorer.etherlink.com/api",
browserURL: "https://explorer.etherlink.com",
},
},
{
network: "etherlinkTestnet",
chainId: 128123,
urls: {
apiURL: "https://testnet.explorer.etherlink.com/api",
browserURL: "https://testnet.explorer.etherlink.com",
},
},
],
},
};
Deploying and verifying contracts with Hardhat​
Hardhat offers great guides for deploying and verifying your contracts. Just make sure to set the network flag appropriately: --network etherlinkMainnet
or --network etherlinkTestnet
, as appropriate.