How can a user of a dapp withdraw their ERC-20 tokens from L1 -> L2 using their web browser wallet? #133
-
Did you check the documentation?
Did you check for duplicate questions?
Issue DescriptionHi there, it seems to me that right now all documentation for performing a bridge from L2 -> L1 for an arbitrary ERC-20 token requires the use of a Node SDK. This is obviously an issue if anyone wants to make a withdrawal of their own tokens via a dapp frontend (i.e. signing the transaction/message via their web browser wallet such as Metamask). How can I go about enabling dapp users to call In my setup, it wouldn't be an issue if I need to run some code on Node.js and then send some blob of data to be signed to the web frontend where the user can then sign the transaction/message and submit it to L1 using What do I do? As things stand I have L1 -> L2 bridging working, and I have the L2 -> L1 process working up to calling the Any help is much appreciated. Additional InformationNo response FeedbackNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Thinking that Optimism SDK requires a private key is a misunderstanding. In reality, it only needs a signer, and you can use Wagmi and ethers.js to obtain signature information. I'm not sure if I fully understand your question. |
Beta Was this translation helpful? Give feedback.
-
|
Hey @JayWelsh, 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.
Sorry, I don't know why but I made a silly mistake and thought that the JS SDK needed to run on Node. That's my bad, in case anyone makes the same mistake as me and finds this discussion, please be aware that you can run the SDK client-side ( https://sdk.optimism.io/ ).