Verify ERC20PresetMinterPauser

Hi @abcoathup, I already have a token deployed on the ropsten testnet, but I can’t complete the step to verify it. Use ERC20PresetMinterPauser to deploy the token on the network, how can I verify it?

1 Like

Hi @jeissoni,

Can you share your Solidity code, the address and the parameters you provided to the constructor?

1 Like

Hi @abcoathup,

use the following guide: Create an ERC20 using Truffle, without writing Solidity

The parameters used are:

symbol: TRS

1 Like

Hi @jeissoni,

Can you share your address that you used?

I tried Truffle verify plugin but didn’t have success with the precompiled artifacts.

I installed the Truffle verify plugin:

npm install -D truffle-plugin-verify

Added the plugin and my Etherscan API key (:warning: don’t commit your API key to version control) to truffle-config.js

// truffle-config.js
const { infuraProjectId, mnemonic, etherscanApiKey } = require('./secrets.json');
const HDWalletProvider = require('@truffle/hdwallet-provider');

module.exports = {
  plugins: [

  api_keys: {
    etherscan: etherscanApiKey

I couldn’t verify the precompiled artifacts for the preset contract, so I manually copied the contracts and deployed.

I could then verify but this isn’t the same as your contract.

$ npx truffle run verify ERC20PresetMinterPauser --network ropsten
Verifying ERC20PresetMinterPauser
Pass - Verified:
Successfully verified 1 contract(s).
1 Like

Hi @abcoanthup

Thanks for your time and help.

Can you share your address that you used?

Contract address in ropsten: 0xBd9a2d2f69a9b751d94f6b45b455335aD5cC2801

1 Like

Hi @jeissoni,

This contract was compiled with Solidity 0.5.16, and ERC20PresetMinterPauser is from OpenZeppelin Contracts 3.x which uses Solidity 0.6. Can you check your address again?