π’Build on Ave Chain
Hereβs a step-by-step guide to using Remix Ethereum to create, compile, and deploy a basic ERC-20 smart contract on the Avenium Blockchain.
Steps to Use Remix Ethereum
1. Open Remix Ethereum
Visit the Remix Ethereum website.
Create a new file by clicking on the folder icon on the left side, then click the "+" (New File) button and name the file, for example,
AveToken.sol
.
2. Write the Smart Contract
Copy and paste the following code into your new file:
3. Compile the Smart Contract
Click on the "Solidity Compiler" tab on the left sidebar.
Select the appropriate compiler version (e.g., 0.8.0 or higher) that matches the pragma version specified in the contract.
Click the "Compile AveToken.sol" button.
4. Deploy the Smart Contract
Click on the "Deploy & Run Transactions" tab on the left sidebar.
In the "Environment" dropdown, select "Injected Web3". This will connect Remix to MetaMask.
Make sure your MetaMask is connected to the Avenium testnet. You can add the Avenium testnet to MetaMask with the following details:
Network Name: Ave Chain Testnet
New RPC URL:
https://connect-testnet.avenium.io
Chain ID:
8886
Currency Symbol:
tAVE
Block Explorer URL:
https://testnet.avescan.net
Click "Deploy" and confirm the transaction in MetaMask.
5. Interact with the Deployed Contract
After deploying, the contract instance will appear in the "Deployed Contracts" section.
You can interact with the contract functions (such as
mint
andburn
) directly from the Remix interface.For example, to mint new tokens:
Enter the recipient's address and the amount of tokens to mint in the
mint
function fields.Click the
transact
button next to themint
function and confirm the transaction in MetaMask.
Additional Notes
Security: Always make sure to audit your smart contract code or have it audited by professionals before deploying on the mainnet.
Testing: It's a good practice to test your contract thoroughly on a testnet before deploying it on the mainnet.
Using Remix Ethereum is a straightforward way to write, compile, and deploy smart contracts on the Avenium Blockchain. This guide covered creating a basic ERC-20 token contract, compiling it, and deploying it using MetaMask connected to the Avenium testnet. By following these steps, you can develop and deploy your own smart contracts efficiently.
Last updated