Skip to main content

Contracts verification

There are several ways to get your contract verified on Arthera Testnet explorer.

Programmatically

Forge

Forge makes it easiest to deploy and verify in the same command run.

export RPC_URL=<Your RPC endpoint>
export PRIVATE_KEY=<Your wallets private key>
export CONTRACT_NAME=<Your contract name>
forge create $CONTRACT_NAME --rpc-url=$RPC_URL --private-key=$PRIVATE_KEY --verify --verifier blockscout --verifier-url 'https://explorer.arthera.net/api?'

There is a more detailed Forge tutorial

Hardhat

Sourcify is supported on both TestNet and MainNet.

It can be used as documented at hardhat-deploy

npx hardhat --network arthera sourcify

Manually

For simple contracts the easiest way is probably to first flatten your contracts, and paste the flattened code in the explorer. if you're using Hardhat, you can use the following command (it's built-in):

npx hardhat flatten

Copy your code, then in the explorer (Blockscout), search for your contract address, click the Verify and Publish button and paste your code there.

info

Latest update: February 19, 2023