From 88f285b94c23d0c684d337064758a5edde380fe2 Mon Sep 17 00:00:00 2001 From: Makram Date: Thu, 27 Jun 2024 13:40:33 +0300 Subject: [PATCH] ccip cap config contract updates (#1098) ## Motivation The most recent merge introduced breaking changes to the capability registry contract. This PR fixes them. ## Solution * capability registry -> capabilities registry rename * implement IERC165 for the capabilities registry * update ICapabilitiesRegistry interface --- contracts/gas-snapshots/ccip.gas-snapshot | 100 +- .../scripts/native_solc_compile_all_ccip | 2 +- ...bilityConfiguration.sol => CCIPConfig.sol} | 42 +- ...Registry.sol => ICapabilitiesRegistry.sol} | 16 +- ...tyConfiguration.t.sol => CCIPConfig.t.sol} | 669 +++++----- ...urationHelper.sol => CCIPConfigHelper.sol} | 6 +- .../ccip_capability_configuration.go | 1079 ---------------- .../ccip/generated/ccip_config/ccip_config.go | 1103 +++++++++++++++++ ...rapper-dependency-versions-do-not-edit.txt | 2 +- core/gethwrappers/ccip/go_generate.go | 2 +- 10 files changed, 1508 insertions(+), 1513 deletions(-) rename contracts/src/v0.8/ccip/capability/{CCIPCapabilityConfiguration.sol => CCIPConfig.sol} (93%) rename contracts/src/v0.8/ccip/capability/interfaces/{ICapabilityRegistry.sol => ICapabilitiesRegistry.sol} (53%) rename contracts/src/v0.8/ccip/test/capability/{CCIPCapabilityConfiguration.t.sol => CCIPConfig.t.sol} (60%) rename contracts/src/v0.8/ccip/test/helpers/{CCIPCapabilityConfigurationHelper.sol => CCIPConfigHelper.sol} (86%) delete mode 100644 core/gethwrappers/ccip/generated/ccip_capability_configuration/ccip_capability_configuration.go create mode 100644 core/gethwrappers/ccip/generated/ccip_config/ccip_config.go diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 6eae209ae0..3425990ddd 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -34,57 +34,57 @@ BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28789) BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55208) BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243659) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24260) -CCIPCapabilityConfigurationSetup:test_getCapabilityConfiguration_Success() (gas: 9561) -CCIPCapabilityConfiguration_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 70645) -CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 350565) -CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_RunningToStaging_Success() (gas: 471510) -CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_StagingToRunning_Success() (gas: 440232) -CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_TooManyOCR3Configs_Reverts() (gas: 37027) -CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_threeCommitConfigs_Reverts() (gas: 61043) -CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_threeExecutionConfigs_Reverts() (gas: 60963) -CCIPCapabilityConfiguration_ConfigStateMachine:test__stateFromConfigLength_Success() (gas: 11764) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigStateTransition_Success() (gas: 8897) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_InitToRunning_Success() (gas: 303038) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_InitToRunning_WrongConfigCount_Reverts() (gas: 49619) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_NonExistentConfigTransition_Reverts() (gas: 32253) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_Success() (gas: 367516) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigCount_Reverts() (gas: 120877) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigDigestBlueGreen_Reverts() (gas: 156973) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_Success() (gas: 367292) -CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_WrongConfigDigest_Reverts() (gas: 157040) -CCIPCapabilityConfiguration_ConfigStateMachine:test_getCapabilityConfiguration_Success() (gas: 9648) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InitToRunning_Success() (gas: 1044370) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InvalidConfigLength_Reverts() (gas: 27539) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InvalidConfigStateTransition_Reverts() (gas: 23083) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_RunningToStaging_Success() (gas: 1992245) -CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_StagingToRunning_Success() (gas: 2595825) -CCIPCapabilityConfiguration__updatePluginConfig:test_getCapabilityConfiguration_Success() (gas: 9626) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() (gas: 1833893) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitConfigOnly_Success() (gas: 1055282) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ExecConfigOnly_Success() (gas: 1055313) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilityRegistryCanCall_Reverts() (gas: 9576) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ZeroLengthConfig_Success() (gas: 16070) -CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_getCapabilityConfiguration_Success() (gas: 9626) -CCIPCapabilityConfiguration_chainConfig:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 182909) -CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 342472) -CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 19116) -CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 266071) -CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14807) -CCIPCapabilityConfiguration_chainConfig:test_getCapabilityConfiguration_Success() (gas: 9604) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 285383) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 282501) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 283422) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 283588) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_NodeNotInRegistry_Reverts() (gas: 287815) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1068544) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 282309) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_P2PIdsLengthNotMatching_Reverts() (gas: 284277) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_Success() (gas: 289222) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManyBootstrapP2PIds_Reverts() (gas: 285518) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1120660) -CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManyTransmitters_Reverts() (gas: 1119000) -CCIPCapabilityConfiguration_validateConfig:test_getCapabilityConfiguration_Success() (gas: 9540) CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2132891) +CCIPConfigSetup:test_getCapabilityConfiguration_Success() (gas: 9495) +CCIPConfig_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 70755) +CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 357994) +CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_RunningToStaging_Success() (gas: 481619) +CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_StagingToRunning_Success() (gas: 447731) +CCIPConfig_ConfigStateMachine:test__groupByPluginType_TooManyOCR3Configs_Reverts() (gas: 37027) +CCIPConfig_ConfigStateMachine:test__groupByPluginType_threeCommitConfigs_Reverts() (gas: 61043) +CCIPConfig_ConfigStateMachine:test__groupByPluginType_threeExecutionConfigs_Reverts() (gas: 60963) +CCIPConfig_ConfigStateMachine:test__stateFromConfigLength_Success() (gas: 11764) +CCIPConfig_ConfigStateMachine:test__validateConfigStateTransition_Success() (gas: 8765) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_InitToRunning_Success() (gas: 307840) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_InitToRunning_WrongConfigCount_Reverts() (gas: 49663) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_NonExistentConfigTransition_Reverts() (gas: 32275) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_Success() (gas: 372425) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigCount_Reverts() (gas: 120943) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigDigestBlueGreen_Reverts() (gas: 157105) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_Success() (gas: 372201) +CCIPConfig_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_WrongConfigDigest_Reverts() (gas: 157172) +CCIPConfig_ConfigStateMachine:test_getCapabilityConfiguration_Success() (gas: 9583) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_InitToRunning_Success() (gas: 1051740) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_InvalidConfigLength_Reverts() (gas: 27539) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_InvalidConfigStateTransition_Reverts() (gas: 23105) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_RunningToStaging_Success() (gas: 2002384) +CCIPConfig__updatePluginConfig:test__updatePluginConfig_StagingToRunning_Success() (gas: 2608050) +CCIPConfig__updatePluginConfig:test_getCapabilityConfiguration_Success() (gas: 9583) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() (gas: 1844033) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitConfigOnly_Success() (gas: 1062709) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ExecConfigOnly_Success() (gas: 1062740) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_Reverts() (gas: 9599) +CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ZeroLengthConfig_Success() (gas: 16070) +CCIPConfig_beforeCapabilityConfigSet:test_getCapabilityConfiguration_Success() (gas: 9583) +CCIPConfig_chainConfig:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 184703) +CCIPConfig_chainConfig:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 344332) +CCIPConfig_chainConfig:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 20258) +CCIPConfig_chainConfig:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 267558) +CCIPConfig_chainConfig:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14829) +CCIPConfig_chainConfig:test_getCapabilityConfiguration_Success() (gas: 9626) +CCIPConfig_validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 290206) +CCIPConfig_validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 287302) +CCIPConfig_validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 288245) +CCIPConfig_validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 288389) +CCIPConfig_validateConfig:test__validateConfig_NodeNotInRegistry_Reverts() (gas: 293767) +CCIPConfig_validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1107053) +CCIPConfig_validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 287109) +CCIPConfig_validateConfig:test__validateConfig_P2PIdsLengthNotMatching_Reverts() (gas: 289078) +CCIPConfig_validateConfig:test__validateConfig_Success() (gas: 296533) +CCIPConfig_validateConfig:test__validateConfig_TooManyBootstrapP2PIds_Reverts() (gas: 290321) +CCIPConfig_validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1160583) +CCIPConfig_validateConfig:test__validateConfig_TooManyTransmitters_Reverts() (gas: 1158919) +CCIPConfig_validateConfig:test_getCapabilityConfiguration_Success() (gas: 9562) CommitStore_constructor:test_Constructor_Success() (gas: 3091440) CommitStore_isUnpausedAndRMNHealthy:test_RMN_Success() (gas: 75331) CommitStore_report:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 28784) diff --git a/contracts/scripts/native_solc_compile_all_ccip b/contracts/scripts/native_solc_compile_all_ccip index 661de2b842..a23901bd5b 100755 --- a/contracts/scripts/native_solc_compile_all_ccip +++ b/contracts/scripts/native_solc_compile_all_ccip @@ -75,7 +75,7 @@ compileContract ccip/RMN.sol compileContract ccip/ARMProxy.sol compileContract ccip/tokenAdminRegistry/TokenAdminRegistry.sol compileContract ccip/tokenAdminRegistry/RegistryModuleOwnerCustom.sol -compileContract ccip/capability/CCIPCapabilityConfiguration.sol +compileContract ccip/capability/CCIPConfig.sol # Test helpers compileContract ccip/test/helpers/BurnMintERC677Helper.sol diff --git a/contracts/src/v0.8/ccip/capability/CCIPCapabilityConfiguration.sol b/contracts/src/v0.8/ccip/capability/CCIPConfig.sol similarity index 93% rename from contracts/src/v0.8/ccip/capability/CCIPCapabilityConfiguration.sol rename to contracts/src/v0.8/ccip/capability/CCIPConfig.sol index 515f9343c6..5ae82fe900 100644 --- a/contracts/src/v0.8/ccip/capability/CCIPCapabilityConfiguration.sol +++ b/contracts/src/v0.8/ccip/capability/CCIPConfig.sol @@ -3,18 +3,19 @@ pragma solidity 0.8.24; import {ICapabilityConfiguration} from "../../keystone/interfaces/ICapabilityConfiguration.sol"; import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; -import {ICapabilityRegistry} from "./interfaces/ICapabilityRegistry.sol"; +import {ICapabilitiesRegistry} from "./interfaces/ICapabilitiesRegistry.sol"; import {OwnerIsCreator} from "../../shared/access/OwnerIsCreator.sol"; +import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/interfaces/IERC165.sol"; import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; -/// @notice CCIPCapabilityConfiguration stores the configuration for the CCIP capability. -/// We have two classes of configuration: chain configuration and DON (in the CapabilityRegistry sense) configuration. +/// @notice CCIPConfig stores the configuration for the CCIP capability. +/// We have two classes of configuration: chain configuration and DON (in the CapabilitiesRegistry sense) configuration. /// Each chain will have a single configuration which includes information like the router address. /// Each CR DON will have up to four configurations: for each of (commit, exec), one blue and one green configuration. /// This is done in order to achieve "blue-green" deployments. -contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguration, OwnerIsCreator { +contract CCIPConfig is ITypeAndVersion, ICapabilityConfiguration, OwnerIsCreator, IERC165 { using EnumerableSet for EnumerableSet.UintSet; /// @notice Emitted when a chain's configuration is set. @@ -28,7 +29,7 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio error ChainConfigNotSetForChain(uint64 chainSelector); error NodeNotInRegistry(bytes32 p2pId); - error OnlyCapabilityRegistryCanCall(); + error OnlyCapabilitiesRegistryCanCall(); error ChainSelectorNotFound(uint64 chainSelector); error ChainSelectorNotSet(); error TooManyOCR3Configs(); @@ -72,7 +73,7 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio /// @notice Chain configuration. /// Changes to chain configuration are detected out-of-band in plugins and decoded offchain. struct ChainConfig { - bytes32[] readers; // The P2P IDs of the readers for the chain. These IDs must be registered in the capability registry. + bytes32[] readers; // The P2P IDs of the readers for the chain. These IDs must be registered in the capabilities registry. uint8 fChain; // The fault tolerance parameter of the chain. bytes config; // The chain configuration. This is kept intentionally opaque so as to add fields in the future if needed. } @@ -108,10 +109,10 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio } /// @notice Type and version override. - string public constant override typeAndVersion = "CCIPCapabilityConfiguration 1.6.0-dev"; + string public constant override typeAndVersion = "CCIPConfig 1.6.0-dev"; - /// @notice The canonical capability registry address. - address internal immutable i_capabilityRegistry; + /// @notice The canonical capabilities registry address. + address internal immutable i_capabilitiesRegistry; /// @notice chain configuration for each chain that CCIP is deployed on. mapping(uint64 chainSelector => ChainConfig chainConfig) internal s_chainConfigurations; @@ -131,9 +132,14 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio uint8 internal constant MAX_OCR3_CONFIGS_PER_DON = 4; uint8 internal constant MAX_NUM_ORACLES = 31; - /// @param capabilityRegistry the canonical capability registry address. - constructor(address capabilityRegistry) { - i_capabilityRegistry = capabilityRegistry; + /// @param capabilitiesRegistry the canonical capabilities registry address. + constructor(address capabilitiesRegistry) { + i_capabilitiesRegistry = capabilitiesRegistry; + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) external pure override returns (bool) { + return interfaceId == type(ICapabilityConfiguration).interfaceId || interfaceId == type(IERC165).interfaceId; } // ================================================================ @@ -180,8 +186,8 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio uint64, /* configCount */ uint32 donId ) external override { - if (msg.sender != i_capabilityRegistry) { - revert OnlyCapabilityRegistryCanCall(); + if (msg.sender != i_capabilitiesRegistry) { + revert OnlyCapabilitiesRegistryCanCall(); } OCR3Config[] memory ocr3Configs = abi.decode(config, (OCR3Config[])); @@ -398,7 +404,7 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio } if (cfg.bootstrapP2PIds.length > cfg.p2pIds.length) revert TooManyBootstrapP2PIds(); - // Check that the readers are in the capability registry. + // Check that the readers are in the capabilities registry. // TODO: check for duplicate signers, duplicate p2p ids, etc. // TODO: check that p2p ids in cfg.bootstrapP2PIds are included in cfg.p2pIds. for (uint256 i = 0; i < cfg.signers.length; ++i) { @@ -473,7 +479,7 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio bytes32[] memory readers = chainConfig.readers; uint64 chainSelector = chainConfigAdds[i].chainSelector; - // Verify that the provided readers are present in the capability registry. + // Verify that the provided readers are present in the capabilities registry. for (uint256 j = 0; j < readers.length; j++) { _ensureInRegistry(readers[j]); } @@ -490,10 +496,10 @@ contract CCIPCapabilityConfiguration is ITypeAndVersion, ICapabilityConfiguratio } } - /// @notice Helper function to ensure that a node is in the capability registry. + /// @notice Helper function to ensure that a node is in the capabilities registry. /// @param p2pId The P2P ID of the node to check. function _ensureInRegistry(bytes32 p2pId) internal view { - (ICapabilityRegistry.NodeInfo memory node,) = ICapabilityRegistry(i_capabilityRegistry).getNode(p2pId); + ICapabilitiesRegistry.NodeInfo memory node = ICapabilitiesRegistry(i_capabilitiesRegistry).getNode(p2pId); if (node.p2pId == bytes32("")) { revert NodeNotInRegistry(p2pId); } diff --git a/contracts/src/v0.8/ccip/capability/interfaces/ICapabilityRegistry.sol b/contracts/src/v0.8/ccip/capability/interfaces/ICapabilitiesRegistry.sol similarity index 53% rename from contracts/src/v0.8/ccip/capability/interfaces/ICapabilityRegistry.sol rename to contracts/src/v0.8/ccip/capability/interfaces/ICapabilitiesRegistry.sol index 85a98843c6..5e3c2c4e8d 100644 --- a/contracts/src/v0.8/ccip/capability/interfaces/ICapabilityRegistry.sol +++ b/contracts/src/v0.8/ccip/capability/interfaces/ICapabilitiesRegistry.sol @@ -1,23 +1,31 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -interface ICapabilityRegistry { +interface ICapabilitiesRegistry { struct NodeInfo { /// @notice The id of the node operator that manages this node uint32 nodeOperatorId; + /// @notice The number of times the node's configuration has been updated + uint32 configCount; + /// @notice The ID of the Workflow DON that the node belongs to. A node can + /// only belong to one DON that accepts Workflows. + uint32 workflowDONId; /// @notice The signer address for application-layer message verification. bytes32 signer; /// @notice This is an Ed25519 public key that is used to identify a node. - /// This key is guaranteed to be unique in the CapabilityRegistry. It is + /// This key is guaranteed to be unique in the CapabilitiesRegistry. It is /// used to identify a node in the the P2P network. bytes32 p2pId; /// @notice The list of hashed capability IDs supported by the node bytes32[] hashedCapabilityIds; + /// @notice The list of capabilities DON Ids supported by the node. A node + /// can belong to multiple capabilities DONs. This list does not include a + /// Workflow DON id if the node belongs to one. + uint256[] capabilitiesDONIds; } /// @notice Gets a node's data /// @param p2pId The P2P ID of the node to query for /// @return NodeInfo The node data - /// @return configCount The number of times the node has been configured - function getNode(bytes32 p2pId) external view returns (NodeInfo memory, uint32 configCount); + function getNode(bytes32 p2pId) external view returns (NodeInfo memory); } diff --git a/contracts/src/v0.8/ccip/test/capability/CCIPCapabilityConfiguration.t.sol b/contracts/src/v0.8/ccip/test/capability/CCIPConfig.t.sol similarity index 60% rename from contracts/src/v0.8/ccip/test/capability/CCIPCapabilityConfiguration.t.sol rename to contracts/src/v0.8/ccip/test/capability/CCIPConfig.t.sol index 25e6d79c88..f3e97c30f7 100644 --- a/contracts/src/v0.8/ccip/test/capability/CCIPCapabilityConfiguration.t.sol +++ b/contracts/src/v0.8/ccip/test/capability/CCIPConfig.t.sol @@ -3,19 +3,19 @@ pragma solidity ^0.8.24; import {Test} from "forge-std/Test.sol"; -import {CCIPCapabilityConfiguration} from "../../capability/CCIPCapabilityConfiguration.sol"; -import {ICapabilityRegistry} from "../../capability/interfaces/ICapabilityRegistry.sol"; -import {CCIPCapabilityConfigurationHelper} from "../helpers/CCIPCapabilityConfigurationHelper.sol"; +import {CCIPConfig} from "../../capability/CCIPConfig.sol"; +import {ICapabilitiesRegistry} from "../../capability/interfaces/ICapabilitiesRegistry.sol"; +import {CCIPConfigHelper} from "../helpers/CCIPConfigHelper.sol"; -contract CCIPCapabilityConfigurationSetup is Test { +contract CCIPConfigSetup is Test { address public constant OWNER = 0x82ae2B4F57CA5C1CBF8f744ADbD3697aD1a35AFe; - address public constant CAPABILITY_REGISTRY = 0x272aF4BF7FBFc4944Ed59F914Cd864DfD912D55e; + address public constant CAPABILITIES_REGISTRY = 0x272aF4BF7FBFc4944Ed59F914Cd864DfD912D55e; - CCIPCapabilityConfigurationHelper public s_ccipCC; + CCIPConfigHelper public s_ccipCC; function setUp() public { changePrank(OWNER); - s_ccipCC = new CCIPCapabilityConfigurationHelper(CAPABILITY_REGISTRY); + s_ccipCC = new CCIPConfigHelper(CAPABILITIES_REGISTRY); } function _makeBytes32Array(uint256 length, uint256 seed) internal pure returns (bytes32[] memory arr) { @@ -51,28 +51,30 @@ contract CCIPCapabilityConfigurationSetup is Test { transmitters = _makeBytesArray(numNodes, 20); for (uint256 i = 0; i < numNodes; i++) { vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, p2pIds[i]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, p2pIds[i]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 1, signer: bytes32(signers[i]), p2pId: p2pIds[i], - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); } // Add chain selector for chain 1. - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](1); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfig.ChainConfigInfo[] memory adds = new CCIPConfig.ChainConfigInfo[](1); + adds[0] = CCIPConfig.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: p2pIds, fChain: 1, config: bytes("config1")}) + chainConfig: CCIPConfig.ChainConfig({readers: p2pIds, fChain: 1, config: bytes("config1")}) }); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(1, adds[0].chainConfig); + emit CCIPConfig.ChainConfigSet(1, adds[0].chainConfig); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); return (p2pIds, signers, transmitters); @@ -84,43 +86,45 @@ contract CCIPCapabilityConfigurationSetup is Test { } } -contract CCIPCapabilityConfiguration_chainConfig is CCIPCapabilityConfigurationSetup { +contract CCIPConfig_chainConfig is CCIPConfigSetup { // Successes. function test_applyChainConfigUpdates_addChainConfigs_Success() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](2); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfig.ChainConfigInfo[] memory adds = new CCIPConfig.ChainConfigInfo[](2); + adds[0] = CCIPConfig.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) + chainConfig: CCIPConfig.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) }); - adds[1] = CCIPCapabilityConfiguration.ChainConfigInfo({ + adds[1] = CCIPConfig.ChainConfigInfo({ chainSelector: 2, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config2")}) + chainConfig: CCIPConfig.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config2")}) }); vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, chainReaders[0]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, chainReaders[0]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 1, signer: bytes32(uint256(1)), p2pId: chainReaders[0], - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(1, adds[0].chainConfig); + emit CCIPConfig.ChainConfigSet(1, adds[0].chainConfig); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(2, adds[1].chainConfig); + emit CCIPConfig.ChainConfigSet(2, adds[1].chainConfig); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory configs = s_ccipCC.getAllChainConfigs(); + CCIPConfig.ChainConfigInfo[] memory configs = s_ccipCC.getAllChainConfigs(); assertEq(configs.length, 2, "chain configs length must be 2"); assertEq(configs[0].chainSelector, 1, "chain selector must match"); assertEq(configs[1].chainSelector, 2, "chain selector must match"); @@ -129,42 +133,44 @@ contract CCIPCapabilityConfiguration_chainConfig is CCIPCapabilityConfigurationS function test_applyChainConfigUpdates_removeChainConfigs_Success() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](2); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfig.ChainConfigInfo[] memory adds = new CCIPConfig.ChainConfigInfo[](2); + adds[0] = CCIPConfig.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) + chainConfig: CCIPConfig.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) }); - adds[1] = CCIPCapabilityConfiguration.ChainConfigInfo({ + adds[1] = CCIPConfig.ChainConfigInfo({ chainSelector: 2, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config2")}) + chainConfig: CCIPConfig.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config2")}) }); vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, chainReaders[0]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, chainReaders[0]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 1, signer: bytes32(uint256(1)), p2pId: chainReaders[0], - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(1, adds[0].chainConfig); + emit CCIPConfig.ChainConfigSet(1, adds[0].chainConfig); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigSet(2, adds[1].chainConfig); + emit CCIPConfig.ChainConfigSet(2, adds[1].chainConfig); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); uint64[] memory removes = new uint64[](1); removes[0] = uint64(1); vm.expectEmit(); - emit CCIPCapabilityConfiguration.ChainConfigRemoved(1); - s_ccipCC.applyChainConfigUpdates(removes, new CCIPCapabilityConfiguration.ChainConfigInfo[](0)); + emit CCIPConfig.ChainConfigRemoved(1); + s_ccipCC.applyChainConfigUpdates(removes, new CCIPConfig.ChainConfigInfo[](0)); } // Reverts. @@ -173,78 +179,82 @@ contract CCIPCapabilityConfiguration_chainConfig is CCIPCapabilityConfigurationS uint64[] memory removes = new uint64[](1); removes[0] = uint64(1); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.ChainSelectorNotFound.selector, 1)); - s_ccipCC.applyChainConfigUpdates(removes, new CCIPCapabilityConfiguration.ChainConfigInfo[](0)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.ChainSelectorNotFound.selector, 1)); + s_ccipCC.applyChainConfigUpdates(removes, new CCIPConfig.ChainConfigInfo[](0)); } function test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](1); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfig.ChainConfigInfo[] memory adds = new CCIPConfig.ChainConfigInfo[](1); + adds[0] = CCIPConfig.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: abi.encode(1, 2, 3)}) + chainConfig: CCIPConfig.ChainConfig({readers: chainReaders, fChain: 1, config: abi.encode(1, 2, 3)}) }); vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, chainReaders[0]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, chainReaders[0]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 0, signer: bytes32(0), p2pId: bytes32(uint256(0)), - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.NodeNotInRegistry.selector, chainReaders[0])); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.NodeNotInRegistry.selector, chainReaders[0])); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); } function test__applyChainConfigUpdates_FChainNotPositive_Reverts() public { bytes32[] memory chainReaders = new bytes32[](1); chainReaders[0] = keccak256(abi.encode(1)); - CCIPCapabilityConfiguration.ChainConfigInfo[] memory adds = new CCIPCapabilityConfiguration.ChainConfigInfo[](2); - adds[0] = CCIPCapabilityConfiguration.ChainConfigInfo({ + CCIPConfig.ChainConfigInfo[] memory adds = new CCIPConfig.ChainConfigInfo[](2); + adds[0] = CCIPConfig.ChainConfigInfo({ chainSelector: 1, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) + chainConfig: CCIPConfig.ChainConfig({readers: chainReaders, fChain: 1, config: bytes("config1")}) }); - adds[1] = CCIPCapabilityConfiguration.ChainConfigInfo({ + adds[1] = CCIPConfig.ChainConfigInfo({ chainSelector: 2, - chainConfig: CCIPCapabilityConfiguration.ChainConfig({readers: chainReaders, fChain: 0, config: bytes("config2")}) // bad fChain + chainConfig: CCIPConfig.ChainConfig({readers: chainReaders, fChain: 0, config: bytes("config2")}) // bad fChain }); vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, chainReaders[0]), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, chainReaders[0]), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 1, signer: bytes32(uint256(1)), p2pId: chainReaders[0], - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); - vm.expectRevert(CCIPCapabilityConfiguration.FChainMustBePositive.selector); + vm.expectRevert(CCIPConfig.FChainMustBePositive.selector); s_ccipCC.applyChainConfigUpdates(new uint64[](0), adds); } } -contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurationSetup { +contract CCIPConfig_validateConfig is CCIPConfigSetup { // Successes. function test__validateConfig_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -264,8 +274,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 0, // invalid bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -277,7 +287,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.ChainSelectorNotSet.selector); + vm.expectRevert(CCIPConfig.ChainSelectorNotSet.selector); s_ccipCC.validateConfig(config); } @@ -285,8 +295,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: bytes(""), // invalid chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -298,7 +308,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.OfframpAddressCannotBeZero.selector); + vm.expectRevert(CCIPConfig.OfframpAddressCannotBeZero.selector); s_ccipCC.validateConfig(config); } @@ -306,8 +316,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 2, // not set bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -319,7 +329,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.ChainSelectorNotFound.selector, 2)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.ChainSelectorNotFound.selector, 2)); s_ccipCC.validateConfig(config); } @@ -327,8 +337,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati // 32 > 31 (max num oracles) (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(32); - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -340,7 +350,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.TooManySigners.selector); + vm.expectRevert(CCIPConfig.TooManySigners.selector); s_ccipCC.validateConfig(config); } @@ -353,8 +363,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati mstore(signers, 30) } - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -366,7 +376,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.TooManyTransmitters.selector); + vm.expectRevert(CCIPConfig.TooManyTransmitters.selector); s_ccipCC.validateConfig(config); } @@ -380,8 +390,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati mstore(transmitters, 3) } - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -393,7 +403,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.NotEnoughTransmitters.selector, 3, 4)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.NotEnoughTransmitters.selector, 3, 4)); s_ccipCC.validateConfig(config); } @@ -401,8 +411,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -414,15 +424,15 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.FMustBePositive.selector); + vm.expectRevert(CCIPConfig.FMustBePositive.selector); s_ccipCC.validateConfig(config); } function test__validateConfig_FTooHigh_Reverts() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -434,7 +444,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.FTooHigh.selector); + vm.expectRevert(CCIPConfig.FTooHigh.selector); s_ccipCC.validateConfig(config); } @@ -446,8 +456,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati } // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -460,9 +470,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati }); vm.expectRevert( - abi.encodeWithSelector( - CCIPCapabilityConfiguration.P2PIdsLengthNotMatching.selector, uint256(3), uint256(4), uint256(4) - ) + abi.encodeWithSelector(CCIPConfig.P2PIdsLengthNotMatching.selector, uint256(3), uint256(4), uint256(4)) ); s_ccipCC.validateConfig(config); } @@ -471,8 +479,8 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _makeBytes32Array(5, 0), // too many bootstrap p2pIds, 5 > 4 @@ -484,7 +492,7 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(CCIPCapabilityConfiguration.TooManyBootstrapP2PIds.selector); + vm.expectRevert(CCIPConfig.TooManyBootstrapP2PIds.selector); s_ccipCC.validateConfig(config); } @@ -494,22 +502,24 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati p2pIds[0] = nonExistentP2PId; vm.mockCall( - CAPABILITY_REGISTRY, - abi.encodeWithSelector(ICapabilityRegistry.getNode.selector, nonExistentP2PId), + CAPABILITIES_REGISTRY, + abi.encodeWithSelector(ICapabilitiesRegistry.getNode.selector, nonExistentP2PId), abi.encode( - ICapabilityRegistry.NodeInfo({ + ICapabilitiesRegistry.NodeInfo({ nodeOperatorId: 0, signer: bytes32(0), p2pId: bytes32(uint256(0)), - hashedCapabilityIds: new bytes32[](0) - }), - uint32(1) + hashedCapabilityIds: new bytes32[](0), + configCount: uint32(1), + workflowDONId: uint32(1), + capabilitiesDONIds: new uint256[](0) + }) ) ); // Config is for 4 nodes, so f == 1. - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -521,40 +531,34 @@ contract CCIPCapabilityConfiguration_validateConfig is CCIPCapabilityConfigurati offchainConfig: bytes("offchainConfig") }); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.NodeNotInRegistry.selector, nonExistentP2PId)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.NodeNotInRegistry.selector, nonExistentP2PId)); s_ccipCC.validateConfig(config); } } -contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigurationSetup { +contract CCIPConfig_ConfigStateMachine is CCIPConfigSetup { // Successful cases. function test__stateFromConfigLength_Success() public { uint256 configLen = 0; - CCIPCapabilityConfiguration.ConfigState state = s_ccipCC.stateFromConfigLength(configLen); - assertEq(uint256(state), uint256(CCIPCapabilityConfiguration.ConfigState.Init)); + CCIPConfig.ConfigState state = s_ccipCC.stateFromConfigLength(configLen); + assertEq(uint256(state), uint256(CCIPConfig.ConfigState.Init)); configLen = 1; state = s_ccipCC.stateFromConfigLength(configLen); - assertEq(uint256(state), uint256(CCIPCapabilityConfiguration.ConfigState.Running)); + assertEq(uint256(state), uint256(CCIPConfig.ConfigState.Running)); configLen = 2; state = s_ccipCC.stateFromConfigLength(configLen); - assertEq(uint256(state), uint256(CCIPCapabilityConfiguration.ConfigState.Staging)); + assertEq(uint256(state), uint256(CCIPConfig.ConfigState.Staging)); } function test__validateConfigStateTransition_Success() public { - s_ccipCC.validateConfigStateTransition( - CCIPCapabilityConfiguration.ConfigState.Init, CCIPCapabilityConfiguration.ConfigState.Running - ); + s_ccipCC.validateConfigStateTransition(CCIPConfig.ConfigState.Init, CCIPConfig.ConfigState.Running); - s_ccipCC.validateConfigStateTransition( - CCIPCapabilityConfiguration.ConfigState.Running, CCIPCapabilityConfiguration.ConfigState.Staging - ); + s_ccipCC.validateConfigStateTransition(CCIPConfig.ConfigState.Running, CCIPConfig.ConfigState.Staging); - s_ccipCC.validateConfigStateTransition( - CCIPCapabilityConfiguration.ConfigState.Staging, CCIPCapabilityConfiguration.ConfigState.Running - ); + s_ccipCC.validateConfigStateTransition(CCIPConfig.ConfigState.Staging, CCIPConfig.ConfigState.Running); } function test__computeConfigDigest_Success() public { @@ -565,8 +569,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32[] memory p2pIds = _makeBytes32Array(4, 0); bytes[] memory signers = _makeBytesArray(2, 10); bytes[] memory transmitters = _makeBytesArray(2, 20); - CCIPCapabilityConfiguration.OCR3Config memory config = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory config = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -590,7 +594,7 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32 configDigest3 = s_ccipCC.computeConfigDigest(donId, configCount, config); configCount = 1; - config.pluginType = CCIPCapabilityConfiguration.PluginType.Execution; + config.pluginType = CCIPConfig.PluginType.Execution; bytes32 configDigest4 = s_ccipCC.computeConfigDigest(donId, configCount, config); assertNotEq(configDigest1, configDigest2, "config digests 1 and 2 must not match"); @@ -608,11 +612,10 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32[] memory p2pIds = _makeBytes32Array(4, 0); bytes[] memory signers = _makeBytesArray(4, 10); bytes[] memory transmitters = _makeBytesArray(4, 20); - CCIPCapabilityConfiguration.OCR3Config[] memory cfgs = - new CCIPCapabilityConfiguration.OCR3Config[](numCommitCfgs + numExecCfgs); + CCIPConfig.OCR3Config[] memory cfgs = new CCIPConfig.OCR3Config[](numCommitCfgs + numExecCfgs); for (uint256 i = 0; i < numCommitCfgs; i++) { - cfgs[i] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + cfgs[i] = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -625,8 +628,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu }); } for (uint256 i = 0; i < numExecCfgs; i++) { - cfgs[numCommitCfgs + i] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Execution, + cfgs[numCommitCfgs + i] = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Execution, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -638,27 +641,17 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: abi.encode("exec", numCommitCfgs + i) }); } - ( - CCIPCapabilityConfiguration.OCR3Config[] memory commitCfgs, - CCIPCapabilityConfiguration.OCR3Config[] memory execCfgs - ) = s_ccipCC.groupByPluginType(cfgs); + (CCIPConfig.OCR3Config[] memory commitCfgs, CCIPConfig.OCR3Config[] memory execCfgs) = + s_ccipCC.groupByPluginType(cfgs); assertEq(commitCfgs.length, numCommitCfgs, "commitCfgs length must match"); assertEq(execCfgs.length, numExecCfgs, "execCfgs length must match"); for (uint256 i = 0; i < commitCfgs.length; i++) { - assertEq( - uint8(commitCfgs[i].pluginType), - uint8(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must be commit" - ); + assertEq(uint8(commitCfgs[i].pluginType), uint8(CCIPConfig.PluginType.Commit), "plugin type must be commit"); assertEq(commitCfgs[i].offchainConfig, abi.encode("commit", i), "offchain config must match"); } for (uint256 i = 0; i < execCfgs.length; i++) { - assertEq( - uint8(execCfgs[i].pluginType), - uint8(CCIPCapabilityConfiguration.PluginType.Execution), - "plugin type must be execution" - ); + assertEq(uint8(execCfgs[i].pluginType), uint8(CCIPConfig.PluginType.Execution), "plugin type must be execution"); assertEq(execCfgs[i].offchainConfig, abi.encode("exec", numCommitCfgs + i), "offchain config must match"); } } @@ -666,11 +659,10 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__computeNewConfigWithMeta_InitToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](0); - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](0); + CCIPConfig.OCR3Config[] memory newConfig = new CCIPConfig.OCR3Config[](1); + newConfig[0] = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -681,9 +673,9 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.ConfigState currentState = CCIPCapabilityConfiguration.ConfigState.Init; - CCIPCapabilityConfiguration.ConfigState newState = CCIPCapabilityConfiguration.ConfigState.Running; - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfigWithMeta = + CCIPConfig.ConfigState currentState = CCIPConfig.ConfigState.Init; + CCIPConfig.ConfigState newState = CCIPConfig.ConfigState.Running; + CCIPConfig.OCR3ConfigWithMeta[] memory newConfigWithMeta = s_ccipCC.computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, newState); assertEq(newConfigWithMeta.length, 1, "new config with meta length must be 1"); assertEq(newConfigWithMeta[0].configCount, uint64(1), "config count must be 1"); @@ -702,8 +694,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__computeNewConfigWithMeta_RunningToStaging_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -714,8 +706,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -727,24 +719,23 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + currentConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfig.OCR3Config[] memory newConfig = new CCIPConfig.OCR3Config[](2); // existing blue config first. newConfig[0] = blueConfig; // green config next. newConfig[1] = greenConfig; - CCIPCapabilityConfiguration.ConfigState currentState = CCIPCapabilityConfiguration.ConfigState.Running; - CCIPCapabilityConfiguration.ConfigState newState = CCIPCapabilityConfiguration.ConfigState.Staging; + CCIPConfig.ConfigState currentState = CCIPConfig.ConfigState.Running; + CCIPConfig.ConfigState newState = CCIPConfig.ConfigState.Staging; - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfigWithMeta = + CCIPConfig.OCR3ConfigWithMeta[] memory newConfigWithMeta = s_ccipCC.computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, newState); assertEq(newConfigWithMeta.length, 2, "new config with meta length must be 2"); @@ -781,8 +772,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__computeNewConfigWithMeta_StagingToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -793,8 +784,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -806,25 +797,24 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](2); + currentConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - currentConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + currentConfig[1] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) }); - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfig.OCR3Config[] memory newConfig = new CCIPConfig.OCR3Config[](1); newConfig[0] = greenConfig; - CCIPCapabilityConfiguration.ConfigState currentState = CCIPCapabilityConfiguration.ConfigState.Staging; - CCIPCapabilityConfiguration.ConfigState newState = CCIPCapabilityConfiguration.ConfigState.Running; + CCIPConfig.ConfigState currentState = CCIPConfig.ConfigState.Staging; + CCIPConfig.ConfigState newState = CCIPConfig.ConfigState.Running; - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfigWithMeta = + CCIPConfig.OCR3ConfigWithMeta[] memory newConfigWithMeta = s_ccipCC.computeNewConfigWithMeta(donId, currentConfig, newConfig, currentState, newState); assertEq(newConfigWithMeta.length, 1, "new config with meta length must be 1"); @@ -842,8 +832,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__validateConfigTransition_InitToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -855,15 +845,13 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + newConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](0); + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](0); s_ccipCC.validateConfigTransition(currentConfig, newConfig); } @@ -871,8 +859,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__validateConfigTransition_RunningToStaging_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -883,8 +871,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -896,22 +884,20 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfig.OCR3ConfigWithMeta[](2); + newConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - newConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + newConfig[1] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + currentConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) @@ -923,8 +909,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__validateConfigTransition_StagingToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -935,8 +921,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -948,22 +934,20 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](2); + currentConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - currentConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + currentConfig[1] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + newConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) @@ -976,7 +960,7 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test_Fuzz__stateFromConfigLength_Reverts(uint256 configLen) public { vm.assume(configLen > 2); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.InvalidConfigLength.selector, configLen)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.InvalidConfigLength.selector, configLen)); s_ccipCC.stateFromConfigLength(configLen); } @@ -984,10 +968,10 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32[] memory p2pIds = _makeBytes32Array(4, 0); bytes[] memory signers = _makeBytesArray(4, 10); bytes[] memory transmitters = _makeBytesArray(4, 20); - CCIPCapabilityConfiguration.OCR3Config[] memory cfgs = new CCIPCapabilityConfiguration.OCR3Config[](3); + CCIPConfig.OCR3Config[] memory cfgs = new CCIPConfig.OCR3Config[](3); for (uint256 i = 0; i < 3; i++) { - cfgs[i] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + cfgs[i] = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1007,10 +991,10 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu bytes32[] memory p2pIds = _makeBytes32Array(4, 0); bytes[] memory signers = _makeBytesArray(4, 10); bytes[] memory transmitters = _makeBytesArray(4, 20); - CCIPCapabilityConfiguration.OCR3Config[] memory cfgs = new CCIPCapabilityConfiguration.OCR3Config[](3); + CCIPConfig.OCR3Config[] memory cfgs = new CCIPConfig.OCR3Config[](3); for (uint256 i = 0; i < 3; i++) { - cfgs[i] = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Execution, + cfgs[i] = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Execution, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1027,15 +1011,15 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu } function test__groupByPluginType_TooManyOCR3Configs_Reverts() public { - CCIPCapabilityConfiguration.OCR3Config[] memory cfgs = new CCIPCapabilityConfiguration.OCR3Config[](5); - vm.expectRevert(CCIPCapabilityConfiguration.TooManyOCR3Configs.selector); + CCIPConfig.OCR3Config[] memory cfgs = new CCIPConfig.OCR3Config[](5); + vm.expectRevert(CCIPConfig.TooManyOCR3Configs.selector); s_ccipCC.groupByPluginType(cfgs); } function test__validateConfigTransition_InitToRunning_WrongConfigCount_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1047,24 +1031,22 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + newConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 0, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](0); + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](0); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.WrongConfigCount.selector, 0, 1)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.WrongConfigCount.selector, 0, 1)); s_ccipCC.validateConfigTransition(currentConfig, newConfig); } function test__validateConfigTransition_RunningToStaging_WrongConfigDigestBlueGreen_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1075,8 +1057,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1088,22 +1070,20 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + currentConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfig.OCR3ConfigWithMeta[](2); + newConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 3, blueConfig) // wrong config digest (due to diff config count) }); - newConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + newConfig[1] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) @@ -1111,7 +1091,7 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu vm.expectRevert( abi.encodeWithSelector( - CCIPCapabilityConfiguration.WrongConfigDigestBlueGreen.selector, + CCIPConfig.WrongConfigDigestBlueGreen.selector, s_ccipCC.computeConfigDigest(donId, 3, blueConfig), s_ccipCC.computeConfigDigest(donId, 1, blueConfig) ) @@ -1121,8 +1101,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu function test__validateConfigTransition_RunningToStaging_WrongConfigCount_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1133,8 +1113,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1146,35 +1126,33 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + currentConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfig.OCR3ConfigWithMeta[](2); + newConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - newConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + newConfig[1] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 3, // wrong config count config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 3, greenConfig) }); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.WrongConfigCount.selector, 3, 2)); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.WrongConfigCount.selector, 3, 2)); s_ccipCC.validateConfigTransition(currentConfig, newConfig); } function test__validateConfigTransition_StagingToRunning_WrongConfigDigest_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1185,8 +1163,8 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(_makeBytes32Array(4, 0), 0, 1), @@ -1198,22 +1176,20 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](2); - currentConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](2); + currentConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 1, config: blueConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 1, blueConfig) }); - currentConfig[1] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + currentConfig[1] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 2, greenConfig) }); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - newConfig[0] = CCIPCapabilityConfiguration.OCR3ConfigWithMeta({ + CCIPConfig.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + newConfig[0] = CCIPConfig.OCR3ConfigWithMeta({ configCount: 2, config: greenConfig, configDigest: s_ccipCC.computeConfigDigest(donId, 3, greenConfig) // wrong config digest @@ -1221,7 +1197,7 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu vm.expectRevert( abi.encodeWithSelector( - CCIPCapabilityConfiguration.WrongConfigDigest.selector, + CCIPConfig.WrongConfigDigest.selector, s_ccipCC.computeConfigDigest(donId, 3, greenConfig), s_ccipCC.computeConfigDigest(donId, 2, greenConfig) ) @@ -1230,23 +1206,21 @@ contract CCIPCapabilityConfiguration_ConfigStateMachine is CCIPCapabilityConfigu } function test__validateConfigTransition_NonExistentConfigTransition_Reverts() public { - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory currentConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](3); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory newConfig = - new CCIPCapabilityConfiguration.OCR3ConfigWithMeta[](1); - vm.expectRevert(CCIPCapabilityConfiguration.NonExistentConfigTransition.selector); + CCIPConfig.OCR3ConfigWithMeta[] memory currentConfig = new CCIPConfig.OCR3ConfigWithMeta[](3); + CCIPConfig.OCR3ConfigWithMeta[] memory newConfig = new CCIPConfig.OCR3ConfigWithMeta[](1); + vm.expectRevert(CCIPConfig.NonExistentConfigTransition.selector); s_ccipCC.validateConfigTransition(currentConfig, newConfig); } } -contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfigurationSetup { +contract CCIPConfig__updatePluginConfig is CCIPConfigSetup { // Successes. function test__updatePluginConfig_InitToRunning_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1257,14 +1231,13 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfig.OCR3Config[] memory configs = new CCIPConfig.OCR3Config[](1); configs[0] = blueConfig; - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, configs); + s_ccipCC.updatePluginConfig(donId, CCIPConfig.PluginType.Commit, configs); // should see the updated config in the contract state. - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfig = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfig.OCR3ConfigWithMeta[] memory storedConfig = s_ccipCC.getOCRConfig(donId, CCIPConfig.PluginType.Commit); assertEq(storedConfig.length, 1, "don config length must be 1"); assertEq(storedConfig[0].configCount, uint64(1), "config count must be 1"); assertEq(uint256(storedConfig[0].config.pluginType), uint256(blueConfig.pluginType), "plugin type must match"); @@ -1274,9 +1247,9 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // add blue config. uint32 donId = 1; - CCIPCapabilityConfiguration.PluginType pluginType = CCIPCapabilityConfiguration.PluginType.Commit; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.PluginType pluginType = CCIPConfig.PluginType.Commit; + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1287,13 +1260,13 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config[] memory startConfigs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfig.OCR3Config[] memory startConfigs = new CCIPConfig.OCR3Config[](1); startConfigs[0] = blueConfig; // add blue AND green config to indicate an update. - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, startConfigs); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + s_ccipCC.updatePluginConfig(donId, CCIPConfig.PluginType.Commit, startConfigs); + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1304,27 +1277,22 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3Config[] memory blueAndGreen = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfig.OCR3Config[] memory blueAndGreen = new CCIPConfig.OCR3Config[](2); blueAndGreen[0] = blueConfig; blueAndGreen[1] = greenConfig; - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, blueAndGreen); + s_ccipCC.updatePluginConfig(donId, CCIPConfig.PluginType.Commit, blueAndGreen); // should see the updated config in the contract state. - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfig = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfig.OCR3ConfigWithMeta[] memory storedConfig = s_ccipCC.getOCRConfig(donId, CCIPConfig.PluginType.Commit); assertEq(storedConfig.length, 2, "don config length must be 2"); // 0 index is blue config, 1 index is green config. assertEq(storedConfig[1].configCount, uint64(2), "config count must be 2"); assertEq( - uint256(storedConfig[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[0].config.pluginType), uint256(CCIPConfig.PluginType.Commit), "plugin type must match" ); assertEq( - uint256(storedConfig[1].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[1].config.pluginType), uint256(CCIPConfig.PluginType.Commit), "plugin type must match" ); assertEq(storedConfig[0].config.offchainConfig, bytes("commit"), "blue offchain config must match"); assertEq(storedConfig[1].config.offchainConfig, bytes("commit-new"), "green offchain config must match"); @@ -1334,9 +1302,9 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); // add blue config. uint32 donId = 1; - CCIPCapabilityConfiguration.PluginType pluginType = CCIPCapabilityConfiguration.PluginType.Commit; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.PluginType pluginType = CCIPConfig.PluginType.Commit; + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1347,13 +1315,13 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config[] memory startConfigs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfig.OCR3Config[] memory startConfigs = new CCIPConfig.OCR3Config[](1); startConfigs[0] = blueConfig; // add blue AND green config to indicate an update. - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, startConfigs); - CCIPCapabilityConfiguration.OCR3Config memory greenConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + s_ccipCC.updatePluginConfig(donId, CCIPConfig.PluginType.Commit, startConfigs); + CCIPConfig.OCR3Config memory greenConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1364,45 +1332,38 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig offchainConfigVersion: 30, offchainConfig: bytes("commit-new") }); - CCIPCapabilityConfiguration.OCR3Config[] memory blueAndGreen = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfig.OCR3Config[] memory blueAndGreen = new CCIPConfig.OCR3Config[](2); blueAndGreen[0] = blueConfig; blueAndGreen[1] = greenConfig; - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, blueAndGreen); + s_ccipCC.updatePluginConfig(donId, CCIPConfig.PluginType.Commit, blueAndGreen); // should see the updated config in the contract state. - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfig = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfig.OCR3ConfigWithMeta[] memory storedConfig = s_ccipCC.getOCRConfig(donId, CCIPConfig.PluginType.Commit); assertEq(storedConfig.length, 2, "don config length must be 2"); // 0 index is blue config, 1 index is green config. assertEq(storedConfig[1].configCount, uint64(2), "config count must be 2"); assertEq( - uint256(storedConfig[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[0].config.pluginType), uint256(CCIPConfig.PluginType.Commit), "plugin type must match" ); assertEq( - uint256(storedConfig[1].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[1].config.pluginType), uint256(CCIPConfig.PluginType.Commit), "plugin type must match" ); assertEq(storedConfig[0].config.offchainConfig, bytes("commit"), "blue offchain config must match"); assertEq(storedConfig[1].config.offchainConfig, bytes("commit-new"), "green offchain config must match"); // promote green to blue. - CCIPCapabilityConfiguration.OCR3Config[] memory promote = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfig.OCR3Config[] memory promote = new CCIPConfig.OCR3Config[](1); promote[0] = greenConfig; - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, promote); + s_ccipCC.updatePluginConfig(donId, CCIPConfig.PluginType.Commit, promote); // should see the updated config in the contract state. - storedConfig = s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + storedConfig = s_ccipCC.getOCRConfig(donId, CCIPConfig.PluginType.Commit); assertEq(storedConfig.length, 1, "don config length must be 1"); assertEq(storedConfig[0].configCount, uint64(2), "config count must be 2"); assertEq( - uint256(storedConfig[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must match" + uint256(storedConfig[0].config.pluginType), uint256(CCIPConfig.PluginType.Commit), "plugin type must match" ); assertEq(storedConfig[0].config.offchainConfig, bytes("commit-new"), "green offchain config must match"); } @@ -1410,37 +1371,37 @@ contract CCIPCapabilityConfiguration__updatePluginConfig is CCIPCapabilityConfig // Reverts. function test__updatePluginConfig_InvalidConfigLength_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](3); - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.InvalidConfigLength.selector, uint256(3))); - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, newConfig); + CCIPConfig.OCR3Config[] memory newConfig = new CCIPConfig.OCR3Config[](3); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.InvalidConfigLength.selector, uint256(3))); + s_ccipCC.updatePluginConfig(donId, CCIPConfig.PluginType.Commit, newConfig); } function test__updatePluginConfig_InvalidConfigStateTransition_Reverts() public { uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config[] memory newConfig = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfig.OCR3Config[] memory newConfig = new CCIPConfig.OCR3Config[](2); // 0 -> 2 is an invalid state transition. - vm.expectRevert(abi.encodeWithSelector(CCIPCapabilityConfiguration.InvalidConfigStateTransition.selector, 0, 2)); - s_ccipCC.updatePluginConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit, newConfig); + vm.expectRevert(abi.encodeWithSelector(CCIPConfig.InvalidConfigStateTransition.selector, 0, 2)); + s_ccipCC.updatePluginConfig(donId, CCIPConfig.PluginType.Commit, newConfig); } } -contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapabilityConfigurationSetup { +contract CCIPConfig_beforeCapabilityConfigSet is CCIPConfigSetup { // Successes. function test_beforeCapabilityConfigSet_ZeroLengthConfig_Success() public { - changePrank(CAPABILITY_REGISTRY); + changePrank(CAPABILITIES_REGISTRY); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](0); + CCIPConfig.OCR3Config[] memory configs = new CCIPConfig.OCR3Config[](0); bytes memory encodedConfigs = abi.encode(configs); s_ccipCC.beforeCapabilityConfigSet(new bytes32[](0), encodedConfigs, 1, 1); } function test_beforeCapabilityConfigSet_CommitConfigOnly_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); - changePrank(CAPABILITY_REGISTRY); + changePrank(CAPABILITIES_REGISTRY); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1451,30 +1412,27 @@ contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapability offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfig.OCR3Config[] memory configs = new CCIPConfig.OCR3Config[](1); configs[0] = blueConfig; bytes memory encoded = abi.encode(configs); s_ccipCC.beforeCapabilityConfigSet(new bytes32[](0), encoded, 1, donId); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfigs = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfig.OCR3ConfigWithMeta[] memory storedConfigs = s_ccipCC.getOCRConfig(donId, CCIPConfig.PluginType.Commit); assertEq(storedConfigs.length, 1, "config length must be 1"); assertEq(storedConfigs[0].configCount, uint64(1), "config count must be 1"); assertEq( - uint256(storedConfigs[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), - "plugin type must be commit" + uint256(storedConfigs[0].config.pluginType), uint256(CCIPConfig.PluginType.Commit), "plugin type must be commit" ); } function test_beforeCapabilityConfigSet_ExecConfigOnly_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); - changePrank(CAPABILITY_REGISTRY); + changePrank(CAPABILITIES_REGISTRY); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Execution, + CCIPConfig.OCR3Config memory blueConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Execution, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1485,30 +1443,29 @@ contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapability offchainConfigVersion: 30, offchainConfig: bytes("exec") }); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](1); + CCIPConfig.OCR3Config[] memory configs = new CCIPConfig.OCR3Config[](1); configs[0] = blueConfig; bytes memory encoded = abi.encode(configs); s_ccipCC.beforeCapabilityConfigSet(new bytes32[](0), encoded, 1, donId); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedConfigs = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Execution); + CCIPConfig.OCR3ConfigWithMeta[] memory storedConfigs = s_ccipCC.getOCRConfig(donId, CCIPConfig.PluginType.Execution); assertEq(storedConfigs.length, 1, "config length must be 1"); assertEq(storedConfigs[0].configCount, uint64(1), "config count must be 1"); assertEq( uint256(storedConfigs[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Execution), + uint256(CCIPConfig.PluginType.Execution), "plugin type must be execution" ); } function test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() public { (bytes32[] memory p2pIds, bytes[] memory signers, bytes[] memory transmitters) = _addChainConfig(4); - changePrank(CAPABILITY_REGISTRY); + changePrank(CAPABILITIES_REGISTRY); uint32 donId = 1; - CCIPCapabilityConfiguration.OCR3Config memory blueCommitConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Commit, + CCIPConfig.OCR3Config memory blueCommitConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Commit, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1519,8 +1476,8 @@ contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapability offchainConfigVersion: 30, offchainConfig: bytes("commit") }); - CCIPCapabilityConfiguration.OCR3Config memory blueExecConfig = CCIPCapabilityConfiguration.OCR3Config({ - pluginType: CCIPCapabilityConfiguration.PluginType.Execution, + CCIPConfig.OCR3Config memory blueExecConfig = CCIPConfig.OCR3Config({ + pluginType: CCIPConfig.PluginType.Execution, offrampAddress: abi.encodePacked(keccak256(abi.encode("offramp"))), chainSelector: 1, bootstrapP2PIds: _subset(p2pIds, 0, 1), @@ -1531,42 +1488,42 @@ contract CCIPCapabilityConfiguration_beforeCapabilityConfigSet is CCIPCapability offchainConfigVersion: 30, offchainConfig: bytes("exec") }); - CCIPCapabilityConfiguration.OCR3Config[] memory configs = new CCIPCapabilityConfiguration.OCR3Config[](2); + CCIPConfig.OCR3Config[] memory configs = new CCIPConfig.OCR3Config[](2); configs[0] = blueExecConfig; configs[1] = blueCommitConfig; bytes memory encoded = abi.encode(configs); s_ccipCC.beforeCapabilityConfigSet(new bytes32[](0), encoded, 1, donId); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedExecConfigs = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Execution); + CCIPConfig.OCR3ConfigWithMeta[] memory storedExecConfigs = + s_ccipCC.getOCRConfig(donId, CCIPConfig.PluginType.Execution); assertEq(storedExecConfigs.length, 1, "config length must be 1"); assertEq(storedExecConfigs[0].configCount, uint64(1), "config count must be 1"); assertEq( uint256(storedExecConfigs[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Execution), + uint256(CCIPConfig.PluginType.Execution), "plugin type must be execution" ); - CCIPCapabilityConfiguration.OCR3ConfigWithMeta[] memory storedCommitConfigs = - s_ccipCC.getOCRConfig(donId, CCIPCapabilityConfiguration.PluginType.Commit); + CCIPConfig.OCR3ConfigWithMeta[] memory storedCommitConfigs = + s_ccipCC.getOCRConfig(donId, CCIPConfig.PluginType.Commit); assertEq(storedCommitConfigs.length, 1, "config length must be 1"); assertEq(storedCommitConfigs[0].configCount, uint64(1), "config count must be 1"); assertEq( uint256(storedCommitConfigs[0].config.pluginType), - uint256(CCIPCapabilityConfiguration.PluginType.Commit), + uint256(CCIPConfig.PluginType.Commit), "plugin type must be commit" ); } // Reverts. - function test_beforeCapabilityConfigSet_OnlyCapabilityRegistryCanCall_Reverts() public { + function test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_Reverts() public { bytes32[] memory nodes = new bytes32[](0); bytes memory config = bytes(""); uint64 configCount = 1; uint32 donId = 1; - vm.expectRevert(CCIPCapabilityConfiguration.OnlyCapabilityRegistryCanCall.selector); + vm.expectRevert(CCIPConfig.OnlyCapabilitiesRegistryCanCall.selector); s_ccipCC.beforeCapabilityConfigSet(nodes, config, configCount, donId); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/CCIPCapabilityConfigurationHelper.sol b/contracts/src/v0.8/ccip/test/helpers/CCIPConfigHelper.sol similarity index 86% rename from contracts/src/v0.8/ccip/test/helpers/CCIPCapabilityConfigurationHelper.sol rename to contracts/src/v0.8/ccip/test/helpers/CCIPConfigHelper.sol index 7acc65f9bd..f321ea5d40 100644 --- a/contracts/src/v0.8/ccip/test/helpers/CCIPCapabilityConfigurationHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/CCIPConfigHelper.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.24; -import {CCIPCapabilityConfiguration} from "../../capability/CCIPCapabilityConfiguration.sol"; +import {CCIPConfig} from "../../capability/CCIPConfig.sol"; -contract CCIPCapabilityConfigurationHelper is CCIPCapabilityConfiguration { - constructor(address capabilityRegistry) CCIPCapabilityConfiguration(capabilityRegistry) {} +contract CCIPConfigHelper is CCIPConfig { + constructor(address capabilitiesRegistry) CCIPConfig(capabilitiesRegistry) {} function stateFromConfigLength(uint256 configLength) public pure returns (ConfigState) { return _stateFromConfigLength(configLength); diff --git a/core/gethwrappers/ccip/generated/ccip_capability_configuration/ccip_capability_configuration.go b/core/gethwrappers/ccip/generated/ccip_capability_configuration/ccip_capability_configuration.go deleted file mode 100644 index 58fb7d5bd2..0000000000 --- a/core/gethwrappers/ccip/generated/ccip_capability_configuration/ccip_capability_configuration.go +++ /dev/null @@ -1,1079 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ccip_capability_configuration - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -type CCIPCapabilityConfigurationChainConfig struct { - Readers [][32]byte - FChain uint8 - Config []byte -} - -type CCIPCapabilityConfigurationChainConfigInfo struct { - ChainSelector uint64 - ChainConfig CCIPCapabilityConfigurationChainConfig -} - -type CCIPCapabilityConfigurationOCR3Config struct { - PluginType uint8 - ChainSelector uint64 - F uint8 - OffchainConfigVersion uint64 - OfframpAddress []byte - BootstrapP2PIds [][32]byte - P2pIds [][32]byte - Signers [][]byte - Transmitters [][]byte - OffchainConfig []byte -} - -type CCIPCapabilityConfigurationOCR3ConfigWithMeta struct { - Config CCIPCapabilityConfigurationOCR3Config - ConfigCount uint64 - ConfigDigest [32]byte -} - -var CCIPCapabilityConfigurationMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"capabilityRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainConfigNotSetForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainSelectorNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChainSelectorNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FChainMustBePositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FMustBePositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"InvalidConfigLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumCCIPCapabilityConfiguration.ConfigState\",\"name\":\"currentState\",\"type\":\"uint8\"},{\"internalType\":\"enumCCIPCapabilityConfiguration.ConfigState\",\"name\":\"proposedState\",\"type\":\"uint8\"}],\"name\":\"InvalidConfigStateTransition\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPluginType\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeNotInRegistry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonExistentConfigTransition\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"got\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimum\",\"type\":\"uint256\"}],\"name\":\"NotEnoughTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OfframpAddressCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCapabilityRegistryCanCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"p2pIdsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signersLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transmittersLength\",\"type\":\"uint256\"}],\"name\":\"P2PIdsLengthNotMatching\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyBootstrapP2PIds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOCR3Configs\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManySigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyTransmitters\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"got\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"expected\",\"type\":\"uint64\"}],\"name\":\"WrongConfigCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"got\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"}],\"name\":\"WrongConfigDigest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"got\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"}],\"name\":\"WrongConfigDigestBlueGreen\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapabilityConfigurationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainConfigRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structCCIPCapabilityConfiguration.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"chainSelectorRemoves\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPCapabilityConfiguration.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"internalType\":\"structCCIPCapabilityConfiguration.ChainConfigInfo[]\",\"name\":\"chainConfigAdds\",\"type\":\"tuple[]\"}],\"name\":\"applyChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"beforeCapabilityConfigSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllChainConfigs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPCapabilityConfiguration.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"internalType\":\"structCCIPCapabilityConfiguration.ChainConfigInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"getCapabilityConfiguration\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"configuration\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"enumCCIPCapabilityConfiguration.PluginType\",\"name\":\"pluginType\",\"type\":\"uint8\"}],\"name\":\"getOCRConfig\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"enumCCIPCapabilityConfiguration.PluginType\",\"name\":\"pluginType\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offrampAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"bootstrapP2PIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"p2pIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"transmitters\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPCapabilityConfiguration.OCR3Config\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"internalType\":\"structCCIPCapabilityConfiguration.OCR3ConfigWithMeta[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b506040516200403e3803806200403e83398101604081905262000034916200017e565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d3565b5050506001600160a01b0316608052620001b0565b336001600160a01b038216036200012d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019157600080fd5b81516001600160a01b0381168114620001a957600080fd5b9392505050565b608051613e6b620001d360003960008181610d640152610ff90152613e6b6000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80638da5cb5b11610076578063f2fde38b1161005b578063f2fde38b1461014e578063f442c89a14610161578063fba64a7c1461017457600080fd5b80638da5cb5b14610111578063ddc042a81461013957600080fd5b8063181f5a77146100a85780634bd0473f146100c657806379ba5097146100e65780638318ed5d146100f0575b600080fd5b6100b0610187565b6040516100bd9190612cda565b60405180910390f35b6100d96100d4366004612d1e565b6101a3565b6040516100bd9190612e4a565b6100ee610674565b005b6100b06100fe366004613027565b5060408051602081019091526000815290565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bd565b610141610776565b6040516100bd9190613088565b6100ee61015c366004613118565b610968565b6100ee61016f36600461319a565b61097c565b6100ee61018236600461321e565b610d4c565b604051806060016040528060258152602001613e3a6025913981565b63ffffffff821660009081526005602052604081206060918360018111156101cd576101cd612d53565b60018111156101de576101de612d53565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561066757600084815260209020604080516101a08101909152600984029091018054829060608201908390829060ff16600181111561025157610251612d53565b600181111561026257610262612d53565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a01000000000000000000009091041660608201526001820180546080909201916102ba906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546102e6906132db565b80156103335780601f1061030857610100808354040283529160200191610333565b820191906000526020600020905b81548152906001019060200180831161031657829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561038b57602002820191906000526020600020905b815481526020019060010190808311610377575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156103e357602002820191906000526020600020905b8154815260200190600101908083116103cf575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156104bd578382906000526020600020018054610430906132db565b80601f016020809104026020016040519081016040528092919081815260200182805461045c906132db565b80156104a95780601f1061047e576101008083540402835291602001916104a9565b820191906000526020600020905b81548152906001019060200180831161048c57829003601f168201915b505050505081526020019060010190610411565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015610596578382906000526020600020018054610509906132db565b80601f0160208091040260200160405190810160405280929190818152602001828054610535906132db565b80156105825780601f1061055757610100808354040283529160200191610582565b820191906000526020600020905b81548152906001019060200180831161056557829003601f168201915b5050505050815260200190600101906104ea565b5050505081526020016006820180546105ae906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546105da906132db565b80156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b505050919092525050508152600782015467ffffffffffffffff16602080830191909152600890920154604090910152908252600192909201910161020c565b5050505090505b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146106fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b606060006107846003610e0d565b905060006107926003610e21565b67ffffffffffffffff8111156107aa576107aa61332e565b6040519080825280602002602001820160405280156107e357816020015b6107d0612a07565b8152602001906001900390816107c85790505b50905060005b82518110156109615760008382815181106108065761080661335d565b60209081029190910181015160408051808201825267ffffffffffffffff83168082526000908152600285528290208251815460808188028301810190955260608201818152959750929586019490939192849284919084018282801561088c57602002820191906000526020600020905b815481526020019060010190808311610878575b5050509183525050600182015460ff1660208201526002820180546040909201916108b6906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546108e2906132db565b801561092f5780601f106109045761010080835404028352916020019161092f565b820191906000526020600020905b81548152906001019060200180831161091257829003601f168201915b50505050508152505081525083838151811061094d5761094d61335d565b6020908102919091010152506001016107e9565b5092915050565b610970610e2b565b61097981610eae565b50565b610984610e2b565b60005b83811015610b6a576109cb8585838181106109a4576109a461335d565b90506020020160208101906109b9919061338c565b60039067ffffffffffffffff16610fa3565b610a35578484828181106109e1576109e161335d565b90506020020160208101906109f6919061338c565b6040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016106f1565b60026000868684818110610a4b57610a4b61335d565b9050602002016020810190610a60919061338c565b67ffffffffffffffff1681526020810191909152604001600090812090610a878282612a4f565b6001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055610abf600283016000612a6d565b5050610afd858583818110610ad657610ad661335d565b9050602002016020810190610aeb919061338c565b60039067ffffffffffffffff16610fbb565b507f2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0858583818110610b3157610b3161335d565b9050602002016020810190610b46919061338c565b60405167ffffffffffffffff909116815260200160405180910390a1600101610987565b5060005b81811015610d45576000838383818110610b8a57610b8a61335d565b9050602002810190610b9c91906133a7565b610baa9060208101906133e5565b610bb3906135e7565b80519091506000858585818110610bcc57610bcc61335d565b9050602002810190610bde91906133a7565b610bec90602081019061338c565b905060005b8251811015610c2457610c1c838281518110610c0f57610c0f61335d565b6020026020010151610fc7565b600101610bf1565b50826020015160ff16600003610c66576040517fa9b3766e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600260209081526040909120845180518693610c96928492910190612aa7565b5060208201516001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921691909117905560408201516002820190610ce390826136ce565b50610cfd91506003905067ffffffffffffffff83166110e1565b507f05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e08184604051610d2f9291906137e8565b60405180910390a1505050806001019050610b6e565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610dbb576040517f7b2485a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610dc984860186613893565b9050600080610dd7836110ed565b8151919350915015610def57610def84600084611346565b805115610e0257610e0284600183611346565b505050505050505050565b60606000610e1a83611b27565b9392505050565b600061066e825490565b60005473ffffffffffffffffffffffffffffffffffffffff163314610eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016106f1565b565b3373ffffffffffffffffffffffffffffffffffffffff821603610f2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016106f1565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008181526001830160205260408120541515610e1a565b6000610e1a8383611b83565b6040517f50c946fe000000000000000000000000000000000000000000000000000000008152600481018290526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906350c946fe90602401600060405180830381865afa158015611055573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261109b9190810190613aa5565b5060408101519091506110dd576040517f8907a4fa000000000000000000000000000000000000000000000000000000008152600481018390526024016106f1565b5050565b6000610e1a8383611c76565b606080600460ff168351111561112f576040517f8854586400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160028082526060820190925290816020015b6111b36040805161014081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526020019060019003908161114557505060408051600280825260608201909252919350602082015b61124b6040805161014081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b8152602001906001900390816111dd57905050905060008060005b85518110156113395760008682815181106112835761128361335d565b60200260200101516000015160018111156112a0576112a0612d53565b036112ed578581815181106112b7576112b761335d565b60200260200101518584815181106112d1576112d161335d565b6020026020010181905250826112e690613bd3565b9250611331565b8581815181106112ff576112ff61335d565b60200260200101518483815181106113195761131961335d565b60200260200101819052508161132e90613bd3565b91505b600101611266565b5090835281529092909150565b63ffffffff831660009081526005602052604081208184600181111561136e5761136e612d53565b600181111561137f5761137f612d53565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561180857600084815260209020604080516101a08101909152600984029091018054829060608201908390829060ff1660018111156113f2576113f2612d53565b600181111561140357611403612d53565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a010000000000000000000090910416606082015260018201805460809092019161145b906132db565b80601f0160208091040260200160405190810160405280929190818152602001828054611487906132db565b80156114d45780601f106114a9576101008083540402835291602001916114d4565b820191906000526020600020905b8154815290600101906020018083116114b757829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561152c57602002820191906000526020600020905b815481526020019060010190808311611518575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561158457602002820191906000526020600020905b815481526020019060010190808311611570575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b8282101561165e5783829060005260206000200180546115d1906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546115fd906132db565b801561164a5780601f1061161f5761010080835404028352916020019161164a565b820191906000526020600020905b81548152906001019060200180831161162d57829003601f168201915b5050505050815260200190600101906115b2565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b828210156117375783829060005260206000200180546116aa906132db565b80601f01602080910402602001604051908101604052809291908181526020018280546116d6906132db565b80156117235780601f106116f857610100808354040283529160200191611723565b820191906000526020600020905b81548152906001019060200180831161170657829003601f168201915b50505050508152602001906001019061168b565b50505050815260200160068201805461174f906132db565b80601f016020809104026020016040519081016040528092919081815260200182805461177b906132db565b80156117c85780601f1061179d576101008083540402835291602001916117c8565b820191906000526020600020905b8154815290600101906020018083116117ab57829003601f168201915b505050919092525050508152600782015467ffffffffffffffff1660208083019190915260089092015460409091015290825260019290920191016113ad565b505050509050600061181a8251611cc5565b905060006118288451611cc5565b90506118348282611d17565b60006118438785878686611dd3565b905061184f84826121bf565b63ffffffff871660009081526005602052604081209087600181111561187757611877612d53565b600181111561188857611888612d53565b815260200190815260200160002060006118a29190612af2565b60005b8151811015611b1d5763ffffffff88166000908152600560205260408120908860018111156118d6576118d6612d53565b60018111156118e7576118e7612d53565b81526020019081526020016000208282815181106119075761190761335d565b6020908102919091018101518254600181810185556000948552929093208151805160099095029091018054929490939192849283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690838181111561197157611971612d53565b021790555060208201518154604084015160608501517fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff90921661010067ffffffffffffffff948516027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff1617690100000000000000000060ff90921691909102177fffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffff166a0100000000000000000000929091169190910217815560808201516001820190611a4090826136ce565b5060a08201518051611a5c916002840191602090910190612aa7565b5060c08201518051611a78916003840191602090910190612aa7565b5060e08201518051611a94916004840191602090910190612b13565b506101008201518051611ab1916005840191602090910190612b13565b506101208201516006820190611ac790826136ce565b50505060208201516007820180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff9092169190911790556040909101516008909101556001016118a5565b5050505050505050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b7757602002820191906000526020600020905b815481526020019060010190808311611b63575b50505050509050919050565b60008181526001830160205260408120548015611c6c576000611ba7600183613c0b565b8554909150600090611bbb90600190613c0b565b9050818114611c20576000866000018281548110611bdb57611bdb61335d565b9060005260206000200154905080876000018481548110611bfe57611bfe61335d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c3157611c31613c1e565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061066e565b600091505061066e565b6000818152600183016020526040812054611cbd5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561066e565b50600061066e565b60006002821115611d05576040517f3e478526000000000000000000000000000000000000000000000000000000008152600481018390526024016106f1565b81600281111561066e5761066e612d53565b6000826002811115611d2b57611d2b612d53565b826002811115611d3d57611d3d612d53565b611d479190613c4d565b90508060011480611d935750807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff148015611d9357506002836002811115611d9157611d91612d53565b145b15611d9d57505050565b82826040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016106f1929190613c7d565b60606000845167ffffffffffffffff811115611df157611df161332e565b604051908082528060200260200182016040528015611e1a578160200160208202803683370190505b5090506000846002811115611e3157611e31612d53565b148015611e4f57506001836002811115611e4d57611e4d612d53565b145b15611e9057600181600081518110611e6957611e6961335d565b602002602001019067ffffffffffffffff16908167ffffffffffffffff1681525050611ff8565b6001846002811115611ea457611ea4612d53565b148015611ec257506002836002811115611ec057611ec0612d53565b145b15611f595785600081518110611eda57611eda61335d565b60200260200101516020015181600081518110611ef957611ef961335d565b602002602001019067ffffffffffffffff16908167ffffffffffffffff168152505085600081518110611f2e57611f2e61335d565b6020026020010151602001516001611f469190613c98565b81600181518110611e6957611e6961335d565b6002846002811115611f6d57611f6d612d53565b148015611f8b57506001836002811115611f8957611f89612d53565b145b15611fc25785600181518110611fa357611fa361335d565b60200260200101516020015181600081518110611e6957611e6961335d565b83836040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016106f1929190613c7d565b6000855167ffffffffffffffff8111156120145761201461332e565b6040519080825280602002602001820160405280156120ca57816020015b604080516101a081018252600060608083018281526080840183905260a0840183905260c0840183905260e084018290526101008401829052610120840182905261014084018290526101608401829052610180840191909152825260208083018290529282015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816120325790505b50905060005b82518110156121b3576120fb8782815181106120ee576120ee61335d565b602002602001015161253e565b60405180606001604052808883815181106121185761211861335d565b602002602001015181526020018483815181106121375761213761335d565b602002602001015167ffffffffffffffff16815260200161218b8b8685815181106121645761216461335d565b60200260200101518b868151811061217e5761217e61335d565b6020026020010151612932565b8152508282815181106121a0576121a061335d565b60209081029190910101526001016120d0565b50979650505050505050565b81518151811580156121d15750806001145b1561227357826000815181106121e9576121e961335d565b60200260200101516020015167ffffffffffffffff1660011461226d57826000815181106122195761221961335d565b60209081029190910181015101516040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152600160248201526044016106f1565b50505050565b8160011480156122835750806002145b15612439578360008151811061229b5761229b61335d565b602002602001015160400151836000815181106122ba576122ba61335d565b6020026020010151604001511461234657826000815181106122de576122de61335d565b602002602001015160400151846000815181106122fd576122fd61335d565b6020026020010151604001516040517fc7ccdd7f0000000000000000000000000000000000000000000000000000000081526004016106f1929190918252602082015260400190565b836000815181106123595761235961335d565b60200260200101516020015160016123719190613c98565b67ffffffffffffffff168360018151811061238e5761238e61335d565b60200260200101516020015167ffffffffffffffff161461226d57826001815181106123bc576123bc61335d565b602002602001015160200151846000815181106123db576123db61335d565b60200260200101516020015160016123f39190613c98565b6040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9283166004820152911660248201526044016106f1565b8160021480156124495750806001145b1561250c57836001815181106124615761246161335d565b602002602001015160400151836000815181106124805761248061335d565b6020026020010151604001511461226d57826000815181106124a4576124a461335d565b602002602001015160400151846001815181106124c3576124c361335d565b6020026020010151604001516040517f9e9756700000000000000000000000000000000000000000000000000000000081526004016106f1929190918252602082015260400190565b6040517f1f1b2bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015167ffffffffffffffff16600003612586576040517f698cf8e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008151600181111561259b5761259b612d53565b141580156125bc57506001815160018111156125b9576125b9612d53565b14155b156125f3576040517f3302dbd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806080015151600003612632576040517f358c192700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015161264d9060039067ffffffffffffffff16610fa3565b6126955760208101516040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016106f1565b60e081015151601f10156126d5576040517f1b925da600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61010081015151601f1015612716576040517f645960ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208082015167ffffffffffffffff166000908152600290915260408120600101546127469060ff166003613cb9565b612751906001613cd5565b60ff169050808261010001515110156127a857610100820151516040517f548dd21f0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016106f1565b816040015160ff166000036127e9576040517f39d1a4d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516127f9906003613cb9565b60ff168260e001515111612839576040517f4856694e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160e00151518260c001515114158061285d5750816101000151518260c001515114155b156128b85760c08201515160e083015151610100840151516040517fba900f6d0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016106f1565b8160c00151518260a001515111156128fc576040517f8473d80700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8260e001515181101561292d576129258360c001518281518110610c0f57610c0f61335d565b6001016128ff565b505050565b60008082602001518584600001518560800151878760a001518860c001518960e001518a61010001518b604001518c606001518d61012001516040516020016129869c9b9a99989796959493929190613d59565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e0a000000000000000000000000000000000000000000000000000000000000179150509392505050565b6040518060400160405280600067ffffffffffffffff168152602001612a4a604051806060016040528060608152602001600060ff168152602001606081525090565b905290565b50805460008255906000526020600020908101906109799190612b65565b508054612a79906132db565b6000825580601f10612a89575050565b601f0160209004906000526020600020908101906109799190612b65565b828054828255906000526020600020908101928215612ae2579160200282015b82811115612ae2578251825591602001919060010190612ac7565b50612aee929150612b65565b5090565b50805460008255600902906000526020600020908101906109799190612b7a565b828054828255906000526020600020908101928215612b59579160200282015b82811115612b595782518290612b4990826136ce565b5091602001919060010190612b33565b50612aee929150612c3b565b5b80821115612aee5760008155600101612b66565b80821115612aee5780547fffffffffffffffffffffffffffff00000000000000000000000000000000000016815560008181612bb96001830182612a6d565b612bc7600283016000612a4f565b612bd5600383016000612a4f565b612be3600483016000612c58565b612bf1600583016000612c58565b612bff600683016000612a6d565b5050506007810180547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016905560006008820155600901612b7a565b80821115612aee576000612c4f8282612a6d565b50600101612c3b565b50805460008255906000526020600020908101906109799190612c3b565b6000815180845260005b81811015612c9c57602081850181015186830182015201612c80565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610e1a6020830184612c76565b63ffffffff8116811461097957600080fd5b8035612d0a81612ced565b919050565b803560028110612d0a57600080fd5b60008060408385031215612d3157600080fd5b8235612d3c81612ced565b9150612d4a60208401612d0f565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110612d9257612d92612d53565b9052565b60008151808452602080850194506020840160005b83811015612dc757815187529582019590820190600101612dab565b509495945050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015612e3d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952612e2b838351612c76565b98840198925090830190600101612df1565b5090979650505050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613019577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815160608151818652612eb88287018251612d82565b898101516080612ed38189018367ffffffffffffffff169052565b8a830151915060a0612ee9818a018460ff169052565b938301519360c09250612f078984018667ffffffffffffffff169052565b818401519450610140915060e082818b0152612f276101a08b0187612c76565b95508185015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0610100818c890301818d0152612f668885612d96565b97508587015195506101209350818c890301848d0152612f868887612d96565b9750828701519550818c890301858d0152612fa18887612dd2565b975080870151955050808b8803016101608c0152612fbf8786612dd2565b9650828601519550808b8803016101808c01525050505050612fe18282612c76565b91505088820151612ffd8a87018267ffffffffffffffff169052565b5090870151938701939093529386019390860190600101612e73565b509098975050505050505050565b60006020828403121561303957600080fd5b8135610e1a81612ced565b60008151606084526130596060850182612d96565b905060ff60208401511660208501526040830151848203604086015261307f8282612c76565b95945050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613019578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805167ffffffffffffffff16845287015187840187905261310587850182613044565b95880195935050908601906001016130b1565b60006020828403121561312a57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610e1a57600080fd5b60008083601f84011261316057600080fd5b50813567ffffffffffffffff81111561317857600080fd5b6020830191508360208260051b850101111561319357600080fd5b9250929050565b600080600080604085870312156131b057600080fd5b843567ffffffffffffffff808211156131c857600080fd5b6131d48883890161314e565b909650945060208701359150808211156131ed57600080fd5b506131fa8782880161314e565b95989497509550505050565b803567ffffffffffffffff81168114612d0a57600080fd5b6000806000806000806080878903121561323757600080fd5b863567ffffffffffffffff8082111561324f57600080fd5b61325b8a838b0161314e565b9098509650602089013591508082111561327457600080fd5b818901915089601f83011261328857600080fd5b81358181111561329757600080fd5b8a60208285010111156132a957600080fd5b6020830196508095505050506132c160408801613206565b91506132cf60608801612cff565b90509295509295509295565b600181811c908216806132ef57607f821691505b602082108103613328577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561339e57600080fd5b610e1a82613206565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126133db57600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126133db57600080fd5b604051610140810167ffffffffffffffff8111828210171561343d5761343d61332e565b60405290565b6040516080810167ffffffffffffffff8111828210171561343d5761343d61332e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156134ad576134ad61332e565b604052919050565b600067ffffffffffffffff8211156134cf576134cf61332e565b5060051b60200190565b600082601f8301126134ea57600080fd5b813560206134ff6134fa836134b5565b613466565b8083825260208201915060208460051b87010193508684111561352157600080fd5b602086015b8481101561353d5780358352918301918301613526565b509695505050505050565b803560ff81168114612d0a57600080fd5b600082601f83011261356a57600080fd5b813567ffffffffffffffff8111156135845761358461332e565b6135b560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613466565b8181528460208386010111156135ca57600080fd5b816020850160208301376000918101602001919091529392505050565b6000606082360312156135f957600080fd5b6040516060810167ffffffffffffffff828210818311171561361d5761361d61332e565b81604052843591508082111561363257600080fd5b61363e368387016134d9565b835261364c60208601613548565b6020840152604085013591508082111561366557600080fd5b5061367236828601613559565b60408301525092915050565b601f82111561292d576000816000526020600020601f850160051c810160208610156136a75750805b601f850160051c820191505b818110156136c6578281556001016136b3565b505050505050565b815167ffffffffffffffff8111156136e8576136e861332e565b6136fc816136f684546132db565b8461367e565b602080601f83116001811461374f57600084156137195750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556136c6565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561379c5788860151825594840194600190910190840161377d565b50858210156137d857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff8316815260406020820152600061380b6040830184613044565b949350505050565b600082601f83011261382457600080fd5b813560206138346134fa836134b5565b82815260059290921b8401810191818101908684111561385357600080fd5b8286015b8481101561353d57803567ffffffffffffffff8111156138775760008081fd5b6138858986838b0101613559565b845250918301918301613857565b600060208083850312156138a657600080fd5b823567ffffffffffffffff808211156138be57600080fd5b818501915085601f8301126138d257600080fd5b81356138e06134fa826134b5565b81815260059190911b830184019084810190888311156138ff57600080fd5b8585015b83811015613a8d5780358581111561391a57600080fd5b8601610140818c037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001121561394f57600080fd5b613957613419565b613962898301612d0f565b815261397060408301613206565b8982015261398060608301613548565b604082015261399160808301613206565b606082015260a0820135878111156139a857600080fd5b6139b68d8b83860101613559565b60808301525060c0820135878111156139ce57600080fd5b6139dc8d8b838601016134d9565b60a08301525060e0820135878111156139f457600080fd5b613a028d8b838601016134d9565b60c0830152506101008083013588811115613a1c57600080fd5b613a2a8e8c83870101613813565b60e0840152506101208084013589811115613a4457600080fd5b613a528f8d83880101613813565b8385015250610140840135915088821115613a6c57600080fd5b613a7a8e8c84870101613559565b9083015250845250918601918601613903565b5098975050505050505050565b8051612d0a81612ced565b60008060408385031215613ab857600080fd5b825167ffffffffffffffff80821115613ad057600080fd5b9084019060808287031215613ae457600080fd5b613aec613443565b8251613af781612ced565b81526020838101518183015260408085015190830152606084015183811115613b1f57600080fd5b80850194505087601f850112613b3457600080fd5b83519250613b446134fa846134b5565b83815260059390931b84018101928181019089851115613b6357600080fd5b948201945b84861015613b8157855182529482019490820190613b68565b8060608501525050819550613b97818801613a9a565b9450505050509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613c0457613c04613ba4565b5060010190565b8181038181111561066e5761066e613ba4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b818103600083128015838313168383128216171561096157610961613ba4565b60038110612d9257612d92612d53565b60408101613c8b8285613c6d565b610e1a6020830184613c6d565b67ffffffffffffffff81811683821601908082111561096157610961613ba4565b60ff818116838216029081169081811461096157610961613ba4565b60ff818116838216019081111561066e5761066e613ba4565b60008282518085526020808601955060208260051b8401016020860160005b84811015612e3d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952613d47838351612c76565b98840198925090830190600101613d0d565b67ffffffffffffffff8d16815263ffffffff8c166020820152613d7f604082018c612d82565b61018060608201526000613d9761018083018c612c76565b67ffffffffffffffff8b16608084015282810360a0840152613db9818b612d96565b905082810360c0840152613dcd818a612d96565b905082810360e0840152613de18189613cee565b9050828103610100840152613df68188613cee565b60ff8716610120850152905067ffffffffffffffff8516610140840152828103610160840152613e268185612c76565b9f9e50505050505050505050505050505056fe434349504361706162696c697479436f6e66696775726174696f6e20312e362e302d646576a164736f6c6343000818000a", -} - -var CCIPCapabilityConfigurationABI = CCIPCapabilityConfigurationMetaData.ABI - -var CCIPCapabilityConfigurationBin = CCIPCapabilityConfigurationMetaData.Bin - -func DeployCCIPCapabilityConfiguration(auth *bind.TransactOpts, backend bind.ContractBackend, capabilityRegistry common.Address) (common.Address, *types.Transaction, *CCIPCapabilityConfiguration, error) { - parsed, err := CCIPCapabilityConfigurationMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CCIPCapabilityConfigurationBin), backend, capabilityRegistry) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &CCIPCapabilityConfiguration{address: address, abi: *parsed, CCIPCapabilityConfigurationCaller: CCIPCapabilityConfigurationCaller{contract: contract}, CCIPCapabilityConfigurationTransactor: CCIPCapabilityConfigurationTransactor{contract: contract}, CCIPCapabilityConfigurationFilterer: CCIPCapabilityConfigurationFilterer{contract: contract}}, nil -} - -type CCIPCapabilityConfiguration struct { - address common.Address - abi abi.ABI - CCIPCapabilityConfigurationCaller - CCIPCapabilityConfigurationTransactor - CCIPCapabilityConfigurationFilterer -} - -type CCIPCapabilityConfigurationCaller struct { - contract *bind.BoundContract -} - -type CCIPCapabilityConfigurationTransactor struct { - contract *bind.BoundContract -} - -type CCIPCapabilityConfigurationFilterer struct { - contract *bind.BoundContract -} - -type CCIPCapabilityConfigurationSession struct { - Contract *CCIPCapabilityConfiguration - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type CCIPCapabilityConfigurationCallerSession struct { - Contract *CCIPCapabilityConfigurationCaller - CallOpts bind.CallOpts -} - -type CCIPCapabilityConfigurationTransactorSession struct { - Contract *CCIPCapabilityConfigurationTransactor - TransactOpts bind.TransactOpts -} - -type CCIPCapabilityConfigurationRaw struct { - Contract *CCIPCapabilityConfiguration -} - -type CCIPCapabilityConfigurationCallerRaw struct { - Contract *CCIPCapabilityConfigurationCaller -} - -type CCIPCapabilityConfigurationTransactorRaw struct { - Contract *CCIPCapabilityConfigurationTransactor -} - -func NewCCIPCapabilityConfiguration(address common.Address, backend bind.ContractBackend) (*CCIPCapabilityConfiguration, error) { - abi, err := abi.JSON(strings.NewReader(CCIPCapabilityConfigurationABI)) - if err != nil { - return nil, err - } - contract, err := bindCCIPCapabilityConfiguration(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfiguration{address: address, abi: abi, CCIPCapabilityConfigurationCaller: CCIPCapabilityConfigurationCaller{contract: contract}, CCIPCapabilityConfigurationTransactor: CCIPCapabilityConfigurationTransactor{contract: contract}, CCIPCapabilityConfigurationFilterer: CCIPCapabilityConfigurationFilterer{contract: contract}}, nil -} - -func NewCCIPCapabilityConfigurationCaller(address common.Address, caller bind.ContractCaller) (*CCIPCapabilityConfigurationCaller, error) { - contract, err := bindCCIPCapabilityConfiguration(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationCaller{contract: contract}, nil -} - -func NewCCIPCapabilityConfigurationTransactor(address common.Address, transactor bind.ContractTransactor) (*CCIPCapabilityConfigurationTransactor, error) { - contract, err := bindCCIPCapabilityConfiguration(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationTransactor{contract: contract}, nil -} - -func NewCCIPCapabilityConfigurationFilterer(address common.Address, filterer bind.ContractFilterer) (*CCIPCapabilityConfigurationFilterer, error) { - contract, err := bindCCIPCapabilityConfiguration(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationFilterer{contract: contract}, nil -} - -func bindCCIPCapabilityConfiguration(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := CCIPCapabilityConfigurationMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CCIPCapabilityConfiguration.Contract.CCIPCapabilityConfigurationCaller.contract.Call(opts, result, method, params...) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.CCIPCapabilityConfigurationTransactor.contract.Transfer(opts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.CCIPCapabilityConfigurationTransactor.contract.Transact(opts, method, params...) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CCIPCapabilityConfiguration.Contract.contract.Call(opts, result, method, params...) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.contract.Transfer(opts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.contract.Transact(opts, method, params...) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) GetAllChainConfigs(opts *bind.CallOpts) ([]CCIPCapabilityConfigurationChainConfigInfo, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.contract.Call(opts, &out, "getAllChainConfigs") - - if err != nil { - return *new([]CCIPCapabilityConfigurationChainConfigInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]CCIPCapabilityConfigurationChainConfigInfo)).(*[]CCIPCapabilityConfigurationChainConfigInfo) - - return out0, err - -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) GetAllChainConfigs() ([]CCIPCapabilityConfigurationChainConfigInfo, error) { - return _CCIPCapabilityConfiguration.Contract.GetAllChainConfigs(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) GetAllChainConfigs() ([]CCIPCapabilityConfigurationChainConfigInfo, error) { - return _CCIPCapabilityConfiguration.Contract.GetAllChainConfigs(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.contract.Call(opts, &out, "getCapabilityConfiguration", arg0) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) GetCapabilityConfiguration(arg0 uint32) ([]byte, error) { - return _CCIPCapabilityConfiguration.Contract.GetCapabilityConfiguration(&_CCIPCapabilityConfiguration.CallOpts, arg0) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) GetCapabilityConfiguration(arg0 uint32) ([]byte, error) { - return _CCIPCapabilityConfiguration.Contract.GetCapabilityConfiguration(&_CCIPCapabilityConfiguration.CallOpts, arg0) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) GetOCRConfig(opts *bind.CallOpts, donId uint32, pluginType uint8) ([]CCIPCapabilityConfigurationOCR3ConfigWithMeta, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.contract.Call(opts, &out, "getOCRConfig", donId, pluginType) - - if err != nil { - return *new([]CCIPCapabilityConfigurationOCR3ConfigWithMeta), err - } - - out0 := *abi.ConvertType(out[0], new([]CCIPCapabilityConfigurationOCR3ConfigWithMeta)).(*[]CCIPCapabilityConfigurationOCR3ConfigWithMeta) - - return out0, err - -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) GetOCRConfig(donId uint32, pluginType uint8) ([]CCIPCapabilityConfigurationOCR3ConfigWithMeta, error) { - return _CCIPCapabilityConfiguration.Contract.GetOCRConfig(&_CCIPCapabilityConfiguration.CallOpts, donId, pluginType) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) GetOCRConfig(donId uint32, pluginType uint8) ([]CCIPCapabilityConfigurationOCR3ConfigWithMeta, error) { - return _CCIPCapabilityConfiguration.Contract.GetOCRConfig(&_CCIPCapabilityConfiguration.CallOpts, donId, pluginType) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) Owner() (common.Address, error) { - return _CCIPCapabilityConfiguration.Contract.Owner(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) Owner() (common.Address, error) { - return _CCIPCapabilityConfiguration.Contract.Owner(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _CCIPCapabilityConfiguration.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) TypeAndVersion() (string, error) { - return _CCIPCapabilityConfiguration.Contract.TypeAndVersion(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationCallerSession) TypeAndVersion() (string, error) { - return _CCIPCapabilityConfiguration.Contract.TypeAndVersion(&_CCIPCapabilityConfiguration.CallOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.contract.Transact(opts, "acceptOwnership") -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) AcceptOwnership() (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.AcceptOwnership(&_CCIPCapabilityConfiguration.TransactOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.AcceptOwnership(&_CCIPCapabilityConfiguration.TransactOpts) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactor) ApplyChainConfigUpdates(opts *bind.TransactOpts, chainSelectorRemoves []uint64, chainConfigAdds []CCIPCapabilityConfigurationChainConfigInfo) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.contract.Transact(opts, "applyChainConfigUpdates", chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) ApplyChainConfigUpdates(chainSelectorRemoves []uint64, chainConfigAdds []CCIPCapabilityConfigurationChainConfigInfo) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.ApplyChainConfigUpdates(&_CCIPCapabilityConfiguration.TransactOpts, chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorSession) ApplyChainConfigUpdates(chainSelectorRemoves []uint64, chainConfigAdds []CCIPCapabilityConfigurationChainConfigInfo) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.ApplyChainConfigUpdates(&_CCIPCapabilityConfiguration.TransactOpts, chainSelectorRemoves, chainConfigAdds) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactor) BeforeCapabilityConfigSet(opts *bind.TransactOpts, arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.contract.Transact(opts, "beforeCapabilityConfigSet", arg0, config, arg2, donId) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) BeforeCapabilityConfigSet(arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.BeforeCapabilityConfigSet(&_CCIPCapabilityConfiguration.TransactOpts, arg0, config, arg2, donId) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorSession) BeforeCapabilityConfigSet(arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.BeforeCapabilityConfigSet(&_CCIPCapabilityConfiguration.TransactOpts, arg0, config, arg2, donId) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.contract.Transact(opts, "transferOwnership", to) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.TransferOwnership(&_CCIPCapabilityConfiguration.TransactOpts, to) -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CCIPCapabilityConfiguration.Contract.TransferOwnership(&_CCIPCapabilityConfiguration.TransactOpts, to) -} - -type CCIPCapabilityConfigurationCapabilityConfigurationSetIterator struct { - Event *CCIPCapabilityConfigurationCapabilityConfigurationSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationCapabilityConfigurationSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationCapabilityConfigurationSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationCapabilityConfigurationSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPCapabilityConfigurationCapabilityConfigurationSetIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationCapabilityConfigurationSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationCapabilityConfigurationSet struct { - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterCapabilityConfigurationSet(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationCapabilityConfigurationSetIterator, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "CapabilityConfigurationSet") - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationCapabilityConfigurationSetIterator{contract: _CCIPCapabilityConfiguration.contract, event: "CapabilityConfigurationSet", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchCapabilityConfigurationSet(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationCapabilityConfigurationSet) (event.Subscription, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.WatchLogs(opts, "CapabilityConfigurationSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPCapabilityConfigurationCapabilityConfigurationSet) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "CapabilityConfigurationSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseCapabilityConfigurationSet(log types.Log) (*CCIPCapabilityConfigurationCapabilityConfigurationSet, error) { - event := new(CCIPCapabilityConfigurationCapabilityConfigurationSet) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "CapabilityConfigurationSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPCapabilityConfigurationChainConfigRemovedIterator struct { - Event *CCIPCapabilityConfigurationChainConfigRemoved - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationChainConfigRemovedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationChainConfigRemoved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationChainConfigRemoved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPCapabilityConfigurationChainConfigRemovedIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationChainConfigRemovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationChainConfigRemoved struct { - ChainSelector uint64 - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterChainConfigRemoved(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationChainConfigRemovedIterator, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "ChainConfigRemoved") - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationChainConfigRemovedIterator{contract: _CCIPCapabilityConfiguration.contract, event: "ChainConfigRemoved", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchChainConfigRemoved(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationChainConfigRemoved) (event.Subscription, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.WatchLogs(opts, "ChainConfigRemoved") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPCapabilityConfigurationChainConfigRemoved) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "ChainConfigRemoved", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseChainConfigRemoved(log types.Log) (*CCIPCapabilityConfigurationChainConfigRemoved, error) { - event := new(CCIPCapabilityConfigurationChainConfigRemoved) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "ChainConfigRemoved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPCapabilityConfigurationChainConfigSetIterator struct { - Event *CCIPCapabilityConfigurationChainConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationChainConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationChainConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationChainConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPCapabilityConfigurationChainConfigSetIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationChainConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationChainConfigSet struct { - ChainSelector uint64 - ChainConfig CCIPCapabilityConfigurationChainConfig - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterChainConfigSet(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationChainConfigSetIterator, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "ChainConfigSet") - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationChainConfigSetIterator{contract: _CCIPCapabilityConfiguration.contract, event: "ChainConfigSet", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchChainConfigSet(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationChainConfigSet) (event.Subscription, error) { - - logs, sub, err := _CCIPCapabilityConfiguration.contract.WatchLogs(opts, "ChainConfigSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPCapabilityConfigurationChainConfigSet) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "ChainConfigSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseChainConfigSet(log types.Log) (*CCIPCapabilityConfigurationChainConfigSet, error) { - event := new(CCIPCapabilityConfigurationChainConfigSet) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "ChainConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPCapabilityConfigurationOwnershipTransferRequestedIterator struct { - Event *CCIPCapabilityConfigurationOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPCapabilityConfigurationOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationOwnershipTransferRequestedIterator{contract: _CCIPCapabilityConfiguration.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _CCIPCapabilityConfiguration.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPCapabilityConfigurationOwnershipTransferRequested) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseOwnershipTransferRequested(log types.Log) (*CCIPCapabilityConfigurationOwnershipTransferRequested, error) { - event := new(CCIPCapabilityConfigurationOwnershipTransferRequested) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type CCIPCapabilityConfigurationOwnershipTransferredIterator struct { - Event *CCIPCapabilityConfigurationOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(CCIPCapabilityConfigurationOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *CCIPCapabilityConfigurationOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type CCIPCapabilityConfigurationOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPCapabilityConfigurationOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _CCIPCapabilityConfiguration.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &CCIPCapabilityConfigurationOwnershipTransferredIterator{contract: _CCIPCapabilityConfiguration.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _CCIPCapabilityConfiguration.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(CCIPCapabilityConfigurationOwnershipTransferred) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfigurationFilterer) ParseOwnershipTransferred(log types.Log) (*CCIPCapabilityConfigurationOwnershipTransferred, error) { - event := new(CCIPCapabilityConfigurationOwnershipTransferred) - if err := _CCIPCapabilityConfiguration.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfiguration) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _CCIPCapabilityConfiguration.abi.Events["CapabilityConfigurationSet"].ID: - return _CCIPCapabilityConfiguration.ParseCapabilityConfigurationSet(log) - case _CCIPCapabilityConfiguration.abi.Events["ChainConfigRemoved"].ID: - return _CCIPCapabilityConfiguration.ParseChainConfigRemoved(log) - case _CCIPCapabilityConfiguration.abi.Events["ChainConfigSet"].ID: - return _CCIPCapabilityConfiguration.ParseChainConfigSet(log) - case _CCIPCapabilityConfiguration.abi.Events["OwnershipTransferRequested"].ID: - return _CCIPCapabilityConfiguration.ParseOwnershipTransferRequested(log) - case _CCIPCapabilityConfiguration.abi.Events["OwnershipTransferred"].ID: - return _CCIPCapabilityConfiguration.ParseOwnershipTransferred(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (CCIPCapabilityConfigurationCapabilityConfigurationSet) Topic() common.Hash { - return common.HexToHash("0x84ad7751b744c9e2ee77da1d902b428aec7f0a343d67a24bbe2142e6f58a8d0f") -} - -func (CCIPCapabilityConfigurationChainConfigRemoved) Topic() common.Hash { - return common.HexToHash("0x2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0") -} - -func (CCIPCapabilityConfigurationChainConfigSet) Topic() common.Hash { - return common.HexToHash("0x05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e0") -} - -func (CCIPCapabilityConfigurationOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (CCIPCapabilityConfigurationOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (_CCIPCapabilityConfiguration *CCIPCapabilityConfiguration) Address() common.Address { - return _CCIPCapabilityConfiguration.address -} - -type CCIPCapabilityConfigurationInterface interface { - GetAllChainConfigs(opts *bind.CallOpts) ([]CCIPCapabilityConfigurationChainConfigInfo, error) - - GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, error) - - GetOCRConfig(opts *bind.CallOpts, donId uint32, pluginType uint8) ([]CCIPCapabilityConfigurationOCR3ConfigWithMeta, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - ApplyChainConfigUpdates(opts *bind.TransactOpts, chainSelectorRemoves []uint64, chainConfigAdds []CCIPCapabilityConfigurationChainConfigInfo) (*types.Transaction, error) - - BeforeCapabilityConfigSet(opts *bind.TransactOpts, arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - FilterCapabilityConfigurationSet(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationCapabilityConfigurationSetIterator, error) - - WatchCapabilityConfigurationSet(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationCapabilityConfigurationSet) (event.Subscription, error) - - ParseCapabilityConfigurationSet(log types.Log) (*CCIPCapabilityConfigurationCapabilityConfigurationSet, error) - - FilterChainConfigRemoved(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationChainConfigRemovedIterator, error) - - WatchChainConfigRemoved(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationChainConfigRemoved) (event.Subscription, error) - - ParseChainConfigRemoved(log types.Log) (*CCIPCapabilityConfigurationChainConfigRemoved, error) - - FilterChainConfigSet(opts *bind.FilterOpts) (*CCIPCapabilityConfigurationChainConfigSetIterator, error) - - WatchChainConfigSet(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationChainConfigSet) (event.Subscription, error) - - ParseChainConfigSet(log types.Log) (*CCIPCapabilityConfigurationChainConfigSet, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPCapabilityConfigurationOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*CCIPCapabilityConfigurationOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPCapabilityConfigurationOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPCapabilityConfigurationOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*CCIPCapabilityConfigurationOwnershipTransferred, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go b/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go new file mode 100644 index 0000000000..a50f757806 --- /dev/null +++ b/core/gethwrappers/ccip/generated/ccip_config/ccip_config.go @@ -0,0 +1,1103 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ccip_config + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type CCIPConfigChainConfig struct { + Readers [][32]byte + FChain uint8 + Config []byte +} + +type CCIPConfigChainConfigInfo struct { + ChainSelector uint64 + ChainConfig CCIPConfigChainConfig +} + +type CCIPConfigOCR3Config struct { + PluginType uint8 + ChainSelector uint64 + F uint8 + OffchainConfigVersion uint64 + OfframpAddress []byte + BootstrapP2PIds [][32]byte + P2pIds [][32]byte + Signers [][]byte + Transmitters [][]byte + OffchainConfig []byte +} + +type CCIPConfigOCR3ConfigWithMeta struct { + Config CCIPConfigOCR3Config + ConfigCount uint64 + ConfigDigest [32]byte +} + +var CCIPConfigMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"capabilitiesRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainConfigNotSetForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainSelectorNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChainSelectorNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FChainMustBePositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FMustBePositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"InvalidConfigLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumCCIPConfig.ConfigState\",\"name\":\"currentState\",\"type\":\"uint8\"},{\"internalType\":\"enumCCIPConfig.ConfigState\",\"name\":\"proposedState\",\"type\":\"uint8\"}],\"name\":\"InvalidConfigStateTransition\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPluginType\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeNotInRegistry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonExistentConfigTransition\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"got\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimum\",\"type\":\"uint256\"}],\"name\":\"NotEnoughTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OfframpAddressCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCapabilitiesRegistryCanCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"p2pIdsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signersLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transmittersLength\",\"type\":\"uint256\"}],\"name\":\"P2PIdsLengthNotMatching\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyBootstrapP2PIds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOCR3Configs\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManySigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyTransmitters\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"got\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"expected\",\"type\":\"uint64\"}],\"name\":\"WrongConfigCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"got\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"}],\"name\":\"WrongConfigDigest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"got\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"}],\"name\":\"WrongConfigDigestBlueGreen\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapabilityConfigurationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainConfigRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structCCIPConfig.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"chainSelectorRemoves\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPConfig.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"internalType\":\"structCCIPConfig.ChainConfigInfo[]\",\"name\":\"chainConfigAdds\",\"type\":\"tuple[]\"}],\"name\":\"applyChainConfigUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"beforeCapabilityConfigSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllChainConfigs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"readers\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"fChain\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPConfig.ChainConfig\",\"name\":\"chainConfig\",\"type\":\"tuple\"}],\"internalType\":\"structCCIPConfig.ChainConfigInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"getCapabilityConfiguration\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"configuration\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"enumCCIPConfig.PluginType\",\"name\":\"pluginType\",\"type\":\"uint8\"}],\"name\":\"getOCRConfig\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"enumCCIPConfig.PluginType\",\"name\":\"pluginType\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"F\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offrampAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"bootstrapP2PIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"p2pIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signers\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"transmitters\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structCCIPConfig.OCR3Config\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"internalType\":\"structCCIPConfig.OCR3ConfigWithMeta[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b506040516200417c3803806200417c83398101604081905262000034916200017e565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d3565b5050506001600160a01b0316608052620001b0565b336001600160a01b038216036200012d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019157600080fd5b81516001600160a01b0381168114620001a957600080fd5b9392505050565b608051613fa9620001d360003960008181610e4e01526110e30152613fa96000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638da5cb5b11610076578063f2fde38b1161005b578063f2fde38b146101bc578063f442c89a146101cf578063fba64a7c146101e257600080fd5b80638da5cb5b1461017f578063ddc042a8146101a757600080fd5b80634bd0473f116100a75780634bd0473f1461013457806379ba5097146101545780638318ed5d1461015e57600080fd5b806301ffc9a7146100c3578063181f5a77146100eb575b600080fd5b6100d66100d1366004612d5f565b6101f5565b60405190151581526020015b60405180910390f35b6101276040518060400160405280601481526020017f43434950436f6e66696720312e362e302d64657600000000000000000000000081525081565b6040516100e29190612e05565b610147610142366004612e49565b61028e565b6040516100e29190612f75565b61015c61075e565b005b61012761016c366004613152565b5060408051602081019091526000815290565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b6101af610860565b6040516100e291906131b3565b61015c6101ca366004613243565b610a52565b61015c6101dd3660046132c5565b610a66565b61015c6101f0366004613349565b610e36565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f78bea72100000000000000000000000000000000000000000000000000000000148061028857507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b63ffffffff821660009081526005602052604081206060918360018111156102b8576102b8612e7e565b60018111156102c9576102c9612e7e565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561075257600084815260209020604080516101a08101909152600984029091018054829060608201908390829060ff16600181111561033c5761033c612e7e565b600181111561034d5761034d612e7e565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a01000000000000000000009091041660608201526001820180546080909201916103a590613406565b80601f01602080910402602001604051908101604052809291908181526020018280546103d190613406565b801561041e5780601f106103f35761010080835404028352916020019161041e565b820191906000526020600020905b81548152906001019060200180831161040157829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561047657602002820191906000526020600020905b815481526020019060010190808311610462575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156104ce57602002820191906000526020600020905b8154815260200190600101908083116104ba575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156105a857838290600052602060002001805461051b90613406565b80601f016020809104026020016040519081016040528092919081815260200182805461054790613406565b80156105945780601f1061056957610100808354040283529160200191610594565b820191906000526020600020905b81548152906001019060200180831161057757829003601f168201915b5050505050815260200190600101906104fc565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b828210156106815783829060005260206000200180546105f490613406565b80601f016020809104026020016040519081016040528092919081815260200182805461062090613406565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b5050505050815260200190600101906105d5565b50505050815260200160068201805461069990613406565b80601f01602080910402602001604051908101604052809291908181526020018280546106c590613406565b80156107125780601f106106e757610100808354040283529160200191610712565b820191906000526020600020905b8154815290600101906020018083116106f557829003601f168201915b505050919092525050508152600782015467ffffffffffffffff1660208083019190915260089092015460409091015290825260019290920191016102f7565b50505050905092915050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6060600061086e6003610ef7565b9050600061087c6003610f0b565b67ffffffffffffffff81111561089457610894613459565b6040519080825280602002602001820160405280156108cd57816020015b6108ba612af0565b8152602001906001900390816108b25790505b50905060005b8251811015610a4b5760008382815181106108f0576108f0613488565b60209081029190910181015160408051808201825267ffffffffffffffff83168082526000908152600285528290208251815460808188028301810190955260608201818152959750929586019490939192849284919084018282801561097657602002820191906000526020600020905b815481526020019060010190808311610962575b5050509183525050600182015460ff1660208201526002820180546040909201916109a090613406565b80601f01602080910402602001604051908101604052809291908181526020018280546109cc90613406565b8015610a195780601f106109ee57610100808354040283529160200191610a19565b820191906000526020600020905b8154815290600101906020018083116109fc57829003601f168201915b505050505081525050815250838381518110610a3757610a37613488565b6020908102919091010152506001016108d3565b5092915050565b610a5a610f15565b610a6381610f98565b50565b610a6e610f15565b60005b83811015610c5457610ab5858583818110610a8e57610a8e613488565b9050602002016020810190610aa391906134b7565b60039067ffffffffffffffff1661108d565b610b1f57848482818110610acb57610acb613488565b9050602002016020810190610ae091906134b7565b6040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016107db565b60026000868684818110610b3557610b35613488565b9050602002016020810190610b4a91906134b7565b67ffffffffffffffff1681526020810191909152604001600090812090610b718282612b38565b6001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055610ba9600283016000612b56565b5050610be7858583818110610bc057610bc0613488565b9050602002016020810190610bd591906134b7565b60039067ffffffffffffffff166110a5565b507f2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0858583818110610c1b57610c1b613488565b9050602002016020810190610c3091906134b7565b60405167ffffffffffffffff909116815260200160405180910390a1600101610a71565b5060005b81811015610e2f576000838383818110610c7457610c74613488565b9050602002810190610c8691906134d2565b610c94906020810190613510565b610c9d90613712565b80519091506000858585818110610cb657610cb6613488565b9050602002810190610cc891906134d2565b610cd69060208101906134b7565b905060005b8251811015610d0e57610d06838281518110610cf957610cf9613488565b60200260200101516110b1565b600101610cdb565b50826020015160ff16600003610d50576040517fa9b3766e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600260209081526040909120845180518693610d80928492910190612b90565b5060208201516001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921691909117905560408201516002820190610dcd90826137f9565b50610de791506003905067ffffffffffffffff83166111ca565b507f05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e08184604051610e19929190613913565b60405180910390a1505050806001019050610c58565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610ea5576040517fac7a7efd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610eb3848601866139be565b9050600080610ec1836111d6565b8151919350915015610ed957610ed98460008461142f565b805115610eec57610eec8460018361142f565b505050505050505050565b60606000610f0483611c10565b9392505050565b6000610288825490565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016107db565b565b3373ffffffffffffffffffffffffffffffffffffffff821603611017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016107db565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008181526001830160205260408120541515610f04565b6000610f048383611c6c565b6040517f50c946fe000000000000000000000000000000000000000000000000000000008152600481018290526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906350c946fe90602401600060405180830381865afa15801561113f573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526111859190810190613c2f565b60808101519091506111c6576040517f8907a4fa000000000000000000000000000000000000000000000000000000008152600481018390526024016107db565b5050565b6000610f048383611d5f565b606080600460ff1683511115611218576040517f8854586400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160028082526060820190925290816020015b61129c6040805161014081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b81526020019060019003908161122e57505060408051600280825260608201909252919350602082015b6113346040805161014081019091528060008152602001600067ffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b8152602001906001900390816112c657905050905060008060005b855181101561142257600086828151811061136c5761136c613488565b602002602001015160000151600181111561138957611389612e7e565b036113d6578581815181106113a0576113a0613488565b60200260200101518584815181106113ba576113ba613488565b6020026020010181905250826113cf90613d36565b925061141a565b8581815181106113e8576113e8613488565b602002602001015184838151811061140257611402613488565b60200260200101819052508161141790613d36565b91505b60010161134f565b5090835281529092909150565b63ffffffff831660009081526005602052604081208184600181111561145757611457612e7e565b600181111561146857611468612e7e565b8152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156118f157600084815260209020604080516101a08101909152600984029091018054829060608201908390829060ff1660018111156114db576114db612e7e565b60018111156114ec576114ec612e7e565b8152815467ffffffffffffffff61010082048116602084015260ff690100000000000000000083041660408401526a010000000000000000000090910416606082015260018201805460809092019161154490613406565b80601f016020809104026020016040519081016040528092919081815260200182805461157090613406565b80156115bd5780601f10611592576101008083540402835291602001916115bd565b820191906000526020600020905b8154815290600101906020018083116115a057829003601f168201915b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561161557602002820191906000526020600020905b815481526020019060010190808311611601575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561166d57602002820191906000526020600020905b815481526020019060010190808311611659575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156117475783829060005260206000200180546116ba90613406565b80601f01602080910402602001604051908101604052809291908181526020018280546116e690613406565b80156117335780601f1061170857610100808354040283529160200191611733565b820191906000526020600020905b81548152906001019060200180831161171657829003601f168201915b50505050508152602001906001019061169b565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b8282101561182057838290600052602060002001805461179390613406565b80601f01602080910402602001604051908101604052809291908181526020018280546117bf90613406565b801561180c5780601f106117e15761010080835404028352916020019161180c565b820191906000526020600020905b8154815290600101906020018083116117ef57829003601f168201915b505050505081526020019060010190611774565b50505050815260200160068201805461183890613406565b80601f016020809104026020016040519081016040528092919081815260200182805461186490613406565b80156118b15780601f10611886576101008083540402835291602001916118b1565b820191906000526020600020905b81548152906001019060200180831161189457829003601f168201915b505050919092525050508152600782015467ffffffffffffffff166020808301919091526008909201546040909101529082526001929092019101611496565b50505050905060006119038251611dae565b905060006119118451611dae565b905061191d8282611e00565b600061192c8785878686611ebc565b905061193884826122a8565b63ffffffff871660009081526005602052604081209087600181111561196057611960612e7e565b600181111561197157611971612e7e565b8152602001908152602001600020600061198b9190612bdb565b60005b8151811015611c065763ffffffff88166000908152600560205260408120908860018111156119bf576119bf612e7e565b60018111156119d0576119d0612e7e565b81526020019081526020016000208282815181106119f0576119f0613488565b6020908102919091018101518254600181810185556000948552929093208151805160099095029091018054929490939192849283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016908381811115611a5a57611a5a612e7e565b021790555060208201518154604084015160608501517fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff90921661010067ffffffffffffffff948516027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff1617690100000000000000000060ff90921691909102177fffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffff166a0100000000000000000000929091169190910217815560808201516001820190611b2990826137f9565b5060a08201518051611b45916002840191602090910190612b90565b5060c08201518051611b61916003840191602090910190612b90565b5060e08201518051611b7d916004840191602090910190612bfc565b506101008201518051611b9a916005840191602090910190612bfc565b506101208201516006820190611bb090826137f9565b50505060208201516007820180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff90921691909117905560409091015160089091015560010161198e565b5050505050505050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611c6057602002820191906000526020600020905b815481526020019060010190808311611c4c575b50505050509050919050565b60008181526001830160205260408120548015611d55576000611c90600183613d6e565b8554909150600090611ca490600190613d6e565b9050818114611d09576000866000018281548110611cc457611cc4613488565b9060005260206000200154905080876000018481548110611ce757611ce7613488565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d1a57611d1a613d81565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610288565b6000915050610288565b6000818152600183016020526040812054611da657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610288565b506000610288565b60006002821115611dee576040517f3e478526000000000000000000000000000000000000000000000000000000008152600481018390526024016107db565b81600281111561028857610288612e7e565b6000826002811115611e1457611e14612e7e565b826002811115611e2657611e26612e7e565b611e309190613db0565b90508060011480611e7c5750807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff148015611e7c57506002836002811115611e7a57611e7a612e7e565b145b15611e8657505050565b82826040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016107db929190613de0565b60606000845167ffffffffffffffff811115611eda57611eda613459565b604051908082528060200260200182016040528015611f03578160200160208202803683370190505b5090506000846002811115611f1a57611f1a612e7e565b148015611f3857506001836002811115611f3657611f36612e7e565b145b15611f7957600181600081518110611f5257611f52613488565b602002602001019067ffffffffffffffff16908167ffffffffffffffff16815250506120e1565b6001846002811115611f8d57611f8d612e7e565b148015611fab57506002836002811115611fa957611fa9612e7e565b145b156120425785600081518110611fc357611fc3613488565b60200260200101516020015181600081518110611fe257611fe2613488565b602002602001019067ffffffffffffffff16908167ffffffffffffffff16815250508560008151811061201757612017613488565b602002602001015160200151600161202f9190613dfb565b81600181518110611f5257611f52613488565b600284600281111561205657612056612e7e565b1480156120745750600183600281111561207257612072612e7e565b145b156120ab578560018151811061208c5761208c613488565b60200260200101516020015181600081518110611f5257611f52613488565b83836040517f0a6b675b0000000000000000000000000000000000000000000000000000000081526004016107db929190613de0565b6000855167ffffffffffffffff8111156120fd576120fd613459565b6040519080825280602002602001820160405280156121b357816020015b604080516101a081018252600060608083018281526080840183905260a0840183905260c0840183905260e084018290526101008401829052610120840182905261014084018290526101608401829052610180840191909152825260208083018290529282015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161211b5790505b50905060005b825181101561229c576121e48782815181106121d7576121d7613488565b6020026020010151612627565b604051806060016040528088838151811061220157612201613488565b6020026020010151815260200184838151811061222057612220613488565b602002602001015167ffffffffffffffff1681526020016122748b86858151811061224d5761224d613488565b60200260200101518b868151811061226757612267613488565b6020026020010151612a1b565b81525082828151811061228957612289613488565b60209081029190910101526001016121b9565b50979650505050505050565b81518151811580156122ba5750806001145b1561235c57826000815181106122d2576122d2613488565b60200260200101516020015167ffffffffffffffff16600114612356578260008151811061230257612302613488565b60209081029190910181015101516040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152600160248201526044016107db565b50505050565b81600114801561236c5750806002145b15612522578360008151811061238457612384613488565b602002602001015160400151836000815181106123a3576123a3613488565b6020026020010151604001511461242f57826000815181106123c7576123c7613488565b602002602001015160400151846000815181106123e6576123e6613488565b6020026020010151604001516040517fc7ccdd7f0000000000000000000000000000000000000000000000000000000081526004016107db929190918252602082015260400190565b8360008151811061244257612442613488565b602002602001015160200151600161245a9190613dfb565b67ffffffffffffffff168360018151811061247757612477613488565b60200260200101516020015167ffffffffffffffff161461235657826001815181106124a5576124a5613488565b602002602001015160200151846000815181106124c4576124c4613488565b60200260200101516020015160016124dc9190613dfb565b6040517fc1658eb800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9283166004820152911660248201526044016107db565b8160021480156125325750806001145b156125f5578360018151811061254a5761254a613488565b6020026020010151604001518360008151811061256957612569613488565b60200260200101516040015114612356578260008151811061258d5761258d613488565b602002602001015160400151846001815181106125ac576125ac613488565b6020026020010151604001516040517f9e9756700000000000000000000000000000000000000000000000000000000081526004016107db929190918252602082015260400190565b6040517f1f1b2bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015167ffffffffffffffff1660000361266f576040517f698cf8e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008151600181111561268457612684612e7e565b141580156126a557506001815160018111156126a2576126a2612e7e565b14155b156126dc576040517f3302dbd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80608001515160000361271b576040517f358c192700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208101516127369060039067ffffffffffffffff1661108d565b61277e5760208101516040517f1bd4d2d200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016107db565b60e081015151601f10156127be576040517f1b925da600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61010081015151601f10156127ff576040517f645960ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208082015167ffffffffffffffff1660009081526002909152604081206001015461282f9060ff166003613e1c565b61283a906001613e38565b60ff1690508082610100015151101561289157610100820151516040517f548dd21f0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016107db565b816040015160ff166000036128d2576040517f39d1a4d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516128e2906003613e1c565b60ff168260e001515111612922576040517f4856694e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160e00151518260c00151511415806129465750816101000151518260c001515114155b156129a15760c08201515160e083015151610100840151516040517fba900f6d0000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201526064016107db565b8160c00151518260a001515111156129e5576040517f8473d80700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8260e0015151811015612a1657612a0e8360c001518281518110610cf957610cf9613488565b6001016129e8565b505050565b60008082602001518584600001518560800151878760a001518860c001518960e001518a61010001518b604001518c606001518d6101200151604051602001612a6f9c9b9a99989796959493929190613ebc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e0a000000000000000000000000000000000000000000000000000000000000179150509392505050565b6040518060400160405280600067ffffffffffffffff168152602001612b33604051806060016040528060608152602001600060ff168152602001606081525090565b905290565b5080546000825590600052602060002090810190610a639190612c4e565b508054612b6290613406565b6000825580601f10612b72575050565b601f016020900490600052602060002090810190610a639190612c4e565b828054828255906000526020600020908101928215612bcb579160200282015b82811115612bcb578251825591602001919060010190612bb0565b50612bd7929150612c4e565b5090565b5080546000825560090290600052602060002090810190610a639190612c63565b828054828255906000526020600020908101928215612c42579160200282015b82811115612c425782518290612c3290826137f9565b5091602001919060010190612c1c565b50612bd7929150612d24565b5b80821115612bd75760008155600101612c4f565b80821115612bd75780547fffffffffffffffffffffffffffff00000000000000000000000000000000000016815560008181612ca26001830182612b56565b612cb0600283016000612b38565b612cbe600383016000612b38565b612ccc600483016000612d41565b612cda600583016000612d41565b612ce8600683016000612b56565b5050506007810180547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016905560006008820155600901612c63565b80821115612bd7576000612d388282612b56565b50600101612d24565b5080546000825590600052602060002090810190610a639190612d24565b600060208284031215612d7157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f0457600080fd5b6000815180845260005b81811015612dc757602081850181015186830182015201612dab565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610f046020830184612da1565b63ffffffff81168114610a6357600080fd5b8035612e3581612e18565b919050565b803560028110612e3557600080fd5b60008060408385031215612e5c57600080fd5b8235612e6781612e18565b9150612e7560208401612e3a565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110612ebd57612ebd612e7e565b9052565b60008151808452602080850194506020840160005b83811015612ef257815187529582019590820190600101612ed6565b509495945050505050565b60008282518085526020808601955060208260051b8401016020860160005b84811015612f68577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952612f56838351612da1565b98840198925090830190600101612f1c565b5090979650505050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613144577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0898403018552815160608151818652612fe38287018251612ead565b898101516080612ffe8189018367ffffffffffffffff169052565b8a830151915060a0613014818a018460ff169052565b938301519360c092506130328984018667ffffffffffffffff169052565b818401519450610140915060e082818b01526130526101a08b0187612da1565b95508185015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0610100818c890301818d01526130918885612ec1565b97508587015195506101209350818c890301848d01526130b18887612ec1565b9750828701519550818c890301858d01526130cc8887612efd565b975080870151955050808b8803016101608c01526130ea8786612efd565b9650828601519550808b8803016101808c0152505050505061310c8282612da1565b915050888201516131288a87018267ffffffffffffffff169052565b5090870151938701939093529386019390860190600101612f9e565b509098975050505050505050565b60006020828403121561316457600080fd5b8135610f0481612e18565b60008151606084526131846060850182612ec1565b905060ff6020840151166020850152604083015184820360408601526131aa8282612da1565b95945050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015613144578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805167ffffffffffffffff1684528701518784018790526132308785018261316f565b95880195935050908601906001016131dc565b60006020828403121561325557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610f0457600080fd5b60008083601f84011261328b57600080fd5b50813567ffffffffffffffff8111156132a357600080fd5b6020830191508360208260051b85010111156132be57600080fd5b9250929050565b600080600080604085870312156132db57600080fd5b843567ffffffffffffffff808211156132f357600080fd5b6132ff88838901613279565b9096509450602087013591508082111561331857600080fd5b5061332587828801613279565b95989497509550505050565b803567ffffffffffffffff81168114612e3557600080fd5b6000806000806000806080878903121561336257600080fd5b863567ffffffffffffffff8082111561337a57600080fd5b6133868a838b01613279565b9098509650602089013591508082111561339f57600080fd5b818901915089601f8301126133b357600080fd5b8135818111156133c257600080fd5b8a60208285010111156133d457600080fd5b6020830196508095505050506133ec60408801613331565b91506133fa60608801612e2a565b90509295509295509295565b600181811c9082168061341a57607f821691505b602082108103613453577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156134c957600080fd5b610f0482613331565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261350657600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301811261350657600080fd5b604051610140810167ffffffffffffffff8111828210171561356857613568613459565b60405290565b60405160e0810167ffffffffffffffff8111828210171561356857613568613459565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156135d8576135d8613459565b604052919050565b600067ffffffffffffffff8211156135fa576135fa613459565b5060051b60200190565b600082601f83011261361557600080fd5b8135602061362a613625836135e0565b613591565b8083825260208201915060208460051b87010193508684111561364c57600080fd5b602086015b848110156136685780358352918301918301613651565b509695505050505050565b803560ff81168114612e3557600080fd5b600082601f83011261369557600080fd5b813567ffffffffffffffff8111156136af576136af613459565b6136e060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613591565b8181528460208386010111156136f557600080fd5b816020850160208301376000918101602001919091529392505050565b60006060823603121561372457600080fd5b6040516060810167ffffffffffffffff828210818311171561374857613748613459565b81604052843591508082111561375d57600080fd5b61376936838701613604565b835261377760208601613673565b6020840152604085013591508082111561379057600080fd5b5061379d36828601613684565b60408301525092915050565b601f821115612a16576000816000526020600020601f850160051c810160208610156137d25750805b601f850160051c820191505b818110156137f1578281556001016137de565b505050505050565b815167ffffffffffffffff81111561381357613813613459565b613827816138218454613406565b846137a9565b602080601f83116001811461387a57600084156138445750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556137f1565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156138c7578886015182559484019460019091019084016138a8565b508582101561390357878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff83168152604060208201526000613936604083018461316f565b949350505050565b600082601f83011261394f57600080fd5b8135602061395f613625836135e0565b82815260059290921b8401810191818101908684111561397e57600080fd5b8286015b8481101561366857803567ffffffffffffffff8111156139a25760008081fd5b6139b08986838b0101613684565b845250918301918301613982565b600060208083850312156139d157600080fd5b823567ffffffffffffffff808211156139e957600080fd5b818501915085601f8301126139fd57600080fd5b8135613a0b613625826135e0565b81815260059190911b83018401908481019088831115613a2a57600080fd5b8585015b83811015613bb857803585811115613a4557600080fd5b8601610140818c037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0011215613a7a57600080fd5b613a82613544565b613a8d898301612e3a565b8152613a9b60408301613331565b89820152613aab60608301613673565b6040820152613abc60808301613331565b606082015260a082013587811115613ad357600080fd5b613ae18d8b83860101613684565b60808301525060c082013587811115613af957600080fd5b613b078d8b83860101613604565b60a08301525060e082013587811115613b1f57600080fd5b613b2d8d8b83860101613604565b60c0830152506101008083013588811115613b4757600080fd5b613b558e8c8387010161393e565b60e0840152506101208084013589811115613b6f57600080fd5b613b7d8f8d8388010161393e565b8385015250610140840135915088821115613b9757600080fd5b613ba58e8c84870101613684565b9083015250845250918601918601613a2e565b5098975050505050505050565b8051612e3581612e18565b600082601f830112613be157600080fd5b81516020613bf1613625836135e0565b8083825260208201915060208460051b870101935086841115613c1357600080fd5b602086015b848110156136685780518352918301918301613c18565b600060208284031215613c4157600080fd5b815167ffffffffffffffff80821115613c5957600080fd5b9083019060e08286031215613c6d57600080fd5b613c7561356e565b613c7e83613bc5565b8152613c8c60208401613bc5565b6020820152613c9d60408401613bc5565b6040820152606083015160608201526080830151608082015260a083015182811115613cc857600080fd5b613cd487828601613bd0565b60a08301525060c083015182811115613cec57600080fd5b613cf887828601613bd0565b60c08301525095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613d6757613d67613d07565b5060010190565b8181038181111561028857610288613d07565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b8181036000831280158383131683831282161715610a4b57610a4b613d07565b60038110612ebd57612ebd612e7e565b60408101613dee8285613dd0565b610f046020830184613dd0565b67ffffffffffffffff818116838216019080821115610a4b57610a4b613d07565b60ff8181168382160290811690818114610a4b57610a4b613d07565b60ff818116838216019081111561028857610288613d07565b60008282518085526020808601955060208260051b8401016020860160005b84811015612f68577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868403018952613eaa838351612da1565b98840198925090830190600101613e70565b67ffffffffffffffff8d16815263ffffffff8c166020820152613ee2604082018c612ead565b61018060608201526000613efa61018083018c612da1565b67ffffffffffffffff8b16608084015282810360a0840152613f1c818b612ec1565b905082810360c0840152613f30818a612ec1565b905082810360e0840152613f448189613e51565b9050828103610100840152613f598188613e51565b60ff8716610120850152905067ffffffffffffffff8516610140840152828103610160840152613f898185612da1565b9f9e50505050505050505050505050505056fea164736f6c6343000818000a", +} + +var CCIPConfigABI = CCIPConfigMetaData.ABI + +var CCIPConfigBin = CCIPConfigMetaData.Bin + +func DeployCCIPConfig(auth *bind.TransactOpts, backend bind.ContractBackend, capabilitiesRegistry common.Address) (common.Address, *types.Transaction, *CCIPConfig, error) { + parsed, err := CCIPConfigMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CCIPConfigBin), backend, capabilitiesRegistry) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &CCIPConfig{address: address, abi: *parsed, CCIPConfigCaller: CCIPConfigCaller{contract: contract}, CCIPConfigTransactor: CCIPConfigTransactor{contract: contract}, CCIPConfigFilterer: CCIPConfigFilterer{contract: contract}}, nil +} + +type CCIPConfig struct { + address common.Address + abi abi.ABI + CCIPConfigCaller + CCIPConfigTransactor + CCIPConfigFilterer +} + +type CCIPConfigCaller struct { + contract *bind.BoundContract +} + +type CCIPConfigTransactor struct { + contract *bind.BoundContract +} + +type CCIPConfigFilterer struct { + contract *bind.BoundContract +} + +type CCIPConfigSession struct { + Contract *CCIPConfig + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type CCIPConfigCallerSession struct { + Contract *CCIPConfigCaller + CallOpts bind.CallOpts +} + +type CCIPConfigTransactorSession struct { + Contract *CCIPConfigTransactor + TransactOpts bind.TransactOpts +} + +type CCIPConfigRaw struct { + Contract *CCIPConfig +} + +type CCIPConfigCallerRaw struct { + Contract *CCIPConfigCaller +} + +type CCIPConfigTransactorRaw struct { + Contract *CCIPConfigTransactor +} + +func NewCCIPConfig(address common.Address, backend bind.ContractBackend) (*CCIPConfig, error) { + abi, err := abi.JSON(strings.NewReader(CCIPConfigABI)) + if err != nil { + return nil, err + } + contract, err := bindCCIPConfig(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CCIPConfig{address: address, abi: abi, CCIPConfigCaller: CCIPConfigCaller{contract: contract}, CCIPConfigTransactor: CCIPConfigTransactor{contract: contract}, CCIPConfigFilterer: CCIPConfigFilterer{contract: contract}}, nil +} + +func NewCCIPConfigCaller(address common.Address, caller bind.ContractCaller) (*CCIPConfigCaller, error) { + contract, err := bindCCIPConfig(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CCIPConfigCaller{contract: contract}, nil +} + +func NewCCIPConfigTransactor(address common.Address, transactor bind.ContractTransactor) (*CCIPConfigTransactor, error) { + contract, err := bindCCIPConfig(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CCIPConfigTransactor{contract: contract}, nil +} + +func NewCCIPConfigFilterer(address common.Address, filterer bind.ContractFilterer) (*CCIPConfigFilterer, error) { + contract, err := bindCCIPConfig(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CCIPConfigFilterer{contract: contract}, nil +} + +func bindCCIPConfig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CCIPConfigMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_CCIPConfig *CCIPConfigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPConfig.Contract.CCIPConfigCaller.contract.Call(opts, result, method, params...) +} + +func (_CCIPConfig *CCIPConfigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPConfig.Contract.CCIPConfigTransactor.contract.Transfer(opts) +} + +func (_CCIPConfig *CCIPConfigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPConfig.Contract.CCIPConfigTransactor.contract.Transact(opts, method, params...) +} + +func (_CCIPConfig *CCIPConfigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CCIPConfig.Contract.contract.Call(opts, result, method, params...) +} + +func (_CCIPConfig *CCIPConfigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPConfig.Contract.contract.Transfer(opts) +} + +func (_CCIPConfig *CCIPConfigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CCIPConfig.Contract.contract.Transact(opts, method, params...) +} + +func (_CCIPConfig *CCIPConfigCaller) GetAllChainConfigs(opts *bind.CallOpts) ([]CCIPConfigChainConfigInfo, error) { + var out []interface{} + err := _CCIPConfig.contract.Call(opts, &out, "getAllChainConfigs") + + if err != nil { + return *new([]CCIPConfigChainConfigInfo), err + } + + out0 := *abi.ConvertType(out[0], new([]CCIPConfigChainConfigInfo)).(*[]CCIPConfigChainConfigInfo) + + return out0, err + +} + +func (_CCIPConfig *CCIPConfigSession) GetAllChainConfigs() ([]CCIPConfigChainConfigInfo, error) { + return _CCIPConfig.Contract.GetAllChainConfigs(&_CCIPConfig.CallOpts) +} + +func (_CCIPConfig *CCIPConfigCallerSession) GetAllChainConfigs() ([]CCIPConfigChainConfigInfo, error) { + return _CCIPConfig.Contract.GetAllChainConfigs(&_CCIPConfig.CallOpts) +} + +func (_CCIPConfig *CCIPConfigCaller) GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, error) { + var out []interface{} + err := _CCIPConfig.contract.Call(opts, &out, "getCapabilityConfiguration", arg0) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_CCIPConfig *CCIPConfigSession) GetCapabilityConfiguration(arg0 uint32) ([]byte, error) { + return _CCIPConfig.Contract.GetCapabilityConfiguration(&_CCIPConfig.CallOpts, arg0) +} + +func (_CCIPConfig *CCIPConfigCallerSession) GetCapabilityConfiguration(arg0 uint32) ([]byte, error) { + return _CCIPConfig.Contract.GetCapabilityConfiguration(&_CCIPConfig.CallOpts, arg0) +} + +func (_CCIPConfig *CCIPConfigCaller) GetOCRConfig(opts *bind.CallOpts, donId uint32, pluginType uint8) ([]CCIPConfigOCR3ConfigWithMeta, error) { + var out []interface{} + err := _CCIPConfig.contract.Call(opts, &out, "getOCRConfig", donId, pluginType) + + if err != nil { + return *new([]CCIPConfigOCR3ConfigWithMeta), err + } + + out0 := *abi.ConvertType(out[0], new([]CCIPConfigOCR3ConfigWithMeta)).(*[]CCIPConfigOCR3ConfigWithMeta) + + return out0, err + +} + +func (_CCIPConfig *CCIPConfigSession) GetOCRConfig(donId uint32, pluginType uint8) ([]CCIPConfigOCR3ConfigWithMeta, error) { + return _CCIPConfig.Contract.GetOCRConfig(&_CCIPConfig.CallOpts, donId, pluginType) +} + +func (_CCIPConfig *CCIPConfigCallerSession) GetOCRConfig(donId uint32, pluginType uint8) ([]CCIPConfigOCR3ConfigWithMeta, error) { + return _CCIPConfig.Contract.GetOCRConfig(&_CCIPConfig.CallOpts, donId, pluginType) +} + +func (_CCIPConfig *CCIPConfigCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CCIPConfig.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_CCIPConfig *CCIPConfigSession) Owner() (common.Address, error) { + return _CCIPConfig.Contract.Owner(&_CCIPConfig.CallOpts) +} + +func (_CCIPConfig *CCIPConfigCallerSession) Owner() (common.Address, error) { + return _CCIPConfig.Contract.Owner(&_CCIPConfig.CallOpts) +} + +func (_CCIPConfig *CCIPConfigCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _CCIPConfig.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_CCIPConfig *CCIPConfigSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _CCIPConfig.Contract.SupportsInterface(&_CCIPConfig.CallOpts, interfaceId) +} + +func (_CCIPConfig *CCIPConfigCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _CCIPConfig.Contract.SupportsInterface(&_CCIPConfig.CallOpts, interfaceId) +} + +func (_CCIPConfig *CCIPConfigCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _CCIPConfig.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_CCIPConfig *CCIPConfigSession) TypeAndVersion() (string, error) { + return _CCIPConfig.Contract.TypeAndVersion(&_CCIPConfig.CallOpts) +} + +func (_CCIPConfig *CCIPConfigCallerSession) TypeAndVersion() (string, error) { + return _CCIPConfig.Contract.TypeAndVersion(&_CCIPConfig.CallOpts) +} + +func (_CCIPConfig *CCIPConfigTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CCIPConfig.contract.Transact(opts, "acceptOwnership") +} + +func (_CCIPConfig *CCIPConfigSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPConfig.Contract.AcceptOwnership(&_CCIPConfig.TransactOpts) +} + +func (_CCIPConfig *CCIPConfigTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _CCIPConfig.Contract.AcceptOwnership(&_CCIPConfig.TransactOpts) +} + +func (_CCIPConfig *CCIPConfigTransactor) ApplyChainConfigUpdates(opts *bind.TransactOpts, chainSelectorRemoves []uint64, chainConfigAdds []CCIPConfigChainConfigInfo) (*types.Transaction, error) { + return _CCIPConfig.contract.Transact(opts, "applyChainConfigUpdates", chainSelectorRemoves, chainConfigAdds) +} + +func (_CCIPConfig *CCIPConfigSession) ApplyChainConfigUpdates(chainSelectorRemoves []uint64, chainConfigAdds []CCIPConfigChainConfigInfo) (*types.Transaction, error) { + return _CCIPConfig.Contract.ApplyChainConfigUpdates(&_CCIPConfig.TransactOpts, chainSelectorRemoves, chainConfigAdds) +} + +func (_CCIPConfig *CCIPConfigTransactorSession) ApplyChainConfigUpdates(chainSelectorRemoves []uint64, chainConfigAdds []CCIPConfigChainConfigInfo) (*types.Transaction, error) { + return _CCIPConfig.Contract.ApplyChainConfigUpdates(&_CCIPConfig.TransactOpts, chainSelectorRemoves, chainConfigAdds) +} + +func (_CCIPConfig *CCIPConfigTransactor) BeforeCapabilityConfigSet(opts *bind.TransactOpts, arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { + return _CCIPConfig.contract.Transact(opts, "beforeCapabilityConfigSet", arg0, config, arg2, donId) +} + +func (_CCIPConfig *CCIPConfigSession) BeforeCapabilityConfigSet(arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { + return _CCIPConfig.Contract.BeforeCapabilityConfigSet(&_CCIPConfig.TransactOpts, arg0, config, arg2, donId) +} + +func (_CCIPConfig *CCIPConfigTransactorSession) BeforeCapabilityConfigSet(arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) { + return _CCIPConfig.Contract.BeforeCapabilityConfigSet(&_CCIPConfig.TransactOpts, arg0, config, arg2, donId) +} + +func (_CCIPConfig *CCIPConfigTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CCIPConfig.contract.Transact(opts, "transferOwnership", to) +} + +func (_CCIPConfig *CCIPConfigSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPConfig.Contract.TransferOwnership(&_CCIPConfig.TransactOpts, to) +} + +func (_CCIPConfig *CCIPConfigTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CCIPConfig.Contract.TransferOwnership(&_CCIPConfig.TransactOpts, to) +} + +type CCIPConfigCapabilityConfigurationSetIterator struct { + Event *CCIPConfigCapabilityConfigurationSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPConfigCapabilityConfigurationSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPConfigCapabilityConfigurationSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPConfigCapabilityConfigurationSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPConfigCapabilityConfigurationSetIterator) Error() error { + return it.fail +} + +func (it *CCIPConfigCapabilityConfigurationSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPConfigCapabilityConfigurationSet struct { + Raw types.Log +} + +func (_CCIPConfig *CCIPConfigFilterer) FilterCapabilityConfigurationSet(opts *bind.FilterOpts) (*CCIPConfigCapabilityConfigurationSetIterator, error) { + + logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "CapabilityConfigurationSet") + if err != nil { + return nil, err + } + return &CCIPConfigCapabilityConfigurationSetIterator{contract: _CCIPConfig.contract, event: "CapabilityConfigurationSet", logs: logs, sub: sub}, nil +} + +func (_CCIPConfig *CCIPConfigFilterer) WatchCapabilityConfigurationSet(opts *bind.WatchOpts, sink chan<- *CCIPConfigCapabilityConfigurationSet) (event.Subscription, error) { + + logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "CapabilityConfigurationSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPConfigCapabilityConfigurationSet) + if err := _CCIPConfig.contract.UnpackLog(event, "CapabilityConfigurationSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPConfig *CCIPConfigFilterer) ParseCapabilityConfigurationSet(log types.Log) (*CCIPConfigCapabilityConfigurationSet, error) { + event := new(CCIPConfigCapabilityConfigurationSet) + if err := _CCIPConfig.contract.UnpackLog(event, "CapabilityConfigurationSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPConfigChainConfigRemovedIterator struct { + Event *CCIPConfigChainConfigRemoved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPConfigChainConfigRemovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPConfigChainConfigRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPConfigChainConfigRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPConfigChainConfigRemovedIterator) Error() error { + return it.fail +} + +func (it *CCIPConfigChainConfigRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPConfigChainConfigRemoved struct { + ChainSelector uint64 + Raw types.Log +} + +func (_CCIPConfig *CCIPConfigFilterer) FilterChainConfigRemoved(opts *bind.FilterOpts) (*CCIPConfigChainConfigRemovedIterator, error) { + + logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "ChainConfigRemoved") + if err != nil { + return nil, err + } + return &CCIPConfigChainConfigRemovedIterator{contract: _CCIPConfig.contract, event: "ChainConfigRemoved", logs: logs, sub: sub}, nil +} + +func (_CCIPConfig *CCIPConfigFilterer) WatchChainConfigRemoved(opts *bind.WatchOpts, sink chan<- *CCIPConfigChainConfigRemoved) (event.Subscription, error) { + + logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "ChainConfigRemoved") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPConfigChainConfigRemoved) + if err := _CCIPConfig.contract.UnpackLog(event, "ChainConfigRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPConfig *CCIPConfigFilterer) ParseChainConfigRemoved(log types.Log) (*CCIPConfigChainConfigRemoved, error) { + event := new(CCIPConfigChainConfigRemoved) + if err := _CCIPConfig.contract.UnpackLog(event, "ChainConfigRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPConfigChainConfigSetIterator struct { + Event *CCIPConfigChainConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPConfigChainConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPConfigChainConfigSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPConfigChainConfigSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPConfigChainConfigSetIterator) Error() error { + return it.fail +} + +func (it *CCIPConfigChainConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPConfigChainConfigSet struct { + ChainSelector uint64 + ChainConfig CCIPConfigChainConfig + Raw types.Log +} + +func (_CCIPConfig *CCIPConfigFilterer) FilterChainConfigSet(opts *bind.FilterOpts) (*CCIPConfigChainConfigSetIterator, error) { + + logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "ChainConfigSet") + if err != nil { + return nil, err + } + return &CCIPConfigChainConfigSetIterator{contract: _CCIPConfig.contract, event: "ChainConfigSet", logs: logs, sub: sub}, nil +} + +func (_CCIPConfig *CCIPConfigFilterer) WatchChainConfigSet(opts *bind.WatchOpts, sink chan<- *CCIPConfigChainConfigSet) (event.Subscription, error) { + + logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "ChainConfigSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPConfigChainConfigSet) + if err := _CCIPConfig.contract.UnpackLog(event, "ChainConfigSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPConfig *CCIPConfigFilterer) ParseChainConfigSet(log types.Log) (*CCIPConfigChainConfigSet, error) { + event := new(CCIPConfigChainConfigSet) + if err := _CCIPConfig.contract.UnpackLog(event, "ChainConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPConfigOwnershipTransferRequestedIterator struct { + Event *CCIPConfigOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPConfigOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPConfigOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPConfigOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPConfigOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *CCIPConfigOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPConfigOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPConfig *CCIPConfigFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPConfigOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPConfigOwnershipTransferRequestedIterator{contract: _CCIPConfig.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_CCIPConfig *CCIPConfigFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPConfigOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPConfigOwnershipTransferRequested) + if err := _CCIPConfig.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPConfig *CCIPConfigFilterer) ParseOwnershipTransferRequested(log types.Log) (*CCIPConfigOwnershipTransferRequested, error) { + event := new(CCIPConfigOwnershipTransferRequested) + if err := _CCIPConfig.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type CCIPConfigOwnershipTransferredIterator struct { + Event *CCIPConfigOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CCIPConfigOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CCIPConfigOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(CCIPConfigOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *CCIPConfigOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *CCIPConfigOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CCIPConfigOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_CCIPConfig *CCIPConfigFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPConfigOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPConfig.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &CCIPConfigOwnershipTransferredIterator{contract: _CCIPConfig.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_CCIPConfig *CCIPConfigFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPConfigOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _CCIPConfig.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CCIPConfigOwnershipTransferred) + if err := _CCIPConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_CCIPConfig *CCIPConfigFilterer) ParseOwnershipTransferred(log types.Log) (*CCIPConfigOwnershipTransferred, error) { + event := new(CCIPConfigOwnershipTransferred) + if err := _CCIPConfig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +func (_CCIPConfig *CCIPConfig) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _CCIPConfig.abi.Events["CapabilityConfigurationSet"].ID: + return _CCIPConfig.ParseCapabilityConfigurationSet(log) + case _CCIPConfig.abi.Events["ChainConfigRemoved"].ID: + return _CCIPConfig.ParseChainConfigRemoved(log) + case _CCIPConfig.abi.Events["ChainConfigSet"].ID: + return _CCIPConfig.ParseChainConfigSet(log) + case _CCIPConfig.abi.Events["OwnershipTransferRequested"].ID: + return _CCIPConfig.ParseOwnershipTransferRequested(log) + case _CCIPConfig.abi.Events["OwnershipTransferred"].ID: + return _CCIPConfig.ParseOwnershipTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (CCIPConfigCapabilityConfigurationSet) Topic() common.Hash { + return common.HexToHash("0x84ad7751b744c9e2ee77da1d902b428aec7f0a343d67a24bbe2142e6f58a8d0f") +} + +func (CCIPConfigChainConfigRemoved) Topic() common.Hash { + return common.HexToHash("0x2a680691fef3b2d105196805935232c661ce703e92d464ef0b94a7bc62d714f0") +} + +func (CCIPConfigChainConfigSet) Topic() common.Hash { + return common.HexToHash("0x05dd57854af2c291a94ea52e7c43d80bc3be7fa73022f98b735dea86642fa5e0") +} + +func (CCIPConfigOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (CCIPConfigOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (_CCIPConfig *CCIPConfig) Address() common.Address { + return _CCIPConfig.address +} + +type CCIPConfigInterface interface { + GetAllChainConfigs(opts *bind.CallOpts) ([]CCIPConfigChainConfigInfo, error) + + GetCapabilityConfiguration(opts *bind.CallOpts, arg0 uint32) ([]byte, error) + + GetOCRConfig(opts *bind.CallOpts, donId uint32, pluginType uint8) ([]CCIPConfigOCR3ConfigWithMeta, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + ApplyChainConfigUpdates(opts *bind.TransactOpts, chainSelectorRemoves []uint64, chainConfigAdds []CCIPConfigChainConfigInfo) (*types.Transaction, error) + + BeforeCapabilityConfigSet(opts *bind.TransactOpts, arg0 [][32]byte, config []byte, arg2 uint64, donId uint32) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + FilterCapabilityConfigurationSet(opts *bind.FilterOpts) (*CCIPConfigCapabilityConfigurationSetIterator, error) + + WatchCapabilityConfigurationSet(opts *bind.WatchOpts, sink chan<- *CCIPConfigCapabilityConfigurationSet) (event.Subscription, error) + + ParseCapabilityConfigurationSet(log types.Log) (*CCIPConfigCapabilityConfigurationSet, error) + + FilterChainConfigRemoved(opts *bind.FilterOpts) (*CCIPConfigChainConfigRemovedIterator, error) + + WatchChainConfigRemoved(opts *bind.WatchOpts, sink chan<- *CCIPConfigChainConfigRemoved) (event.Subscription, error) + + ParseChainConfigRemoved(log types.Log) (*CCIPConfigChainConfigRemoved, error) + + FilterChainConfigSet(opts *bind.FilterOpts) (*CCIPConfigChainConfigSetIterator, error) + + WatchChainConfigSet(opts *bind.WatchOpts, sink chan<- *CCIPConfigChainConfigSet) (event.Subscription, error) + + ParseChainConfigSet(log types.Log) (*CCIPConfigChainConfigSet, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPConfigOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CCIPConfigOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*CCIPConfigOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CCIPConfigOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CCIPConfigOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*CCIPConfigOwnershipTransferred, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 30dda5afe5..2bb1dd1a5b 100644 --- a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -5,7 +5,7 @@ burn_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool burn_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.bin fee3f82935ce7a26c65e12f19a472a4fccdae62755abdb42d8b0a01f0f06981a burn_mint_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.bin c7efa00d2be62a97a814730c8e13aa70794ebfdd38a9f3b3c11554a5dfd70478 burn_with_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.bin a0728e186af74968101135a58a483320ced9ab79b22b1b24ac6994254ee79097 -ccip_capability_configuration: ../../../contracts/solc/v0.8.24/CCIPCapabilityConfiguration/CCIPCapabilityConfiguration.abi ../../../contracts/solc/v0.8.24/CCIPCapabilityConfiguration/CCIPCapabilityConfiguration.bin 0617b071beabe06895b05002f1cc3da51f32a67158b816cbbca85682a46d796f +ccip_config: ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.abi ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.bin ef9e1f61b288bc31dda1c4e9d0bb8885b7b0bf1fe35bf74af8b12568e7532010 commit_store: ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.abi ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.bin ddc26c10c2a52b59624faae9005827b09b98db4566887a736005e8cc37cf8a51 commit_store_helper: ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.abi ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.bin ebd8aac686fa28a71d4212bcd25a28f8f640d50dce5e50498b2f6b8534890b69 ether_sender_receiver: ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.abi ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.bin 09510a3f773f108a3c231e8d202835c845ded862d071ec54c4f89c12d868b8de diff --git a/core/gethwrappers/ccip/go_generate.go b/core/gethwrappers/ccip/go_generate.go index 57a05ae411..afe5834112 100644 --- a/core/gethwrappers/ccip/go_generate.go +++ b/core/gethwrappers/ccip/go_generate.go @@ -28,7 +28,7 @@ package ccip //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.abi ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.bin MultiAggregateRateLimiter multi_aggregate_rate_limiter //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/Router/Router.abi ../../../contracts/solc/v0.8.24/Router/Router.bin Router router //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.abi ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.bin PriceRegistry price_registry -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPCapabilityConfiguration/CCIPCapabilityConfiguration.abi ../../../contracts/solc/v0.8.24/CCIPCapabilityConfiguration/CCIPCapabilityConfiguration.bin CCIPCapabilityConfiguration ccip_capability_configuration +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.abi ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.bin CCIPConfig ccip_config //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.abi ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.bin MaybeRevertMessageReceiver maybe_revert_message_receiver //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin PingPongDemo ping_pong_demo