🟣How to Deploy in Evnode

How to Build and Deploy a Smart Contract on Evnode Testnet Blockchain

Follow these steps to create and deploy a smart contract on the Evnode Testnet Blockchain:


Step 1: Open Remix IDE

  1. Visit https://remix.ethereum.org/. Remix is a web-based Integrated Development Environment (IDE) for Ethereum and EVM-compatible blockchains like Evnode.


Step 2: Create a New Smart Contract File

  1. In the Remix IDE, click on the "Create New File" button (usually found in the file explorer on the left-hand menu).

  2. Give your contract file a name. For example: MyFirstContract.sol. Ensure that the file name ends with .sol.


Step 3: Import the Solidity Template

  1. Copy the Solidity contract template provided in the Evnode Documentation: https://docs.evnode.org/create-smart-contract/solidity-template-contract.

  2. Paste the template code into your newly created file in the Remix editor.


Step 4: Customize the Contract

  1. Edit the contract code to suit your requirements (e.g., modify function logic, variables, or visibility).

  2. After making changes, save the contract by pressing CTRL+S or by clicking the save button in Remix.


Step 5: Set the Correct Solidity Version

  1. At the top of the contract file, you’ll see a line starting with pragma solidity.

  2. Update the Solidity version in your code to match the compiler version being used in Remix.

    • For example: If your pragma solidity specifies ^0.8.0, select 0.8.x in the Solidity Compiler panel.


Step 6: Compile the Contract

  1. Navigate to the Solidity Compiler tab in Remix.

  2. Select your contract file and click on the Compile button.

  3. Ensure there are no errors during compilation.


Step 7: Prepare for Deployment

  1. Navigate to the Deploy & Run Transactions tab in Remix.

  2. Make sure you have enough native Evnode tokens for the deployment:


Step 8: Connect Your Wallet

  1. In the Environment dropdown, select "Injected Provider" to connect your wallet (e.g., MetaMask).

  2. Make sure your wallet is connected to the Evnode Testnet RPC:


Step 9: Deploy Your Contract

  1. Under the "CONTRACT" dropdown, select your contract name (e.g., MyFirstContract - MyFirstContract.sol).

  2. Click the Deploy button.

  3. Confirm the transaction in your wallet to deploy the contract to the Evnode Testnet.


Step 10: Verify Deployment

  1. Once the deployment is successful, you’ll see the contract address in the Remix terminal output.

  2. Visit the Evnode Testnet Explorer at https://testnet.evscan.net to verify your contract's deployment.

  3. Use the contract address to interact with your deployed contract.


Additional Resources

By following these steps, you can successfully create, customize, and deploy your smart contracts on the Evnode Testnet Blockchain.

Last updated