This guide will walk you through the steps to deploy and verify a smart contract on the Rome EVM network.
Clone the repository to your local machine:
git clone https://github.com/adanothe/evm-deploy.git
cd evm-deployInstall the required dependencies for the project:
npm installCreate a .env file in the root of the project and add your private key:
PRIVATE_KEY="your-private-key"Note: Replace
"your-private-key"with your actual private key. This key will be used to sign transactions during deployment.
- Navigate to the
contracts/folder in your project directory. - Create a new
.solfile for your smart contract. - Paste your contract code or use OpenZeppelin Contracts Wizard to generate secure contract templates.
Compiler Version:
Ensure that your Solidity contract is compiled with a version greater than or equal to0.8.26and less than0.9.0. The Hardhat configuration for the project is already set up to use Solidity version0.8.26.
To compile your smart contract, run the following command:
npm run compileThis will compile the Solidity contract code into artifacts used for deployment.
Once your contract is compiled, you can deploy it to the Rome EVM network using the following command:
npm run deployThis command will deploy the smart contract using the private key stored in your .env file.
If you would like to verify your contract on a block explorer after deployment, you can use the verify command:
npm run verify <CONTRACT_ADDRESS>Note: Replace
<CONTRACT_ADDRESS>with the your contract address.
If you're deploying a new contract and want to clean up previous artifacts, you can run:
npm run cleanThis will delete the existing compiled contract artifacts, ensuring a fresh deployment.
- EVM RPC Endpoint: https://rome.testnet.romeprotocol.xyz
- Chain ID: 200002
- EVM Block Explorer: https://rome.testnet.romeprotocol.xyz:1000
Stay updated and join the community through the following channels:
If you run into any issues during the deployment or verification process, check the following:
- Ensure your private key is correct and has enough funds for gas fees.
- Double-check that your network configuration in Hardhat is set to the correct Rome EVM endpoint.