Deploying an ERC20 Token

Deploy an ERC20 token on WeaveVM

Add WVM Testnet Network to MetaMask

Before deploying, make sure the WeaveVM (WVM) network is configured in your MetaMask wallet. Check the Network Configurations.

ERC20 Contract

For this example, we will use the ERC20 token template provided by the OpenZeppelin's smart contract library.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title Useless Testing Token
/// @notice Just a testing shitcoin
/// @dev WeaveGM gmgm
/// @author pepe frog
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract WeaveGM is ERC20 {
    constructor(uint256 initialSupply) ERC20("WeaveGM", "WGM") {
        _mint(msg.sender, initialSupply);
    }
}

Deployment

Now that you have your contract source code ready, compile the contract and hit deploy with an initial supply.

After deploying the contract successfully, check your EOA balance!

Last updated