Im trying to deploy a set of contracts. These are the steps I've followed (the same steps work fine in infura v3 ropsten):

zos add


  "name": "0.1.0",
  "version": "0.1.3",
  "contracts": {
    "MyContract": "MyContract"

zos push --network mainnet_infura


const HDWalletProvider = require("truffle-hdwallet-provider");

const Web3 = require("web3");
const web3 = new Web3();
const gasPrice = web3.utils.toWei('7.5', 'gwei');

module.exports = {
    networks: {
        mainnet_infura: {
          network_id: 1,
          // gas: 7996144, // not needed, set by default
          gasPrice: gasPrice,
          provider: function () {
            return new HDWalletProvider(process.env.WALLET_MNEMONIC, `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`)

Results in:

Compiling contracts...
Writing artifacts to ./build/contracts

Deploying new UpgradeabilityProxyFactory...
Deployed UpgradeabilityProxyFactory 0x60abacaab5b33ba081749553d810944e3eb85dc4
Deploying new Package...
Deployed Package 0xb304cdf3ad373c47255b3042fd1a918b30d9984f
Deploying new AppDirectory...
Deployed AppDirectory 0x4d17e7b4390622c63b5a7722c5aad80948078983
Adding new version...
Successfully written zos.mainnet_infura.json
nonce too low

What's been written in zos.mainnet_infura.json:

    "contracts": {},
    "proxies": {}

Expected results:

Being able to call the zos create MyContract --init --network mainnet_infura command to create the proxy.

The resulting zos.mainnet_infura.json file should look like this:

  "contracts": {
    "MyContract": {
      "address": "0x22ccbe6e992e0c88ff9c909b1e6d9319e643d578",
      "constructorCode": "608060405234801561001057600080fd5b50611af4806100206000396000f300",
      "bodyBytecodeHash": "0a1379e7467296dc98fbc697956354b5d90442cb6585d638e5cdd356c8f1d7f9",
      "bytecodeHash": "bc1e9ac6c4bc4186477ee7da52a3c9494f2d4381dfd647ba4bb51d5fee49bf32"
  "proxies": {
    "MyContract": [
        "address": "0xa5452fe698cd4fee0760627d34e1597b84c4a016",
        "version": "0.1.3",
        "implementation": "0x22ccbe6e992e0c88ff9c909b1e6d9319e643d578"
  "app": {
    "address": "0xe86ecda2102ba0ef8bacc00afe14e3f90f29fbac"
  "version": "0.1.3",
  "package": {
    "address": "0xc54f206f5b96dca2877cf99fd3952cb9f98cf4e8"
  "provider": {
    "address": "0xd5f61f90248c53a783b4027ac14d8a05fbe79ad1"


  • Is there a way to delay the time between each transaction so the nonce gets synced?
  • I noticed that there are additional txs in etherscan associated to my address that are not Contract creations . What are these? Can I do them manually?
  • Where is the code of the contracts being created behind the scenes? UpgradeabilityProxyFactory..., Package..., AppDirectory...

I've tried these solutions with no success: https://ethereum.stackexchange.com/a/50038/31101


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.