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

investigate why userOpExecutor isn't returning tx hash right away #3592

Open
frolic opened this issue Feb 8, 2025 · 1 comment
Open

investigate why userOpExecutor isn't returning tx hash right away #3592

frolic opened this issue Feb 8, 2025 · 1 comment

Comments

@frolic
Copy link
Member

frolic commented Feb 8, 2025

writeContract and sendTransaction expect to return a tx hash, but under the hood, these actions are wrapped in user ops that need to wait for the user op receipt to get the tx hash

however, the userOpExecutor should be caching + returning the user op hash, and this the tx hash, right away

however, on anvil with block time (e.g. anvil -b 2), the client is waiting for the tx to be mined before the write's tx hash is returned

@frolic
Copy link
Member Author

frolic commented Feb 8, 2025

ahh it's this:

const receipt = await getAction(
executor,
waitForTransactionReceipt,
"waitForTransactionReceipt",
)({ hash: transactionHash });

I think we'll need to rethink/rework the writeContract and sendTransaction action overrides to not wait on the receipt before returning the tx hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant