Skip to content

Commit

Permalink
Set nonce manager config for chain reader.
Browse files Browse the repository at this point in the history
  • Loading branch information
winder committed Aug 23, 2024
1 parent 876b868 commit 29267b2
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions core/capabilities/ccip/configs/evm/contract_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi"

"github.com/smartcontractkit/chainlink-ccip/pkg/consts"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/nonce_manager"

evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_config"
Expand All @@ -22,6 +23,7 @@ var (
capabilitiesRegsitryABI = evmtypes.MustGetABI(kcr.CapabilitiesRegistryABI)
ccipConfigABI = evmtypes.MustGetABI(ccip_config.CCIPConfigABI)
priceRegistryABI = evmtypes.MustGetABI(price_registry.PriceRegistryABI)
nonceManagerABI = evmtypes.MustGetABI(nonce_manager.NonceManagerABI)
)

// MustSourceReaderConfig returns a ChainReaderConfig that can be used to read from the onramp.
Expand Down Expand Up @@ -142,40 +144,53 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{
Configs: map[string]*evmrelaytypes.ChainReaderDefinition{
// TODO: update with the consts from https://github.com/smartcontractkit/chainlink-ccip/pull/39
// in a followup.
"GetStaticConfig": {
consts.MethodNamePriceRegistryGetStaticConfig: {
ChainSpecificName: mustGetMethodName("getStaticConfig", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
"GetDestChainConfig": {
consts.MethodNameGetDestChainConfig: {
ChainSpecificName: mustGetMethodName("getDestChainConfig", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
"GetPremiumMultiplierWeiPerEth": {
consts.MethodNameGetPremiumMultiplierWeiPerEth: {
ChainSpecificName: mustGetMethodName("getPremiumMultiplierWeiPerEth", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
"GetTokenTransferFeeConfig": {
consts.MethodNameGetTokenTransferFeeConfig: {
ChainSpecificName: mustGetMethodName("getTokenTransferFeeConfig", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
"ProcessMessageArgs": {
consts.MethodNameProcessMessageArgs: {
ChainSpecificName: mustGetMethodName("processMessageArgs", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
"ValidatePoolReturnData": {
consts.MethodNameValidatePoolReturnData: {
ChainSpecificName: mustGetMethodName("validatePoolReturnData", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
"GetValidatedTokenPrice": {
consts.MethodNameGetValidatedTokenPrice: {
ChainSpecificName: mustGetMethodName("getValidatedTokenPrice", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
"GetFeeTokens": {
consts.MethodNameGetFeeTokens: {
ChainSpecificName: mustGetMethodName("getFeeTokens", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
},
},
consts.ContractNameNonceManager: {

Check failure on line 181 in core/capabilities/ccip/configs/evm/contract_reader.go

View workflow job for this annotation

GitHub Actions / Core Tests (go_core_race_tests)

undefined: consts.ContractNameNonceManager

Check failure on line 181 in core/capabilities/ccip/configs/evm/contract_reader.go

View workflow job for this annotation

GitHub Actions / Core Tests (go_core_ccip_deployment_tests)

undefined: consts.ContractNameNonceManager

Check failure on line 181 in core/capabilities/ccip/configs/evm/contract_reader.go

View workflow job for this annotation

GitHub Actions / lint

undefined: consts.ContractNameNonceManager

Check failure on line 181 in core/capabilities/ccip/configs/evm/contract_reader.go

View workflow job for this annotation

GitHub Actions / Core Tests (go_core_tests)

undefined: consts.ContractNameNonceManager

Check failure on line 181 in core/capabilities/ccip/configs/evm/contract_reader.go

View workflow job for this annotation

GitHub Actions / Core Tests (go_core_fuzz)

undefined: consts.ContractNameNonceManager

Check failure on line 181 in core/capabilities/ccip/configs/evm/contract_reader.go

View workflow job for this annotation

GitHub Actions / Flakey Test Detection

undefined: consts.ContractNameNonceManager
ContractABI: nonce_manager.NonceManagerABI,
Configs: map[string]*evmrelaytypes.ChainReaderDefinition{
consts.MethodNameGetInboundNonce: {
ChainSpecificName: mustGetMethodName("getInboundNonce", nonceManagerABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetOutboundNonce: {
ChainSpecificName: mustGetMethodName("getOutboundNonce", nonceManagerABI),
ReadType: evmrelaytypes.Method,
},
},
},
},
}

Expand Down

0 comments on commit 29267b2

Please sign in to comment.