ccip-cross-chain-nft icon indicating copy to clipboard operation
ccip-cross-chain-nft copied to clipboard

Gas Estimation Error While Executing the Command npx hardhat cross-chain-mint --source-minter <SOURCE_MINTER_ADDRESS> --source-blockchain ethereumSepolia --destination-blockchain avalancheFuji --destination-minter <DESTNATION_MINTER_ADDRESS> --pay-fees-in Native

Open nagrarohit opened this issue 1 year ago • 7 comments

I have tried to call the mint function from source chain by using the tasks and provided guides given in the Readme of the repo, but every time the execution fails . And I keep getting the same error as follows:-

Error: missing revert data (action="estimateGas", data=null, reason=null, transaction={ "data": "0xec99afa2000000000000000000000000000000000000000000000000adecc60412ce25a5000000000000000000000000ddc2e0a70a9b42b8e165ac69985523229ee698ec0000000000000000000000000000000000000000000000000000000000000000", "from": "0xe46125E55Dd530319a92C5C4cbdaA6D5b346E35A", "to": "0x7a90eE653898C4465138A42529B7483ab300a9E3" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.8.1)
    at makeError (chainlink\ccip-cross-chain-nft\node_modules\ethers\src.ts\utils\errors.ts:694:21)
    at getBuiltinCallException (chainlink\ccip-cross-chain-nft\node_modules\ethers\src.ts\abi\abi-coder.ts:118:21)
    at Function.getBuiltinCallException (chainlink\ccip-cross-chain-nft\node_modules\ethers\src.ts\abi\abi-coder.ts:230:16)
    at JsonRpcProvider.getRpcError (chainlink\ccip-cross-chain-nft\node_modules\ethers\src.ts\providers\provider-jsonrpc.ts:906:32)
     {
  code: 'CALL_EXCEPTION',
  action: 'estimateGas',
  data: null,
  reason: null,
  transaction: {
    to: '0x7a90eE653898C4465138A42529B7483ab300a9E3',
    data: '0xec99afa2000000000000000000000000000000000000000000000000adecc60412ce25a5000000000000000000000000ddc2e0a70a9b42b8e165ac69985523229ee698ec0000000000000000000000000000000000000000000000000000000000000000',
    from: '0xe46125E55Dd530319a92C5C4cbdaA6D5b346E35A'
  },
  invocation: null,
  revert: null,
  shortMessage: 'missing revert data',
  info: {
    error: { code: -32000, message: 'execution reverted' },
    payload: {
      method: 'eth_estimateGas',
      params: [Array],
      id: 4,
      jsonrpc: '2.0'
    }
  }
}

If anyone can provide a solution, then it will be very helpfull.

nagrarohit avatar Dec 04 '23 14:12 nagrarohit

@nagrarohit I'm getting the same issue here! I made it work using LINK instead Native

Peixer avatar Dec 12 '23 20:12 Peixer

hlo @Peixer , But i tried to use both link and native and it did not work. I keep getting the same error.

nagrarohit avatar Dec 13 '23 04:12 nagrarohit

@nagrarohit my bad, actually I changed the constants.ts file too, the routerConfig is using the deprecated route addresses. In my case, I updated line 47 to the correct address.

Peixer avatar Dec 13 '23 14:12 Peixer

@nagrarohit if you want, you can check my PR

Peixer avatar Dec 13 '23 15:12 Peixer

@Peixer Thanks for sharing the pr. I will try to implement it today. Thanks a lot once again.

nagrarohit avatar Dec 15 '23 05:12 nagrarohit

I'm also encountering a similar issue.

attempting to follow:

https://cll-devrel.gitbook.io/ccip-bootcamp/day-2/exercise-2-build-your-first-cross-chain-nft

performed all the instructions exactly as specified but I am hitting this error on Step 7 (calling the crossChainTransferFrom method):

cast send 0x6dd5cD5eD3b9D8D0E3E6CCdB2bee58135F7a1473 --rpc-url arbitrumSepolia --private-key=$PRIVATE_KEY --gas-limit=1000000 "crossChainTransferFrom(address,address,uint256,uint64,uint8)" 0x8bFC6e2cb3f8E96A04CC6c6aa465d0cB7066Bd57 0x91FD18F897687060dDA7C1f9f36270Af2C09FE15 0 16015286601757825753 1

blockHash               0x6d2d87d73fc18312a3b1d9295aceaf1ebb2e394047d1a3304fc6b6c0274cb49e
blockNumber             71786617
contractAddress
cumulativeGasUsed       143531
effectiveGasPrice       100000000
from                    0x8bFC6e2cb3f8E96A04CC6c6aa465d0cB7066Bd57
gasUsed                 143531
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root
status                  0 (failed)
transactionHash         0x6edb8b6a030d16a2652d5b21579282739c81ee999eceec63cef64d078525fd11
transactionIndex        1
type                    2
blobGasPrice
blobGasUsed
authorizationList
to                      0x6dd5cD5eD3b9D8D0E3E6CCdB2bee58135F7a1473
gasUsedForL1             "0x0"
l1BlockNumber             "0x6377cd"

Upon rerunning the example in remix, I can see that there is a gas estimation error

https://github.com/user-attachments/assets/d43370ca-973d-4a11-83cf-434c84b8201d

All of the previous transactions have completed successfully (i.e. enabling chainselectors on both contracts , minting the nft on arbitrum sepolia etc).

Have also checked the arbitrum sepolia block explorer, but have not been able to find any useful error messages.

https://sepolia.arbiscan.io/address/0x9a753ff9d959e788bf6f59dfd2bd96f2597c4621

Has anyone else encountered this issue? Apologies for posting here, but I'm not sure if there is a separate discord server / forum available for posting ccip bootcamp related queries? @andrejrakic do you happen to know? Thanks in advance 🙏

ssun3 avatar Aug 17 '24 17:08 ssun3

Nvm I found the discord server + bootcamp channel. Will post my query there.

ssun3 avatar Aug 17 '24 20:08 ssun3