vfat-io / adventure-party

Helper contract for andrecronje/rarity
40 stars 63 forks source link

Sometimes "Error: cannot estimate gas; transaction may fail or may require manual gas limit" #14

Open emeraldhieu opened 2 years ago

emeraldhieu commented 2 years ago

Sometimes summoning shows this error. I created 1st party, error. I created 2nd party, no error. I created 3rd party, error. All the parties were created successfully and can be queries on ftmscan.com.

hieunguyen@hieunguyen adventure-party % npx hardhat run scripts/deploy.ts --network fantom Creating Typechain artifacts in directory typechain for target ethers-v5 Successfully generated Typechain artifacts! AdventureParty deployed to: 0xFcf9dC9ba107blahblahblahblahblahblahblahblah Summoming 1,2,3,4,5,6,7,8,9,10,11 adventurers, please wait... Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"name":"ProviderError","code":3,"_isProviderError":true,"data":"0x4e487b710000000000000000000000000000000000000000000000000000000000000032"}, method="call", transaction={"from":"0x417FDA4Fd1851E5A1861cblahblahblahblahblahblah","to":"0xFcf9dC9ba107d1BB543blahblahblahblahblahblah","data":"0x4a2fc9e8000000000000000000000000000000000000000000000000000000000000000a","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.4.5) at Logger.makeError (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@ethersproject/logger/src.ts/index.ts:225:28) at Logger.throwError (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@ethersproject/logger/src.ts/index.ts:237:20) at checkError (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:80:16) at EthersProviderWrapper. (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:555:20) at step (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23) at Object.throw (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53) at rejected (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65) at processTicksAndRejections (node:internal/process/task_queues:96:5) { reason: 'cannot estimate gas; transaction may fail or may require manual gas limit', code: 'UNPREDICTABLE_GAS_LIMIT', error: ProviderError: execution reverted at HttpProvider.request (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/http.ts:49:19) at LocalAccountsProvider.request (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/accounts.ts:168:34) at processTicksAndRejections (node:internal/process/task_queues:96:5) at EthersProviderWrapper.send (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20), method: 'call', transaction: { from: '0x417FDA4Fd1851E5A1861cblahblahblahblahblahblah', to: '0xFcf9dC9ba107d1BB543e1C270blahblahblahblahblahblah', data: '0x4a2fc9e8000000000000000000000000000000000000000000000000000000000000000a', accessList: null } }