πQuick Start
In this section we'll get you deploying a sample contract on Asset Chain in less than 10 minutes.
Last updated
In this section we'll get you deploying a sample contract on Asset Chain in less than 10 minutes.
Last updated
Letβs see how to deploy a smart contract on Asset Chain using the Remix IDE for simplicity.
Before getting started:
Follow for the step-by-step on how to add Asset Chain testnet to Metamask.
This guide assumes you have got Testnet RWA and connected to the Asset Chain Testnet Network. Learn how to do that in Testnet Faucets.
We are ready to get started!
Remix is a no-setup tool for developing smart contracts. Itβs easy to get started allowing a simple deployment process, debugging, interacting with smart contracts, and more. Itβs a great tool to test quick changes and interact with deployed smart contracts.
For the sake of this tutorial, we will be deploying the βERC20Token.solβ smart contract for minting a fungible token, but you can use any of your code.
You can copy and then paste this in Remix or use your own contract code. Here's the sample code:
ERC20Token.sol
Copy the sample code and paste it in one of the .sol files in Remix
To compile your smart contract, go to the Solidity Compiler tab
and select the contract you want to compile
Click on "Compile", you can also enable "Auto Compile" for automatic compilation whenever you change the contract code.
Make sure to open the advanced configurations and setting the solidity compiler to below 0.8.19. This is to avoid incompatibility with the recent PUSH0
opcode.
Once the smart contract is compiled successfully, switch to the "Deploy & Run Transactions
" tab.
In the "Environment
" dropdown menu, select "Injected Provider - MetaMask
"; this will connect your MetaMask to Remix and will allow you to make transactions from that connected wallet.
Make sure to have Asset Chain Testnet as your selected network in Metamask before deploying.
Select the compiled contract you want to deploy and click βDeploy.β
Now, MetaMask should pop up and ask you to confirm the transaction with super low fees.
Congrats! You just deployed your first smart contract to Asset Chain.
To learn more about Asset Chain and how to turn your code into a business, join our Discord and say hello π