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

Properly support deposits of custom base token in Portal #199

Open
popzxc opened this issue Nov 20, 2024 · 0 comments
Open

Properly support deposits of custom base token in Portal #199

popzxc opened this issue Nov 20, 2024 · 0 comments

Comments

@popzxc
Copy link
Member

popzxc commented Nov 20, 2024

Right now, running the portal for the chain with custom base token works, but it has some quirks.
One of those quirks is the need for double token approval: when estimating deposit fee, seemingly the need to transfer the base token on L1 is not respected in allowance calculation.

The correct flow would be:

  • Add L2 fee in base token estimation on the deposit view
  • Display that second fee to the user
  • Add up that additional fee value in the allowance approval
  • Use that fee value in the deposit method

In order to test the implementation, you need to deploy a chain with custom base token (use zkstack CLI tool for that, documentation).

The outcome of this task: the flow to deposit custom base tokens is no different from ETH deposit flow (from user perspective).

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

No branches or pull requests

1 participant