[Core Protocol] Can I bridge multiple tokens in the same TX? #65
-
Issue DescriptionHello, I am looking to bridge some tokens from Optimism to Mainnet. Thank you Additional InformationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 15 replies
-
Hey @efecarranza, I took a look a look a the Optimism Portal Contract and it looks like it only processes one withdrawal transaction at a time. I'm not sure if there is a higher level way to do this. Let me ask around and see! |
Beta Was this translation helpful? Give feedback.
-
Yes you can. You can use our sdk to accomplish this.
and use multicall to initiate it |
Beta Was this translation helpful? Give feedback.
-
Hey @efecarranza, We hope your recent question was resolved to your satisfaction. Your feedback is invaluable and helps us improve our support services. Could you spare a moment to fill out a short feedback survey. Thank you for helping us improve our developer community. |
Beta Was this translation helpful? Give feedback.
If you want to do it with foundry it's certainly possible. It is very tedious though as you will have to reimplement a good amount of code in solidity to do it with a foundry script alone.
op-viem since it doesn't have the tech debt of handling pre bedrock tx is the best reference code for how to do withdrawals and also how to prove/finalize them https://github.com/base-org/op-viem. Check out the code for proving claiming and initiating withdrawals as a reference implementation of how to do this.
If you run into any issues or questions implementing this in foundry let me know