Contract Deployment and Verification

Block Explorer

The Cronos blockchain network is transitioning away from the legacy Cronoscan block explorer and into the new Cronos Explorer.

The Cronos Explorer URLs are as follows:

The documentation of the Cronos Explorer APIs are available at the following URLs:

Contract Deployment

To interact with Cronos mainnet, you can use the public endpoint https:.//evm.cronos.org or an endpoint provided by a commercial vendor. You will need CRO in your self-custodial wallet in order to pay for transaction fees.

In this Github repository, you will find a convenient example of Hardhat configuration for smart contract development on Cronos Testnet and Mainnet. Please refer to the README.md file for a list of frequently used commands, and to the Hardhat documentation for more details.

In the hardhat.config.js file, you will notice that we currently recommend to set the gas price at 10100000000000 wei, but please check the Gas Tracker for a more up to date value.

Contract Verification

In order to enable users and fellow developers to do their own research, it is imperative that you publish your smart contract code on Cronos Explorer. This is called verifying your contracts.

The new Cronos Explorer supports smart contract verification either through the web interface or programmatically via Hardhat (we recommend to use Hardhat).

Contract Verification Via Explorer Hardhat:

For verification via Hardhat, refer to the example provided in this boilerplate repository. Cronos is supported by Hardhat out of the box, you just need to configure the network parameters in hardhat.config.js . You will need an API key. To find out how to obtain an API key, refer to the Cronos Explorer API documentation.

After the contract verification is complete, the Cronos Explorer will display details about your smart contract code like shown below.

Contract Verification Via Explorer interface:

For verification via the web interface, visit the following URLs:

Last updated