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

make adapters more generic #1524

Merged
merged 107 commits into from
Jul 22, 2024
Merged

make adapters more generic #1524

merged 107 commits into from
Jul 22, 2024

Conversation

james-a-morris
Copy link
Contributor

WIP - not ready for review.

@bmzig
Copy link
Contributor

bmzig commented Jun 13, 2024

I believe the goal here is to make a single generic adapter and then be able to paramerterize it based on what bridges we pass into the constructor. So for example, the adapter instantiated for Optimism will have the canonical bridge as well as CCTP and the DAI/SNX custom bridges passed in. The adapter logic itself should then just go through what bridges it "owns" and find outstanding transfers etc.

As of the latest commit, this is not done yet. The main thing for me to do now is to make sure that all the different types of bridges are set up properly so that James's BaseChainAdapter can work its magic. There will definitely be some low-hanging-fruit refactors once all the bridges are set up correctly, too.

src/common/Constants.ts Outdated Show resolved Hide resolved
src/clients/bridges/utils.ts Outdated Show resolved Hide resolved
@bmzig
Copy link
Contributor

bmzig commented Jun 13, 2024

I still don't think there is much point to reviewing this now since it's so large. There is still work to be done on formatting the bridges.

@bmzig
Copy link
Contributor

bmzig commented Jun 18, 2024

There are some issues with querying deposit/finalization events with the ZkSync Weth bridge, since there are multiple different events to listen for. Also, in general, the BridgeEvent interface is a bit too specific, since we can't add things like Linea deposit hashes/token addresses to the event data.

Copy link
Contributor

@pxrl pxrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bmzig I think this is ready to go in once the tests are passing 👍

src/adapter/bridges/SnxOptimismBridge.ts Outdated Show resolved Hide resolved
src/adapter/BaseChainAdapter.ts Show resolved Hide resolved
Base automatically changed from pxrl/zkSyncTest to master July 19, 2024 14:31
Copy link
Contributor

@pxrl pxrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bmzig James never populated a commit message for this PR so it'd be good to add a good description when merging 👍

@bmzig bmzig merged commit a3d7839 into master Jul 22, 2024
4 checks passed
@bmzig bmzig deleted the james/refactor-adapters branch July 22, 2024 21:09
ishantiw pushed a commit to LiskHQ/across-relayer that referenced this pull request Aug 8, 2024
* improve(adapters): make adapters more generic

Signed-off-by: bennett <[email protected]>

This adds the `adapter` directory which contains all the code for the generic adapter upgrade to be rolled out. Upon this merge, it will still be dormant since it must be enabled via a config, which defaults to the legacy adapters.
---------

Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: bennett <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: bmzig <[email protected]>
Co-authored-by: bennett <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
ishantiw pushed a commit to LiskHQ/across-relayer that referenced this pull request Aug 8, 2024
* improve(adapters): make adapters more generic

Signed-off-by: bennett <[email protected]>

This adds the `adapter` directory which contains all the code for the generic adapter upgrade to be rolled out. Upon this merge, it will still be dormant since it must be enabled via a config, which defaults to the legacy adapters.
---------

Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: bennett <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: bmzig <[email protected]>
Co-authored-by: bennett <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
sameersubudhi pushed a commit to LiskHQ/across-relayer that referenced this pull request Sep 10, 2024
* improve(adapters): make adapters more generic

Signed-off-by: bennett <[email protected]>

This adds the `adapter` directory which contains all the code for the generic adapter upgrade to be rolled out. Upon this merge, it will still be dormant since it must be enabled via a config, which defaults to the legacy adapters.
---------

Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: bennett <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: bmzig <[email protected]>
Co-authored-by: bennett <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
sameersubudhi pushed a commit to LiskHQ/across-relayer that referenced this pull request Sep 10, 2024
* improve(adapters): make adapters more generic

Signed-off-by: bennett <[email protected]>

This adds the `adapter` directory which contains all the code for the generic adapter upgrade to be rolled out. Upon this merge, it will still be dormant since it must be enabled via a config, which defaults to the legacy adapters.
---------

Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: bennett <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: bmzig <[email protected]>
Co-authored-by: bennett <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
sameersubudhi pushed a commit to LiskHQ/across-relayer that referenced this pull request Sep 10, 2024
* improve(adapters): make adapters more generic

Signed-off-by: bennett <[email protected]>

This adds the `adapter` directory which contains all the code for the generic adapter upgrade to be rolled out. Upon this merge, it will still be dormant since it must be enabled via a config, which defaults to the legacy adapters.
---------

Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: bennett <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: bmzig <[email protected]>
Co-authored-by: bennett <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants