Skip to content

Commit

Permalink
Fix config and add a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
winder committed Oct 1, 2024
1 parent 14c2308 commit 40e73f3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/capabilities/ccip/configs/evm/contract_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{
ChainSpecificName: mustGetMethodName("getLatestPriceSequenceNumber", offrampABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameOffRampGetDestChainConfig: {
ChainSpecificName: mustGetMethodName("getDestChainConfig", offrampABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameOffRampGetStaticConfig: {
ChainSpecificName: mustGetMethodName("getStaticConfig", offrampABI),
ReadType: evmrelaytypes.Method,
Expand Down Expand Up @@ -224,6 +220,12 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{
ChainSpecificName: mustGetMethodName("getDynamicConfig", onrampABI),
ReadType: evmrelaytypes.Method,
},
// TODO: swap with const.
"OnRampGetDestChainConfig": {
//consts.MethodNameOffRampGetDestChainConfig: {
ChainSpecificName: mustGetMethodName("getDestChainConfig", onrampABI),
ReadType: evmrelaytypes.Method,
},
//nolint:staticcheck // TODO: remove deprecated config.
consts.MethodNameOnrampGetStaticConfig: {
ChainSpecificName: mustGetMethodName("getStaticConfig", onrampABI),
Expand Down
12 changes: 12 additions & 0 deletions core/capabilities/ccip/configs/evm/init_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package evm

import (
"testing"
)

func TestConfig(t *testing.T) {
// Config is created during initialization, the following functions may panic:
// MustGetABI
// mustGetMethodName
// mustGetEventName
}

0 comments on commit 40e73f3

Please sign in to comment.