-
Notifications
You must be signed in to change notification settings - Fork 204
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
Split up BridgeAdapter by chain [TKR-402] #487
Conversation
@@ -288,7 +288,6 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>( | |||
ERC20BridgeSource.JetSwap, | |||
ERC20BridgeSource.ACryptos, | |||
ERC20BridgeSource.KyberDmm, | |||
ERC20BridgeSource.Synapse, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate
397dd8b
to
a380bdb
Compare
a380bdb
to
2f06734
Compare
Nice one, looks good to me. quick question, this will make it so we have to load the right bridge adapter by chainId in AS? Or will pointing to the right fqt address be enough? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
returns (uint256 boughtAmount) | ||
{ | ||
uint128 protocolId = uint128(uint256(order.source) >> 128); | ||
if (protocolId == BridgeProtocols.CURVE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we missing AAVEV2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
No the chainId check is so that we don't accidentally deploy the wrong bridge adapter for a particular chain. As far as AS is concerned, having the right FQT address is enough |
2f06734
to
9daf21a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Have any thoughts on a nice way to query what it supports? So we can prevent a foot gun where we enable in AS but it's not deployed on chain?
Could error on startup rather than discover in Simbot/prod
874805f
to
e655683
Compare
Description
Splits the
BridgeAdapter
contract up into one contract per chain, in order to buy us some more time wrt contract size.Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.