Skip to content

Commit

Permalink
Merge branch 'develop' into TT-1550-Provide-PoC-for-keeping-test-conf…
Browse files Browse the repository at this point in the history
…igs-in-git
  • Loading branch information
lukaszcl committed Sep 17, 2024
2 parents f8b8b36 + d14a9b5 commit a52e9df
Show file tree
Hide file tree
Showing 88 changed files with 3,656 additions and 901 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-points-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#updated refactor ccip oracle creator
5 changes: 5 additions & 0 deletions .changeset/hot-roses-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#internal Update to latest UI - PeerId field is introduced for OCR2 bootstrap node in chain config page
5 changes: 5 additions & 0 deletions .changeset/two-pumas-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Updating CCIP OCR3 integration tests according to changes in the chainlink-ccip repo #internal
5 changes: 5 additions & 0 deletions .changeset/unlucky-dolphins-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal Add ccip JobType in feeds service and other jobtype validations
38 changes: 37 additions & 1 deletion .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,43 @@ runner-test-matrix:
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPOffRampAggRateLimit$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2

- id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgBelowFinality$
path: integration-tests/ccip-tests/smoke/ccip_test.go
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E CCIP Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgBelowFinality$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml

- id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgAboveFinalityAtDestination$
path: integration-tests/ccip-tests/smoke/ccip_test.go
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E CCIP Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgAboveFinalityAtDestination$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml

- id: ccip-tests/smoke/ccip_test.go:^TestSmokeCCIPReorgAboveFinalityAtSource$
path: integration-tests/ccip-tests/smoke/ccip_test.go
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E CCIP Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPReorgAboveFinalityAtSource$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml

- id: integration-tests/ccip-tests/load/ccip_test.go:TestLoadCCIPStableRPS
path: integration-tests/ccip-tests/load/ccip_test.go
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ modgraph:

.PHONY: test-short
test-short: ## Run 'go test -short' and suppress uninteresting output
go test -short ./... | grep -v "[no test files]" | grep -v "\(cached\)"
go test -short ./... | grep -v "no test files" | grep -v "\(cached\)"

help:
@echo ""
Expand Down
103 changes: 68 additions & 35 deletions core/capabilities/ccip/configs/evm/contract_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ 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"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/onramp"

evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_config"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/nonce_manager"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/offramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/onramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/aggregator_v3_interface"
kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry"
evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types"
)
Expand All @@ -22,8 +23,9 @@ var (
onrampABI = evmtypes.MustGetABI(onramp.OnRampABI)
capabilitiesRegsitryABI = evmtypes.MustGetABI(kcr.CapabilitiesRegistryABI)
ccipConfigABI = evmtypes.MustGetABI(ccip_config.CCIPConfigABI)
priceRegistryABI = evmtypes.MustGetABI(fee_quoter.FeeQuoterABI)
feeQuoterABI = evmtypes.MustGetABI(fee_quoter.FeeQuoterABI)
nonceManagerABI = evmtypes.MustGetABI(nonce_manager.NonceManagerABI)
priceFeedABI = evmtypes.MustGetABI(aggregator_v3_interface.AggregatorV3InterfaceABI)
)

// MustSourceReaderConfig returns a ChainReaderConfig that can be used to read from the onramp.
Expand All @@ -50,6 +52,17 @@ func MustDestReaderConfig() []byte {
return encoded
}

func MergeReaderConfigs(configs ...evmrelaytypes.ChainReaderConfig) evmrelaytypes.ChainReaderConfig {
allContracts := make(map[string]evmrelaytypes.ChainContractReader)
for _, c := range configs {
for contractName, contractReader := range c.Contracts {
allContracts[contractName] = contractReader
}
}

return evmrelaytypes.ChainReaderConfig{Contracts: allContracts}
}

// DestReaderConfig returns a ChainReaderConfig that can be used to read from the offramp.
var DestReaderConfig = evmrelaytypes.ChainReaderConfig{
Contracts: map[string]evmrelaytypes.ChainContractReader{
Expand Down Expand Up @@ -109,6 +122,47 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{
},
},
},
consts.ContractNameFeeQuoter: {
ContractABI: fee_quoter.FeeQuoterABI,
Configs: map[string]*evmrelaytypes.ChainReaderDefinition{
consts.MethodNameFeeQuoterGetStaticConfig: {
ChainSpecificName: mustGetMethodName("getStaticConfig", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameFeeQuoterGetTokenPrices: {
ChainSpecificName: mustGetMethodName("getTokenPrices", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetDestChainConfig: {
ChainSpecificName: mustGetMethodName("getDestChainConfig", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetPremiumMultiplierWeiPerEth: {
ChainSpecificName: mustGetMethodName("getPremiumMultiplierWeiPerEth", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetTokenTransferFeeConfig: {
ChainSpecificName: mustGetMethodName("getTokenTransferFeeConfig", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameProcessMessageArgs: {
ChainSpecificName: mustGetMethodName("processMessageArgs", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameProcessPoolReturnData: {
ChainSpecificName: mustGetMethodName("processPoolReturnData", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetValidatedTokenPrice: {
ChainSpecificName: mustGetMethodName("getValidatedTokenPrice", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetFeeTokens: {
ChainSpecificName: mustGetMethodName("getFeeTokens", feeQuoterABI),
ReadType: evmrelaytypes.Method,
},
},
},
},
}

Expand Down Expand Up @@ -148,40 +202,19 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{
},
},
},
consts.ContractNamePriceRegistry: {
ContractABI: fee_quoter.FeeQuoterABI,
},
}

var FeedReaderConfig = evmrelaytypes.ChainReaderConfig{
Contracts: map[string]evmrelaytypes.ChainContractReader{
consts.ContractNamePriceAggregator: {
ContractABI: aggregator_v3_interface.AggregatorV3InterfaceABI,
Configs: map[string]*evmrelaytypes.ChainReaderDefinition{
consts.MethodNamePriceRegistryGetStaticConfig: {
ChainSpecificName: mustGetMethodName("getStaticConfig", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetDestChainConfig: {
ChainSpecificName: mustGetMethodName("getDestChainConfig", priceRegistryABI),
ReadType: evmrelaytypes.Method,
consts.MethodNameGetLatestRoundData: {
ChainSpecificName: mustGetMethodName(consts.MethodNameGetLatestRoundData, priceFeedABI),
},
consts.MethodNameGetPremiumMultiplierWeiPerEth: {
ChainSpecificName: mustGetMethodName("getPremiumMultiplierWeiPerEth", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetTokenTransferFeeConfig: {
ChainSpecificName: mustGetMethodName("getTokenTransferFeeConfig", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameProcessMessageArgs: {
ChainSpecificName: mustGetMethodName("processMessageArgs", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameProcessPoolReturnData: {
ChainSpecificName: mustGetMethodName("processPoolReturnData", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetValidatedTokenPrice: {
ChainSpecificName: mustGetMethodName("getValidatedTokenPrice", priceRegistryABI),
ReadType: evmrelaytypes.Method,
},
consts.MethodNameGetFeeTokens: {
ChainSpecificName: mustGetMethodName("getFeeTokens", priceRegistryABI),
ReadType: evmrelaytypes.Method,
consts.MethodNameGetDecimals: {
ChainSpecificName: mustGetMethodName(consts.MethodNameGetDecimals, priceFeedABI),
},
},
},
Expand Down
Loading

0 comments on commit a52e9df

Please sign in to comment.