Bugs Importing Tokens from New Contracts

Hi all, I am running into a tough issue with importing tokens on MetaMask from an Open Zepplin Contract I am working on. The main problem I am having is that I ran the code once last night and was successful launching the asset and importing the tokens on the Ropsten TestNet once. I then ran the code on the MainNet and it was not successful. In subsequent TestNet executions, the code is no longer producing the original result.

It seems like it may be an issue with the _mint function:

_mint(msg.sender, 1000000000);

But, I am not sure why I am getting 0 tokens when importing in the subsequent MainNet and TestNet deployments. This is the Ropsten TestNet deployment that worked, asset and a picture of the. This is the MainNet deployment that failed and a screenshot of a failed Rinkbey TestNet import. I posted this as Issue #3404 on GitHub.

:1234: Code to reproduce

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

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract ChoiceCoin is ERC20 {
    constructor() ERC20("Choice Coin", "Choice") {
        _mint(msg.sender, 1000000000);
    }
}

The same code that produced the right result once, is now producing the wrong result.

:computer: Environment

I'm using Remix. Here is a screenshot of the environment parameters.

Limit on links

Also, I apologize I tried to provide more links to information to make this more clear, but I'm a new user and I can only add two links. I understand this is probably to prevent spam, but would suggest reconsidering this policy as it prevents me from fully providing the data for this bug.

Here are additional links:

Screenshots of problem data
Success importing tokens on MetaMask via Ropsten TestNet
Failure on Rinkbey TestNet
Remix environment parameters

Successful Ropsten TestNet Token
This is what I am trying to repeat.

On Ropsten you deployed your "ChoiceCoin" contract, on Mainnet you deployed the base "ERC20" contract that doesn't have the constructor. You can see this in the verified code.

You need to choose the right contract to deploy in the Remix dropdown.

1 Like

Thank you so much! I really appreciate your help.