Skip to main content

Deploying ERC-20 token on BPX mainnet using Remix IDE

  1. Open the Remix IDE. Expand the workspaces menu and select Create.


2. Select the OpenZeppelin / ERC20 template.


3. Configure your token features.

  • Check Mintable to be able to mint further units of the token to any address at any time.
  • Check Burnable to be able to burn token units.
  • Check Pausable to be able to pause token transfers for all token holders.

In the Upgradeability section, you can configure the possibility of updating your token contract in the future. This is an advanced option that we won't cover in the beginner tutorial.

In the Workspace name field, enter the name of your project.

Confirm with the OK button.


4. The IDE will generate the token contract source code. Change the contract name, token name and token symbol.



5. Rename the contract file to match the contract name, in our case TutorialToken.sol.


6. Compile and deploy the token contract. We explained how to do it in another tutorial.


7. The token contract is already on the blockchain. Now we will mint 100 TTK to our wallet. Expand the contract method named mint. Enter your wallet address in to: field. In the amount: field enter the amount of token you want to mint. Keep in mind that the token has 18 decimal places by default, and the amount is entered in the smallest units. So enter 100 followed by 18 zeros to mint 100 TTK.


8. Click transact and confirm the transaction in your wallet. Wait for its confirmation by the blockchain.


9. Copy your token's contract address. You will always need it to add a token to the wallet.


10. Now open Metamask, go to Assets and select Import tokens.


11. Paste the token contract address. The other fields will be automatically read from the blockchain. Click Add custom token and Import tokens.


12. Done. The token is visible in your wallet. You can send and receive it to other addresses just like a native BPX token. Keep in mind that your wallet is the smart contract owner and only this wallet can call mint function in the future to mint new token units or burn function to burn them.