-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: async callbacks #162
base: sc-feat/entrypoints
Are you sure you want to change the base?
Conversation
* chore: update interface and run scripts
This is awesome! I did some hacking on something similar here a few weeks back. I'm curious, what is the motivation for having the entrypoint contract call occur earlier in the call stack than the CDM? Is it to preserve the CDM's cross domain context (sender, chainId, etc) or something else? In terms of future work -- one thing I came to after hacking was that dependent async calls are probably an important feature. For instance, I suspect devs often will want to make an async call which gets relayed only after some other L2<>L2 Message (e.g. a SuperchainERC20 transfer), or create multiple async calls, and require that they be delivered in order. |
yes! it's to keep the CDM as the "exitpoint" of the relayed messages, abstracting away the extra logic handled via the "wrapper" entrypoint contract
this is exactly why we build the entrypoint primitive! |
Callbacks PoC
This draft showcases a complete callback flow where a call originates on the origin chain, triggers execution on a destination chain, and then returns the result to the origin chain, where it is handled with custom logic.
The flow is as follows:
Possible Next Steps
Possible Future Improvements
Additional Context