-
Notifications
You must be signed in to change notification settings - Fork 31
combine 1.6 and 2.0 connect lanes #1794
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
654b4e3
wip
tt-cll 3b93078
compile
tt-cll d7a6a90
wip
tt-cll 8ef1b91
Merge remote-tracking branch 'origin/develop' into tt/combine
tt-cll 174cf2d
paths
tt-cll ca60641
might be passing
tt-cll c97e8ce
duplicate
tt-cll 79ecab7
skip populate pre 2
tt-cll 0745953
add canton
tt-cll ff48fc9
Merge remote-tracking branch 'origin/develop' into tt/combine
tt-cll 5be8e8f
comments
tt-cll af77fa5
x-ref
tt-cll 9e9ccd2
x-ref
tt-cll 622b963
Update deployment/lanes/connect_chains.go
tt-cll 758e36b
Update ccv/chains/evm/deployment/v1_7_0/sequences/configure_chain_for…
tt-cll 86184d9
simplify due to infer
tt-cll d740d54
Merge branch 'develop' into tt/combine
tt-cll bf46f59
tests
tt-cll 4b30eac
bugs
tt-cll 712a736
Merge remote-tracking branch 'origin/develop' into tt/combine
tt-cll dd7c590
merge conflicts
tt-cll c6c12c1
fq param split
tt-cll 39f5e6c
cv split
tt-cll dec906a
Merge remote-tracking branch 'origin/develop' into tt/combine
tt-cll 12a2713
gomod
tt-cll 751b0bf
bad merge
tt-cll 65e7d54
Merge remote-tracking branch 'origin/develop' into tt/combine
tt-cll c5a49ae
Merge remote-tracking branch 'origin/develop' into tt/combine
tt-cll 1e71fe8
Merge branch 'develop' into tt/combine
tt-cll 7299e99
tests
tt-cll 7e766b3
merge
tt-cll 07b603c
make generate
tt-cll a6e18cc
v2 default
tt-cll 7d65fe8
Merge branch 'develop' into tt/combine
tt-cll 349ce9b
merge
tt-cll abd7d54
tests
tt-cll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,80 @@ | ||
| package adapters | ||
|
|
||
| import ( | ||
| "github.com/ethereum/go-ethereum/common" | ||
|
|
||
| seq_core "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" | ||
| "github.com/smartcontractkit/chainlink-ccip/deployment/v1_7_0/adapters" | ||
| "github.com/smartcontractkit/chainlink-deployments-framework/chain" | ||
| "github.com/smartcontractkit/chainlink-deployments-framework/datastore" | ||
| "github.com/smartcontractkit/chainlink-deployments-framework/operations" | ||
|
|
||
| "github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm/deployment/v1_7_0/sequences" | ||
|
|
||
| datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" | ||
|
|
||
| "github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm/deployment/latest/operations/offramp" | ||
| "github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm/deployment/latest/operations/onramp" | ||
| "github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm/deployment/v2_0_0/operations/fee_quoter" | ||
| evm_datastore_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" | ||
| "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" | ||
| "github.com/smartcontractkit/chainlink-ccip/deployment/lanes" | ||
| ) | ||
|
|
||
| // ChainFamilyAdapter is the adapter for chains of the EVM family. | ||
| type ChainFamilyAdapter struct{} | ||
|
|
||
| // ConfigureChainForLanesSequence returns the sequence for configuring a chain of the EVM family for CCIP lanes. | ||
| func (c *ChainFamilyAdapter) ConfigureChainForLanes() *operations.Sequence[adapters.ConfigureChainForLanesInput, seq_core.OnChainOutput, chain.BlockChains] { | ||
| return sequences.ConfigureChainForLanes | ||
| // ConfigureLaneLegAsSource returns the sequence for configuring a chain of the EVM family as a source chain for CCIP lanes. | ||
| func (c *ChainFamilyAdapter) ConfigureLaneLegAsSource() *operations.Sequence[lanes.UpdateLanesInput, seq_core.OnChainOutput, chain.BlockChains] { | ||
| return sequences.ConfigureLaneLegAsSource | ||
| } | ||
|
|
||
| // ConfigureLaneLegAsDest returns the sequence for configuring a chain of the EVM family as a destination chain for CCIP lanes. | ||
| func (c *ChainFamilyAdapter) ConfigureLaneLegAsDest() *operations.Sequence[lanes.UpdateLanesInput, seq_core.OnChainOutput, chain.BlockChains] { | ||
| return sequences.ConfigureLaneLegAsDest | ||
| } | ||
|
|
||
| func (a *ChainFamilyAdapter) GetOnRampAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error) { | ||
| addr, err := datastore_utils.FindAndFormatRef(ds, datastore.AddressRef{ | ||
| ChainSelector: chainSelector, | ||
| Type: datastore.ContractType(onramp.ContractType), | ||
| Version: onramp.Version, | ||
| }, chainSelector, evm_datastore_utils.ToEVMAddressBytes) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return addr, nil | ||
| } | ||
|
|
||
| func (a *ChainFamilyAdapter) GetOffRampAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error) { | ||
| addr, err := datastore_utils.FindAndFormatRef(ds, datastore.AddressRef{ | ||
| ChainSelector: chainSelector, | ||
| Type: datastore.ContractType(offramp.ContractType), | ||
| Version: offramp.Version, | ||
| }, chainSelector, evm_datastore_utils.ToEVMAddressBytes) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return addr, nil | ||
| } | ||
|
|
||
| func (a *ChainFamilyAdapter) GetFQAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error) { | ||
| addr, err := datastore_utils.FindAndFormatRef(ds, datastore.AddressRef{ | ||
| ChainSelector: chainSelector, | ||
| Type: datastore.ContractType(fee_quoter.ContractType), | ||
| Version: fee_quoter.Version, | ||
| }, chainSelector, evm_datastore_utils.ToEVMAddressBytes) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return addr, nil | ||
| } | ||
|
|
||
| // AddressRefToBytes returns the byte representation of an address for this chain family. | ||
| func (c *ChainFamilyAdapter) AddressRefToBytes(ref datastore.AddressRef) ([]byte, error) { | ||
| return common.HexToAddress(ref.Address).Bytes(), nil | ||
| func (a *ChainFamilyAdapter) GetRouterAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error) { | ||
| addr, err := datastore_utils.FindAndFormatRef(ds, datastore.AddressRef{ | ||
| ChainSelector: chainSelector, | ||
| Type: datastore.ContractType(router.ContractType), | ||
| Version: router.Version, | ||
| }, chainSelector, evm_datastore_utils.ToEVMAddressBytes) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return addr, nil | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.