From 000f2cb36b7d9b6d046d383c85996ae1ae7a606e Mon Sep 17 00:00:00 2001 From: Christopher Dimitri Sastropranoto Date: Thu, 6 Jun 2024 09:48:47 -0700 Subject: [PATCH] Capability registry internal review (#13368) * update gas measurements * verify node not part of DON when removing * update gas snapshots * update uint declaration * Update gethwrappers * add extra test for removing ndoes * remove unnecessary sets * add changeset * revert gas snapshot * Revert "update gas measurements" This reverts commit ac688de1b321f5a1f330c587a5282fa4951803a5. * update snapshots * undo forge std changes * add function to update capabilities * allow adding multiple capabilities at once * allow deprecating multiple capabilities at once * address PR feedback * update comment * update comment * verify node operator valid when adding node and update node operator * I03: index nodeOperatorId in events * fix conflicts * I08: gas optimizations * return don capability config contract config from capability registry * generate wrappers * make don id uint declaration consistent * increase test coverage * address PR feedback * remove update capabilities * I9: nitpicks * I12: nits and stylings * add comments * I10: Gas optimizations * generate wrappers * add changesets * add capability registry comment explaining why we do not validate node operator name * address PR feedback * regen wrappers * add changesets --------- Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com> --- .changeset/cuddly-lions-sneeze.md | 5 + .changeset/empty-dryers-fold.md | 5 + .changeset/empty-tools-run.md | 5 + .changeset/famous-timers-love.md | 5 + .changeset/itchy-jars-return.md | 5 + .changeset/short-seals-love.md | 5 + .changeset/smooth-parents-reply.md | 5 + .changeset/soft-schools-beam.md | 5 + .changeset/stale-mayflies-own.md | 5 + .changeset/twelve-buckets-retire.md | 5 + .changeset/wet-ligers-complain.md | 5 + contracts/.changeset/blue-onions-sleep.md | 5 + contracts/.changeset/chilly-rivers-study.md | 5 + contracts/.changeset/dull-phones-retire.md | 5 + contracts/.changeset/happy-plants-dance.md | 5 + .../.changeset/healthy-impalas-hammer.md | 5 + contracts/.changeset/ninety-wolves-sleep.md | 5 + contracts/.changeset/orange-tips-attend.md | 5 + contracts/.changeset/silent-ravens-lay.md | 5 + contracts/.changeset/stupid-lamps-sell.md | 5 + contracts/.changeset/sweet-geese-rescue.md | 5 + contracts/.changeset/yellow-snails-wash.md | 5 + contracts/gas-snapshots/keystone.gas-snapshot | 149 +++---- .../src/v0.8/keystone/CapabilityRegistry.sol | 395 +++++++++++------- .../interfaces/ICapabilityConfiguration.sol | 2 +- .../src/v0.8/keystone/test/BaseTest.t.sol | 3 +- ...pabilityRegistry_AddCapabilitiesTest.t.sol | 112 +++++ ...CapabilityRegistry_AddCapabilityTest.t.sol | 73 ---- .../test/CapabilityRegistry_AddDONTest.t.sol | 21 +- ...abilityRegistry_AddNodeOperatorsTest.t.sol | 2 +- .../CapabilityRegistry_AddNodesTest.t.sol | 33 +- ...yRegistry_DeprecateCapabilitiesTest.t.sol} | 35 +- ...pabilityRegistry_GetCapabilitiesTest.t.sol | 11 +- .../test/CapabilityRegistry_GetDONsTest.t.sol | 7 +- ...abilityRegistry_GetNodeOperatorsTest.t.sol | 11 +- .../CapabilityRegistry_GetNodesTest.t.sol | 8 +- .../CapabilityRegistry_RemoveDONsTest.t.sol | 14 +- ...lityRegistry_RemoveNodeOperatorsTest.t.sol | 6 +- .../CapabilityRegistry_RemoveNodesTest.t.sol | 124 +++++- ...apabilityRegistry_TypeAndVersionTest.t.sol | 10 + .../CapabilityRegistry_UpdateDONTest.t.sol | 17 +- ...lityRegistry_UpdateNodeOperatorsTest.t.sol | 46 +- .../CapabilityRegistry_UpdateNodesTest.t.sol | 11 +- .../mocks/CapabilityConfigurationContract.sol | 13 +- .../keystone_capability_registry.go | 271 +++++++----- ...rapper-dependency-versions-do-not-edit.txt | 2 +- 46 files changed, 1003 insertions(+), 483 deletions(-) create mode 100644 .changeset/cuddly-lions-sneeze.md create mode 100644 .changeset/empty-dryers-fold.md create mode 100644 .changeset/empty-tools-run.md create mode 100644 .changeset/famous-timers-love.md create mode 100644 .changeset/itchy-jars-return.md create mode 100644 .changeset/short-seals-love.md create mode 100644 .changeset/smooth-parents-reply.md create mode 100644 .changeset/soft-schools-beam.md create mode 100644 .changeset/stale-mayflies-own.md create mode 100644 .changeset/twelve-buckets-retire.md create mode 100644 .changeset/wet-ligers-complain.md create mode 100644 contracts/.changeset/blue-onions-sleep.md create mode 100644 contracts/.changeset/chilly-rivers-study.md create mode 100644 contracts/.changeset/dull-phones-retire.md create mode 100644 contracts/.changeset/happy-plants-dance.md create mode 100644 contracts/.changeset/healthy-impalas-hammer.md create mode 100644 contracts/.changeset/ninety-wolves-sleep.md create mode 100644 contracts/.changeset/orange-tips-attend.md create mode 100644 contracts/.changeset/silent-ravens-lay.md create mode 100644 contracts/.changeset/stupid-lamps-sell.md create mode 100644 contracts/.changeset/sweet-geese-rescue.md create mode 100644 contracts/.changeset/yellow-snails-wash.md create mode 100644 contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol delete mode 100644 contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilityTest.t.sol rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_DeprecateCapability.t.sol => CapabilityRegistry_DeprecateCapabilitiesTest.t.sol} (56%) create mode 100644 contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol diff --git a/.changeset/cuddly-lions-sneeze.md b/.changeset/cuddly-lions-sneeze.md new file mode 100644 index 00000000000..c524bb34246 --- /dev/null +++ b/.changeset/cuddly-lions-sneeze.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal remove update capabilities from capability registry diff --git a/.changeset/empty-dryers-fold.md b/.changeset/empty-dryers-fold.md new file mode 100644 index 00000000000..76cc3f8d71e --- /dev/null +++ b/.changeset/empty-dryers-fold.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal capability registry informational findings diff --git a/.changeset/empty-tools-run.md b/.changeset/empty-tools-run.md new file mode 100644 index 00000000000..f4c906a6eff --- /dev/null +++ b/.changeset/empty-tools-run.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal return don capability config contract config from capability registry diff --git a/.changeset/famous-timers-love.md b/.changeset/famous-timers-love.md new file mode 100644 index 00000000000..271040ab726 --- /dev/null +++ b/.changeset/famous-timers-love.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal add capability registry comment explaining why we do not validate node operator name diff --git a/.changeset/itchy-jars-return.md b/.changeset/itchy-jars-return.md new file mode 100644 index 00000000000..fd5eb6f54d2 --- /dev/null +++ b/.changeset/itchy-jars-return.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal verify valid node operator when adding nodes to capability registry diff --git a/.changeset/short-seals-love.md b/.changeset/short-seals-love.md new file mode 100644 index 00000000000..5199c1c191a --- /dev/null +++ b/.changeset/short-seals-love.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal verify that node is not part of a DON when removing diff --git a/.changeset/smooth-parents-reply.md b/.changeset/smooth-parents-reply.md new file mode 100644 index 00000000000..46eb405ee89 --- /dev/null +++ b/.changeset/smooth-parents-reply.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal remove tracking deprecated arrays diff --git a/.changeset/soft-schools-beam.md b/.changeset/soft-schools-beam.md new file mode 100644 index 00000000000..6609b4edb58 --- /dev/null +++ b/.changeset/soft-schools-beam.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal capability registry internal review diff --git a/.changeset/stale-mayflies-own.md b/.changeset/stale-mayflies-own.md new file mode 100644 index 00000000000..ab7eaa4f232 --- /dev/null +++ b/.changeset/stale-mayflies-own.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal internal-review-fixes-for-capability-registry diff --git a/.changeset/twelve-buckets-retire.md b/.changeset/twelve-buckets-retire.md new file mode 100644 index 00000000000..cdf25811ec5 --- /dev/null +++ b/.changeset/twelve-buckets-retire.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal allow updating capabilities and to add/remove multiple capabilities at once from the capability registry diff --git a/.changeset/wet-ligers-complain.md b/.changeset/wet-ligers-complain.md new file mode 100644 index 00000000000..45cc35b7cd5 --- /dev/null +++ b/.changeset/wet-ligers-complain.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal update uint256 to uint32 for donId declaration in capability config interface diff --git a/contracts/.changeset/blue-onions-sleep.md b/contracts/.changeset/blue-onions-sleep.md new file mode 100644 index 00000000000..35944a09606 --- /dev/null +++ b/contracts/.changeset/blue-onions-sleep.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +capability registry internal review diff --git a/contracts/.changeset/chilly-rivers-study.md b/contracts/.changeset/chilly-rivers-study.md new file mode 100644 index 00000000000..0bd5d713a1b --- /dev/null +++ b/contracts/.changeset/chilly-rivers-study.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +add capability registry comment explaining why we do not validate node operator name diff --git a/contracts/.changeset/dull-phones-retire.md b/contracts/.changeset/dull-phones-retire.md new file mode 100644 index 00000000000..be65a31fac4 --- /dev/null +++ b/contracts/.changeset/dull-phones-retire.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +capability registry informational findings diff --git a/contracts/.changeset/happy-plants-dance.md b/contracts/.changeset/happy-plants-dance.md new file mode 100644 index 00000000000..1b8c7fcb669 --- /dev/null +++ b/contracts/.changeset/happy-plants-dance.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +allow updating capabilities and to add/remove multiple capabilities at once from the capability registry diff --git a/contracts/.changeset/healthy-impalas-hammer.md b/contracts/.changeset/healthy-impalas-hammer.md new file mode 100644 index 00000000000..dbbef2fca28 --- /dev/null +++ b/contracts/.changeset/healthy-impalas-hammer.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +remove tracking deprecated arrays diff --git a/contracts/.changeset/ninety-wolves-sleep.md b/contracts/.changeset/ninety-wolves-sleep.md new file mode 100644 index 00000000000..7b669388388 --- /dev/null +++ b/contracts/.changeset/ninety-wolves-sleep.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +#internal internal-review-for-capability-registry diff --git a/contracts/.changeset/orange-tips-attend.md b/contracts/.changeset/orange-tips-attend.md new file mode 100644 index 00000000000..2b5fa8e88ed --- /dev/null +++ b/contracts/.changeset/orange-tips-attend.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +validate that a node is not part of a DON when removing diff --git a/contracts/.changeset/silent-ravens-lay.md b/contracts/.changeset/silent-ravens-lay.md new file mode 100644 index 00000000000..e987e9e0825 --- /dev/null +++ b/contracts/.changeset/silent-ravens-lay.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +remove update capabilities from capability registry diff --git a/contracts/.changeset/stupid-lamps-sell.md b/contracts/.changeset/stupid-lamps-sell.md new file mode 100644 index 00000000000..ad5d70a04ab --- /dev/null +++ b/contracts/.changeset/stupid-lamps-sell.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +verify valid node operator when adding nodes to capability registry diff --git a/contracts/.changeset/sweet-geese-rescue.md b/contracts/.changeset/sweet-geese-rescue.md new file mode 100644 index 00000000000..ba0f2c916c4 --- /dev/null +++ b/contracts/.changeset/sweet-geese-rescue.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +update uint256 to uint32 for donId declaration in capability config interface diff --git a/contracts/.changeset/yellow-snails-wash.md b/contracts/.changeset/yellow-snails-wash.md new file mode 100644 index 00000000000..479fedcbe4a --- /dev/null +++ b/contracts/.changeset/yellow-snails-wash.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +return don capability config contract config from capability registry diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index 7fd567189ef..d01543529cb 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -1,76 +1,83 @@ -CapabilityRegistry_AddCapabilityTest:test_AddCapability_NoConfigurationContract() (gas: 146839) -CapabilityRegistry_AddCapabilityTest:test_AddCapability_WithConfiguration() (gas: 171105) -CapabilityRegistry_AddCapabilityTest:test_DeprecatesCapability() (gas: 88694) -CapabilityRegistry_AddCapabilityTest:test_EmitsEvent() (gas: 88815) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CalledByNonAdmin() (gas: 21728) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CalledByNonAdmin() (gas: 22199) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 15521) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CapabilityExists() (gas: 138685) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 89496) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 3998052) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 24995) -CapabilityRegistry_AddDONTest:test_AddDON() (gas: 332870) -CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19285) -CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 155460) -CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 224960) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 239487) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 108051) -CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 40158) -CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 169921) -CapabilityRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 133916) -CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 16949) -CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 17795) -CapabilityRegistry_AddNodesTest:test_AddsNodeInfo() (gas: 355866) -CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 355854) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301701) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55370) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27706) -CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24579) -CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27412) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27051) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 310108) -CapabilityRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 115054) -CapabilityRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 53946) -CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 71958) -CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 116197) -CapabilityRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 10842) -CapabilityRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 11915) -CapabilityRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 34361) -CapabilityRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 99004) -CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 59970) -CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73816) -CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 99887) +CapabilityRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 152088) +CapabilityRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 176069) +CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24678) +CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145679) +CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94561) +CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 92916) +CapabilityRegistry_AddDONTest:test_AddDON() (gas: 499044) +CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19249) +CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 291958) +CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 365106) +CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 375985) +CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 177974) +CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43337) +CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 306419) +CapabilityRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184267) +CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17624) +CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18520) +CapabilityRegistry_AddNodesTest:test_AddsNodeInfo() (gas: 355458) +CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 355446) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301431) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55243) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24962) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27738) +CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25130) +CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27444) +CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27083) +CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309850) +CapabilityRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92873) +CapabilityRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 93001) +CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22879) +CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16166) +CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94265) +CapabilityRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 119306) +CapabilityRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 54034) +CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65704) +CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 88473) +CapabilityRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) +CapabilityRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) +CapabilityRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36675) +CapabilityRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38982) +CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 59880) +CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 71576) +CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 60696) CapabilityRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15669) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 14160) -CapabilityRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 141779) -CapabilityRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15761) -CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 80895) -CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 57865) -CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 57864) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25085) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18395) +CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16540) +CapabilityRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36069) +CapabilityRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15838) +CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 114067) +CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 371521) +CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 712537) +CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 72324) +CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 74158) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24871) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18373) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfDON() (gas: 385126) CapabilityRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18385) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19370) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 133496) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17790) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 202996) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 217569) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 86089) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 148002) -CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 330869) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 17712) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 17636) -CapabilityRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 72345) -CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 252301) -CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 159616) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 36253) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24580) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27344) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29312) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27332) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27015) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25666) -CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeInfo() (gas: 159605) +CapabilityRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19406) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 157904) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17826) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 231052) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 241977) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 103722) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 172410) +CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 433638) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20583) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20004) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19742) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15382) +CapabilityRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36903) +CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 250725) +CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 158858) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35985) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25086) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27325) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29206) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27313) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26996) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25560) +CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeInfo() (gas: 158847) KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 2676465) KeystoneForwarder_ReportTest:test_Report_SuccessfulDelivery() (gas: 150738) KeystoneForwarder_ReportTest:test_RevertWhen_AlreadyProcessed() (gas: 158024) diff --git a/contracts/src/v0.8/keystone/CapabilityRegistry.sol b/contracts/src/v0.8/keystone/CapabilityRegistry.sol index 76e56c44416..664d0920131 100644 --- a/contracts/src/v0.8/keystone/CapabilityRegistry.sol +++ b/contracts/src/v0.8/keystone/CapabilityRegistry.sol @@ -10,6 +10,11 @@ import {ICapabilityConfiguration} from "./interfaces/ICapabilityConfiguration.so /// @notice CapabilityRegistry 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, +/// Capabilities and DONs in the contract and requires a full state migration +/// 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 { // Add the library methods using EnumerableSet for EnumerableSet.Bytes32Set; @@ -20,6 +25,9 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// operator address admin; /// @notice Human readable name of a Node Operator managing the node + /// @dev The contract does not validate the length or characters of the + /// node operator name because a trusted admin will supply these names. + /// We reduce gas costs by omitting these checks on-chain. string name; } @@ -40,7 +48,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice The node's parameters /// @notice The id of the node operator that manages this node uint32 nodeOperatorId; - /// @notice The number of times the node's capability has been updated + /// @notice The number of times the node's configuration has been updated uint32 configCount; /// @notice The signer address for application-layer message verification. /// @dev This key is guaranteed to be unique in the CapabilityRegistry @@ -58,12 +66,18 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @dev This is stored as a map so that we can easily update to a set of /// new capabilities by incrementing the configCount and creating a /// new set of supported capability IDs - mapping(uint32 configCount => EnumerableSet.Bytes32Set capabilityId) supportedCapabilityIds; + mapping(uint32 configCount => EnumerableSet.Bytes32Set capabilityId) supportedHashedCapabilityIds; + /// @notice The list of DON Ids supported by the node. + EnumerableSet.UintSet supportedDONIds; } /// @notice CapabilityResponseType indicates whether remote response requires // aggregation or is an already aggregated report. There are multiple // possible ways to aggregate. + /// @dev REPORT response type receives signatures together with the response that + /// is used to verify the data. OBSERVATION_IDENTICAL just receives data without + /// signatures and waits for some number of observations before proceeeding to + /// the next step enum CapabilityResponseType { // No additional aggregation is needed on the remote response. REPORT, @@ -187,7 +201,8 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice This error is thrown when a caller is not allowed /// to execute the transaction - error AccessForbidden(); + /// @param sender The address that tried to execute the transaction + error AccessForbidden(address sender); /// @notice This error is thrown when there is a mismatch between /// array arguments @@ -209,28 +224,6 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @param hashedCapabilityIds The IDs of the capabilities that are being added. error InvalidNodeCapabilities(bytes32[] hashedCapabilityIds); - /// @notice This event is emitted when a new node is added - /// @param p2pId The P2P ID of the node - /// @param nodeOperatorId The ID of the node operator that manages this node - /// @param signer The encoded node's signer address - event NodeAdded(bytes32 p2pId, uint256 nodeOperatorId, bytes32 signer); - - /// @notice This event is emitted when a node is removed - /// @param p2pId The P2P ID of the node that was removed - event NodeRemoved(bytes32 p2pId); - - /// @notice This event is emitted when a node is updated - /// @param p2pId The P2P ID of the node - /// @param nodeOperatorId The ID of the node operator that manages this node - /// @param signer The node's signer address - event NodeUpdated(bytes32 p2pId, uint256 nodeOperatorId, bytes32 signer); - - /// @notice This event is emitted when a DON's config is set - /// @param donId The ID of the DON the config was set for - /// @param configCount The number of times the DON has been - /// configured - event ConfigSet(uint32 donId, uint32 configCount); - /// @notice This error is emitted when a DON does not exist /// @param donId The ID of the nonexistent DON error DONDoesNotExist(uint32 donId); @@ -242,7 +235,9 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice This error is thrown when trying add a capability that already /// exists. - error CapabilityAlreadyExists(); + /// @param hashedCapabilityId The hashed capability ID of the capability + /// that already exists + error CapabilityAlreadyExists(bytes32 hashedCapabilityId); /// @notice This error is thrown when trying to add a node to a DON where /// the node does not support the capability @@ -277,53 +272,81 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @param hashedCapabilityId The hashed ID of the capability that is deprecated. error CapabilityIsDeprecated(bytes32 hashedCapabilityId); + /// @notice This error is thrown when a node operator does not exist + /// @param nodeOperatorId The ID of the node operator that does not exist + error NodeOperatorDoesNotExist(uint32 nodeOperatorId); + + /// @notice This error is thrown when trying to remove a node that is still + /// part of a DON + /// @param nodeP2PId The P2P Id of the node being removed + error NodePartOfDON(bytes32 nodeP2PId); + /// @notice This error is thrown when trying to add a capability with a /// configuration contract that does not implement the required interface. /// @param proposedConfigurationContract The address of the proposed /// configuration contract. error InvalidCapabilityConfigurationContractInterface(address proposedConfigurationContract); + /// @notice This event is emitted when a new node is added + /// @param p2pId The P2P ID of the node + /// @param nodeOperatorId The ID of the node operator that manages this node + /// @param signer The encoded node's signer address + event NodeAdded(bytes32 p2pId, uint32 indexed nodeOperatorId, bytes32 signer); + + /// @notice This event is emitted when a node is removed + /// @param p2pId The P2P ID of the node that was removed + event NodeRemoved(bytes32 p2pId); + + /// @notice This event is emitted when a node is updated + /// @param p2pId The P2P ID of the node + /// @param nodeOperatorId The ID of the node operator that manages this node + /// @param signer The node's signer address + event NodeUpdated(bytes32 p2pId, uint32 indexed nodeOperatorId, bytes32 signer); + + /// @notice This event is emitted when a DON's config is set + /// @param donId The ID of the DON the config was set for + /// @param configCount The number of times the DON has been + /// configured + event ConfigSet(uint32 donId, uint32 configCount); + /// @notice This event is emitted when a new node operator is added /// @param nodeOperatorId The ID of the newly added node operator /// @param admin The address of the admin that can manage the node /// operator /// @param name The human readable name of the node operator - event NodeOperatorAdded(uint256 nodeOperatorId, address indexed admin, string name); + event NodeOperatorAdded(uint32 indexed nodeOperatorId, address indexed admin, string name); /// @notice This event is emitted when a node operator is removed /// @param nodeOperatorId The ID of the node operator that was removed - event NodeOperatorRemoved(uint256 nodeOperatorId); + event NodeOperatorRemoved(uint32 indexed nodeOperatorId); /// @notice This event is emitted when a node operator is updated /// @param nodeOperatorId The ID of the node operator that was updated /// @param admin The address of the node operator's admin /// @param name The node operator's human readable name - event NodeOperatorUpdated(uint256 nodeOperatorId, address indexed admin, string name); + event NodeOperatorUpdated(uint32 indexed nodeOperatorId, address indexed admin, string name); /// @notice This event is emitted when a new capability is added /// @param hashedCapabilityId The hashed ID of the newly added capability - event CapabilityAdded(bytes32 indexed hashedCapabilityId); + event CapabilityConfigured(bytes32 indexed hashedCapabilityId); /// @notice This event is emitted when a capability is deprecated /// @param hashedCapabilityId The hashed ID of the deprecated capability event CapabilityDeprecated(bytes32 indexed hashedCapabilityId); - mapping(bytes32 => Capability) private s_capabilities; + /// @notice Mapping of capabilities + mapping(bytes32 hashedCapabilityId => Capability capability) private s_capabilities; + /// @notice Set of hashed capability IDs. /// A hashed ID is created by the function `getHashedCapabilityId`. EnumerableSet.Bytes32Set private s_hashedCapabilityIds; + /// @notice Set of deprecated hashed capability IDs, /// A hashed ID is created by the function `getHashedCapabilityId`. /// /// Deprecated capabilities are skipped by the `getCapabilities` function. EnumerableSet.Bytes32Set private s_deprecatedHashedCapabilityIds; - /// @notice Set of removed Node Operator IDs - EnumerableSet.UintSet private s_removedNodeOperatorIds; - - /// @notice Set of removed DON IDs - EnumerableSet.UintSet private s_removedDONIds; - /// @notice Encoded node signer addresses EnumerableSet.Bytes32Set private s_nodeSigners; @@ -331,7 +354,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { EnumerableSet.Bytes32Set private s_nodeP2PIds; /// @notice Mapping of node operators - mapping(uint256 nodeOperatorId => NodeOperator nodeOperator) private s_nodeOperators; + mapping(uint32 nodeOperatorId => NodeOperator nodeOperator) private s_nodeOperators; /// @notice Mapping of nodes mapping(bytes32 p2pId => Node node) private s_nodes; @@ -339,15 +362,15 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice Mapping of DON IDs to DONs mapping(uint32 donId => DON don) private s_dons; - /// @notice The latest node operator ID - // @dev Starting with 1 to avoid confusion with the zero value + /// @notice The next ID to assign a new node operator to + /// @dev Starting with 1 to avoid confusion with the zero value /// @dev No getter for this as this is an implementation detail - uint32 private s_nodeOperatorId = 1; + uint32 private s_nextNodeOperatorId = 1; - /// @notice The latest DON ID + /// @notice The next ID to assign a new DON to /// @dev Starting with 1 to avoid confusion with the zero value /// @dev No getter for this as this is an implementation detail - uint32 private s_donId = 1; + uint32 private s_nextDONId = 1; function typeAndVersion() external pure override returns (string memory) { return "CapabilityRegistry 1.0.0"; @@ -359,43 +382,47 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { for (uint256 i; i < nodeOperators.length; ++i) { NodeOperator memory nodeOperator = nodeOperators[i]; if (nodeOperator.admin == address(0)) revert InvalidNodeOperatorAdmin(); - uint256 nodeOperatorId = s_nodeOperatorId; + uint32 nodeOperatorId = s_nextNodeOperatorId; s_nodeOperators[nodeOperatorId] = NodeOperator({admin: nodeOperator.admin, name: nodeOperator.name}); - ++s_nodeOperatorId; + ++s_nextNodeOperatorId; emit NodeOperatorAdded(nodeOperatorId, nodeOperator.admin, nodeOperator.name); } } /// @notice Removes a node operator /// @param nodeOperatorIds The IDs of the node operators to remove - function removeNodeOperators(uint256[] calldata nodeOperatorIds) external onlyOwner { - for (uint256 i; i < nodeOperatorIds.length; ++i) { - uint256 nodeOperatorId = nodeOperatorIds[i]; + function removeNodeOperators(uint32[] calldata nodeOperatorIds) external onlyOwner { + for (uint32 i; i < nodeOperatorIds.length; ++i) { + uint32 nodeOperatorId = nodeOperatorIds[i]; delete s_nodeOperators[nodeOperatorId]; - s_removedNodeOperatorIds.add(nodeOperatorId); emit NodeOperatorRemoved(nodeOperatorId); } } /// @notice Updates a node operator /// @param nodeOperatorIds The ID of the node operator being updated - function updateNodeOperators(uint256[] calldata nodeOperatorIds, NodeOperator[] calldata nodeOperators) external { + /// @param nodeOperators The updated node operator params + function updateNodeOperators(uint32[] calldata nodeOperatorIds, NodeOperator[] calldata nodeOperators) external { if (nodeOperatorIds.length != nodeOperators.length) revert LengthMismatch(nodeOperatorIds.length, nodeOperators.length); address owner = owner(); for (uint256 i; i < nodeOperatorIds.length; ++i) { - uint256 nodeOperatorId = nodeOperatorIds[i]; + uint32 nodeOperatorId = nodeOperatorIds[i]; + + NodeOperator storage currentNodeOperator = s_nodeOperators[nodeOperatorId]; + if (currentNodeOperator.admin == address(0)) revert NodeOperatorDoesNotExist(nodeOperatorId); + NodeOperator memory nodeOperator = nodeOperators[i]; if (nodeOperator.admin == address(0)) revert InvalidNodeOperatorAdmin(); - if (msg.sender != nodeOperator.admin && msg.sender != owner) revert AccessForbidden(); + if (msg.sender != nodeOperator.admin && msg.sender != owner) revert AccessForbidden(msg.sender); if ( - s_nodeOperators[nodeOperatorId].admin != nodeOperator.admin || - keccak256(abi.encode(s_nodeOperators[nodeOperatorId].name)) != keccak256(abi.encode(nodeOperator.name)) + currentNodeOperator.admin != nodeOperator.admin || + keccak256(abi.encode(currentNodeOperator.name)) != keccak256(abi.encode(nodeOperator.name)) ) { - s_nodeOperators[nodeOperatorId].admin = nodeOperator.admin; - s_nodeOperators[nodeOperatorId].name = nodeOperator.name; + currentNodeOperator.admin = nodeOperator.admin; + currentNodeOperator.name = nodeOperator.name; emit NodeOperatorUpdated(nodeOperatorId, nodeOperator.admin, nodeOperator.name); } } @@ -404,23 +431,28 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice Gets a node operator's data /// @param nodeOperatorId The ID of the node operator to query for /// @return NodeOperator The node operator data - function getNodeOperator(uint256 nodeOperatorId) external view returns (NodeOperator memory) { + function getNodeOperator(uint32 nodeOperatorId) external view returns (NodeOperator memory) { return s_nodeOperators[nodeOperatorId]; } /// @notice Gets all node operators /// @return NodeOperator[] All node operators function getNodeOperators() external view returns (NodeOperator[] memory) { - uint32 nodeOperatorId = s_nodeOperatorId; - /// Minus one to account for s_nodeOperatorId starting at index 1 - NodeOperator[] memory nodeOperators = new NodeOperator[](s_nodeOperatorId - s_removedNodeOperatorIds.length() - 1); + uint32 nodeOperatorId = s_nextNodeOperatorId; + /// Minus one to account for s_nextNodeOperatorId starting at index 1 + NodeOperator[] memory nodeOperators = new NodeOperator[](s_nextNodeOperatorId - 1); uint256 idx; - for (uint256 i = 1; i < nodeOperatorId; ++i) { - if (!s_removedNodeOperatorIds.contains(i)) { + for (uint32 i = 1; i < nodeOperatorId; ++i) { + if (s_nodeOperators[i].admin != address(0)) { nodeOperators[idx] = s_nodeOperators[i]; ++idx; } } + if (idx != s_nextNodeOperatorId - 1) { + assembly { + mstore(nodeOperators, idx) + } + } return nodeOperators; } @@ -428,33 +460,33 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// avoid breaking changes when deprecating capabilities. /// @param nodes The nodes to add function addNodes(NodeInfo[] calldata nodes) external { + bool isOwner = msg.sender == owner(); for (uint256 i; i < nodes.length; ++i) { NodeInfo memory node = nodes[i]; - bool isOwner = msg.sender == owner(); - NodeOperator memory nodeOperator = s_nodeOperators[node.nodeOperatorId]; - if (!isOwner && msg.sender != nodeOperator.admin) revert AccessForbidden(); + if (nodeOperator.admin == address(0)) revert NodeOperatorDoesNotExist(node.nodeOperatorId); + if (!isOwner && msg.sender != nodeOperator.admin) revert AccessForbidden(msg.sender); - bool nodeExists = s_nodes[node.p2pId].signer != bytes32(""); - if (nodeExists || bytes32(node.p2pId) == bytes32("")) revert InvalidNodeP2PId(node.p2pId); + Node storage storedNode = s_nodes[node.p2pId]; + if (storedNode.signer != bytes32("") || bytes32(node.p2pId) == bytes32("")) revert InvalidNodeP2PId(node.p2pId); if (bytes32(node.signer) == bytes32("") || s_nodeSigners.contains(node.signer)) revert InvalidNodeSigner(); bytes32[] memory capabilityIds = node.hashedCapabilityIds; if (capabilityIds.length == 0) revert InvalidNodeCapabilities(capabilityIds); - ++s_nodes[node.p2pId].configCount; + ++storedNode.configCount; - uint32 capabilityConfigCount = s_nodes[node.p2pId].configCount; + uint32 capabilityConfigCount = storedNode.configCount; for (uint256 j; j < capabilityIds.length; ++j) { if (!s_hashedCapabilityIds.contains(capabilityIds[j])) revert InvalidNodeCapabilities(capabilityIds); - s_nodes[node.p2pId].supportedCapabilityIds[capabilityConfigCount].add(capabilityIds[j]); + storedNode.supportedHashedCapabilityIds[capabilityConfigCount].add(capabilityIds[j]); } - s_nodes[node.p2pId].nodeOperatorId = node.nodeOperatorId; - s_nodes[node.p2pId].p2pId = node.p2pId; - s_nodes[node.p2pId].signer = node.signer; + storedNode.nodeOperatorId = node.nodeOperatorId; + storedNode.p2pId = node.p2pId; + storedNode.signer = node.signer; s_nodeSigners.add(node.signer); s_nodeP2PIds.add(node.p2pId); emit NodeAdded(node.p2pId, node.nodeOperatorId, node.signer); @@ -469,14 +501,14 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { for (uint256 i; i < removedNodeP2PIds.length; ++i) { bytes32 p2pId = removedNodeP2PIds[i]; - bool nodeExists = bytes32(s_nodes[p2pId].signer) != bytes32(""); - if (!nodeExists) revert InvalidNodeP2PId(p2pId); + Node storage node = s_nodes[p2pId]; - NodeOperator memory nodeOperator = s_nodeOperators[s_nodes[p2pId].nodeOperatorId]; + if (bytes32(node.signer) == bytes32("")) revert InvalidNodeP2PId(p2pId); + if (node.supportedDONIds.length() > 0) revert NodePartOfDON(p2pId); - if (!isOwner && msg.sender != nodeOperator.admin) revert AccessForbidden(); - s_nodeSigners.remove(s_nodes[p2pId].signer); - s_nodeP2PIds.remove(s_nodes[p2pId].p2pId); + if (!isOwner && msg.sender != s_nodeOperators[node.nodeOperatorId].admin) revert AccessForbidden(msg.sender); + s_nodeSigners.remove(node.signer); + s_nodeP2PIds.remove(node.p2pId); delete s_nodes[p2pId]; emit NodeRemoved(p2pId); } @@ -486,41 +518,39 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// and reconfigure its supported capabilities /// @param nodes The nodes to update function updateNodes(NodeInfo[] calldata nodes) external { + bool isOwner = msg.sender == owner(); for (uint256 i; i < nodes.length; ++i) { NodeInfo memory node = nodes[i]; - bool isOwner = msg.sender == owner(); - NodeOperator memory nodeOperator = s_nodeOperators[node.nodeOperatorId]; - if (!isOwner && msg.sender != nodeOperator.admin) revert AccessForbidden(); + if (!isOwner && msg.sender != nodeOperator.admin) revert AccessForbidden(msg.sender); - bool nodeExists = s_nodes[node.p2pId].signer != bytes32(""); - if (!nodeExists) revert InvalidNodeP2PId(node.p2pId); + Node storage storedNode = s_nodes[node.p2pId]; + if (storedNode.signer == bytes32("")) revert InvalidNodeP2PId(node.p2pId); if ( - bytes32(node.signer) == bytes32("") || - (s_nodes[node.p2pId].signer != node.signer && s_nodeSigners.contains(node.signer)) + bytes32(node.signer) == bytes32("") || (storedNode.signer != node.signer && s_nodeSigners.contains(node.signer)) ) revert InvalidNodeSigner(); - bytes32[] memory supportedCapabilityIds = node.hashedCapabilityIds; - if (supportedCapabilityIds.length == 0) revert InvalidNodeCapabilities(supportedCapabilityIds); + bytes32[] memory supportedHashedCapabilityIds = node.hashedCapabilityIds; + if (supportedHashedCapabilityIds.length == 0) revert InvalidNodeCapabilities(supportedHashedCapabilityIds); - s_nodes[node.p2pId].configCount++; - uint32 capabilityConfigCount = s_nodes[node.p2pId].configCount; - for (uint256 j; j < supportedCapabilityIds.length; ++j) { - if (!s_hashedCapabilityIds.contains(supportedCapabilityIds[j])) - revert InvalidNodeCapabilities(supportedCapabilityIds); - s_nodes[node.p2pId].supportedCapabilityIds[capabilityConfigCount].add(supportedCapabilityIds[j]); + storedNode.configCount++; + uint32 capabilityConfigCount = storedNode.configCount; + for (uint256 j; j < supportedHashedCapabilityIds.length; ++j) { + if (!s_hashedCapabilityIds.contains(supportedHashedCapabilityIds[j])) + revert InvalidNodeCapabilities(supportedHashedCapabilityIds); + storedNode.supportedHashedCapabilityIds[capabilityConfigCount].add(supportedHashedCapabilityIds[j]); } - s_nodes[node.p2pId].nodeOperatorId = node.nodeOperatorId; - s_nodes[node.p2pId].p2pId = node.p2pId; + storedNode.nodeOperatorId = node.nodeOperatorId; + storedNode.p2pId = node.p2pId; - bytes32 previousSigner = s_nodes[node.p2pId].signer; + bytes32 previousSigner = storedNode.signer; - if (s_nodes[node.p2pId].signer != node.signer) { + if (storedNode.signer != node.signer) { s_nodeSigners.remove(previousSigner); - s_nodes[node.p2pId].signer = node.signer; + storedNode.signer = node.signer; s_nodeSigners.add(node.signer); } emit NodeUpdated(node.p2pId, node.nodeOperatorId, node.signer); @@ -531,8 +561,16 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @param p2pId The P2P ID of the node to query for /// @return NodeInfo The node data /// @return configCount The number of times the node has been configured - function getNode(bytes32 p2pId) external view returns (NodeInfo memory, uint32 configCount) { - return _getNode(p2pId); + function getNode(bytes32 p2pId) public view returns (NodeInfo memory, uint32 configCount) { + return ( + NodeInfo({ + nodeOperatorId: s_nodes[p2pId].nodeOperatorId, + p2pId: s_nodes[p2pId].p2pId, + signer: s_nodes[p2pId].signer, + hashedCapabilityIds: s_nodes[p2pId].supportedHashedCapabilityIds[s_nodes[p2pId].configCount].values() + }), + s_nodes[p2pId].configCount + ); } /// @notice Gets all nodes @@ -544,47 +582,40 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { uint32[] memory configCounts = new uint32[](p2pIds.length); for (uint256 i; i < p2pIds.length; ++i) { - bytes32 p2pId = p2pIds[i]; - (NodeInfo memory node, uint32 configCount) = _getNode(p2pId); - nodeInfo[i] = node; - configCounts[i] = configCount; + (nodeInfo[i], configCounts[i]) = getNode(p2pIds[i]); } return (nodeInfo, configCounts); } /// @notice Adds a new capability to the capability registry - /// @param capability The capability being added - function addCapability(Capability calldata capability) external onlyOwner { - bytes32 hashedId = getHashedCapabilityId(capability.labelledName, capability.version); - if (s_hashedCapabilityIds.contains(hashedId)) revert CapabilityAlreadyExists(); - - if (capability.configurationContract != address(0)) { - if ( - capability.configurationContract.code.length == 0 || - !IERC165(capability.configurationContract).supportsInterface( - ICapabilityConfiguration.getCapabilityConfiguration.selector ^ - ICapabilityConfiguration.beforeCapabilityConfigSet.selector - ) - ) revert InvalidCapabilityConfigurationContractInterface(capability.configurationContract); + /// @param capabilities The capabilities being added + /// @dev There is no function to update capabilities as this would require + /// nodes to trust that the capabilities they support are not updated by the + /// admin + function addCapabilities(Capability[] calldata capabilities) external onlyOwner { + for (uint256 i; i < capabilities.length; ++i) { + Capability memory capability = capabilities[i]; + bytes32 hashedCapabilityId = getHashedCapabilityId(capability.labelledName, capability.version); + if (!s_hashedCapabilityIds.add(hashedCapabilityId)) revert CapabilityAlreadyExists(hashedCapabilityId); + _setCapability(hashedCapabilityId, capability); } - - s_hashedCapabilityIds.add(hashedId); - s_capabilities[hashedId] = capability; - - emit CapabilityAdded(hashedId); } - /// @notice Deprecates a capability by adding it to the deprecated list - /// @param hashedCapabilityId The ID of the capability to deprecate - function deprecateCapability(bytes32 hashedCapabilityId) external onlyOwner { - if (!s_hashedCapabilityIds.contains(hashedCapabilityId)) revert CapabilityDoesNotExist(hashedCapabilityId); - if (s_deprecatedHashedCapabilityIds.contains(hashedCapabilityId)) revert CapabilityIsDeprecated(hashedCapabilityId); + /// @notice Deprecates a capability + /// @param hashedCapabilityIds[] The IDs of the capabilities to deprecate + function deprecateCapabilities(bytes32[] calldata hashedCapabilityIds) external onlyOwner { + for (uint256 i; i < hashedCapabilityIds.length; ++i) { + bytes32 hashedCapabilityId = hashedCapabilityIds[i]; + if (!s_hashedCapabilityIds.contains(hashedCapabilityId)) revert CapabilityDoesNotExist(hashedCapabilityId); + if (!s_deprecatedHashedCapabilityIds.add(hashedCapabilityId)) revert CapabilityIsDeprecated(hashedCapabilityId); - s_deprecatedHashedCapabilityIds.add(hashedCapabilityId); - emit CapabilityDeprecated(hashedCapabilityId); + delete s_capabilities[hashedCapabilityId]; + emit CapabilityDeprecated(hashedCapabilityId); + } } - /// @notice This function returns a Capability by its hashed ID. Use `getHashedCapabilityId` to get the hashed ID. + /// @notice Returns a Capability by its hashed ID. + /// @dev Use `getHashedCapabilityId` to get the hashed ID. function getCapability(bytes32 hashedId) external view returns (Capability memory) { return s_capabilities[hashedId]; } @@ -623,7 +654,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @param version The capability's version number /// @return bytes32 A unique identifier for the capability /// @dev The hash of the encoded labelledName and version - function getHashedCapabilityId(string calldata labelledName, string calldata version) public pure returns (bytes32) { + function getHashedCapabilityId(string memory labelledName, string memory version) public pure returns (bytes32) { return keccak256(abi.encode(labelledName, version)); } @@ -647,7 +678,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { bool acceptsWorkflows, uint32 f ) external onlyOwner { - uint32 id = s_donId; + uint32 id = s_nextDONId++; s_dons[id].id = id; _setDONConfig( @@ -655,7 +686,6 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { capabilityConfigurations, DONParams({id: id, configCount: 1, isPublic: isPublic, acceptsWorkflows: acceptsWorkflows, f: f}) ); - ++s_donId; } /// @notice Updates a DON's configuration. This allows @@ -690,10 +720,16 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { uint32 donId = donIds[i]; DON storage don = s_dons[donId]; + uint32 configCount = don.configCount; + EnumerableSet.Bytes32Set storage nodeP2PIds = don.config[configCount].nodes; + + for (uint256 j; j < nodeP2PIds.length(); ++j) { + s_nodes[nodeP2PIds.at(j)].supportedDONIds.remove(donId); + } + // DON config count starts at index 1 if (don.configCount == 0) revert DONDoesNotExist(donId); delete s_dons[donId]; - s_removedDONIds.add(donId); emit ConfigSet(donId, 0); } } @@ -708,27 +744,42 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice Returns the list of configured DONs /// @return DONInfo[] The list of configured DONs function getDONs() external view returns (DONInfo[] memory) { - /// Minus one to account for s_donId starting at index 1 - uint256 donId = s_donId; - DONInfo[] memory dons = new DONInfo[](s_donId - s_removedDONIds.length() - 1); + /// Minus one to account for s_nextDONId starting at index 1 + uint32 donId = s_nextDONId; + DONInfo[] memory dons = new DONInfo[](donId - 1); uint256 idx; /// for (uint32 i = 1; i < donId; ++i) { - if (!s_removedDONIds.contains(i)) { + if (s_dons[i].id != 0) { dons[idx] = _getDON(i); ++idx; } } + if (idx != donId - 1) { + assembly { + mstore(dons, idx) + } + } return dons; } /// @notice Returns the DON specific configuration for a capability /// @param donId The DON's ID /// @param capabilityId The Capability ID - /// @return bytes The DON specific configuration for the capability - function getDONCapabilityConfig(uint32 donId, bytes32 capabilityId) external view returns (bytes memory) { + /// @return bytes The DON specific configuration for the capability stored on the capability registry + /// @return bytes The DON specific configuration stored on the capability's configuration contract + function getCapabilityConfigs(uint32 donId, bytes32 capabilityId) external view returns (bytes memory, bytes memory) { uint32 configCount = s_dons[donId].configCount; - return s_dons[donId].config[configCount].capabilityConfigs[capabilityId]; + + bytes memory donCapabilityConfig = s_dons[donId].config[configCount].capabilityConfigs[capabilityId]; + bytes memory globalCapabilityConfig; + + if (s_capabilities[capabilityId].configurationContract != address(0)) { + globalCapabilityConfig = ICapabilityConfiguration(s_capabilities[capabilityId].configurationContract) + .getCapabilityConfiguration(donId); + } + + return (donCapabilityConfig, globalCapabilityConfig); } /// @notice Sets the configuration for a DON @@ -747,9 +798,28 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { // as not all DONs will run OCR instances. if (donParams.f == 0 || donParams.f + 1 > nodes.length) revert InvalidFaultTolerance(donParams.f, nodes.length); + // Skip removing supported DON Ids from previously configured nodes in DON if + // we are adding the DON for the first time + if (donParams.configCount > 1) { + DONCapabilityConfig storage prevDONCapabilityConfig = s_dons[donParams.id].config[donParams.configCount - 1]; + + // We acknowledge that this may result in an out of gas error if the number of configured + // nodes is large. This is mitigated by ensuring that there will not be a large number + // of nodes configured to a DON. + // We also do not remove the nodes from the previous DON capability config. This is not + // needed as the previous config will be overwritten by storing the latest config + // at configCount + for (uint256 i; i < prevDONCapabilityConfig.nodes.length(); ++i) { + s_nodes[prevDONCapabilityConfig.nodes.at(i)].supportedDONIds.remove(donParams.id); + } + } + for (uint256 i; i < nodes.length; ++i) { - if (donCapabilityConfig.nodes.contains(nodes[i])) revert DuplicateDONNode(donParams.id, nodes[i]); - donCapabilityConfig.nodes.add(nodes[i]); + if (!donCapabilityConfig.nodes.add(nodes[i])) revert DuplicateDONNode(donParams.id, nodes[i]); + + /// Fine to add a duplicate DON ID to the set of supported DON IDs again as the set + /// will only store unique DON IDs + s_nodes[nodes[i]].supportedDONIds.add(donParams.id); } for (uint256 i; i < capabilityConfigurations.length; ++i) { @@ -765,7 +835,9 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { for (uint256 j; j < nodes.length; ++j) { if ( - !s_nodes[nodes[j]].supportedCapabilityIds[s_nodes[nodes[j]].configCount].contains(configuration.capabilityId) + !s_nodes[nodes[j]].supportedHashedCapabilityIds[s_nodes[nodes[j]].configCount].contains( + configuration.capabilityId + ) ) revert NodeDoesNotSupportCapability(nodes[j], configuration.capabilityId); } @@ -811,20 +883,25 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { } } - /// @notice Gets a node's data - /// @param p2pId The P2P ID of the node to query for - /// @return NodeInfo The node data - /// @return configCount The number of times the node has been configured - function _getNode(bytes32 p2pId) internal view returns (NodeInfo memory, uint32 configCount) { - return ( - NodeInfo({ - nodeOperatorId: s_nodes[p2pId].nodeOperatorId, - p2pId: s_nodes[p2pId].p2pId, - signer: s_nodes[p2pId].signer, - hashedCapabilityIds: s_nodes[p2pId].supportedCapabilityIds[s_nodes[p2pId].configCount].values() - }), - s_nodes[p2pId].configCount - ); + /// @notice Sets a capability's data + /// @param hashedCapabilityId The ID of the capability being set + /// @param capability The capability's data + function _setCapability(bytes32 hashedCapabilityId, Capability memory capability) internal { + if (capability.configurationContract != address(0)) { + /// Check that the configuration contract being assigned + /// correctly supports the ICapabilityConfiguration interface + /// by implementing both getCapabilityConfiguration and + /// beforeCapabilityConfigSet + if ( + capability.configurationContract.code.length == 0 || + !IERC165(capability.configurationContract).supportsInterface( + ICapabilityConfiguration.getCapabilityConfiguration.selector ^ + ICapabilityConfiguration.beforeCapabilityConfigSet.selector + ) + ) revert InvalidCapabilityConfigurationContractInterface(capability.configurationContract); + } + s_capabilities[hashedCapabilityId] = capability; + emit CapabilityConfigured(hashedCapabilityId); } /// @notice Gets DON's data diff --git a/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol b/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol index 4eb2c8197e3..4deaaa4443e 100644 --- a/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol +++ b/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol @@ -18,7 +18,7 @@ interface ICapabilityConfiguration { /// situation where configuration size grows too large. /// @param donId The DON instance ID. These are stored in the CapabilityRegistry. /// @return configuration DON's configuration for the capability. - function getCapabilityConfiguration(uint256 donId) external view returns (bytes memory configuration); + function getCapabilityConfiguration(uint32 donId) external view returns (bytes memory configuration); /// @notice Called by the registry prior to the config being set for a particular DON. /// @param nodes The nodes that the configuration is being set for. diff --git a/contracts/src/v0.8/keystone/test/BaseTest.t.sol b/contracts/src/v0.8/keystone/test/BaseTest.t.sol index 84cce57dc34..3df0b6ca7c7 100644 --- a/contracts/src/v0.8/keystone/test/BaseTest.t.sol +++ b/contracts/src/v0.8/keystone/test/BaseTest.t.sol @@ -47,9 +47,10 @@ contract BaseTest is Test, Constants { } function _getNodeOperators() internal view returns (CapabilityRegistry.NodeOperator[] memory) { - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](2); + 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}); return nodeOperators; } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol new file mode 100644 index 00000000000..6c6b164234f --- /dev/null +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: MIT +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 {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/interfaces/IERC165.sol"; + +contract CapabilityRegistry_AddCapabilitiesTest is BaseTest { + event CapabilityConfigured(bytes32 indexed hashedCapabilityId); + + function test_RevertWhen_CalledByNonAdmin() public { + changePrank(STRANGER); + + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + capabilities[0] = s_basicCapability; + + vm.expectRevert("Only callable by owner"); + s_capabilityRegistry.addCapabilities(capabilities); + } + + function test_RevertWhen_CapabilityExists() public { + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + capabilities[0] = s_basicCapability; + + // Successfully add the capability the first time + s_capabilityRegistry.addCapabilities(capabilities); + + // Try to add the same capability again + vm.expectRevert( + abi.encodeWithSelector(CapabilityRegistry.CapabilityAlreadyExists.selector, s_basicHashedCapabilityId) + ); + s_capabilityRegistry.addCapabilities(capabilities); + } + + function test_RevertWhen_ConfigurationContractNotDeployed() public { + address nonExistentContract = address(1); + s_capabilityWithConfigurationContract.configurationContract = nonExistentContract; + + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + capabilities[0] = s_capabilityWithConfigurationContract; + + vm.expectRevert( + abi.encodeWithSelector( + CapabilityRegistry.InvalidCapabilityConfigurationContractInterface.selector, + nonExistentContract + ) + ); + s_capabilityRegistry.addCapabilities(capabilities); + } + + function test_RevertWhen_ConfigurationContractDoesNotMatchInterface() public { + address contractWithoutERC165 = address(9999); + vm.mockCall( + contractWithoutERC165, + abi.encodeWithSelector( + IERC165.supportsInterface.selector, + ICapabilityConfiguration.getCapabilityConfiguration.selector ^ + ICapabilityConfiguration.beforeCapabilityConfigSet.selector + ), + abi.encode(false) + ); + s_capabilityWithConfigurationContract.configurationContract = contractWithoutERC165; + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + capabilities[0] = s_capabilityWithConfigurationContract; + + vm.expectRevert( + abi.encodeWithSelector( + CapabilityRegistry.InvalidCapabilityConfigurationContractInterface.selector, + contractWithoutERC165 + ) + ); + s_capabilityRegistry.addCapabilities(capabilities); + } + + function test_AddCapability_NoConfigurationContract() public { + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.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)); + emit CapabilityConfigured(hashedCapabilityId); + s_capabilityRegistry.addCapabilities(capabilities); + CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); + + assertEq(storedCapability.labelledName, s_basicCapability.labelledName); + assertEq(storedCapability.version, s_basicCapability.version); + assertEq(uint256(storedCapability.responseType), uint256(s_basicCapability.responseType)); + assertEq(storedCapability.configurationContract, s_basicCapability.configurationContract); + } + + function test_AddCapability_WithConfiguration() public { + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + capabilities[0] = s_capabilityWithConfigurationContract; + + bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + s_capabilityWithConfigurationContract.labelledName, + s_capabilityWithConfigurationContract.version + ); + vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + emit CapabilityConfigured(hashedCapabilityId); + s_capabilityRegistry.addCapabilities(capabilities); + + CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); + + assertEq(storedCapability.labelledName, s_capabilityWithConfigurationContract.labelledName); + assertEq(storedCapability.version, s_capabilityWithConfigurationContract.version); + assertEq(uint256(storedCapability.responseType), uint256(s_capabilityWithConfigurationContract.responseType)); + assertEq(storedCapability.configurationContract, s_capabilityWithConfigurationContract.configurationContract); + } +} diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilityTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilityTest.t.sol deleted file mode 100644 index aeb6cc69b11..00000000000 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilityTest.t.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityConfigurationContract} from "./mocks/CapabilityConfigurationContract.sol"; - -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; - -contract CapabilityRegistry_AddCapabilityTest is BaseTest { - function test_RevertWhen_CalledByNonAdmin() public { - changePrank(STRANGER); - - vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.addCapability(s_basicCapability); - } - - function test_RevertWhen_CapabilityExists() public { - // Successfully add the capability the first time - s_capabilityRegistry.addCapability(s_basicCapability); - - // Try to add the same capability again - vm.expectRevert(CapabilityRegistry.CapabilityAlreadyExists.selector); - s_capabilityRegistry.addCapability(s_basicCapability); - } - - function test_RevertWhen_ConfigurationContractNotDeployed() public { - address nonExistentContract = address(1); - s_capabilityWithConfigurationContract.configurationContract = nonExistentContract; - - vm.expectRevert( - abi.encodeWithSelector( - CapabilityRegistry.InvalidCapabilityConfigurationContractInterface.selector, - nonExistentContract - ) - ); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); - } - - function test_RevertWhen_ConfigurationContractDoesNotMatchInterface() public { - CapabilityRegistry contractWithoutERC165 = new CapabilityRegistry(); - - vm.expectRevert(); - s_capabilityWithConfigurationContract.configurationContract = address(contractWithoutERC165); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); - } - - function test_AddCapability_NoConfigurationContract() public { - s_capabilityRegistry.addCapability(s_basicCapability); - - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId("data-streams-reports", "1.0.0"); - CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); - - assertEq(storedCapability.labelledName, s_basicCapability.labelledName); - assertEq(storedCapability.version, s_basicCapability.version); - assertEq(uint256(storedCapability.responseType), uint256(s_basicCapability.responseType)); - assertEq(storedCapability.configurationContract, s_basicCapability.configurationContract); - } - - function test_AddCapability_WithConfiguration() public { - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); - - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( - s_capabilityWithConfigurationContract.labelledName, - s_capabilityWithConfigurationContract.version - ); - CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); - - assertEq(storedCapability.labelledName, s_capabilityWithConfigurationContract.labelledName); - assertEq(storedCapability.version, s_capabilityWithConfigurationContract.version); - assertEq(uint256(storedCapability.responseType), uint256(s_capabilityWithConfigurationContract.responseType)); - assertEq(storedCapability.configurationContract, s_capabilityWithConfigurationContract.configurationContract); - } -} diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol index ad101131a93..f9768f7105c 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol @@ -10,10 +10,12 @@ contract CapabilityRegistry_AddDONTest is BaseTest { function setUp() public override { BaseTest.setUp(); + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](3); bytes32[] memory capabilityIds = new bytes32[](2); @@ -138,7 +140,9 @@ contract CapabilityRegistry_AddDONTest is BaseTest { function test_RevertWhen_DeprecatedCapabilityAdded() public { bytes32 capabilityId = s_basicHashedCapabilityId; - s_capabilityRegistry.deprecateCapability(capabilityId); + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = capabilityId; + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; @@ -207,7 +211,16 @@ contract CapabilityRegistry_AddDONTest is BaseTest { assertEq(donInfo.isPublic, true); assertEq(donInfo.capabilityConfigurations.length, capabilityConfigs.length); assertEq(donInfo.capabilityConfigurations[0].capabilityId, s_basicHashedCapabilityId); - assertEq(s_capabilityRegistry.getDONCapabilityConfig(DON_ID, s_basicHashedCapabilityId), BASIC_CAPABILITY_CONFIG); + + (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); + assertEq(capabilityRegistryDONConfig, BASIC_CAPABILITY_CONFIG); + assertEq(capabilityConfigContractConfig, bytes("")); + + (bytes memory capabilityRegistryDONConfigTwo, bytes memory capabilityConfigContractConfigTwo) = s_capabilityRegistry + .getCapabilityConfigs(DON_ID, s_capabilityWithConfigurationContractId); + assertEq(capabilityRegistryDONConfigTwo, CONFIG_CAPABILITY_CONFIG); + assertEq(capabilityConfigContractConfigTwo, CONFIG_CAPABILITY_CONFIG); assertEq(donInfo.nodeP2PIds.length, nodes.length); assertEq(donInfo.nodeP2PIds[0], P2P_ID); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol index d9daaaa4c2b..6fa799bd378 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol @@ -5,7 +5,7 @@ import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityRegistry} from "../CapabilityRegistry.sol"; contract CapabilityRegistry_AddNodeOperatorsTest is BaseTest { - event NodeOperatorAdded(uint256 nodeOperatorId, address indexed admin, string name); + event NodeOperatorAdded(uint32 indexed nodeOperatorId, address indexed admin, string name); function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol index 5899dfa7b84..941712edb15 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol @@ -5,14 +5,17 @@ import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityRegistry} from "../CapabilityRegistry.sol"; contract CapabilityRegistry_AddNodesTest is BaseTest { - event NodeAdded(bytes32 p2pId, uint256 nodeOperatorId, bytes32 signer); + event NodeAdded(bytes32 p2pId, uint32 indexed nodeOperatorId, bytes32 signer); function setUp() public override { BaseTest.setUp(); + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; + changePrank(ADMIN); s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); } function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { @@ -29,7 +32,29 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(CapabilityRegistry.AccessForbidden.selector); + vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); + s_capabilityRegistry.addNodes(nodes); + } + + function test_RevertWhen_AddingNodeWithInvalidNodeOperator() public { + changePrank(ADMIN); + CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + + bytes32[] memory hashedCapabilityIds = new bytes32[](1); + hashedCapabilityIds[0] = s_basicHashedCapabilityId; + + uint32 invalidNodeOperatorId = 10000; + + nodes[0] = CapabilityRegistry.NodeInfo({ + nodeOperatorId: invalidNodeOperatorId, // Invalid NOP + p2pId: P2P_ID, + signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, + hashedCapabilityIds: hashedCapabilityIds + }); + + vm.expectRevert( + abi.encodeWithSelector(CapabilityRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) + ); s_capabilityRegistry.addNodes(nodes); } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapability.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol similarity index 56% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapability.t.sol rename to contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol index 0ae5507de45..74c66f8f580 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapability.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol @@ -2,17 +2,18 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; - import {CapabilityRegistry} from "../CapabilityRegistry.sol"; -contract CapabilityRegistry_AddCapabilityTest is BaseTest { +contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { event CapabilityDeprecated(bytes32 indexed hashedCapabilityId); function setUp() public override { BaseTest.setUp(); + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); } function test_RevertWhen_CalledByNonAdmin() public { @@ -22,15 +23,21 @@ contract CapabilityRegistry_AddCapabilityTest is BaseTest { s_basicCapability.version ); + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = hashedCapabilityId; + vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.deprecateCapability(hashedCapabilityId); + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_RevertWhen_CapabilityDoesNotExist() public { + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = s_nonExistentHashedCapabilityId; + vm.expectRevert( abi.encodeWithSelector(CapabilityRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) ); - s_capabilityRegistry.deprecateCapability(s_nonExistentHashedCapabilityId); + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_RevertWhen_CapabilityIsDeprecated() public { @@ -39,10 +46,12 @@ contract CapabilityRegistry_AddCapabilityTest is BaseTest { s_basicCapability.version ); - s_capabilityRegistry.deprecateCapability(hashedCapabilityId); + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = hashedCapabilityId; + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.CapabilityIsDeprecated.selector, hashedCapabilityId)); - s_capabilityRegistry.deprecateCapability(hashedCapabilityId); + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_DeprecatesCapability() public { @@ -50,9 +59,10 @@ contract CapabilityRegistry_AddCapabilityTest is BaseTest { s_basicCapability.labelledName, s_basicCapability.version ); + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = hashedCapabilityId; - s_capabilityRegistry.deprecateCapability(hashedCapabilityId); - + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); assertEq(s_capabilityRegistry.isCapabilityDeprecated(hashedCapabilityId), true); } @@ -62,8 +72,11 @@ contract CapabilityRegistry_AddCapabilityTest is BaseTest { s_basicCapability.version ); + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = hashedCapabilityId; + vm.expectEmit(address(s_capabilityRegistry)); emit CapabilityDeprecated(hashedCapabilityId); - s_capabilityRegistry.deprecateCapability(hashedCapabilityId); + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol index 51f43be1dde..60890db3377 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol @@ -7,9 +7,10 @@ import {CapabilityRegistry} from "../CapabilityRegistry.sol"; contract CapabilityRegistry_GetCapabilitiesTest is BaseTest { function setUp() public override { BaseTest.setUp(); - - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; + s_capabilityRegistry.addCapabilities(capabilities); } function test_ReturnsCapabilities() public view { @@ -38,7 +39,9 @@ contract CapabilityRegistry_GetCapabilitiesTest is BaseTest { s_basicCapability.labelledName, s_basicCapability.version ); - s_capabilityRegistry.deprecateCapability(hashedCapabilityId); + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = hashedCapabilityId; + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); CapabilityRegistry.Capability[] memory capabilities = s_capabilityRegistry.getCapabilities(); assertEq(capabilities.length, 1); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol index 3b5c874ca80..f53803c4041 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol @@ -13,9 +13,12 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { function setUp() public override { BaseTest.setUp(); + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; + s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](2); bytes32[] memory capabilityIds = new bytes32[](2); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol index 2fbf67c4392..f1ce3d79ab3 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol @@ -13,25 +13,30 @@ contract CapabilityRegistry_GetNodeOperatorsTest is BaseTest { function test_CorrectlyFetchesNodeOperators() public view { CapabilityRegistry.NodeOperator[] memory nodeOperators = s_capabilityRegistry.getNodeOperators(); - assertEq(nodeOperators.length, 2); + assertEq(nodeOperators.length, 3); assertEq(nodeOperators[0].admin, NODE_OPERATOR_ONE_ADMIN); assertEq(nodeOperators[0].name, NODE_OPERATOR_ONE_NAME); assertEq(nodeOperators[1].admin, NODE_OPERATOR_TWO_ADMIN); assertEq(nodeOperators[1].name, NODE_OPERATOR_TWO_NAME); + + assertEq(nodeOperators[2].admin, NODE_OPERATOR_THREE); + assertEq(nodeOperators[2].name, NODE_OPERATOR_THREE_NAME); } function test_DoesNotIncludeRemovedNodeOperators() public { changePrank(ADMIN); - uint256[] memory nodeOperatorsToRemove = new uint256[](1); + uint32[] memory nodeOperatorsToRemove = new uint32[](1); nodeOperatorsToRemove[0] = 2; s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); CapabilityRegistry.NodeOperator[] memory nodeOperators = s_capabilityRegistry.getNodeOperators(); - assertEq(nodeOperators.length, 1); + assertEq(nodeOperators.length, 2); assertEq(nodeOperators[0].admin, NODE_OPERATOR_ONE_ADMIN); assertEq(nodeOperators[0].name, NODE_OPERATOR_ONE_NAME); + assertEq(nodeOperators[1].admin, NODE_OPERATOR_THREE); + assertEq(nodeOperators[1].name, NODE_OPERATOR_THREE_NAME); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol index 530af0365b7..28fc33ab1da 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol @@ -8,9 +8,13 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); + + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; + s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](2); bytes32[] memory hashedCapabilityIds = new bytes32[](2); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol index 3aaeb5a0723..8d5bfdeea6b 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol @@ -11,9 +11,12 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { function setUp() public override { BaseTest.setUp(); + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; + s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](2); bytes32[] memory capabilityIds = new bytes32[](2); @@ -83,7 +86,12 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { assertEq(donInfo.configCount, 0); assertEq(donInfo.isPublic, false); assertEq(donInfo.capabilityConfigurations.length, 0); - assertEq(s_capabilityRegistry.getDONCapabilityConfig(DON_ID, s_basicHashedCapabilityId), bytes("")); + + (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); + + assertEq(capabilityRegistryDONConfig, 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/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol index 8295544422e..d7aef824593 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol @@ -5,7 +5,7 @@ import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityRegistry} from "../CapabilityRegistry.sol"; contract CapabilityRegistry_RemoveNodeOperatorsTest is BaseTest { - event NodeOperatorRemoved(uint256 nodeOperatorId); + event NodeOperatorRemoved(uint32 indexed nodeOperatorId); function setUp() public override { BaseTest.setUp(); @@ -16,7 +16,7 @@ contract CapabilityRegistry_RemoveNodeOperatorsTest is BaseTest { function test_RevertWhen_CalledByNonOwner() public { changePrank(STRANGER); vm.expectRevert("Only callable by owner"); - uint256[] memory nodeOperatorsToRemove = new uint256[](2); + uint32[] memory nodeOperatorsToRemove = new uint32[](2); nodeOperatorsToRemove[1] = 1; s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); } @@ -28,7 +28,7 @@ contract CapabilityRegistry_RemoveNodeOperatorsTest is BaseTest { emit NodeOperatorRemoved(TEST_NODE_OPERATOR_ONE_ID); vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); emit NodeOperatorRemoved(TEST_NODE_OPERATOR_TWO_ID); - uint256[] memory nodeOperatorsToRemove = new uint256[](2); + uint32[] memory nodeOperatorsToRemove = new uint32[](2); nodeOperatorsToRemove[0] = TEST_NODE_OPERATOR_ONE_ID; nodeOperatorsToRemove[1] = TEST_NODE_OPERATOR_TWO_ID; s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol index f05d1929f66..0c6b4a9651c 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol @@ -10,11 +10,14 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; + s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](3); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; @@ -26,7 +29,21 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { hashedCapabilityIds: hashedCapabilityIds }); - changePrank(NODE_OPERATOR_ONE_ADMIN); + nodes[1] = CapabilityRegistry.NodeInfo({ + nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, + p2pId: P2P_ID_TWO, + signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, + hashedCapabilityIds: hashedCapabilityIds + }); + + nodes[2] = CapabilityRegistry.NodeInfo({ + nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, + p2pId: P2P_ID_THREE, + signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, + hashedCapabilityIds: hashedCapabilityIds + }); + + changePrank(ADMIN); s_capabilityRegistry.addNodes(nodes); } @@ -36,7 +53,7 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - vm.expectRevert(CapabilityRegistry.AccessForbidden.selector); + vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); s_capabilityRegistry.removeNodes(nodes); } @@ -58,6 +75,103 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { s_capabilityRegistry.removeNodes(nodes); } + function test_RevertWhen_NodePartOfDON() public { + changePrank(ADMIN); + 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({ + capabilityId: s_basicHashedCapabilityId, + config: BASIC_CAPABILITY_CONFIG + }); + + s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + + vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfDON.selector, P2P_ID)); + s_capabilityRegistry.removeNodes(nodes); + } + + function test_CanRemoveWhenDONDeleted() public { + changePrank(ADMIN); + + 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({ + capabilityId: s_basicHashedCapabilityId, + config: BASIC_CAPABILITY_CONFIG + }); + + // Add DON + s_capabilityRegistry.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.NodePartOfDON.selector, P2P_ID)); + s_capabilityRegistry.removeNodes(removedNodes); + + // Remove DON + uint32[] memory donIds = new uint32[](1); + donIds[0] = DON_ID; + s_capabilityRegistry.removeDONs(donIds); + + // Remove node + s_capabilityRegistry.removeNodes(removedNodes); + (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + assertEq(node.nodeOperatorId, 0); + assertEq(node.p2pId, bytes32("")); + assertEq(node.signer, bytes32("")); + assertEq(node.hashedCapabilityIds.length, 0); + assertEq(configCount, 0); + } + + function test_CanRemoveWhenNodeNoLongerPartOfDON() public { + changePrank(ADMIN); + + bytes32[] memory nodes = new bytes32[](3); + nodes[0] = P2P_ID; + nodes[1] = P2P_ID_TWO; + nodes[2] = P2P_ID_THREE; + + CapabilityRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + capabilityId: s_basicHashedCapabilityId, + config: BASIC_CAPABILITY_CONFIG + }); + + // Add DON + s_capabilityRegistry.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.NodePartOfDON.selector, P2P_ID_TWO)); + s_capabilityRegistry.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); + + // Remove node + s_capabilityRegistry.removeNodes(removedNodes); + (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID_TWO); + assertEq(node.nodeOperatorId, 0); + assertEq(node.p2pId, bytes32("")); + assertEq(node.signer, bytes32("")); + assertEq(node.hashedCapabilityIds.length, 0); + assertEq(configCount, 0); + } + function test_RemovesNode() public { changePrank(NODE_OPERATOR_ONE_ADMIN); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol new file mode 100644 index 00000000000..629b4a17a5a --- /dev/null +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {BaseTest} from "./BaseTest.t.sol"; + +contract CapabilityRegistry_TypeAndVersionTest is BaseTest { + function test_TypeAndVersion() public view { + assertEq(s_capabilityRegistry.typeAndVersion(), "CapabilityRegistry 1.0.0"); + } +} diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol index cbf697677cf..1737c19d272 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol @@ -11,9 +11,12 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { function setUp() public override { BaseTest.setUp(); + CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; + s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](3); bytes32[] memory capabilityIds = new bytes32[](2); @@ -148,7 +151,9 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { function test_RevertWhen_DeprecatedCapabilityAdded() public { bytes32 capabilityId = s_basicHashedCapabilityId; - s_capabilityRegistry.deprecateCapability(capabilityId); + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = capabilityId; + s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; @@ -222,7 +227,11 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { assertEq(donInfo.isPublic, false); assertEq(donInfo.capabilityConfigurations.length, capabilityConfigs.length); assertEq(donInfo.capabilityConfigurations[0].capabilityId, s_basicHashedCapabilityId); - assertEq(s_capabilityRegistry.getDONCapabilityConfig(DON_ID, s_basicHashedCapabilityId), BASIC_CAPABILITY_CONFIG); + + (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); + assertEq(capabilityRegistryDONConfig, BASIC_CAPABILITY_CONFIG); + assertEq(capabilityConfigContractConfig, bytes("")); assertEq(donInfo.nodeP2PIds.length, nodes.length); assertEq(donInfo.nodeP2PIds[0], P2P_ID); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol index 4be8010dcb1..77d180a784a 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol @@ -5,9 +5,9 @@ import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityRegistry} from "../CapabilityRegistry.sol"; contract CapabilityRegistry_UpdateNodeOperatorTest is BaseTest { - event NodeOperatorUpdated(uint256 nodeOperatorId, address indexed admin, string name); + event NodeOperatorUpdated(uint32 indexed nodeOperatorId, address indexed admin, string name); - uint256 private constant TEST_NODE_OPERATOR_ID = 0; + 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"; @@ -19,24 +19,54 @@ contract CapabilityRegistry_UpdateNodeOperatorTest is BaseTest { function test_RevertWhen_CalledByNonAdminAndNonOwner() public { changePrank(STRANGER); - vm.expectRevert(CapabilityRegistry.AccessForbidden.selector); CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - uint256[] memory nodeOperatorIds = new uint256[](1); + 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); - vm.expectRevert(CapabilityRegistry.InvalidNodeOperatorAdmin.selector); CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: address(0), name: NEW_NODE_OPERATOR_NAME}); - uint256[] memory nodeOperatorIds = new uint256[](1); + 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); } @@ -46,14 +76,14 @@ contract CapabilityRegistry_UpdateNodeOperatorTest is BaseTest { CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - uint256[] memory nodeOperatorIds = new uint256[](1); + 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(0); + 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/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol index c97a9c339c4..a419f2c198e 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol @@ -5,14 +5,17 @@ import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityRegistry} from "../CapabilityRegistry.sol"; contract CapabilityRegistry_UpdateNodesTest is BaseTest { - event NodeUpdated(bytes32 p2pId, uint256 nodeOperatorId, bytes32 signer); + 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); + capabilities[0] = s_basicCapability; + capabilities[1] = s_capabilityWithConfigurationContract; + s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapability(s_basicCapability); - s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); + s_capabilityRegistry.addCapabilities(capabilities); CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); @@ -54,7 +57,7 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(CapabilityRegistry.AccessForbidden.selector); + vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); s_capabilityRegistry.updateNodes(nodes); } diff --git a/contracts/src/v0.8/keystone/test/mocks/CapabilityConfigurationContract.sol b/contracts/src/v0.8/keystone/test/mocks/CapabilityConfigurationContract.sol index c30a81714d8..2dd86fdf6da 100644 --- a/contracts/src/v0.8/keystone/test/mocks/CapabilityConfigurationContract.sol +++ b/contracts/src/v0.8/keystone/test/mocks/CapabilityConfigurationContract.sol @@ -7,16 +7,15 @@ import {ERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/uti contract CapabilityConfigurationContract is ICapabilityConfiguration, ERC165 { mapping(uint256 => bytes) private s_donConfiguration; - function getCapabilityConfiguration(uint256 donId) external view returns (bytes memory configuration) { + function getCapabilityConfiguration(uint32 donId) external view returns (bytes memory configuration) { return s_donConfiguration[donId]; } - function beforeCapabilityConfigSet( - bytes32[] calldata nodes, - bytes calldata config, - uint64 configCount, - uint32 donId - ) external {} + function beforeCapabilityConfigSet(bytes32[] calldata, bytes calldata config, uint64, uint32 donId) external { + // In practice a real capability configuration contract will do more than just store + // the config for a DON + s_donConfiguration[donId] = config; + } function supportsInterface(bytes4 interfaceId) public pure override returns (bool) { return interfaceId == this.getCapabilityConfiguration.selector ^ this.beforeCapabilityConfigSet.selector; diff --git a/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go b/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go index 40dfc10d6c2..786c44db8ab 100644 --- a/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go +++ b/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go @@ -66,8 +66,8 @@ type CapabilityRegistryNodeOperator struct { } var CapabilityRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[],\"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\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"},{\"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\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAdded\",\"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\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"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\":\"capability\",\"type\":\"tuple\"}],\"name\":\"addCapability\",\"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\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"}],\"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.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"deprecateCapability\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"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\":\"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\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"},{\"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\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getDONCapabilityConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"},{\"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\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"}],\"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\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"},{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"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\":\"uint256[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint256[]\"}],\"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\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint256[]\"},{\"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.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052601280546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b614bef80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee57806395864d1f11610097578063b06e07a711610071578063b06e07a7146103ec578063ddbe4f82146103ff578063e29581aa14610414578063f2fde38b1461042a57600080fd5b806395864d1f146103a65780639cb7c5f4146103b9578063ae3c241c146103d957600080fd5b806373ac22b4116100c857806373ac22b41461036357806379ba5097146103765780638da5cb5b1461037e57600080fd5b80635e65e3091461031b57806365c14dc71461032e57806366acaa331461034e57600080fd5b80631cdf63431161015b578063235374051161013557806323537405146102b45780632c01a1e8146102d4578063398f3773146102e757806350c946fe146102fa57600080fd5b80631cdf6343146102795780631d05394c1461028c578063214502431461029f57600080fd5b8063178962481161018c5780631789624814610211578063181f5a7714610224578063193ec0061461026657600080fd5b80630c5801e3146101b35780630fe5800a146101c857806312570011146101ee575b600080fd5b6101c66101c1366004613755565b61043d565b005b6101db6101d6366004613803565b61074e565b6040519081526020015b60405180910390f35b6102016101fc366004613863565b610787565b60405190151581526020016101e5565b6101c661021f36600461387c565b61079a565b60408051808201909152601881527f4361706162696c697479526567697374727920312e302e30000000000000000060208201525b6040516101e5919061391b565b6101c6610274366004613955565b6109d6565b6101c66102873660046139fa565b610ab1565b6101c661029a3660046139fa565b610b81565b6102a7610cc1565b6040516101e59190613b64565b6102c76102c2366004613be4565b610e21565b6040516101e59190613bff565b6101c66102e23660046139fa565b610e65565b6101c66102f53660046139fa565b611109565b61030d610308366004613863565b6112cc565b6040516101e5929190613c53565b6101c66103293660046139fa565b611301565b61034161033c366004613863565b611804565b6040516101e59190613cb0565b6103566118ea565b6040516101e59190613cc3565b6101c66103713660046139fa565b611aa8565b6101c6611f0e565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e5565b6101c66103b4366004613d36565b61200b565b6103cc6103c7366004613863565b6120d7565b6040516101e59190613ea7565b6101c66103e7366004613863565b6122dc565b6102596103fa366004613eba565b6123a7565b61040761247c565b6040516101e59190613ee4565b61041c612771565b6040516101e5929190613f57565b6101c6610438366004614038565b6128fc565b828114610485576040517fab8b67c600000000000000000000000000000000000000000000000000000000815260048101849052602481018290526044015b60405180910390fd5b6000805473ffffffffffffffffffffffffffffffffffffffff16905b848110156107465760008686838181106104bd576104bd614055565b90506020020135905060008585848181106104da576104da614055565b90506020028101906104ec9190614084565b6104f59061418c565b805190915073ffffffffffffffffffffffffffffffffffffffff16610546576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061058357503373ffffffffffffffffffffffffffffffffffffffff851614155b156105ba576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516000838152600f602052604090205473ffffffffffffffffffffffffffffffffffffffff908116911614158061066c5750602080820151604051610600920161391b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206000868152600f83529290922091926106539260010191016142ab565b6040516020818303038152906040528051906020012014155b156107335780516000838152600f6020908152604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9093169290921782558201516001909101906106d9908261439a565b50806000015173ffffffffffffffffffffffffffffffffffffffff167f14c8f513e8a6d86d2d16b0cb64976de4e72386c4f8068eca3b7354373f8fe97a83836020015160405161072a9291906144b4565b60405180910390a25b50508061073f906144fc565b90506104a1565b505050505050565b600084848484604051602001610767949392919061457d565b604051602081830303815290604052805190602001209050949350505050565b6000610794600583612910565b92915050565b6107a261292b565b60006107be6107b183806145af565b6101d660208601866145af565b90506107cb600382612910565b15610802576040517fe288638f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061081460a0840160808501614038565b73ffffffffffffffffffffffffffffffffffffffff161461097f5761083f60a0830160808401614038565b73ffffffffffffffffffffffffffffffffffffffff163b158061091f575061086d60a0830160808401614038565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f73e8b41d00000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff91909116906301ffc9a790602401602060405180830381865afa1580156108f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091d9190614614565b155b1561097f5761093460a0830160808401614038565b6040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240161047c565b61098a6003826129ae565b50600081815260026020526040902082906109a58282614801565b505060405181907f65610e5677eedff94555572640e442f89848a109ef8593fa927ac30b2565ff0690600090a25050565b6109de61292b565b60125463ffffffff640100000000909104811660008181526011602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a081018352838152600191810191909152861515918101919091528415156060820152918316608083015290610a6b9089908990899089906129ba565b60128054600490610a8990640100000000900463ffffffff166149c4565b91906101000a81548163ffffffff021916908363ffffffff1602179055505050505050505050565b610ab961292b565b60005b81811015610b7c576000838383818110610ad857610ad8614055565b602090810292909201356000818152600f9093526040832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155909350919050610b2960018301826136bb565b50610b3790506007826129ae565b506040518181527f1e5877d7b3001d1569bf733b76c7eceda58bd6c031e5b8d0b7042308ba2e9d4f9060200160405180910390a150610b75816144fc565b9050610abc565b505050565b610b8961292b565b60005b81811015610b7c576000838383818110610ba857610ba8614055565b9050602002016020810190610bbd9190613be4565b63ffffffff808216600090815260116020526040812080549394509264010000000090049091169003610c24576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8316600482015260240161047c565b63ffffffff808316600081815260116020526040902080547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000169055610c6e91600991906129ae16565b506040805163ffffffff84168152600060208201527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a1505080610cba906144fc565b9050610b8c565b601254606090640100000000900463ffffffff1660006001610ce36009612f9c565b601254610cfe9190640100000000900463ffffffff166149e7565b610d0891906149e7565b67ffffffffffffffff811115610d2057610d206140c2565b604051908082528060200260200182016040528015610da757816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610d3e5790505b509050600060015b838163ffffffff161015610e1857610dd1600963ffffffff8084169061291016565b610e0857610dde81612fa6565b838381518110610df057610df0614055565b602002602001018190525081610e05906144fc565b91505b610e11816149c4565b9050610daf565b50909392505050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261079482612fa6565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015611103576000848483818110610e9f57610e9f614055565b602090810292909201356000818152601090935260409092206001015491925050151580610efc576040517f64e2ee920000000000000000000000000000000000000000000000000000000081526004810183905260240161047c565b60008281526010602090815260408083205463ffffffff168352600f82528083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001810180549293919291840191610f5690614258565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8290614258565b8015610fcf5780601f10610fa457610100808354040283529160200191610fcf565b820191906000526020600020905b815481529060010190602001808311610fb257829003601f168201915b505050505081525050905084158015610fff5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611036576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526010602052604090206001015461105490600b90613282565b5060008381526010602052604090206002015461107390600d90613282565b5060008381526010602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001681556001810183905560020191909155517f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb9753205906110e79085815260200190565b60405180910390a1505050806110fc906144fc565b9050610e83565b50505050565b61111161292b565b60005b81811015610b7c57600083838381811061113057611130614055565b90506020028101906111429190614084565b61114b9061418c565b805190915073ffffffffffffffffffffffffffffffffffffffff1661119c576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600f909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190611228908261439a565b5050601280549091506000906112439063ffffffff166149c4565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff167fda6697b182650034bd205cdc2dbfabb06bdb3a0a83a2b45bfefa3c4881284e0b8284602001516040516112b19291906144b4565b60405180910390a25050806112c5906144fc565b9050611114565b60408051608081018252600080825260208201819052918101829052606080820152906112f88361328e565b91509150915091565b60005b81811015610b7c57600083838381811061132057611320614055565b905060200281019061133291906149fa565b61133b90614a2e565b9050600061135e60005473ffffffffffffffffffffffffffffffffffffffff1690565b825163ffffffff166000908152600f602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff908116835260018201805496909116331496509394919390928401916113bb90614258565b80601f01602080910402602001604051908101604052809291908181526020018280546113e790614258565b80156114345780601f1061140957610100808354040283529160200191611434565b820191906000526020600020905b81548152906001019060200180831161141757829003601f168201915b5050505050815250509050811580156114645750805173ffffffffffffffffffffffffffffffffffffffff163314155b1561149b576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040808401516000908152601060205220600101541515806114f15783604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161047c91815260200190565b6020840151158061153757508360200151601060008660400151815260200190815260200160002060010154141580156115375750602084015161153790600b90612910565b1561156e576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606084015180516000036115b057806040517f3748d4c600000000000000000000000000000000000000000000000000000000815260040161047c9190614b01565b60408581015160009081526010602052208054640100000000900463ffffffff169060046115dd836149c4565b82546101009290920a63ffffffff8181021990931691831602179091556040878101516000908152601060205290812054640100000000900490911691505b82518110156116e85761165283828151811061163a5761163a614055565b6020026020010151600361291090919063ffffffff16565b61168a57826040517f3748d4c600000000000000000000000000000000000000000000000000000000815260040161047c9190614b01565b6116d783828151811061169f5761169f614055565b6020908102919091018101516040808b015160009081526010845281812063ffffffff8089168352600390910190945220916129ae16565b506116e1816144fc565b905061161c565b5085516040808801805160009081526010602090815283822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9096169590951790945581518082528382206002015581518152828120600190810154948b015192518252929020909101541461179d5761176c600b82613282565b50602080880180516040808b015160009081526010909452909220600101919091555161179b90600b906129ae565b505b60408781015188516020808b0151845193845263ffffffff909216908301528183015290517ff101cfc54994c31624d25789378d71ec4dbdc533e26a4ecc6b7648f4798d09169181900360600190a150505050505050806117fd906144fc565b9050611304565b6040805180820190915260008152606060208201526000828152600f60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff168352600181018054919284019161186190614258565b80601f016020809104026020016040519081016040528092919081815260200182805461188d90614258565b80156118da5780601f106118af576101008083540402835291602001916118da565b820191906000526020600020905b8154815290600101906020018083116118bd57829003601f168201915b5050505050815250509050919050565b60125460609063ffffffff16600060016119046007612f9c565b601254611917919063ffffffff166149e7565b61192191906149e7565b67ffffffffffffffff811115611939576119396140c2565b60405190808252806020026020018201604052801561197f57816020015b6040805180820190915260008152606060208201528152602001906001900390816119575790505b509050600060015b8363ffffffff16811015610e18576119a0600782612910565b611a98576000818152600f60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916119ec90614258565b80601f0160208091040260200160405190810160405280929190818152602001828054611a1890614258565b8015611a655780601f10611a3a57610100808354040283529160200191611a65565b820191906000526020600020905b815481529060010190602001808311611a4857829003601f168201915b505050505081525050838381518110611a8057611a80614055565b602002602001018190525081611a95906144fc565b91505b611aa1816144fc565b9050611987565b60005b81811015610b7c576000838383818110611ac757611ac7614055565b9050602002810190611ad991906149fa565b611ae290614a2e565b90506000611b0560005473ffffffffffffffffffffffffffffffffffffffff1690565b825163ffffffff166000908152600f602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff90811683526001820180549690911633149650939491939092840191611b6290614258565b80601f0160208091040260200160405190810160405280929190818152602001828054611b8e90614258565b8015611bdb5780601f10611bb057610100808354040283529160200191611bdb565b820191906000526020600020905b815481529060010190602001808311611bbe57829003601f168201915b505050505081525050905081158015611c0b5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611c42576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408084015160009081526010602052206001015415158080611c6757506040840151155b15611ca65783604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161047c91815260200190565b60208401511580611cc357506020840151611cc390600b90612910565b15611cfa576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608401518051600003611d3c57806040517f3748d4c600000000000000000000000000000000000000000000000000000000815260040161047c9190614b01565b60408581015160009081526010602052208054600490611d6990640100000000900463ffffffff166149c4565b82546101009290920a63ffffffff81810219909316918316021790915560408681015160009081526010602052908120546401000000009004909116905b8251811015611e2357611dc583828151811061163a5761163a614055565b611dfd57826040517f3748d4c600000000000000000000000000000000000000000000000000000000815260040161047c9190614b01565b611e1283828151811061169f5761169f614055565b50611e1c816144fc565b9050611da7565b5085516040808801805160009081526010602090815283822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9687161790558251808352848320600201558a018051925182529290206001015551611e9591600b91906129ae16565b506040860151611ea790600d906129ae565b5060408681015187516020808a0151845193845263ffffffff909216908301528183015290517fc9296aa9b0951d8000e8ed7f2b5be30c5106de8df3dbedf9a57c93f5f9e4d7da9181900360600190a150505050505080611f07906144fc565b9050611aab565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161047c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61201361292b565b63ffffffff808916600090815260116020526040812054640100000000900490911690819003612077576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a16600482015260240161047c565b6120cc888888886040518060a001604052808f63ffffffff1681526020018761209f906149c4565b97508763ffffffff1681526020018a1515815260200189151581526020018863ffffffff168152506129ba565b505050505050505050565b6121076040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a0810190925280548290829061212f90614258565b80601f016020809104026020016040519081016040528092919081815260200182805461215b90614258565b80156121a85780601f1061217d576101008083540402835291602001916121a8565b820191906000526020600020905b81548152906001019060200180831161218b57829003601f168201915b505050505081526020016001820180546121c190614258565b80601f01602080910402602001604051908101604052809291908181526020018280546121ed90614258565b801561223a5780601f1061220f5761010080835404028352916020019161223a565b820191906000526020600020905b81548152906001019060200180831161221d57829003601f168201915b5050509183525050600282015460209091019060ff16600381111561226157612261613deb565b600381111561227257612272613deb565b81526020016002820160019054906101000a900460ff16600181111561229a5761229a613deb565b60018111156122ab576122ab613deb565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b6122e461292b565b6122ef600382612910565b612328576040517fe181733f0000000000000000000000000000000000000000000000000000000081526004810182905260240161047c565b612333600582612910565b1561236d576040517ff7d7a2940000000000000000000000000000000000000000000000000000000081526004810182905260240161047c565b6123786005826129ae565b5060405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a250565b63ffffffff808316600090815260116020908152604080832080546401000000009004909416808452600190940182528083208584526003019091529020805460609291906123f590614258565b80601f016020809104026020016040519081016040528092919081815260200182805461242190614258565b801561246e5780601f106124435761010080835404028352916020019161246e565b820191906000526020600020905b81548152906001019060200180831161245157829003601f168201915b505050505091505092915050565b6060600061248a6003613333565b905060006124986005612f9c565b82516124a491906149e7565b67ffffffffffffffff8111156124bc576124bc6140c2565b60405190808252806020026020018201604052801561251d57816020015b61250a6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816124da5790505b5090506000805b8351811015610e1857600084828151811061254157612541614055565b6020026020010151905061255f81600561291090919063ffffffff16565b6127605760008181526002602052604090819020815160a0810190925280548290829061258b90614258565b80601f01602080910402602001604051908101604052809291908181526020018280546125b790614258565b80156126045780601f106125d957610100808354040283529160200191612604565b820191906000526020600020905b8154815290600101906020018083116125e757829003601f168201915b5050505050815260200160018201805461261d90614258565b80601f016020809104026020016040519081016040528092919081815260200182805461264990614258565b80156126965780601f1061266b57610100808354040283529160200191612696565b820191906000526020600020905b81548152906001019060200180831161267957829003601f168201915b5050509183525050600282015460209091019060ff1660038111156126bd576126bd613deb565b60038111156126ce576126ce613deb565b81526020016002820160019054906101000a900460ff1660018111156126f6576126f6613deb565b600181111561270757612707613deb565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff16602090910152845185908590811061274657612746614055565b6020026020010181905250828061275c906144fc565b9350505b5061276a816144fc565b9050612524565b6060806000612780600d613333565b90506000815167ffffffffffffffff81111561279e5761279e6140c2565b60405190808252806020026020018201604052801561280d57816020015b60408051608081018252600080825260208083018290529282015260608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816127bc5790505b5090506000825167ffffffffffffffff81111561282c5761282c6140c2565b604051908082528060200260200182016040528015612855578160200160208202803683370190505b50905060005b83518110156128f157600084828151811061287857612878614055565b6020026020010151905060008061288e8361328e565b91509150818685815181106128a5576128a5614055565b6020026020010181905250808585815181106128c3576128c3614055565b602002602001019063ffffffff16908163ffffffff1681525050505050806128ea906144fc565b905061285b565b509094909350915050565b61290461292b565b61290d81613340565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146129ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161047c565b565b60006129248383613435565b805163ffffffff90811660009081526011602090815260408083208286015185168452600101909152902060808301519091161580612a0e575060808201518590612a06906001614b14565b63ffffffff16115b15612a5a5760808201516040517fd5f5269100000000000000000000000000000000000000000000000000000000815263ffffffff90911660048201526024810186905260440161047c565b60005b85811015612b2257612a8a878783818110612a7a57612a7a614055565b8592602090910201359050612910565b15612aec578251878783818110612aa357612aa3614055565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff9094166004850152602002919091013560248301525060440161047c565b612b11878783818110612b0157612b01614055565b85926020909102013590506129ae565b50612b1b816144fc565b9050612a5d565b5060005b83811015612e0e5736858583818110612b4157612b41614055565b9050602002810190612b539190614084565b9050612b6160038235612910565b612b9a576040517fe181733f0000000000000000000000000000000000000000000000000000000081528135600482015260240161047c565b612ba660058235612910565b15612be0576040517ff7d7a2940000000000000000000000000000000000000000000000000000000081528135600482015260240161047c565b8035600090815260038401602052604081208054612bfd90614258565b90501115612c495783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff90911660048201528135602482015260440161047c565b60005b87811015612d5b57612cf08235601060008c8c86818110612c6f57612c6f614055565b9050602002013581526020019081526020016000206003016000601060008e8e88818110612c9f57612c9f614055565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002061291090919063ffffffff16565b612d4b57888882818110612d0657612d06614055565b6040517fa7e79250000000000000000000000000000000000000000000000000000000008152602090910292909201356004830152508235602482015260440161047c565b612d54816144fc565b9050612c4c565b5060028301805460018101825560009182526020918290208335910155612d84908201826145af565b82356000908152600386016020526040902091612da2919083614631565b508351602080860151612dfd92918435908c908c90612dc3908801886145af565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061348492505050565b50612e07816144fc565b9050612b26565b50604080830151835163ffffffff90811660009081526011602090815284822080549415156c01000000000000000000000000027fffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffff90951694909417909355606086015186518316825284822080549115156d0100000000000000000000000000027fffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffff9092169190911790556080860151865183168252848220805491841668010000000000000000027fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c158170365192612f8c929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b6000610794825490565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff85811683526011825284832080546401000000009004909116808452600190910182528483206002810180548751818602810186019098528088529596929591949390919083018282801561305757602002820191906000526020600020905b815481526020019060010190808311613043575b505050505090506000815167ffffffffffffffff81111561307a5761307a6140c2565b6040519080825280602002602001820160405280156130c057816020015b6040805180820190915260008152606060208201528152602001906001900390816130985790505b50905060005b81518110156131e15760405180604001604052808483815181106130ec576130ec614055565b6020026020010151815260200185600301600086858151811061311157613111614055565b60200260200101518152602001908152602001600020805461313290614258565b80601f016020809104026020016040519081016040528092919081815260200182805461315e90614258565b80156131ab5780601f10613180576101008083540402835291602001916131ab565b820191906000526020600020905b81548152906001019060200180831161318e57829003601f168201915b50505050508152508282815181106131c5576131c5614055565b6020026020010181905250806131da906144fc565b90506130c6565b506040805160e08101825263ffffffff8089166000818152601160208181528683205480861687528b8616828801526801000000000000000081049095169686019690965260ff6c010000000000000000000000008504811615156060870152929091529093526d010000000000000000000000000090049091161515608082015260a0810161327085613333565b81526020019190915295945050505050565b60006129248383613565565b604080516080810182526000808252602082018190529181019190915260608082015260408051608081018252600084815260106020908152838220805463ffffffff80821686526001830154848701526002830154868801526401000000009091041683526003019052918220606082019061330a90613333565b905260009384526010602052604090932054929364010000000090930463ffffffff1692915050565b606060006129248361365f565b3373ffffffffffffffffffffffffffffffffffffffff8216036133bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161047c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600081815260018301602052604081205461347c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610794565b506000610794565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff161561074657600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c9061352b908690869086908b908d90600401614b31565b600060405180830381600087803b15801561354557600080fd5b505af1158015613559573d6000803e3d6000fd5b50505050505050505050565b6000818152600183016020526040812054801561364e5760006135896001836149e7565b855490915060009061359d906001906149e7565b90508181146136025760008660000182815481106135bd576135bd614055565b90600052602060002001549050808760000184815481106135e0576135e0614055565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061361357613613614bb3565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610794565b6000915050610794565b5092915050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156136af57602002820191906000526020600020905b81548152602001906001019080831161369b575b50505050509050919050565b5080546136c790614258565b6000825580601f106136d7575050565b601f01602090049060005260206000209081019061290d91905b8082111561370557600081556001016136f1565b5090565b60008083601f84011261371b57600080fd5b50813567ffffffffffffffff81111561373357600080fd5b6020830191508360208260051b850101111561374e57600080fd5b9250929050565b6000806000806040858703121561376b57600080fd5b843567ffffffffffffffff8082111561378357600080fd5b61378f88838901613709565b909650945060208701359150808211156137a857600080fd5b506137b587828801613709565b95989497509550505050565b60008083601f8401126137d357600080fd5b50813567ffffffffffffffff8111156137eb57600080fd5b60208301915083602082850101111561374e57600080fd5b6000806000806040858703121561381957600080fd5b843567ffffffffffffffff8082111561383157600080fd5b61383d888389016137c1565b9096509450602087013591508082111561385657600080fd5b506137b5878288016137c1565b60006020828403121561387557600080fd5b5035919050565b60006020828403121561388e57600080fd5b813567ffffffffffffffff8111156138a557600080fd5b820160a0818503121561292457600080fd5b6000815180845260005b818110156138dd576020818501810151868301820152016138c1565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061292460208301846138b7565b801515811461290d57600080fd5b803563ffffffff8116811461395057600080fd5b919050565b600080600080600080600060a0888a03121561397057600080fd5b873567ffffffffffffffff8082111561398857600080fd5b6139948b838c01613709565b909950975060208a01359150808211156139ad57600080fd5b506139ba8a828b01613709565b90965094505060408801356139ce8161392e565b925060608801356139de8161392e565b91506139ec6080890161393c565b905092959891949750929550565b60008060208385031215613a0d57600080fd5b823567ffffffffffffffff811115613a2457600080fd5b613a3085828601613709565b90969095509350505050565b600081518084526020808501945080840160005b83811015613a6c57815187529582019590820190600101613a50565b509495945050505050565b600063ffffffff80835116845260208181850151168186015260408281860151168187015260608501511515606087015260808501511515608087015260a0850151925060e060a0870152613acf60e0870184613a3c565b925060c085015186840360c08801528381518086528486019150848160051b870101858401935060005b82811015613b56578782037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018452845180518352870151878301879052613b43878401826138b7565b9588019594880194925050600101613af9565b509998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613bd7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613bc5858351613a77565b94509285019290850190600101613b8b565b5092979650505050505050565b600060208284031215613bf657600080fd5b6129248261393c565b6020815260006129246020830184613a77565b63ffffffff815116825260208101516020830152604081015160408301526000606082015160806060850152613c4b6080850182613a3c565b949350505050565b604081526000613c666040830185613c12565b905063ffffffff831660208301529392505050565b73ffffffffffffffffffffffffffffffffffffffff81511682526000602082015160406020850152613c4b60408501826138b7565b6020815260006129246020830184613c7b565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613bd7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613d24858351613c7b565b94509285019290850190600101613cea565b60008060008060008060008060c0898b031215613d5257600080fd5b613d5b8961393c565b9750602089013567ffffffffffffffff80821115613d7857600080fd5b613d848c838d01613709565b909950975060408b0135915080821115613d9d57600080fd5b50613daa8b828c01613709565b9096509450506060890135613dbe8161392e565b92506080890135613dce8161392e565b9150613ddc60a08a0161393c565b90509295985092959890939650565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a08452613e2f60a08501826138b7565b905060208301518482036020860152613e4882826138b7565b915050604083015160048110613e6057613e60613deb565b6040850152606083015160028110613e7a57613e7a613deb565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b6020815260006129246020830184613e1a565b60008060408385031215613ecd57600080fd5b613ed68361393c565b946020939093013593505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613bd7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613f45858351613e1a565b94509285019290850190600101613f0b565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b83811015613fcc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0888703018552613fba868351613c12565b95509382019390820190600101613f80565b50508584038187015286518085528782019482019350915060005b8281101561400957845163ffffffff1684529381019392810192600101613fe7565b5091979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461290d57600080fd5b60006020828403121561404a57600080fd5b813561292481614016565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126140b857600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715614114576141146140c2565b60405290565b6040516080810167ffffffffffffffff81118282101715614114576141146140c2565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614184576141846140c2565b604052919050565b60006040823603121561419e57600080fd5b6141a66140f1565b82356141b181614016565b815260208381013567ffffffffffffffff808211156141cf57600080fd5b9085019036601f8301126141e257600080fd5b8135818111156141f4576141f46140c2565b614224847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161413d565b9150808252368482850101111561423a57600080fd5b80848401858401376000908201840152918301919091525092915050565b600181811c9082168061426c57607f821691505b6020821081036142a5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60006020808352600084546142bf81614258565b808487015260406001808416600081146142e0576001811461431857614346565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614346565b896000528660002060005b8581101561433e5781548b8201860152908301908801614323565b8a0184019650505b509398975050505050505050565b601f821115610b7c57600081815260208120601f850160051c8101602086101561437b5750805b601f850160051c820191505b8181101561074657828155600101614387565b815167ffffffffffffffff8111156143b4576143b46140c2565b6143c8816143c28454614258565b84614354565b602080601f83116001811461441b57600084156143e55750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610746565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561446857888601518255948401946001909101908401614449565b50858210156144a457878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b828152604060208201526000613c4b60408301846138b7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361452d5761452d6144cd565b5060010190565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000614591604083018688614534565b82810360208401526145a4818587614534565b979650505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126145e457600080fd5b83018035915067ffffffffffffffff8211156145ff57600080fd5b60200191503681900382131561374e57600080fd5b60006020828403121561462657600080fd5b81516129248161392e565b67ffffffffffffffff831115614649576146496140c2565b61465d836146578354614258565b83614354565b6000601f8411600181146146af57600085156146795750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614745565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156146fe57868501358255602094850194600190920191016146de565b5086821015614739577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600081356004811061079457600080fd5b6004821061476d5761476d613deb565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff831681178255505050565b600081356002811061079457600080fd5b600282106147bf576147bf613deb565b805461ff008360081b167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff8216178255505050565b6000813561079481614016565b61480b82836145af565b67ffffffffffffffff811115614823576148236140c2565b614837816148318554614258565b85614354565b6000601f82116001811461488957600083156148535750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b17855561491f565b6000858152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0841690835b828110156148d857868501358255602094850194600190920191016148b8565b5084821015614913577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88660031b161c19848701351681555b505060018360011b0185555b5050505061493060208301836145af565b61493e818360018601614631565b5050600281016149596149536040850161474c565b8261475d565b61496e6149686060850161479e565b826147af565b610b7c61497d608085016147f4565b82547fffffffffffffffffffff0000000000000000000000000000000000000000ffff1660109190911b75ffffffffffffffffffffffffffffffffffffffff000016178255565b600063ffffffff8083168181036149dd576149dd6144cd565b6001019392505050565b81810381811115610794576107946144cd565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818336030181126140b857600080fd5b600060808236031215614a4057600080fd5b614a4861411a565b614a518361393c565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff80821115614a8257600080fd5b9085019036601f830112614a9557600080fd5b813581811115614aa757614aa76140c2565b8060051b9150614ab884830161413d565b8181529183018401918481019036841115614ad257600080fd5b938501935b83851015614af057843582529385019390850190614ad7565b606087015250939695505050505050565b6020815260006129246020830184613a3c565b63ffffffff818116838216019080821115613658576136586144cd565b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff861115614b6a57600080fd5b8560051b808860a0850137820182810360a09081016020850152614b90908201876138b7565b91505063ffffffff80851660408401528084166060840152509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", + 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\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"},{\"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\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfDON\",\"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\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"}],\"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.NodeInfo[]\",\"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\":[{\"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\":\"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\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"},{\"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\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"},{\"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\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"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\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"},{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"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\":\"uint32\",\"name\":\"f\",\"type\":\"uint32\"}],\"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.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b614db980620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635d83d967116100ee57806386fa4246116100975780639cb7c5f4116100715780639cb7c5f4146103ea578063ddbe4f821461040a578063e29581aa1461041f578063f2fde38b1461043557600080fd5b806386fa42461461039c5780638da5cb5b146103af57806395864d1f146103d757600080fd5b8063715f5295116100c8578063715f52951461036e57806373ac22b41461038157806379ba50971461039457600080fd5b80635d83d967146103335780635e65e3091461034657806366acaa331461035957600080fd5b806322bdbcbc1161015b5780632c01a1e8116101355780632c01a1e8146102cb578063398f3773146102de5780633f2a13c9146102f157806350c946fe1461031257600080fd5b806322bdbcbc146102785780632353740514610298578063275459f2146102b857600080fd5b8063193ec0061161018c578063193ec0061461023b5780631d05394c14610250578063214502431461026357600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613bd7565b610448565b6040519081526020015b60405180910390f35b6101ec6101e7366004613c3b565b61047c565b60405190151581526020016101d0565b604080518082018252601881527f4361706162696c697479526567697374727920312e302e300000000000000000602082015290516101d09190613cc2565b61024e610249366004613d41565b610489565b005b61024e61025e366004613de6565b610553565b61026b61070f565b6040516101d09190613f50565b61028b610286366004613fd0565b610874565b6040516101d09190614028565b6102ab6102a6366004613fd0565b610961565b6040516101d0919061403b565b61024e6102c6366004613de6565b6109a5565b61024e6102d9366004613de6565b610a7c565b61024e6102ec366004613de6565b610c9f565b6103046102ff36600461404e565b610e67565b6040516101d0929190614078565b610325610320366004613c3b565b611053565b6040516101d09291906140df565b61024e610341366004613de6565b6110f8565b61024e610354366004613de6565b611246565b6103616116b8565b6040516101d09190614107565b61024e61037c366004613de6565b6118a3565b61024e61038f366004613de6565b61195e565b61024e611dcf565b61024e6103aa36600461417a565b611ecc565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b61024e6103e53660046141e6565b612212565b6103fd6103f8366004613c3b565b6122de565b6040516101d09190614357565b6104126124e3565b6040516101d0919061436a565b6104276127e1565b6040516101d09291906143dd565b61024e6104433660046144c0565b612959565b6000828260405160200161045d929190614078565b6040516020818303038152906040528051906020012090505b92915050565b600061047660058361296d565b610491612988565b600e805460009164010000000090910463ffffffff169060046104b38361450a565b82546101009290920a63ffffffff8181021990931691831602179091558181166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a0810183529283526001908301528715159082015285151560608201529084166080820152909150610549908990899089908990612a0b565b5050505050505050565b61055b612988565b60005b8181101561070a57600083838381811061057a5761057a61452d565b905060200201602081019061058f9190613fd0565b63ffffffff8082166000908152600d60209081526040808320805464010000000090049094168084526001850190925282209394509192905b6105d1826130bb565b811015610629576106188563ffffffff16600c60006105f985876130c590919063ffffffff16565b81526020019081526020016000206004016130d190919063ffffffff16565b506106228161455c565b90506105c8565b508254640100000000900463ffffffff16600003610680576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff851660048201526024015b60405180910390fd5b63ffffffff84166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffff00000000000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a150505050806107039061455c565b905061055e565b505050565b600e54606090640100000000900463ffffffff166000610730600183614594565b63ffffffff1667ffffffffffffffff81111561074e5761074e613a71565b6040519080825280602002602001820160405280156107d557816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161076c5790505b509050600060015b8363ffffffff168163ffffffff1610156108515763ffffffff8082166000908152600d6020526040902054161561084157610817816130dd565b8383815181106108295761082961452d565b60200260200101819052508161083e9061455c565b91505b61084a8161450a565b90506107dd565b5061085d600184614594565b63ffffffff16811461086d578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916108d8906145b1565b80601f0160208091040260200160405190810160405280929190818152602001828054610904906145b1565b80156109515780601f1061092657610100808354040283529160200191610951565b820191906000526020600020905b81548152906001019060200180831161093457829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c0810191909152610476826130dd565b6109ad612988565b60005b63ffffffff811682111561070a57600083838363ffffffff168181106109d8576109d861452d565b90506020020160208101906109ed9190613fd0565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155919250610a386001830182613a04565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a758161450a565b90506109b0565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610c99576000848483818110610ab657610ab661452d565b602090810292909201356000818152600c90935260409092206001810154929350919050610b13576040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260048101839052602401610677565b6000610b21826004016130bb565b1115610b5c576040517f34a4a3f600000000000000000000000000000000000000000000000000000000815260048101839052602401610677565b83158015610b965750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bcf576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610677565b6001810154610be0906007906130d1565b506002810154610bf2906009906130d1565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016815560018101829055600281018290559060048201818181610c478282613a3e565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c7e91815260200190565b60405180910390a1505080610c929061455c565b9050610a9a565b50505050565b610ca7612988565b60005b8181101561070a576000838383818110610cc657610cc661452d565b9050602002810190610cd89190614604565b610ce190614642565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d32576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610dbe90826146fa565b5050600e8054909150600090610dd99063ffffffff1661450a565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e4c9190613cc2565b60405180910390a3505080610e609061455c565b9050610caa565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610eb9906145b1565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee5906145b1565b8015610f325780601f10610f0757610100808354040283529160200191610f32565b820191906000526020600020905b815481529060010190602001808311610f1557829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611045905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa158015610ffc573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526110429190810190614814565b90505b9093509150505b9250929050565b6040805160808101825260008082526020820181905291810191909152606080820152604080516080810182526000848152600c6020908152838220805463ffffffff8082168652600183015484870152600283015486880152640100000000909104168352600301905291822060608201906110cf906133b9565b90526000938452600c602052604090932054929364010000000090930463ffffffff1692915050565b611100612988565b60005b8181101561070a57600083838381811061111f5761111f61452d565b90506020020135905061113c81600361296d90919063ffffffff16565b611175576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610677565b6111806005826133c6565b6111b9576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610677565b6000818152600260205260408120906111d28282613a04565b6111e0600183016000613a04565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a25061123f8161455c565b9050611103565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610c995760008484838181106112805761128061452d565b90506020028101906112929190614882565b61129b906148b6565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001810180549596509394919390928401916112f1906145b1565b80601f016020809104026020016040519081016040528092919081815260200182805461131d906145b1565b801561136a5780601f1061133f5761010080835404028352916020019161136a565b820191906000526020600020905b81548152906001019060200180831161134d57829003601f168201915b50505050508152505090508315801561139a5750805173ffffffffffffffffffffffffffffffffffffffff163314155b156113d3576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610677565b6040808301516000908152600c6020522060018101546114275782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161067791815260200190565b6020830151158061145757508260200151816001015414158015611457575060208301516114579060079061296d565b1561148e576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606083015180516000036114d057806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106779190614989565b8154640100000000900463ffffffff168260046114ec8361450a565b82546101009290920a63ffffffff8181021990931691831602179091558354640100000000900416905060005b82518110156115e45761154f8382815181106115375761153761452d565b6020026020010151600361296d90919063ffffffff16565b61158757826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106779190614989565b6115d383828151811061159c5761159c61452d565b60200260200101518560030160008563ffffffff1663ffffffff1681526020019081526020016000206133c690919063ffffffff16565b506115dd8161455c565b9050611519565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff909116178355604085015160028401556001830154602086015181146116565761163b6007826130d1565b50602086015160018501819055611654906007906133c6565b505b85516040808801516020808a015183519283529082015263ffffffff909216917f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a2505050505050806116b19061455c565b9050611264565b600e5460609063ffffffff1660006116d1600183614594565b63ffffffff1667ffffffffffffffff8111156116ef576116ef613a71565b60405190808252806020026020018201604052801561173557816020015b60408051808201909152600081526060602082015281526020019060019003908161170d5790505b509050600060015b8363ffffffff168163ffffffff16101561188d5763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff161561187d5763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916117d1906145b1565b80601f01602080910402602001604051908101604052809291908181526020018280546117fd906145b1565b801561184a5780601f1061181f5761010080835404028352916020019161184a565b820191906000526020600020905b81548152906001019060200180831161182d57829003601f168201915b5050505050815250508383815181106118655761186561452d565b60200260200101819052508161187a9061455c565b91505b6118868161450a565b905061173d565b50600e5461085d9060019063ffffffff16614594565b6118ab612988565b60005b8181101561070a5760008383838181106118ca576118ca61452d565b90506020028101906118dc919061499c565b6118e5906149df565b905060006118fb82600001518360200151610448565b90506119086003826133c6565b611941576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610677565b61194b81836133d2565b5050806119579061455c565b90506118ae565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610c995760008484838181106119985761199861452d565b90506020028101906119aa9190614882565b6119b3906148b6565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611a09906145b1565b80601f0160208091040260200160405190810160405280929190818152602001828054611a35906145b1565b8015611a825780601f10611a5757610100808354040283529160200191611a82565b820191906000526020600020905b815481529060010190602001808311611a6557829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611ae85781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610677565b83158015611b0d5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611b46576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610677565b6040808301516000908152600c602052206001810154151580611b6b57506040830151155b15611baa5782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161067791815260200190565b60208301511580611bc757506020830151611bc79060079061296d565b15611bfe576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611c4057806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106779190614989565b81548290600490611c5e90640100000000900463ffffffff1661450a565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611d0557611ca78382815181106115375761153761452d565b611cdf57826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106779190614989565b611cf483828151811061159c5761159c61452d565b50611cfe8161455c565b9050611c89565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611d5b91600791906133c616565b506040850151611d6d906009906133c6565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611dc89061455c565b905061197c565b60015473ffffffffffffffffffffffffffffffffffffffff163314611e50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610677565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611f0f576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610677565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b8481101561220a576000868683818110611f4757611f4761452d565b9050602002016020810190611f5c9190613fd0565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16611fcb576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610677565b6000868685818110611fdf57611fdf61452d565b9050602002810190611ff19190614604565b611ffa90614642565b805190915073ffffffffffffffffffffffffffffffffffffffff1661204b576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061208857503373ffffffffffffffffffffffffffffffffffffffff861614155b156120c1576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610677565b8051825473ffffffffffffffffffffffffffffffffffffffff908116911614158061213d57506020808201516040516120fa9201613cc2565b60405160208183030381529060405280519060200120826001016040516020016121249190614a85565b6040516020818303038152906040528051906020012014155b156121f657805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020810151600183019061219790826146fa565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516121ed9190613cc2565b60405180910390a35b505050806122039061455c565b9050611f2b565b505050505050565b61221a612988565b63ffffffff8089166000908152600d602052604081205464010000000090049091169081900361227e576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610677565b6122d3888888886040518060a001604052808f63ffffffff168152602001876122a69061450a565b97508763ffffffff1681526020018a1515815260200189151581526020018863ffffffff16815250612a0b565b505050505050505050565b61230e6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a08101909252805482908290612336906145b1565b80601f0160208091040260200160405190810160405280929190818152602001828054612362906145b1565b80156123af5780601f10612384576101008083540402835291602001916123af565b820191906000526020600020905b81548152906001019060200180831161239257829003601f168201915b505050505081526020016001820180546123c8906145b1565b80601f01602080910402602001604051908101604052809291908181526020018280546123f4906145b1565b80156124415780601f1061241657610100808354040283529160200191612441565b820191906000526020600020905b81548152906001019060200180831161242457829003601f168201915b5050509183525050600282015460209091019060ff1660038111156124685761246861429b565b60038111156124795761247961429b565b81526020016002820160019054906101000a900460ff1660018111156124a1576124a161429b565b60018111156124b2576124b261429b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b606060006124f160036133b9565b905060006124ff60056130bb565b825161250b9190614b2e565b67ffffffffffffffff81111561252357612523613a71565b60405190808252806020026020018201604052801561258457816020015b6125716040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816125415790505b5090506000805b83518110156127d85760008482815181106125a8576125a861452d565b602002602001015190506125c681600561296d90919063ffffffff16565b6127c75760008181526002602052604090819020815160a081019092528054829082906125f2906145b1565b80601f016020809104026020016040519081016040528092919081815260200182805461261e906145b1565b801561266b5780601f106126405761010080835404028352916020019161266b565b820191906000526020600020905b81548152906001019060200180831161264e57829003601f168201915b50505050508152602001600182018054612684906145b1565b80601f01602080910402602001604051908101604052809291908181526020018280546126b0906145b1565b80156126fd5780601f106126d2576101008083540402835291602001916126fd565b820191906000526020600020905b8154815290600101906020018083116126e057829003601f168201915b5050509183525050600282015460209091019060ff1660038111156127245761272461429b565b60038111156127355761273561429b565b81526020016002820160019054906101000a900460ff16600181111561275d5761275d61429b565b600181111561276e5761276e61429b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015284518590859081106127ad576127ad61452d565b602002602001018190525082806127c39061455c565b9350505b506127d18161455c565b905061258b565b50909392505050565b60608060006127f060096133b9565b90506000815167ffffffffffffffff81111561280e5761280e613a71565b60405190808252806020026020018201604052801561287d57816020015b60408051608081018252600080825260208083018290529282015260608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161282c5790505b5090506000825167ffffffffffffffff81111561289c5761289c613a71565b6040519080825280602002602001820160405280156128c5578160200160208202803683370190505b50905060005b835181101561294e576128f68482815181106128e9576128e961452d565b6020026020010151611053565b8483815181106129085761290861452d565b602002602001018484815181106129215761292161452d565b602002602001018263ffffffff1663ffffffff168152508290525050806129479061455c565b90506128cb565b509094909350915050565b612961612988565b61296a81613666565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612a09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610677565b565b805163ffffffff9081166000908152600d602090815260408083208286015185168452600101909152902060808301519091161580612a5f575060808201518590612a57906001614b41565b63ffffffff16115b15612aab5760808201516040517fd5f5269100000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101869052604401610677565b6001826020015163ffffffff161115612b5757815163ffffffff166000908152600d602090815260408220908401516001918201918391612aec9190614594565b63ffffffff1663ffffffff168152602001908152602001600020905060005b612b14826130bb565b811015612b5457612b43846000015163ffffffff16600c60006105f985876000016130c590919063ffffffff16565b50612b4d8161455c565b9050612b0b565b50505b60005b85811015612c4157612b87878783818110612b7757612b7761452d565b85926020909102013590506133c6565b612be8578251878783818110612b9f57612b9f61452d565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610677565b8251612c309063ffffffff16600c60008a8a86818110612c0a57612c0a61452d565b9050602002013581526020019081526020016000206004016133c690919063ffffffff16565b50612c3a8161455c565b9050612b5a565b5060005b83811015612f2d5736858583818110612c6057612c6061452d565b9050602002810190612c729190614604565b9050612c806003823561296d565b612cb9576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610677565b612cc56005823561296d565b15612cff576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610677565b8035600090815260038401602052604081208054612d1c906145b1565b90501115612d685783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610677565b60005b87811015612e7a57612e0f8235600c60008c8c86818110612d8e57612d8e61452d565b9050602002013581526020019081526020016000206003016000600c60008e8e88818110612dbe57612dbe61452d565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002061296d90919063ffffffff16565b612e6a57888882818110612e2557612e2561452d565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610677565b612e738161455c565b9050612d6b565b5060028301805460018101825560009182526020918290208335910155612ea390820182614b5e565b82356000908152600386016020526040902091612ec1919083614bc3565b508351602080860151612f1c92918435908c908c90612ee290880188614b5e565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061375b92505050565b50612f268161455c565b9050612c45565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156c01000000000000000000000000027fffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffff90951694909417909355606086015186518316825284822080549115156d0100000000000000000000000000027fffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffff9092169190911790556080860151865183168252848220805491841668010000000000000000027fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651926130ab929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b6000610476825490565b6000612981838361383c565b60006129818383613866565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d825284832080546401000000009004909116808452600190910182528483206002810180548751818602810186019098528088529596929591949390919083018282801561318e57602002820191906000526020600020905b81548152602001906001019080831161317a575b505050505090506000815167ffffffffffffffff8111156131b1576131b1613a71565b6040519080825280602002602001820160405280156131f757816020015b6040805180820190915260008152606060208201528152602001906001900390816131cf5790505b50905060005b81518110156133185760405180604001604052808483815181106132235761322361452d565b602002602001015181526020018560030160008685815181106132485761324861452d565b602002602001015181526020019081526020016000208054613269906145b1565b80601f0160208091040260200160405190810160405280929190818152602001828054613295906145b1565b80156132e25780601f106132b7576101008083540402835291602001916132e2565b820191906000526020600020905b8154815290600101906020018083116132c557829003601f168201915b50505050508152508282815181106132fc576132fc61452d565b6020026020010181905250806133119061455c565b90506131fd565b506040805160e08101825263ffffffff8089166000818152600d60208181528683205480861687528b8616828801526801000000000000000081049095169686019690965260ff6c010000000000000000000000008504811615156060870152929091529093526d010000000000000000000000000090049091161515608082015260a081016133a7856133b9565b81526020019190915295945050505050565b6060600061298183613959565b600061298183836139b5565b608081015173ffffffffffffffffffffffffffffffffffffffff161561352057608081015173ffffffffffffffffffffffffffffffffffffffff163b15806134cb575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa1580156134a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134c99190614cde565b155b156135205760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610677565b60008281526002602052604090208151829190819061353f90826146fa565b506020820151600182019061355490826146fa565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360038111156135965761359661429b565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360018111156135dd576135dd61429b565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b3373ffffffffffffffffffffffffffffffffffffffff8216036136e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610677565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff161561220a57600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613802908690869086908b908d90600401614cfb565b600060405180830381600087803b15801561381c57600080fd5b505af1158015613830573d6000803e3d6000fd5b50505050505050505050565b60008260000182815481106138535761385361452d565b9060005260206000200154905092915050565b6000818152600183016020526040812054801561394f57600061388a600183614b2e565b855490915060009061389e90600190614b2e565b90508181146139035760008660000182815481106138be576138be61452d565b90600052602060002001549050808760000184815481106138e1576138e161452d565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061391457613914614d7d565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610476565b6000915050610476565b6060816000018054806020026020016040519081016040528092919081815260200182805480156139a957602002820191906000526020600020905b815481526020019060010190808311613995575b50505050509050919050565b60008181526001830160205260408120546139fc57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610476565b506000610476565b508054613a10906145b1565b6000825580601f10613a20575050565b601f01602090049060005260206000209081019061296a9190613a58565b508054600082559060005260206000209081019061296a91905b5b80821115613a6d5760008155600101613a59565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613ac357613ac3613a71565b60405290565b60405160a0810167ffffffffffffffff81118282101715613ac357613ac3613a71565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613b3357613b33613a71565b604052919050565b600067ffffffffffffffff821115613b5557613b55613a71565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613b9257600080fd5b8135613ba5613ba082613b3b565b613aec565b818152846020838601011115613bba57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613bea57600080fd5b823567ffffffffffffffff80821115613c0257600080fd5b613c0e86838701613b81565b93506020850135915080821115613c2457600080fd5b50613c3185828601613b81565b9150509250929050565b600060208284031215613c4d57600080fd5b5035919050565b60005b83811015613c6f578181015183820152602001613c57565b50506000910152565b60008151808452613c90816020860160208601613c54565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006129816020830184613c78565b60008083601f840112613ce757600080fd5b50813567ffffffffffffffff811115613cff57600080fd5b6020830191508360208260051b850101111561104c57600080fd5b801515811461296a57600080fd5b803563ffffffff81168114613d3c57600080fd5b919050565b600080600080600080600060a0888a031215613d5c57600080fd5b873567ffffffffffffffff80821115613d7457600080fd5b613d808b838c01613cd5565b909950975060208a0135915080821115613d9957600080fd5b50613da68a828b01613cd5565b9096509450506040880135613dba81613d1a565b92506060880135613dca81613d1a565b9150613dd860808901613d28565b905092959891949750929550565b60008060208385031215613df957600080fd5b823567ffffffffffffffff811115613e1057600080fd5b613e1c85828601613cd5565b90969095509350505050565b600081518084526020808501945080840160005b83811015613e5857815187529582019590820190600101613e3c565b509495945050505050565b600063ffffffff80835116845260208181850151168186015260408281860151168187015260608501511515606087015260808501511515608087015260a0850151925060e060a0870152613ebb60e0870184613e28565b925060c085015186840360c08801528381518086528486019150848160051b870101858401935060005b82811015613f42578782037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018452845180518352870151878301879052613f2f87840182613c78565b9588019594880194925050600101613ee5565b509998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613fc3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613fb1858351613e63565b94509285019290850190600101613f77565b5092979650505050505050565b600060208284031215613fe257600080fd5b61298182613d28565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526140206040850182613c78565b949350505050565b6020815260006129816020830184613feb565b6020815260006129816020830184613e63565b6000806040838503121561406157600080fd5b61406a83613d28565b946020939093013593505050565b60408152600061408b6040830185613c78565b828103602084015261409d8185613c78565b95945050505050565b63ffffffff8151168252602081015160208301526040810151604083015260006060820151608060608501526140206080850182613e28565b6040815260006140f260408301856140a6565b905063ffffffff831660208301529392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613fc3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452614168858351613feb565b9450928501929085019060010161412e565b6000806000806040858703121561419057600080fd5b843567ffffffffffffffff808211156141a857600080fd5b6141b488838901613cd5565b909650945060208701359150808211156141cd57600080fd5b506141da87828801613cd5565b95989497509550505050565b60008060008060008060008060c0898b03121561420257600080fd5b61420b89613d28565b9750602089013567ffffffffffffffff8082111561422857600080fd5b6142348c838d01613cd5565b909950975060408b013591508082111561424d57600080fd5b5061425a8b828c01613cd5565b909650945050606089013561426e81613d1a565b9250608089013561427e81613d1a565b915061428c60a08a01613d28565b90509295985092959890939650565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a084526142df60a0850182613c78565b9050602083015184820360208601526142f88282613c78565b9150506040830151600481106143105761431061429b565b604085015260608301516002811061432a5761432a61429b565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b60208152600061298160208301846142ca565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613fc3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526143cb8583516142ca565b94509285019290850190600101614391565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b83811015614452577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08887030185526144408683516140a6565b95509382019390820190600101614406565b50508584038187015286518085528782019482019350915060005b8281101561448f57845163ffffffff168452938101939281019260010161446d565b5091979650505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114613d3c57600080fd5b6000602082840312156144d257600080fd5b6129818261449c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff808316818103614523576145236144db565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361458d5761458d6144db565b5060010190565b63ffffffff82811682821603908082111561086d5761086d6144db565b600181811c908216806145c557607f821691505b6020821081036145fe577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261463857600080fd5b9190910192915050565b60006040823603121561465457600080fd5b6040516040810167ffffffffffffffff828210818311171561467857614678613a71565b816040526146858561449c565b8352602085013591508082111561469b57600080fd5b506146a836828601613b81565b60208301525092915050565b601f82111561070a57600081815260208120601f850160051c810160208610156146db5750805b601f850160051c820191505b8181101561220a578281556001016146e7565b815167ffffffffffffffff81111561471457614714613a71565b6147288161472284546145b1565b846146b4565b602080601f83116001811461477b57600084156147455750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561220a565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156147c8578886015182559484019460019091019084016147a9565b508582101561480457878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561482657600080fd5b815167ffffffffffffffff81111561483d57600080fd5b8201601f8101841361484e57600080fd5b805161485c613ba082613b3b565b81815285602083850101111561487157600080fd5b61409d826020830160208601613c54565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261463857600080fd5b6000608082360312156148c857600080fd5b6148d0613aa0565b6148d983613d28565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff8082111561490a57600080fd5b9085019036601f83011261491d57600080fd5b81358181111561492f5761492f613a71565b8060051b9150614940848301613aec565b818152918301840191848101903684111561495a57600080fd5b938501935b838510156149785784358252938501939085019061495f565b606087015250939695505050505050565b6020815260006129816020830184613e28565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261463857600080fd5b803560028110613d3c57600080fd5b600060a082360312156149f157600080fd5b6149f9613ac9565b823567ffffffffffffffff80821115614a1157600080fd5b614a1d36838701613b81565b83526020850135915080821115614a3357600080fd5b50614a4036828601613b81565b602083015250604083013560048110614a5857600080fd5b6040820152614a69606084016149d0565b6060820152614a7a6080840161449c565b608082015292915050565b6000602080835260008454614a99816145b1565b80848701526040600180841660008114614aba5760018114614af257614b20565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614b20565b896000528660002060005b85811015614b185781548b8201860152908301908801614afd565b8a0184019650505b509398975050505050505050565b81810381811115610476576104766144db565b63ffffffff81811683821601908082111561086d5761086d6144db565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b9357600080fd5b83018035915067ffffffffffffffff821115614bae57600080fd5b60200191503681900382131561104c57600080fd5b67ffffffffffffffff831115614bdb57614bdb613a71565b614bef83614be983546145b1565b836146b4565b6000601f841160018114614c415760008515614c0b5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614cd7565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614c905786850135825560209485019460019092019101614c70565b5086821015614ccb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600060208284031215614cf057600080fd5b815161298181613d1a565b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff861115614d3457600080fd5b8560051b808860a0850137820182810360a09081016020850152614d5a90820187613c78565b91505063ffffffff80851660408401528084166060840152509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", } var CapabilityRegistryABI = CapabilityRegistryMetaData.ABI @@ -250,48 +250,49 @@ func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetCapability(hashed return _CapabilityRegistry.Contract.GetCapability(&_CapabilityRegistry.CallOpts, hashedId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetDON(opts *bind.CallOpts, donId uint32) (CapabilityRegistryDONInfo, error) { +func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getDON", donId) + err := _CapabilityRegistry.contract.Call(opts, &out, "getCapabilityConfigs", donId, capabilityId) if err != nil { - return *new(CapabilityRegistryDONInfo), err + return *new([]byte), *new([]byte), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryDONInfo)).(*CapabilityRegistryDONInfo) + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out1 := *abi.ConvertType(out[1], new([]byte)).(*[]byte) - return out0, err + return out0, out1, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetDON(donId uint32) (CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDON(&_CapabilityRegistry.CallOpts, donId) +func (_CapabilityRegistry *CapabilityRegistrySession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { + return _CapabilityRegistry.Contract.GetCapabilityConfigs(&_CapabilityRegistry.CallOpts, donId, capabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetDON(donId uint32) (CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDON(&_CapabilityRegistry.CallOpts, donId) +func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { + return _CapabilityRegistry.Contract.GetCapabilityConfigs(&_CapabilityRegistry.CallOpts, donId, capabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetDONCapabilityConfig(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, error) { +func (_CapabilityRegistry *CapabilityRegistryCaller) GetDON(opts *bind.CallOpts, donId uint32) (CapabilityRegistryDONInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getDONCapabilityConfig", donId, capabilityId) + err := _CapabilityRegistry.contract.Call(opts, &out, "getDON", donId) if err != nil { - return *new([]byte), err + return *new(CapabilityRegistryDONInfo), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new(CapabilityRegistryDONInfo)).(*CapabilityRegistryDONInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetDONCapabilityConfig(donId uint32, capabilityId [32]byte) ([]byte, error) { - return _CapabilityRegistry.Contract.GetDONCapabilityConfig(&_CapabilityRegistry.CallOpts, donId, capabilityId) +func (_CapabilityRegistry *CapabilityRegistrySession) GetDON(donId uint32) (CapabilityRegistryDONInfo, error) { + return _CapabilityRegistry.Contract.GetDON(&_CapabilityRegistry.CallOpts, donId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetDONCapabilityConfig(donId uint32, capabilityId [32]byte) ([]byte, error) { - return _CapabilityRegistry.Contract.GetDONCapabilityConfig(&_CapabilityRegistry.CallOpts, donId, capabilityId) +func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetDON(donId uint32) (CapabilityRegistryDONInfo, error) { + return _CapabilityRegistry.Contract.GetDON(&_CapabilityRegistry.CallOpts, donId) } func (_CapabilityRegistry *CapabilityRegistryCaller) GetDONs(opts *bind.CallOpts) ([]CapabilityRegistryDONInfo, error) { @@ -361,7 +362,7 @@ func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNode(p2pId [32]by return _CapabilityRegistry.Contract.GetNode(&_CapabilityRegistry.CallOpts, p2pId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodeOperator(opts *bind.CallOpts, nodeOperatorId *big.Int) (CapabilityRegistryNodeOperator, error) { +func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { var out []interface{} err := _CapabilityRegistry.contract.Call(opts, &out, "getNodeOperator", nodeOperatorId) @@ -375,11 +376,11 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodeOperator(opts *bind. } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNodeOperator(nodeOperatorId *big.Int) (CapabilityRegistryNodeOperator, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) GetNodeOperator(nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { return _CapabilityRegistry.Contract.GetNodeOperator(&_CapabilityRegistry.CallOpts, nodeOperatorId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodeOperator(nodeOperatorId *big.Int) (CapabilityRegistryNodeOperator, error) { +func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodeOperator(nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { return _CapabilityRegistry.Contract.GetNodeOperator(&_CapabilityRegistry.CallOpts, nodeOperatorId) } @@ -506,16 +507,16 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AcceptOwnership( return _CapabilityRegistry.Contract.AcceptOwnership(&_CapabilityRegistry.TransactOpts) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddCapability(opts *bind.TransactOpts, capability CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addCapability", capability) +func (_CapabilityRegistry *CapabilityRegistryTransactor) AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { + return _CapabilityRegistry.contract.Transact(opts, "addCapabilities", capabilities) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddCapability(capability CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddCapability(&_CapabilityRegistry.TransactOpts, capability) +func (_CapabilityRegistry *CapabilityRegistrySession) AddCapabilities(capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { + return _CapabilityRegistry.Contract.AddCapabilities(&_CapabilityRegistry.TransactOpts, capabilities) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddCapability(capability CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddCapability(&_CapabilityRegistry.TransactOpts, capability) +func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddCapabilities(capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { + return _CapabilityRegistry.Contract.AddCapabilities(&_CapabilityRegistry.TransactOpts, capabilities) } func (_CapabilityRegistry *CapabilityRegistryTransactor) AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) { @@ -554,16 +555,16 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddNodes(nodes [ return _CapabilityRegistry.Contract.AddNodes(&_CapabilityRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) DeprecateCapability(opts *bind.TransactOpts, hashedCapabilityId [32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "deprecateCapability", hashedCapabilityId) +func (_CapabilityRegistry *CapabilityRegistryTransactor) DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilityRegistry.contract.Transact(opts, "deprecateCapabilities", hashedCapabilityIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) DeprecateCapability(hashedCapabilityId [32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.DeprecateCapability(&_CapabilityRegistry.TransactOpts, hashedCapabilityId) +func (_CapabilityRegistry *CapabilityRegistrySession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilityRegistry.Contract.DeprecateCapabilities(&_CapabilityRegistry.TransactOpts, hashedCapabilityIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) DeprecateCapability(hashedCapabilityId [32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.DeprecateCapability(&_CapabilityRegistry.TransactOpts, hashedCapabilityId) +func (_CapabilityRegistry *CapabilityRegistryTransactorSession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilityRegistry.Contract.DeprecateCapabilities(&_CapabilityRegistry.TransactOpts, hashedCapabilityIds) } func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveDONs(opts *bind.TransactOpts, donIds []uint32) (*types.Transaction, error) { @@ -578,15 +579,15 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveDONs(donId return _CapabilityRegistry.Contract.RemoveDONs(&_CapabilityRegistry.TransactOpts, donIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []*big.Int) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32) (*types.Transaction, error) { return _CapabilityRegistry.contract.Transact(opts, "removeNodeOperators", nodeOperatorIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) RemoveNodeOperators(nodeOperatorIds []*big.Int) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { return _CapabilityRegistry.Contract.RemoveNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveNodeOperators(nodeOperatorIds []*big.Int) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { return _CapabilityRegistry.Contract.RemoveNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds) } @@ -626,15 +627,15 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateDON(donId return _CapabilityRegistry.Contract.UpdateDON(&_CapabilityRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []*big.Int, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { return _CapabilityRegistry.contract.Transact(opts, "updateNodeOperators", nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateNodeOperators(nodeOperatorIds []*big.Int, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { return _CapabilityRegistry.Contract.UpdateNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodeOperators(nodeOperatorIds []*big.Int, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { return _CapabilityRegistry.Contract.UpdateNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds, nodeOperators) } @@ -650,8 +651,8 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodes(node return _CapabilityRegistry.Contract.UpdateNodes(&_CapabilityRegistry.TransactOpts, nodes) } -type CapabilityRegistryCapabilityAddedIterator struct { - Event *CapabilityRegistryCapabilityAdded +type CapabilityRegistryCapabilityConfiguredIterator struct { + Event *CapabilityRegistryCapabilityConfigured contract *bind.BoundContract event string @@ -662,7 +663,7 @@ type CapabilityRegistryCapabilityAddedIterator struct { fail error } -func (it *CapabilityRegistryCapabilityAddedIterator) Next() bool { +func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { if it.fail != nil { return false @@ -671,7 +672,7 @@ func (it *CapabilityRegistryCapabilityAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityAdded) + it.Event = new(CapabilityRegistryCapabilityConfigured) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -686,7 +687,7 @@ func (it *CapabilityRegistryCapabilityAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityAdded) + it.Event = new(CapabilityRegistryCapabilityConfigured) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -701,42 +702,42 @@ func (it *CapabilityRegistryCapabilityAddedIterator) Next() bool { } } -func (it *CapabilityRegistryCapabilityAddedIterator) Error() error { +func (it *CapabilityRegistryCapabilityConfiguredIterator) Error() error { return it.fail } -func (it *CapabilityRegistryCapabilityAddedIterator) Close() error { +func (it *CapabilityRegistryCapabilityConfiguredIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryCapabilityAdded struct { +type CapabilityRegistryCapabilityConfigured struct { HashedCapabilityId [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterCapabilityAdded(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityAddedIterator, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityConfiguredIterator, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "CapabilityAdded", hashedCapabilityIdRule) + logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) if err != nil { return nil, err } - return &CapabilityRegistryCapabilityAddedIterator{contract: _CapabilityRegistry.contract, event: "CapabilityAdded", logs: logs, sub: sub}, nil + return &CapabilityRegistryCapabilityConfiguredIterator{contract: _CapabilityRegistry.contract, event: "CapabilityConfigured", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityAdded, hashedCapabilityId [][32]byte) (event.Subscription, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "CapabilityAdded", hashedCapabilityIdRule) + logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) if err != nil { return nil, err } @@ -746,8 +747,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityAdded(opts select { case log := <-logs: - event := new(CapabilityRegistryCapabilityAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityAdded", log); err != nil { + event := new(CapabilityRegistryCapabilityConfigured) + if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { return err } event.Raw = log @@ -768,9 +769,9 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityAdded(opts }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseCapabilityAdded(log types.Log) (*CapabilityRegistryCapabilityAdded, error) { - event := new(CapabilityRegistryCapabilityAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityAdded", log); err != nil { +func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseCapabilityConfigured(log types.Log) (*CapabilityRegistryCapabilityConfigured, error) { + event := new(CapabilityRegistryCapabilityConfigured) + if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { return nil, err } event.Raw = log @@ -1084,23 +1085,33 @@ func (it *CapabilityRegistryNodeAddedIterator) Close() error { type CapabilityRegistryNodeAdded struct { P2pId [32]byte - NodeOperatorId *big.Int + NodeOperatorId uint32 Signer [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeAdded(opts *bind.FilterOpts) (*CapabilityRegistryNodeAddedIterator, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeAddedIterator, error) { + + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeAdded") + logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeAdded", nodeOperatorIdRule) if err != nil { return nil, err } return &CapabilityRegistryNodeAddedIterator{contract: _CapabilityRegistry.contract, event: "NodeAdded", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeAdded) (event.Subscription, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) { + + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeAdded") + logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeAdded", nodeOperatorIdRule) if err != nil { return nil, err } @@ -1202,34 +1213,42 @@ func (it *CapabilityRegistryNodeOperatorAddedIterator) Close() error { } type CapabilityRegistryNodeOperatorAdded struct { - NodeOperatorId *big.Int + NodeOperatorId uint32 Admin common.Address Name string Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorAdded(opts *bind.FilterOpts, admin []common.Address) (*CapabilityRegistryNodeOperatorAddedIterator, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorAddedIterator, error) { + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } var adminRule []interface{} for _, adminItem := range admin { adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorAdded", adminRule) + logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } return &CapabilityRegistryNodeOperatorAddedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorAdded", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorAdded, admin []common.Address) (event.Subscription, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } var adminRule []interface{} for _, adminItem := range admin { adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorAdded", adminRule) + logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } @@ -1331,22 +1350,32 @@ func (it *CapabilityRegistryNodeOperatorRemovedIterator) Close() error { } type CapabilityRegistryNodeOperatorRemoved struct { - NodeOperatorId *big.Int + NodeOperatorId uint32 Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorRemoved(opts *bind.FilterOpts) (*CapabilityRegistryNodeOperatorRemovedIterator, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeOperatorRemovedIterator, error) { - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorRemoved") + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } + + logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) if err != nil { return nil, err } return &CapabilityRegistryNodeOperatorRemovedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorRemoved", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorRemoved) (event.Subscription, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) { - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorRemoved") + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } + + logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) if err != nil { return nil, err } @@ -1448,34 +1477,42 @@ func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Close() error { } type CapabilityRegistryNodeOperatorUpdated struct { - NodeOperatorId *big.Int + NodeOperatorId uint32 Admin common.Address Name string Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorUpdated(opts *bind.FilterOpts, admin []common.Address) (*CapabilityRegistryNodeOperatorUpdatedIterator, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorUpdatedIterator, error) { + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } var adminRule []interface{} for _, adminItem := range admin { adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorUpdated", adminRule) + logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } return &CapabilityRegistryNodeOperatorUpdatedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorUpdated", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorUpdated, admin []common.Address) (event.Subscription, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } var adminRule []interface{} for _, adminItem := range admin { adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorUpdated", adminRule) + logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } @@ -1695,23 +1732,33 @@ func (it *CapabilityRegistryNodeUpdatedIterator) Close() error { type CapabilityRegistryNodeUpdated struct { P2pId [32]byte - NodeOperatorId *big.Int + NodeOperatorId uint32 Signer [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeUpdated(opts *bind.FilterOpts) (*CapabilityRegistryNodeUpdatedIterator, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeUpdatedIterator, error) { + + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeUpdated") + logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeUpdated", nodeOperatorIdRule) if err != nil { return nil, err } return &CapabilityRegistryNodeUpdatedIterator{contract: _CapabilityRegistry.contract, event: "NodeUpdated", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeUpdated) (event.Subscription, error) { +func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) { - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeUpdated") + var nodeOperatorIdRule []interface{} + for _, nodeOperatorIdItem := range nodeOperatorId { + nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) + } + + logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeUpdated", nodeOperatorIdRule) if err != nil { return nil, err } @@ -2026,8 +2073,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseOwnershipTransferred func (_CapabilityRegistry *CapabilityRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { - case _CapabilityRegistry.abi.Events["CapabilityAdded"].ID: - return _CapabilityRegistry.ParseCapabilityAdded(log) + 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: @@ -2054,8 +2101,8 @@ func (_CapabilityRegistry *CapabilityRegistry) ParseLog(log types.Log) (generate } } -func (CapabilityRegistryCapabilityAdded) Topic() common.Hash { - return common.HexToHash("0x65610e5677eedff94555572640e442f89848a109ef8593fa927ac30b2565ff06") +func (CapabilityRegistryCapabilityConfigured) Topic() common.Hash { + return common.HexToHash("0x04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae") } func (CapabilityRegistryCapabilityDeprecated) Topic() common.Hash { @@ -2067,19 +2114,19 @@ func (CapabilityRegistryConfigSet) Topic() common.Hash { } func (CapabilityRegistryNodeAdded) Topic() common.Hash { - return common.HexToHash("0xc9296aa9b0951d8000e8ed7f2b5be30c5106de8df3dbedf9a57c93f5f9e4d7da") + return common.HexToHash("0x74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05") } func (CapabilityRegistryNodeOperatorAdded) Topic() common.Hash { - return common.HexToHash("0xda6697b182650034bd205cdc2dbfabb06bdb3a0a83a2b45bfefa3c4881284e0b") + return common.HexToHash("0x78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e") } func (CapabilityRegistryNodeOperatorRemoved) Topic() common.Hash { - return common.HexToHash("0x1e5877d7b3001d1569bf733b76c7eceda58bd6c031e5b8d0b7042308ba2e9d4f") + return common.HexToHash("0xa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a") } func (CapabilityRegistryNodeOperatorUpdated) Topic() common.Hash { - return common.HexToHash("0x14c8f513e8a6d86d2d16b0cb64976de4e72386c4f8068eca3b7354373f8fe97a") + return common.HexToHash("0x86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a28") } func (CapabilityRegistryNodeRemoved) Topic() common.Hash { @@ -2087,7 +2134,7 @@ func (CapabilityRegistryNodeRemoved) Topic() common.Hash { } func (CapabilityRegistryNodeUpdated) Topic() common.Hash { - return common.HexToHash("0xf101cfc54994c31624d25789378d71ec4dbdc533e26a4ecc6b7648f4798d0916") + return common.HexToHash("0x4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b") } func (CapabilityRegistryOwnershipTransferRequested) Topic() common.Hash { @@ -2107,9 +2154,9 @@ type CapabilityRegistryInterface interface { GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilityRegistryCapability, error) - GetDON(opts *bind.CallOpts, donId uint32) (CapabilityRegistryDONInfo, error) + GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) - GetDONCapabilityConfig(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, error) + GetDON(opts *bind.CallOpts, donId uint32) (CapabilityRegistryDONInfo, error) GetDONs(opts *bind.CallOpts) ([]CapabilityRegistryDONInfo, error) @@ -2117,7 +2164,7 @@ type CapabilityRegistryInterface interface { GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, uint32, error) - GetNodeOperator(opts *bind.CallOpts, nodeOperatorId *big.Int) (CapabilityRegistryNodeOperator, error) + GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) GetNodeOperators(opts *bind.CallOpts) ([]CapabilityRegistryNodeOperator, error) @@ -2131,7 +2178,7 @@ type CapabilityRegistryInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - AddCapability(opts *bind.TransactOpts, capability CapabilityRegistryCapability) (*types.Transaction, error) + AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilityRegistryCapability) (*types.Transaction, error) AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) @@ -2139,11 +2186,11 @@ type CapabilityRegistryInterface interface { AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) - DeprecateCapability(opts *bind.TransactOpts, hashedCapabilityId [32]byte) (*types.Transaction, error) + DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) RemoveDONs(opts *bind.TransactOpts, donIds []uint32) (*types.Transaction, error) - RemoveNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []*big.Int) (*types.Transaction, error) + RemoveNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32) (*types.Transaction, error) RemoveNodes(opts *bind.TransactOpts, removedNodeP2PIds [][32]byte) (*types.Transaction, error) @@ -2151,15 +2198,15 @@ type CapabilityRegistryInterface interface { UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) - UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []*big.Int, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) + UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) - FilterCapabilityAdded(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityAddedIterator, error) + FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityConfiguredIterator, error) - WatchCapabilityAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityAdded, hashedCapabilityId [][32]byte) (event.Subscription, error) + WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) - ParseCapabilityAdded(log types.Log) (*CapabilityRegistryCapabilityAdded, error) + ParseCapabilityConfigured(log types.Log) (*CapabilityRegistryCapabilityConfigured, error) FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityDeprecatedIterator, error) @@ -2173,27 +2220,27 @@ type CapabilityRegistryInterface interface { ParseConfigSet(log types.Log) (*CapabilityRegistryConfigSet, error) - FilterNodeAdded(opts *bind.FilterOpts) (*CapabilityRegistryNodeAddedIterator, error) + FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeAddedIterator, error) - WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeAdded) (event.Subscription, error) + WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) ParseNodeAdded(log types.Log) (*CapabilityRegistryNodeAdded, error) - FilterNodeOperatorAdded(opts *bind.FilterOpts, admin []common.Address) (*CapabilityRegistryNodeOperatorAddedIterator, error) + FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorAddedIterator, error) - WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorAdded, admin []common.Address) (event.Subscription, error) + WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) ParseNodeOperatorAdded(log types.Log) (*CapabilityRegistryNodeOperatorAdded, error) - FilterNodeOperatorRemoved(opts *bind.FilterOpts) (*CapabilityRegistryNodeOperatorRemovedIterator, error) + FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeOperatorRemovedIterator, error) - WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorRemoved) (event.Subscription, error) + WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) ParseNodeOperatorRemoved(log types.Log) (*CapabilityRegistryNodeOperatorRemoved, error) - FilterNodeOperatorUpdated(opts *bind.FilterOpts, admin []common.Address) (*CapabilityRegistryNodeOperatorUpdatedIterator, error) + FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorUpdatedIterator, error) - WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorUpdated, admin []common.Address) (event.Subscription, error) + WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) ParseNodeOperatorUpdated(log types.Log) (*CapabilityRegistryNodeOperatorUpdated, error) @@ -2203,9 +2250,9 @@ type CapabilityRegistryInterface interface { ParseNodeRemoved(log types.Log) (*CapabilityRegistryNodeRemoved, error) - FilterNodeUpdated(opts *bind.FilterOpts) (*CapabilityRegistryNodeUpdatedIterator, error) + FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeUpdatedIterator, error) - WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeUpdated) (event.Subscription, error) + WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) ParseNodeUpdated(log types.Log) (*CapabilityRegistryNodeUpdated, 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 e11ebba404d..54f0035dcab 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 forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin ec6e94293700d400ca7b22989d54793e905d6febce3b84054727a58c473b9cf3 -keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin 462c8a4c5cba9c429320f6ed041a8ea64749ec7c8cec7938c10767d07e3053e3 +keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin 07b0d5eae760a400aaf3616201adb1ab962f92f77e05184677d94c8fc158f347 ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 9dcbdf55bd5729ba266148da3f17733eb592c871c2108ccca546618628fd9ad2