diff --git a/.changeset/lemon-buttons-raise.md b/.changeset/lemon-buttons-raise.md new file mode 100644 index 00000000000..0408383bd03 --- /dev/null +++ b/.changeset/lemon-buttons-raise.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal diff --git a/contracts/.changeset/spicy-mirrors-care.md b/contracts/.changeset/spicy-mirrors-care.md new file mode 100644 index 00000000000..93fba83b558 --- /dev/null +++ b/contracts/.changeset/spicy-mirrors-care.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +#internal diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index f641bcb065e..55e6884c818 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -1,84 +1,84 @@ -CapabilityRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 152156) -CapabilityRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 176137) -CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24723) -CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145769) -CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94606) -CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 92961) -CapabilityRegistry_AddDONTest:test_AddDON() (gas: 372909) -CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19269) -CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169874) -CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 243042) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 249901) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116949) -CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43354) -CapabilityRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 344231) -CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 180335) -CapabilityRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184333) -CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17602) -CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18498) -CapabilityRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358667) -CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358633) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301350) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55207) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24895) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27702) -CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25108) -CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27408) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27047) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309800) -CapabilityRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92938) -CapabilityRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 93066) -CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22944) -CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16231) -CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94395) -CapabilityRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 122114) -CapabilityRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 58311) -CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65746) -CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 65329) -CapabilityRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) -CapabilityRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) -CapabilityRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36653) -CapabilityRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38938) -CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65482) -CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73664) -CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54946) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550) -CapabilityRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) -CapabilityRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) -CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115436) -CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 288312) -CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 562061) -CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73457) -CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75292) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25053) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18418) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385680) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18408) -CapabilityRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19411) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 153162) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17831) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 226375) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 233235) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107828) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163668) -CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 372699) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20627) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20048) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19786) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15426) -CapabilityRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36991) -CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 253325) -CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 161746) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35794) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25064) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27303) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29214) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27291) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26951) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25508) -CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 161800) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 152156) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 176137) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24723) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145769) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94606) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 92961) +CapabilitiesRegistry_AddDONTest:test_AddDON() (gas: 372909) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19269) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169874) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 243042) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 249901) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116949) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43354) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 344231) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 180335) +CapabilitiesRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184333) +CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17602) +CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18498) +CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358667) +CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358633) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301350) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55207) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24895) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27702) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25108) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27408) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27047) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309800) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92938) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 93066) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22944) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16231) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94395) +CapabilitiesRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 122114) +CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 58311) +CapabilitiesRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65746) +CapabilitiesRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 65329) +CapabilitiesRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) +CapabilitiesRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) +CapabilitiesRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36653) +CapabilitiesRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38938) +CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65482) +CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73664) +CapabilitiesRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54946) +CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) +CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550) +CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) +CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) +CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115436) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 288312) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 562061) +CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73457) +CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75292) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25053) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18418) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385680) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18408) +CapabilitiesRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19411) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 153162) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17831) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 226375) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 233235) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107828) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163668) +CapabilitiesRegistry_UpdateDONTest:test_UpdatesDON() (gas: 372699) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20627) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20048) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19786) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15426) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36991) +CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 253325) +CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 161746) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35794) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25064) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27303) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29214) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27291) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26951) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25508) +CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 161800) KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 1802140) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 126020) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverNotContract() (gas: 127513) diff --git a/contracts/scripts/native_solc_compile_all_keystone b/contracts/scripts/native_solc_compile_all_keystone index 1530b307dbd..4b7fca590d6 100755 --- a/contracts/scripts/native_solc_compile_all_keystone +++ b/contracts/scripts/native_solc_compile_all_keystone @@ -28,6 +28,6 @@ compileContract () { "$ROOT"/contracts/src/v0.8/"$1" } -compileContract keystone/CapabilityRegistry.sol +compileContract keystone/CapabilitiesRegistry.sol compileContract keystone/KeystoneForwarder.sol compileContract keystone/OCR3Capability.sol diff --git a/contracts/src/v0.8/keystone/CapabilityRegistry.sol b/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol similarity index 98% rename from contracts/src/v0.8/keystone/CapabilityRegistry.sol rename to contracts/src/v0.8/keystone/CapabilitiesRegistry.sol index c6802608204..9286dd678b1 100644 --- a/contracts/src/v0.8/keystone/CapabilityRegistry.sol +++ b/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol @@ -7,7 +7,7 @@ import {IERC165} from "../vendor/openzeppelin-solidity/v4.8.3/contracts/interfac import {EnumerableSet} from "../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; import {ICapabilityConfiguration} from "./interfaces/ICapabilityConfiguration.sol"; -/// @notice CapabilityRegistry is used to manage Nodes (including their links to Node +/// @notice CapabilitiesRegistry is used to manage Nodes (including their links to Node /// Operators), Capabilities, and DONs (Decentralized Oracle Networks) which are /// sets of nodes that support those Capabilities. /// @dev The contract currently stores the entire state of Node Operators, Nodes, @@ -15,7 +15,7 @@ import {ICapabilityConfiguration} from "./interfaces/ICapabilityConfiguration.so /// if an upgrade is ever required. The team acknowledges this and is fine /// reconfiguring the upgraded contract in the future so as to not add extra /// complexity to this current version. -contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { +contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { // Add the library methods using EnumerableSet for EnumerableSet.Bytes32Set; using EnumerableSet for EnumerableSet.UintSet; @@ -37,7 +37,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @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 @@ -55,7 +55,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @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 @@ -76,7 +76,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// only belong to one DON that accepts Workflows. uint32 workflowDONId; /// @notice The signer address for application-layer message verification. - /// @dev This key is guaranteed to be unique in the CapabilityRegistry + /// @dev This key is guaranteed to be unique in the CapabilitiesRegistry /// as a signer address can only belong to one node. /// @dev This should be the ABI encoded version of the node's address. /// I.e 0x0000address. The Capability Registry does not store it as an address so that @@ -84,7 +84,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// in the future. 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 node's supported capabilities @@ -420,7 +420,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { uint32 private s_nextDONId = 1; function typeAndVersion() external pure override returns (string memory) { - return "CapabilityRegistry 1.0.0"; + return "CapabilitiesRegistry 1.0.0"; } /// @notice Adds a list of node operators diff --git a/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol b/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol index 4deaaa4443e..429c2a1d3aa 100644 --- a/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol +++ b/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol @@ -16,7 +16,7 @@ interface ICapabilityConfiguration { /// @notice Returns the capability configuration for a particular DON instance. /// @dev donId is required to get DON-specific configuration. It avoids a /// situation where configuration size grows too large. - /// @param donId The DON instance ID. These are stored in the CapabilityRegistry. + /// @param donId The DON instance ID. These are stored in the CapabilitiesRegistry. /// @return configuration DON's configuration for the capability. function getCapabilityConfiguration(uint32 donId) external view returns (bytes memory configuration); diff --git a/contracts/src/v0.8/keystone/test/BaseTest.t.sol b/contracts/src/v0.8/keystone/test/BaseTest.t.sol index 795bb40843e..e637406c145 100644 --- a/contracts/src/v0.8/keystone/test/BaseTest.t.sol +++ b/contracts/src/v0.8/keystone/test/BaseTest.t.sol @@ -4,53 +4,59 @@ pragma solidity ^0.8.19; import {Test} from "forge-std/Test.sol"; import {Constants} from "./Constants.t.sol"; import {CapabilityConfigurationContract} from "./mocks/CapabilityConfigurationContract.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; contract BaseTest is Test, Constants { - CapabilityRegistry internal s_capabilityRegistry; + CapabilitiesRegistry internal s_CapabilitiesRegistry; CapabilityConfigurationContract internal s_capabilityConfigurationContract; - CapabilityRegistry.Capability internal s_basicCapability; - CapabilityRegistry.Capability internal s_capabilityWithConfigurationContract; + CapabilitiesRegistry.Capability internal s_basicCapability; + CapabilitiesRegistry.Capability internal s_capabilityWithConfigurationContract; bytes32 internal s_basicHashedCapabilityId; bytes32 internal s_capabilityWithConfigurationContractId; bytes32 internal s_nonExistentHashedCapabilityId; function setUp() public virtual { vm.startPrank(ADMIN); - s_capabilityRegistry = new CapabilityRegistry(); + s_CapabilitiesRegistry = new CapabilitiesRegistry(); s_capabilityConfigurationContract = new CapabilityConfigurationContract(); - s_basicCapability = CapabilityRegistry.Capability({ + s_basicCapability = CapabilitiesRegistry.Capability({ labelledName: "data-streams-reports", version: "1.0.0", - responseType: CapabilityRegistry.CapabilityResponseType.REPORT, + responseType: CapabilitiesRegistry.CapabilityResponseType.REPORT, configurationContract: address(0), - capabilityType: CapabilityRegistry.CapabilityType.TRIGGER + capabilityType: CapabilitiesRegistry.CapabilityType.TRIGGER }); - s_capabilityWithConfigurationContract = CapabilityRegistry.Capability({ + s_capabilityWithConfigurationContract = CapabilitiesRegistry.Capability({ labelledName: "read-ethereum-mainnet-gas-price", version: "1.0.2", - responseType: CapabilityRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL, + responseType: CapabilitiesRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL, configurationContract: address(s_capabilityConfigurationContract), - capabilityType: CapabilityRegistry.CapabilityType.ACTION + capabilityType: CapabilitiesRegistry.CapabilityType.ACTION }); - s_basicHashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + s_basicHashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); - s_capabilityWithConfigurationContractId = s_capabilityRegistry.getHashedCapabilityId( + s_capabilityWithConfigurationContractId = s_CapabilitiesRegistry.getHashedCapabilityId( s_capabilityWithConfigurationContract.labelledName, s_capabilityWithConfigurationContract.version ); - s_nonExistentHashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId("non-existent-capability", "1.0.0"); + s_nonExistentHashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId("non-existent-capability", "1.0.0"); } - function _getNodeOperators() internal pure returns (CapabilityRegistry.NodeOperator[] memory) { - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](3); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NODE_OPERATOR_ONE_ADMIN, name: NODE_OPERATOR_ONE_NAME}); - nodeOperators[1] = CapabilityRegistry.NodeOperator({admin: NODE_OPERATOR_TWO_ADMIN, name: NODE_OPERATOR_TWO_NAME}); - nodeOperators[2] = CapabilityRegistry.NodeOperator({admin: NODE_OPERATOR_THREE, name: NODE_OPERATOR_THREE_NAME}); + function _getNodeOperators() internal pure returns (CapabilitiesRegistry.NodeOperator[] memory) { + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](3); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NODE_OPERATOR_ONE_ADMIN, + name: NODE_OPERATOR_ONE_NAME + }); + nodeOperators[1] = CapabilitiesRegistry.NodeOperator({ + admin: NODE_OPERATOR_TWO_ADMIN, + name: NODE_OPERATOR_TWO_NAME + }); + nodeOperators[2] = CapabilitiesRegistry.NodeOperator({admin: NODE_OPERATOR_THREE, name: NODE_OPERATOR_THREE_NAME}); return nodeOperators; } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol similarity index 60% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol index 6c6b164234f..5b653489503 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol @@ -4,50 +4,50 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityConfigurationContract} from "./mocks/CapabilityConfigurationContract.sol"; import {ICapabilityConfiguration} from "../interfaces/ICapabilityConfiguration.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/interfaces/IERC165.sol"; -contract CapabilityRegistry_AddCapabilitiesTest is BaseTest { +contract CapabilitiesRegistry_AddCapabilitiesTest is BaseTest { event CapabilityConfigured(bytes32 indexed hashedCapabilityId); function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_basicCapability; vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_CapabilityExists() public { - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_basicCapability; // Successfully add the capability the first time - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); // Try to add the same capability again vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.CapabilityAlreadyExists.selector, s_basicHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.CapabilityAlreadyExists.selector, s_basicHashedCapabilityId) ); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_ConfigurationContractNotDeployed() public { address nonExistentContract = address(1); s_capabilityWithConfigurationContract.configurationContract = nonExistentContract; - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_capabilityWithConfigurationContract; vm.expectRevert( abi.encodeWithSelector( - CapabilityRegistry.InvalidCapabilityConfigurationContractInterface.selector, + CapabilitiesRegistry.InvalidCapabilityConfigurationContractInterface.selector, nonExistentContract ) ); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_ConfigurationContractDoesNotMatchInterface() public { @@ -62,27 +62,27 @@ contract CapabilityRegistry_AddCapabilitiesTest is BaseTest { abi.encode(false) ); s_capabilityWithConfigurationContract.configurationContract = contractWithoutERC165; - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_capabilityWithConfigurationContract; vm.expectRevert( abi.encodeWithSelector( - CapabilityRegistry.InvalidCapabilityConfigurationContractInterface.selector, + CapabilitiesRegistry.InvalidCapabilityConfigurationContractInterface.selector, contractWithoutERC165 ) ); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_AddCapability_NoConfigurationContract() public { - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_basicCapability; - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId("data-streams-reports", "1.0.0"); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId("data-streams-reports", "1.0.0"); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit CapabilityConfigured(hashedCapabilityId); - s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); + s_CapabilitiesRegistry.addCapabilities(capabilities); + CapabilitiesRegistry.Capability memory storedCapability = s_CapabilitiesRegistry.getCapability(hashedCapabilityId); assertEq(storedCapability.labelledName, s_basicCapability.labelledName); assertEq(storedCapability.version, s_basicCapability.version); @@ -91,18 +91,18 @@ contract CapabilityRegistry_AddCapabilitiesTest is BaseTest { } function test_AddCapability_WithConfiguration() public { - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_capabilityWithConfigurationContract; - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_capabilityWithConfigurationContract.labelledName, s_capabilityWithConfigurationContract.version ); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit CapabilityConfigured(hashedCapabilityId); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); + CapabilitiesRegistry.Capability memory storedCapability = s_CapabilitiesRegistry.getCapability(hashedCapabilityId); assertEq(storedCapability.labelledName, s_capabilityWithConfigurationContract.labelledName); assertEq(storedCapability.version, s_capabilityWithConfigurationContract.version); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddDONTest.t.sol similarity index 50% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddDONTest.t.sol index 5335c0e2868..df68f8d173a 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddDONTest.t.sol @@ -3,26 +3,26 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; import {ICapabilityConfiguration} from "../interfaces/ICapabilityConfiguration.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_AddDONTest is BaseTest { +contract CapabilitiesRegistry_AddDONTest is BaseTest { event ConfigSet(uint32 donId, uint32 configCount); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](3); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -32,21 +32,21 @@ contract CapabilityRegistry_AddDONTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: nodeTwoCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeParams({ + nodes[2] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, hashedCapabilityIds: capabilityIds }); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); changePrank(ADMIN); } @@ -55,65 +55,65 @@ contract CapabilityRegistry_AddDONTest is BaseTest { changePrank(STRANGER); vm.expectRevert("Only callable by owner"); bytes32[] memory nodes = new bytes32[](1); - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_NodeDoesNotSupportCapability() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_capabilityWithConfigurationContractId, config: CONFIG_CAPABILITY_CONFIG }); vm.expectRevert( abi.encodeWithSelector( - CapabilityRegistry.NodeDoesNotSupportCapability.selector, + CapabilitiesRegistry.NodeDoesNotSupportCapability.selector, P2P_ID_TWO, s_capabilityWithConfigurationContractId ) ); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_CapabilityDoesNotExist() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_nonExistentHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) ); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_FaultToleranceIsZero() public { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidFaultTolerance.selector, 0, 1)); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, 0); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidFaultTolerance.selector, 0, 1)); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, 0); } function test_RevertWhen_DuplicateCapabilityAdded() public { @@ -121,42 +121,42 @@ contract CapabilityRegistry_AddDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](2); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](2); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - capabilityConfigs[1] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[1] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.DuplicateDONCapability.selector, 1, s_basicHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.DuplicateDONCapability.selector, 1, s_basicHashedCapabilityId) ); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DeprecatedCapabilityAdded() public { bytes32 capabilityId = s_basicHashedCapabilityId; bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = capabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: capabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.CapabilityIsDeprecated.selector, capabilityId)); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.CapabilityIsDeprecated.selector, capabilityId)); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DuplicateNodeAdded() public { @@ -164,14 +164,14 @@ contract CapabilityRegistry_AddDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.DuplicateDONNode.selector, 1, P2P_ID)); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.DuplicateDONNode.selector, 1, P2P_ID)); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() public { @@ -179,17 +179,17 @@ contract CapabilityRegistry_AddDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 2, P2P_ID)); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodePartOfWorkflowDON.selector, 2, P2P_ID)); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_AddDON() public { @@ -197,18 +197,18 @@ contract CapabilityRegistry_AddDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_THREE; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](2); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](2); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - capabilityConfigs[1] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[1] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_capabilityWithConfigurationContractId, config: CONFIG_CAPABILITY_CONFIG }); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit ConfigSet(DON_ID, 1); vm.expectCall( address(s_capabilityConfigurationContract), @@ -221,23 +221,25 @@ contract CapabilityRegistry_AddDONTest is BaseTest { ), 1 ); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); - CapabilityRegistry.DONInfo memory donInfo = s_capabilityRegistry.getDON(DON_ID); + CapabilitiesRegistry.DONInfo memory donInfo = s_CapabilitiesRegistry.getDON(DON_ID); assertEq(donInfo.id, DON_ID); assertEq(donInfo.configCount, 1); assertEq(donInfo.isPublic, true); assertEq(donInfo.capabilityConfigurations.length, capabilityConfigs.length); assertEq(donInfo.capabilityConfigurations[0].capabilityId, s_basicHashedCapabilityId); - (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + (bytes memory CapabilitiesRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_CapabilitiesRegistry .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); - assertEq(capabilityRegistryDONConfig, BASIC_CAPABILITY_CONFIG); + assertEq(CapabilitiesRegistryDONConfig, BASIC_CAPABILITY_CONFIG); assertEq(capabilityConfigContractConfig, bytes("")); - (bytes memory capabilityRegistryDONConfigTwo, bytes memory capabilityConfigContractConfigTwo) = s_capabilityRegistry - .getCapabilityConfigs(DON_ID, s_capabilityWithConfigurationContractId); - assertEq(capabilityRegistryDONConfigTwo, CONFIG_CAPABILITY_CONFIG); + ( + bytes memory CapabilitiesRegistryDONConfigTwo, + bytes memory capabilityConfigContractConfigTwo + ) = s_CapabilitiesRegistry.getCapabilityConfigs(DON_ID, s_capabilityWithConfigurationContractId); + assertEq(CapabilitiesRegistryDONConfigTwo, CONFIG_CAPABILITY_CONFIG); assertEq(capabilityConfigContractConfigTwo, CONFIG_CAPABILITY_CONFIG); assertEq(donInfo.nodeP2PIds.length, nodes.length); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodeOperatorsTest.t.sol similarity index 56% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodeOperatorsTest.t.sol index 6fa799bd378..4b75739f05f 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodeOperatorsTest.t.sol @@ -2,41 +2,41 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_AddNodeOperatorsTest is BaseTest { +contract CapabilitiesRegistry_AddNodeOperatorsTest is BaseTest { event NodeOperatorAdded(uint32 indexed nodeOperatorId, address indexed admin, string name); function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); } function test_RevertWhen_NodeOperatorAdminAddressZero() public { changePrank(ADMIN); - CapabilityRegistry.NodeOperator[] memory nodeOperators = _getNodeOperators(); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = _getNodeOperators(); nodeOperators[0].admin = address(0); - vm.expectRevert(CapabilityRegistry.InvalidNodeOperatorAdmin.selector); - s_capabilityRegistry.addNodeOperators(nodeOperators); + vm.expectRevert(CapabilitiesRegistry.InvalidNodeOperatorAdmin.selector); + s_CapabilitiesRegistry.addNodeOperators(nodeOperators); } function test_AddNodeOperators() public { changePrank(ADMIN); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit NodeOperatorAdded(TEST_NODE_OPERATOR_ONE_ID, NODE_OPERATOR_ONE_ADMIN, NODE_OPERATOR_ONE_NAME); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit NodeOperatorAdded(TEST_NODE_OPERATOR_TWO_ID, NODE_OPERATOR_TWO_ADMIN, NODE_OPERATOR_TWO_NAME); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); - CapabilityRegistry.NodeOperator memory nodeOperatorOne = s_capabilityRegistry.getNodeOperator( + CapabilitiesRegistry.NodeOperator memory nodeOperatorOne = s_CapabilitiesRegistry.getNodeOperator( TEST_NODE_OPERATOR_ONE_ID ); assertEq(nodeOperatorOne.admin, NODE_OPERATOR_ONE_ADMIN); assertEq(nodeOperatorOne.name, NODE_OPERATOR_ONE_NAME); - CapabilityRegistry.NodeOperator memory nodeOperatorTwo = s_capabilityRegistry.getNodeOperator( + CapabilitiesRegistry.NodeOperator memory nodeOperatorTwo = s_CapabilitiesRegistry.getNodeOperator( TEST_NODE_OPERATOR_TWO_ID ); assertEq(nodeOperatorTwo.admin, NODE_OPERATOR_TWO_ADMIN); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodesTest.t.sol similarity index 61% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodesTest.t.sol index 9399e257e32..3b570e2a6ea 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodesTest.t.sol @@ -2,50 +2,50 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_AddNodesTest is BaseTest { +contract CapabilitiesRegistry_AddNodesTest is BaseTest { event NodeAdded(bytes32 p2pId, uint32 indexed nodeOperatorId, bytes32 signer); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; changePrank(ADMIN); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { changePrank(STRANGER); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.AccessForbidden.selector, STRANGER)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_AddingNodeWithInvalidNodeOperator() public { changePrank(ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; uint32 invalidNodeOperatorId = 10000; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: invalidNodeOperatorId, // Invalid NOP p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -53,151 +53,151 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) + abi.encodeWithSelector(CapabilitiesRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) ); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_SignerAddressEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(""), hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeSigner.selector)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeSigner.selector)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_SignerAddressNotUnique() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); changePrank(NODE_OPERATOR_TWO_ADMIN); // Try adding another node with the same signer address - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeSigner.selector)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeSigner.selector)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_AddingDuplicateP2PId() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeAlreadyExists.selector, P2P_ID)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeAlreadyExists.selector, P2P_ID)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_P2PIDEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: bytes32(""), signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeP2PId.selector, bytes32(""))); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeP2PId.selector, bytes32(""))); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_AddingNodeWithoutCapabilities() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](0); - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_AddingNodeWithInvalidCapability() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_nonExistentHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_AddsNodeParams() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeAdded(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NODE_OPERATOR_ONE_SIGNER_ADDRESS); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); @@ -209,23 +209,23 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_OwnerCanAddNodes() public { changePrank(ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeAdded(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NODE_OPERATOR_ONE_SIGNER_ADDRESS); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_DeprecateCapabilitiesTest.t.sol similarity index 54% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_DeprecateCapabilitiesTest.t.sol index 74c66f8f580..501146a7b78 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_DeprecateCapabilitiesTest.t.sol @@ -2,23 +2,23 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { +contract CapabilitiesRegistry_DeprecateCapabilitiesTest is BaseTest { event CapabilityDeprecated(bytes32 indexed hashedCapabilityId); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); @@ -27,7 +27,7 @@ contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { deprecatedCapabilities[0] = hashedCapabilityId; vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_RevertWhen_CapabilityDoesNotExist() public { @@ -35,13 +35,13 @@ contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { deprecatedCapabilities[0] = s_nonExistentHashedCapabilityId; vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) ); - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_RevertWhen_CapabilityIsDeprecated() public { - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); @@ -49,25 +49,25 @@ contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = hashedCapabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.CapabilityIsDeprecated.selector, hashedCapabilityId)); - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.CapabilityIsDeprecated.selector, hashedCapabilityId)); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_DeprecatesCapability() public { - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = hashedCapabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); - assertEq(s_capabilityRegistry.isCapabilityDeprecated(hashedCapabilityId), true); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); + assertEq(s_CapabilitiesRegistry.isCapabilityDeprecated(hashedCapabilityId), true); } function test_EmitsEvent() public { - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); @@ -75,8 +75,8 @@ contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = hashedCapabilityId; - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit CapabilityDeprecated(hashedCapabilityId); - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol similarity index 65% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol index e2dff281252..95551c19cdb 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol @@ -2,20 +2,22 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetCapabilitiesTest is BaseTest { +contract CapabilitiesRegistry_GetCapabilitiesTest is BaseTest { function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_ReturnsCapabilities() public view { - (bytes32[] memory hashedCapabilityIds, CapabilityRegistry.Capability[] memory capabilities) = s_capabilityRegistry - .getCapabilities(); + ( + bytes32[] memory hashedCapabilityIds, + CapabilitiesRegistry.Capability[] memory capabilities + ) = s_CapabilitiesRegistry.getCapabilities(); assertEq(hashedCapabilityIds.length, 2); assertEq(hashedCapabilityIds[0], keccak256(abi.encode(capabilities[0].labelledName, capabilities[0].version))); @@ -25,31 +27,33 @@ contract CapabilityRegistry_GetCapabilitiesTest is BaseTest { assertEq(capabilities[0].labelledName, "data-streams-reports"); assertEq(capabilities[0].version, "1.0.0"); - assertEq(uint256(capabilities[0].responseType), uint256(CapabilityRegistry.CapabilityResponseType.REPORT)); - assertEq(uint256(capabilities[0].capabilityType), uint256(CapabilityRegistry.CapabilityType.TRIGGER)); + assertEq(uint256(capabilities[0].responseType), uint256(CapabilitiesRegistry.CapabilityResponseType.REPORT)); + assertEq(uint256(capabilities[0].capabilityType), uint256(CapabilitiesRegistry.CapabilityType.TRIGGER)); assertEq(capabilities[0].configurationContract, address(0)); assertEq(capabilities[1].labelledName, "read-ethereum-mainnet-gas-price"); assertEq(capabilities[1].version, "1.0.2"); assertEq( uint256(capabilities[1].responseType), - uint256(CapabilityRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) + uint256(CapabilitiesRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) ); - assertEq(uint256(capabilities[1].capabilityType), uint256(CapabilityRegistry.CapabilityType.ACTION)); + assertEq(uint256(capabilities[1].capabilityType), uint256(CapabilitiesRegistry.CapabilityType.ACTION)); assertEq(capabilities[1].configurationContract, address(s_capabilityConfigurationContract)); } function test_ExcludesDeprecatedCapabilities() public { - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = hashedCapabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); - (bytes32[] memory hashedCapabilityIds, CapabilityRegistry.Capability[] memory capabilities) = s_capabilityRegistry - .getCapabilities(); + ( + bytes32[] memory hashedCapabilityIds, + CapabilitiesRegistry.Capability[] memory capabilities + ) = s_CapabilitiesRegistry.getCapabilities(); assertEq(hashedCapabilityIds.length, 1); assertEq(hashedCapabilityIds[0], keccak256(abi.encode(capabilities[0].labelledName, capabilities[0].version))); @@ -60,7 +64,7 @@ contract CapabilityRegistry_GetCapabilitiesTest is BaseTest { assertEq(capabilities[0].version, "1.0.2"); assertEq( uint256(capabilities[0].responseType), - uint256(CapabilityRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) + uint256(CapabilitiesRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) ); assertEq(capabilities[0].configurationContract, address(s_capabilityConfigurationContract)); } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetDONsTest.t.sol similarity index 69% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetDONsTest.t.sol index d56dce6c271..15da8de4121 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetDONsTest.t.sol @@ -3,29 +3,29 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetDONsTest is BaseTest { +contract CapabilitiesRegistry_GetDONsTest is BaseTest { event ConfigSet(uint32 donId, uint32 configCount); - CapabilityRegistry.CapabilityConfiguration[] private s_capabilityConfigs; + CapabilitiesRegistry.CapabilityConfiguration[] private s_capabilityConfigs; function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](2); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -35,7 +35,7 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -43,10 +43,10 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { }); changePrank(NODE_OPERATOR_ONE_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); s_capabilityConfigs.push( - CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }) @@ -57,12 +57,12 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { nodeIds[1] = P2P_ID_TWO; changePrank(ADMIN); - s_capabilityRegistry.addDON(nodeIds, s_capabilityConfigs, true, true, 1); - s_capabilityRegistry.addDON(nodeIds, s_capabilityConfigs, false, false, 1); + s_CapabilitiesRegistry.addDON(nodeIds, s_capabilityConfigs, true, true, 1); + s_CapabilitiesRegistry.addDON(nodeIds, s_capabilityConfigs, false, false, 1); } function test_CorrectlyFetchesDONs() public view { - CapabilityRegistry.DONInfo[] memory dons = s_capabilityRegistry.getDONs(); + CapabilitiesRegistry.DONInfo[] memory dons = s_CapabilitiesRegistry.getDONs(); assertEq(dons.length, 2); assertEq(dons[0].id, DON_ID); assertEq(dons[0].configCount, 1); @@ -82,9 +82,9 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { function test_DoesNotIncludeRemovedDONs() public { uint32[] memory removedDONIDs = new uint32[](1); removedDONIDs[0] = DON_ID; - s_capabilityRegistry.removeDONs(removedDONIDs); + s_CapabilitiesRegistry.removeDONs(removedDONIDs); - CapabilityRegistry.DONInfo[] memory dons = s_capabilityRegistry.getDONs(); + CapabilitiesRegistry.DONInfo[] memory dons = s_CapabilitiesRegistry.getDONs(); assertEq(dons.length, 1); assertEq(dons[0].id, DON_ID_TWO); assertEq(dons[0].configCount, 1); diff --git a/contracts/src/v0.8/keystone/test/CapabiityRegistry_GetHashedCapabilityIdTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetHashedCapabilityIdTest.t.sol similarity index 61% rename from contracts/src/v0.8/keystone/test/CapabiityRegistry_GetHashedCapabilityIdTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetHashedCapabilityIdTest.t.sol index 435138c80e9..b9a6e6dc97a 100644 --- a/contracts/src/v0.8/keystone/test/CapabiityRegistry_GetHashedCapabilityIdTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetHashedCapabilityIdTest.t.sol @@ -4,9 +4,9 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityConfigurationContract} from "./mocks/CapabilityConfigurationContract.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetHashedCapabilityTest is BaseTest { +contract CapabilitiesRegistry_GetHashedCapabilityTest is BaseTest { string constant CAPABILITY_LABELLED_NAME = "ccip1"; string constant CAPABILITY_VERSION = "1.0.0"; @@ -14,15 +14,15 @@ contract CapabilityRegistry_GetHashedCapabilityTest is BaseTest { bytes32 expectedHashedCapabilityId = keccak256(abi.encode(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION)); assertEq( - s_capabilityRegistry.getHashedCapabilityId(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION), + s_CapabilitiesRegistry.getHashedCapabilityId(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION), expectedHashedCapabilityId ); } function test_DoesNotCauseIncorrectClashes() public view { assertNotEq( - s_capabilityRegistry.getHashedCapabilityId(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION), - s_capabilityRegistry.getHashedCapabilityId("ccip", "11.0.0") + s_CapabilitiesRegistry.getHashedCapabilityId(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION), + s_CapabilitiesRegistry.getHashedCapabilityId("ccip", "11.0.0") ); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodeOperatorsTest.t.sol similarity index 70% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodeOperatorsTest.t.sol index f1ce3d79ab3..36ef201a998 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodeOperatorsTest.t.sol @@ -2,17 +2,17 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetNodeOperatorsTest is BaseTest { +contract CapabilitiesRegistry_GetNodeOperatorsTest is BaseTest { function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); } function test_CorrectlyFetchesNodeOperators() public view { - CapabilityRegistry.NodeOperator[] memory nodeOperators = s_capabilityRegistry.getNodeOperators(); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = s_CapabilitiesRegistry.getNodeOperators(); assertEq(nodeOperators.length, 3); assertEq(nodeOperators[0].admin, NODE_OPERATOR_ONE_ADMIN); @@ -29,9 +29,9 @@ contract CapabilityRegistry_GetNodeOperatorsTest is BaseTest { changePrank(ADMIN); uint32[] memory nodeOperatorsToRemove = new uint32[](1); nodeOperatorsToRemove[0] = 2; - s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); + s_CapabilitiesRegistry.removeNodeOperators(nodeOperatorsToRemove); - CapabilityRegistry.NodeOperator[] memory nodeOperators = s_capabilityRegistry.getNodeOperators(); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = s_CapabilitiesRegistry.getNodeOperators(); assertEq(nodeOperators.length, 2); assertEq(nodeOperators[0].admin, NODE_OPERATOR_ONE_ADMIN); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodesTest.t.sol similarity index 75% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodesTest.t.sol index e7a498e08c0..901e7b92728 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodesTest.t.sol @@ -2,33 +2,33 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetNodesTest is BaseTest { +contract CapabilitiesRegistry_GetNodesTest is BaseTest { function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](2); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -37,11 +37,11 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { changePrank(NODE_OPERATOR_ONE_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); } function test_CorrectlyFetchesNodes() public view { - CapabilityRegistry.NodeInfo[] memory nodes = s_capabilityRegistry.getNodes(); + CapabilitiesRegistry.NodeInfo[] memory nodes = s_CapabilitiesRegistry.getNodes(); assertEq(nodes.length, 2); assertEq(nodes[0].nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); @@ -65,9 +65,9 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { changePrank(ADMIN); bytes32[] memory nodesToRemove = new bytes32[](1); nodesToRemove[0] = P2P_ID_TWO; - s_capabilityRegistry.removeNodes(nodesToRemove); + s_CapabilitiesRegistry.removeNodes(nodesToRemove); - CapabilityRegistry.NodeInfo[] memory nodes = s_capabilityRegistry.getNodes(); + CapabilitiesRegistry.NodeInfo[] memory nodes = s_CapabilitiesRegistry.getNodes(); assertEq(nodes.length, 1); assertEq(nodes[0].nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveDONsTest.t.sol similarity index 58% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveDONsTest.t.sol index fde382db6f3..012ff102895 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveDONsTest.t.sol @@ -3,27 +3,27 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_RemoveDONsTest is BaseTest { +contract CapabilitiesRegistry_RemoveDONsTest is BaseTest { event ConfigSet(uint32 donId, uint32 configCount); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](2); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -33,7 +33,7 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -41,11 +41,11 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { }); changePrank(NODE_OPERATOR_ONE_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); @@ -55,7 +55,7 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { nodeIds[1] = P2P_ID_TWO; changePrank(ADMIN); - s_capabilityRegistry.addDON(nodeIds, capabilityConfigs, true, true, 1); + s_CapabilitiesRegistry.addDON(nodeIds, capabilityConfigs, true, true, 1); } function test_RevertWhen_CalledByNonAdmin() public { @@ -63,34 +63,34 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { donIDs[0] = 1; changePrank(STRANGER); vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.removeDONs(donIDs); + s_CapabilitiesRegistry.removeDONs(donIDs); } function test_RevertWhen_DONDoesNotExist() public { uint32 invalidDONId = 10; uint32[] memory donIDs = new uint32[](1); donIDs[0] = invalidDONId; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.DONDoesNotExist.selector, invalidDONId)); - s_capabilityRegistry.removeDONs(donIDs); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.DONDoesNotExist.selector, invalidDONId)); + s_CapabilitiesRegistry.removeDONs(donIDs); } function test_RemovesDON() public { uint32[] memory donIDs = new uint32[](1); donIDs[0] = DON_ID; - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit ConfigSet(DON_ID, 0); - s_capabilityRegistry.removeDONs(donIDs); + s_CapabilitiesRegistry.removeDONs(donIDs); - CapabilityRegistry.DONInfo memory donInfo = s_capabilityRegistry.getDON(DON_ID); + CapabilitiesRegistry.DONInfo memory donInfo = s_CapabilitiesRegistry.getDON(DON_ID); assertEq(donInfo.id, 0); assertEq(donInfo.configCount, 0); assertEq(donInfo.isPublic, false); assertEq(donInfo.capabilityConfigurations.length, 0); - (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + (bytes memory CapabilitiesRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_CapabilitiesRegistry .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); - assertEq(capabilityRegistryDONConfig, bytes("")); + assertEq(CapabilitiesRegistryDONConfig, bytes("")); assertEq(capabilityConfigContractConfig, bytes("")); assertEq(donInfo.nodeP2PIds.length, 0); } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodeOperatorsTest.t.sol similarity index 61% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodeOperatorsTest.t.sol index d7aef824593..bce4e49803b 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodeOperatorsTest.t.sol @@ -2,15 +2,15 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_RemoveNodeOperatorsTest is BaseTest { +contract CapabilitiesRegistry_RemoveNodeOperatorsTest is BaseTest { event NodeOperatorRemoved(uint32 indexed nodeOperatorId); function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); } function test_RevertWhen_CalledByNonOwner() public { @@ -18,28 +18,28 @@ contract CapabilityRegistry_RemoveNodeOperatorsTest is BaseTest { vm.expectRevert("Only callable by owner"); uint32[] memory nodeOperatorsToRemove = new uint32[](2); nodeOperatorsToRemove[1] = 1; - s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); + s_CapabilitiesRegistry.removeNodeOperators(nodeOperatorsToRemove); } function test_RemovesNodeOperator() public { changePrank(ADMIN); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit NodeOperatorRemoved(TEST_NODE_OPERATOR_ONE_ID); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit NodeOperatorRemoved(TEST_NODE_OPERATOR_TWO_ID); uint32[] memory nodeOperatorsToRemove = new uint32[](2); nodeOperatorsToRemove[0] = TEST_NODE_OPERATOR_ONE_ID; nodeOperatorsToRemove[1] = TEST_NODE_OPERATOR_TWO_ID; - s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); + s_CapabilitiesRegistry.removeNodeOperators(nodeOperatorsToRemove); - CapabilityRegistry.NodeOperator memory nodeOperatorOne = s_capabilityRegistry.getNodeOperator( + CapabilitiesRegistry.NodeOperator memory nodeOperatorOne = s_CapabilitiesRegistry.getNodeOperator( TEST_NODE_OPERATOR_ONE_ID ); assertEq(nodeOperatorOne.admin, address(0)); assertEq(nodeOperatorOne.name, ""); - CapabilityRegistry.NodeOperator memory nodeOperatorTwo = s_capabilityRegistry.getNodeOperator( + CapabilitiesRegistry.NodeOperator memory nodeOperatorTwo = s_CapabilitiesRegistry.getNodeOperator( TEST_NODE_OPERATOR_TWO_ID ); assertEq(nodeOperatorTwo.admin, address(0)); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodesTest.t.sol similarity index 58% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodesTest.t.sol index 14aa5922593..d607f42192c 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodesTest.t.sol @@ -2,41 +2,41 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_RemoveNodesTest is BaseTest { +contract CapabilitiesRegistry_RemoveNodesTest is BaseTest { event NodeRemoved(bytes32 p2pId); function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](3); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeParams({ + nodes[2] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, @@ -45,7 +45,7 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { changePrank(ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { @@ -53,8 +53,8 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); - s_capabilityRegistry.removeNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.AccessForbidden.selector, STRANGER)); + s_CapabilitiesRegistry.removeNodes(nodes); } function test_RevertWhen_NodeDoesNotExist() public { @@ -62,8 +62,8 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = INVALID_P2P_ID; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeDoesNotExist.selector, INVALID_P2P_ID)); - s_capabilityRegistry.removeNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeDoesNotExist.selector, INVALID_P2P_ID)); + s_CapabilitiesRegistry.removeNodes(nodes); } function test_RevertWhen_P2PIDEmpty() public { @@ -71,8 +71,8 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = bytes32(""); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeDoesNotExist.selector, bytes32(""))); - s_capabilityRegistry.removeNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeDoesNotExist.selector, bytes32(""))); + s_CapabilitiesRegistry.removeNodes(nodes); } function test_RevertWhen_NodePartOfCapabilitiesDON() public { @@ -81,17 +81,17 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, false, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, false, F_VALUE); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfCapabilitiesDON.selector, 1, P2P_ID)); - s_capabilityRegistry.removeNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodePartOfCapabilitiesDON.selector, 1, P2P_ID)); + s_CapabilitiesRegistry.removeNodes(nodes); } function test_CanRemoveWhenDONDeleted() public { @@ -101,30 +101,30 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); // Add DON - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); // Try remove nodes bytes32[] memory removedNodes = new bytes32[](1); removedNodes[0] = P2P_ID; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID)); - s_capabilityRegistry.removeNodes(removedNodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID)); + s_CapabilitiesRegistry.removeNodes(removedNodes); // Remove DON uint32[] memory donIds = new uint32[](1); donIds[0] = DON_ID; - s_capabilityRegistry.removeDONs(donIds); + s_CapabilitiesRegistry.removeDONs(donIds); // Remove node - s_capabilityRegistry.removeNodes(removedNodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + s_CapabilitiesRegistry.removeNodes(removedNodes); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); @@ -140,31 +140,31 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { nodes[1] = P2P_ID_TWO; nodes[2] = P2P_ID_THREE; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); // Add DON - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); // Try remove nodes bytes32[] memory removedNodes = new bytes32[](1); removedNodes[0] = P2P_ID_TWO; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID_TWO)); - s_capabilityRegistry.removeNodes(removedNodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID_TWO)); + s_CapabilitiesRegistry.removeNodes(removedNodes); // Update nodes in DON bytes32[] memory updatedNodes = new bytes32[](2); updatedNodes[0] = P2P_ID; updatedNodes[1] = P2P_ID_THREE; - s_capabilityRegistry.updateDON(DON_ID, updatedNodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, updatedNodes, capabilityConfigs, true, true, F_VALUE); // Remove node - s_capabilityRegistry.removeNodes(removedNodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID_TWO); + s_CapabilitiesRegistry.removeNodes(removedNodes); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID_TWO); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); @@ -178,11 +178,11 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeRemoved(P2P_ID); - s_capabilityRegistry.removeNodes(nodes); + s_CapabilitiesRegistry.removeNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); @@ -196,23 +196,23 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - s_capabilityRegistry.removeNodes(nodes); + s_CapabilitiesRegistry.removeNodes(nodes); - CapabilityRegistry.NodeParams[] memory nodeParams = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodeParams = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodeParams[0] = CapabilityRegistry.NodeParams({ + nodeParams[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.addNodes(nodeParams); + s_CapabilitiesRegistry.addNodes(nodeParams); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); @@ -227,11 +227,11 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeRemoved(P2P_ID); - s_capabilityRegistry.removeNodes(nodes); + s_CapabilitiesRegistry.removeNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_TypeAndVersionTest.t.sol similarity index 51% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_TypeAndVersionTest.t.sol index 629b4a17a5a..fb2b3f82b78 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_TypeAndVersionTest.t.sol @@ -3,8 +3,8 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -contract CapabilityRegistry_TypeAndVersionTest is BaseTest { +contract CapabilitiesRegistry_TypeAndVersionTest is BaseTest { function test_TypeAndVersion() public view { - assertEq(s_capabilityRegistry.typeAndVersion(), "CapabilityRegistry 1.0.0"); + assertEq(s_CapabilitiesRegistry.typeAndVersion(), "CapabilitiesRegistry 1.0.0"); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateDONTest.t.sol similarity index 51% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateDONTest.t.sol index 96f6a32bbc7..bf9201a8296 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateDONTest.t.sol @@ -3,27 +3,27 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; import {ICapabilityConfiguration} from "../interfaces/ICapabilityConfiguration.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_UpdateDONTest is BaseTest { +contract CapabilitiesRegistry_UpdateDONTest is BaseTest { event ConfigSet(uint32 donId, uint32 configCount); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](3); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -33,67 +33,67 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: nodeTwoCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeParams({ + nodes[2] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, hashedCapabilityIds: capabilityIds }); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); bytes32[] memory donNodes = new bytes32[](2); donNodes[0] = P2P_ID; donNodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(donNodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(donNodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); vm.expectRevert("Only callable by owner"); bytes32[] memory nodes = new bytes32[](1); - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_NodeDoesNotSupportCapability() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_capabilityWithConfigurationContractId, config: CONFIG_CAPABILITY_CONFIG }); vm.expectRevert( abi.encodeWithSelector( - CapabilityRegistry.NodeDoesNotSupportCapability.selector, + CapabilitiesRegistry.NodeDoesNotSupportCapability.selector, P2P_ID_TWO, s_capabilityWithConfigurationContractId ) ); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DONDoesNotExist() public { @@ -101,30 +101,30 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.DONDoesNotExist.selector, nonExistentDONId)); - s_capabilityRegistry.updateDON(nonExistentDONId, nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.DONDoesNotExist.selector, nonExistentDONId)); + s_CapabilitiesRegistry.updateDON(nonExistentDONId, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_CapabilityDoesNotExist() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_nonExistentHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) ); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DuplicateCapabilityAdded() public { @@ -132,42 +132,42 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](2); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](2); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - capabilityConfigs[1] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[1] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.DuplicateDONCapability.selector, 1, s_basicHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.DuplicateDONCapability.selector, 1, s_basicHashedCapabilityId) ); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DeprecatedCapabilityAdded() public { bytes32 capabilityId = s_basicHashedCapabilityId; bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = capabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: capabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.CapabilityIsDeprecated.selector, capabilityId)); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.CapabilityIsDeprecated.selector, capabilityId)); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DuplicateNodeAdded() public { @@ -175,14 +175,14 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.DuplicateDONNode.selector, 1, P2P_ID)); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.DuplicateDONNode.selector, 1, P2P_ID)); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_UpdatesDON() public { @@ -190,23 +190,23 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_THREE; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](2); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](2); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - capabilityConfigs[1] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[1] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_capabilityWithConfigurationContractId, config: CONFIG_CAPABILITY_CONFIG }); - CapabilityRegistry.DONInfo memory oldDONInfo = s_capabilityRegistry.getDON(DON_ID); + CapabilitiesRegistry.DONInfo memory oldDONInfo = s_CapabilitiesRegistry.getDON(DON_ID); bool expectedDONIsPublic = false; uint32 expectedConfigCount = oldDONInfo.configCount + 1; - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit ConfigSet(DON_ID, expectedConfigCount); vm.expectCall( address(s_capabilityConfigurationContract), @@ -219,18 +219,18 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { ), 1 ); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, expectedDONIsPublic, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, expectedDONIsPublic, true, F_VALUE); - CapabilityRegistry.DONInfo memory donInfo = s_capabilityRegistry.getDON(DON_ID); + CapabilitiesRegistry.DONInfo memory donInfo = s_CapabilitiesRegistry.getDON(DON_ID); assertEq(donInfo.id, DON_ID); assertEq(donInfo.configCount, expectedConfigCount); assertEq(donInfo.isPublic, false); assertEq(donInfo.capabilityConfigurations.length, capabilityConfigs.length); assertEq(donInfo.capabilityConfigurations[0].capabilityId, s_basicHashedCapabilityId); - (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + (bytes memory CapabilitiesRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_CapabilitiesRegistry .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); - assertEq(capabilityRegistryDONConfig, BASIC_CAPABILITY_CONFIG); + assertEq(CapabilitiesRegistryDONConfig, BASIC_CAPABILITY_CONFIG); assertEq(capabilityConfigContractConfig, bytes("")); assertEq(donInfo.nodeP2PIds.length, nodes.length); diff --git a/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodeOperatorsTest.t.sol new file mode 100644 index 00000000000..f6d74a3159e --- /dev/null +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodeOperatorsTest.t.sol @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {BaseTest} from "./BaseTest.t.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; + +contract CapabilitiesRegistry_UpdateNodeOperatorTest is BaseTest { + event NodeOperatorUpdated(uint32 indexed nodeOperatorId, address indexed admin, string name); + + uint32 private constant TEST_NODE_OPERATOR_ID = 1; + address private constant NEW_NODE_OPERATOR_ADMIN = address(3); + string private constant NEW_NODE_OPERATOR_NAME = "new-node-operator"; + + function setUp() public override { + BaseTest.setUp(); + changePrank(ADMIN); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + } + + function test_RevertWhen_CalledByNonAdminAndNonOwner() public { + changePrank(STRANGER); + + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NEW_NODE_OPERATOR_ADMIN, + name: NEW_NODE_OPERATOR_NAME + }); + + uint32[] memory nodeOperatorIds = new uint32[](1); + nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; + + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.AccessForbidden.selector, STRANGER)); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + } + + function test_RevertWhen_NodeOperatorAdminIsZeroAddress() public { + changePrank(ADMIN); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({admin: address(0), name: NEW_NODE_OPERATOR_NAME}); + + uint32[] memory nodeOperatorIds = new uint32[](1); + nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; + + vm.expectRevert(CapabilitiesRegistry.InvalidNodeOperatorAdmin.selector); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + } + + function test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() public { + changePrank(ADMIN); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NEW_NODE_OPERATOR_ADMIN, + name: NEW_NODE_OPERATOR_NAME + }); + + uint32 invalidNodeOperatorId = 10000; + uint32[] memory nodeOperatorIds = new uint32[](2); + nodeOperatorIds[0] = invalidNodeOperatorId; + vm.expectRevert( + abi.encodeWithSelector(CapabilitiesRegistry.LengthMismatch.selector, nodeOperatorIds.length, nodeOperators.length) + ); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + } + + function test_RevertWhen_NodeOperatorDoesNotExist() public { + changePrank(ADMIN); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NEW_NODE_OPERATOR_ADMIN, + name: NEW_NODE_OPERATOR_NAME + }); + + uint32 invalidNodeOperatorId = 10000; + uint32[] memory nodeOperatorIds = new uint32[](1); + nodeOperatorIds[0] = invalidNodeOperatorId; + vm.expectRevert( + abi.encodeWithSelector(CapabilitiesRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) + ); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + } + + function test_UpdatesNodeOperator() public { + changePrank(ADMIN); + + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NEW_NODE_OPERATOR_ADMIN, + name: NEW_NODE_OPERATOR_NAME + }); + + uint32[] memory nodeOperatorIds = new uint32[](1); + nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; + + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); + emit NodeOperatorUpdated(TEST_NODE_OPERATOR_ID, NEW_NODE_OPERATOR_ADMIN, NEW_NODE_OPERATOR_NAME); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + + CapabilitiesRegistry.NodeOperator memory nodeOperator = s_CapabilitiesRegistry.getNodeOperator( + TEST_NODE_OPERATOR_ID + ); + assertEq(nodeOperator.admin, NEW_NODE_OPERATOR_ADMIN); + assertEq(nodeOperator.name, NEW_NODE_OPERATOR_NAME); + } +} diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol similarity index 61% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol index 2f3f18d39a8..cc180ec54e5 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol @@ -2,27 +2,27 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_UpdateNodesTest is BaseTest { +contract CapabilitiesRegistry_UpdateNodesTest is BaseTest { event NodeUpdated(bytes32 p2pId, uint32 indexed nodeOperatorId, bytes32 signer); function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -30,9 +30,9 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { }); changePrank(NODE_OPERATOR_ONE_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -40,184 +40,184 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { }); changePrank(NODE_OPERATOR_TWO_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { changePrank(STRANGER); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.AccessForbidden.selector, STRANGER)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_NodeDoesNotExist() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: INVALID_P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeDoesNotExist.selector, INVALID_P2P_ID)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeDoesNotExist.selector, INVALID_P2P_ID)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_P2PIDEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: bytes32(""), signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeDoesNotExist.selector, bytes32(""))); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeDoesNotExist.selector, bytes32(""))); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_SignerAddressEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(""), hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeSigner.selector)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeSigner.selector)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(CapabilityRegistry.InvalidNodeSigner.selector); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(CapabilitiesRegistry.InvalidNodeSigner.selector); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_UpdatingNodeWithoutCapabilities() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](0); - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_AddingNodeWithInvalidCapability() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_nonExistentHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; // Set node one's signer to another address - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(abi.encodePacked(address(6666))), hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.updateNodes(nodes); + s_CapabilitiesRegistry.updateNodes(nodes); // Set node two's signer to node one's signer changePrank(NODE_OPERATOR_TWO_ADMIN); - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.updateNodes(nodes); + s_CapabilitiesRegistry.updateNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID_TWO); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID_TWO); assertEq(node.signer, NODE_OPERATOR_ONE_SIGNER_ADDRESS); } function test_UpdatesNodeParams() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NEW_NODE_SIGNER, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeUpdated(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NEW_NODE_SIGNER); - s_capabilityRegistry.updateNodes(nodes); + s_CapabilitiesRegistry.updateNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.signer, NEW_NODE_SIGNER); @@ -229,22 +229,22 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_OwnerCanUpdateNodes() public { changePrank(ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NEW_NODE_SIGNER, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeUpdated(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NEW_NODE_SIGNER); - s_capabilityRegistry.updateNodes(nodes); + s_CapabilitiesRegistry.updateNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.signer, NEW_NODE_SIGNER); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol deleted file mode 100644 index 77d180a784a..00000000000 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; - -contract CapabilityRegistry_UpdateNodeOperatorTest is BaseTest { - event NodeOperatorUpdated(uint32 indexed nodeOperatorId, address indexed admin, string name); - - uint32 private constant TEST_NODE_OPERATOR_ID = 1; - address private constant NEW_NODE_OPERATOR_ADMIN = address(3); - string private constant NEW_NODE_OPERATOR_NAME = "new-node-operator"; - - function setUp() public override { - BaseTest.setUp(); - changePrank(ADMIN); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - } - - function test_RevertWhen_CalledByNonAdminAndNonOwner() public { - changePrank(STRANGER); - - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - - uint32[] memory nodeOperatorIds = new uint32[](1); - nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; - - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - } - - function test_RevertWhen_NodeOperatorAdminIsZeroAddress() public { - changePrank(ADMIN); - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: address(0), name: NEW_NODE_OPERATOR_NAME}); - - uint32[] memory nodeOperatorIds = new uint32[](1); - nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; - - vm.expectRevert(CapabilityRegistry.InvalidNodeOperatorAdmin.selector); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - } - - function test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() public { - changePrank(ADMIN); - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - - uint32 invalidNodeOperatorId = 10000; - uint32[] memory nodeOperatorIds = new uint32[](2); - nodeOperatorIds[0] = invalidNodeOperatorId; - vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.LengthMismatch.selector, nodeOperatorIds.length, nodeOperators.length) - ); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - } - - function test_RevertWhen_NodeOperatorDoesNotExist() public { - changePrank(ADMIN); - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - - uint32 invalidNodeOperatorId = 10000; - uint32[] memory nodeOperatorIds = new uint32[](1); - nodeOperatorIds[0] = invalidNodeOperatorId; - vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) - ); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - } - - function test_UpdatesNodeOperator() public { - changePrank(ADMIN); - - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - - uint32[] memory nodeOperatorIds = new uint32[](1); - nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; - - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); - emit NodeOperatorUpdated(TEST_NODE_OPERATOR_ID, NEW_NODE_OPERATOR_ADMIN, NEW_NODE_OPERATOR_NAME); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - - CapabilityRegistry.NodeOperator memory nodeOperator = s_capabilityRegistry.getNodeOperator(TEST_NODE_OPERATOR_ID); - assertEq(nodeOperator.admin, NEW_NODE_OPERATOR_ADMIN); - assertEq(nodeOperator.name, NEW_NODE_OPERATOR_NAME); - } -} diff --git a/core/capabilities/reader.go b/core/capabilities/reader.go index a3d55751a8e..0a40b4652bd 100644 --- a/core/capabilities/reader.go +++ b/core/capabilities/reader.go @@ -9,7 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/types" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) @@ -26,9 +26,9 @@ type hashedCapabilityID [32]byte type donID uint32 type state struct { - IDsToDONs map[donID]kcr.CapabilityRegistryDONInfo - IDsToNodes map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo - IDsToCapabilities map[hashedCapabilityID]kcr.CapabilityRegistryCapability + IDsToDONs map[donID]kcr.CapabilitiesRegistryDONInfo + IDsToNodes map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo + IDsToCapabilities map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability } func (r *remoteRegistryReader) LocalNode(ctx context.Context) (capabilities.Node, error) { @@ -69,35 +69,35 @@ func (r *remoteRegistryReader) LocalNode(ctx context.Context) (capabilities.Node } func (r *remoteRegistryReader) state(ctx context.Context) (state, error) { - dons := []kcr.CapabilityRegistryDONInfo{} - err := r.r.GetLatestValue(ctx, "capabilityRegistry", "getDONs", nil, &dons) + dons := []kcr.CapabilitiesRegistryDONInfo{} + err := r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getDONs", nil, &dons) if err != nil { return state{}, err } - idsToDONs := map[donID]kcr.CapabilityRegistryDONInfo{} + idsToDONs := map[donID]kcr.CapabilitiesRegistryDONInfo{} for _, d := range dons { idsToDONs[donID(d.Id)] = d } caps := kcr.GetCapabilities{} - err = r.r.GetLatestValue(ctx, "capabilityRegistry", "getCapabilities", nil, &caps) + err = r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getCapabilities", nil, &caps) if err != nil { return state{}, err } - idsToCapabilities := map[hashedCapabilityID]kcr.CapabilityRegistryCapability{} + idsToCapabilities := map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{} for i, c := range caps.Capabilities { idsToCapabilities[caps.HashedCapabilityIds[i]] = c } - nodes := []kcr.CapabilityRegistryNodeInfo{} - err = r.r.GetLatestValue(ctx, "capabilityRegistry", "getNodes", nil, &nodes) + nodes := []kcr.CapabilitiesRegistryNodeInfo{} + err = r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getNodes", nil, &nodes) if err != nil { return state{}, err } - idsToNodes := map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{} + idsToNodes := map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{} for _, node := range nodes { idsToNodes[node.P2pId] = node } @@ -112,8 +112,8 @@ type contractReaderFactory interface { func newRemoteRegistryReader(ctx context.Context, lggr logger.Logger, peerWrapper p2ptypes.PeerWrapper, relayer contractReaderFactory, remoteRegistryAddress string) (*remoteRegistryReader, error) { contractReaderConfig := evmrelaytypes.ChainReaderConfig{ Contracts: map[string]evmrelaytypes.ChainContractReader{ - "capabilityRegistry": { - ContractABI: kcr.CapabilityRegistryABI, + "CapabilitiesRegistry": { + ContractABI: kcr.CapabilitiesRegistryABI, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ "getDONs": { ChainSpecificName: "getDONs", @@ -142,7 +142,7 @@ func newRemoteRegistryReader(ctx context.Context, lggr logger.Logger, peerWrappe err = cr.Bind(ctx, []types.BoundContract{ { Address: remoteRegistryAddress, - Name: "capabilityRegistry", + Name: "CapabilitiesRegistry", }, }) if err != nil { diff --git a/core/capabilities/reader_test.go b/core/capabilities/reader_test.go index ded525f6142..747736c23bd 100644 --- a/core/capabilities/reader_test.go +++ b/core/capabilities/reader_test.go @@ -21,7 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -30,13 +30,13 @@ import ( evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) -var writeChainCapability = kcr.CapabilityRegistryCapability{ +var writeChainCapability = kcr.CapabilitiesRegistryCapability{ LabelledName: "write-chain", Version: "1.0.1", ResponseType: uint8(1), } -func startNewChainWithRegistry(t *testing.T) (*kcr.CapabilityRegistry, common.Address, *bind.TransactOpts, *backends.SimulatedBackend) { +func startNewChainWithRegistry(t *testing.T) (*kcr.CapabilitiesRegistry, common.Address, *bind.TransactOpts, *backends.SimulatedBackend) { owner := testutils.MustNewSimTransactor(t) oneEth, _ := new(big.Int).SetString("100000000000000000000", 10) @@ -47,13 +47,13 @@ func startNewChainWithRegistry(t *testing.T) (*kcr.CapabilityRegistry, common.Ad }}, gasLimit) simulatedBackend.Commit() - capabilityRegistryAddress, _, capabilityRegistry, err := kcr.DeployCapabilityRegistry(owner, simulatedBackend) - require.NoError(t, err, "DeployCapabilityRegistry failed") + CapabilitiesRegistryAddress, _, CapabilitiesRegistry, err := kcr.DeployCapabilitiesRegistry(owner, simulatedBackend) + require.NoError(t, err, "DeployCapabilitiesRegistry failed") - fmt.Println("Deployed CapabilityRegistry at", capabilityRegistryAddress.Hex()) + fmt.Println("Deployed CapabilitiesRegistry at", CapabilitiesRegistryAddress.Hex()) simulatedBackend.Commit() - return capabilityRegistry, capabilityRegistryAddress, owner, simulatedBackend + return CapabilitiesRegistry, CapabilitiesRegistryAddress, owner, simulatedBackend } type crFactory struct { @@ -133,14 +133,14 @@ func TestReader_Integration(t *testing.T) { ctx := testutils.Context(t) reg, regAddress, owner, sim := startNewChainWithRegistry(t) - _, err := reg.AddCapabilities(owner, []kcr.CapabilityRegistryCapability{writeChainCapability}) + _, err := reg.AddCapabilities(owner, []kcr.CapabilitiesRegistryCapability{writeChainCapability}) require.NoError(t, err, "AddCapability failed for %s", writeChainCapability.LabelledName) sim.Commit() cid, err := reg.GetHashedCapabilityId(&bind.CallOpts{}, writeChainCapability.LabelledName, writeChainCapability.Version) require.NoError(t, err) - _, err = reg.AddNodeOperators(owner, []kcr.CapabilityRegistryNodeOperator{ + _, err = reg.AddNodeOperators(owner, []kcr.CapabilitiesRegistryNodeOperator{ { Admin: owner.From, Name: "TEST_NOP", @@ -160,7 +160,7 @@ func TestReader_Integration(t *testing.T) { randomWord(), } - nodes := []kcr.CapabilityRegistryNodeParams{ + nodes := []kcr.CapabilitiesRegistryNodeParams{ { // The first NodeOperatorId has id 1 since the id is auto-incrementing. NodeOperatorId: uint32(1), @@ -186,7 +186,7 @@ func TestReader_Integration(t *testing.T) { _, err = reg.AddNodes(owner, nodes) require.NoError(t, err) - cfgs := []kcr.CapabilityRegistryCapabilityConfiguration{ + cfgs := []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: cid, Config: []byte(`{"hello": "world"}`), @@ -221,7 +221,7 @@ func TestReader_Integration(t *testing.T) { assert.Equal(t, writeChainCapability, gotCap) assert.Len(t, s.IDsToDONs, 1) - assert.Equal(t, kcr.CapabilityRegistryDONInfo{ + assert.Equal(t, kcr.CapabilitiesRegistryDONInfo{ Id: 1, // initial Id ConfigCount: 1, // initial Count IsPublic: true, @@ -231,7 +231,7 @@ func TestReader_Integration(t *testing.T) { CapabilityConfigurations: cfgs, }, s.IDsToDONs[1]) - nodesInfo := []kcr.CapabilityRegistryNodeInfo{ + nodesInfo := []kcr.CapabilitiesRegistryNodeInfo{ { // The first NodeOperatorId has id 1 since the id is auto-incrementing. NodeOperatorId: uint32(1), @@ -265,7 +265,7 @@ func TestReader_Integration(t *testing.T) { } assert.Len(t, s.IDsToNodes, 3) - assert.Equal(t, map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + assert.Equal(t, map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ nodeSet[0]: nodesInfo[0], nodeSet[1]: nodesInfo[1], nodeSet[2]: nodesInfo[2], diff --git a/core/capabilities/registry.go b/core/capabilities/registry.go index 6a3a4ffb83b..3cfe1d169b7 100644 --- a/core/capabilities/registry.go +++ b/core/capabilities/registry.go @@ -158,6 +158,6 @@ func (r *Registry) Add(ctx context.Context, c capabilities.BaseCapability) error func NewRegistry(lggr logger.Logger) *Registry { return &Registry{ m: map[string]capabilities.BaseCapability{}, - lggr: lggr.Named("CapabilityRegistry"), + lggr: lggr.Named("CapabilitiesRegistry"), } } diff --git a/core/capabilities/syncer.go b/core/capabilities/syncer.go index 50dece12c01..1a62b8af3a7 100644 --- a/core/capabilities/syncer.go +++ b/core/capabilities/syncer.go @@ -25,7 +25,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/target" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" "github.com/smartcontractkit/chainlink/v2/core/logger" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" ) @@ -174,7 +174,7 @@ func (s *registrySyncer) sync(ctx context.Context) error { allPeers[p] = cfg } - publicDONs := []kcr.CapabilityRegistryDONInfo{} + publicDONs := []kcr.CapabilitiesRegistryDONInfo{} for _, d := range readerState.IDsToDONs { if !d.IsPublic { continue @@ -202,8 +202,8 @@ func (s *registrySyncer) sync(ctx context.Context) error { // We'll also construct a set to record what DONs the current node is a part of, // regardless of any modifiers (public/acceptsWorkflows etc). myID := s.peerWrapper.GetPeer().ID() - myWorkflowDONs := []kcr.CapabilityRegistryDONInfo{} - remoteWorkflowDONs := []kcr.CapabilityRegistryDONInfo{} + myWorkflowDONs := []kcr.CapabilitiesRegistryDONInfo{} + remoteWorkflowDONs := []kcr.CapabilitiesRegistryDONInfo{} myDONs := map[uint32]bool{} for _, d := range readerState.IDsToDONs { for _, peerID := range d.NodeP2PIds { @@ -223,8 +223,8 @@ func (s *registrySyncer) sync(ctx context.Context) error { // - remote capability DONs (with IsPublic = true) the current node is a part of. // These need server-side shims. - myCapabilityDONs := []kcr.CapabilityRegistryDONInfo{} - remoteCapabilityDONs := []kcr.CapabilityRegistryDONInfo{} + myCapabilityDONs := []kcr.CapabilitiesRegistryDONInfo{} + remoteCapabilityDONs := []kcr.CapabilitiesRegistryDONInfo{} for _, d := range publicDONs { if len(d.CapabilityConfigurations) > 0 { if myDONs[d.Id] { @@ -267,7 +267,7 @@ func (s *registrySyncer) sync(ctx context.Context) error { return nil } -func signersFor(don kcr.CapabilityRegistryDONInfo, state state) ([][]byte, error) { +func signersFor(don kcr.CapabilitiesRegistryDONInfo, state state) ([][]byte, error) { s := [][]byte{} for _, nodeID := range don.NodeP2PIds { node, ok := state.IDsToNodes[nodeID] @@ -283,7 +283,7 @@ func signersFor(don kcr.CapabilityRegistryDONInfo, state state) ([][]byte, error return s, nil } -func toDONInfo(don kcr.CapabilityRegistryDONInfo) *capabilities.DON { +func toDONInfo(don kcr.CapabilitiesRegistryDONInfo) *capabilities.DON { peerIDs := []p2ptypes.PeerID{} for _, p := range don.NodeP2PIds { peerIDs = append(peerIDs, p) @@ -312,7 +312,7 @@ func toCapabilityType(capabilityType uint8) capabilities.CapabilityType { } } -func (s *registrySyncer) addRemoteCapabilities(ctx context.Context, myDON kcr.CapabilityRegistryDONInfo, remoteDON kcr.CapabilityRegistryDONInfo, state state) error { +func (s *registrySyncer) addRemoteCapabilities(ctx context.Context, myDON kcr.CapabilitiesRegistryDONInfo, remoteDON kcr.CapabilitiesRegistryDONInfo, state state) error { for _, c := range remoteDON.CapabilityConfigurations { capability, ok := state.IDsToCapabilities[c.CapabilityId] if !ok { @@ -399,7 +399,7 @@ type capabilityService interface { services.Service } -func (s *registrySyncer) addToRegistryAndSetDispatcher(ctx context.Context, capabilityInfo kcr.CapabilityRegistryCapability, don kcr.CapabilityRegistryDONInfo, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { +func (s *registrySyncer) addToRegistryAndSetDispatcher(ctx context.Context, capabilityInfo kcr.CapabilitiesRegistryCapability, don kcr.CapabilitiesRegistryDONInfo, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { fullCapID := fmt.Sprintf("%s@%s", capabilityInfo.LabelledName, capabilityInfo.Version) info, err := capabilities.NewRemoteCapabilityInfo( fullCapID, @@ -449,7 +449,7 @@ var ( defaultTargetRequestTimeout = time.Minute ) -func (s *registrySyncer) enableExternalAccess(ctx context.Context, myPeerID p2ptypes.PeerID, don kcr.CapabilityRegistryDONInfo, state state, remoteWorkflowDONs []kcr.CapabilityRegistryDONInfo) error { +func (s *registrySyncer) enableExternalAccess(ctx context.Context, myPeerID p2ptypes.PeerID, don kcr.CapabilitiesRegistryDONInfo, state state, remoteWorkflowDONs []kcr.CapabilitiesRegistryDONInfo) error { idsToDONs := map[string]capabilities.DON{} for _, d := range remoteWorkflowDONs { idsToDONs[fmt.Sprint(d.Id)] = *toDONInfo(d) @@ -520,7 +520,7 @@ type receiverService interface { remotetypes.Receiver } -func (s *registrySyncer) addReceiver(ctx context.Context, capability kcr.CapabilityRegistryCapability, don kcr.CapabilityRegistryDONInfo, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { +func (s *registrySyncer) addReceiver(ctx context.Context, capability kcr.CapabilitiesRegistryCapability, don kcr.CapabilitiesRegistryDONInfo, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { fullCapID := fmt.Sprintf("%s@%s", capability.LabelledName, capability.Version) info, err := capabilities.NewRemoteCapabilityInfo( fullCapID, diff --git a/core/capabilities/syncer_test.go b/core/capabilities/syncer_test.go index f3050167ecf..c1bc379e2f3 100644 --- a/core/capabilities/syncer_test.go +++ b/core/capabilities/syncer_test.go @@ -16,7 +16,7 @@ import ( commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/mocks" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" remoteMocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types/mocks" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" @@ -140,7 +140,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { // no entries should be added to the registry. mr := &mockReader{ s: state{ - IDsToDONs: map[donID]kcr.CapabilityRegistryDONInfo{ + IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ donID(dID): { Id: dID, ConfigCount: uint32(0), @@ -148,7 +148,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { IsPublic: true, AcceptsWorkflows: true, NodeP2PIds: nodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: triggerCapID, Config: []byte(""), @@ -160,7 +160,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilityRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -172,7 +172,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { CapabilityType: 3, }, }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ nodes[0]: { NodeOperatorId: 1, Signer: randomWord(), @@ -242,7 +242,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { // We expect no action to be taken by the syncer. mr := &mockReader{ s: state{ - IDsToDONs: map[donID]kcr.CapabilityRegistryDONInfo{ + IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ donID(dID): { Id: dID, ConfigCount: uint32(0), @@ -250,7 +250,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { IsPublic: false, AcceptsWorkflows: true, NodeP2PIds: nodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: triggerCapID, Config: []byte(""), @@ -262,7 +262,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilityRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -274,7 +274,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { CapabilityType: 3, }, }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ nodes[0]: { NodeOperatorId: 1, Signer: randomWord(), @@ -356,7 +356,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { // We expect receivers to be wired up and both capabilities to be added to the registry. mr := &mockReader{ s: state{ - IDsToDONs: map[donID]kcr.CapabilityRegistryDONInfo{ + IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ donID(dID): { Id: dID, ConfigCount: uint32(0), @@ -372,7 +372,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { IsPublic: true, AcceptsWorkflows: false, NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: triggerCapID, Config: []byte(""), @@ -384,7 +384,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilityRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -396,7 +396,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { CapabilityType: 3, }, }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ capabilityDonNodes[0]: { NodeOperatorId: 1, Signer: randomWord(), @@ -501,7 +501,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( // We expect receivers to be wired up and both capabilities to be added to the registry. mr := &mockReader{ s: state{ - IDsToDONs: map[donID]kcr.CapabilityRegistryDONInfo{ + IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ donID(dID): { Id: dID, ConfigCount: uint32(0), @@ -517,7 +517,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( IsPublic: true, AcceptsWorkflows: false, NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: triggerCapID, Config: []byte(""), @@ -531,7 +531,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( IsPublic: false, AcceptsWorkflows: false, NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: targetCapID, Config: []byte(""), @@ -539,7 +539,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilityRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -551,7 +551,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( CapabilityType: 3, }, }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ capabilityDonNodes[0]: { NodeOperatorId: 1, Signer: randomWord(), diff --git a/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go b/core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go similarity index 55% rename from core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go rename to core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go index 3b8f26b4983..dfb70824fee 100644 --- a/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go +++ b/core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go @@ -1,7 +1,7 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package keystone_capability_registry +package capabilities_registry import ( "errors" @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type CapabilityRegistryCapability struct { +type CapabilitiesRegistryCapability struct { LabelledName string Version string CapabilityType uint8 @@ -38,22 +38,22 @@ type CapabilityRegistryCapability struct { ConfigurationContract common.Address } -type CapabilityRegistryCapabilityConfiguration struct { +type CapabilitiesRegistryCapabilityConfiguration struct { CapabilityId [32]byte Config []byte } -type CapabilityRegistryDONInfo struct { +type CapabilitiesRegistryDONInfo struct { Id uint32 ConfigCount uint32 F uint8 IsPublic bool AcceptsWorkflows bool NodeP2PIds [][32]byte - CapabilityConfigurations []CapabilityRegistryCapabilityConfiguration + CapabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration } -type CapabilityRegistryNodeInfo struct { +type CapabilitiesRegistryNodeInfo struct { NodeOperatorId uint32 ConfigCount uint32 WorkflowDONId uint32 @@ -63,29 +63,29 @@ type CapabilityRegistryNodeInfo struct { CapabilitiesDONIds []*big.Int } -type CapabilityRegistryNodeOperator struct { +type CapabilitiesRegistryNodeOperator struct { Admin common.Address Name string } -type CapabilityRegistryNodeParams struct { +type CapabilitiesRegistryNodeParams struct { NodeOperatorId uint32 Signer [32]byte P2pId [32]byte HashedCapabilityIds [][32]byte } -var CapabilityRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfCapabilitiesDON\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfWorkflowDON\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"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\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"name\":\"addCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"deprecateCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo\",\"name\":\"nodeInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6150bf80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f6578063ddbe4f8214610409578063e29581aa1461041f578063f2fde38b1461043457600080fd5b80638da5cb5b1461039b5780639cb7c5f4146103c3578063d59a79f6146103e357600080fd5b806373ac22b4116100c857806373ac22b41461036d57806379ba50971461038057806386fa42461461038857600080fd5b80635e65e3091461033257806366acaa3314610345578063715f52951461035a57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461031f57600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613ef4565b610447565b6040519081526020015b60405180910390f35b6101ec6101e7366004613f58565b61047b565b60405190151581526020016101d0565b604080518082018252601881527f4361706162696c697479526567697374727920312e302e300000000000000000602082015290516101d09190613fdf565b61024e610249366004614037565b610488565b005b6102586106ab565b6040516101d09190614197565b610278610273366004614230565b610810565b6040516101d09190614288565b610298610293366004614230565b6108fd565b6040516101d0919061429b565b61024e6102b3366004614037565b610941565b61024e6102c6366004614037565b610a18565b61024e6102d9366004614037565b610cbd565b6102f16102ec3660046142ae565b610e85565b6040516101d09291906142d8565b61031261030d366004613f58565b611071565b6040516101d09190614369565b61024e61032d366004614037565b61114b565b61024e610340366004614037565b611299565b61034d611718565b6040516101d0919061437c565b61024e610368366004614037565b611903565b61024e61037b366004614037565b6119be565b61024e611e9a565b61024e6103963660046143ef565b611f97565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d66103d1366004613f58565b6122dd565b6040516101d09190614517565b61024e6103f1366004614549565b6124e2565b61024e6104043660046145fe565b6125ab565b610411612675565b6040516101d09291906146a3565b6104276129d8565b6040516101d09190614733565b61024e6104423660046147ca565b612aea565b6000828260405160200161045c9291906142d8565b6040516020818303038152906040528051906020012090505b92915050565b6000610475600583612afe565b610490612b19565b60005b818110156106a65760008383838181106104af576104af6147e5565b90506020020160208101906104c49190614230565b63ffffffff8181166000908152600d60209081526040808320805464010000000081049095168085526001820190935290832094955093909290916a010000000000000000000090910460ff16905b61051c83612b9c565b8110156105c457811561057257600c60006105378584612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556105b4565b6105b28663ffffffff16600c60006105938588612ba690919063ffffffff16565b8152602001908152602001600020600401612bb290919063ffffffff16565b505b6105bd81614843565b9050610513565b508354640100000000900463ffffffff1660000361061b576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff861660048201526024015b60405180910390fd5b63ffffffff85166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a150505050508061069f90614843565b9050610493565b505050565b600e54606090640100000000900463ffffffff1660006106cc60018361487b565b63ffffffff1667ffffffffffffffff8111156106ea576106ea613d8e565b60405190808252806020026020018201604052801561077157816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816107085790505b509050600060015b8363ffffffff168163ffffffff1610156107ed5763ffffffff8082166000908152600d602052604090205416156107dd576107b381612bbe565b8383815181106107c5576107c56147e5565b6020026020010181905250816107da90614843565b91505b6107e681614898565b9050610779565b506107f960018461487b565b63ffffffff168114610809578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191610874906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546108a0906148bb565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047582612bbe565b610949612b19565b60005b63ffffffff81168211156106a657600083838363ffffffff16818110610974576109746147e5565b90506020020160208101906109899190614230565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681559192506109d46001830182613d21565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a1181614898565b905061094c565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb7576000848483818110610a5257610a526147e5565b602090810292909201356000818152600c90935260409092206001810154929350919050610aaf576040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260048101839052602401610612565b6000610abd82600401612b9c565b1115610b1257610ad06004820184612ba6565b6040517f60a6d89800000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101839052604401610612565b805468010000000000000000900463ffffffff1615610b7a5780546040517f60b9df730000000000000000000000000000000000000000000000000000000081526801000000000000000090910463ffffffff16600482015260248101839052604401610612565b83158015610bb45750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bed576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6001810154610bfe90600790612bb2565b506002810154610c1090600990612bb2565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815560018101829055600281018290559060048201818181610c658282613d5b565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c9c91815260200190565b60405180910390a1505080610cb090614843565b9050610a36565b50505050565b610cc5612b19565b60005b818110156106a6576000838383818110610ce457610ce46147e5565b9050602002810190610cf6919061490e565b610cff9061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d50576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610ddc9082614a04565b5050600e8054909150600090610df79063ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e6a9190613fdf565b60405180910390a3505080610e7e90614843565b9050610cc8565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610ed7906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f03906148bb565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611063905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa15801561101a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526110609190810190614b1e565b90505b9093509150505b9250929050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c08101919091526040805160e0810182526000848152600c6020908152838220805463ffffffff8082168652640100000000820481168487018190526801000000000000000090920416858701526001820154606086015260028201546080860152835260030190529190912060a082019061112090612e92565b8152602001611143600c6000868152602001908152602001600020600401612e92565b905292915050565b611153612b19565b60005b818110156106a6576000838383818110611172576111726147e5565b90506020020135905061118f816003612afe90919063ffffffff16565b6111c8576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6111d3600582612e9f565b61120c576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6000818152600260205260408120906112258282613d21565b611233600183016000613d21565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a25061129281614843565b9050611156565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106112d3576112d36147e5565b90506020028101906112e59190614b8c565b6112ee90614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611344906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611370906148bb565b80156113bd5780601f10611392576101008083540402835291602001916113bd565b820191906000526020600020905b8154815290600101906020018083116113a057829003601f168201915b5050505050815250509050831580156113ed5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611426576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015461147a5782604001516040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301516114b5576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154602084015181146115365760208401516114d690600790612afe565b1561150d576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208401516001830155611522600782612bb2565b50602084015161153490600790612e9f565b505b6060840151805160000361157857806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b8254600090849060049061159990640100000000900463ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff1602179055905060005b8251811015611686576115f18382815181106115d9576115d96147e5565b60200260200101516003612afe90919063ffffffff16565b61162957826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b61167583828151811061163e5761163e6147e5565b60200260200101518660030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b5061167f81614843565b90506115bb565b50855184547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9091169081178555604080880151600287018190556020808a01518351928352908201527f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a25050505050508061171190614843565b90506112b7565b600e5460609063ffffffff16600061173160018361487b565b63ffffffff1667ffffffffffffffff81111561174f5761174f613d8e565b60405190808252806020026020018201604052801561179557816020015b60408051808201909152600081526060602082015281526020019060019003908161176d5790505b509050600060015b8363ffffffff168163ffffffff1610156118ed5763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16156118dd5763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191611831906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461185d906148bb565b80156118aa5780601f1061187f576101008083540402835291602001916118aa565b820191906000526020600020905b81548152906001019060200180831161188d57829003601f168201915b5050505050815250508383815181106118c5576118c56147e5565b6020026020010181905250816118da90614843565b91505b6118e681614898565b905061179d565b50600e546107f99060019063ffffffff1661487b565b61190b612b19565b60005b818110156106a657600083838381811061192a5761192a6147e5565b905060200281019061193c9190614ca6565b61194590614ce9565b9050600061195b82600001518360200151610447565b9050611968600382612e9f565b6119a1576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6119ab8183612eab565b5050806119b790614843565b905061190e565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106119f8576119f86147e5565b9050602002810190611a0a9190614b8c565b611a1390614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611a69906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611a95906148bb565b8015611ae25780601f10611ab757610100808354040283529160200191611ae2565b820191906000526020600020905b815481529060010190602001808311611ac557829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611b485781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610612565b83158015611b6d5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611ba6576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015415611bfb5782604001516040517f5461848300000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b6040830151611c3e5782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301511580611c5b57506020830151611c5b90600790612afe565b15611c92576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611cd457806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b81548290600490611cf290640100000000900463ffffffff16614898565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611dd057611d3b8382815181106115d9576115d96147e5565b611d7357826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b611dbf838281518110611d8857611d886147e5565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b50611dc981614843565b9050611d1d565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611e269160079190612e9f16565b506040850151611e3890600990612e9f565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611e9390614843565b90506119dc565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610612565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611fda576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610612565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b848110156122d5576000868683818110612012576120126147e5565b90506020020160208101906120279190614230565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16612096576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610612565b60008686858181106120aa576120aa6147e5565b90506020028101906120bc919061490e565b6120c59061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16612116576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061215357503373ffffffffffffffffffffffffffffffffffffffff861614155b1561218c576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b8051825473ffffffffffffffffffffffffffffffffffffffff908116911614158061220857506020808201516040516121c59201613fdf565b60405160208183030381529060405280519060200120826001016040516020016121ef9190614d8f565b6040516020818303038152906040528051906020012014155b156122c157805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906122629082614a04565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516122b89190613fdf565b60405180910390a35b505050806122ce90614843565b9050611ff6565b505050505050565b61230d6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a08101909252805482908290612335906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612361906148bb565b80156123ae5780601f10612383576101008083540402835291602001916123ae565b820191906000526020600020905b81548152906001019060200180831161239157829003601f168201915b505050505081526020016001820180546123c7906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546123f3906148bb565b80156124405780601f1061241557610100808354040283529160200191612440565b820191906000526020600020905b81548152906001019060200180831161242357829003601f168201915b5050509183525050600282015460209091019060ff1660038111156124675761246761445b565b60038111156124785761247861445b565b81526020016002820160019054906101000a900460ff1660018111156124a0576124a061445b565b60018111156124b1576124b161445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b6124ea612b19565b63ffffffff8089166000908152600d602052604081205464010000000090049091169081900361254e576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610612565b6125a0888888886040518060a001604052808f63ffffffff1681526020018761257690614898565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff1681525061313f565b505050505050505050565b6125b3612b19565b600e805460009164010000000090910463ffffffff169060046125d583614898565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff8416608082015290915061266b90899089908990899061313f565b5050505050505050565b6060806126826003612e92565b915060006126906005612b9c565b835161269c9190614e38565b90508067ffffffffffffffff8111156126b7576126b7613d8e565b60405190808252806020026020018201604052801561271857816020015b6127056040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816126d55790505b50915060008167ffffffffffffffff81111561273657612736613d8e565b60405190808252806020026020018201604052801561275f578160200160208202803683370190505b5090506000805b85518110156129ce576000868281518110612783576127836147e5565b602002602001015190506127a1816005612afe90919063ffffffff16565b6129bd5760008181526002602052604090819020815160a081019092528054829082906127cd906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546127f9906148bb565b80156128465780601f1061281b57610100808354040283529160200191612846565b820191906000526020600020905b81548152906001019060200180831161282957829003601f168201915b5050505050815260200160018201805461285f906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461288b906148bb565b80156128d85780601f106128ad576101008083540402835291602001916128d8565b820191906000526020600020905b8154815290600101906020018083116128bb57829003601f168201915b5050509183525050600282015460209091019060ff1660038111156128ff576128ff61445b565b60038111156129105761291061445b565b81526020016002820160019054906101000a900460ff1660018111156129385761293861445b565b60018111156129495761294961445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff166020909101528651879085908110612988576129886147e5565b6020026020010181905250808484815181106129a6576129a66147e5565b60209081029190910101526129ba83614843565b92505b506129c781614843565b9050612766565b5090949293505050565b606060006129e66009612e92565b90506000815167ffffffffffffffff811115612a0457612a04613d8e565b604051908082528060200260200182016040528015612a8b57816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612a225790505b50905060005b825181101561080957612abc838281518110612aaf57612aaf6147e5565b6020026020010151611071565b828281518110612ace57612ace6147e5565b602002602001018190525080612ae390614843565b9050612a91565b612af2612b19565b612afb81613983565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610612565b565b6000610475825490565b6000612b128383613a78565b6000612b128383613aa2565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612c6f57602002820191906000526020600020905b815481526020019060010190808311612c5b575b505050505090506000815167ffffffffffffffff811115612c9257612c92613d8e565b604051908082528060200260200182016040528015612cd857816020015b604080518082019091526000815260606020820152815260200190600190039081612cb05790505b50905060005b8151811015612df9576040518060400160405280848381518110612d0457612d046147e5565b60200260200101518152602001856003016000868581518110612d2957612d296147e5565b602002602001015181526020019081526020016000208054612d4a906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612d76906148bb565b8015612dc35780601f10612d9857610100808354040283529160200191612dc3565b820191906000526020600020905b815481529060010190602001808311612da657829003601f168201915b5050505050815250828281518110612ddd57612ddd6147e5565b602002602001018190525080612df290614843565b9050612cde565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612e8085612e92565b81526020019190915295945050505050565b60606000612b1283613b95565b6000612b128383613bf1565b608081015173ffffffffffffffffffffffffffffffffffffffff1615612ff957608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612fa4575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612f7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa29190614e4b565b155b15612ff95760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610612565b6000828152600260205260409020815182919081906130189082614a04565b506020820151600182019061302d9082614a04565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561306f5761306f61445b565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360018111156130b6576130b661445b565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff16158061319157506080820151859061318c906001614e68565b60ff16115b156131da5760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101869052604401610612565b6001826020015163ffffffff1611156132ca57815163ffffffff166000908152600d60209081526040822090840151600191820191839161321b919061487b565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61324382612b9c565b8110156132c757613272846000015163ffffffff16600c60006105938587600001612ba690919063ffffffff16565b50600c60006132818484612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556132c081614843565b905061323a565b50505b60005b8581101561350c576132fa8787838181106132ea576132ea6147e5565b8592602090910201359050612e9f565b61335b578251878783818110613312576133126147e5565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8260600151156134b257825163ffffffff16600c6000898985818110613383576133836147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff16148015906133fd5750600c60008888848181106133ce576133ce6147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff1615155b1561345f578251878783818110613416576134166147e5565b6040517f60b9df7300000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8251600c6000898985818110613477576134776147e5565b90506020020135815260200190815260200160002060000160086101000a81548163ffffffff021916908363ffffffff1602179055506134fc565b82516134fa9063ffffffff16600c60008a8a868181106134d4576134d46147e5565b905060200201358152602001908152602001600020600401612e9f90919063ffffffff16565b505b61350581614843565b90506132cd565b5060005b838110156137f8573685858381811061352b5761352b6147e5565b905060200281019061353d919061490e565b905061354b60038235612afe565b613584576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b61359060058235612afe565b156135ca576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b80356000908152600384016020526040812080546135e7906148bb565b905011156136335783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610612565b60005b87811015613745576136da8235600c60008c8c86818110613659576136596147e5565b9050602002013581526020019081526020016000206003016000600c60008e8e88818110613689576136896147e5565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612afe90919063ffffffff16565b613735578888828181106136f0576136f06147e5565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610612565b61373e81614843565b9050613636565b506002830180546001810182556000918252602091829020833591015561376e90820182614e81565b8235600090815260038601602052604090209161378c919083614ee6565b5083516020808601516137e792918435908c908c906137ad90880188614e81565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c4092505050565b506137f181614843565b9050613510565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c158170365192613973929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610612565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613a8f57613a8f6147e5565b9060005260206000200154905092915050565b60008181526001830160205260408120548015613b8b576000613ac6600183614e38565b8554909150600090613ada90600190614e38565b9050818114613b3f576000866000018281548110613afa57613afa6147e5565b9060005260206000200154905080876000018481548110613b1d57613b1d6147e5565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b5057613b50615001565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610475565b6000915050610475565b606081600001805480602002602001604051908101604052809291908181526020018280548015613be557602002820191906000526020600020905b815481526020019060010190808311613bd1575b50505050509050919050565b6000818152600183016020526040812054613c3857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610475565b506000610475565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff16156122d557600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613ce7908690869086908b908d90600401615030565b600060405180830381600087803b158015613d0157600080fd5b505af1158015613d15573d6000803e3d6000fd5b50505050505050505050565b508054613d2d906148bb565b6000825580601f10613d3d575050565b601f016020900490600052602060002090810190612afb9190613d75565b5080546000825590600052602060002090810190612afb91905b5b80821115613d8a5760008155600101613d76565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613de057613de0613d8e565b60405290565b60405160a0810167ffffffffffffffff81118282101715613de057613de0613d8e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e5057613e50613d8e565b604052919050565b600067ffffffffffffffff821115613e7257613e72613d8e565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613eaf57600080fd5b8135613ec2613ebd82613e58565b613e09565b818152846020838601011115613ed757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f0757600080fd5b823567ffffffffffffffff80821115613f1f57600080fd5b613f2b86838701613e9e565b93506020850135915080821115613f4157600080fd5b50613f4e85828601613e9e565b9150509250929050565b600060208284031215613f6a57600080fd5b5035919050565b60005b83811015613f8c578181015183820152602001613f74565b50506000910152565b60008151808452613fad816020860160208601613f71565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612b126020830184613f95565b60008083601f84011261400457600080fd5b50813567ffffffffffffffff81111561401c57600080fd5b6020830191508360208260051b850101111561106a57600080fd5b6000806020838503121561404a57600080fd5b823567ffffffffffffffff81111561406157600080fd5b61406d85828601613ff2565b90969095509350505050565b600081518084526020808501945080840160005b838110156140a95781518752958201959082019060010161408d565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b8581101561411057828403895281518051855285015160408686018190526140fc81870183613f95565b9a87019a95505050908401906001016140d2565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a085015261417560e0850182614079565b905060c083015184820360c086015261418e82826140b4565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526141f885835161411d565b945092850192908501906001016141be565b5092979650505050505050565b803563ffffffff8116811461422b57600080fd5b919050565b60006020828403121561424257600080fd5b612b1282614217565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526142806040850182613f95565b949350505050565b602081526000612b12602083018461424b565b602081526000612b12602083018461411d565b600080604083850312156142c157600080fd5b6142ca83614217565b946020939093013593505050565b6040815260006142eb6040830185613f95565b828103602084015261418e8185613f95565b600063ffffffff80835116845280602084015116602085015280604084015116604085015250606082015160608401526080820151608084015260a082015160e060a085015261435060e0850182614079565b905060c083015184820360c086015261418e8282614079565b602081526000612b1260208301846142fd565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526143dd85835161424b565b945092850192908501906001016143a3565b6000806000806040858703121561440557600080fd5b843567ffffffffffffffff8082111561441d57600080fd5b61442988838901613ff2565b9096509450602087013591508082111561444257600080fd5b5061444f87828801613ff2565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a0845261449f60a0850182613f95565b9050602083015184820360208601526144b88282613f95565b9150506040830151600481106144d0576144d061445b565b60408501526060830151600281106144ea576144ea61445b565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612b12602083018461448a565b8015158114612afb57600080fd5b803560ff8116811461422b57600080fd5b60008060008060008060008060c0898b03121561456557600080fd5b61456e89614217565b9750602089013567ffffffffffffffff8082111561458b57600080fd5b6145978c838d01613ff2565b909950975060408b01359150808211156145b057600080fd5b506145bd8b828c01613ff2565b90965094505060608901356145d18161452a565b925060808901356145e18161452a565b91506145ef60a08a01614538565b90509295985092959890939650565b600080600080600080600060a0888a03121561461957600080fd5b873567ffffffffffffffff8082111561463157600080fd5b61463d8b838c01613ff2565b909950975060208a013591508082111561465657600080fd5b506146638a828b01613ff2565b90965094505060408801356146778161452a565b925060608801356146878161452a565b915061469560808901614538565b905092959891949750929550565b6040815260006146b66040830185614079565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015614724577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087840301855261471283835161448a565b948601949250908501906001016146d8565b50909998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526147948583516142fd565b9450928501929085019060010161475a565b803573ffffffffffffffffffffffffffffffffffffffff8116811461422b57600080fd5b6000602082840312156147dc57600080fd5b612b12826147a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361487457614874614814565b5060010190565b63ffffffff82811682821603908082111561080957610809614814565b600063ffffffff8083168181036148b1576148b1614814565b6001019392505050565b600181811c908216806148cf57607f821691505b602082108103614908577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261494257600080fd5b9190910192915050565b60006040823603121561495e57600080fd5b6040516040810167ffffffffffffffff828210818311171561498257614982613d8e565b8160405261498f856147a6565b835260208501359150808211156149a557600080fd5b506149b236828601613e9e565b60208301525092915050565b601f8211156106a657600081815260208120601f850160051c810160208610156149e55750805b601f850160051c820191505b818110156122d5578281556001016149f1565b815167ffffffffffffffff811115614a1e57614a1e613d8e565b614a3281614a2c84546148bb565b846149be565b602080601f831160018114614a855760008415614a4f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556122d5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614ad257888601518255948401946001909101908401614ab3565b5085821015614b0e57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614b3057600080fd5b815167ffffffffffffffff811115614b4757600080fd5b8201601f81018413614b5857600080fd5b8051614b66613ebd82613e58565b818152856020838501011115614b7b57600080fd5b61418e826020830160208601613f71565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261494257600080fd5b600060808236031215614bd257600080fd5b614bda613dbd565b614be383614217565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff80821115614c1457600080fd5b9085019036601f830112614c2757600080fd5b813581811115614c3957614c39613d8e565b8060051b9150614c4a848301613e09565b8181529183018401918481019036841115614c6457600080fd5b938501935b83851015614c8257843582529385019390850190614c69565b606087015250939695505050505050565b602081526000612b126020830184614079565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261494257600080fd5b80356002811061422b57600080fd5b600060a08236031215614cfb57600080fd5b614d03613de6565b823567ffffffffffffffff80821115614d1b57600080fd5b614d2736838701613e9e565b83526020850135915080821115614d3d57600080fd5b50614d4a36828601613e9e565b602083015250604083013560048110614d6257600080fd5b6040820152614d7360608401614cda565b6060820152614d84608084016147a6565b608082015292915050565b6000602080835260008454614da3816148bb565b80848701526040600180841660008114614dc45760018114614dfc57614e2a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614e2a565b896000528660002060005b85811015614e225781548b8201860152908301908801614e07565b8a0184019650505b509398975050505050505050565b8181038181111561047557610475614814565b600060208284031215614e5d57600080fd5b8151612b128161452a565b60ff818116838216019081111561047557610475614814565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614eb657600080fd5b83018035915067ffffffffffffffff821115614ed157600080fd5b60200191503681900382131561106a57600080fd5b67ffffffffffffffff831115614efe57614efe613d8e565b614f1283614f0c83546148bb565b836149be565b6000601f841160018114614f645760008515614f2e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614ffa565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614fb35786850135825560209485019460019092019101614f93565b5086821015614fee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561506957600080fd5b8560051b808860a0850137820182810360a0908101602085015261508f90820187613f95565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", +var CapabilitiesRegistryMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfCapabilitiesDON\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfWorkflowDON\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"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\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"name\":\"addCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"deprecateCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilitiesRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilitiesRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeInfo\",\"name\":\"nodeInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6150bf80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f6578063ddbe4f8214610409578063e29581aa1461041f578063f2fde38b1461043457600080fd5b80638da5cb5b1461039b5780639cb7c5f4146103c3578063d59a79f6146103e357600080fd5b806373ac22b4116100c857806373ac22b41461036d57806379ba50971461038057806386fa42461461038857600080fd5b80635e65e3091461033257806366acaa3314610345578063715f52951461035a57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461031f57600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613ef4565b610447565b6040519081526020015b60405180910390f35b6101ec6101e7366004613f58565b61047b565b60405190151581526020016101d0565b604080518082018252601a81527f4361706162696c6974696573526567697374727920312e302e30000000000000602082015290516101d09190613fdf565b61024e610249366004614037565b610488565b005b6102586106ab565b6040516101d09190614197565b610278610273366004614230565b610810565b6040516101d09190614288565b610298610293366004614230565b6108fd565b6040516101d0919061429b565b61024e6102b3366004614037565b610941565b61024e6102c6366004614037565b610a18565b61024e6102d9366004614037565b610cbd565b6102f16102ec3660046142ae565b610e85565b6040516101d09291906142d8565b61031261030d366004613f58565b611071565b6040516101d09190614369565b61024e61032d366004614037565b61114b565b61024e610340366004614037565b611299565b61034d611718565b6040516101d0919061437c565b61024e610368366004614037565b611903565b61024e61037b366004614037565b6119be565b61024e611e9a565b61024e6103963660046143ef565b611f97565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d66103d1366004613f58565b6122dd565b6040516101d09190614517565b61024e6103f1366004614549565b6124e2565b61024e6104043660046145fe565b6125ab565b610411612675565b6040516101d09291906146a3565b6104276129d8565b6040516101d09190614733565b61024e6104423660046147ca565b612aea565b6000828260405160200161045c9291906142d8565b6040516020818303038152906040528051906020012090505b92915050565b6000610475600583612afe565b610490612b19565b60005b818110156106a65760008383838181106104af576104af6147e5565b90506020020160208101906104c49190614230565b63ffffffff8181166000908152600d60209081526040808320805464010000000081049095168085526001820190935290832094955093909290916a010000000000000000000090910460ff16905b61051c83612b9c565b8110156105c457811561057257600c60006105378584612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556105b4565b6105b28663ffffffff16600c60006105938588612ba690919063ffffffff16565b8152602001908152602001600020600401612bb290919063ffffffff16565b505b6105bd81614843565b9050610513565b508354640100000000900463ffffffff1660000361061b576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff861660048201526024015b60405180910390fd5b63ffffffff85166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a150505050508061069f90614843565b9050610493565b505050565b600e54606090640100000000900463ffffffff1660006106cc60018361487b565b63ffffffff1667ffffffffffffffff8111156106ea576106ea613d8e565b60405190808252806020026020018201604052801561077157816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816107085790505b509050600060015b8363ffffffff168163ffffffff1610156107ed5763ffffffff8082166000908152600d602052604090205416156107dd576107b381612bbe565b8383815181106107c5576107c56147e5565b6020026020010181905250816107da90614843565b91505b6107e681614898565b9050610779565b506107f960018461487b565b63ffffffff168114610809578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191610874906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546108a0906148bb565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047582612bbe565b610949612b19565b60005b63ffffffff81168211156106a657600083838363ffffffff16818110610974576109746147e5565b90506020020160208101906109899190614230565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681559192506109d46001830182613d21565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a1181614898565b905061094c565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb7576000848483818110610a5257610a526147e5565b602090810292909201356000818152600c90935260409092206001810154929350919050610aaf576040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260048101839052602401610612565b6000610abd82600401612b9c565b1115610b1257610ad06004820184612ba6565b6040517f60a6d89800000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101839052604401610612565b805468010000000000000000900463ffffffff1615610b7a5780546040517f60b9df730000000000000000000000000000000000000000000000000000000081526801000000000000000090910463ffffffff16600482015260248101839052604401610612565b83158015610bb45750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bed576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6001810154610bfe90600790612bb2565b506002810154610c1090600990612bb2565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815560018101829055600281018290559060048201818181610c658282613d5b565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c9c91815260200190565b60405180910390a1505080610cb090614843565b9050610a36565b50505050565b610cc5612b19565b60005b818110156106a6576000838383818110610ce457610ce46147e5565b9050602002810190610cf6919061490e565b610cff9061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d50576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610ddc9082614a04565b5050600e8054909150600090610df79063ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e6a9190613fdf565b60405180910390a3505080610e7e90614843565b9050610cc8565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610ed7906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f03906148bb565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611063905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa15801561101a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526110609190810190614b1e565b90505b9093509150505b9250929050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c08101919091526040805160e0810182526000848152600c6020908152838220805463ffffffff8082168652640100000000820481168487018190526801000000000000000090920416858701526001820154606086015260028201546080860152835260030190529190912060a082019061112090612e92565b8152602001611143600c6000868152602001908152602001600020600401612e92565b905292915050565b611153612b19565b60005b818110156106a6576000838383818110611172576111726147e5565b90506020020135905061118f816003612afe90919063ffffffff16565b6111c8576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6111d3600582612e9f565b61120c576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6000818152600260205260408120906112258282613d21565b611233600183016000613d21565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a25061129281614843565b9050611156565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106112d3576112d36147e5565b90506020028101906112e59190614b8c565b6112ee90614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611344906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611370906148bb565b80156113bd5780601f10611392576101008083540402835291602001916113bd565b820191906000526020600020905b8154815290600101906020018083116113a057829003601f168201915b5050505050815250509050831580156113ed5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611426576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015461147a5782604001516040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301516114b5576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154602084015181146115365760208401516114d690600790612afe565b1561150d576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208401516001830155611522600782612bb2565b50602084015161153490600790612e9f565b505b6060840151805160000361157857806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b8254600090849060049061159990640100000000900463ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff1602179055905060005b8251811015611686576115f18382815181106115d9576115d96147e5565b60200260200101516003612afe90919063ffffffff16565b61162957826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b61167583828151811061163e5761163e6147e5565b60200260200101518660030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b5061167f81614843565b90506115bb565b50855184547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9091169081178555604080880151600287018190556020808a01518351928352908201527f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a25050505050508061171190614843565b90506112b7565b600e5460609063ffffffff16600061173160018361487b565b63ffffffff1667ffffffffffffffff81111561174f5761174f613d8e565b60405190808252806020026020018201604052801561179557816020015b60408051808201909152600081526060602082015281526020019060019003908161176d5790505b509050600060015b8363ffffffff168163ffffffff1610156118ed5763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16156118dd5763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191611831906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461185d906148bb565b80156118aa5780601f1061187f576101008083540402835291602001916118aa565b820191906000526020600020905b81548152906001019060200180831161188d57829003601f168201915b5050505050815250508383815181106118c5576118c56147e5565b6020026020010181905250816118da90614843565b91505b6118e681614898565b905061179d565b50600e546107f99060019063ffffffff1661487b565b61190b612b19565b60005b818110156106a657600083838381811061192a5761192a6147e5565b905060200281019061193c9190614ca6565b61194590614ce9565b9050600061195b82600001518360200151610447565b9050611968600382612e9f565b6119a1576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6119ab8183612eab565b5050806119b790614843565b905061190e565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106119f8576119f86147e5565b9050602002810190611a0a9190614b8c565b611a1390614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611a69906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611a95906148bb565b8015611ae25780601f10611ab757610100808354040283529160200191611ae2565b820191906000526020600020905b815481529060010190602001808311611ac557829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611b485781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610612565b83158015611b6d5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611ba6576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015415611bfb5782604001516040517f5461848300000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b6040830151611c3e5782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301511580611c5b57506020830151611c5b90600790612afe565b15611c92576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611cd457806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b81548290600490611cf290640100000000900463ffffffff16614898565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611dd057611d3b8382815181106115d9576115d96147e5565b611d7357826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b611dbf838281518110611d8857611d886147e5565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b50611dc981614843565b9050611d1d565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611e269160079190612e9f16565b506040850151611e3890600990612e9f565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611e9390614843565b90506119dc565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610612565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611fda576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610612565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b848110156122d5576000868683818110612012576120126147e5565b90506020020160208101906120279190614230565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16612096576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610612565b60008686858181106120aa576120aa6147e5565b90506020028101906120bc919061490e565b6120c59061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16612116576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061215357503373ffffffffffffffffffffffffffffffffffffffff861614155b1561218c576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b8051825473ffffffffffffffffffffffffffffffffffffffff908116911614158061220857506020808201516040516121c59201613fdf565b60405160208183030381529060405280519060200120826001016040516020016121ef9190614d8f565b6040516020818303038152906040528051906020012014155b156122c157805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906122629082614a04565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516122b89190613fdf565b60405180910390a35b505050806122ce90614843565b9050611ff6565b505050505050565b61230d6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a08101909252805482908290612335906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612361906148bb565b80156123ae5780601f10612383576101008083540402835291602001916123ae565b820191906000526020600020905b81548152906001019060200180831161239157829003601f168201915b505050505081526020016001820180546123c7906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546123f3906148bb565b80156124405780601f1061241557610100808354040283529160200191612440565b820191906000526020600020905b81548152906001019060200180831161242357829003601f168201915b5050509183525050600282015460209091019060ff1660038111156124675761246761445b565b60038111156124785761247861445b565b81526020016002820160019054906101000a900460ff1660018111156124a0576124a061445b565b60018111156124b1576124b161445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b6124ea612b19565b63ffffffff8089166000908152600d602052604081205464010000000090049091169081900361254e576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610612565b6125a0888888886040518060a001604052808f63ffffffff1681526020018761257690614898565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff1681525061313f565b505050505050505050565b6125b3612b19565b600e805460009164010000000090910463ffffffff169060046125d583614898565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff8416608082015290915061266b90899089908990899061313f565b5050505050505050565b6060806126826003612e92565b915060006126906005612b9c565b835161269c9190614e38565b90508067ffffffffffffffff8111156126b7576126b7613d8e565b60405190808252806020026020018201604052801561271857816020015b6127056040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816126d55790505b50915060008167ffffffffffffffff81111561273657612736613d8e565b60405190808252806020026020018201604052801561275f578160200160208202803683370190505b5090506000805b85518110156129ce576000868281518110612783576127836147e5565b602002602001015190506127a1816005612afe90919063ffffffff16565b6129bd5760008181526002602052604090819020815160a081019092528054829082906127cd906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546127f9906148bb565b80156128465780601f1061281b57610100808354040283529160200191612846565b820191906000526020600020905b81548152906001019060200180831161282957829003601f168201915b5050505050815260200160018201805461285f906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461288b906148bb565b80156128d85780601f106128ad576101008083540402835291602001916128d8565b820191906000526020600020905b8154815290600101906020018083116128bb57829003601f168201915b5050509183525050600282015460209091019060ff1660038111156128ff576128ff61445b565b60038111156129105761291061445b565b81526020016002820160019054906101000a900460ff1660018111156129385761293861445b565b60018111156129495761294961445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff166020909101528651879085908110612988576129886147e5565b6020026020010181905250808484815181106129a6576129a66147e5565b60209081029190910101526129ba83614843565b92505b506129c781614843565b9050612766565b5090949293505050565b606060006129e66009612e92565b90506000815167ffffffffffffffff811115612a0457612a04613d8e565b604051908082528060200260200182016040528015612a8b57816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612a225790505b50905060005b825181101561080957612abc838281518110612aaf57612aaf6147e5565b6020026020010151611071565b828281518110612ace57612ace6147e5565b602002602001018190525080612ae390614843565b9050612a91565b612af2612b19565b612afb81613983565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610612565b565b6000610475825490565b6000612b128383613a78565b6000612b128383613aa2565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612c6f57602002820191906000526020600020905b815481526020019060010190808311612c5b575b505050505090506000815167ffffffffffffffff811115612c9257612c92613d8e565b604051908082528060200260200182016040528015612cd857816020015b604080518082019091526000815260606020820152815260200190600190039081612cb05790505b50905060005b8151811015612df9576040518060400160405280848381518110612d0457612d046147e5565b60200260200101518152602001856003016000868581518110612d2957612d296147e5565b602002602001015181526020019081526020016000208054612d4a906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612d76906148bb565b8015612dc35780601f10612d9857610100808354040283529160200191612dc3565b820191906000526020600020905b815481529060010190602001808311612da657829003601f168201915b5050505050815250828281518110612ddd57612ddd6147e5565b602002602001018190525080612df290614843565b9050612cde565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612e8085612e92565b81526020019190915295945050505050565b60606000612b1283613b95565b6000612b128383613bf1565b608081015173ffffffffffffffffffffffffffffffffffffffff1615612ff957608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612fa4575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612f7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa29190614e4b565b155b15612ff95760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610612565b6000828152600260205260409020815182919081906130189082614a04565b506020820151600182019061302d9082614a04565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561306f5761306f61445b565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360018111156130b6576130b661445b565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff16158061319157506080820151859061318c906001614e68565b60ff16115b156131da5760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101869052604401610612565b6001826020015163ffffffff1611156132ca57815163ffffffff166000908152600d60209081526040822090840151600191820191839161321b919061487b565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61324382612b9c565b8110156132c757613272846000015163ffffffff16600c60006105938587600001612ba690919063ffffffff16565b50600c60006132818484612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556132c081614843565b905061323a565b50505b60005b8581101561350c576132fa8787838181106132ea576132ea6147e5565b8592602090910201359050612e9f565b61335b578251878783818110613312576133126147e5565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8260600151156134b257825163ffffffff16600c6000898985818110613383576133836147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff16148015906133fd5750600c60008888848181106133ce576133ce6147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff1615155b1561345f578251878783818110613416576134166147e5565b6040517f60b9df7300000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8251600c6000898985818110613477576134776147e5565b90506020020135815260200190815260200160002060000160086101000a81548163ffffffff021916908363ffffffff1602179055506134fc565b82516134fa9063ffffffff16600c60008a8a868181106134d4576134d46147e5565b905060200201358152602001908152602001600020600401612e9f90919063ffffffff16565b505b61350581614843565b90506132cd565b5060005b838110156137f8573685858381811061352b5761352b6147e5565b905060200281019061353d919061490e565b905061354b60038235612afe565b613584576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b61359060058235612afe565b156135ca576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b80356000908152600384016020526040812080546135e7906148bb565b905011156136335783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610612565b60005b87811015613745576136da8235600c60008c8c86818110613659576136596147e5565b9050602002013581526020019081526020016000206003016000600c60008e8e88818110613689576136896147e5565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612afe90919063ffffffff16565b613735578888828181106136f0576136f06147e5565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610612565b61373e81614843565b9050613636565b506002830180546001810182556000918252602091829020833591015561376e90820182614e81565b8235600090815260038601602052604090209161378c919083614ee6565b5083516020808601516137e792918435908c908c906137ad90880188614e81565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c4092505050565b506137f181614843565b9050613510565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c158170365192613973929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610612565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613a8f57613a8f6147e5565b9060005260206000200154905092915050565b60008181526001830160205260408120548015613b8b576000613ac6600183614e38565b8554909150600090613ada90600190614e38565b9050818114613b3f576000866000018281548110613afa57613afa6147e5565b9060005260206000200154905080876000018481548110613b1d57613b1d6147e5565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b5057613b50615001565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610475565b6000915050610475565b606081600001805480602002602001604051908101604052809291908181526020018280548015613be557602002820191906000526020600020905b815481526020019060010190808311613bd1575b50505050509050919050565b6000818152600183016020526040812054613c3857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610475565b506000610475565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff16156122d557600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613ce7908690869086908b908d90600401615030565b600060405180830381600087803b158015613d0157600080fd5b505af1158015613d15573d6000803e3d6000fd5b50505050505050505050565b508054613d2d906148bb565b6000825580601f10613d3d575050565b601f016020900490600052602060002090810190612afb9190613d75565b5080546000825590600052602060002090810190612afb91905b5b80821115613d8a5760008155600101613d76565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613de057613de0613d8e565b60405290565b60405160a0810167ffffffffffffffff81118282101715613de057613de0613d8e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e5057613e50613d8e565b604052919050565b600067ffffffffffffffff821115613e7257613e72613d8e565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613eaf57600080fd5b8135613ec2613ebd82613e58565b613e09565b818152846020838601011115613ed757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f0757600080fd5b823567ffffffffffffffff80821115613f1f57600080fd5b613f2b86838701613e9e565b93506020850135915080821115613f4157600080fd5b50613f4e85828601613e9e565b9150509250929050565b600060208284031215613f6a57600080fd5b5035919050565b60005b83811015613f8c578181015183820152602001613f74565b50506000910152565b60008151808452613fad816020860160208601613f71565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612b126020830184613f95565b60008083601f84011261400457600080fd5b50813567ffffffffffffffff81111561401c57600080fd5b6020830191508360208260051b850101111561106a57600080fd5b6000806020838503121561404a57600080fd5b823567ffffffffffffffff81111561406157600080fd5b61406d85828601613ff2565b90969095509350505050565b600081518084526020808501945080840160005b838110156140a95781518752958201959082019060010161408d565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b8581101561411057828403895281518051855285015160408686018190526140fc81870183613f95565b9a87019a95505050908401906001016140d2565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a085015261417560e0850182614079565b905060c083015184820360c086015261418e82826140b4565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526141f885835161411d565b945092850192908501906001016141be565b5092979650505050505050565b803563ffffffff8116811461422b57600080fd5b919050565b60006020828403121561424257600080fd5b612b1282614217565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526142806040850182613f95565b949350505050565b602081526000612b12602083018461424b565b602081526000612b12602083018461411d565b600080604083850312156142c157600080fd5b6142ca83614217565b946020939093013593505050565b6040815260006142eb6040830185613f95565b828103602084015261418e8185613f95565b600063ffffffff80835116845280602084015116602085015280604084015116604085015250606082015160608401526080820151608084015260a082015160e060a085015261435060e0850182614079565b905060c083015184820360c086015261418e8282614079565b602081526000612b1260208301846142fd565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526143dd85835161424b565b945092850192908501906001016143a3565b6000806000806040858703121561440557600080fd5b843567ffffffffffffffff8082111561441d57600080fd5b61442988838901613ff2565b9096509450602087013591508082111561444257600080fd5b5061444f87828801613ff2565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a0845261449f60a0850182613f95565b9050602083015184820360208601526144b88282613f95565b9150506040830151600481106144d0576144d061445b565b60408501526060830151600281106144ea576144ea61445b565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612b12602083018461448a565b8015158114612afb57600080fd5b803560ff8116811461422b57600080fd5b60008060008060008060008060c0898b03121561456557600080fd5b61456e89614217565b9750602089013567ffffffffffffffff8082111561458b57600080fd5b6145978c838d01613ff2565b909950975060408b01359150808211156145b057600080fd5b506145bd8b828c01613ff2565b90965094505060608901356145d18161452a565b925060808901356145e18161452a565b91506145ef60a08a01614538565b90509295985092959890939650565b600080600080600080600060a0888a03121561461957600080fd5b873567ffffffffffffffff8082111561463157600080fd5b61463d8b838c01613ff2565b909950975060208a013591508082111561465657600080fd5b506146638a828b01613ff2565b90965094505060408801356146778161452a565b925060608801356146878161452a565b915061469560808901614538565b905092959891949750929550565b6040815260006146b66040830185614079565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015614724577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087840301855261471283835161448a565b948601949250908501906001016146d8565b50909998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526147948583516142fd565b9450928501929085019060010161475a565b803573ffffffffffffffffffffffffffffffffffffffff8116811461422b57600080fd5b6000602082840312156147dc57600080fd5b612b12826147a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361487457614874614814565b5060010190565b63ffffffff82811682821603908082111561080957610809614814565b600063ffffffff8083168181036148b1576148b1614814565b6001019392505050565b600181811c908216806148cf57607f821691505b602082108103614908577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261494257600080fd5b9190910192915050565b60006040823603121561495e57600080fd5b6040516040810167ffffffffffffffff828210818311171561498257614982613d8e565b8160405261498f856147a6565b835260208501359150808211156149a557600080fd5b506149b236828601613e9e565b60208301525092915050565b601f8211156106a657600081815260208120601f850160051c810160208610156149e55750805b601f850160051c820191505b818110156122d5578281556001016149f1565b815167ffffffffffffffff811115614a1e57614a1e613d8e565b614a3281614a2c84546148bb565b846149be565b602080601f831160018114614a855760008415614a4f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556122d5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614ad257888601518255948401946001909101908401614ab3565b5085821015614b0e57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614b3057600080fd5b815167ffffffffffffffff811115614b4757600080fd5b8201601f81018413614b5857600080fd5b8051614b66613ebd82613e58565b818152856020838501011115614b7b57600080fd5b61418e826020830160208601613f71565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261494257600080fd5b600060808236031215614bd257600080fd5b614bda613dbd565b614be383614217565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff80821115614c1457600080fd5b9085019036601f830112614c2757600080fd5b813581811115614c3957614c39613d8e565b8060051b9150614c4a848301613e09565b8181529183018401918481019036841115614c6457600080fd5b938501935b83851015614c8257843582529385019390850190614c69565b606087015250939695505050505050565b602081526000612b126020830184614079565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261494257600080fd5b80356002811061422b57600080fd5b600060a08236031215614cfb57600080fd5b614d03613de6565b823567ffffffffffffffff80821115614d1b57600080fd5b614d2736838701613e9e565b83526020850135915080821115614d3d57600080fd5b50614d4a36828601613e9e565b602083015250604083013560048110614d6257600080fd5b6040820152614d7360608401614cda565b6060820152614d84608084016147a6565b608082015292915050565b6000602080835260008454614da3816148bb565b80848701526040600180841660008114614dc45760018114614dfc57614e2a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614e2a565b896000528660002060005b85811015614e225781548b8201860152908301908801614e07565b8a0184019650505b509398975050505050505050565b8181038181111561047557610475614814565b600060208284031215614e5d57600080fd5b8151612b128161452a565b60ff818116838216019081111561047557610475614814565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614eb657600080fd5b83018035915067ffffffffffffffff821115614ed157600080fd5b60200191503681900382131561106a57600080fd5b67ffffffffffffffff831115614efe57614efe613d8e565b614f1283614f0c83546148bb565b836149be565b6000601f841160018114614f645760008515614f2e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614ffa565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614fb35786850135825560209485019460019092019101614f93565b5086821015614fee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561506957600080fd5b8560051b808860a0850137820182810360a0908101602085015261508f90820187613f95565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", } -var CapabilityRegistryABI = CapabilityRegistryMetaData.ABI +var CapabilitiesRegistryABI = CapabilitiesRegistryMetaData.ABI -var CapabilityRegistryBin = CapabilityRegistryMetaData.Bin +var CapabilitiesRegistryBin = CapabilitiesRegistryMetaData.Bin -func DeployCapabilityRegistry(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *CapabilityRegistry, error) { - parsed, err := CapabilityRegistryMetaData.GetAbi() +func DeployCapabilitiesRegistry(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *CapabilitiesRegistry, error) { + parsed, err := CapabilitiesRegistryMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } @@ -93,134 +93,134 @@ func DeployCapabilityRegistry(auth *bind.TransactOpts, backend bind.ContractBack return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CapabilityRegistryBin), backend) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CapabilitiesRegistryBin), backend) if err != nil { return common.Address{}, nil, nil, err } - return address, tx, &CapabilityRegistry{address: address, abi: *parsed, CapabilityRegistryCaller: CapabilityRegistryCaller{contract: contract}, CapabilityRegistryTransactor: CapabilityRegistryTransactor{contract: contract}, CapabilityRegistryFilterer: CapabilityRegistryFilterer{contract: contract}}, nil + return address, tx, &CapabilitiesRegistry{address: address, abi: *parsed, CapabilitiesRegistryCaller: CapabilitiesRegistryCaller{contract: contract}, CapabilitiesRegistryTransactor: CapabilitiesRegistryTransactor{contract: contract}, CapabilitiesRegistryFilterer: CapabilitiesRegistryFilterer{contract: contract}}, nil } -type CapabilityRegistry struct { +type CapabilitiesRegistry struct { address common.Address abi abi.ABI - CapabilityRegistryCaller - CapabilityRegistryTransactor - CapabilityRegistryFilterer + CapabilitiesRegistryCaller + CapabilitiesRegistryTransactor + CapabilitiesRegistryFilterer } -type CapabilityRegistryCaller struct { +type CapabilitiesRegistryCaller struct { contract *bind.BoundContract } -type CapabilityRegistryTransactor struct { +type CapabilitiesRegistryTransactor struct { contract *bind.BoundContract } -type CapabilityRegistryFilterer struct { +type CapabilitiesRegistryFilterer struct { contract *bind.BoundContract } -type CapabilityRegistrySession struct { - Contract *CapabilityRegistry +type CapabilitiesRegistrySession struct { + Contract *CapabilitiesRegistry CallOpts bind.CallOpts TransactOpts bind.TransactOpts } -type CapabilityRegistryCallerSession struct { - Contract *CapabilityRegistryCaller +type CapabilitiesRegistryCallerSession struct { + Contract *CapabilitiesRegistryCaller CallOpts bind.CallOpts } -type CapabilityRegistryTransactorSession struct { - Contract *CapabilityRegistryTransactor +type CapabilitiesRegistryTransactorSession struct { + Contract *CapabilitiesRegistryTransactor TransactOpts bind.TransactOpts } -type CapabilityRegistryRaw struct { - Contract *CapabilityRegistry +type CapabilitiesRegistryRaw struct { + Contract *CapabilitiesRegistry } -type CapabilityRegistryCallerRaw struct { - Contract *CapabilityRegistryCaller +type CapabilitiesRegistryCallerRaw struct { + Contract *CapabilitiesRegistryCaller } -type CapabilityRegistryTransactorRaw struct { - Contract *CapabilityRegistryTransactor +type CapabilitiesRegistryTransactorRaw struct { + Contract *CapabilitiesRegistryTransactor } -func NewCapabilityRegistry(address common.Address, backend bind.ContractBackend) (*CapabilityRegistry, error) { - abi, err := abi.JSON(strings.NewReader(CapabilityRegistryABI)) +func NewCapabilitiesRegistry(address common.Address, backend bind.ContractBackend) (*CapabilitiesRegistry, error) { + abi, err := abi.JSON(strings.NewReader(CapabilitiesRegistryABI)) if err != nil { return nil, err } - contract, err := bindCapabilityRegistry(address, backend, backend, backend) + contract, err := bindCapabilitiesRegistry(address, backend, backend, backend) if err != nil { return nil, err } - return &CapabilityRegistry{address: address, abi: abi, CapabilityRegistryCaller: CapabilityRegistryCaller{contract: contract}, CapabilityRegistryTransactor: CapabilityRegistryTransactor{contract: contract}, CapabilityRegistryFilterer: CapabilityRegistryFilterer{contract: contract}}, nil + return &CapabilitiesRegistry{address: address, abi: abi, CapabilitiesRegistryCaller: CapabilitiesRegistryCaller{contract: contract}, CapabilitiesRegistryTransactor: CapabilitiesRegistryTransactor{contract: contract}, CapabilitiesRegistryFilterer: CapabilitiesRegistryFilterer{contract: contract}}, nil } -func NewCapabilityRegistryCaller(address common.Address, caller bind.ContractCaller) (*CapabilityRegistryCaller, error) { - contract, err := bindCapabilityRegistry(address, caller, nil, nil) +func NewCapabilitiesRegistryCaller(address common.Address, caller bind.ContractCaller) (*CapabilitiesRegistryCaller, error) { + contract, err := bindCapabilitiesRegistry(address, caller, nil, nil) if err != nil { return nil, err } - return &CapabilityRegistryCaller{contract: contract}, nil + return &CapabilitiesRegistryCaller{contract: contract}, nil } -func NewCapabilityRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*CapabilityRegistryTransactor, error) { - contract, err := bindCapabilityRegistry(address, nil, transactor, nil) +func NewCapabilitiesRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*CapabilitiesRegistryTransactor, error) { + contract, err := bindCapabilitiesRegistry(address, nil, transactor, nil) if err != nil { return nil, err } - return &CapabilityRegistryTransactor{contract: contract}, nil + return &CapabilitiesRegistryTransactor{contract: contract}, nil } -func NewCapabilityRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*CapabilityRegistryFilterer, error) { - contract, err := bindCapabilityRegistry(address, nil, nil, filterer) +func NewCapabilitiesRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*CapabilitiesRegistryFilterer, error) { + contract, err := bindCapabilitiesRegistry(address, nil, nil, filterer) if err != nil { return nil, err } - return &CapabilityRegistryFilterer{contract: contract}, nil + return &CapabilitiesRegistryFilterer{contract: contract}, nil } -func bindCapabilityRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := CapabilityRegistryMetaData.GetAbi() +func bindCapabilitiesRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CapabilitiesRegistryMetaData.GetAbi() if err != nil { return nil, err } return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } -func (_CapabilityRegistry *CapabilityRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CapabilityRegistry.Contract.CapabilityRegistryCaller.contract.Call(opts, result, method, params...) +func (_CapabilitiesRegistry *CapabilitiesRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CapabilitiesRegistry.Contract.CapabilitiesRegistryCaller.contract.Call(opts, result, method, params...) } -func (_CapabilityRegistry *CapabilityRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.CapabilityRegistryTransactor.contract.Transfer(opts) +func (_CapabilitiesRegistry *CapabilitiesRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.CapabilitiesRegistryTransactor.contract.Transfer(opts) } -func (_CapabilityRegistry *CapabilityRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.CapabilityRegistryTransactor.contract.Transact(opts, method, params...) +func (_CapabilitiesRegistry *CapabilitiesRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.CapabilitiesRegistryTransactor.contract.Transact(opts, method, params...) } -func (_CapabilityRegistry *CapabilityRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CapabilityRegistry.Contract.contract.Call(opts, result, method, params...) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CapabilitiesRegistry.Contract.contract.Call(opts, result, method, params...) } -func (_CapabilityRegistry *CapabilityRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.contract.Transfer(opts) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.contract.Transfer(opts) } -func (_CapabilityRegistry *CapabilityRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.contract.Transact(opts, method, params...) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.contract.Transact(opts, method, params...) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilities(opts *bind.CallOpts) (GetCapabilities, +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapabilities(opts *bind.CallOpts) (GetCapabilities, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getCapabilities") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getCapabilities") outstruct := new(GetCapabilities) if err != nil { @@ -228,49 +228,49 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilities(opts *bind. } outstruct.HashedCapabilityIds = *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte) - outstruct.Capabilities = *abi.ConvertType(out[1], new([]CapabilityRegistryCapability)).(*[]CapabilityRegistryCapability) + outstruct.Capabilities = *abi.ConvertType(out[1], new([]CapabilitiesRegistryCapability)).(*[]CapabilitiesRegistryCapability) return *outstruct, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetCapabilities() (GetCapabilities, +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapabilities() (GetCapabilities, error) { - return _CapabilityRegistry.Contract.GetCapabilities(&_CapabilityRegistry.CallOpts) + return _CapabilitiesRegistry.Contract.GetCapabilities(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetCapabilities() (GetCapabilities, +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapabilities() (GetCapabilities, error) { - return _CapabilityRegistry.Contract.GetCapabilities(&_CapabilityRegistry.CallOpts) + return _CapabilitiesRegistry.Contract.GetCapabilities(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilityRegistryCapability, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilitiesRegistryCapability, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getCapability", hashedId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getCapability", hashedId) if err != nil { - return *new(CapabilityRegistryCapability), err + return *new(CapabilitiesRegistryCapability), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryCapability)).(*CapabilityRegistryCapability) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryCapability)).(*CapabilitiesRegistryCapability) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetCapability(hashedId [32]byte) (CapabilityRegistryCapability, error) { - return _CapabilityRegistry.Contract.GetCapability(&_CapabilityRegistry.CallOpts, hashedId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapability(hashedId [32]byte) (CapabilitiesRegistryCapability, error) { + return _CapabilitiesRegistry.Contract.GetCapability(&_CapabilitiesRegistry.CallOpts, hashedId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetCapability(hashedId [32]byte) (CapabilityRegistryCapability, error) { - return _CapabilityRegistry.Contract.GetCapability(&_CapabilityRegistry.CallOpts, hashedId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapability(hashedId [32]byte) (CapabilitiesRegistryCapability, error) { + return _CapabilitiesRegistry.Contract.GetCapability(&_CapabilitiesRegistry.CallOpts, hashedId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getCapabilityConfigs", donId, capabilityId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getCapabilityConfigs", donId, capabilityId) if err != nil { return *new([]byte), *new([]byte), err @@ -283,61 +283,61 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilityConfigs(opts * } -func (_CapabilityRegistry *CapabilityRegistrySession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { - return _CapabilityRegistry.Contract.GetCapabilityConfigs(&_CapabilityRegistry.CallOpts, donId, capabilityId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { + return _CapabilitiesRegistry.Contract.GetCapabilityConfigs(&_CapabilitiesRegistry.CallOpts, donId, capabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { - return _CapabilityRegistry.Contract.GetCapabilityConfigs(&_CapabilityRegistry.CallOpts, donId, capabilityId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { + return _CapabilitiesRegistry.Contract.GetCapabilityConfigs(&_CapabilitiesRegistry.CallOpts, donId, capabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetDON(opts *bind.CallOpts, donId uint32) (CapabilityRegistryDONInfo, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetDON(opts *bind.CallOpts, donId uint32) (CapabilitiesRegistryDONInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getDON", donId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getDON", donId) if err != nil { - return *new(CapabilityRegistryDONInfo), err + return *new(CapabilitiesRegistryDONInfo), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryDONInfo)).(*CapabilityRegistryDONInfo) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryDONInfo)).(*CapabilitiesRegistryDONInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetDON(donId uint32) (CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDON(&_CapabilityRegistry.CallOpts, donId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetDON(donId uint32) (CapabilitiesRegistryDONInfo, error) { + return _CapabilitiesRegistry.Contract.GetDON(&_CapabilitiesRegistry.CallOpts, donId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetDON(donId uint32) (CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDON(&_CapabilityRegistry.CallOpts, donId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetDON(donId uint32) (CapabilitiesRegistryDONInfo, error) { + return _CapabilitiesRegistry.Contract.GetDON(&_CapabilitiesRegistry.CallOpts, donId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetDONs(opts *bind.CallOpts) ([]CapabilityRegistryDONInfo, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetDONs(opts *bind.CallOpts) ([]CapabilitiesRegistryDONInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getDONs") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getDONs") if err != nil { - return *new([]CapabilityRegistryDONInfo), err + return *new([]CapabilitiesRegistryDONInfo), err } - out0 := *abi.ConvertType(out[0], new([]CapabilityRegistryDONInfo)).(*[]CapabilityRegistryDONInfo) + out0 := *abi.ConvertType(out[0], new([]CapabilitiesRegistryDONInfo)).(*[]CapabilitiesRegistryDONInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetDONs() ([]CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDONs(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetDONs() ([]CapabilitiesRegistryDONInfo, error) { + return _CapabilitiesRegistry.Contract.GetDONs(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetDONs() ([]CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDONs(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetDONs() ([]CapabilitiesRegistryDONInfo, error) { + return _CapabilitiesRegistry.Contract.GetDONs(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getHashedCapabilityId", labelledName, version) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getHashedCapabilityId", labelledName, version) if err != nil { return *new([32]byte), err @@ -349,105 +349,105 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) GetHashedCapabilityId(opts } -func (_CapabilityRegistry *CapabilityRegistrySession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { - return _CapabilityRegistry.Contract.GetHashedCapabilityId(&_CapabilityRegistry.CallOpts, labelledName, version) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { + return _CapabilitiesRegistry.Contract.GetHashedCapabilityId(&_CapabilitiesRegistry.CallOpts, labelledName, version) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { - return _CapabilityRegistry.Contract.GetHashedCapabilityId(&_CapabilityRegistry.CallOpts, labelledName, version) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { + return _CapabilitiesRegistry.Contract.GetHashedCapabilityId(&_CapabilitiesRegistry.CallOpts, labelledName, version) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilitiesRegistryNodeInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getNode", p2pId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getNode", p2pId) if err != nil { - return *new(CapabilityRegistryNodeInfo), err + return *new(CapabilitiesRegistryNodeInfo), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryNodeInfo)).(*CapabilityRegistryNodeInfo) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryNodeInfo)).(*CapabilitiesRegistryNodeInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNode(p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { - return _CapabilityRegistry.Contract.GetNode(&_CapabilityRegistry.CallOpts, p2pId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetNode(p2pId [32]byte) (CapabilitiesRegistryNodeInfo, error) { + return _CapabilitiesRegistry.Contract.GetNode(&_CapabilitiesRegistry.CallOpts, p2pId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNode(p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { - return _CapabilityRegistry.Contract.GetNode(&_CapabilityRegistry.CallOpts, p2pId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetNode(p2pId [32]byte) (CapabilitiesRegistryNodeInfo, error) { + return _CapabilitiesRegistry.Contract.GetNode(&_CapabilitiesRegistry.CallOpts, p2pId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilitiesRegistryNodeOperator, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getNodeOperator", nodeOperatorId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getNodeOperator", nodeOperatorId) if err != nil { - return *new(CapabilityRegistryNodeOperator), err + return *new(CapabilitiesRegistryNodeOperator), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryNodeOperator)).(*CapabilityRegistryNodeOperator) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryNodeOperator)).(*CapabilitiesRegistryNodeOperator) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNodeOperator(nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { - return _CapabilityRegistry.Contract.GetNodeOperator(&_CapabilityRegistry.CallOpts, nodeOperatorId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetNodeOperator(nodeOperatorId uint32) (CapabilitiesRegistryNodeOperator, error) { + return _CapabilitiesRegistry.Contract.GetNodeOperator(&_CapabilitiesRegistry.CallOpts, nodeOperatorId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodeOperator(nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { - return _CapabilityRegistry.Contract.GetNodeOperator(&_CapabilityRegistry.CallOpts, nodeOperatorId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetNodeOperator(nodeOperatorId uint32) (CapabilitiesRegistryNodeOperator, error) { + return _CapabilitiesRegistry.Contract.GetNodeOperator(&_CapabilitiesRegistry.CallOpts, nodeOperatorId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodeOperators(opts *bind.CallOpts) ([]CapabilityRegistryNodeOperator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetNodeOperators(opts *bind.CallOpts) ([]CapabilitiesRegistryNodeOperator, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getNodeOperators") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getNodeOperators") if err != nil { - return *new([]CapabilityRegistryNodeOperator), err + return *new([]CapabilitiesRegistryNodeOperator), err } - out0 := *abi.ConvertType(out[0], new([]CapabilityRegistryNodeOperator)).(*[]CapabilityRegistryNodeOperator) + out0 := *abi.ConvertType(out[0], new([]CapabilitiesRegistryNodeOperator)).(*[]CapabilitiesRegistryNodeOperator) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNodeOperators() ([]CapabilityRegistryNodeOperator, error) { - return _CapabilityRegistry.Contract.GetNodeOperators(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetNodeOperators() ([]CapabilitiesRegistryNodeOperator, error) { + return _CapabilitiesRegistry.Contract.GetNodeOperators(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodeOperators() ([]CapabilityRegistryNodeOperator, error) { - return _CapabilityRegistry.Contract.GetNodeOperators(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetNodeOperators() ([]CapabilitiesRegistryNodeOperator, error) { + return _CapabilitiesRegistry.Contract.GetNodeOperators(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodes(opts *bind.CallOpts) ([]CapabilityRegistryNodeInfo, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetNodes(opts *bind.CallOpts) ([]CapabilitiesRegistryNodeInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getNodes") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getNodes") if err != nil { - return *new([]CapabilityRegistryNodeInfo), err + return *new([]CapabilitiesRegistryNodeInfo), err } - out0 := *abi.ConvertType(out[0], new([]CapabilityRegistryNodeInfo)).(*[]CapabilityRegistryNodeInfo) + out0 := *abi.ConvertType(out[0], new([]CapabilitiesRegistryNodeInfo)).(*[]CapabilitiesRegistryNodeInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNodes() ([]CapabilityRegistryNodeInfo, error) { - return _CapabilityRegistry.Contract.GetNodes(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetNodes() ([]CapabilitiesRegistryNodeInfo, error) { + return _CapabilitiesRegistry.Contract.GetNodes(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodes() ([]CapabilityRegistryNodeInfo, error) { - return _CapabilityRegistry.Contract.GetNodes(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetNodes() ([]CapabilitiesRegistryNodeInfo, error) { + return _CapabilitiesRegistry.Contract.GetNodes(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) IsCapabilityDeprecated(opts *bind.CallOpts, hashedCapabilityId [32]byte) (bool, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) IsCapabilityDeprecated(opts *bind.CallOpts, hashedCapabilityId [32]byte) (bool, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "isCapabilityDeprecated", hashedCapabilityId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "isCapabilityDeprecated", hashedCapabilityId) if err != nil { return *new(bool), err @@ -459,17 +459,17 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) IsCapabilityDeprecated(opts } -func (_CapabilityRegistry *CapabilityRegistrySession) IsCapabilityDeprecated(hashedCapabilityId [32]byte) (bool, error) { - return _CapabilityRegistry.Contract.IsCapabilityDeprecated(&_CapabilityRegistry.CallOpts, hashedCapabilityId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) IsCapabilityDeprecated(hashedCapabilityId [32]byte) (bool, error) { + return _CapabilitiesRegistry.Contract.IsCapabilityDeprecated(&_CapabilitiesRegistry.CallOpts, hashedCapabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) IsCapabilityDeprecated(hashedCapabilityId [32]byte) (bool, error) { - return _CapabilityRegistry.Contract.IsCapabilityDeprecated(&_CapabilityRegistry.CallOpts, hashedCapabilityId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) IsCapabilityDeprecated(hashedCapabilityId [32]byte) (bool, error) { + return _CapabilitiesRegistry.Contract.IsCapabilityDeprecated(&_CapabilitiesRegistry.CallOpts, hashedCapabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "owner") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "owner") if err != nil { return *new(common.Address), err @@ -481,17 +481,17 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) Owner(opts *bind.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistrySession) Owner() (common.Address, error) { - return _CapabilityRegistry.Contract.Owner(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) Owner() (common.Address, error) { + return _CapabilitiesRegistry.Contract.Owner(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) Owner() (common.Address, error) { - return _CapabilityRegistry.Contract.Owner(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) Owner() (common.Address, error) { + return _CapabilitiesRegistry.Contract.Owner(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "typeAndVersion") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "typeAndVersion") if err != nil { return *new(string), err @@ -503,172 +503,172 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) TypeAndVersion(opts *bind.C } -func (_CapabilityRegistry *CapabilityRegistrySession) TypeAndVersion() (string, error) { - return _CapabilityRegistry.Contract.TypeAndVersion(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) TypeAndVersion() (string, error) { + return _CapabilitiesRegistry.Contract.TypeAndVersion(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) TypeAndVersion() (string, error) { - return _CapabilityRegistry.Contract.TypeAndVersion(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) TypeAndVersion() (string, error) { + return _CapabilitiesRegistry.Contract.TypeAndVersion(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "acceptOwnership") +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "acceptOwnership") } -func (_CapabilityRegistry *CapabilityRegistrySession) AcceptOwnership() (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AcceptOwnership(&_CapabilityRegistry.TransactOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AcceptOwnership() (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AcceptOwnership(&_CapabilitiesRegistry.TransactOpts) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AcceptOwnership(&_CapabilityRegistry.TransactOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AcceptOwnership(&_CapabilitiesRegistry.TransactOpts) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addCapabilities", capabilities) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilitiesRegistryCapability) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "addCapabilities", capabilities) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddCapabilities(capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddCapabilities(&_CapabilityRegistry.TransactOpts, capabilities) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AddCapabilities(capabilities []CapabilitiesRegistryCapability) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddCapabilities(&_CapabilitiesRegistry.TransactOpts, capabilities) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddCapabilities(capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddCapabilities(&_CapabilityRegistry.TransactOpts, capabilities) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AddCapabilities(capabilities []CapabilitiesRegistryCapability) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddCapabilities(&_CapabilitiesRegistry.TransactOpts, capabilities) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addDON", nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "addDON", nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddDON(&_CapabilityRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddDON(&_CapabilitiesRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddDON(&_CapabilityRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddDON(&_CapabilitiesRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addNodeOperators", nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "addNodeOperators", nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddNodeOperators(nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AddNodeOperators(nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddNodeOperators(nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AddNodeOperators(nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addNodes", nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AddNodes(opts *bind.TransactOpts, nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "addNodes", nodes) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddNodes(&_CapabilityRegistry.TransactOpts, nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AddNodes(nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddNodes(&_CapabilitiesRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddNodes(&_CapabilityRegistry.TransactOpts, nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AddNodes(nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddNodes(&_CapabilitiesRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "deprecateCapabilities", hashedCapabilityIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "deprecateCapabilities", hashedCapabilityIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.DeprecateCapabilities(&_CapabilityRegistry.TransactOpts, hashedCapabilityIds) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.DeprecateCapabilities(&_CapabilitiesRegistry.TransactOpts, hashedCapabilityIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.DeprecateCapabilities(&_CapabilityRegistry.TransactOpts, hashedCapabilityIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.DeprecateCapabilities(&_CapabilitiesRegistry.TransactOpts, hashedCapabilityIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveDONs(opts *bind.TransactOpts, donIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "removeDONs", donIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) RemoveDONs(opts *bind.TransactOpts, donIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "removeDONs", donIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) RemoveDONs(donIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveDONs(&_CapabilityRegistry.TransactOpts, donIds) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) RemoveDONs(donIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveDONs(&_CapabilitiesRegistry.TransactOpts, donIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveDONs(donIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveDONs(&_CapabilityRegistry.TransactOpts, donIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) RemoveDONs(donIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveDONs(&_CapabilitiesRegistry.TransactOpts, donIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "removeNodeOperators", nodeOperatorIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) RemoveNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "removeNodeOperators", nodeOperatorIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperatorIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperatorIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveNodes(opts *bind.TransactOpts, removedNodeP2PIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "removeNodes", removedNodeP2PIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) RemoveNodes(opts *bind.TransactOpts, removedNodeP2PIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "removeNodes", removedNodeP2PIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) RemoveNodes(removedNodeP2PIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveNodes(&_CapabilityRegistry.TransactOpts, removedNodeP2PIds) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) RemoveNodes(removedNodeP2PIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveNodes(&_CapabilitiesRegistry.TransactOpts, removedNodeP2PIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveNodes(removedNodeP2PIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveNodes(&_CapabilityRegistry.TransactOpts, removedNodeP2PIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) RemoveNodes(removedNodeP2PIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveNodes(&_CapabilitiesRegistry.TransactOpts, removedNodeP2PIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "transferOwnership", to) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "transferOwnership", to) } -func (_CapabilityRegistry *CapabilityRegistrySession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.TransferOwnership(&_CapabilityRegistry.TransactOpts, to) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.TransferOwnership(&_CapabilitiesRegistry.TransactOpts, to) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.TransferOwnership(&_CapabilityRegistry.TransactOpts, to) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.TransferOwnership(&_CapabilitiesRegistry.TransactOpts, to) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "updateDON", donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "updateDON", donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateDON(&_CapabilityRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateDON(&_CapabilitiesRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateDON(&_CapabilityRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateDON(&_CapabilitiesRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "updateNodeOperators", nodeOperatorIds, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "updateNodeOperators", nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "updateNodes", nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) UpdateNodes(opts *bind.TransactOpts, nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "updateNodes", nodes) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateNodes(&_CapabilityRegistry.TransactOpts, nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) UpdateNodes(nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateNodes(&_CapabilitiesRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateNodes(&_CapabilityRegistry.TransactOpts, nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) UpdateNodes(nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateNodes(&_CapabilitiesRegistry.TransactOpts, nodes) } -type CapabilityRegistryCapabilityConfiguredIterator struct { - Event *CapabilityRegistryCapabilityConfigured +type CapabilitiesRegistryCapabilityConfiguredIterator struct { + Event *CapabilitiesRegistryCapabilityConfigured contract *bind.BoundContract event string @@ -679,7 +679,7 @@ type CapabilityRegistryCapabilityConfiguredIterator struct { fail error } -func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { +func (it *CapabilitiesRegistryCapabilityConfiguredIterator) Next() bool { if it.fail != nil { return false @@ -688,7 +688,7 @@ func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityConfigured) + it.Event = new(CapabilitiesRegistryCapabilityConfigured) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -703,7 +703,7 @@ func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityConfigured) + it.Event = new(CapabilitiesRegistryCapabilityConfigured) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -718,42 +718,42 @@ func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { } } -func (it *CapabilityRegistryCapabilityConfiguredIterator) Error() error { +func (it *CapabilitiesRegistryCapabilityConfiguredIterator) Error() error { return it.fail } -func (it *CapabilityRegistryCapabilityConfiguredIterator) Close() error { +func (it *CapabilitiesRegistryCapabilityConfiguredIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryCapabilityConfigured struct { +type CapabilitiesRegistryCapabilityConfigured struct { HashedCapabilityId [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityConfiguredIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilitiesRegistryCapabilityConfiguredIterator, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) if err != nil { return nil, err } - return &CapabilityRegistryCapabilityConfiguredIterator{contract: _CapabilityRegistry.contract, event: "CapabilityConfigured", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryCapabilityConfiguredIterator{contract: _CapabilitiesRegistry.contract, event: "CapabilityConfigured", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) if err != nil { return nil, err } @@ -763,8 +763,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityConfigured select { case log := <-logs: - event := new(CapabilityRegistryCapabilityConfigured) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { + event := new(CapabilitiesRegistryCapabilityConfigured) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { return err } event.Raw = log @@ -785,17 +785,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityConfigured }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseCapabilityConfigured(log types.Log) (*CapabilityRegistryCapabilityConfigured, error) { - event := new(CapabilityRegistryCapabilityConfigured) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseCapabilityConfigured(log types.Log) (*CapabilitiesRegistryCapabilityConfigured, error) { + event := new(CapabilitiesRegistryCapabilityConfigured) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryCapabilityDeprecatedIterator struct { - Event *CapabilityRegistryCapabilityDeprecated +type CapabilitiesRegistryCapabilityDeprecatedIterator struct { + Event *CapabilitiesRegistryCapabilityDeprecated contract *bind.BoundContract event string @@ -806,7 +806,7 @@ type CapabilityRegistryCapabilityDeprecatedIterator struct { fail error } -func (it *CapabilityRegistryCapabilityDeprecatedIterator) Next() bool { +func (it *CapabilitiesRegistryCapabilityDeprecatedIterator) Next() bool { if it.fail != nil { return false @@ -815,7 +815,7 @@ func (it *CapabilityRegistryCapabilityDeprecatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityDeprecated) + it.Event = new(CapabilitiesRegistryCapabilityDeprecated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -830,7 +830,7 @@ func (it *CapabilityRegistryCapabilityDeprecatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityDeprecated) + it.Event = new(CapabilitiesRegistryCapabilityDeprecated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -845,42 +845,42 @@ func (it *CapabilityRegistryCapabilityDeprecatedIterator) Next() bool { } } -func (it *CapabilityRegistryCapabilityDeprecatedIterator) Error() error { +func (it *CapabilitiesRegistryCapabilityDeprecatedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryCapabilityDeprecatedIterator) Close() error { +func (it *CapabilitiesRegistryCapabilityDeprecatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryCapabilityDeprecated struct { +type CapabilitiesRegistryCapabilityDeprecated struct { HashedCapabilityId [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityDeprecatedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilitiesRegistryCapabilityDeprecatedIterator, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "CapabilityDeprecated", hashedCapabilityIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "CapabilityDeprecated", hashedCapabilityIdRule) if err != nil { return nil, err } - return &CapabilityRegistryCapabilityDeprecatedIterator{contract: _CapabilityRegistry.contract, event: "CapabilityDeprecated", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryCapabilityDeprecatedIterator{contract: _CapabilitiesRegistry.contract, event: "CapabilityDeprecated", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityDeprecated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityDeprecated, hashedCapabilityId [][32]byte) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchCapabilityDeprecated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryCapabilityDeprecated, hashedCapabilityId [][32]byte) (event.Subscription, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "CapabilityDeprecated", hashedCapabilityIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "CapabilityDeprecated", hashedCapabilityIdRule) if err != nil { return nil, err } @@ -890,8 +890,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityDeprecated select { case log := <-logs: - event := new(CapabilityRegistryCapabilityDeprecated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityDeprecated", log); err != nil { + event := new(CapabilitiesRegistryCapabilityDeprecated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "CapabilityDeprecated", log); err != nil { return err } event.Raw = log @@ -912,17 +912,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityDeprecated }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseCapabilityDeprecated(log types.Log) (*CapabilityRegistryCapabilityDeprecated, error) { - event := new(CapabilityRegistryCapabilityDeprecated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityDeprecated", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseCapabilityDeprecated(log types.Log) (*CapabilitiesRegistryCapabilityDeprecated, error) { + event := new(CapabilitiesRegistryCapabilityDeprecated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "CapabilityDeprecated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryConfigSetIterator struct { - Event *CapabilityRegistryConfigSet +type CapabilitiesRegistryConfigSetIterator struct { + Event *CapabilitiesRegistryConfigSet contract *bind.BoundContract event string @@ -933,7 +933,7 @@ type CapabilityRegistryConfigSetIterator struct { fail error } -func (it *CapabilityRegistryConfigSetIterator) Next() bool { +func (it *CapabilitiesRegistryConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -942,7 +942,7 @@ func (it *CapabilityRegistryConfigSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryConfigSet) + it.Event = new(CapabilitiesRegistryConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -957,7 +957,7 @@ func (it *CapabilityRegistryConfigSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryConfigSet) + it.Event = new(CapabilitiesRegistryConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -972,33 +972,33 @@ func (it *CapabilityRegistryConfigSetIterator) Next() bool { } } -func (it *CapabilityRegistryConfigSetIterator) Error() error { +func (it *CapabilitiesRegistryConfigSetIterator) Error() error { return it.fail } -func (it *CapabilityRegistryConfigSetIterator) Close() error { +func (it *CapabilitiesRegistryConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryConfigSet struct { +type CapabilitiesRegistryConfigSet struct { DonId uint32 ConfigCount uint32 Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterConfigSet(opts *bind.FilterOpts) (*CapabilityRegistryConfigSetIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterConfigSet(opts *bind.FilterOpts) (*CapabilitiesRegistryConfigSetIterator, error) { - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "ConfigSet") + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "ConfigSet") if err != nil { return nil, err } - return &CapabilityRegistryConfigSetIterator{contract: _CapabilityRegistry.contract, event: "ConfigSet", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryConfigSetIterator{contract: _CapabilitiesRegistry.contract, event: "ConfigSet", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryConfigSet) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryConfigSet) (event.Subscription, error) { - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "ConfigSet") + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "ConfigSet") if err != nil { return nil, err } @@ -1008,8 +1008,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchConfigSet(opts *bind select { case log := <-logs: - event := new(CapabilityRegistryConfigSet) - if err := _CapabilityRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { + event := new(CapabilitiesRegistryConfigSet) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { return err } event.Raw = log @@ -1030,17 +1030,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchConfigSet(opts *bind }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseConfigSet(log types.Log) (*CapabilityRegistryConfigSet, error) { - event := new(CapabilityRegistryConfigSet) - if err := _CapabilityRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseConfigSet(log types.Log) (*CapabilitiesRegistryConfigSet, error) { + event := new(CapabilitiesRegistryConfigSet) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeAddedIterator struct { - Event *CapabilityRegistryNodeAdded +type CapabilitiesRegistryNodeAddedIterator struct { + Event *CapabilitiesRegistryNodeAdded contract *bind.BoundContract event string @@ -1051,7 +1051,7 @@ type CapabilityRegistryNodeAddedIterator struct { fail error } -func (it *CapabilityRegistryNodeAddedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeAddedIterator) Next() bool { if it.fail != nil { return false @@ -1060,7 +1060,7 @@ func (it *CapabilityRegistryNodeAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeAdded) + it.Event = new(CapabilitiesRegistryNodeAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1075,7 +1075,7 @@ func (it *CapabilityRegistryNodeAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeAdded) + it.Event = new(CapabilitiesRegistryNodeAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1090,44 +1090,44 @@ func (it *CapabilityRegistryNodeAddedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeAddedIterator) Error() error { +func (it *CapabilitiesRegistryNodeAddedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeAddedIterator) Close() error { +func (it *CapabilitiesRegistryNodeAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeAdded struct { +type CapabilitiesRegistryNodeAdded struct { P2pId [32]byte NodeOperatorId uint32 Signer [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeAddedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeAddedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeAdded", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeAdded", nodeOperatorIdRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeAddedIterator{contract: _CapabilityRegistry.contract, event: "NodeAdded", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeAddedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeAdded", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeAdded", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeAdded", nodeOperatorIdRule) if err != nil { return nil, err } @@ -1137,8 +1137,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeAdded(opts *bind select { case log := <-logs: - event := new(CapabilityRegistryNodeAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeAdded", log); err != nil { + event := new(CapabilitiesRegistryNodeAdded) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeAdded", log); err != nil { return err } event.Raw = log @@ -1159,17 +1159,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeAdded(opts *bind }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeAdded(log types.Log) (*CapabilityRegistryNodeAdded, error) { - event := new(CapabilityRegistryNodeAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeAdded", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeAdded(log types.Log) (*CapabilitiesRegistryNodeAdded, error) { + event := new(CapabilitiesRegistryNodeAdded) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeOperatorAddedIterator struct { - Event *CapabilityRegistryNodeOperatorAdded +type CapabilitiesRegistryNodeOperatorAddedIterator struct { + Event *CapabilitiesRegistryNodeOperatorAdded contract *bind.BoundContract event string @@ -1180,7 +1180,7 @@ type CapabilityRegistryNodeOperatorAddedIterator struct { fail error } -func (it *CapabilityRegistryNodeOperatorAddedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeOperatorAddedIterator) Next() bool { if it.fail != nil { return false @@ -1189,7 +1189,7 @@ func (it *CapabilityRegistryNodeOperatorAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorAdded) + it.Event = new(CapabilitiesRegistryNodeOperatorAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1204,7 +1204,7 @@ func (it *CapabilityRegistryNodeOperatorAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorAdded) + it.Event = new(CapabilitiesRegistryNodeOperatorAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1219,23 +1219,23 @@ func (it *CapabilityRegistryNodeOperatorAddedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeOperatorAddedIterator) Error() error { +func (it *CapabilitiesRegistryNodeOperatorAddedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeOperatorAddedIterator) Close() error { +func (it *CapabilitiesRegistryNodeOperatorAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeOperatorAdded struct { +type CapabilitiesRegistryNodeOperatorAdded struct { NodeOperatorId uint32 Admin common.Address Name string Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorAddedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilitiesRegistryNodeOperatorAddedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { @@ -1246,14 +1246,14 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorAdded(o adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeOperatorAddedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorAdded", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeOperatorAddedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeOperatorAdded", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { @@ -1264,7 +1264,7 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(op adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } @@ -1274,8 +1274,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(op select { case log := <-logs: - event := new(CapabilityRegistryNodeOperatorAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorAdded", log); err != nil { + event := new(CapabilitiesRegistryNodeOperatorAdded) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorAdded", log); err != nil { return err } event.Raw = log @@ -1296,17 +1296,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(op }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeOperatorAdded(log types.Log) (*CapabilityRegistryNodeOperatorAdded, error) { - event := new(CapabilityRegistryNodeOperatorAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorAdded", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeOperatorAdded(log types.Log) (*CapabilitiesRegistryNodeOperatorAdded, error) { + event := new(CapabilitiesRegistryNodeOperatorAdded) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeOperatorRemovedIterator struct { - Event *CapabilityRegistryNodeOperatorRemoved +type CapabilitiesRegistryNodeOperatorRemovedIterator struct { + Event *CapabilitiesRegistryNodeOperatorRemoved contract *bind.BoundContract event string @@ -1317,7 +1317,7 @@ type CapabilityRegistryNodeOperatorRemovedIterator struct { fail error } -func (it *CapabilityRegistryNodeOperatorRemovedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeOperatorRemovedIterator) Next() bool { if it.fail != nil { return false @@ -1326,7 +1326,7 @@ func (it *CapabilityRegistryNodeOperatorRemovedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorRemoved) + it.Event = new(CapabilitiesRegistryNodeOperatorRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1341,7 +1341,7 @@ func (it *CapabilityRegistryNodeOperatorRemovedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorRemoved) + it.Event = new(CapabilitiesRegistryNodeOperatorRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1356,42 +1356,42 @@ func (it *CapabilityRegistryNodeOperatorRemovedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeOperatorRemovedIterator) Error() error { +func (it *CapabilitiesRegistryNodeOperatorRemovedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeOperatorRemovedIterator) Close() error { +func (it *CapabilitiesRegistryNodeOperatorRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeOperatorRemoved struct { +type CapabilitiesRegistryNodeOperatorRemoved struct { NodeOperatorId uint32 Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeOperatorRemovedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeOperatorRemovedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeOperatorRemovedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorRemoved", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeOperatorRemovedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeOperatorRemoved", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) if err != nil { return nil, err } @@ -1401,8 +1401,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorRemoved( select { case log := <-logs: - event := new(CapabilityRegistryNodeOperatorRemoved) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorRemoved", log); err != nil { + event := new(CapabilitiesRegistryNodeOperatorRemoved) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorRemoved", log); err != nil { return err } event.Raw = log @@ -1423,17 +1423,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorRemoved( }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeOperatorRemoved(log types.Log) (*CapabilityRegistryNodeOperatorRemoved, error) { - event := new(CapabilityRegistryNodeOperatorRemoved) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorRemoved", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeOperatorRemoved(log types.Log) (*CapabilitiesRegistryNodeOperatorRemoved, error) { + event := new(CapabilitiesRegistryNodeOperatorRemoved) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorRemoved", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeOperatorUpdatedIterator struct { - Event *CapabilityRegistryNodeOperatorUpdated +type CapabilitiesRegistryNodeOperatorUpdatedIterator struct { + Event *CapabilitiesRegistryNodeOperatorUpdated contract *bind.BoundContract event string @@ -1444,7 +1444,7 @@ type CapabilityRegistryNodeOperatorUpdatedIterator struct { fail error } -func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeOperatorUpdatedIterator) Next() bool { if it.fail != nil { return false @@ -1453,7 +1453,7 @@ func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorUpdated) + it.Event = new(CapabilitiesRegistryNodeOperatorUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1468,7 +1468,7 @@ func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorUpdated) + it.Event = new(CapabilitiesRegistryNodeOperatorUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1483,23 +1483,23 @@ func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Error() error { +func (it *CapabilitiesRegistryNodeOperatorUpdatedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Close() error { +func (it *CapabilitiesRegistryNodeOperatorUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeOperatorUpdated struct { +type CapabilitiesRegistryNodeOperatorUpdated struct { NodeOperatorId uint32 Admin common.Address Name string Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorUpdatedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilitiesRegistryNodeOperatorUpdatedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { @@ -1510,14 +1510,14 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorUpdated adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeOperatorUpdatedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorUpdated", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeOperatorUpdatedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeOperatorUpdated", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { @@ -1528,7 +1528,7 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated( adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } @@ -1538,8 +1538,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated( select { case log := <-logs: - event := new(CapabilityRegistryNodeOperatorUpdated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorUpdated", log); err != nil { + event := new(CapabilitiesRegistryNodeOperatorUpdated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorUpdated", log); err != nil { return err } event.Raw = log @@ -1560,17 +1560,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated( }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeOperatorUpdated(log types.Log) (*CapabilityRegistryNodeOperatorUpdated, error) { - event := new(CapabilityRegistryNodeOperatorUpdated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorUpdated", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeOperatorUpdated(log types.Log) (*CapabilitiesRegistryNodeOperatorUpdated, error) { + event := new(CapabilitiesRegistryNodeOperatorUpdated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeRemovedIterator struct { - Event *CapabilityRegistryNodeRemoved +type CapabilitiesRegistryNodeRemovedIterator struct { + Event *CapabilitiesRegistryNodeRemoved contract *bind.BoundContract event string @@ -1581,7 +1581,7 @@ type CapabilityRegistryNodeRemovedIterator struct { fail error } -func (it *CapabilityRegistryNodeRemovedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeRemovedIterator) Next() bool { if it.fail != nil { return false @@ -1590,7 +1590,7 @@ func (it *CapabilityRegistryNodeRemovedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeRemoved) + it.Event = new(CapabilitiesRegistryNodeRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1605,7 +1605,7 @@ func (it *CapabilityRegistryNodeRemovedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeRemoved) + it.Event = new(CapabilitiesRegistryNodeRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1620,32 +1620,32 @@ func (it *CapabilityRegistryNodeRemovedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeRemovedIterator) Error() error { +func (it *CapabilitiesRegistryNodeRemovedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeRemovedIterator) Close() error { +func (it *CapabilitiesRegistryNodeRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeRemoved struct { +type CapabilitiesRegistryNodeRemoved struct { P2pId [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeRemoved(opts *bind.FilterOpts) (*CapabilityRegistryNodeRemovedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeRemoved(opts *bind.FilterOpts) (*CapabilitiesRegistryNodeRemovedIterator, error) { - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeRemoved") + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeRemoved") if err != nil { return nil, err } - return &CapabilityRegistryNodeRemovedIterator{contract: _CapabilityRegistry.contract, event: "NodeRemoved", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeRemovedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeRemoved", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeRemoved) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeRemoved(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeRemoved) (event.Subscription, error) { - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeRemoved") + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeRemoved") if err != nil { return nil, err } @@ -1655,8 +1655,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeRemoved(opts *bi select { case log := <-logs: - event := new(CapabilityRegistryNodeRemoved) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeRemoved", log); err != nil { + event := new(CapabilitiesRegistryNodeRemoved) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeRemoved", log); err != nil { return err } event.Raw = log @@ -1677,17 +1677,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeRemoved(opts *bi }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeRemoved(log types.Log) (*CapabilityRegistryNodeRemoved, error) { - event := new(CapabilityRegistryNodeRemoved) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeRemoved", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeRemoved(log types.Log) (*CapabilitiesRegistryNodeRemoved, error) { + event := new(CapabilitiesRegistryNodeRemoved) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeRemoved", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeUpdatedIterator struct { - Event *CapabilityRegistryNodeUpdated +type CapabilitiesRegistryNodeUpdatedIterator struct { + Event *CapabilitiesRegistryNodeUpdated contract *bind.BoundContract event string @@ -1698,7 +1698,7 @@ type CapabilityRegistryNodeUpdatedIterator struct { fail error } -func (it *CapabilityRegistryNodeUpdatedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeUpdatedIterator) Next() bool { if it.fail != nil { return false @@ -1707,7 +1707,7 @@ func (it *CapabilityRegistryNodeUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeUpdated) + it.Event = new(CapabilitiesRegistryNodeUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1722,7 +1722,7 @@ func (it *CapabilityRegistryNodeUpdatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeUpdated) + it.Event = new(CapabilitiesRegistryNodeUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1737,44 +1737,44 @@ func (it *CapabilityRegistryNodeUpdatedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeUpdatedIterator) Error() error { +func (it *CapabilitiesRegistryNodeUpdatedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeUpdatedIterator) Close() error { +func (it *CapabilitiesRegistryNodeUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeUpdated struct { +type CapabilitiesRegistryNodeUpdated struct { P2pId [32]byte NodeOperatorId uint32 Signer [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeUpdatedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeUpdatedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeUpdated", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeUpdated", nodeOperatorIdRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeUpdatedIterator{contract: _CapabilityRegistry.contract, event: "NodeUpdated", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeUpdatedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeUpdated", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeUpdated", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeUpdated", nodeOperatorIdRule) if err != nil { return nil, err } @@ -1784,8 +1784,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeUpdated(opts *bi select { case log := <-logs: - event := new(CapabilityRegistryNodeUpdated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeUpdated", log); err != nil { + event := new(CapabilitiesRegistryNodeUpdated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeUpdated", log); err != nil { return err } event.Raw = log @@ -1806,17 +1806,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeUpdated(opts *bi }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeUpdated(log types.Log) (*CapabilityRegistryNodeUpdated, error) { - event := new(CapabilityRegistryNodeUpdated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeUpdated", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeUpdated(log types.Log) (*CapabilitiesRegistryNodeUpdated, error) { + event := new(CapabilitiesRegistryNodeUpdated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryOwnershipTransferRequestedIterator struct { - Event *CapabilityRegistryOwnershipTransferRequested +type CapabilitiesRegistryOwnershipTransferRequestedIterator struct { + Event *CapabilitiesRegistryOwnershipTransferRequested contract *bind.BoundContract event string @@ -1827,7 +1827,7 @@ type CapabilityRegistryOwnershipTransferRequestedIterator struct { fail error } -func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Next() bool { +func (it *CapabilitiesRegistryOwnershipTransferRequestedIterator) Next() bool { if it.fail != nil { return false @@ -1836,7 +1836,7 @@ func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryOwnershipTransferRequested) + it.Event = new(CapabilitiesRegistryOwnershipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1851,7 +1851,7 @@ func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryOwnershipTransferRequested) + it.Event = new(CapabilitiesRegistryOwnershipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1866,22 +1866,22 @@ func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Next() bool { } } -func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Error() error { +func (it *CapabilitiesRegistryOwnershipTransferRequestedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Close() error { +func (it *CapabilitiesRegistryOwnershipTransferRequestedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryOwnershipTransferRequested struct { +type CapabilitiesRegistryOwnershipTransferRequested struct { From common.Address To common.Address Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilityRegistryOwnershipTransferRequestedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilitiesRegistryOwnershipTransferRequestedIterator, error) { var fromRule []interface{} for _, fromItem := range from { @@ -1892,14 +1892,14 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterOwnershipTransferRe toRule = append(toRule, toItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) if err != nil { return nil, err } - return &CapabilityRegistryOwnershipTransferRequestedIterator{contract: _CapabilityRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryOwnershipTransferRequestedIterator{contract: _CapabilitiesRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { @@ -1910,7 +1910,7 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferReq toRule = append(toRule, toItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) if err != nil { return nil, err } @@ -1920,8 +1920,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferReq select { case log := <-logs: - event := new(CapabilityRegistryOwnershipTransferRequested) - if err := _CapabilityRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + event := new(CapabilitiesRegistryOwnershipTransferRequested) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { return err } event.Raw = log @@ -1942,17 +1942,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferReq }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*CapabilityRegistryOwnershipTransferRequested, error) { - event := new(CapabilityRegistryOwnershipTransferRequested) - if err := _CapabilityRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*CapabilitiesRegistryOwnershipTransferRequested, error) { + event := new(CapabilitiesRegistryOwnershipTransferRequested) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryOwnershipTransferredIterator struct { - Event *CapabilityRegistryOwnershipTransferred +type CapabilitiesRegistryOwnershipTransferredIterator struct { + Event *CapabilitiesRegistryOwnershipTransferred contract *bind.BoundContract event string @@ -1963,7 +1963,7 @@ type CapabilityRegistryOwnershipTransferredIterator struct { fail error } -func (it *CapabilityRegistryOwnershipTransferredIterator) Next() bool { +func (it *CapabilitiesRegistryOwnershipTransferredIterator) Next() bool { if it.fail != nil { return false @@ -1972,7 +1972,7 @@ func (it *CapabilityRegistryOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryOwnershipTransferred) + it.Event = new(CapabilitiesRegistryOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1987,7 +1987,7 @@ func (it *CapabilityRegistryOwnershipTransferredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryOwnershipTransferred) + it.Event = new(CapabilitiesRegistryOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2002,22 +2002,22 @@ func (it *CapabilityRegistryOwnershipTransferredIterator) Next() bool { } } -func (it *CapabilityRegistryOwnershipTransferredIterator) Error() error { +func (it *CapabilitiesRegistryOwnershipTransferredIterator) Error() error { return it.fail } -func (it *CapabilityRegistryOwnershipTransferredIterator) Close() error { +func (it *CapabilitiesRegistryOwnershipTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryOwnershipTransferred struct { +type CapabilitiesRegistryOwnershipTransferred struct { From common.Address To common.Address Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilityRegistryOwnershipTransferredIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilitiesRegistryOwnershipTransferredIterator, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2028,14 +2028,14 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterOwnershipTransferre toRule = append(toRule, toItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) if err != nil { return nil, err } - return &CapabilityRegistryOwnershipTransferredIterator{contract: _CapabilityRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryOwnershipTransferredIterator{contract: _CapabilitiesRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2046,7 +2046,7 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferred toRule = append(toRule, toItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) if err != nil { return nil, err } @@ -2056,8 +2056,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferred select { case log := <-logs: - event := new(CapabilityRegistryOwnershipTransferred) - if err := _CapabilityRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(CapabilitiesRegistryOwnershipTransferred) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return err } event.Raw = log @@ -2078,9 +2078,9 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferred }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*CapabilityRegistryOwnershipTransferred, error) { - event := new(CapabilityRegistryOwnershipTransferred) - if err := _CapabilityRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*CapabilitiesRegistryOwnershipTransferred, error) { + event := new(CapabilitiesRegistryOwnershipTransferred) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } event.Raw = log @@ -2089,109 +2089,109 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseOwnershipTransferred type GetCapabilities struct { HashedCapabilityIds [][32]byte - Capabilities []CapabilityRegistryCapability + Capabilities []CapabilitiesRegistryCapability } -func (_CapabilityRegistry *CapabilityRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { - case _CapabilityRegistry.abi.Events["CapabilityConfigured"].ID: - return _CapabilityRegistry.ParseCapabilityConfigured(log) - case _CapabilityRegistry.abi.Events["CapabilityDeprecated"].ID: - return _CapabilityRegistry.ParseCapabilityDeprecated(log) - case _CapabilityRegistry.abi.Events["ConfigSet"].ID: - return _CapabilityRegistry.ParseConfigSet(log) - case _CapabilityRegistry.abi.Events["NodeAdded"].ID: - return _CapabilityRegistry.ParseNodeAdded(log) - case _CapabilityRegistry.abi.Events["NodeOperatorAdded"].ID: - return _CapabilityRegistry.ParseNodeOperatorAdded(log) - case _CapabilityRegistry.abi.Events["NodeOperatorRemoved"].ID: - return _CapabilityRegistry.ParseNodeOperatorRemoved(log) - case _CapabilityRegistry.abi.Events["NodeOperatorUpdated"].ID: - return _CapabilityRegistry.ParseNodeOperatorUpdated(log) - case _CapabilityRegistry.abi.Events["NodeRemoved"].ID: - return _CapabilityRegistry.ParseNodeRemoved(log) - case _CapabilityRegistry.abi.Events["NodeUpdated"].ID: - return _CapabilityRegistry.ParseNodeUpdated(log) - case _CapabilityRegistry.abi.Events["OwnershipTransferRequested"].ID: - return _CapabilityRegistry.ParseOwnershipTransferRequested(log) - case _CapabilityRegistry.abi.Events["OwnershipTransferred"].ID: - return _CapabilityRegistry.ParseOwnershipTransferred(log) + case _CapabilitiesRegistry.abi.Events["CapabilityConfigured"].ID: + return _CapabilitiesRegistry.ParseCapabilityConfigured(log) + case _CapabilitiesRegistry.abi.Events["CapabilityDeprecated"].ID: + return _CapabilitiesRegistry.ParseCapabilityDeprecated(log) + case _CapabilitiesRegistry.abi.Events["ConfigSet"].ID: + return _CapabilitiesRegistry.ParseConfigSet(log) + case _CapabilitiesRegistry.abi.Events["NodeAdded"].ID: + return _CapabilitiesRegistry.ParseNodeAdded(log) + case _CapabilitiesRegistry.abi.Events["NodeOperatorAdded"].ID: + return _CapabilitiesRegistry.ParseNodeOperatorAdded(log) + case _CapabilitiesRegistry.abi.Events["NodeOperatorRemoved"].ID: + return _CapabilitiesRegistry.ParseNodeOperatorRemoved(log) + case _CapabilitiesRegistry.abi.Events["NodeOperatorUpdated"].ID: + return _CapabilitiesRegistry.ParseNodeOperatorUpdated(log) + case _CapabilitiesRegistry.abi.Events["NodeRemoved"].ID: + return _CapabilitiesRegistry.ParseNodeRemoved(log) + case _CapabilitiesRegistry.abi.Events["NodeUpdated"].ID: + return _CapabilitiesRegistry.ParseNodeUpdated(log) + case _CapabilitiesRegistry.abi.Events["OwnershipTransferRequested"].ID: + return _CapabilitiesRegistry.ParseOwnershipTransferRequested(log) + case _CapabilitiesRegistry.abi.Events["OwnershipTransferred"].ID: + return _CapabilitiesRegistry.ParseOwnershipTransferred(log) default: return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) } } -func (CapabilityRegistryCapabilityConfigured) Topic() common.Hash { +func (CapabilitiesRegistryCapabilityConfigured) Topic() common.Hash { return common.HexToHash("0x04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae") } -func (CapabilityRegistryCapabilityDeprecated) Topic() common.Hash { +func (CapabilitiesRegistryCapabilityDeprecated) Topic() common.Hash { return common.HexToHash("0xdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf21") } -func (CapabilityRegistryConfigSet) Topic() common.Hash { +func (CapabilitiesRegistryConfigSet) Topic() common.Hash { return common.HexToHash("0xf264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651") } -func (CapabilityRegistryNodeAdded) Topic() common.Hash { +func (CapabilitiesRegistryNodeAdded) Topic() common.Hash { return common.HexToHash("0x74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05") } -func (CapabilityRegistryNodeOperatorAdded) Topic() common.Hash { +func (CapabilitiesRegistryNodeOperatorAdded) Topic() common.Hash { return common.HexToHash("0x78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e") } -func (CapabilityRegistryNodeOperatorRemoved) Topic() common.Hash { +func (CapabilitiesRegistryNodeOperatorRemoved) Topic() common.Hash { return common.HexToHash("0xa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a") } -func (CapabilityRegistryNodeOperatorUpdated) Topic() common.Hash { +func (CapabilitiesRegistryNodeOperatorUpdated) Topic() common.Hash { return common.HexToHash("0x86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a28") } -func (CapabilityRegistryNodeRemoved) Topic() common.Hash { +func (CapabilitiesRegistryNodeRemoved) Topic() common.Hash { return common.HexToHash("0x5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb9753205") } -func (CapabilityRegistryNodeUpdated) Topic() common.Hash { +func (CapabilitiesRegistryNodeUpdated) Topic() common.Hash { return common.HexToHash("0x4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b") } -func (CapabilityRegistryOwnershipTransferRequested) Topic() common.Hash { +func (CapabilitiesRegistryOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } -func (CapabilityRegistryOwnershipTransferred) Topic() common.Hash { +func (CapabilitiesRegistryOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } -func (_CapabilityRegistry *CapabilityRegistry) Address() common.Address { - return _CapabilityRegistry.address +func (_CapabilitiesRegistry *CapabilitiesRegistry) Address() common.Address { + return _CapabilitiesRegistry.address } -type CapabilityRegistryInterface interface { +type CapabilitiesRegistryInterface interface { GetCapabilities(opts *bind.CallOpts) (GetCapabilities, error) - GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilityRegistryCapability, error) + GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilitiesRegistryCapability, error) GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) - GetDON(opts *bind.CallOpts, donId uint32) (CapabilityRegistryDONInfo, error) + GetDON(opts *bind.CallOpts, donId uint32) (CapabilitiesRegistryDONInfo, error) - GetDONs(opts *bind.CallOpts) ([]CapabilityRegistryDONInfo, error) + GetDONs(opts *bind.CallOpts) ([]CapabilitiesRegistryDONInfo, error) GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) - GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, error) + GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilitiesRegistryNodeInfo, error) - GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) + GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilitiesRegistryNodeOperator, error) - GetNodeOperators(opts *bind.CallOpts) ([]CapabilityRegistryNodeOperator, error) + GetNodeOperators(opts *bind.CallOpts) ([]CapabilitiesRegistryNodeOperator, error) - GetNodes(opts *bind.CallOpts) ([]CapabilityRegistryNodeInfo, error) + GetNodes(opts *bind.CallOpts) ([]CapabilitiesRegistryNodeInfo, error) IsCapabilityDeprecated(opts *bind.CallOpts, hashedCapabilityId [32]byte) (bool, error) @@ -2201,13 +2201,13 @@ type CapabilityRegistryInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilityRegistryCapability) (*types.Transaction, error) + AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilitiesRegistryCapability) (*types.Transaction, error) - AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) + AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) - AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) + AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) - AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) + AddNodes(opts *bind.TransactOpts, nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) @@ -2219,77 +2219,77 @@ type CapabilityRegistryInterface interface { TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) + UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) - UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) + UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) - UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) + UpdateNodes(opts *bind.TransactOpts, nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) - FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityConfiguredIterator, error) + FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilitiesRegistryCapabilityConfiguredIterator, error) - WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) + WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) - ParseCapabilityConfigured(log types.Log) (*CapabilityRegistryCapabilityConfigured, error) + ParseCapabilityConfigured(log types.Log) (*CapabilitiesRegistryCapabilityConfigured, error) - FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityDeprecatedIterator, error) + FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilitiesRegistryCapabilityDeprecatedIterator, error) - WatchCapabilityDeprecated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityDeprecated, hashedCapabilityId [][32]byte) (event.Subscription, error) + WatchCapabilityDeprecated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryCapabilityDeprecated, hashedCapabilityId [][32]byte) (event.Subscription, error) - ParseCapabilityDeprecated(log types.Log) (*CapabilityRegistryCapabilityDeprecated, error) + ParseCapabilityDeprecated(log types.Log) (*CapabilitiesRegistryCapabilityDeprecated, error) - FilterConfigSet(opts *bind.FilterOpts) (*CapabilityRegistryConfigSetIterator, error) + FilterConfigSet(opts *bind.FilterOpts) (*CapabilitiesRegistryConfigSetIterator, error) - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryConfigSet) (event.Subscription, error) + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryConfigSet) (event.Subscription, error) - ParseConfigSet(log types.Log) (*CapabilityRegistryConfigSet, error) + ParseConfigSet(log types.Log) (*CapabilitiesRegistryConfigSet, error) - FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeAddedIterator, error) + FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeAddedIterator, error) - WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) + WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) - ParseNodeAdded(log types.Log) (*CapabilityRegistryNodeAdded, error) + ParseNodeAdded(log types.Log) (*CapabilitiesRegistryNodeAdded, error) - FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorAddedIterator, error) + FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilitiesRegistryNodeOperatorAddedIterator, error) - WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) + WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) - ParseNodeOperatorAdded(log types.Log) (*CapabilityRegistryNodeOperatorAdded, error) + ParseNodeOperatorAdded(log types.Log) (*CapabilitiesRegistryNodeOperatorAdded, error) - FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeOperatorRemovedIterator, error) + FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeOperatorRemovedIterator, error) - WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) + WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) - ParseNodeOperatorRemoved(log types.Log) (*CapabilityRegistryNodeOperatorRemoved, error) + ParseNodeOperatorRemoved(log types.Log) (*CapabilitiesRegistryNodeOperatorRemoved, error) - FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorUpdatedIterator, error) + FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilitiesRegistryNodeOperatorUpdatedIterator, error) - WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) + WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) - ParseNodeOperatorUpdated(log types.Log) (*CapabilityRegistryNodeOperatorUpdated, error) + ParseNodeOperatorUpdated(log types.Log) (*CapabilitiesRegistryNodeOperatorUpdated, error) - FilterNodeRemoved(opts *bind.FilterOpts) (*CapabilityRegistryNodeRemovedIterator, error) + FilterNodeRemoved(opts *bind.FilterOpts) (*CapabilitiesRegistryNodeRemovedIterator, error) - WatchNodeRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeRemoved) (event.Subscription, error) + WatchNodeRemoved(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeRemoved) (event.Subscription, error) - ParseNodeRemoved(log types.Log) (*CapabilityRegistryNodeRemoved, error) + ParseNodeRemoved(log types.Log) (*CapabilitiesRegistryNodeRemoved, error) - FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeUpdatedIterator, error) + FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeUpdatedIterator, error) - WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) + WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) - ParseNodeUpdated(log types.Log) (*CapabilityRegistryNodeUpdated, error) + ParseNodeUpdated(log types.Log) (*CapabilitiesRegistryNodeUpdated, error) - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilityRegistryOwnershipTransferRequestedIterator, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilitiesRegistryOwnershipTransferRequestedIterator, error) - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - ParseOwnershipTransferRequested(log types.Log) (*CapabilityRegistryOwnershipTransferRequested, error) + ParseOwnershipTransferRequested(log types.Log) (*CapabilitiesRegistryOwnershipTransferRequested, error) - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilityRegistryOwnershipTransferredIterator, error) + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilitiesRegistryOwnershipTransferredIterator, error) - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - ParseOwnershipTransferred(log types.Log) (*CapabilityRegistryOwnershipTransferred, error) + ParseOwnershipTransferred(log types.Log) (*CapabilitiesRegistryOwnershipTransferred, error) ParseLog(log types.Log) (generated.AbigenLog, error) diff --git a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt index e2a844c7b79..4a0d0d7c5a0 100644 --- a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,4 +1,4 @@ GETH_VERSION: 1.13.8 +capabilities_registry: ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.abi ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.bin 3a42a29db3b81e03f7fad6d872fa2182949643d8c1ed62c34a6af7520583eba4 forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin bd15b7c5cecc87d44cac0b8414627cfb2c0e1cdd554df60a50dcb682f9a05129 -keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin c1e609950ee768884ba5ecd0ad8b998570d46e1c7ac281294e677e908113a6b7 ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 144f23145878b95d1672e4919874eddeeaa38ce520d0edbe72c6677e39bb4741 diff --git a/core/gethwrappers/keystone/go_generate.go b/core/gethwrappers/keystone/go_generate.go index 679b678b8f2..e506e5d0bd0 100644 --- a/core/gethwrappers/keystone/go_generate.go +++ b/core/gethwrappers/keystone/go_generate.go @@ -6,4 +6,4 @@ package gethwrappers //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin KeystoneForwarder forwarder //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin OCR3Capability ocr3_capability -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin CapabilityRegistry keystone_capability_registry +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.abi ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.bin CapabilitiesRegistry capabilities_registry diff --git a/core/services/standardcapabilities/standard_capabilities.go b/core/services/standardcapabilities/standard_capabilities.go index 67ee8e10902..a8d007d5df8 100644 --- a/core/services/standardcapabilities/standard_capabilities.go +++ b/core/services/standardcapabilities/standard_capabilities.go @@ -14,15 +14,15 @@ import ( type standardCapabilities struct { services.StateMachine - log logger.Logger - spec *job.StandardCapabilitiesSpec - pluginRegistrar plugins.RegistrarConfig - telemetryService core.TelemetryService - store core.KeyValueStore - capabilityRegistry core.CapabilitiesRegistry - errorLog core.ErrorLog - pipelineRunner core.PipelineRunnerService - relayerSet core.RelayerSet + log logger.Logger + spec *job.StandardCapabilitiesSpec + pluginRegistrar plugins.RegistrarConfig + telemetryService core.TelemetryService + store core.KeyValueStore + CapabilitiesRegistry core.CapabilitiesRegistry + errorLog core.ErrorLog + pipelineRunner core.PipelineRunnerService + relayerSet core.RelayerSet capabilitiesLoop *loop.StandardCapabilitiesService } @@ -31,20 +31,20 @@ func newStandardCapabilities(log logger.Logger, spec *job.StandardCapabilitiesSp pluginRegistrar plugins.RegistrarConfig, telemetryService core.TelemetryService, store core.KeyValueStore, - capabilityRegistry core.CapabilitiesRegistry, + CapabilitiesRegistry core.CapabilitiesRegistry, errorLog core.ErrorLog, pipelineRunner core.PipelineRunnerService, relayerSet core.RelayerSet) *standardCapabilities { return &standardCapabilities{ - log: log, - spec: spec, - pluginRegistrar: pluginRegistrar, - telemetryService: telemetryService, - store: store, - capabilityRegistry: capabilityRegistry, - errorLog: errorLog, - pipelineRunner: pipelineRunner, - relayerSet: relayerSet, + log: log, + spec: spec, + pluginRegistrar: pluginRegistrar, + telemetryService: telemetryService, + store: store, + CapabilitiesRegistry: CapabilitiesRegistry, + errorLog: errorLog, + pipelineRunner: pipelineRunner, + relayerSet: relayerSet, } } @@ -72,7 +72,7 @@ func (s *standardCapabilities) Start(ctx context.Context) error { return fmt.Errorf("error waiting for standard capabilities service to start: %v", err) } - if err = s.capabilitiesLoop.Service.Initialise(ctx, s.spec.Config, s.telemetryService, s.store, s.capabilityRegistry, s.errorLog, + if err = s.capabilitiesLoop.Service.Initialise(ctx, s.spec.Config, s.telemetryService, s.store, s.CapabilitiesRegistry, s.errorLog, s.pipelineRunner, s.relayerSet); err != nil { return fmt.Errorf("error initialising standard capabilities service: %v", err) }