Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in scroll, all the tx.wait() raise exception receipt.confirmations is not a function #4783

Open
vvsuperman opened this issue Jul 11, 2024 · 6 comments
Assignees
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6

Comments

@vvsuperman
Copy link

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 vvsuperman added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Jul 11, 2024
@ricmoo
Copy link
Member

ricmoo commented Jul 11, 2024

What does the object look like? If you console.log it? I’m not sure what scroll is. Link?

@vvsuperman
Copy link
Author

scroll is a evm chain........, like arb, op, or zk, https://scrollscan.com/

@abubakvr
Copy link

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?

@vvsuperman
Copy link
Author

no, I catch the exception exactly, then though the transtraction success

@googya
Copy link

googya commented Jul 29, 2024

met the same issue in Hardhat block chain

CleanShot 2024-07-29 at 17 27 30@2x

@pengsp
Copy link

pengsp commented Sep 29, 2024

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

https://github.com/pengsp/smart-contract-caller/blob/2cbd7fc52a93a0aff3b159a07333614349206566/src/app/componets/OperationPanel/Caller.tsx#L133-L137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

5 participants