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

Spike for Allo v2 on ZKSync #610

Open
0xOneTony opened this issue Jul 3, 2024 · 0 comments
Open

Spike for Allo v2 on ZKSync #610

0xOneTony opened this issue Jul 3, 2024 · 0 comments

Comments

@0xOneTony
Copy link

0xOneTony commented Jul 3, 2024

Here is how you deploy contracts on Allo
https://github.com/allo-protocol/allo-v2/tree/main/deploy

The key things which we found out was:

  • A project can have same anchor address on EVM chains except era cause the anchor is derived from the Registry.sol address and it's not possible to deploy the contract with the same address on era and EVM chains
  • We needed to use era libraries so we had to rewrite the deploy scripts. additional the remapping is a little differnt and we ended up having a custom remapping file for era (captured in the readme marked above)
  • Allo.createPool relies on cloning the strategy address but in era you would need to know the strategy contract bytecode at compile time and not runtime. This means that we cannot use createPool and we end up using createPoolWithCustomStrategy. To still get the benefits of cloning, we ended up writing factory contract per strategy (which is annoying to scale) and that can be found at https://github.com/allo-protocol/allo-v2/tree/main/contracts/factories. The read me there are captures why these factory contracts exsist

When we look at account abstraction / other changes to the contract. It would be worth checking the compaibility for era and if it's not , have fallback functions to ensure allo is usable on era

@0xOneTony 0xOneTony changed the title Spike on Allo v2 on ZKSync Spike for Allo v2 on ZKSync Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant