Deploy with Remix IDE
Last updated
Was this helpful?
Last updated
Was this helpful?
Remix IDE is a no-setup tool with a GUI for developing smart contracts. Used by experts and beginners alike, Remix will get you going in no time.
Remix is available as a web-based environment, a desktop program, and even a CLI tool. In this page, we will use the web-based version
You can also use the official Remix IDE documentation for creating and deploying a contract.
Go to https://remix.ethereum.org.
The Remix IDE opens in your browser.
Click the "ERC20" button, right below the "Start Coding" button.
Chiliz's Fan Tokens are CAP20 tokens, which are Chiliz Chain-specific extension of the Ethereum ERC20 token standard.
Remix IDE allows you to directly start working on an ERC20-compatible token.
Once you click, Remix loads a standard workspace with several folders and files that appear in the File Explorer on the left. Click in the /contracts/MyToken.sol
to display this:
As you can, see MyToken.sol smart contract already imports the ERC20.sol
and the ERC20Permet.sol
smart contracts.
Open the .deps/npm/@openzeppelin/contracts/token/ERC20/ERC20.sol
file. This is the ERC20 contract provided by OpenZeppelin.
OpenZeppelin is an open-source platform for building secure dApps.
In addition to several security and auditing services, they provide a library of community-vetted smart contract, free for the community to use in their projects. development.
As such, OpenZeppelin contracts are considered industry standards, and you can safely use them. Remix IDE uses the OpenZeppelin ERC20 contract here.
You can customise the MyToken.sol
smart contract right from Remix IDE (starting with a name and symbol), in order to fit your idea of a token for Chiliz Chain.
You should also rename the file itself.
Click Compile (the green arrow)
If there are no mistakes in your changes, Remix IDE should display a green checkmark in the "Solidity Compiler" menu on the left:
Open the "Deploy & run transactions" section.
Select "Injected Provider - MetaMask" in the "Environment" dropdown menu in order to link your MetaMask account.
Make sure that your contract is selected
Click "Deploy".
Your MetaMask wallet should open automatically.
8. Click "Confirm" to link your MetaMask Wallet with your token's smart contract.
You should receive a notification confirming the transaction within a few seconds.
10. In your MetaMask Wallet, under the "Activity" tab, you will see the contract deployment information. Click it to see all the information about it.
Your contract is now deployed on Chiliz Chain!
Optionally, you can view the deployed contract on the Chiliscan Block Explorer.