Open vvsuperman opened 2 months ago
What does the object look like? If you console.log it? I’m not sure what scroll is. Link?
scroll is a evm chain........, like arb, op, or zk, https://scrollscan.com/
Ethers Version
6.13.0
Search Terms
receipt.confirmations is not a function
Describe the Problem
in scroll , when use contract.function to interact with contract, all the tx.wait() raise excepiont TypeError: receipt.confirmations is not a function
but actually the tx is success
Code Snippet
const croc = new CrocEnv.CrocEnv("scroll", this.wallet) const tx = await croc.sellEth(amount).for(usdc).swap() await tx.wait()
Contract ABI
none
Errors
TypeError: receipt.confirmations is not a function
Environment
node.js (v12 or newer)
Environment (Other)
none
@vvsuperman Were you able resolve this?
no, I catch the exception exactly, then though the transtraction success
met the same issue in Hardhat block chain
I encountered the same problem, but I solved it in a different way. After executing the method, instead of calling wait() first, I use getTransaction()
to obtain the tx, and then call tx.wait()
to retrieve the transaction result. Problem perfectly solved!
Below is my code; I hope it can be helpful to you
Ethers Version
6.13.0
Search Terms
receipt.confirmations is not a function
Describe the Problem
in scroll , when use contract.function to interact with contract, all the tx.wait() raise excepiont TypeError: receipt.confirmations is not a function
but actually the tx is success
Code Snippet
Contract ABI
Errors
Environment
node.js (v12 or newer)
Environment (Other)
none