From d796cb85c230078c61f2970e02f937127c5a4072 Mon Sep 17 00:00:00 2001 From: AnieeG Date: Mon, 8 Apr 2024 13:52:26 -0700 Subject: [PATCH] fix errors --- .../ccip-tests/contracts/contract_deployer.go | 66 +++++++++--------- .../ccip-tests/testsetups/ccip.go | 27 ++------ .../ccip-tests/testsetups/test_env.go | 67 ++++--------------- .../contracts/contract_models.go | 33 ++++----- 4 files changed, 67 insertions(+), 126 deletions(-) diff --git a/integration-tests/ccip-tests/contracts/contract_deployer.go b/integration-tests/ccip-tests/contracts/contract_deployer.go index e243da5d666..8fd1b81d4ad 100644 --- a/integration-tests/ccip-tests/contracts/contract_deployer.go +++ b/integration-tests/ccip-tests/contracts/contract_deployer.go @@ -15,9 +15,8 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "golang.org/x/crypto/curve25519" - "github.com/smartcontractkit/chainlink-common/pkg/config" + "golang.org/x/crypto/curve25519" ocrconfighelper2 "github.com/smartcontractkit/libocr/offchainreporting2/confighelper" ocrtypes2 "github.com/smartcontractkit/libocr/offchainreporting2/types" @@ -28,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" - "github.com/smartcontractkit/chainlink/integration-tests/wrappers" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/arm_contract" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/commit_store" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_offramp" @@ -78,7 +76,7 @@ func (e *CCIPContractsDeployer) DeployMultiCallContract() (common.Address, error auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - address, tx, contract, err := bind.DeployContract(auth, multiCallABI, common.FromHex(MultiCallBIN), wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + address, tx, contract, err := bind.DeployContract(auth, multiCallABI, common.FromHex(MultiCallBIN), backend) if err != nil { return common.Address{}, nil, nil, err } @@ -102,7 +100,7 @@ func (e *CCIPContractsDeployer) DeployTokenMessenger(tokenTransmitter common.Add auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - address, tx, contract, err := mock_usdc_token_messenger.DeployMockE2EUSDCTokenMessenger(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), 0, tokenTransmitter) + address, tx, contract, err := mock_usdc_token_messenger.DeployMockE2EUSDCTokenMessenger(auth, backend, 0, tokenTransmitter) if err != nil { return common.Address{}, nil, nil, err } @@ -113,7 +111,7 @@ func (e *CCIPContractsDeployer) DeployTokenMessenger(tokenTransmitter common.Add } func (e *CCIPContractsDeployer) NewTokenTransmitter(addr common.Address) (*TokenTransmitter, error) { - transmitter, err := mock_usdc_token_transmitter.NewMockE2EUSDCTransmitter(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + transmitter, err := mock_usdc_token_transmitter.NewMockE2EUSDCTransmitter(addr, e.evmClient.Backend()) if err != nil { return nil, err @@ -136,7 +134,7 @@ func (e *CCIPContractsDeployer) DeployTokenTransmitter(domain uint32) (*TokenTra auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - address, tx, contract, err := mock_usdc_token_transmitter.DeployMockE2EUSDCTransmitter(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), 0, domain) + address, tx, contract, err := mock_usdc_token_transmitter.DeployMockE2EUSDCTransmitter(auth, backend, 0, domain) if err != nil { return common.Address{}, nil, nil, err } @@ -155,7 +153,7 @@ func (e *CCIPContractsDeployer) DeployLinkTokenContract() (*LinkToken, error) { auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return link_token_interface.DeployLinkToken(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + return link_token_interface.DeployLinkToken(auth, backend) }) if err != nil { @@ -174,7 +172,7 @@ func (e *CCIPContractsDeployer) DeployBurnMintERC677(ownerMintingAmount *big.Int auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return burn_mint_erc677.DeployBurnMintERC677(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), "Test Token ERC677", "TERC677", 6, new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e9))) + return burn_mint_erc677.DeployBurnMintERC677(auth, backend, "Test Token ERC677", "TERC677", 6, new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e9))) }) if err != nil { return nil, err @@ -216,7 +214,7 @@ func (e *CCIPContractsDeployer) DeployERC20TokenContract(deployerFn blockchain.C } func (e *CCIPContractsDeployer) NewLinkTokenContract(addr common.Address) (*LinkToken, error) { - token, err := link_token_interface.NewLinkToken(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + token, err := link_token_interface.NewLinkToken(addr, e.evmClient.Backend()) if err != nil { return nil, err @@ -235,7 +233,7 @@ func (e *CCIPContractsDeployer) NewLinkTokenContract(addr common.Address) (*Link } func (e *CCIPContractsDeployer) NewERC20TokenContract(addr common.Address) (*ERC20Token, error) { - token, err := erc20.NewERC20(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + token, err := erc20.NewERC20(addr, e.evmClient.Backend()) if err != nil { return nil, err @@ -257,7 +255,7 @@ func (e *CCIPContractsDeployer) NewLockReleaseTokenPoolContract(addr common.Addr *TokenPool, error, ) { - pool, err := lock_release_token_pool.NewLockReleaseTokenPool(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + pool, err := lock_release_token_pool.NewLockReleaseTokenPool(addr, e.evmClient.Backend()) if err != nil { return nil, err @@ -268,7 +266,7 @@ func (e *CCIPContractsDeployer) NewLockReleaseTokenPoolContract(addr common.Addr Str("From", e.evmClient.GetDefaultWallet().Address()). Str("Network Name", e.evmClient.GetNetworkConfig().Name). Msg("New contract") - poolInstance, err := token_pool.NewTokenPool(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + poolInstance, err := token_pool.NewTokenPool(addr, e.evmClient.Backend()) if err != nil { return nil, err } @@ -284,7 +282,7 @@ func (e *CCIPContractsDeployer) NewUSDCTokenPoolContract(addr common.Address) ( *TokenPool, error, ) { - pool, err := usdc_token_pool.NewUSDCTokenPool(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + pool, err := usdc_token_pool.NewUSDCTokenPool(addr, e.evmClient.Backend()) if err != nil { return nil, err @@ -295,7 +293,7 @@ func (e *CCIPContractsDeployer) NewUSDCTokenPoolContract(addr common.Address) ( Str("From", e.evmClient.GetDefaultWallet().Address()). Str("Network Name", e.evmClient.GetNetworkConfig().Name). Msg("New contract") - poolInterface, err := token_pool.NewTokenPool(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + poolInterface, err := token_pool.NewTokenPool(addr, e.evmClient.Backend()) if err != nil { return nil, err } @@ -319,7 +317,7 @@ func (e *CCIPContractsDeployer) DeployUSDCTokenPoolContract(tokenAddr string, to ) (common.Address, *types.Transaction, interface{}, error) { return usdc_token_pool.DeployUSDCTokenPool( auth, - wrappers.MustNewWrappedContractBackend(e.evmClient, nil), + backend, tokenMessenger, token, []common.Address{}, @@ -346,7 +344,7 @@ func (e *CCIPContractsDeployer) DeployLockReleaseTokenPoolContract(tokenAddr str ) (common.Address, *types.Transaction, interface{}, error) { return lock_release_token_pool.DeployLockReleaseTokenPool( auth, - wrappers.MustNewWrappedContractBackend(e.evmClient, nil), + backend, token, []common.Address{}, armProxy, @@ -365,13 +363,13 @@ func (e *CCIPContractsDeployer) DeployMockARMContract() (*common.Address, error) auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return mock_arm_contract.DeployMockARMContract(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + return mock_arm_contract.DeployMockARMContract(auth, backend) }) return address, err } func (e *CCIPContractsDeployer) NewARMContract(addr common.Address) (*ARM, error) { - arm, err := arm_contract.NewARMContract(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + arm, err := arm_contract.NewARMContract(addr, e.evmClient.Backend()) if err != nil { return nil, err } @@ -393,7 +391,7 @@ func (e *CCIPContractsDeployer) NewCommitStore(addr common.Address) ( *CommitStore, error, ) { - ins, err := commit_store.NewCommitStore(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + ins, err := commit_store.NewCommitStore(addr, e.evmClient.Backend()) log.Info(). Str("Contract Address", addr.Hex()). Str("Contract Name", "CommitStore"). @@ -414,7 +412,7 @@ func (e *CCIPContractsDeployer) DeployCommitStore(sourceChainSelector, destChain ) (common.Address, *types.Transaction, interface{}, error) { return commit_store.DeployCommitStore( auth, - wrappers.MustNewWrappedContractBackend(e.evmClient, nil), + backend, commit_store.CommitStoreStaticConfig{ ChainSelector: destChainSelector, SourceChainSelector: sourceChainSelector, @@ -441,7 +439,7 @@ func (e *CCIPContractsDeployer) DeployReceiverDapp(revert bool) ( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return maybe_revert_message_receiver.DeployMaybeRevertMessageReceiver(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), revert) + return maybe_revert_message_receiver.DeployMaybeRevertMessageReceiver(auth, backend, revert) }) if err != nil { return nil, err @@ -457,7 +455,7 @@ func (e *CCIPContractsDeployer) NewReceiverDapp(addr common.Address) ( *ReceiverDapp, error, ) { - ins, err := maybe_revert_message_receiver.NewMaybeRevertMessageReceiver(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + ins, err := maybe_revert_message_receiver.NewMaybeRevertMessageReceiver(addr, e.evmClient.Backend()) log.Info(). Str("Contract Address", addr.Hex()). Str("Contract Name", "ReceiverDapp"). @@ -479,7 +477,7 @@ func (e *CCIPContractsDeployer) DeployRouter(wrappedNative common.Address, armAd auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return router.DeployRouter(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), wrappedNative, armAddress) + return router.DeployRouter(auth, backend, wrappedNative, armAddress) }) if err != nil { return nil, err @@ -495,7 +493,7 @@ func (e *CCIPContractsDeployer) NewRouter(addr common.Address) ( *Router, error, ) { - r, err := router.NewRouter(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + r, err := router.NewRouter(addr, e.evmClient.Backend()) log.Info(). Str("Contract Address", addr.Hex()). Str("Contract Name", "Router"). @@ -516,7 +514,7 @@ func (e *CCIPContractsDeployer) NewPriceRegistry(addr common.Address) ( *PriceRegistry, error, ) { - ins, err := price_registry.NewPriceRegistry(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + ins, err := price_registry.NewPriceRegistry(addr, e.evmClient.Backend()) log.Info(). Str("Contract Address", addr.Hex()). Str("Contract Name", "PriceRegistry"). @@ -535,7 +533,7 @@ func (e *CCIPContractsDeployer) DeployPriceRegistry(tokens []common.Address) (*P auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return price_registry.DeployPriceRegistry(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), nil, tokens, 60*60*24*14) + return price_registry.DeployPriceRegistry(auth, backend, nil, tokens, 60*60*24*14) }) if err != nil { return nil, err @@ -551,7 +549,7 @@ func (e *CCIPContractsDeployer) NewOnRamp(addr common.Address) ( *OnRamp, error, ) { - ins, err := evm_2_evm_onramp.NewEVM2EVMOnRamp(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + ins, err := evm_2_evm_onramp.NewEVM2EVMOnRamp(addr, e.evmClient.Backend()) log.Info(). Str("Contract Address", addr.Hex()). Str("Contract Name", "OnRamp"). @@ -583,7 +581,7 @@ func (e *CCIPContractsDeployer) DeployOnRamp( ) (common.Address, *types.Transaction, interface{}, error) { return evm_2_evm_onramp.DeployEVM2EVMOnRamp( auth, - wrappers.MustNewWrappedContractBackend(e.evmClient, nil), + backend, evm_2_evm_onramp.EVM2EVMOnRampStaticConfig{ LinkToken: linkTokenAddress, ChainSelector: sourceChainSelector, // source chain id @@ -629,7 +627,7 @@ func (e *CCIPContractsDeployer) NewOffRamp(addr common.Address) ( *OffRamp, error, ) { - ins, err := evm_2_evm_offramp.NewEVM2EVMOffRamp(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + ins, err := evm_2_evm_offramp.NewEVM2EVMOffRamp(addr, e.evmClient.Backend()) log.Info(). Str("Contract Address", addr.Hex()). Str("Contract Name", "OffRamp"). @@ -650,7 +648,7 @@ func (e *CCIPContractsDeployer) DeployOffRamp(sourceChainSelector, destChainSele ) (common.Address, *types.Transaction, interface{}, error) { return evm_2_evm_offramp.DeployEVM2EVMOffRamp( auth, - wrappers.MustNewWrappedContractBackend(e.evmClient, nil), + backend, evm_2_evm_offramp.EVM2EVMOffRampStaticConfig{ CommitStore: commitStore, ChainSelector: destChainSelector, @@ -683,7 +681,7 @@ func (e *CCIPContractsDeployer) DeployWrappedNative() (*common.Address, error) { auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return weth9.DeployWETH9(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + return weth9.DeployWETH9(auth, backend) }) if err != nil { return nil, err @@ -696,7 +694,7 @@ func (e *CCIPContractsDeployer) DeployMockAggregator(decimals uint8, initialAns auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return mock_v3_aggregator_contract.DeployMockV3Aggregator(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), decimals, initialAns) + return mock_v3_aggregator_contract.DeployMockV3Aggregator(auth, backend, decimals, initialAns) }) if err != nil { return nil, fmt.Errorf("deploying mock aggregator: %w", err) @@ -715,7 +713,7 @@ func (e *CCIPContractsDeployer) DeployMockAggregator(decimals uint8, initialAns } func (e *CCIPContractsDeployer) NewMockAggregator(addr common.Address) (*MockAggregator, error) { - ins, err := mock_v3_aggregator_contract.NewMockV3Aggregator(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + ins, err := mock_v3_aggregator_contract.NewMockV3Aggregator(addr, e.evmClient.Backend()) if err != nil { return nil, fmt.Errorf("creating mock aggregator: %w", err) } diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index 91db9e609c2..d6081e97c15 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -222,21 +222,6 @@ func (c *CCIPTestConfig) SetNetworkPairs(lggr zerolog.Logger) error { DefaultGasLimit: n.DefaultGasLimit, FinalityDepth: n.FinalityDepth, }) - chainConfig := &ctftestenv.EthereumChainConfig{} - err := chainConfig.Default() - if err != nil { - allError = multierr.Append(allError, fmt.Errorf("failed to get default chain config: %w", err)) - } else { - chainConfig.ChainID = int(chainID) - eth1 := ctftestenv.EthereumVersion_Eth1 - geth := ctftestenv.ExecutionLayer_Geth - - c.EnvInput.PrivateEthereumNetworks[fmt.Sprint(chainID)] = &ctftestenv.EthereumNetwork{ - EthereumVersion: ð1, - ExecutionLayer: &geth, - EthereumChainConfig: chainConfig, - } - } } } @@ -963,13 +948,11 @@ func (o *CCIPTestSetUpOutputs) CreateEnvironment( chainByChainID := make(map[int64]blockchain.EVMClient) if pointer.GetBool(testConfig.TestGroupInput.LocalCluster) { require.NotNil(t, ccipEnv.LocalCluster, "Local cluster shouldn't be nil") - for _, n := range ccipEnv.LocalCluster.EVMNetworks { - if evmClient, err := blockchain.NewEVMClientFromNetwork(*n, lggr); err == nil { - chainByChainID[evmClient.GetChainID().Int64()] = evmClient - chains = append(chains, evmClient) - } else { - lggr.Error().Err(err).Msgf("EVMClient for chainID %d not found", n.ChainID) - } + for _, n := range ccipEnv.LocalCluster.PrivateChain { + primaryNode := n.GetPrimaryNode() + require.NotNil(t, primaryNode, "Primary node is nil in PrivateChain interface") + chainByChainID[primaryNode.GetEVMClient().GetChainID().Int64()] = primaryNode.GetEVMClient() + chains = append(chains, primaryNode.GetEVMClient()) } } else { for _, n := range testConfig.SelectedNetworks { diff --git a/integration-tests/ccip-tests/testsetups/test_env.go b/integration-tests/ccip-tests/testsetups/test_env.go index a928bd57033..10a4198a6de 100644 --- a/integration-tests/ccip-tests/testsetups/test_env.go +++ b/integration-tests/ccip-tests/testsetups/test_env.go @@ -176,66 +176,25 @@ func DeployLocalCluster( testInputs *CCIPTestConfig, ) (*test_env.CLClusterTestEnv, func() error) { selectedNetworks := testInputs.SelectedNetworks - - privateEthereumNetworks := []*ctftestenv.EthereumNetwork{} - for _, network := range testInputs.EnvInput.PrivateEthereumNetworks { - privateEthereumNetworks = append(privateEthereumNetworks, network) - } - - if len(selectedNetworks) > len(privateEthereumNetworks) { - seen := make(map[int64]bool) - missing := []blockchain.EVMNetwork{} - - for _, network := range privateEthereumNetworks { - seen[int64(network.EthereumChainConfig.ChainID)] = true - } - - for _, network := range selectedNetworks { - if !seen[network.ChainID] { - missing = append(missing, network) - } - } - - for _, network := range missing { - chainConfig := &ctftestenv.EthereumChainConfig{} - err := chainConfig.Default() - if err != nil { - require.NoError(t, err, "failed to get default chain config: %w", err) - } else { - chainConfig.ChainID = int(network.ChainID) - eth1 := ctftestenv.EthereumVersion_Eth1 - geth := ctftestenv.ExecutionLayer_Geth - - privateEthereumNetworks = append(privateEthereumNetworks, &ctftestenv.EthereumNetwork{ - EthereumVersion: ð1, - ExecutionLayer: &geth, - EthereumChainConfig: chainConfig, - }) - } - } - - require.Equal(t, len(selectedNetworks), len(privateEthereumNetworks), "failed to create undefined selected networks. Maybe some of them had the same chain ids?") - } - env, err := test_env.NewCLTestEnvBuilder(). WithTestConfig(testInputs.EnvInput). WithTestInstance(t). - WithPrivateEthereumNetworks(privateEthereumNetworks). + WithPrivateGethChains(selectedNetworks). WithMockAdapter(). WithoutCleanup(). Build() require.NoError(t, err) - for i, networkCfg := range selectedNetworks { - rpcProvider, err := env.GetRpcProvider(networkCfg.ChainID) - require.NoError(t, err, "Error getting rpc provider") - selectedNetworks[i].URLs = rpcProvider.PrivateWsUrsl() - selectedNetworks[i].HTTPURLs = rpcProvider.PrivateHttpUrls() - newNetwork := networkCfg - newNetwork.URLs = rpcProvider.PublicWsUrls() - newNetwork.HTTPURLs = rpcProvider.PublicHttpUrls() - env.EVMNetworks = append(env.EVMNetworks, &newNetwork) + for _, n := range env.PrivateChain { + primaryNode := n.GetPrimaryNode() + require.NotNil(t, primaryNode, "Primary node is nil in PrivateChain interface") + for i, networkCfg := range selectedNetworks { + if networkCfg.ChainID == n.GetNetworkConfig().ChainID { + selectedNetworks[i].URLs = []string{primaryNode.GetInternalWsUrl()} + selectedNetworks[i].HTTPURLs = []string{primaryNode.GetInternalHttpUrl()} + } + } + testInputs.SelectedNetworks = selectedNetworks } - testInputs.SelectedNetworks = selectedNetworks // a func to start the CL nodes asynchronously deployCL := func() error { @@ -253,7 +212,7 @@ func DeployLocalCluster( return err } ccipNode, err := test_env.NewClNode( - []string{env.DockerNetwork.Name}, + []string{env.Network.Name}, pointer.GetString(clNode.ChainlinkImage.Image), pointer.GetString(clNode.ChainlinkImage.Version), toml, test_env.WithPgDBOptions( @@ -280,7 +239,7 @@ func DeployLocalCluster( return err } ccipNode, err := test_env.NewClNode( - []string{env.DockerNetwork.Name}, + []string{env.Network.Name}, pointer.GetString(testInputs.EnvInput.NewCLCluster.Common.ChainlinkImage.Image), pointer.GetString(testInputs.EnvInput.NewCLCluster.Common.ChainlinkImage.Version), toml, test_env.WithPgDBOptions( diff --git a/integration-tests/contracts/contract_models.go b/integration-tests/contracts/contract_models.go index 3d738033d68..ac295eaf822 100644 --- a/integration-tests/contracts/contract_models.go +++ b/integration-tests/contracts/contract_models.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/libocr/gethwrappers/offchainaggregator" "github.com/smartcontractkit/libocr/gethwrappers2/ocr2aggregator" ocrConfigHelper "github.com/smartcontractkit/libocr/offchainreporting/confighelper" @@ -112,22 +113,22 @@ type OffChainAggregatorConfig struct { } type OffChainAggregatorV2Config struct { - DeltaProgress time.Duration - DeltaResend time.Duration - DeltaRound time.Duration - DeltaGrace time.Duration - DeltaStage time.Duration - RMax uint8 - S []int - Oracles []ocrConfigHelper2.OracleIdentityExtra - ReportingPluginConfig []byte - MaxDurationQuery time.Duration - MaxDurationObservation time.Duration - MaxDurationReport time.Duration - MaxDurationShouldAcceptFinalizedReport time.Duration - MaxDurationShouldTransmitAcceptedReport time.Duration - F int - OnchainConfig []byte + DeltaProgress *config.Duration `toml:",omitempty"` + DeltaResend *config.Duration `toml:",omitempty"` + DeltaRound *config.Duration `toml:",omitempty"` + DeltaGrace *config.Duration `toml:",omitempty"` + DeltaStage *config.Duration `toml:",omitempty"` + RMax uint8 `toml:"-"` + S []int `toml:"-"` + Oracles []ocrConfigHelper2.OracleIdentityExtra `toml:"-"` + ReportingPluginConfig []byte `toml:"-"` + MaxDurationQuery *config.Duration `toml:",omitempty"` + MaxDurationObservation *config.Duration `toml:",omitempty"` + MaxDurationReport *config.Duration `toml:",omitempty"` + MaxDurationShouldAcceptFinalizedReport *config.Duration `toml:",omitempty"` + MaxDurationShouldTransmitAcceptedReport *config.Duration `toml:",omitempty"` + F int `toml:"-"` + OnchainConfig []byte `toml:"-"` } type OffchainAggregatorData struct {