Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 2.98 KB

File metadata and controls

68 lines (50 loc) · 2.98 KB
meta canonicalUrl
name content
title
Cronos | Crypto.org EVM Chain | Deploy Smart Contract
name content
description
Learn how to deploy a smart contract to Cronos using Solidity, both Truffle and Hardhat are included in this technical documentation.
name content
og:title
Cronos | Crypto.org EVM Chain | Deploy Smart Contract
name content
og:type
Website
name content
og:description
Learn how to deploy a smart contract to Cronos using Solidity, both Truffle and Hardhat are included in this technical documentation.
name content
og:image
name content
twitter:title
Cronos | Crypto.org EVM Chain | Deploy Smart Contract
name content
twitter:site
@cryptocom
name content
twitter:card
summary_large_image
name content
twitter:description
Learn how to deploy a smart contract to Cronos using Solidity, both Truffle and Hardhat are included in this technical documentation.
name content
twitter:image

📃 Smart Contracts

Smart contracts hold an essential role in the blockchain ecosystem of dApps. It is critical to ensure they work as intended and remain as secure as possible. Complete and well-design smart contracts save us from unnecessary financial losses and help the project stay secure. Smart contract verification is sometimes overlooked when teams are rushing to ship, but it is vital to verify smart contracts on their correctness, validity and security.

The following documentation demonstrates the deployment and verification of a smart contract by Solidity to Cronos. @openzeppelin/contracts is used for the demo Solidity script. Both Truffle and Hardhat for deployment are included in this documentation and you shall use one of your choices. We also walk through the steps of verifying a smart contract with the Hardhat Cronoscan plugin on Cronos.

Pre-requisites

Below are the prerequisites for contract deployment and verification.

Supported OS

We officially support macOS, Windows and Linux only. Other platforms may work but there is no guarantee. We will extend our support to other platforms after we have stabilized our current architecture.

Prepare nodejs and npm environment

You can refer to Downloading and installing Node.js and npm
Nodejs v18+ is suggested

Sufficient funds on deployer address

You can access to faucet to obtain testnet TCRO and explorer to view the address details.

Git clone smart-contract-example

$ git clone [email protected]:crypto-org-chain/cronos-smart-contract-example.git

Once you have them all ready, now we are ready to go through the next step of contract deployment and verification!