Gnosis Safe SDK – Resolving ‘Cannot Estimate Gas’ on Ethereum Mainnet vs Rinkeby

gnosisgnosis-safesafe-core-sdk

I am trying to execute a gnosis safe transaction on Ethereum mainnet but consistently this error –

error: cannot estimate gas; transaction may fail or may require manual gas limit (error={\"code\":3,\"message\":\"execution reverted: GS026\",\"data\":\"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000054753303236000000000000000000000000000000000000000000000000000000\"}, method=\"estimateGas\", transaction={\"from\":\"0xf6754b8a58BFb62C89827bC31be363b608b39bE3\",\"to\":\"0xb76Bed0B12062F3668AfD7d300B2A193a297cee3\",\"data\":\"0x6a761202000000000000000000000000b76bed0b12062f3668afd7d300b2a193a297cee30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000440d582f13000000000000000000000000e8b649af6d46e50f1a8594b72084665a454a0153000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008282129a5ab95e507771c7d95d9011b4f2148509d71c88054b74a833aa16f8b165150f06bca58ab3f283e76f35853ade5992638fc83f7f3ff86496c2b8b96b314f20000000000000000000000000f6754b8a58bfb62c89827bc31be363b608b39be3000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000\",\"accessList\":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.5.3)",
    "level": "error"
}

The same code is working fine on Rinkeby but the same code giving this error on the mainnet. Not able to understand the reason.

Currently having an issue with this transaction

safeAddress: 0xb76Bed0B12062F3668AfD7d300B2A193a297cee3
safeTxHash: 0xd3773e40ff1078e5b836447006099e239967c21bde51b2c948002089b9a9e277
network: Ethereum Mainnet

Best Answer

The transaction 0xd3773e40ff1078e5b836447006099e239967c21bde51b2c948002089b9a9e277 has nonce 2 but the Safe 0xb76Bed0B12062F3668AfD7d300B2A193a297cee3 nonce is 1. You need to execute a transaction with nonce 1 first

Related Topic