Not able to deploy on mainnet

Hey all,

i successfully deployed my smart contract to Mumbai and also successfully minted a NFTs on that contract on Mumbai.

However, i then tried to deploy the contract to the Mainnet which the polygonscan says it worked (
Polygon Transaction Hash (Txhash) Details | PolygonScan ). But then i tried minting NFTs on that contract and all i got was “Reverted” errors ( Contract Address 0xb478eba7d1c23251cedc89d4e2ab5081e1d3eb18 | PolygonScan ) .

I tried different providers ( Infura, matic-mainnet chainstacklabs com etc. ) and haven’t changed anything in the scripts that worked flawless on Mumbai ( the contract on Mumbai is at Contract Address 0x07132c166e53c555a6d69c1e8833e9b0818f3f7a | PolygonScan ).

I also tried different gasLimits etc. which kind of got me other errors and it seems to me that even though i specify gasLimits in truffle or web3 those are not respected by the chain.

Which i also see is that the bytecode of the transaction for contract creation on testnet is way longer than on mainnet.

I have two transactions stuck now ( Polygon Transaction Hash (Txhash) Details | PolygonScan / Polygon Transaction Hash (Txhash) Details | PolygonScan ) which were supposed to redeploy the contract and i gave both of those a gasLimit of 300 Gwei, still nothing happens.

As neither the truffle nor the EVM give real helpful insights i thought maybe you guys can help me out. I checked and double-checked anything on my end but can’t find an error ( also, everything works fine on the testnet).

I tried to interact with the contract directly via truffle console --network matic but an

let instance = await Peezmo.deployed()

gives me

Error: <Contractname> has not been deployed to detected network (network/artifact mismatch)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at runMicrotasks (<anonymous>)
    at Function.deployed (/home/node/.npm-global/lib/node_modules/truffle/build/webpack:/packages/contract/lib/contract/constructorMethods.js:83:1)
    at Object.checkNetworkArtifactMatch (/home/node/.npm-global/lib/node_modules/truffle/build/webpack:/packages/contract/lib/utils/index.js:245:1)

Truffle network config is:

matic: {
      provider: () => new HDWalletProvider({
       providerOrUrl: mainnetNodeUrl,
       privateKeys: [
      gasPrice: 300000000000,
      network_id: 137,       // Matic's id
      confirmations: 0,    // # of confs to wait between deployments. (default: 0)
      timeoutBlocks: 200,  // # of blocks before a deployment times out  (minimum/default: 50)
      skipDryRun: true,     // Skip dry run before migrations? (default: false for public nets )
      networkCheckTimeout: 1000000,
      from: "<Wallet Address>"

Thanks a lot for some guidance and take care

1 Like

Fortunately my problems seized to exist all of a sudden, but it would still be interesting if there was any downtime yesterday or any technical issue of some sort.

Hey Florian - if you are curious about whether your deployment on different providers was the issue - I invite you to use Pocket Network’s recently released Community Endpoint.

Swap in this endpoint and you’ll be pulling from a network of nodes vs. an individual provider’s nodes. Pocket network is currently serving beta users and the endpoint is good for up to 5mn/relays/day. We’ve been testing it internally for weeks with no downtime. Feel free to follow up if you want to be a beta user. Here is a link for more info on the project.