From 592b2bb5a84a0e8858f77c5faa99e881f911878c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Mon, 10 Jun 2024 18:23:10 +0900 Subject: [PATCH] Keystone: add router and other refactors (#13426) * keystone: Split forwarder into two contracts * keystone: Add a ConfigSet event * add events to router, further changes * forwarder: Use OwnerIsCreator, ITypeAndVersion * Remove TODO * Replace _splitSignature with code * minor gas savings by caching config var * Cache array length * Remove TODO * Port over reentrancy guard optimization * Don't assign signers twice * Update gethwrappers * Address some feedback on KeystoneFeedsConsumer * Inline signer in setConfig/clearConfig * Update gethwrappers * Remove unused import * prettier format * Generate bindings for router too * Update gethwrappers * Fix keystone scripts * Add KeystoneRouter tests * Update snapshot * Remove redundant operations * Remove more variables * Remove another unnecessary conversion * Remove unnecessary version check * ConfigId bytes32 => uint64 * Slight improvement to error path with duplicate signer * Optimize clearConfig function * More micro optimizations * Inline functions * Remove dangling error * Move things around * Add reportId to ReportProcessed * Handle empty receiver address case * Side: update "f" value in CapabilityRegistry * Nit: import order * Style Guide: uint256 i = 0 * Add forwarder and router getters * Add changesets * Remove unused error * Update gethwrappers * receiverAddress -> receiver * Update gethwrappers --------- Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com> Co-authored-by: DeividasK --- .changeset/shy-deers-hope.md | 5 + contracts/.changeset/new-bugs-draw.md | 5 + contracts/gas-snapshots/keystone.gas-snapshot | 178 ++-- .../scripts/native_solc_compile_all_keystone | 1 + .../src/v0.8/keystone/CapabilityRegistry.sol | 12 +- .../v0.8/keystone/KeystoneFeedsConsumer.sol | 32 +- .../src/v0.8/keystone/KeystoneForwarder.sol | 222 ++-- .../src/v0.8/keystone/KeystoneRouter.sol | 76 ++ .../src/v0.8/keystone/interfaces/IRouter.sol | 22 + .../src/v0.8/keystone/test/Constants.t.sol | 2 +- .../test/KeystoneForwarderBaseTest.t.sol | 6 +- .../test/KeystoneForwarder_ReportTest.t.sol | 80 +- .../test/KeystoneRouter_AccessTest.t.sol | 56 + core/capabilities/targets/write_target.go | 8 +- .../keystone/generated/forwarder/forwarder.go | 267 ++++- .../keystone_capability_registry.go | 22 +- .../keystone/generated/router/router.go | 954 ++++++++++++++++++ ...rapper-dependency-versions-do-not-edit.txt | 5 +- core/gethwrappers/keystone/go_generate.go | 1 + .../keystone/src/01_deploy_contracts_cmd.go | 24 +- 20 files changed, 1681 insertions(+), 297 deletions(-) create mode 100644 .changeset/shy-deers-hope.md create mode 100644 contracts/.changeset/new-bugs-draw.md create mode 100644 contracts/src/v0.8/keystone/KeystoneRouter.sol create mode 100644 contracts/src/v0.8/keystone/interfaces/IRouter.sol create mode 100644 contracts/src/v0.8/keystone/test/KeystoneRouter_AccessTest.t.sol create mode 100644 core/gethwrappers/keystone/generated/router/router.go diff --git a/.changeset/shy-deers-hope.md b/.changeset/shy-deers-hope.md new file mode 100644 index 00000000000..0408383bd03 --- /dev/null +++ b/.changeset/shy-deers-hope.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal diff --git a/contracts/.changeset/new-bugs-draw.md b/contracts/.changeset/new-bugs-draw.md new file mode 100644 index 00000000000..93fba83b558 --- /dev/null +++ b/contracts/.changeset/new-bugs-draw.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +#internal diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index 0cc6650f860..fb41fa7d637 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -1,99 +1,105 @@ -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: 355444) -CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 355432) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301394) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55229) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24962) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27724) -CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25130) -CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27430) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27069) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309822) -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: 122065) +CapabilityRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 152156) +CapabilityRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 176137) +CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24723) +CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145769) +CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94606) +CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 92961) +CapabilityRegistry_AddDONTest:test_AddDON() (gas: 499005) +CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19247) +CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 291948) +CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 365161) +CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 375975) +CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 177964) +CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43332) +CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 306409) +CapabilityRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184333) +CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17602) +CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18498) +CapabilityRegistry_AddNodesTest:test_AddsNodeInfo() (gas: 355400) +CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 355388) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301350) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55207) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24940) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27702) +CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25108) +CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27408) +CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27047) +CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309778) +CapabilityRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92938) +CapabilityRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 93066) +CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22944) +CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16231) +CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94395) +CapabilityRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 122130) CapabilityRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 58327) -CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65704) -CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 88473) +CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65746) +CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 88461) 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_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36653) +CapabilityRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38938) CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 59861) -CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 71561) -CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 60696) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15669) -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: 114053) -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_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 71597) +CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 60669) +CapabilityRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) +CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16518) +CapabilityRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) +CapabilityRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) +CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 114054) +CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 371555) +CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 712587) +CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 72342) +CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 74176) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24916) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18418) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfDON() (gas: 385167) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18430) CapabilityRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19406) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19411) 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_DONDoesNotExist() (gas: 17831) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 231117) 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) -KeystoneForwarder_ReportTest:test_RevertWhen_AnySignatureIsInvalid() (gas: 111634) -KeystoneForwarder_ReportTest:test_RevertWhen_AnySignerIsInvalid() (gas: 143377) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasDuplicateSignatures() (gas: 119553) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasIncorrectDON() (gas: 98500) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasInexistentConfigVersion() (gas: 98757) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportIsMalformed() (gas: 67777) -KeystoneForwarder_ReportTest:test_RevertWhen_TooFewSignatures() (gas: 77819) -KeystoneForwarder_ReportTest:test_RevertWhen_TooManySignatures() (gas: 78543) +CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 433641) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20627) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20048) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19786) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15426) +CapabilityRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36991) +CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 250659) +CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 158814) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35963) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25064) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27303) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29184) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27291) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26974) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25538) +CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeInfo() (gas: 158803) +KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 1807115) +KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 132145) +KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverNotContract() (gas: 133638) +KeystoneForwarder_ReportTest:test_Report_SuccessfulDelivery() (gas: 162153) +KeystoneForwarder_ReportTest:test_RevertWhen_AlreadyAttempted() (gas: 157192) +KeystoneForwarder_ReportTest:test_RevertWhen_AnySignatureIsInvalid() (gas: 86392) +KeystoneForwarder_ReportTest:test_RevertWhen_AnySignerIsInvalid() (gas: 118530) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasDuplicateSignatures() (gas: 94560) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasIncorrectDON() (gas: 75914) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasInexistentConfigVersion() (gas: 76282) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportIsMalformed() (gas: 45569) +KeystoneForwarder_ReportTest:test_RevertWhen_TooFewSignatures() (gas: 55282) +KeystoneForwarder_ReportTest:test_RevertWhen_TooManySignatures() (gas: 56028) KeystoneForwarder_SetConfigTest:test_RevertWhen_ExcessSigners() (gas: 20162) KeystoneForwarder_SetConfigTest:test_RevertWhen_FaultToleranceIsZero() (gas: 90143) KeystoneForwarder_SetConfigTest:test_RevertWhen_InsufficientSigners() (gas: 14511) KeystoneForwarder_SetConfigTest:test_RevertWhen_NotOwner() (gas: 90874) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 847644) -KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 2224138) -KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 2365984) -KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 9641) \ No newline at end of file +KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 116644) +KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 1543588) +KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 1540255) +KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 9641) +KeystoneRouter_SetConfigTest:test_AddForwarder_RevertWhen_NotOwner() (gas: 10956) +KeystoneRouter_SetConfigTest:test_RemoveForwarder_RevertWhen_NotOwner() (gas: 10879) +KeystoneRouter_SetConfigTest:test_Route_RevertWhen_Unauthorized() (gas: 18509) +KeystoneRouter_SetConfigTest:test_Route_Success() (gas: 75585) \ No newline at end of file diff --git a/contracts/scripts/native_solc_compile_all_keystone b/contracts/scripts/native_solc_compile_all_keystone index 1530b307dbd..5450cd654c8 100755 --- a/contracts/scripts/native_solc_compile_all_keystone +++ b/contracts/scripts/native_solc_compile_all_keystone @@ -30,4 +30,5 @@ compileContract () { compileContract keystone/CapabilityRegistry.sol compileContract keystone/KeystoneForwarder.sol +compileContract keystone/KeystoneRouter.sol compileContract keystone/OCR3Capability.sol diff --git a/contracts/src/v0.8/keystone/CapabilityRegistry.sol b/contracts/src/v0.8/keystone/CapabilityRegistry.sol index c2462bfecf8..81745f5ac9b 100644 --- a/contracts/src/v0.8/keystone/CapabilityRegistry.sol +++ b/contracts/src/v0.8/keystone/CapabilityRegistry.sol @@ -159,7 +159,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice The f value for the DON. This is the number of faulty nodes /// that the DON can tolerate. This can be different from the f value of /// the OCR instances that capabilities spawn. - uint32 f; + uint8 f; /// @notice True if the DON is public. A public DON means that it accepts /// external capability requests bool isPublic; @@ -177,7 +177,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice The f value for the DON. This is the number of faulty nodes /// that the DON can tolerate. This can be different from the f value of /// the OCR instances that capabilities spawn. - uint32 f; + uint8 f; /// @notice True if the DON is public. A public DON means that it accepts /// external capability requests bool isPublic; @@ -196,7 +196,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { uint32 configCount; bool isPublic; bool acceptsWorkflows; - uint32 f; + uint8 f; } /// @notice This error is thrown when a caller is not allowed @@ -265,7 +265,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// fault tolerance value. /// @param f The proposed fault tolerance value /// @param nodeCount The proposed number of nodes in the DON - error InvalidFaultTolerance(uint32 f, uint256 nodeCount); + error InvalidFaultTolerance(uint8 f, uint256 nodeCount); /// @notice This error is thrown when a capability with the provided hashed ID is /// not found. @@ -689,7 +689,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { CapabilityConfiguration[] calldata capabilityConfigurations, bool isPublic, bool acceptsWorkflows, - uint32 f + uint8 f ) external onlyOwner { uint32 id = s_nextDONId++; s_dons[id].id = id; @@ -715,7 +715,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { CapabilityConfiguration[] calldata capabilityConfigurations, bool isPublic, bool acceptsWorkflows, - uint32 f + uint8 f ) external onlyOwner { uint32 configCount = s_dons[donId].configCount; if (configCount == 0) revert DONDoesNotExist(donId); diff --git a/contracts/src/v0.8/keystone/KeystoneFeedsConsumer.sol b/contracts/src/v0.8/keystone/KeystoneFeedsConsumer.sol index e886c6011dc..3b2d151ed32 100644 --- a/contracts/src/v0.8/keystone/KeystoneFeedsConsumer.sol +++ b/contracts/src/v0.8/keystone/KeystoneFeedsConsumer.sol @@ -2,17 +2,15 @@ pragma solidity ^0.8.19; import {IReceiver} from "./interfaces/IReceiver.sol"; -import {ConfirmedOwner} from "../shared/access/ConfirmedOwner.sol"; +import {OwnerIsCreator} from "../shared/access/OwnerIsCreator.sol"; -contract KeystoneFeedsConsumer is IReceiver, ConfirmedOwner { +contract KeystoneFeedsConsumer is IReceiver, OwnerIsCreator { event FeedReceived(bytes32 indexed feedId, int192 price, uint32 timestamp); error UnauthorizedSender(address sender); error UnauthorizedWorkflowOwner(address workflowOwner); error UnauthorizedWorkflowName(bytes10 workflowName); - constructor() ConfirmedOwner(msg.sender) {} - struct ReceivedFeedReport { bytes32 FeedId; int192 Price; @@ -26,55 +24,55 @@ contract KeystoneFeedsConsumer is IReceiver, ConfirmedOwner { mapping(bytes32 feedId => StoredFeedReport feedReport) internal s_feedReports; address[] internal s_allowedSendersList; - mapping(address => bool) internal s_allowedSenders; + mapping(address sender => bool) internal s_allowedSenders; address[] internal s_allowedWorkflowOwnersList; - mapping(address => bool) internal s_allowedWorkflowOwners; + mapping(address owner => bool) internal s_allowedWorkflowOwners; bytes10[] internal s_allowedWorkflowNamesList; - mapping(bytes10 => bool) internal s_allowedWorkflowNames; + mapping(bytes10 workflowName => bool) internal s_allowedWorkflowNames; function setConfig( address[] calldata _allowedSendersList, address[] calldata _allowedWorkflowOwnersList, bytes10[] calldata _allowedWorkflowNamesList ) external onlyOwner { - for (uint32 i = 0; i < s_allowedSendersList.length; i++) { + for (uint32 i = 0; i < s_allowedSendersList.length; ++i) { s_allowedSenders[s_allowedSendersList[i]] = false; } - for (uint32 i = 0; i < _allowedSendersList.length; i++) { + for (uint32 i = 0; i < _allowedSendersList.length; ++i) { s_allowedSenders[_allowedSendersList[i]] = true; } s_allowedSendersList = _allowedSendersList; - for (uint32 i = 0; i < s_allowedWorkflowOwnersList.length; i++) { + for (uint32 i = 0; i < s_allowedWorkflowOwnersList.length; ++i) { s_allowedWorkflowOwners[s_allowedWorkflowOwnersList[i]] = false; } - for (uint32 i = 0; i < _allowedWorkflowOwnersList.length; i++) { + for (uint32 i = 0; i < _allowedWorkflowOwnersList.length; ++i) { s_allowedWorkflowOwners[_allowedWorkflowOwnersList[i]] = true; } s_allowedWorkflowOwnersList = _allowedWorkflowOwnersList; - for (uint32 i = 0; i < s_allowedWorkflowNamesList.length; i++) { + for (uint32 i = 0; i < s_allowedWorkflowNamesList.length; ++i) { s_allowedWorkflowNames[s_allowedWorkflowNamesList[i]] = false; } - for (uint32 i = 0; i < _allowedWorkflowNamesList.length; i++) { + for (uint32 i = 0; i < _allowedWorkflowNamesList.length; ++i) { s_allowedWorkflowNames[_allowedWorkflowNamesList[i]] = true; } s_allowedWorkflowNamesList = _allowedWorkflowNamesList; } function onReport(bytes calldata metadata, bytes calldata rawReport) external { - if (s_allowedSenders[msg.sender] == false) { + if (!s_allowedSenders[msg.sender]) { revert UnauthorizedSender(msg.sender); } (bytes10 workflowName, address workflowOwner) = _getInfo(metadata); - if (s_allowedWorkflowNames[workflowName] == false) { + if (!s_allowedWorkflowNames[workflowName]) { revert UnauthorizedWorkflowName(workflowName); } - if (s_allowedWorkflowOwners[workflowOwner] == false) { + if (!s_allowedWorkflowOwners[workflowOwner]) { revert UnauthorizedWorkflowOwner(workflowOwner); } ReceivedFeedReport[] memory feeds = abi.decode(rawReport, (ReceivedFeedReport[])); - for (uint32 i = 0; i < feeds.length; i++) { + for (uint256 i = 0; i < feeds.length; ++i) { s_feedReports[feeds[i].FeedId] = StoredFeedReport(feeds[i].Price, feeds[i].Timestamp); emit FeedReceived(feeds[i].FeedId, feeds[i].Price, feeds[i].Timestamp); } diff --git a/contracts/src/v0.8/keystone/KeystoneForwarder.sol b/contracts/src/v0.8/keystone/KeystoneForwarder.sol index e8885bb7543..644f4842be7 100644 --- a/contracts/src/v0.8/keystone/KeystoneForwarder.sol +++ b/contracts/src/v0.8/keystone/KeystoneForwarder.sol @@ -1,25 +1,21 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import {ITypeAndVersion} from "../shared/interfaces/ITypeAndVersion.sol"; +import {IRouter} from "./interfaces/IRouter.sol"; import {IForwarder} from "./interfaces/IForwarder.sol"; -import {IReceiver} from "./interfaces/IReceiver.sol"; -import {ConfirmedOwner} from "../shared/access/ConfirmedOwner.sol"; -import {TypeAndVersionInterface} from "../interfaces/TypeAndVersionInterface.sol"; + +import {OwnerIsCreator} from "../shared/access/OwnerIsCreator.sol"; /// @notice This is an entry point for `write_${chain}` Target capability. It /// allows nodes to determine if reports have been processed (successfully or /// not) in a decentralized and product-agnostic way by recording processed /// reports. -contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterface { - error ReentrantCall(); - +contract KeystoneForwarder is IForwarder, OwnerIsCreator, ITypeAndVersion { /// @notice This error is returned when the report is shorter than /// REPORT_METADATA_LENGTH, which is the minimum length of a report. error InvalidReport(); - /// @notice This error is returned when the metadata version is not supported. - error InvalidVersion(uint8 version); - /// @notice This error is thrown whenever trying to set a config with a fault /// tolerance of 0. error FaultToleranceMustBePositive(); @@ -49,9 +45,8 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac /// @notice This error is thrown whenever a report specifies a configuration that /// does not exist. - /// @param donId The DON ID that was provided in the report - /// @param configVersion The config version that was provided in the report - error InvalidConfig(uint32 donId, uint32 configVersion); + /// @param configId (uint64(donId) << 32) | configVersion + error InvalidConfig(uint64 configId); /// @notice This error is thrown whenever a signer address is not in the /// configuration. @@ -62,37 +57,35 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac /// @param signature The signature that was invalid error InvalidSignature(bytes signature); - /// @notice This error is thrown whenever a message has already been processed. - /// @param messageId The ID of the message that was already processed - error AlreadyProcessed(bytes32 messageId); - - bool internal s_reentrancyGuard; // guard against reentrancy - /// @notice Contains the signing address of each oracle struct OracleSet { uint8 f; // Number of faulty nodes allowed address[] signers; - mapping(address => uint256) _positions; // 1-indexed to detect unset values + mapping(address signer => uint256 position) _positions; // 1-indexed to detect unset values } - /// @notice Contains the configuration for each DON ID - // @param configId keccak256(donId, donConfigVersion) - mapping(bytes32 configId => OracleSet) internal s_configs; + address internal s_router; - struct DeliveryStatus { - address transmitter; - bool success; - } + /// @notice Contains the configuration for each DON ID + // @param configId (uint64(donId) << 32) | configVersion + mapping(uint64 configId => OracleSet) internal s_configs; - mapping(bytes32 reportId => DeliveryStatus status) internal s_reports; + event ConfigSet(uint32 indexed donId, uint32 indexed configVersion, uint8 f, address[] signers); /// @notice Emitted when a report is processed - /// @param receiver The address of the receiver contract - /// @param workflowExecutionId The ID of the workflow execution /// @param result The result of the attempted delivery. True if successful. - event ReportProcessed(address indexed receiver, bytes32 indexed workflowExecutionId, bool result); + event ReportProcessed( + address indexed receiver, + bytes32 indexed workflowExecutionId, + bytes2 indexed reportId, + bool result + ); + + string public constant override typeAndVersion = "KeystoneForwarder 1.0.0"; - constructor() ConfirmedOwner(msg.sender) {} + constructor(address router) OwnerIsCreator() { + s_router = router; + } uint256 internal constant MAX_ORACLES = 31; uint256 internal constant METADATA_LENGTH = 109; @@ -104,145 +97,124 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac if (signers.length > MAX_ORACLES) revert ExcessSigners(signers.length, MAX_ORACLES); if (signers.length <= 3 * f) revert InsufficientSigners(signers.length, 3 * f + 1); - bytes32 configId = keccak256(abi.encode(donId, configVersion)); + uint64 configId = (uint64(donId) << 32) | configVersion; // remove any old signer addresses - for (uint256 i; i < s_configs[configId].signers.length; ++i) { - address signer = s_configs[configId].signers[i]; - delete s_configs[configId]._positions[signer]; + for (uint256 i = 0; i < s_configs[configId].signers.length; ++i) { + delete s_configs[configId]._positions[s_configs[configId].signers[i]]; } // add new signer addresses - s_configs[configId].signers = signers; - for (uint256 i; i < signers.length; ++i) { + for (uint256 i = 0; i < signers.length; ++i) { // assign indices, detect duplicates address signer = signers[i]; if (s_configs[configId]._positions[signer] != 0) revert DuplicateSigner(signer); - s_configs[configId]._positions[signer] = uint8(i) + 1; - s_configs[configId].signers.push(signer); + s_configs[configId]._positions[signer] = i + 1; } + s_configs[configId].signers = signers; s_configs[configId].f = f; + + emit ConfigSet(donId, configVersion, f, signers); } function clearConfig(uint32 donId, uint32 configVersion) external onlyOwner { - bytes32 configId = keccak256(abi.encode(donId, configVersion)); - - // remove any old signer addresses - for (uint256 i; i < s_configs[configId].signers.length; ++i) { - address signer = s_configs[configId].signers[i]; - delete s_configs[configId]._positions[signer]; - } + // We are not removing old signer positions, because it is sufficient to + // clear the f value for `report` function. If we decide to restore + // the configId in the future, the setConfig function clears the positions. + s_configs[(uint64(donId) << 32) | configVersion].f = 0; - s_configs[configId].f = 0; + emit ConfigSet(donId, configVersion, 0, new address[](0)); } // send a report to receiver function report( - address receiverAddress, + address receiver, bytes calldata rawReport, bytes calldata reportContext, bytes[] calldata signatures - ) external nonReentrant { + ) external { if (rawReport.length < METADATA_LENGTH) { revert InvalidReport(); } bytes32 workflowExecutionId; bytes2 reportId; - bytes32 configId; { - uint32 donId; - uint32 configVersion; - (workflowExecutionId, donId, configVersion, reportId) = _getMetadata(rawReport); - - configId = keccak256(abi.encode(donId, configVersion)); + uint64 configId; + (workflowExecutionId, configId, reportId) = _getMetadata(rawReport); + OracleSet storage config = s_configs[configId]; - uint8 f = s_configs[configId].f; + uint8 f = config.f; // f can never be 0, so this means the config doesn't actually exist - if (f == 0) revert InvalidConfig(donId, configVersion); + if (f == 0) revert InvalidConfig(configId); if (f + 1 != signatures.length) revert InvalidSignatureCount(f + 1, signatures.length); - } - - bytes32 combinedId = _combinedId(receiverAddress, workflowExecutionId, reportId); - if (s_reports[combinedId].transmitter != address(0)) revert AlreadyProcessed(combinedId); - // validate signatures - { + // validate signatures bytes32 completeHash = keccak256(abi.encodePacked(keccak256(rawReport), reportContext)); - - address[MAX_ORACLES] memory signed; - uint8 index; - for (uint256 i; i < signatures.length; ++i) { - (bytes32 r, bytes32 s, uint8 v) = _splitSignature(signatures[i]); - address signer = ecrecover(completeHash, v + 27, r, s); + address[MAX_ORACLES + 1] memory signed; + for (uint256 i = 0; i < signatures.length; ++i) { + bytes calldata signature = signatures[i]; + if (signature.length != SIGNATURE_LENGTH) revert InvalidSignature(signature); + address signer = ecrecover( + completeHash, + uint8(signature[64]) + 27, + bytes32(signature[0:32]), + bytes32(signature[32:64]) + ); // validate signer is trusted and signature is unique - index = uint8(s_configs[configId]._positions[signer]); + uint256 index = config._positions[signer]; if (index == 0) revert InvalidSigner(signer); // index is 1-indexed so we can detect unset signers - index -= 1; if (signed[index] != address(0)) revert DuplicateSigner(signer); signed[index] = signer; } } - bool success; - try - IReceiver(receiverAddress).onReport( - rawReport[FORWARDER_METADATA_LENGTH:METADATA_LENGTH], - rawReport[METADATA_LENGTH:] - ) - { - success = true; - } catch { - // Do nothing, success is already false - } - - s_reports[combinedId] = DeliveryStatus(msg.sender, success); - emit ReportProcessed(receiverAddress, workflowExecutionId, success); - } + bool success = IRouter(s_router).route( + getTransmissionId(receiver, workflowExecutionId, reportId), + msg.sender, + receiver, + rawReport[FORWARDER_METADATA_LENGTH:METADATA_LENGTH], + rawReport[METADATA_LENGTH:] + ); - function _combinedId(address receiver, bytes32 workflowExecutionId, bytes2 reportId) internal pure returns (bytes32) { - // TODO: gas savings: could we just use a bytes key and avoid another keccak256 call - return keccak256(bytes.concat(bytes20(uint160(receiver)), workflowExecutionId, reportId)); + emit ReportProcessed(receiver, workflowExecutionId, reportId, success); } - // get transmitter of a given report or 0x0 if it wasn't transmitted yet function getTransmitter( address receiver, bytes32 workflowExecutionId, bytes2 reportId ) external view returns (address) { - bytes32 combinedId = _combinedId(receiver, workflowExecutionId, reportId); - return s_reports[combinedId].transmitter; + return IRouter(s_router).getTransmitter(getTransmissionId(receiver, workflowExecutionId, reportId)); } - // solhint-disable-next-line chainlink-solidity/explicit-returns - function _splitSignature(bytes memory sig) internal pure returns (bytes32 r, bytes32 s, uint8 v) { - if (sig.length != SIGNATURE_LENGTH) revert InvalidSignature(sig); - - assembly { - /* - First 32 bytes stores the length of the signature - - add(sig, 32) = pointer of sig + 32 - effectively, skips first 32 bytes of signature + function getTransmissionState( + address receiver, + bytes32 workflowExecutionId, + bytes2 reportId + ) external view returns (IRouter.TransmissionState) { + return IRouter(s_router).getTransmissionState(getTransmissionId(receiver, workflowExecutionId, reportId)); + } - mload(p) loads next 32 bytes starting at the memory address p into memory - */ + function getTransmissionId( + address receiver, + bytes32 workflowExecutionId, + bytes2 reportId + ) public pure returns (bytes32) { + // This is slightly cheaper compared to + // keccak256(abi.encode(receiver, workflowExecutionId, reportId)); + return keccak256(bytes.concat(bytes20(uint160(receiver)), workflowExecutionId, reportId)); + } - // first 32 bytes, after the length prefix - r := mload(add(sig, 32)) - // second 32 bytes - s := mload(add(sig, 64)) - // final byte (first byte of the next 32 bytes) - v := byte(0, mload(add(sig, 96))) - } + function getRouter() external view returns (address) { + return s_router; } // solhint-disable-next-line chainlink-solidity/explicit-returns function _getMetadata( bytes memory rawReport - ) internal pure returns (bytes32 workflowExecutionId, uint32 donId, uint32 donConfigVersion, bytes2 reportId) { + ) internal pure returns (bytes32 workflowExecutionId, uint64 configId, bytes2 reportId) { // (first 32 bytes of memory contain length of the report) // version // offset 32, size 1 // workflow_execution_id // offset 33, size 32 @@ -252,32 +224,12 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac // workflow_cid // offset 77, size 32 // workflow_name // offset 109, size 10 // workflow_owner // offset 119, size 20 - // report_name // offset 139, size 2 - if (uint8(rawReport[0]) != 1) { - revert InvalidVersion(uint8(rawReport[0])); - } + // report_id // offset 139, size 2 assembly { workflowExecutionId := mload(add(rawReport, 33)) - // shift right by 28 bytes to get the actual value - donId := shr(mul(28, 8), mload(add(rawReport, 69))) - // shift right by 28 bytes to get the actual value - donConfigVersion := shr(mul(28, 8), mload(add(rawReport, 73))) + // shift right by 24 bytes to get the combined don_id and don_config_version + configId := shr(mul(24, 8), mload(add(rawReport, 69))) reportId := mload(add(rawReport, 139)) } } - - /// @inheritdoc TypeAndVersionInterface - function typeAndVersion() external pure override returns (string memory) { - return "KeystoneForwarder 1.0.0"; - } - - /** - * @dev replicates Open Zeppelin's ReentrancyGuard but optimized to fit our storage - */ - modifier nonReentrant() { - if (s_reentrancyGuard) revert ReentrantCall(); - s_reentrancyGuard = true; - _; - s_reentrancyGuard = false; - } } diff --git a/contracts/src/v0.8/keystone/KeystoneRouter.sol b/contracts/src/v0.8/keystone/KeystoneRouter.sol new file mode 100644 index 00000000000..aacb83d8c6a --- /dev/null +++ b/contracts/src/v0.8/keystone/KeystoneRouter.sol @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {ITypeAndVersion} from "../shared/interfaces/ITypeAndVersion.sol"; +import {IRouter} from "./interfaces/IRouter.sol"; +import {IReceiver} from "./interfaces/IReceiver.sol"; + +import {OwnerIsCreator} from "../shared/access/OwnerIsCreator.sol"; + +contract KeystoneRouter is IRouter, OwnerIsCreator, ITypeAndVersion { + error Unauthorized(); + error AlreadyAttempted(bytes32 transmissionId); + + event ForwarderAdded(address indexed forwarder); + event ForwarderRemoved(address indexed forwarder); + + mapping(address forwarder => bool) internal s_forwarders; + mapping(bytes32 transmissionId => TransmissionInfo) internal s_transmissions; + + string public constant override typeAndVersion = "KeystoneRouter 1.0.0"; + + struct TransmissionInfo { + address transmitter; + bool state; + } + + function addForwarder(address forwarder) external onlyOwner { + s_forwarders[forwarder] = true; + emit ForwarderAdded(forwarder); + } + + function removeForwarder(address forwarder) external onlyOwner { + s_forwarders[forwarder] = false; + emit ForwarderRemoved(forwarder); + } + + function route( + bytes32 transmissionId, + address transmitter, + address receiver, + bytes calldata metadata, + bytes calldata report + ) external returns (bool) { + if (!s_forwarders[msg.sender]) { + revert Unauthorized(); + } + + if (s_transmissions[transmissionId].transmitter != address(0)) revert AlreadyAttempted(transmissionId); + s_transmissions[transmissionId].transmitter = transmitter; + + if (receiver.code.length == 0) return false; + + try IReceiver(receiver).onReport(metadata, report) { + s_transmissions[transmissionId].state = true; + return true; + } catch { + return false; + } + } + + /// @notice Get transmitter of a given report or 0x0 if it wasn't transmitted yet + function getTransmitter(bytes32 transmissionId) external view returns (address) { + return s_transmissions[transmissionId].transmitter; + } + + /// @notice Get delivery status of a given report + function getTransmissionState(bytes32 transmissionId) external view returns (IRouter.TransmissionState) { + if (s_transmissions[transmissionId].transmitter == address(0)) return IRouter.TransmissionState.NOT_ATTEMPTED; + return + s_transmissions[transmissionId].state ? IRouter.TransmissionState.SUCCEEDED : IRouter.TransmissionState.FAILED; + } + + function isForwarder(address forwarder) external view returns (bool) { + return s_forwarders[forwarder]; + } +} diff --git a/contracts/src/v0.8/keystone/interfaces/IRouter.sol b/contracts/src/v0.8/keystone/interfaces/IRouter.sol new file mode 100644 index 00000000000..63ddd865c21 --- /dev/null +++ b/contracts/src/v0.8/keystone/interfaces/IRouter.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +/// @title IRouter - delivers keystone reports to receiver +interface IRouter { + enum TransmissionState { + NOT_ATTEMPTED, + SUCCEEDED, + FAILED + } + + function route( + bytes32 transmissionId, + address transmitter, + address receiver, + bytes calldata metadata, + bytes calldata report + ) external returns (bool); + + function getTransmitter(bytes32 transmissionId) external view returns (address); + function getTransmissionState(bytes32 transmissionId) external view returns (TransmissionState); +} diff --git a/contracts/src/v0.8/keystone/test/Constants.t.sol b/contracts/src/v0.8/keystone/test/Constants.t.sol index 9b13bd91f58..23c80eea9f1 100644 --- a/contracts/src/v0.8/keystone/test/Constants.t.sol +++ b/contracts/src/v0.8/keystone/test/Constants.t.sol @@ -23,7 +23,7 @@ contract Constants { bytes32 internal constant NODE_OPERATOR_THREE_SIGNER_ADDRESS = bytes32(abi.encodePacked(address(5555))); bytes32 internal constant P2P_ID_THREE = hex"f53415859707d90ed4dc534ad730f187a17b0c368e1beec2e9b995587c4b0a06"; - uint32 internal constant F_VALUE = 1; + uint8 internal constant F_VALUE = 1; uint32 internal constant DON_ID = 1; uint32 internal constant DON_ID_TWO = 2; diff --git a/contracts/src/v0.8/keystone/test/KeystoneForwarderBaseTest.t.sol b/contracts/src/v0.8/keystone/test/KeystoneForwarderBaseTest.t.sol index fc5c3a160d5..2b1adfb9622 100644 --- a/contracts/src/v0.8/keystone/test/KeystoneForwarderBaseTest.t.sol +++ b/contracts/src/v0.8/keystone/test/KeystoneForwarderBaseTest.t.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.19; import {Test} from "forge-std/Test.sol"; import {Receiver} from "./mocks/Receiver.sol"; +import {KeystoneRouter} from "../KeystoneRouter.sol"; import {KeystoneForwarder} from "../KeystoneForwarder.sol"; contract BaseTest is Test { @@ -20,11 +21,14 @@ contract BaseTest is Test { Signer[MAX_ORACLES] internal s_signers; KeystoneForwarder internal s_forwarder; + KeystoneRouter internal s_router; Receiver internal s_receiver; function setUp() public virtual { vm.startPrank(ADMIN); - s_forwarder = new KeystoneForwarder(); + s_router = new KeystoneRouter(); + s_forwarder = new KeystoneForwarder(address(s_router)); + s_router.addForwarder(address(s_forwarder)); s_receiver = new Receiver(); uint256 seed = 0; diff --git a/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol b/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol index f68917ba85a..cf9d1ad3eee 100644 --- a/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol +++ b/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol @@ -2,11 +2,18 @@ pragma solidity ^0.8.19; import {BaseTest} from "./KeystoneForwarderBaseTest.t.sol"; +import {KeystoneRouter} from "../KeystoneRouter.sol"; +import {IRouter} from "../interfaces/IRouter.sol"; import {KeystoneForwarder} from "../KeystoneForwarder.sol"; contract KeystoneForwarder_ReportTest is BaseTest { event MessageReceived(bytes metadata, bytes[] mercuryReports); - event ReportProcessed(address indexed receiver, bytes32 indexed workflowExecutionId, bool result); + event ReportProcessed( + address indexed receiver, + bytes32 indexed workflowExecutionId, + bytes2 indexed reportId, + bool result + ); uint8 internal version = 1; uint32 internal timestamp = 0; @@ -28,6 +35,9 @@ contract KeystoneForwarder_ReportTest is BaseTest { BaseTest.setUp(); s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, _getSignerAddresses()); + s_router.addForwarder(address(s_forwarder)); + + assertEq(s_forwarder.getRouter(), address(s_router), "router mismatch"); mercuryReports[0] = hex"010203"; mercuryReports[1] = hex"aabbccdd"; @@ -57,7 +67,8 @@ contract KeystoneForwarder_ReportTest is BaseTest { rawReports ); - vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, invalidDONId, CONFIG_VERSION)); + uint64 configId = (uint64(invalidDONId) << 32) | CONFIG_VERSION; + vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, configId)); s_forwarder.report(address(s_receiver), reportWithInvalidDONId, reportContext, signatures); } @@ -75,7 +86,8 @@ contract KeystoneForwarder_ReportTest is BaseTest { rawReports ); - vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, DON_ID, CONFIG_VERSION + 1)); + uint64 configId = (uint64(DON_ID) << 32) | (CONFIG_VERSION + 1); + vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, configId)); s_forwarder.report(address(s_receiver), reportWithInvalidDONId, reportContext, signatures); } @@ -132,11 +144,11 @@ contract KeystoneForwarder_ReportTest is BaseTest { s_forwarder.report(address(s_receiver), report, reportContext, signatures); } - function test_RevertWhen_AlreadyProcessed() public { + function test_RevertWhen_AlreadyAttempted() public { s_forwarder.report(address(s_receiver), report, reportContext, signatures); - bytes32 combinedId = keccak256(bytes.concat(bytes20(uint160(address(s_receiver))), executionId, reportId)); - vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.AlreadyProcessed.selector, combinedId)); + bytes32 transmissionId = s_forwarder.getTransmissionId(address(s_receiver), executionId, reportId); + vm.expectRevert(abi.encodeWithSelector(KeystoneRouter.AlreadyAttempted.selector, transmissionId)); s_forwarder.report(address(s_receiver), report, reportContext, signatures); } @@ -145,13 +157,54 @@ contract KeystoneForwarder_ReportTest is BaseTest { emit MessageReceived(metadata, mercuryReports); vm.expectEmit(address(s_forwarder)); - emit ReportProcessed(address(s_receiver), executionId, true); + emit ReportProcessed(address(s_receiver), executionId, reportId, true); s_forwarder.report(address(s_receiver), report, reportContext, signatures); - // validate transmitter was recorded - address transmitter = s_forwarder.getTransmitter(address(s_receiver), executionId, reportId); - assertEq(transmitter, TRANSMITTER, "transmitter mismatch"); + assertEq( + s_forwarder.getTransmitter(address(s_receiver), executionId, reportId), + TRANSMITTER, + "transmitter mismatch" + ); + assertEq( + uint8(s_forwarder.getTransmissionState(address(s_receiver), executionId, reportId)), + uint8(IRouter.TransmissionState.SUCCEEDED), + "TransmissionState mismatch" + ); + } + + function test_Report_FailedDeliveryWhenReceiverNotContract() public { + // Receiver is not a contract + address receiver = address(404); + + vm.expectEmit(address(s_forwarder)); + emit ReportProcessed(receiver, executionId, reportId, false); + + s_forwarder.report(receiver, report, reportContext, signatures); + + assertEq(s_forwarder.getTransmitter(receiver, executionId, reportId), TRANSMITTER, "transmitter mismatch"); + assertEq( + uint8(s_forwarder.getTransmissionState(receiver, executionId, reportId)), + uint8(IRouter.TransmissionState.FAILED), + "TransmissionState mismatch" + ); + } + + function test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() public { + // Receiver is a contract but doesn't implement the required interface + address receiver = address(s_forwarder); + + vm.expectEmit(address(s_forwarder)); + emit ReportProcessed(receiver, executionId, reportId, false); + + s_forwarder.report(receiver, report, reportContext, signatures); + + assertEq(s_forwarder.getTransmitter(receiver, executionId, reportId), TRANSMITTER, "transmitter mismatch"); + assertEq( + uint8(s_forwarder.getTransmissionState(receiver, executionId, reportId)), + uint8(IRouter.TransmissionState.FAILED), + "TransmissionState mismatch" + ); } function test_Report_ConfigVersion() public { @@ -165,7 +218,7 @@ contract KeystoneForwarder_ReportTest is BaseTest { emit MessageReceived(metadata, mercuryReports); vm.expectEmit(address(s_forwarder)); - emit ReportProcessed(address(s_receiver), executionId, true); + emit ReportProcessed(address(s_receiver), executionId, reportId, true); vm.prank(TRANSMITTER); s_forwarder.report(address(s_receiver), report, reportContext, signatures); @@ -174,7 +227,8 @@ contract KeystoneForwarder_ReportTest is BaseTest { vm.prank(ADMIN); s_forwarder.clearConfig(DON_ID, CONFIG_VERSION); - vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, DON_ID, CONFIG_VERSION)); + uint64 configId = (uint64(DON_ID) << 32) | CONFIG_VERSION; + vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, configId)); vm.prank(TRANSMITTER); s_forwarder.report(address(s_receiver), report, reportContext, signatures); @@ -197,7 +251,7 @@ contract KeystoneForwarder_ReportTest is BaseTest { emit MessageReceived(newMetadata, mercuryReports); vm.expectEmit(address(s_forwarder)); - emit ReportProcessed(address(s_receiver), newExecutionId, true); + emit ReportProcessed(address(s_receiver), newExecutionId, reportId, true); vm.prank(TRANSMITTER); s_forwarder.report(address(s_receiver), newReport, reportContext, newSignatures); diff --git a/contracts/src/v0.8/keystone/test/KeystoneRouter_AccessTest.t.sol b/contracts/src/v0.8/keystone/test/KeystoneRouter_AccessTest.t.sol new file mode 100644 index 00000000000..60c40eec573 --- /dev/null +++ b/contracts/src/v0.8/keystone/test/KeystoneRouter_AccessTest.t.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {Test} from "forge-std/Test.sol"; +import {IReceiver} from "../interfaces/IReceiver.sol"; +import {KeystoneRouter} from "../KeystoneRouter.sol"; + +contract KeystoneRouter_SetConfigTest is Test { + address internal ADMIN = address(1); + address internal constant STRANGER = address(2); + address internal constant FORWARDER = address(99); + address internal constant TRANSMITTER = address(50); + address internal constant RECEIVER = address(51); + + bytes internal metadata = hex"01020304"; + bytes internal report = hex"9998"; + bytes32 internal id = hex"6d795f657865637574696f6e5f69640000000000000000000000000000000000"; + + KeystoneRouter internal s_router; + + function setUp() public virtual { + vm.prank(ADMIN); + s_router = new KeystoneRouter(); + } + + function test_AddForwarder_RevertWhen_NotOwner() public { + vm.prank(STRANGER); + vm.expectRevert(); + s_router.addForwarder(FORWARDER); + } + + function test_RemoveForwarder_RevertWhen_NotOwner() public { + vm.prank(STRANGER); + vm.expectRevert(); + s_router.removeForwarder(FORWARDER); + } + + function test_Route_RevertWhen_Unauthorized() public { + vm.prank(STRANGER); + vm.expectRevert(KeystoneRouter.Unauthorized.selector); + s_router.route(id, TRANSMITTER, RECEIVER, metadata, report); + } + + function test_Route_Success() public { + assertEq(s_router.isForwarder(FORWARDER), false); + + vm.prank(ADMIN); + s_router.addForwarder(FORWARDER); + assertEq(s_router.isForwarder(FORWARDER), true); + + vm.prank(FORWARDER); + vm.mockCall(RECEIVER, abi.encodeCall(IReceiver.onReport, (metadata, report)), abi.encode()); + vm.expectCall(RECEIVER, abi.encodeCall(IReceiver.onReport, (metadata, report))); + s_router.route(id, TRANSMITTER, RECEIVER, metadata, report); + } +} diff --git a/core/capabilities/targets/write_target.go b/core/capabilities/targets/write_target.go index 913551d20b0..6f377c0f84d 100644 --- a/core/capabilities/targets/write_target.go +++ b/core/capabilities/targets/write_target.go @@ -131,10 +131,10 @@ func (cap *WriteTarget) Execute(ctx context.Context, request capabilities.Capabi // `nil` values, including for slices. Until the bug is fixed we need to ensure that there are no // `nil` values passed in the request. req := struct { - ReceiverAddress string - RawReport []byte - ReportContext []byte - Signatures [][]byte + Receiver string + RawReport []byte + ReportContext []byte + Signatures [][]byte }{reqConfig.Address, inputs.Report, inputs.Context, inputs.Signatures} if req.RawReport == nil { diff --git a/core/gethwrappers/keystone/generated/forwarder/forwarder.go b/core/gethwrappers/keystone/generated/forwarder/forwarder.go index b4f209f1c32..eeeb322d96e 100644 --- a/core/gethwrappers/keystone/generated/forwarder/forwarder.go +++ b/core/gethwrappers/keystone/generated/forwarder/forwarder.go @@ -31,15 +31,15 @@ var ( ) var KeystoneForwarderMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"AlreadyProcessed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"DuplicateSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSigners\",\"type\":\"uint256\"}],\"name\":\"ExcessSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FaultToleranceMustBePositive\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSigners\",\"type\":\"uint256\"}],\"name\":\"InsufficientSigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"received\",\"type\":\"uint256\"}],\"name\":\"InvalidSignatureCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"InvalidVersion\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"name\":\"ReportProcessed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"}],\"name\":\"clearConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes2\",\"name\":\"reportId\",\"type\":\"bytes2\"}],\"name\":\"getTransmitter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"rawReport\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"reportContext\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"}],\"name\":\"setConfig\",\"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\"}]", - Bin: "0x608060405234801561001057600080fd5b5033806000816100675760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615610097576100978161009f565b505050610148565b336001600160a01b038216036100f75760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161005e565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b611786806101576000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146101cb578063ee59d26c146101e9578063ef6e17a0146101fc578063f2fde38b1461020f57600080fd5b8063112895651461008d578063181f5a77146100a257806379ba5097146100ea5780638864b864146100f2575b600080fd5b6100a061009b3660046112e6565b610222565b005b604080518082018252601781527f4b657973746f6e65466f7277617264657220312e302e30000000000000000000602082015290516100e191906113f5565b60405180910390f35b6100a0610983565b6101a661010036600461140f565b6040805160609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208086019190915260348501939093527fffff000000000000000000000000000000000000000000000000000000000000919091166054840152805160368185030181526056909301815282519282019290922060009081526003909152205473ffffffffffffffffffffffffffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e1565b60005473ffffffffffffffffffffffffffffffffffffffff166101a6565b6100a06101f7366004611488565b610a80565b6100a061020a366004611506565b610de5565b6100a061021d366004611539565b610ee5565b60015474010000000000000000000000000000000000000000900460ff1615610277576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055606d8510156102f1576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008060006103388b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ef992505050565b6040805163ffffffff808616602083015284169181019190915293985096509093509150606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181528151602092830120600081815260029093529082205490945060ff16908190036103f8576040517f16c0791600000000000000000000000000000000000000000000000000000000815263ffffffff8085166004830152831660248201526044015b60405180910390fd5b86610404826001611583565b60ff161461045657610417816001611583565b6040517fd6022e8e00000000000000000000000000000000000000000000000000000000815260ff9091166004820152602481018890526044016103ef565b50506040805160608d901b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602080830191909152603482018790527fffff0000000000000000000000000000000000000000000000000000000000008616605483015282516036818403018152605690920190925280519101206000915060008181526003602052604090205490915073ffffffffffffffffffffffffffffffffffffffff1615610538576040517f1a20d3e6000000000000000000000000000000000000000000000000000000008152600481018290526024016103ef565b60008a8a60405161054a9291906115a2565b604051908190038120610563918b908b906020016115b2565b604051602081830303815290604052805190602001209050610583611173565b6000805b888110156107ea5760008060006105f58d8d868181106105a9576105a96115cc565b90506020028101906105bb91906115fb565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f9b92505050565b91945092509050600060018861060c84601b611583565b6040805160008152602081018083529390935260ff90911690820152606081018690526080810185905260a0016020604051602081039080840390855afa15801561065b573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015160008d81526002602081815284832073ffffffffffffffffffffffffffffffffffffffff851684529091019052918220549850925060ff88169003905061070f576040517fbf18af4300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016103ef565b61071a600187611660565b955060008760ff8816601f8110610733576107336115cc565b602002015173ffffffffffffffffffffffffffffffffffffffff161461079d576040517fe021c4f200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016103ef565b80878760ff16601f81106107b3576107b36115cc565b73ffffffffffffffffffffffffffffffffffffffff9092166020929092020152506107e392508391506116799050565b9050610587565b5050505060008b73ffffffffffffffffffffffffffffffffffffffff1663805f21328c8c602d90606d92610820939291906116b1565b8e8e606d908092610833939291906116b1565b6040518563ffffffff1660e01b81526004016108529493929190611724565b600060405180830381600087803b15801561086c57600080fd5b505af192505050801561087d575060015b15610886575060015b604080518082018252338152821515602080830191825260008681526003909152839020915182549151151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff9182161791909117909155905186918e16907fbe015fd2fd7c1a00158e111095c794ae7030eb413d2a0990e5b78d3114df1d499061094590851515815260200190565b60405180910390a35050600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16905550505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016103ef565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610a88610ffb565b8260ff16600003610ac5576040517f0743bae600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601f811115610b0a576040517f61750f4000000000000000000000000000000000000000000000000000000000815260048101829052601f60248201526044016103ef565b610b15836003611756565b60ff168111610b735780610b2a846003611756565b610b35906001611583565b6040517f9dd9e6d8000000000000000000000000000000000000000000000000000000008152600481019290925260ff1660248201526044016103ef565b6040805163ffffffff878116602080840191909152908716828401528251808303840181526060909201909252805191012060005b600082815260026020526040902060010154811015610c32576000828152600260205260408120600101805483908110610be457610be46115cc565b60009182526020808320909101548583526002808352604080852073ffffffffffffffffffffffffffffffffffffffff9093168552910190915281205550610c2b81611679565b9050610ba8565b506000818152600260205260409020610c4f906001018484611192565b5060005b82811015610d9f576000848483818110610c6f57610c6f6115cc565b9050602002016020810190610c849190611539565b600084815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff86168552909201905290205490915015610d08576040517fe021c4f200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016103ef565b610d13826001611583565b600084815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff909616808552868401835290842060ff959095169094559081526001938401805494850181558252902090910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055610d9881611679565b9050610c53565b50600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff949094169390931790925550505050565b610ded610ffb565b6040805163ffffffff848116602080840191909152908416828401528251808303840181526060909201909252805191012060005b600082815260026020526040902060010154811015610eac576000828152600260205260408120600101805483908110610e5e57610e5e6115cc565b60009182526020808320909101548583526002808352604080852073ffffffffffffffffffffffffffffffffffffffff9093168552910190915281205550610ea581611679565b9050610e22565b50600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555050565b610eed610ffb565b610ef68161107e565b50565b60008060008084600081518110610f1257610f126115cc565b60209101015160f81c600114610f735784600081518110610f3557610f356115cc565b01602001516040517f7207be2000000000000000000000000000000000000000000000000000000000815260f89190911c60048201526024016103ef565b50505050602181015160458201516049830151608b90930151919360e091821c9390911c9190565b60008060006041845114610fdd57836040517f2adfdc300000000000000000000000000000000000000000000000000000000081526004016103ef91906113f5565b50505060208101516040820151606090920151909260009190911a90565b60005473ffffffffffffffffffffffffffffffffffffffff16331461107c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016103ef565b565b3373ffffffffffffffffffffffffffffffffffffffff8216036110fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016103ef565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604051806103e00160405280601f906020820280368337509192915050565b82805482825590600052602060002090810192821561120a579160200282015b8281111561120a5781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8435161782556020909201916001909101906111b2565b5061121692915061121a565b5090565b5b80821115611216576000815560010161121b565b803573ffffffffffffffffffffffffffffffffffffffff8116811461125357600080fd5b919050565b60008083601f84011261126a57600080fd5b50813567ffffffffffffffff81111561128257600080fd5b60208301915083602082850101111561129a57600080fd5b9250929050565b60008083601f8401126112b357600080fd5b50813567ffffffffffffffff8111156112cb57600080fd5b6020830191508360208260051b850101111561129a57600080fd5b60008060008060008060006080888a03121561130157600080fd5b61130a8861122f565b9650602088013567ffffffffffffffff8082111561132757600080fd5b6113338b838c01611258565b909850965060408a013591508082111561134c57600080fd5b6113588b838c01611258565b909650945060608a013591508082111561137157600080fd5b5061137e8a828b016112a1565b989b979a50959850939692959293505050565b6000815180845260005b818110156113b75760208185018101518683018201520161139b565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006114086020830184611391565b9392505050565b60008060006060848603121561142457600080fd5b61142d8461122f565b92506020840135915060408401357fffff0000000000000000000000000000000000000000000000000000000000008116811461146957600080fd5b809150509250925092565b803563ffffffff8116811461125357600080fd5b6000806000806000608086880312156114a057600080fd5b6114a986611474565b94506114b760208701611474565b9350604086013560ff811681146114cd57600080fd5b9250606086013567ffffffffffffffff8111156114e957600080fd5b6114f5888289016112a1565b969995985093965092949392505050565b6000806040838503121561151957600080fd5b61152283611474565b915061153060208401611474565b90509250929050565b60006020828403121561154b57600080fd5b6114088261122f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff818116838216019081111561159c5761159c611554565b92915050565b8183823760009101908152919050565b838152818360208301376000910160200190815292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261163057600080fd5b83018035915067ffffffffffffffff82111561164b57600080fd5b60200191503681900382131561129a57600080fd5b60ff828116828216039081111561159c5761159c611554565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036116aa576116aa611554565b5060010190565b600080858511156116c157600080fd5b838611156116ce57600080fd5b5050820193919092039150565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6040815260006117386040830186886116db565b828103602084015261174b8185876116db565b979650505050505050565b60ff818116838216029081169081811461177257611772611554565b509291505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"DuplicateSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSigners\",\"type\":\"uint256\"}],\"name\":\"ExcessSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FaultToleranceMustBePositive\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSigners\",\"type\":\"uint256\"}],\"name\":\"InsufficientSigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"configId\",\"type\":\"uint64\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"received\",\"type\":\"uint256\"}],\"name\":\"InvalidSignatureCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"}],\"name\":\"ConfigSet\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes2\",\"name\":\"reportId\",\"type\":\"bytes2\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"name\":\"ReportProcessed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"}],\"name\":\"clearConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes2\",\"name\":\"reportId\",\"type\":\"bytes2\"}],\"name\":\"getTransmissionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes2\",\"name\":\"reportId\",\"type\":\"bytes2\"}],\"name\":\"getTransmissionState\",\"outputs\":[{\"internalType\":\"enumIRouter.TransmissionState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes2\",\"name\":\"reportId\",\"type\":\"bytes2\"}],\"name\":\"getTransmitter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"rawReport\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"reportContext\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"}],\"name\":\"setConfig\",\"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\":\"view\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162001b4a38038062001b4a833981016040819052620000349162000193565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050600280546001600160a01b0319166001600160a01b03939093169290921790915550620001c5565b336001600160a01b03821603620001425760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001a657600080fd5b81516001600160a01b0381168114620001be57600080fd5b9392505050565b61197580620001d56000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80638864b86411610081578063ee59d26c1161005b578063ee59d26c14610270578063ef6e17a014610283578063f2fde38b1461029657600080fd5b80638864b864146101fc5780638da5cb5b14610234578063b0f479a11461025257600080fd5b8063354bdd66116100b2578063354bdd661461013557806343c16467146101d457806379ba5097146101f457600080fd5b806311289565146100ce578063181f5a77146100e3575b600080fd5b6100e16100dc3660046112ec565b6102a9565b005b61011f6040518060400160405280601781526020017f4b657973746f6e65466f7277617264657220312e302e3000000000000000000081525081565b60405161012c9190611399565b60405180910390f35b6101c6610143366004611405565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b166020820152603481018390527fffff000000000000000000000000000000000000000000000000000000000000821660548201526000906056016040516020818303038152906040528051906020012090509392505050565b60405190815260200161012c565b6101e76101e2366004611405565b610891565b60405161012c919061146c565b6100e16109a6565b61020f61020a366004611405565b610aa3565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012c565b60005473ffffffffffffffffffffffffffffffffffffffff1661020f565b60025473ffffffffffffffffffffffffffffffffffffffff1661020f565b6100e161027e3660046114c6565b610bb0565b6100e1610291366004611544565b610f39565b6100e16102a4366004611577565b610fd9565b606d8510156102e4576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600061032889898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fed92505050565b67ffffffffffffffff8216600090815260036020526040812080549497509195509193509160ff169081900361039b576040517fdf3b81ea00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b856103a78260016115ca565b60ff16146103f9576103ba8160016115ca565b6040517fd6022e8e00000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101879052604401610392565b60008b8b60405161040b9291906115e9565b604051908190038120610424918c908c906020016115f9565b604051602081830303815290604052805190602001209050610444611180565b60005b888110156106cd573660008b8b8481811061046457610464611613565b90506020028101906104769190611642565b9092509050604181146104b95781816040517f2adfdc300000000000000000000000000000000000000000000000000000000081526004016103929291906116f0565b6000600186848460408181106104d1576104d1611613565b6104e392013560f81c9050601b6115ca565b6104f1602060008789611704565b6104fa9161172e565b61050860406020888a611704565b6105119161172e565b6040805160008152602081018083529590955260ff909316928401929092526060830152608082015260a0016020604051602081039080840390855afa15801561055f573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8116600090815260028c01602052918220549093509150819003610605576040517fbf18af4300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610392565b600086826020811061061957610619611613565b602002015173ffffffffffffffffffffffffffffffffffffffff1614610683576040517fe021c4f200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610392565b8186826020811061069657610696611613565b73ffffffffffffffffffffffffffffffffffffffff9092166020929092020152506106c6925083915061176a9050565b9050610447565b50506002546000945073ffffffffffffffffffffffffffffffffffffffff16925063233fd52d915061078090508c86866040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b166020820152603481018390527fffff000000000000000000000000000000000000000000000000000000000000821660548201526000906056016040516020818303038152906040528051906020012090509392505050565b338d8d8d602d90606d9261079693929190611704565b8f8f606d9080926107a993929190611704565b6040518863ffffffff1660e01b81526004016107cb97969594939291906117a2565b6020604051808303816000875af11580156107ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080e9190611803565b9050817dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916838b73ffffffffffffffffffffffffffffffffffffffff167f3617b009e9785c42daebadb6d3fb553243a4bf586d07ea72d65d80013ce116b58460405161087d911515815260200190565b60405180910390a450505050505050505050565b600254604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b16602080830191909152603482018690527fffff0000000000000000000000000000000000000000000000000000000000008516605483015282518083036036018152605683019384905280519101207f516db40800000000000000000000000000000000000000000000000000000000909252605a81019190915260009173ffffffffffffffffffffffffffffffffffffffff169063516db40890607a01602060405180830381865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e9190611825565b949350505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610392565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600254604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b16602080830191909152603482018690527fffff0000000000000000000000000000000000000000000000000000000000008516605483015282518083036036018152605683019384905280519101207fe6b7145800000000000000000000000000000000000000000000000000000000909252605a81019190915260009173ffffffffffffffffffffffffffffffffffffffff169063e6b7145890607a01602060405180830381865afa158015610b8c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e9190611846565b610bb8611008565b8260ff16600003610bf5576040517f0743bae600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601f811115610c3a576040517f61750f4000000000000000000000000000000000000000000000000000000000815260048101829052601f6024820152604401610392565b610c45836003611863565b60ff168111610ca35780610c5a846003611863565b610c659060016115ca565b6040517f9dd9e6d8000000000000000000000000000000000000000000000000000000008152600481019290925260ff166024820152604401610392565b67ffffffff00000000602086901b1663ffffffff85161760005b67ffffffffffffffff8216600090815260036020526040902060010154811015610d595767ffffffffffffffff821660009081526003602052604081206001810180546002909201929184908110610d1757610d17611613565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001812055610d528161176a565b9050610cbd565b5060005b82811015610e7b576000848483818110610d7957610d79611613565b9050602002016020810190610d8e9190611577565b67ffffffffffffffff8416600090815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845260020190915290205490915015610e1e576040517fe021c4f200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610392565b610e29826001611886565b67ffffffffffffffff8416600090815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff9095168352600290940190529190912055610e748161176a565b9050610d5d565b5067ffffffffffffffff81166000908152600360205260409020610ea390600101848461119f565b5067ffffffffffffffff81166000908152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff87161790555163ffffffff86811691908816907f4120bd3b23957dd423555817d55654d4481b438aa15485c21b4180c784f1a45590610f2990889088908890611899565b60405180910390a3505050505050565b610f41611008565b63ffffffff818116602084811b67ffffffff00000000168217600090815260038252604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690558051828152928301905291928516917f4120bd3b23957dd423555817d55654d4481b438aa15485c21b4180c784f1a45591604051610fcd929190611901565b60405180910390a35050565b610fe1611008565b610fea8161108b565b50565b60218101516045820151608b90920151909260c09290921c91565b60005473ffffffffffffffffffffffffffffffffffffffff163314611089576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610392565b565b3373ffffffffffffffffffffffffffffffffffffffff82160361110a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610392565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6040518061040001604052806020906020820280368337509192915050565b828054828255906000526020600020908101928215611217579160200282015b828111156112175781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8435161782556020909201916001909101906111bf565b50611223929150611227565b5090565b5b808211156112235760008155600101611228565b73ffffffffffffffffffffffffffffffffffffffff81168114610fea57600080fd5b60008083601f84011261127057600080fd5b50813567ffffffffffffffff81111561128857600080fd5b6020830191508360208285010111156112a057600080fd5b9250929050565b60008083601f8401126112b957600080fd5b50813567ffffffffffffffff8111156112d157600080fd5b6020830191508360208260051b85010111156112a057600080fd5b60008060008060008060006080888a03121561130757600080fd5b87356113128161123c565b9650602088013567ffffffffffffffff8082111561132f57600080fd5b61133b8b838c0161125e565b909850965060408a013591508082111561135457600080fd5b6113608b838c0161125e565b909650945060608a013591508082111561137957600080fd5b506113868a828b016112a7565b989b979a50959850939692959293505050565b600060208083528351808285015260005b818110156113c6578581018301518582016040015282016113aa565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008060006060848603121561141a57600080fd5b83356114258161123c565b92506020840135915060408401357fffff0000000000000000000000000000000000000000000000000000000000008116811461146157600080fd5b809150509250925092565b60208101600383106114a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b803563ffffffff811681146114c157600080fd5b919050565b6000806000806000608086880312156114de57600080fd5b6114e7866114ad565b94506114f5602087016114ad565b9350604086013560ff8116811461150b57600080fd5b9250606086013567ffffffffffffffff81111561152757600080fd5b611533888289016112a7565b969995985093965092949392505050565b6000806040838503121561155757600080fd5b611560836114ad565b915061156e602084016114ad565b90509250929050565b60006020828403121561158957600080fd5b81356115948161123c565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff81811683821601908111156115e3576115e361159b565b92915050565b8183823760009101908152919050565b838152818360208301376000910160200190815292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261167757600080fd5b83018035915067ffffffffffffffff82111561169257600080fd5b6020019150368190038213156112a057600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600061099e6020830184866116a7565b6000808585111561171457600080fd5b8386111561172157600080fd5b5050820193919092039150565b803560208310156115e3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361179b5761179b61159b565b5060010190565b878152600073ffffffffffffffffffffffffffffffffffffffff808916602084015280881660408401525060a060608301526117e260a0830186886116a7565b82810360808401526117f58185876116a7565b9a9950505050505050505050565b60006020828403121561181557600080fd5b8151801515811461159457600080fd5b60006020828403121561183757600080fd5b81516003811061159457600080fd5b60006020828403121561185857600080fd5b81516115948161123c565b60ff818116838216029081169081811461187f5761187f61159b565b5092915050565b808201808211156115e3576115e361159b565b60ff8416815260406020808301829052908201839052600090849060608401835b868110156118f55783356118cd8161123c565b73ffffffffffffffffffffffffffffffffffffffff16825292820192908201906001016118ba565b50979650505050505050565b60006040820160ff851683526020604081850152818551808452606086019150828701935060005b8181101561195b57845173ffffffffffffffffffffffffffffffffffffffff1683529383019391830191600101611929565b509097965050505050505056fea164736f6c6343000813000a", } var KeystoneForwarderABI = KeystoneForwarderMetaData.ABI var KeystoneForwarderBin = KeystoneForwarderMetaData.Bin -func DeployKeystoneForwarder(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KeystoneForwarder, error) { +func DeployKeystoneForwarder(auth *bind.TransactOpts, backend bind.ContractBackend, router common.Address) (common.Address, *types.Transaction, *KeystoneForwarder, error) { parsed, err := KeystoneForwarderMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -48,7 +48,7 @@ func DeployKeystoneForwarder(auth *bind.TransactOpts, backend bind.ContractBacke return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeystoneForwarderBin), backend) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeystoneForwarderBin), backend, router) if err != nil { return common.Address{}, nil, nil, err } @@ -171,6 +171,72 @@ func (_KeystoneForwarder *KeystoneForwarderTransactorRaw) Transact(opts *bind.Tr return _KeystoneForwarder.Contract.contract.Transact(opts, method, params...) } +func (_KeystoneForwarder *KeystoneForwarderCaller) GetRouter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _KeystoneForwarder.contract.Call(opts, &out, "getRouter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_KeystoneForwarder *KeystoneForwarderSession) GetRouter() (common.Address, error) { + return _KeystoneForwarder.Contract.GetRouter(&_KeystoneForwarder.CallOpts) +} + +func (_KeystoneForwarder *KeystoneForwarderCallerSession) GetRouter() (common.Address, error) { + return _KeystoneForwarder.Contract.GetRouter(&_KeystoneForwarder.CallOpts) +} + +func (_KeystoneForwarder *KeystoneForwarderCaller) GetTransmissionId(opts *bind.CallOpts, receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) ([32]byte, error) { + var out []interface{} + err := _KeystoneForwarder.contract.Call(opts, &out, "getTransmissionId", receiver, workflowExecutionId, reportId) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_KeystoneForwarder *KeystoneForwarderSession) GetTransmissionId(receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) ([32]byte, error) { + return _KeystoneForwarder.Contract.GetTransmissionId(&_KeystoneForwarder.CallOpts, receiver, workflowExecutionId, reportId) +} + +func (_KeystoneForwarder *KeystoneForwarderCallerSession) GetTransmissionId(receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) ([32]byte, error) { + return _KeystoneForwarder.Contract.GetTransmissionId(&_KeystoneForwarder.CallOpts, receiver, workflowExecutionId, reportId) +} + +func (_KeystoneForwarder *KeystoneForwarderCaller) GetTransmissionState(opts *bind.CallOpts, receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) (uint8, error) { + var out []interface{} + err := _KeystoneForwarder.contract.Call(opts, &out, "getTransmissionState", receiver, workflowExecutionId, reportId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_KeystoneForwarder *KeystoneForwarderSession) GetTransmissionState(receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) (uint8, error) { + return _KeystoneForwarder.Contract.GetTransmissionState(&_KeystoneForwarder.CallOpts, receiver, workflowExecutionId, reportId) +} + +func (_KeystoneForwarder *KeystoneForwarderCallerSession) GetTransmissionState(receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) (uint8, error) { + return _KeystoneForwarder.Contract.GetTransmissionState(&_KeystoneForwarder.CallOpts, receiver, workflowExecutionId, reportId) +} + func (_KeystoneForwarder *KeystoneForwarderCaller) GetTransmitter(opts *bind.CallOpts, receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) (common.Address, error) { var out []interface{} err := _KeystoneForwarder.contract.Call(opts, &out, "getTransmitter", receiver, workflowExecutionId, reportId) @@ -261,16 +327,16 @@ func (_KeystoneForwarder *KeystoneForwarderTransactorSession) ClearConfig(donId return _KeystoneForwarder.Contract.ClearConfig(&_KeystoneForwarder.TransactOpts, donId, configVersion) } -func (_KeystoneForwarder *KeystoneForwarderTransactor) Report(opts *bind.TransactOpts, receiverAddress common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) { - return _KeystoneForwarder.contract.Transact(opts, "report", receiverAddress, rawReport, reportContext, signatures) +func (_KeystoneForwarder *KeystoneForwarderTransactor) Report(opts *bind.TransactOpts, receiver common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) { + return _KeystoneForwarder.contract.Transact(opts, "report", receiver, rawReport, reportContext, signatures) } -func (_KeystoneForwarder *KeystoneForwarderSession) Report(receiverAddress common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) { - return _KeystoneForwarder.Contract.Report(&_KeystoneForwarder.TransactOpts, receiverAddress, rawReport, reportContext, signatures) +func (_KeystoneForwarder *KeystoneForwarderSession) Report(receiver common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) { + return _KeystoneForwarder.Contract.Report(&_KeystoneForwarder.TransactOpts, receiver, rawReport, reportContext, signatures) } -func (_KeystoneForwarder *KeystoneForwarderTransactorSession) Report(receiverAddress common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) { - return _KeystoneForwarder.Contract.Report(&_KeystoneForwarder.TransactOpts, receiverAddress, rawReport, reportContext, signatures) +func (_KeystoneForwarder *KeystoneForwarderTransactorSession) Report(receiver common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) { + return _KeystoneForwarder.Contract.Report(&_KeystoneForwarder.TransactOpts, receiver, rawReport, reportContext, signatures) } func (_KeystoneForwarder *KeystoneForwarderTransactor) SetConfig(opts *bind.TransactOpts, donId uint32, configVersion uint32, f uint8, signers []common.Address) (*types.Transaction, error) { @@ -297,6 +363,144 @@ func (_KeystoneForwarder *KeystoneForwarderTransactorSession) TransferOwnership( return _KeystoneForwarder.Contract.TransferOwnership(&_KeystoneForwarder.TransactOpts, to) } +type KeystoneForwarderConfigSetIterator struct { + Event *KeystoneForwarderConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeystoneForwarderConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeystoneForwarderConfigSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(KeystoneForwarderConfigSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *KeystoneForwarderConfigSetIterator) Error() error { + return it.fail +} + +func (it *KeystoneForwarderConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeystoneForwarderConfigSet struct { + DonId uint32 + ConfigVersion uint32 + F uint8 + Signers []common.Address + Raw types.Log +} + +func (_KeystoneForwarder *KeystoneForwarderFilterer) FilterConfigSet(opts *bind.FilterOpts, donId []uint32, configVersion []uint32) (*KeystoneForwarderConfigSetIterator, error) { + + var donIdRule []interface{} + for _, donIdItem := range donId { + donIdRule = append(donIdRule, donIdItem) + } + var configVersionRule []interface{} + for _, configVersionItem := range configVersion { + configVersionRule = append(configVersionRule, configVersionItem) + } + + logs, sub, err := _KeystoneForwarder.contract.FilterLogs(opts, "ConfigSet", donIdRule, configVersionRule) + if err != nil { + return nil, err + } + return &KeystoneForwarderConfigSetIterator{contract: _KeystoneForwarder.contract, event: "ConfigSet", logs: logs, sub: sub}, nil +} + +func (_KeystoneForwarder *KeystoneForwarderFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *KeystoneForwarderConfigSet, donId []uint32, configVersion []uint32) (event.Subscription, error) { + + var donIdRule []interface{} + for _, donIdItem := range donId { + donIdRule = append(donIdRule, donIdItem) + } + var configVersionRule []interface{} + for _, configVersionItem := range configVersion { + configVersionRule = append(configVersionRule, configVersionItem) + } + + logs, sub, err := _KeystoneForwarder.contract.WatchLogs(opts, "ConfigSet", donIdRule, configVersionRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeystoneForwarderConfigSet) + if err := _KeystoneForwarder.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_KeystoneForwarder *KeystoneForwarderFilterer) ParseConfigSet(log types.Log) (*KeystoneForwarderConfigSet, error) { + event := new(KeystoneForwarderConfigSet) + if err := _KeystoneForwarder.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type KeystoneForwarderOwnershipTransferRequestedIterator struct { Event *KeystoneForwarderOwnershipTransferRequested @@ -632,11 +836,12 @@ func (it *KeystoneForwarderReportProcessedIterator) Close() error { type KeystoneForwarderReportProcessed struct { Receiver common.Address WorkflowExecutionId [32]byte + ReportId [2]byte Result bool Raw types.Log } -func (_KeystoneForwarder *KeystoneForwarderFilterer) FilterReportProcessed(opts *bind.FilterOpts, receiver []common.Address, workflowExecutionId [][32]byte) (*KeystoneForwarderReportProcessedIterator, error) { +func (_KeystoneForwarder *KeystoneForwarderFilterer) FilterReportProcessed(opts *bind.FilterOpts, receiver []common.Address, workflowExecutionId [][32]byte, reportId [][2]byte) (*KeystoneForwarderReportProcessedIterator, error) { var receiverRule []interface{} for _, receiverItem := range receiver { @@ -646,15 +851,19 @@ func (_KeystoneForwarder *KeystoneForwarderFilterer) FilterReportProcessed(opts for _, workflowExecutionIdItem := range workflowExecutionId { workflowExecutionIdRule = append(workflowExecutionIdRule, workflowExecutionIdItem) } + var reportIdRule []interface{} + for _, reportIdItem := range reportId { + reportIdRule = append(reportIdRule, reportIdItem) + } - logs, sub, err := _KeystoneForwarder.contract.FilterLogs(opts, "ReportProcessed", receiverRule, workflowExecutionIdRule) + logs, sub, err := _KeystoneForwarder.contract.FilterLogs(opts, "ReportProcessed", receiverRule, workflowExecutionIdRule, reportIdRule) if err != nil { return nil, err } return &KeystoneForwarderReportProcessedIterator{contract: _KeystoneForwarder.contract, event: "ReportProcessed", logs: logs, sub: sub}, nil } -func (_KeystoneForwarder *KeystoneForwarderFilterer) WatchReportProcessed(opts *bind.WatchOpts, sink chan<- *KeystoneForwarderReportProcessed, receiver []common.Address, workflowExecutionId [][32]byte) (event.Subscription, error) { +func (_KeystoneForwarder *KeystoneForwarderFilterer) WatchReportProcessed(opts *bind.WatchOpts, sink chan<- *KeystoneForwarderReportProcessed, receiver []common.Address, workflowExecutionId [][32]byte, reportId [][2]byte) (event.Subscription, error) { var receiverRule []interface{} for _, receiverItem := range receiver { @@ -664,8 +873,12 @@ func (_KeystoneForwarder *KeystoneForwarderFilterer) WatchReportProcessed(opts * for _, workflowExecutionIdItem := range workflowExecutionId { workflowExecutionIdRule = append(workflowExecutionIdRule, workflowExecutionIdItem) } + var reportIdRule []interface{} + for _, reportIdItem := range reportId { + reportIdRule = append(reportIdRule, reportIdItem) + } - logs, sub, err := _KeystoneForwarder.contract.WatchLogs(opts, "ReportProcessed", receiverRule, workflowExecutionIdRule) + logs, sub, err := _KeystoneForwarder.contract.WatchLogs(opts, "ReportProcessed", receiverRule, workflowExecutionIdRule, reportIdRule) if err != nil { return nil, err } @@ -708,6 +921,8 @@ func (_KeystoneForwarder *KeystoneForwarderFilterer) ParseReportProcessed(log ty func (_KeystoneForwarder *KeystoneForwarder) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { + case _KeystoneForwarder.abi.Events["ConfigSet"].ID: + return _KeystoneForwarder.ParseConfigSet(log) case _KeystoneForwarder.abi.Events["OwnershipTransferRequested"].ID: return _KeystoneForwarder.ParseOwnershipTransferRequested(log) case _KeystoneForwarder.abi.Events["OwnershipTransferred"].ID: @@ -720,6 +935,10 @@ func (_KeystoneForwarder *KeystoneForwarder) ParseLog(log types.Log) (generated. } } +func (KeystoneForwarderConfigSet) Topic() common.Hash { + return common.HexToHash("0x4120bd3b23957dd423555817d55654d4481b438aa15485c21b4180c784f1a455") +} + func (KeystoneForwarderOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } @@ -729,7 +948,7 @@ func (KeystoneForwarderOwnershipTransferred) Topic() common.Hash { } func (KeystoneForwarderReportProcessed) Topic() common.Hash { - return common.HexToHash("0xbe015fd2fd7c1a00158e111095c794ae7030eb413d2a0990e5b78d3114df1d49") + return common.HexToHash("0x3617b009e9785c42daebadb6d3fb553243a4bf586d07ea72d65d80013ce116b5") } func (_KeystoneForwarder *KeystoneForwarder) Address() common.Address { @@ -737,6 +956,12 @@ func (_KeystoneForwarder *KeystoneForwarder) Address() common.Address { } type KeystoneForwarderInterface interface { + GetRouter(opts *bind.CallOpts) (common.Address, error) + + GetTransmissionId(opts *bind.CallOpts, receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) ([32]byte, error) + + GetTransmissionState(opts *bind.CallOpts, receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) (uint8, error) + GetTransmitter(opts *bind.CallOpts, receiver common.Address, workflowExecutionId [32]byte, reportId [2]byte) (common.Address, error) Owner(opts *bind.CallOpts) (common.Address, error) @@ -747,12 +972,18 @@ type KeystoneForwarderInterface interface { ClearConfig(opts *bind.TransactOpts, donId uint32, configVersion uint32) (*types.Transaction, error) - Report(opts *bind.TransactOpts, receiverAddress common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) + Report(opts *bind.TransactOpts, receiver common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) SetConfig(opts *bind.TransactOpts, donId uint32, configVersion uint32, f uint8, signers []common.Address) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + FilterConfigSet(opts *bind.FilterOpts, donId []uint32, configVersion []uint32) (*KeystoneForwarderConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *KeystoneForwarderConfigSet, donId []uint32, configVersion []uint32) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*KeystoneForwarderConfigSet, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeystoneForwarderOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeystoneForwarderOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) @@ -765,9 +996,9 @@ type KeystoneForwarderInterface interface { ParseOwnershipTransferred(log types.Log) (*KeystoneForwarderOwnershipTransferred, error) - FilterReportProcessed(opts *bind.FilterOpts, receiver []common.Address, workflowExecutionId [][32]byte) (*KeystoneForwarderReportProcessedIterator, error) + FilterReportProcessed(opts *bind.FilterOpts, receiver []common.Address, workflowExecutionId [][32]byte, reportId [][2]byte) (*KeystoneForwarderReportProcessedIterator, error) - WatchReportProcessed(opts *bind.WatchOpts, sink chan<- *KeystoneForwarderReportProcessed, receiver []common.Address, workflowExecutionId [][32]byte) (event.Subscription, error) + WatchReportProcessed(opts *bind.WatchOpts, sink chan<- *KeystoneForwarderReportProcessed, receiver []common.Address, workflowExecutionId [][32]byte, reportId [][2]byte) (event.Subscription, error) ParseReportProcessed(log types.Log) (*KeystoneForwarderReportProcessed, error) 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 b4796e04234..f68d29f8009 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 @@ -46,7 +46,7 @@ type CapabilityRegistryCapabilityConfiguration struct { type CapabilityRegistryDONInfo struct { Id uint32 ConfigCount uint32 - F uint32 + F uint8 IsPublic bool AcceptsWorkflows bool NodeP2PIds [][32]byte @@ -66,8 +66,8 @@ type CapabilityRegistryNodeOperator struct { } var CapabilityRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"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\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"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\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"\",\"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\":\"nodeInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint32[]\",\"name\":\"configCounts\",\"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: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b614e6f80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635d83d967116100ee57806386fa4246116100975780639cb7c5f4116100715780639cb7c5f4146103ea578063ddbe4f821461040a578063e29581aa14610420578063f2fde38b1461043657600080fd5b806386fa42461461039c5780638da5cb5b146103af57806395864d1f146103d757600080fd5b8063715f5295116100c8578063715f52951461036e57806373ac22b41461038157806379ba50971461039457600080fd5b80635d83d967146103335780635e65e3091461034657806366acaa331461035957600080fd5b806322bdbcbc1161015b5780632c01a1e8116101355780632c01a1e8146102cb578063398f3773146102de5780633f2a13c9146102f157806350c946fe1461031257600080fd5b806322bdbcbc146102785780632353740514610298578063275459f2146102b857600080fd5b8063193ec0061161018c578063193ec0061461023b5780631d05394c14610250578063214502431461026357600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613c70565b610449565b6040519081526020015b60405180910390f35b6101ec6101e7366004613cd4565b61047d565b60405190151581526020016101d0565b604080518082018252601881527f4361706162696c697479526567697374727920312e302e300000000000000000602082015290516101d09190613d5b565b61024e610249366004613dda565b61048a565b005b61024e61025e366004613e7f565b610554565b61026b610710565b6040516101d09190613fe9565b61028b610286366004614069565b610875565b6040516101d091906140c1565b6102ab6102a6366004614069565b610962565b6040516101d091906140d4565b61024e6102c6366004613e7f565b6109a6565b61024e6102d9366004613e7f565b610a7d565b61024e6102ec366004613e7f565b610ca0565b6103046102ff3660046140e7565b610e68565b6040516101d0929190614111565b610325610320366004613cd4565b611054565b6040516101d0929190614178565b61024e610341366004613e7f565b6110f9565b61024e610354366004613e7f565b611247565b6103616116b9565b6040516101d091906141a0565b61024e61037c366004613e7f565b6118a4565b61024e61038f366004613e7f565b61195f565b61024e611e04565b61024e6103aa366004614213565b611f01565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b61024e6103e536600461427f565b612247565b6103fd6103f8366004613cd4565b612313565b6040516101d091906143f0565b610412612518565b6040516101d0929190614403565b610428612883565b6040516101d0929190614493565b61024e610444366004614576565b6129f2565b6000828260405160200161045e929190614111565b6040516020818303038152906040528051906020012090505b92915050565b6000610477600583612a06565b610492612a21565b600e805460009164010000000090910463ffffffff169060046104b4836145c0565b82546101009290920a63ffffffff8181021990931691831602179091558181166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a081018352928352600190830152871515908201528515156060820152908416608082015290915061054a908990899089908990612aa4565b5050505050505050565b61055c612a21565b60005b8181101561070b57600083838381811061057b5761057b6145e3565b90506020020160208101906105909190614069565b63ffffffff8082166000908152600d60209081526040808320805464010000000090049094168084526001850190925282209394509192905b6105d282613154565b81101561062a576106198563ffffffff16600c60006105fa858761315e90919063ffffffff16565b815260200190815260200160002060040161316a90919063ffffffff16565b5061062381614612565b90506105c9565b508254640100000000900463ffffffff16600003610681576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff851660048201526024015b60405180910390fd5b63ffffffff84166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffff00000000000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a1505050508061070490614612565b905061055f565b505050565b600e54606090640100000000900463ffffffff16600061073160018361464a565b63ffffffff1667ffffffffffffffff81111561074f5761074f613b0a565b6040519080825280602002602001820160405280156107d657816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161076d5790505b509050600060015b8363ffffffff168163ffffffff1610156108525763ffffffff8082166000908152600d602052604090205416156108425761081881613176565b83838151811061082a5761082a6145e3565b60200260200101819052508161083f90614612565b91505b61084b816145c0565b90506107de565b5061085e60018461464a565b63ffffffff16811461086e578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916108d990614667565b80601f016020809104026020016040519081016040528092919081815260200182805461090590614667565b80156109525780601f1061092757610100808354040283529160200191610952565b820191906000526020600020905b81548152906001019060200180831161093557829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047782613176565b6109ae612a21565b60005b63ffffffff811682111561070b57600083838363ffffffff168181106109d9576109d96145e3565b90506020020160208101906109ee9190614069565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155919250610a396001830182613a9d565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a76816145c0565b90506109b1565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610c9a576000848483818110610ab757610ab76145e3565b602090810292909201356000818152600c90935260409092206001810154929350919050610b14576040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260048101839052602401610678565b6000610b2282600401613154565b1115610b5d576040517f34a4a3f600000000000000000000000000000000000000000000000000000000815260048101839052602401610678565b83158015610b975750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bd0576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610678565b6001810154610be19060079061316a565b506002810154610bf39060099061316a565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016815560018101829055600281018290559060048201818181610c488282613ad7565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c7f91815260200190565b60405180910390a1505080610c9390614612565b9050610a9b565b50505050565b610ca8612a21565b60005b8181101561070b576000838383818110610cc757610cc76145e3565b9050602002810190610cd991906146ba565b610ce2906146f8565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d33576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610dbf90826147b0565b5050600e8054909150600090610dda9063ffffffff166145c0565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e4d9190613d5b565b60405180910390a3505080610e6190614612565b9050610cab565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610eba90614667565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee690614667565b8015610f335780601f10610f0857610100808354040283529160200191610f33565b820191906000526020600020905b815481529060010190602001808311610f1657829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611046905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa158015610ffd573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261104391908101906148ca565b90505b9093509150505b9250929050565b6040805160808101825260008082526020820181905291810191909152606080820152604080516080810182526000848152600c6020908152838220805463ffffffff8082168652600183015484870152600283015486880152640100000000909104168352600301905291822060608201906110d090613452565b90526000938452600c602052604090932054929364010000000090930463ffffffff1692915050565b611101612a21565b60005b8181101561070b576000838383818110611120576111206145e3565b90506020020135905061113d816003612a0690919063ffffffff16565b611176576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610678565b61118160058261345f565b6111ba576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610678565b6000818152600260205260408120906111d38282613a9d565b6111e1600183016000613a9d565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a25061124081614612565b9050611104565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610c9a576000848483818110611281576112816145e3565b90506020028101906112939190614938565b61129c9061496c565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001810180549596509394919390928401916112f290614667565b80601f016020809104026020016040519081016040528092919081815260200182805461131e90614667565b801561136b5780601f106113405761010080835404028352916020019161136b565b820191906000526020600020905b81548152906001019060200180831161134e57829003601f168201915b50505050508152505090508315801561139b5750805173ffffffffffffffffffffffffffffffffffffffff163314155b156113d4576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610678565b6040808301516000908152600c6020522060018101546114285782604001516040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260040161067891815260200190565b60208301511580611458575082602001518160010154141580156114585750602083015161145890600790612a06565b1561148f576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606083015180516000036114d157806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106789190614a3f565b8154640100000000900463ffffffff168260046114ed836145c0565b82546101009290920a63ffffffff8181021990931691831602179091558354640100000000900416905060005b82518110156115e557611550838281518110611538576115386145e3565b60200260200101516003612a0690919063ffffffff16565b61158857826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106789190614a3f565b6115d483828151811061159d5761159d6145e3565b60200260200101518560030160008563ffffffff1663ffffffff16815260200190815260200160002061345f90919063ffffffff16565b506115de81614612565b905061151a565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff909116178355604085015160028401556001830154602086015181146116575761163c60078261316a565b506020860151600185018190556116559060079061345f565b505b85516040808801516020808a015183519283529082015263ffffffff909216917f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a2505050505050806116b290614612565b9050611265565b600e5460609063ffffffff1660006116d260018361464a565b63ffffffff1667ffffffffffffffff8111156116f0576116f0613b0a565b60405190808252806020026020018201604052801561173657816020015b60408051808201909152600081526060602082015281526020019060019003908161170e5790505b509050600060015b8363ffffffff168163ffffffff16101561188e5763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff161561187e5763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916117d290614667565b80601f01602080910402602001604051908101604052809291908181526020018280546117fe90614667565b801561184b5780601f106118205761010080835404028352916020019161184b565b820191906000526020600020905b81548152906001019060200180831161182e57829003601f168201915b505050505081525050838381518110611866576118666145e3565b60200260200101819052508161187b90614612565b91505b611887816145c0565b905061173e565b50600e5461085e9060019063ffffffff1661464a565b6118ac612a21565b60005b8181101561070b5760008383838181106118cb576118cb6145e3565b90506020028101906118dd9190614a52565b6118e690614a95565b905060006118fc82600001518360200151610449565b905061190960038261345f565b611942576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610678565b61194c818361346b565b50508061195890614612565b90506118af565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610c9a576000848483818110611999576119996145e3565b90506020028101906119ab9190614938565b6119b49061496c565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611a0a90614667565b80601f0160208091040260200160405190810160405280929190818152602001828054611a3690614667565b8015611a835780601f10611a5857610100808354040283529160200191611a83565b820191906000526020600020905b815481529060010190602001808311611a6657829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611ae95781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610678565b83158015611b0e5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611b47576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610678565b6040808301516000908152600c60205220600181015415611b9c5782604001516040517f5461848300000000000000000000000000000000000000000000000000000000815260040161067891815260200190565b6040830151611bdf5782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161067891815260200190565b60208301511580611bfc57506020830151611bfc90600790612a06565b15611c33576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611c7557806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106789190614a3f565b81548290600490611c9390640100000000900463ffffffff166145c0565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611d3a57611cdc838281518110611538576115386145e3565b611d1457826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106789190614a3f565b611d2983828151811061159d5761159d6145e3565b50611d3381614612565b9050611cbe565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611d90916007919061345f16565b506040850151611da29060099061345f565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611dfd90614612565b905061197d565b60015473ffffffffffffffffffffffffffffffffffffffff163314611e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610678565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611f44576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610678565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b8481101561223f576000868683818110611f7c57611f7c6145e3565b9050602002016020810190611f919190614069565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16612000576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610678565b6000868685818110612014576120146145e3565b905060200281019061202691906146ba565b61202f906146f8565b805190915073ffffffffffffffffffffffffffffffffffffffff16612080576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff1633148015906120bd57503373ffffffffffffffffffffffffffffffffffffffff861614155b156120f6576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610678565b8051825473ffffffffffffffffffffffffffffffffffffffff9081169116141580612172575060208082015160405161212f9201613d5b565b60405160208183030381529060405280519060200120826001016040516020016121599190614b3b565b6040516020818303038152906040528051906020012014155b1561222b57805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906121cc90826147b0565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516122229190613d5b565b60405180910390a35b5050508061223890614612565b9050611f60565b505050505050565b61224f612a21565b63ffffffff8089166000908152600d60205260408120546401000000009004909116908190036122b3576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610678565b612308888888886040518060a001604052808f63ffffffff168152602001876122db906145c0565b97508763ffffffff1681526020018a1515815260200189151581526020018863ffffffff16815250612aa4565b505050505050505050565b6123436040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a0810190925280548290829061236b90614667565b80601f016020809104026020016040519081016040528092919081815260200182805461239790614667565b80156123e45780601f106123b9576101008083540402835291602001916123e4565b820191906000526020600020905b8154815290600101906020018083116123c757829003601f168201915b505050505081526020016001820180546123fd90614667565b80601f016020809104026020016040519081016040528092919081815260200182805461242990614667565b80156124765780601f1061244b57610100808354040283529160200191612476565b820191906000526020600020905b81548152906001019060200180831161245957829003601f168201915b5050509183525050600282015460209091019060ff16600381111561249d5761249d614334565b60038111156124ae576124ae614334565b81526020016002820160019054906101000a900460ff1660018111156124d6576124d6614334565b60018111156124e7576124e7614334565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b60608060006125276003613452565b905060006125356005613154565b82516125419190614be4565b905060008167ffffffffffffffff81111561255e5761255e613b0a565b6040519080825280602002602001820160405280156125bf57816020015b6125ac6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b81526020019060019003908161257c5790505b50905060008267ffffffffffffffff8111156125dd576125dd613b0a565b604051908082528060200260200182016040528015612606578160200160208202803683370190505b5090506000805b855181101561287557600086828151811061262a5761262a6145e3565b60200260200101519050612648816005612a0690919063ffffffff16565b6128645760008181526002602052604090819020815160a0810190925280548290829061267490614667565b80601f01602080910402602001604051908101604052809291908181526020018280546126a090614667565b80156126ed5780601f106126c2576101008083540402835291602001916126ed565b820191906000526020600020905b8154815290600101906020018083116126d057829003601f168201915b5050505050815260200160018201805461270690614667565b80601f016020809104026020016040519081016040528092919081815260200182805461273290614667565b801561277f5780601f106127545761010080835404028352916020019161277f565b820191906000526020600020905b81548152906001019060200180831161276257829003601f168201915b5050509183525050600282015460209091019060ff1660038111156127a6576127a6614334565b60038111156127b7576127b7614334565b81526020016002820160019054906101000a900460ff1660018111156127df576127df614334565b60018111156127f0576127f0614334565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff16602090910152855186908590811061282f5761282f6145e3565b60200260200101819052508084848151811061284d5761284d6145e3565b602090810291909101015261286183614612565b92505b5061286e81614612565b905061260d565b509096919550909350505050565b60608060006128926009613452565b9050805167ffffffffffffffff8111156128ae576128ae613b0a565b60405190808252806020026020018201604052801561291d57816020015b60408051608081018252600080825260208083018290529282015260608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816128cc5790505b509250805167ffffffffffffffff81111561293a5761293a613b0a565b604051908082528060200260200182016040528015612963578160200160208202803683370190505b50915060005b81518110156129ec57612994828281518110612987576129876145e3565b6020026020010151611054565b8583815181106129a6576129a66145e3565b602002602001018584815181106129bf576129bf6145e3565b602002602001018263ffffffff1663ffffffff168152508290525050806129e590614612565b9050612969565b50509091565b6129fa612a21565b612a03816136ff565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612aa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610678565b565b805163ffffffff9081166000908152600d602090815260408083208286015185168452600101909152902060808301519091161580612af8575060808201518590612af0906001614bf7565b63ffffffff16115b15612b445760808201516040517fd5f5269100000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101869052604401610678565b6001826020015163ffffffff161115612bf057815163ffffffff166000908152600d602090815260408220908401516001918201918391612b85919061464a565b63ffffffff1663ffffffff168152602001908152602001600020905060005b612bad82613154565b811015612bed57612bdc846000015163ffffffff16600c60006105fa858760000161315e90919063ffffffff16565b50612be681614612565b9050612ba4565b50505b60005b85811015612cda57612c20878783818110612c1057612c106145e3565b859260209091020135905061345f565b612c81578251878783818110612c3857612c386145e3565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610678565b8251612cc99063ffffffff16600c60008a8a86818110612ca357612ca36145e3565b90506020020135815260200190815260200160002060040161345f90919063ffffffff16565b50612cd381614612565b9050612bf3565b5060005b83811015612fc65736858583818110612cf957612cf96145e3565b9050602002810190612d0b91906146ba565b9050612d1960038235612a06565b612d52576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610678565b612d5e60058235612a06565b15612d98576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610678565b8035600090815260038401602052604081208054612db590614667565b90501115612e015783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610678565b60005b87811015612f1357612ea88235600c60008c8c86818110612e2757612e276145e3565b9050602002013581526020019081526020016000206003016000600c60008e8e88818110612e5757612e576145e3565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612a0690919063ffffffff16565b612f0357888882818110612ebe57612ebe6145e3565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610678565b612f0c81614612565b9050612e04565b5060028301805460018101825560009182526020918290208335910155612f3c90820182614c14565b82356000908152600386016020526040902091612f5a919083614c79565b508351602080860151612fb592918435908c908c90612f7b90880188614c14565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506137f492505050565b50612fbf81614612565b9050612cde565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156c01000000000000000000000000027fffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffff90951694909417909355606086015186518316825284822080549115156d0100000000000000000000000000027fffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffff9092169190911790556080860151865183168252848220805491841668010000000000000000027fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c158170365192613144929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b6000610477825490565b6000612a1a83836138d5565b6000612a1a83836138ff565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d825284832080546401000000009004909116808452600190910182528483206002810180548751818602810186019098528088529596929591949390919083018282801561322757602002820191906000526020600020905b815481526020019060010190808311613213575b505050505090506000815167ffffffffffffffff81111561324a5761324a613b0a565b60405190808252806020026020018201604052801561329057816020015b6040805180820190915260008152606060208201528152602001906001900390816132685790505b50905060005b81518110156133b15760405180604001604052808483815181106132bc576132bc6145e3565b602002602001015181526020018560030160008685815181106132e1576132e16145e3565b60200260200101518152602001908152602001600020805461330290614667565b80601f016020809104026020016040519081016040528092919081815260200182805461332e90614667565b801561337b5780601f106133505761010080835404028352916020019161337b565b820191906000526020600020905b81548152906001019060200180831161335e57829003601f168201915b5050505050815250828281518110613395576133956145e3565b6020026020010181905250806133aa90614612565b9050613296565b506040805160e08101825263ffffffff8089166000818152600d60208181528683205480861687528b8616828801526801000000000000000081049095169686019690965260ff6c010000000000000000000000008504811615156060870152929091529093526d010000000000000000000000000090049091161515608082015260a0810161344085613452565b81526020019190915295945050505050565b60606000612a1a836139f2565b6000612a1a8383613a4e565b608081015173ffffffffffffffffffffffffffffffffffffffff16156135b957608081015173ffffffffffffffffffffffffffffffffffffffff163b1580613564575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa15801561353e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135629190614d94565b155b156135b95760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610678565b6000828152600260205260409020815182919081906135d890826147b0565b50602082015160018201906135ed90826147b0565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561362f5761362f614334565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010083600181111561367657613676614334565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b3373ffffffffffffffffffffffffffffffffffffffff82160361377e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610678565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff161561223f57600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c9061389b908690869086908b908d90600401614db1565b600060405180830381600087803b1580156138b557600080fd5b505af11580156138c9573d6000803e3d6000fd5b50505050505050505050565b60008260000182815481106138ec576138ec6145e3565b9060005260206000200154905092915050565b600081815260018301602052604081205480156139e8576000613923600183614be4565b855490915060009061393790600190614be4565b905081811461399c576000866000018281548110613957576139576145e3565b906000526020600020015490508087600001848154811061397a5761397a6145e3565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806139ad576139ad614e33565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610477565b6000915050610477565b606081600001805480602002602001604051908101604052809291908181526020018280548015613a4257602002820191906000526020600020905b815481526020019060010190808311613a2e575b50505050509050919050565b6000818152600183016020526040812054613a9557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610477565b506000610477565b508054613aa990614667565b6000825580601f10613ab9575050565b601f016020900490600052602060002090810190612a039190613af1565b5080546000825590600052602060002090810190612a0391905b5b80821115613b065760008155600101613af2565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613b5c57613b5c613b0a565b60405290565b60405160a0810167ffffffffffffffff81118282101715613b5c57613b5c613b0a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613bcc57613bcc613b0a565b604052919050565b600067ffffffffffffffff821115613bee57613bee613b0a565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613c2b57600080fd5b8135613c3e613c3982613bd4565b613b85565b818152846020838601011115613c5357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613c8357600080fd5b823567ffffffffffffffff80821115613c9b57600080fd5b613ca786838701613c1a565b93506020850135915080821115613cbd57600080fd5b50613cca85828601613c1a565b9150509250929050565b600060208284031215613ce657600080fd5b5035919050565b60005b83811015613d08578181015183820152602001613cf0565b50506000910152565b60008151808452613d29816020860160208601613ced565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a1a6020830184613d11565b60008083601f840112613d8057600080fd5b50813567ffffffffffffffff811115613d9857600080fd5b6020830191508360208260051b850101111561104d57600080fd5b8015158114612a0357600080fd5b803563ffffffff81168114613dd557600080fd5b919050565b600080600080600080600060a0888a031215613df557600080fd5b873567ffffffffffffffff80821115613e0d57600080fd5b613e198b838c01613d6e565b909950975060208a0135915080821115613e3257600080fd5b50613e3f8a828b01613d6e565b9096509450506040880135613e5381613db3565b92506060880135613e6381613db3565b9150613e7160808901613dc1565b905092959891949750929550565b60008060208385031215613e9257600080fd5b823567ffffffffffffffff811115613ea957600080fd5b613eb585828601613d6e565b90969095509350505050565b600081518084526020808501945080840160005b83811015613ef157815187529582019590820190600101613ed5565b509495945050505050565b600063ffffffff80835116845260208181850151168186015260408281860151168187015260608501511515606087015260808501511515608087015260a0850151925060e060a0870152613f5460e0870184613ec1565b925060c085015186840360c08801528381518086528486019150848160051b870101858401935060005b82811015613fdb578782037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018452845180518352870151878301879052613fc887840182613d11565b9588019594880194925050600101613f7e565b509998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561405c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261404a858351613efc565b94509285019290850190600101614010565b5092979650505050505050565b60006020828403121561407b57600080fd5b612a1a82613dc1565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526140b96040850182613d11565b949350505050565b602081526000612a1a6020830184614084565b602081526000612a1a6020830184613efc565b600080604083850312156140fa57600080fd5b61410383613dc1565b946020939093013593505050565b6040815260006141246040830185613d11565b82810360208401526141368185613d11565b95945050505050565b63ffffffff8151168252602081015160208301526040810151604083015260006060820151608060608501526140b96080850182613ec1565b60408152600061418b604083018561413f565b905063ffffffff831660208301529392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561405c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452614201858351614084565b945092850192908501906001016141c7565b6000806000806040858703121561422957600080fd5b843567ffffffffffffffff8082111561424157600080fd5b61424d88838901613d6e565b9096509450602087013591508082111561426657600080fd5b5061427387828801613d6e565b95989497509550505050565b60008060008060008060008060c0898b03121561429b57600080fd5b6142a489613dc1565b9750602089013567ffffffffffffffff808211156142c157600080fd5b6142cd8c838d01613d6e565b909950975060408b01359150808211156142e657600080fd5b506142f38b828c01613d6e565b909650945050606089013561430781613db3565b9250608089013561431781613db3565b915061432560a08a01613dc1565b90509295985092959890939650565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a0845261437860a0850182613d11565b9050602083015184820360208601526143918282613d11565b9150506040830151600481106143a9576143a9614334565b60408501526060830151600281106143c3576143c3614334565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612a1a6020830184614363565b6040815260006144166040830185613ec1565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015614484577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0878403018552614472838351614363565b94860194925090850190600101614438565b50909998505050505050505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b83811015614508577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08887030185526144f686835161413f565b955093820193908201906001016144bc565b50508584038187015286518085528782019482019350915060005b8281101561454557845163ffffffff1684529381019392810192600101614523565b5091979650505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114613dd557600080fd5b60006020828403121561458857600080fd5b612a1a82614552565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168181036145d9576145d9614591565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361464357614643614591565b5060010190565b63ffffffff82811682821603908082111561086e5761086e614591565b600181811c9082168061467b57607f821691505b6020821081036146b4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126146ee57600080fd5b9190910192915050565b60006040823603121561470a57600080fd5b6040516040810167ffffffffffffffff828210818311171561472e5761472e613b0a565b8160405261473b85614552565b8352602085013591508082111561475157600080fd5b5061475e36828601613c1a565b60208301525092915050565b601f82111561070b57600081815260208120601f850160051c810160208610156147915750805b601f850160051c820191505b8181101561223f5782815560010161479d565b815167ffffffffffffffff8111156147ca576147ca613b0a565b6147de816147d88454614667565b8461476a565b602080601f83116001811461483157600084156147fb5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561223f565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561487e5788860151825594840194600190910190840161485f565b50858210156148ba57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156148dc57600080fd5b815167ffffffffffffffff8111156148f357600080fd5b8201601f8101841361490457600080fd5b8051614912613c3982613bd4565b81815285602083850101111561492757600080fd5b614136826020830160208601613ced565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818336030181126146ee57600080fd5b60006080823603121561497e57600080fd5b614986613b39565b61498f83613dc1565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff808211156149c057600080fd5b9085019036601f8301126149d357600080fd5b8135818111156149e5576149e5613b0a565b8060051b91506149f6848301613b85565b8181529183018401918481019036841115614a1057600080fd5b938501935b83851015614a2e57843582529385019390850190614a15565b606087015250939695505050505050565b602081526000612a1a6020830184613ec1565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff618336030181126146ee57600080fd5b803560028110613dd557600080fd5b600060a08236031215614aa757600080fd5b614aaf613b62565b823567ffffffffffffffff80821115614ac757600080fd5b614ad336838701613c1a565b83526020850135915080821115614ae957600080fd5b50614af636828601613c1a565b602083015250604083013560048110614b0e57600080fd5b6040820152614b1f60608401614a86565b6060820152614b3060808401614552565b608082015292915050565b6000602080835260008454614b4f81614667565b80848701526040600180841660008114614b705760018114614ba857614bd6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614bd6565b896000528660002060005b85811015614bce5781548b8201860152908301908801614bb3565b8a0184019650505b509398975050505050505050565b8181038181111561047757610477614591565b63ffffffff81811683821601908082111561086e5761086e614591565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614c4957600080fd5b83018035915067ffffffffffffffff821115614c6457600080fd5b60200191503681900382131561104d57600080fd5b67ffffffffffffffff831115614c9157614c91613b0a565b614ca583614c9f8354614667565b8361476a565b6000601f841160018114614cf75760008515614cc15750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614d8d565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614d465786850135825560209485019460019092019101614d26565b5086821015614d81577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600060208284031215614da657600080fd5b8151612a1a81613db3565b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff861115614dea57600080fd5b8560051b808860a0850137820182810360a09081016020850152614e1090820187613d11565b91505063ffffffff80851660408401528084166060840152509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"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\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.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\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"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\":\"nodeInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint32[]\",\"name\":\"configCounts\",\"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\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b614e4980620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f7578063ddbe4f821461040a578063e29581aa14610420578063f2fde38b1461043657600080fd5b80638da5cb5b1461039c5780639cb7c5f4146103c4578063d59a79f6146103e457600080fd5b806373ac22b4116100c857806373ac22b41461036e57806379ba50971461038157806386fa42461461038957600080fd5b80635e65e3091461033357806366acaa3314610346578063715f52951461035b57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461032057600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613c5d565b610449565b6040519081526020015b60405180910390f35b6101ec6101e7366004613cc1565b61047d565b60405190151581526020016101d0565b604080518082018252601881527f4361706162696c697479526567697374727920312e302e300000000000000000602082015290516101d09190613d48565b61024e610249366004613da0565b61048a565b005b610258610646565b6040516101d09190613f00565b610278610273366004613f99565b6107ab565b6040516101d09190613ff1565b610298610293366004613f99565b610898565b6040516101d09190614004565b61024e6102b3366004613da0565b6108dc565b61024e6102c6366004613da0565b6109b3565b61024e6102d9366004613da0565b610bd6565b6102f16102ec366004614017565b610d9e565b6040516101d0929190614041565b61031261030d366004613cc1565b610f8a565b6040516101d092919061409f565b61024e61032e366004613da0565b61102f565b61024e610341366004613da0565b61117d565b61034e6115ef565b6040516101d091906140c7565b61024e610369366004613da0565b6117da565b61024e61037c366004613da0565b611895565b61024e611d3a565b61024e61039736600461413a565b611e37565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d76103d2366004613cc1565b61217d565b6040516101d09190614262565b61024e6103f2366004614294565b612382565b61024e610405366004614349565b61244b565b610412612515565b6040516101d09291906143ee565b610428612880565b6040516101d092919061447e565b61024e610444366004614554565b6129ef565b6000828260405160200161045e929190614041565b6040516020818303038152906040528051906020012090505b92915050565b6000610477600583612a03565b610492612a1e565b60005b818110156106415760008383838181106104b1576104b161456f565b90506020020160208101906104c69190613f99565b63ffffffff8082166000908152600d60209081526040808320805464010000000090049094168084526001850190925282209394509192905b61050882612aa1565b8110156105605761054f8563ffffffff16600c60006105308587612aab90919063ffffffff16565b8152602001908152602001600020600401612ab790919063ffffffff16565b50610559816145cd565b90506104ff565b508254640100000000900463ffffffff166000036105b7576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff851660048201526024015b60405180910390fd5b63ffffffff84166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a1505050508061063a906145cd565b9050610495565b505050565b600e54606090640100000000900463ffffffff166000610667600183614605565b63ffffffff1667ffffffffffffffff81111561068557610685613af7565b60405190808252806020026020018201604052801561070c57816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816106a35790505b509050600060015b8363ffffffff168163ffffffff1610156107885763ffffffff8082166000908152600d602052604090205416156107785761074e81612ac3565b8383815181106107605761076061456f565b602002602001018190525081610775906145cd565b91505b61078181614622565b9050610714565b50610794600184614605565b63ffffffff1681146107a4578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff168352600181018054919284019161080f90614645565b80601f016020809104026020016040519081016040528092919081815260200182805461083b90614645565b80156108885780601f1061085d57610100808354040283529160200191610888565b820191906000526020600020905b81548152906001019060200180831161086b57829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047782612ac3565b6108e4612a1e565b60005b63ffffffff811682111561064157600083838363ffffffff1681811061090f5761090f61456f565b90506020020160208101906109249190613f99565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff000000000000000000000000000000000000000016815591925061096f6001830182613a8a565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a2506109ac81614622565b90506108e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610bd05760008484838181106109ed576109ed61456f565b602090810292909201356000818152600c90935260409092206001810154929350919050610a4a576040517fd82f6adb000000000000000000000000000000000000000000000000000000008152600481018390526024016105ae565b6000610a5882600401612aa1565b1115610a93576040517f34a4a3f6000000000000000000000000000000000000000000000000000000008152600481018390526024016105ae565b83158015610acd5750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610b06576040517f9473075d0000000000000000000000000000000000000000000000000000000081523360048201526024016105ae565b6001810154610b1790600790612ab7565b506002810154610b2990600990612ab7565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016815560018101829055600281018290559060048201818181610b7e8282613ac4565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610bb591815260200190565b60405180910390a1505080610bc9906145cd565b90506109d1565b50505050565b610bde612a1e565b60005b81811015610641576000838383818110610bfd57610bfd61456f565b9050602002810190610c0f9190614698565b610c18906146d6565b805190915073ffffffffffffffffffffffffffffffffffffffff16610c69576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610cf5908261478e565b5050600e8054909150600090610d109063ffffffff16614622565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610d839190613d48565b60405180910390a3505080610d97906145cd565b9050610be1565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610df090614645565b80601f0160208091040260200160405190810160405280929190818152602001828054610e1c90614645565b8015610e695780601f10610e3e57610100808354040283529160200191610e69565b820191906000526020600020905b815481529060010190602001808311610e4c57829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150610f7c905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa158015610f33573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610f7991908101906148a8565b90505b9093509150505b9250929050565b6040805160808101825260008082526020820181905291810191909152606080820152604080516080810182526000848152600c6020908152838220805463ffffffff80821686526001830154848701526002830154868801526401000000009091041683526003019052918220606082019061100690612d97565b90526000938452600c602052604090932054929364010000000090930463ffffffff1692915050565b611037612a1e565b60005b818110156106415760008383838181106110565761105661456f565b905060200201359050611073816003612a0390919063ffffffff16565b6110ac576040517fe181733f000000000000000000000000000000000000000000000000000000008152600481018290526024016105ae565b6110b7600582612da4565b6110f0576040517ff7d7a294000000000000000000000000000000000000000000000000000000008152600481018290526024016105ae565b6000818152600260205260408120906111098282613a8a565b611117600183016000613a8a565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a250611176816145cd565b905061103a565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610bd05760008484838181106111b7576111b761456f565b90506020028101906111c99190614916565b6111d29061494a565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff16825260018101805495965093949193909284019161122890614645565b80601f016020809104026020016040519081016040528092919081815260200182805461125490614645565b80156112a15780601f10611276576101008083540402835291602001916112a1565b820191906000526020600020905b81548152906001019060200180831161128457829003601f168201915b5050505050815250509050831580156112d15750805173ffffffffffffffffffffffffffffffffffffffff163314155b1561130a576040517f9473075d0000000000000000000000000000000000000000000000000000000081523360048201526024016105ae565b6040808301516000908152600c60205220600181015461135e5782604001516040517fd82f6adb0000000000000000000000000000000000000000000000000000000081526004016105ae91815260200190565b6020830151158061138e5750826020015181600101541415801561138e5750602083015161138e90600790612a03565b156113c5576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060830151805160000361140757806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016105ae9190614a1d565b8154640100000000900463ffffffff1682600461142383614622565b82546101009290920a63ffffffff8181021990931691831602179091558354640100000000900416905060005b825181101561151b5761148683828151811061146e5761146e61456f565b60200260200101516003612a0390919063ffffffff16565b6114be57826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016105ae9190614a1d565b61150a8382815181106114d3576114d361456f565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612da490919063ffffffff16565b50611514816145cd565b9050611450565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9091161783556040850151600284015560018301546020860151811461158d57611572600782612ab7565b5060208601516001850181905561158b90600790612da4565b505b85516040808801516020808a015183519283529082015263ffffffff909216917f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a2505050505050806115e8906145cd565b905061119b565b600e5460609063ffffffff166000611608600183614605565b63ffffffff1667ffffffffffffffff81111561162657611626613af7565b60405190808252806020026020018201604052801561166c57816020015b6040805180820190915260008152606060208201528152602001906001900390816116445790505b509050600060015b8363ffffffff168163ffffffff1610156117c45763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16156117b45763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff168352600181018054919284019161170890614645565b80601f016020809104026020016040519081016040528092919081815260200182805461173490614645565b80156117815780601f1061175657610100808354040283529160200191611781565b820191906000526020600020905b81548152906001019060200180831161176457829003601f168201915b50505050508152505083838151811061179c5761179c61456f565b6020026020010181905250816117b1906145cd565b91505b6117bd81614622565b9050611674565b50600e546107949060019063ffffffff16614605565b6117e2612a1e565b60005b818110156106415760008383838181106118015761180161456f565b90506020028101906118139190614a30565b61181c90614a73565b9050600061183282600001518360200151610449565b905061183f600382612da4565b611878576040517febf52551000000000000000000000000000000000000000000000000000000008152600481018290526024016105ae565b6118828183612db0565b50508061188e906145cd565b90506117e5565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610bd05760008484838181106118cf576118cf61456f565b90506020028101906118e19190614916565b6118ea9061494a565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff16825260018101805495965093949193909284019161194090614645565b80601f016020809104026020016040519081016040528092919081815260200182805461196c90614645565b80156119b95780601f1061198e576101008083540402835291602001916119b9565b820191906000526020600020905b81548152906001019060200180831161199c57829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611a1f5781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff90911660048201526024016105ae565b83158015611a445750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611a7d576040517f9473075d0000000000000000000000000000000000000000000000000000000081523360048201526024016105ae565b6040808301516000908152600c60205220600181015415611ad25782604001516040517f546184830000000000000000000000000000000000000000000000000000000081526004016105ae91815260200190565b6040830151611b155782604001516040517f64e2ee920000000000000000000000000000000000000000000000000000000081526004016105ae91815260200190565b60208301511580611b3257506020830151611b3290600790612a03565b15611b69576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611bab57806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016105ae9190614a1d565b81548290600490611bc990640100000000900463ffffffff16614622565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611c7057611c1283828151811061146e5761146e61456f565b611c4a57826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016105ae9190614a1d565b611c5f8382815181106114d3576114d361456f565b50611c69816145cd565b9050611bf4565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611cc69160079190612da416565b506040850151611cd890600990612da4565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611d33906145cd565b90506118b3565b60015473ffffffffffffffffffffffffffffffffffffffff163314611dbb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016105ae565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611e7a576040517fab8b67c600000000000000000000000000000000000000000000000000000000815260048101849052602481018290526044016105ae565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b84811015612175576000868683818110611eb257611eb261456f565b9050602002016020810190611ec79190613f99565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16611f36576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff831660048201526024016105ae565b6000868685818110611f4a57611f4a61456f565b9050602002810190611f5c9190614698565b611f65906146d6565b805190915073ffffffffffffffffffffffffffffffffffffffff16611fb6576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff163314801590611ff357503373ffffffffffffffffffffffffffffffffffffffff861614155b1561202c576040517f9473075d0000000000000000000000000000000000000000000000000000000081523360048201526024016105ae565b8051825473ffffffffffffffffffffffffffffffffffffffff90811691161415806120a857506020808201516040516120659201613d48565b604051602081830303815290604052805190602001208260010160405160200161208f9190614b19565b6040516020818303038152906040528051906020012014155b1561216157805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90911617825560208101516001830190612102908261478e565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516121589190613d48565b60405180910390a35b5050508061216e906145cd565b9050611e96565b505050505050565b6121ad6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a081019092528054829082906121d590614645565b80601f016020809104026020016040519081016040528092919081815260200182805461220190614645565b801561224e5780601f106122235761010080835404028352916020019161224e565b820191906000526020600020905b81548152906001019060200180831161223157829003601f168201915b5050505050815260200160018201805461226790614645565b80601f016020809104026020016040519081016040528092919081815260200182805461229390614645565b80156122e05780601f106122b5576101008083540402835291602001916122e0565b820191906000526020600020905b8154815290600101906020018083116122c357829003601f168201915b5050509183525050600282015460209091019060ff166003811115612307576123076141a6565b6003811115612318576123186141a6565b81526020016002820160019054906101000a900460ff166001811115612340576123406141a6565b6001811115612351576123516141a6565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b61238a612a1e565b63ffffffff8089166000908152600d60205260408120546401000000009004909116908190036123ee576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a1660048201526024016105ae565b612440888888886040518060a001604052808f63ffffffff1681526020018761241690614622565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff16815250613044565b505050505050505050565b612453612a1e565b600e805460009164010000000090910463ffffffff1690600461247583614622565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff8416608082015290915061250b908990899089908990613044565b5050505050505050565b60608060006125246003612d97565b905060006125326005612aa1565b825161253e9190614bc2565b905060008167ffffffffffffffff81111561255b5761255b613af7565b6040519080825280602002602001820160405280156125bc57816020015b6125a96040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816125795790505b50905060008267ffffffffffffffff8111156125da576125da613af7565b604051908082528060200260200182016040528015612603578160200160208202803683370190505b5090506000805b85518110156128725760008682815181106126275761262761456f565b60200260200101519050612645816005612a0390919063ffffffff16565b6128615760008181526002602052604090819020815160a0810190925280548290829061267190614645565b80601f016020809104026020016040519081016040528092919081815260200182805461269d90614645565b80156126ea5780601f106126bf576101008083540402835291602001916126ea565b820191906000526020600020905b8154815290600101906020018083116126cd57829003601f168201915b5050505050815260200160018201805461270390614645565b80601f016020809104026020016040519081016040528092919081815260200182805461272f90614645565b801561277c5780601f106127515761010080835404028352916020019161277c565b820191906000526020600020905b81548152906001019060200180831161275f57829003601f168201915b5050509183525050600282015460209091019060ff1660038111156127a3576127a36141a6565b60038111156127b4576127b46141a6565b81526020016002820160019054906101000a900460ff1660018111156127dc576127dc6141a6565b60018111156127ed576127ed6141a6565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff16602090910152855186908590811061282c5761282c61456f565b60200260200101819052508084848151811061284a5761284a61456f565b602090810291909101015261285e836145cd565b92505b5061286b816145cd565b905061260a565b509096919550909350505050565b606080600061288f6009612d97565b9050805167ffffffffffffffff8111156128ab576128ab613af7565b60405190808252806020026020018201604052801561291a57816020015b60408051608081018252600080825260208083018290529282015260608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816128c95790505b509250805167ffffffffffffffff81111561293757612937613af7565b604051908082528060200260200182016040528015612960578160200160208202803683370190505b50915060005b81518110156129e9576129918282815181106129845761298461456f565b6020026020010151610f8a565b8583815181106129a3576129a361456f565b602002602001018584815181106129bc576129bc61456f565b602002602001018263ffffffff1663ffffffff168152508290525050806129e2906145cd565b9050612966565b50509091565b6129f7612a1e565b612a00816136ec565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612a9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016105ae565b565b6000610477825490565b6000612a1783836137e1565b6000612a17838361380b565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612b7457602002820191906000526020600020905b815481526020019060010190808311612b60575b505050505090506000815167ffffffffffffffff811115612b9757612b97613af7565b604051908082528060200260200182016040528015612bdd57816020015b604080518082019091526000815260606020820152815260200190600190039081612bb55790505b50905060005b8151811015612cfe576040518060400160405280848381518110612c0957612c0961456f565b60200260200101518152602001856003016000868581518110612c2e57612c2e61456f565b602002602001015181526020019081526020016000208054612c4f90614645565b80601f0160208091040260200160405190810160405280929190818152602001828054612c7b90614645565b8015612cc85780601f10612c9d57610100808354040283529160200191612cc8565b820191906000526020600020905b815481529060010190602001808311612cab57829003601f168201915b5050505050815250828281518110612ce257612ce261456f565b602002602001018190525080612cf7906145cd565b9050612be3565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612d8585612d97565b81526020019190915295945050505050565b60606000612a17836138fe565b6000612a17838361395a565b608081015173ffffffffffffffffffffffffffffffffffffffff1615612efe57608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612ea9575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612e83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ea79190614bd5565b155b15612efe5760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016105ae565b600082815260026020526040902081518291908190612f1d908261478e565b5060208201516001820190612f32908261478e565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836003811115612f7457612f746141a6565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836001811115612fbb57612fbb6141a6565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff161580613096575060808201518590613091906001614bf2565b60ff16115b156130df5760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff9091166004820152602481018690526044016105ae565b6001826020015163ffffffff16111561318b57815163ffffffff166000908152600d6020908152604082209084015160019182019183916131209190614605565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61314882612aa1565b81101561318857613177846000015163ffffffff16600c60006105308587600001612aab90919063ffffffff16565b50613181816145cd565b905061313f565b50505b60005b85811015613275576131bb8787838181106131ab576131ab61456f565b8592602090910201359050612da4565b61321c5782518787838181106131d3576131d361456f565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff909416600485015260200291909101356024830152506044016105ae565b82516132649063ffffffff16600c60008a8a8681811061323e5761323e61456f565b905060200201358152602001908152602001600020600401612da490919063ffffffff16565b5061326e816145cd565b905061318e565b5060005b8381101561356157368585838181106132945761329461456f565b90506020028101906132a69190614698565b90506132b460038235612a03565b6132ed576040517fe181733f000000000000000000000000000000000000000000000000000000008152813560048201526024016105ae565b6132f960058235612a03565b15613333576040517ff7d7a294000000000000000000000000000000000000000000000000000000008152813560048201526024016105ae565b803560009081526003840160205260408120805461335090614645565b9050111561339c5783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152813560248201526044016105ae565b60005b878110156134ae576134438235600c60008c8c868181106133c2576133c261456f565b9050602002013581526020019081526020016000206003016000600c60008e8e888181106133f2576133f261456f565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612a0390919063ffffffff16565b61349e578888828181106134595761345961456f565b6040517fa7e7925000000000000000000000000000000000000000000000000000000000815260209091029290920135600483015250823560248201526044016105ae565b6134a7816145cd565b905061339f565b50600283018054600181018255600091825260209182902083359101556134d790820182614c0b565b823560009081526003860160205260409020916134f5919083614c70565b50835160208086015161355092918435908c908c9061351690880188614c0b565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506139a992505050565b5061355a816145cd565b9050613279565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651926136dc929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff82160361376b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016105ae565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008260000182815481106137f8576137f861456f565b9060005260206000200154905092915050565b600081815260018301602052604081205480156138f457600061382f600183614bc2565b855490915060009061384390600190614bc2565b90508181146138a85760008660000182815481106138635761386361456f565b90600052602060002001549050808760000184815481106138865761388661456f565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806138b9576138b9614d8b565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610477565b6000915050610477565b60608160000180548060200260200160405190810160405280929190818152602001828054801561394e57602002820191906000526020600020905b81548152602001906001019080831161393a575b50505050509050919050565b60008181526001830160205260408120546139a157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610477565b506000610477565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff161561217557600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613a50908690869086908b908d90600401614dba565b600060405180830381600087803b158015613a6a57600080fd5b505af1158015613a7e573d6000803e3d6000fd5b50505050505050505050565b508054613a9690614645565b6000825580601f10613aa6575050565b601f016020900490600052602060002090810190612a009190613ade565b5080546000825590600052602060002090810190612a0091905b5b80821115613af35760008155600101613adf565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613b4957613b49613af7565b60405290565b60405160a0810167ffffffffffffffff81118282101715613b4957613b49613af7565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613bb957613bb9613af7565b604052919050565b600067ffffffffffffffff821115613bdb57613bdb613af7565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613c1857600080fd5b8135613c2b613c2682613bc1565b613b72565b818152846020838601011115613c4057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613c7057600080fd5b823567ffffffffffffffff80821115613c8857600080fd5b613c9486838701613c07565b93506020850135915080821115613caa57600080fd5b50613cb785828601613c07565b9150509250929050565b600060208284031215613cd357600080fd5b5035919050565b60005b83811015613cf5578181015183820152602001613cdd565b50506000910152565b60008151808452613d16816020860160208601613cda565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a176020830184613cfe565b60008083601f840112613d6d57600080fd5b50813567ffffffffffffffff811115613d8557600080fd5b6020830191508360208260051b8501011115610f8357600080fd5b60008060208385031215613db357600080fd5b823567ffffffffffffffff811115613dca57600080fd5b613dd685828601613d5b565b90969095509350505050565b600081518084526020808501945080840160005b83811015613e1257815187529582019590820190600101613df6565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015613e795782840389528151805185528501516040868601819052613e6581870183613cfe565b9a87019a9550505090840190600101613e3b565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a0850152613ede60e0850182613de2565b905060c083015184820360c0860152613ef78282613e1d565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613f73577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613f61858351613e86565b94509285019290850190600101613f27565b5092979650505050505050565b803563ffffffff81168114613f9457600080fd5b919050565b600060208284031215613fab57600080fd5b612a1782613f80565b73ffffffffffffffffffffffffffffffffffffffff81511682526000602082015160406020850152613fe96040850182613cfe565b949350505050565b602081526000612a176020830184613fb4565b602081526000612a176020830184613e86565b6000806040838503121561402a57600080fd5b61403383613f80565b946020939093013593505050565b6040815260006140546040830185613cfe565b8281036020840152613ef78185613cfe565b63ffffffff815116825260208101516020830152604081015160408301526000606082015160806060850152613fe96080850182613de2565b6040815260006140b26040830185614066565b905063ffffffff831660208301529392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613f73577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452614128858351613fb4565b945092850192908501906001016140ee565b6000806000806040858703121561415057600080fd5b843567ffffffffffffffff8082111561416857600080fd5b61417488838901613d5b565b9096509450602087013591508082111561418d57600080fd5b5061419a87828801613d5b565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a084526141ea60a0850182613cfe565b9050602083015184820360208601526142038282613cfe565b91505060408301516004811061421b5761421b6141a6565b6040850152606083015160028110614235576142356141a6565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612a1760208301846141d5565b8015158114612a0057600080fd5b803560ff81168114613f9457600080fd5b60008060008060008060008060c0898b0312156142b057600080fd5b6142b989613f80565b9750602089013567ffffffffffffffff808211156142d657600080fd5b6142e28c838d01613d5b565b909950975060408b01359150808211156142fb57600080fd5b506143088b828c01613d5b565b909650945050606089013561431c81614275565b9250608089013561432c81614275565b915061433a60a08a01614283565b90509295985092959890939650565b600080600080600080600060a0888a03121561436457600080fd5b873567ffffffffffffffff8082111561437c57600080fd5b6143888b838c01613d5b565b909950975060208a01359150808211156143a157600080fd5b506143ae8a828b01613d5b565b90965094505060408801356143c281614275565b925060608801356143d281614275565b91506143e060808901614283565b905092959891949750929550565b6040815260006144016040830185613de2565b6020838203818501528185518084528284019150828160051b85010183880160005b8381101561446f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087840301855261445d8383516141d5565b94860194925090850190600101614423565b50909998505050505050505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b838110156144f3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08887030185526144e1868351614066565b955093820193908201906001016144a7565b50508584038187015286518085528782019482019350915060005b82811015613e7957845163ffffffff168452938101939281019260010161450e565b803573ffffffffffffffffffffffffffffffffffffffff81168114613f9457600080fd5b60006020828403121561456657600080fd5b612a1782614530565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036145fe576145fe61459e565b5060010190565b63ffffffff8281168282160390808211156107a4576107a461459e565b600063ffffffff80831681810361463b5761463b61459e565b6001019392505050565b600181811c9082168061465957607f821691505b602082108103614692577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126146cc57600080fd5b9190910192915050565b6000604082360312156146e857600080fd5b6040516040810167ffffffffffffffff828210818311171561470c5761470c613af7565b8160405261471985614530565b8352602085013591508082111561472f57600080fd5b5061473c36828601613c07565b60208301525092915050565b601f82111561064157600081815260208120601f850160051c8101602086101561476f5750805b601f850160051c820191505b818110156121755782815560010161477b565b815167ffffffffffffffff8111156147a8576147a8613af7565b6147bc816147b68454614645565b84614748565b602080601f83116001811461480f57600084156147d95750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612175565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561485c5788860151825594840194600190910190840161483d565b508582101561489857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156148ba57600080fd5b815167ffffffffffffffff8111156148d157600080fd5b8201601f810184136148e257600080fd5b80516148f0613c2682613bc1565b81815285602083850101111561490557600080fd5b613ef7826020830160208601613cda565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818336030181126146cc57600080fd5b60006080823603121561495c57600080fd5b614964613b26565b61496d83613f80565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff8082111561499e57600080fd5b9085019036601f8301126149b157600080fd5b8135818111156149c3576149c3613af7565b8060051b91506149d4848301613b72565b81815291830184019184810190368411156149ee57600080fd5b938501935b83851015614a0c578435825293850193908501906149f3565b606087015250939695505050505050565b602081526000612a176020830184613de2565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff618336030181126146cc57600080fd5b803560028110613f9457600080fd5b600060a08236031215614a8557600080fd5b614a8d613b4f565b823567ffffffffffffffff80821115614aa557600080fd5b614ab136838701613c07565b83526020850135915080821115614ac757600080fd5b50614ad436828601613c07565b602083015250604083013560048110614aec57600080fd5b6040820152614afd60608401614a64565b6060820152614b0e60808401614530565b608082015292915050565b6000602080835260008454614b2d81614645565b80848701526040600180841660008114614b4e5760018114614b8657614bb4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614bb4565b896000528660002060005b85811015614bac5781548b8201860152908301908801614b91565b8a0184019650505b509398975050505050505050565b818103818111156104775761047761459e565b600060208284031215614be757600080fd5b8151612a1781614275565b60ff81811683821601908111156104775761047761459e565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614c4057600080fd5b83018035915067ffffffffffffffff821115614c5b57600080fd5b602001915036819003821315610f8357600080fd5b67ffffffffffffffff831115614c8857614c88613af7565b614c9c83614c968354614645565b83614748565b6000601f841160018114614cee5760008515614cb85750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614d84565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614d3d5786850135825560209485019460019092019101614d1d565b5086821015614d78577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff861115614df357600080fd5b8560051b808860a0850137820182810360a09081016020850152614e1990820187613cfe565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", } var CapabilityRegistryABI = CapabilityRegistryMetaData.ABI @@ -527,15 +527,15 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddCapabilities( 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) { +func (_CapabilityRegistry *CapabilityRegistryTransactor) AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { return _CapabilityRegistry.contract.Transact(opts, "addDON", nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { return _CapabilityRegistry.Contract.AddDON(&_CapabilityRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { return _CapabilityRegistry.Contract.AddDON(&_CapabilityRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } @@ -623,15 +623,15 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) TransferOwnershi return _CapabilityRegistry.Contract.TransferOwnership(&_CapabilityRegistry.TransactOpts, to) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { return _CapabilityRegistry.contract.Transact(opts, "updateDON", donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { return _CapabilityRegistry.Contract.UpdateDON(&_CapabilityRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { return _CapabilityRegistry.Contract.UpdateDON(&_CapabilityRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } @@ -2195,7 +2195,7 @@ type CapabilityRegistryInterface interface { 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) + AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) @@ -2211,7 +2211,7 @@ type CapabilityRegistryInterface interface { TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint32) (*types.Transaction, error) + UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) diff --git a/core/gethwrappers/keystone/generated/router/router.go b/core/gethwrappers/keystone/generated/router/router.go new file mode 100644 index 00000000000..5c58af890bc --- /dev/null +++ b/core/gethwrappers/keystone/generated/router/router.go @@ -0,0 +1,954 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package router + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +var KeystoneRouterMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transmissionId\",\"type\":\"bytes32\"}],\"name\":\"AlreadyAttempted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"ForwarderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"ForwarderRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"addForwarder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transmissionId\",\"type\":\"bytes32\"}],\"name\":\"getTransmissionState\",\"outputs\":[{\"internalType\":\"enumIRouter.TransmissionState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transmissionId\",\"type\":\"bytes32\"}],\"name\":\"getTransmitter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"isForwarder\",\"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\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"removeForwarder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"transmissionId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"}],\"name\":\"route\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5033806000816100675760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615610097576100978161009f565b505050610148565b336001600160a01b038216036100f75760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161005e565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b610aa6806101576000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806379ba509711610076578063abcef5541161005b578063abcef554146101c7578063e6b7145814610200578063f2fde38b1461023657600080fd5b806379ba5097146101805780638da5cb5b1461018857600080fd5b80634d93172d116100a75780634d93172d14610138578063516db4081461014d5780635c41d2fe1461016d57600080fd5b8063181f5a77146100c3578063233fd52d14610115575b600080fd5b6100ff6040518060400160405280601481526020017f4b657973746f6e65526f7574657220312e302e3000000000000000000000000081525081565b60405161010c9190610834565b60405180910390f35b610128610123366004610912565b610249565b604051901515815260200161010c565b61014b6101463660046109ad565b610441565b005b61016061015b3660046109cf565b6104bd565b60405161010c91906109e8565b61014b61017b3660046109ad565b61052c565b61014b6105ab565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010c565b6101286101d53660046109ad565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205460ff1690565b6101a261020e3660046109cf565b60009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b61014b6102443660046109ad565b6106a8565b3360009081526002602052604081205460ff16610292576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008881526003602052604090205473ffffffffffffffffffffffffffffffffffffffff16156102f6576040517fa53dc8ca000000000000000000000000000000000000000000000000000000008152600481018990526024015b60405180910390fd5b600088815260036020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a81169190911790915587163b900361035857506000610436565b6040517f805f213200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87169063805f2132906103b0908890889088908890600401610a72565b600060405180830381600087803b1580156103ca57600080fd5b505af19250505080156103db575060015b6103e757506000610436565b50600087815260036020526040902080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905560015b979650505050505050565b6104496106bc565b73ffffffffffffffffffffffffffffffffffffffff811660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517fb96d15bf9258c7b8df062753a6a262864611fc7b060a5ee2e57e79b85f898d389190a250565b60008181526003602052604081205473ffffffffffffffffffffffffffffffffffffffff166104ee57506000919050565b60008281526003602052604090205474010000000000000000000000000000000000000000900460ff16610523576002610526565b60015b92915050565b6105346106bc565b73ffffffffffffffffffffffffffffffffffffffff811660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f0ea0ce2c048ff45a4a95f2947879de3fb94abec2f152190400cab2d1272a68e79190a250565b60015473ffffffffffffffffffffffffffffffffffffffff16331461062c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016102ed565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6106b06106bc565b6106b98161073f565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461073d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016102ed565b565b3373ffffffffffffffffffffffffffffffffffffffff8216036107be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016102ed565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208083528351808285015260005b8181101561086157858101830151858201604001528201610845565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146108c457600080fd5b919050565b60008083601f8401126108db57600080fd5b50813567ffffffffffffffff8111156108f357600080fd5b60208301915083602082850101111561090b57600080fd5b9250929050565b600080600080600080600060a0888a03121561092d57600080fd5b8735965061093d602089016108a0565b955061094b604089016108a0565b9450606088013567ffffffffffffffff8082111561096857600080fd5b6109748b838c016108c9565b909650945060808a013591508082111561098d57600080fd5b5061099a8a828b016108c9565b989b979a50959850939692959293505050565b6000602082840312156109bf57600080fd5b6109c8826108a0565b9392505050565b6000602082840312156109e157600080fd5b5035919050565b6020810160038310610a23577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000610a86604083018688610a29565b8281036020840152610436818587610a2956fea164736f6c6343000813000a", +} + +var KeystoneRouterABI = KeystoneRouterMetaData.ABI + +var KeystoneRouterBin = KeystoneRouterMetaData.Bin + +func DeployKeystoneRouter(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KeystoneRouter, error) { + parsed, err := KeystoneRouterMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeystoneRouterBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &KeystoneRouter{address: address, abi: *parsed, KeystoneRouterCaller: KeystoneRouterCaller{contract: contract}, KeystoneRouterTransactor: KeystoneRouterTransactor{contract: contract}, KeystoneRouterFilterer: KeystoneRouterFilterer{contract: contract}}, nil +} + +type KeystoneRouter struct { + address common.Address + abi abi.ABI + KeystoneRouterCaller + KeystoneRouterTransactor + KeystoneRouterFilterer +} + +type KeystoneRouterCaller struct { + contract *bind.BoundContract +} + +type KeystoneRouterTransactor struct { + contract *bind.BoundContract +} + +type KeystoneRouterFilterer struct { + contract *bind.BoundContract +} + +type KeystoneRouterSession struct { + Contract *KeystoneRouter + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type KeystoneRouterCallerSession struct { + Contract *KeystoneRouterCaller + CallOpts bind.CallOpts +} + +type KeystoneRouterTransactorSession struct { + Contract *KeystoneRouterTransactor + TransactOpts bind.TransactOpts +} + +type KeystoneRouterRaw struct { + Contract *KeystoneRouter +} + +type KeystoneRouterCallerRaw struct { + Contract *KeystoneRouterCaller +} + +type KeystoneRouterTransactorRaw struct { + Contract *KeystoneRouterTransactor +} + +func NewKeystoneRouter(address common.Address, backend bind.ContractBackend) (*KeystoneRouter, error) { + abi, err := abi.JSON(strings.NewReader(KeystoneRouterABI)) + if err != nil { + return nil, err + } + contract, err := bindKeystoneRouter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &KeystoneRouter{address: address, abi: abi, KeystoneRouterCaller: KeystoneRouterCaller{contract: contract}, KeystoneRouterTransactor: KeystoneRouterTransactor{contract: contract}, KeystoneRouterFilterer: KeystoneRouterFilterer{contract: contract}}, nil +} + +func NewKeystoneRouterCaller(address common.Address, caller bind.ContractCaller) (*KeystoneRouterCaller, error) { + contract, err := bindKeystoneRouter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &KeystoneRouterCaller{contract: contract}, nil +} + +func NewKeystoneRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*KeystoneRouterTransactor, error) { + contract, err := bindKeystoneRouter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &KeystoneRouterTransactor{contract: contract}, nil +} + +func NewKeystoneRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*KeystoneRouterFilterer, error) { + contract, err := bindKeystoneRouter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &KeystoneRouterFilterer{contract: contract}, nil +} + +func bindKeystoneRouter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := KeystoneRouterMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_KeystoneRouter *KeystoneRouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeystoneRouter.Contract.KeystoneRouterCaller.contract.Call(opts, result, method, params...) +} + +func (_KeystoneRouter *KeystoneRouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeystoneRouter.Contract.KeystoneRouterTransactor.contract.Transfer(opts) +} + +func (_KeystoneRouter *KeystoneRouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeystoneRouter.Contract.KeystoneRouterTransactor.contract.Transact(opts, method, params...) +} + +func (_KeystoneRouter *KeystoneRouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeystoneRouter.Contract.contract.Call(opts, result, method, params...) +} + +func (_KeystoneRouter *KeystoneRouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeystoneRouter.Contract.contract.Transfer(opts) +} + +func (_KeystoneRouter *KeystoneRouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeystoneRouter.Contract.contract.Transact(opts, method, params...) +} + +func (_KeystoneRouter *KeystoneRouterCaller) GetTransmissionState(opts *bind.CallOpts, transmissionId [32]byte) (uint8, error) { + var out []interface{} + err := _KeystoneRouter.contract.Call(opts, &out, "getTransmissionState", transmissionId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_KeystoneRouter *KeystoneRouterSession) GetTransmissionState(transmissionId [32]byte) (uint8, error) { + return _KeystoneRouter.Contract.GetTransmissionState(&_KeystoneRouter.CallOpts, transmissionId) +} + +func (_KeystoneRouter *KeystoneRouterCallerSession) GetTransmissionState(transmissionId [32]byte) (uint8, error) { + return _KeystoneRouter.Contract.GetTransmissionState(&_KeystoneRouter.CallOpts, transmissionId) +} + +func (_KeystoneRouter *KeystoneRouterCaller) GetTransmitter(opts *bind.CallOpts, transmissionId [32]byte) (common.Address, error) { + var out []interface{} + err := _KeystoneRouter.contract.Call(opts, &out, "getTransmitter", transmissionId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_KeystoneRouter *KeystoneRouterSession) GetTransmitter(transmissionId [32]byte) (common.Address, error) { + return _KeystoneRouter.Contract.GetTransmitter(&_KeystoneRouter.CallOpts, transmissionId) +} + +func (_KeystoneRouter *KeystoneRouterCallerSession) GetTransmitter(transmissionId [32]byte) (common.Address, error) { + return _KeystoneRouter.Contract.GetTransmitter(&_KeystoneRouter.CallOpts, transmissionId) +} + +func (_KeystoneRouter *KeystoneRouterCaller) IsForwarder(opts *bind.CallOpts, forwarder common.Address) (bool, error) { + var out []interface{} + err := _KeystoneRouter.contract.Call(opts, &out, "isForwarder", forwarder) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_KeystoneRouter *KeystoneRouterSession) IsForwarder(forwarder common.Address) (bool, error) { + return _KeystoneRouter.Contract.IsForwarder(&_KeystoneRouter.CallOpts, forwarder) +} + +func (_KeystoneRouter *KeystoneRouterCallerSession) IsForwarder(forwarder common.Address) (bool, error) { + return _KeystoneRouter.Contract.IsForwarder(&_KeystoneRouter.CallOpts, forwarder) +} + +func (_KeystoneRouter *KeystoneRouterCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _KeystoneRouter.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_KeystoneRouter *KeystoneRouterSession) Owner() (common.Address, error) { + return _KeystoneRouter.Contract.Owner(&_KeystoneRouter.CallOpts) +} + +func (_KeystoneRouter *KeystoneRouterCallerSession) Owner() (common.Address, error) { + return _KeystoneRouter.Contract.Owner(&_KeystoneRouter.CallOpts) +} + +func (_KeystoneRouter *KeystoneRouterCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _KeystoneRouter.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_KeystoneRouter *KeystoneRouterSession) TypeAndVersion() (string, error) { + return _KeystoneRouter.Contract.TypeAndVersion(&_KeystoneRouter.CallOpts) +} + +func (_KeystoneRouter *KeystoneRouterCallerSession) TypeAndVersion() (string, error) { + return _KeystoneRouter.Contract.TypeAndVersion(&_KeystoneRouter.CallOpts) +} + +func (_KeystoneRouter *KeystoneRouterTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeystoneRouter.contract.Transact(opts, "acceptOwnership") +} + +func (_KeystoneRouter *KeystoneRouterSession) AcceptOwnership() (*types.Transaction, error) { + return _KeystoneRouter.Contract.AcceptOwnership(&_KeystoneRouter.TransactOpts) +} + +func (_KeystoneRouter *KeystoneRouterTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _KeystoneRouter.Contract.AcceptOwnership(&_KeystoneRouter.TransactOpts) +} + +func (_KeystoneRouter *KeystoneRouterTransactor) AddForwarder(opts *bind.TransactOpts, forwarder common.Address) (*types.Transaction, error) { + return _KeystoneRouter.contract.Transact(opts, "addForwarder", forwarder) +} + +func (_KeystoneRouter *KeystoneRouterSession) AddForwarder(forwarder common.Address) (*types.Transaction, error) { + return _KeystoneRouter.Contract.AddForwarder(&_KeystoneRouter.TransactOpts, forwarder) +} + +func (_KeystoneRouter *KeystoneRouterTransactorSession) AddForwarder(forwarder common.Address) (*types.Transaction, error) { + return _KeystoneRouter.Contract.AddForwarder(&_KeystoneRouter.TransactOpts, forwarder) +} + +func (_KeystoneRouter *KeystoneRouterTransactor) RemoveForwarder(opts *bind.TransactOpts, forwarder common.Address) (*types.Transaction, error) { + return _KeystoneRouter.contract.Transact(opts, "removeForwarder", forwarder) +} + +func (_KeystoneRouter *KeystoneRouterSession) RemoveForwarder(forwarder common.Address) (*types.Transaction, error) { + return _KeystoneRouter.Contract.RemoveForwarder(&_KeystoneRouter.TransactOpts, forwarder) +} + +func (_KeystoneRouter *KeystoneRouterTransactorSession) RemoveForwarder(forwarder common.Address) (*types.Transaction, error) { + return _KeystoneRouter.Contract.RemoveForwarder(&_KeystoneRouter.TransactOpts, forwarder) +} + +func (_KeystoneRouter *KeystoneRouterTransactor) Route(opts *bind.TransactOpts, transmissionId [32]byte, transmitter common.Address, receiver common.Address, metadata []byte, report []byte) (*types.Transaction, error) { + return _KeystoneRouter.contract.Transact(opts, "route", transmissionId, transmitter, receiver, metadata, report) +} + +func (_KeystoneRouter *KeystoneRouterSession) Route(transmissionId [32]byte, transmitter common.Address, receiver common.Address, metadata []byte, report []byte) (*types.Transaction, error) { + return _KeystoneRouter.Contract.Route(&_KeystoneRouter.TransactOpts, transmissionId, transmitter, receiver, metadata, report) +} + +func (_KeystoneRouter *KeystoneRouterTransactorSession) Route(transmissionId [32]byte, transmitter common.Address, receiver common.Address, metadata []byte, report []byte) (*types.Transaction, error) { + return _KeystoneRouter.Contract.Route(&_KeystoneRouter.TransactOpts, transmissionId, transmitter, receiver, metadata, report) +} + +func (_KeystoneRouter *KeystoneRouterTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _KeystoneRouter.contract.Transact(opts, "transferOwnership", to) +} + +func (_KeystoneRouter *KeystoneRouterSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _KeystoneRouter.Contract.TransferOwnership(&_KeystoneRouter.TransactOpts, to) +} + +func (_KeystoneRouter *KeystoneRouterTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _KeystoneRouter.Contract.TransferOwnership(&_KeystoneRouter.TransactOpts, to) +} + +type KeystoneRouterForwarderAddedIterator struct { + Event *KeystoneRouterForwarderAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeystoneRouterForwarderAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeystoneRouterForwarderAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(KeystoneRouterForwarderAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *KeystoneRouterForwarderAddedIterator) Error() error { + return it.fail +} + +func (it *KeystoneRouterForwarderAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeystoneRouterForwarderAdded struct { + Forwarder common.Address + Raw types.Log +} + +func (_KeystoneRouter *KeystoneRouterFilterer) FilterForwarderAdded(opts *bind.FilterOpts, forwarder []common.Address) (*KeystoneRouterForwarderAddedIterator, error) { + + var forwarderRule []interface{} + for _, forwarderItem := range forwarder { + forwarderRule = append(forwarderRule, forwarderItem) + } + + logs, sub, err := _KeystoneRouter.contract.FilterLogs(opts, "ForwarderAdded", forwarderRule) + if err != nil { + return nil, err + } + return &KeystoneRouterForwarderAddedIterator{contract: _KeystoneRouter.contract, event: "ForwarderAdded", logs: logs, sub: sub}, nil +} + +func (_KeystoneRouter *KeystoneRouterFilterer) WatchForwarderAdded(opts *bind.WatchOpts, sink chan<- *KeystoneRouterForwarderAdded, forwarder []common.Address) (event.Subscription, error) { + + var forwarderRule []interface{} + for _, forwarderItem := range forwarder { + forwarderRule = append(forwarderRule, forwarderItem) + } + + logs, sub, err := _KeystoneRouter.contract.WatchLogs(opts, "ForwarderAdded", forwarderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeystoneRouterForwarderAdded) + if err := _KeystoneRouter.contract.UnpackLog(event, "ForwarderAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_KeystoneRouter *KeystoneRouterFilterer) ParseForwarderAdded(log types.Log) (*KeystoneRouterForwarderAdded, error) { + event := new(KeystoneRouterForwarderAdded) + if err := _KeystoneRouter.contract.UnpackLog(event, "ForwarderAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeystoneRouterForwarderRemovedIterator struct { + Event *KeystoneRouterForwarderRemoved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeystoneRouterForwarderRemovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeystoneRouterForwarderRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(KeystoneRouterForwarderRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *KeystoneRouterForwarderRemovedIterator) Error() error { + return it.fail +} + +func (it *KeystoneRouterForwarderRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeystoneRouterForwarderRemoved struct { + Forwarder common.Address + Raw types.Log +} + +func (_KeystoneRouter *KeystoneRouterFilterer) FilterForwarderRemoved(opts *bind.FilterOpts, forwarder []common.Address) (*KeystoneRouterForwarderRemovedIterator, error) { + + var forwarderRule []interface{} + for _, forwarderItem := range forwarder { + forwarderRule = append(forwarderRule, forwarderItem) + } + + logs, sub, err := _KeystoneRouter.contract.FilterLogs(opts, "ForwarderRemoved", forwarderRule) + if err != nil { + return nil, err + } + return &KeystoneRouterForwarderRemovedIterator{contract: _KeystoneRouter.contract, event: "ForwarderRemoved", logs: logs, sub: sub}, nil +} + +func (_KeystoneRouter *KeystoneRouterFilterer) WatchForwarderRemoved(opts *bind.WatchOpts, sink chan<- *KeystoneRouterForwarderRemoved, forwarder []common.Address) (event.Subscription, error) { + + var forwarderRule []interface{} + for _, forwarderItem := range forwarder { + forwarderRule = append(forwarderRule, forwarderItem) + } + + logs, sub, err := _KeystoneRouter.contract.WatchLogs(opts, "ForwarderRemoved", forwarderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeystoneRouterForwarderRemoved) + if err := _KeystoneRouter.contract.UnpackLog(event, "ForwarderRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_KeystoneRouter *KeystoneRouterFilterer) ParseForwarderRemoved(log types.Log) (*KeystoneRouterForwarderRemoved, error) { + event := new(KeystoneRouterForwarderRemoved) + if err := _KeystoneRouter.contract.UnpackLog(event, "ForwarderRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeystoneRouterOwnershipTransferRequestedIterator struct { + Event *KeystoneRouterOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeystoneRouterOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeystoneRouterOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(KeystoneRouterOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *KeystoneRouterOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *KeystoneRouterOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeystoneRouterOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_KeystoneRouter *KeystoneRouterFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeystoneRouterOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeystoneRouter.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &KeystoneRouterOwnershipTransferRequestedIterator{contract: _KeystoneRouter.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_KeystoneRouter *KeystoneRouterFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeystoneRouterOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeystoneRouter.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeystoneRouterOwnershipTransferRequested) + if err := _KeystoneRouter.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_KeystoneRouter *KeystoneRouterFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeystoneRouterOwnershipTransferRequested, error) { + event := new(KeystoneRouterOwnershipTransferRequested) + if err := _KeystoneRouter.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeystoneRouterOwnershipTransferredIterator struct { + Event *KeystoneRouterOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeystoneRouterOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeystoneRouterOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(KeystoneRouterOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *KeystoneRouterOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *KeystoneRouterOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeystoneRouterOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_KeystoneRouter *KeystoneRouterFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeystoneRouterOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeystoneRouter.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &KeystoneRouterOwnershipTransferredIterator{contract: _KeystoneRouter.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_KeystoneRouter *KeystoneRouterFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeystoneRouterOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeystoneRouter.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeystoneRouterOwnershipTransferred) + if err := _KeystoneRouter.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_KeystoneRouter *KeystoneRouterFilterer) ParseOwnershipTransferred(log types.Log) (*KeystoneRouterOwnershipTransferred, error) { + event := new(KeystoneRouterOwnershipTransferred) + if err := _KeystoneRouter.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +func (_KeystoneRouter *KeystoneRouter) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _KeystoneRouter.abi.Events["ForwarderAdded"].ID: + return _KeystoneRouter.ParseForwarderAdded(log) + case _KeystoneRouter.abi.Events["ForwarderRemoved"].ID: + return _KeystoneRouter.ParseForwarderRemoved(log) + case _KeystoneRouter.abi.Events["OwnershipTransferRequested"].ID: + return _KeystoneRouter.ParseOwnershipTransferRequested(log) + case _KeystoneRouter.abi.Events["OwnershipTransferred"].ID: + return _KeystoneRouter.ParseOwnershipTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (KeystoneRouterForwarderAdded) Topic() common.Hash { + return common.HexToHash("0x0ea0ce2c048ff45a4a95f2947879de3fb94abec2f152190400cab2d1272a68e7") +} + +func (KeystoneRouterForwarderRemoved) Topic() common.Hash { + return common.HexToHash("0xb96d15bf9258c7b8df062753a6a262864611fc7b060a5ee2e57e79b85f898d38") +} + +func (KeystoneRouterOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (KeystoneRouterOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (_KeystoneRouter *KeystoneRouter) Address() common.Address { + return _KeystoneRouter.address +} + +type KeystoneRouterInterface interface { + GetTransmissionState(opts *bind.CallOpts, transmissionId [32]byte) (uint8, error) + + GetTransmitter(opts *bind.CallOpts, transmissionId [32]byte) (common.Address, error) + + IsForwarder(opts *bind.CallOpts, forwarder common.Address) (bool, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + AddForwarder(opts *bind.TransactOpts, forwarder common.Address) (*types.Transaction, error) + + RemoveForwarder(opts *bind.TransactOpts, forwarder common.Address) (*types.Transaction, error) + + Route(opts *bind.TransactOpts, transmissionId [32]byte, transmitter common.Address, receiver common.Address, metadata []byte, report []byte) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + FilterForwarderAdded(opts *bind.FilterOpts, forwarder []common.Address) (*KeystoneRouterForwarderAddedIterator, error) + + WatchForwarderAdded(opts *bind.WatchOpts, sink chan<- *KeystoneRouterForwarderAdded, forwarder []common.Address) (event.Subscription, error) + + ParseForwarderAdded(log types.Log) (*KeystoneRouterForwarderAdded, error) + + FilterForwarderRemoved(opts *bind.FilterOpts, forwarder []common.Address) (*KeystoneRouterForwarderRemovedIterator, error) + + WatchForwarderRemoved(opts *bind.WatchOpts, sink chan<- *KeystoneRouterForwarderRemoved, forwarder []common.Address) (event.Subscription, error) + + ParseForwarderRemoved(log types.Log) (*KeystoneRouterForwarderRemoved, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeystoneRouterOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeystoneRouterOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*KeystoneRouterOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeystoneRouterOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeystoneRouterOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*KeystoneRouterOwnershipTransferred, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} 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 605607aeb98..75b743316ac 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,5 @@ 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 2913d0d38f6a6edc6d437e16d042c7a6732171213c096259f2113170550e925e +forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin eb51d0a17d036385b840872d73022269a26ce79f3515a7f4adeefe07bdf4bdcd +keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin 334fdeb3953509130edeeb3db63ed0c82e3ff0f86a884f2a11368963a617812b ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 9dcbdf55bd5729ba266148da3f17733eb592c871c2108ccca546618628fd9ad2 +router: ../../../contracts/solc/v0.8.19/KeystoneRouter/KeystoneRouter.abi ../../../contracts/solc/v0.8.19/KeystoneRouter/KeystoneRouter.bin d579702bbbe3c03caf2336a9d097f691e3c9033139480e97945b1e4c5f989523 diff --git a/core/gethwrappers/keystone/go_generate.go b/core/gethwrappers/keystone/go_generate.go index 679b678b8f2..e6287906443 100644 --- a/core/gethwrappers/keystone/go_generate.go +++ b/core/gethwrappers/keystone/go_generate.go @@ -5,5 +5,6 @@ package gethwrappers // Keystone //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin KeystoneForwarder forwarder +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/KeystoneRouter/KeystoneRouter.abi ../../../contracts/solc/v0.8.19/KeystoneRouter/KeystoneRouter.bin KeystoneRouter router //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin OCR3Capability ocr3_capability //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin CapabilityRegistry keystone_capability_registry diff --git a/core/scripts/keystone/src/01_deploy_contracts_cmd.go b/core/scripts/keystone/src/01_deploy_contracts_cmd.go index 2ca60bdfaf2..34b8143f082 100644 --- a/core/scripts/keystone/src/01_deploy_contracts_cmd.go +++ b/core/scripts/keystone/src/01_deploy_contracts_cmd.go @@ -14,10 +14,12 @@ import ( helpers "github.com/smartcontractkit/chainlink/core/scripts/common" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/forwarder" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/router" ) type deployedContracts struct { OCRContract common.Address `json:"ocrContract"` + RouterContract common.Address `json:"routerContract"` ForwarderContract common.Address `json:"forwarderContract"` // The block number of the transaction that set the config on the OCR3 contract. We use this to replay blocks from this point on // when we load the OCR3 job specs on the nodes. @@ -107,12 +109,15 @@ func deploy( fmt.Println("Deploying keystone ocr3 contract...") ocrContract := DeployKeystoneOCR3Capability(env) + fmt.Println("Deploying keystone router contract...") + routerContract := DeployRouter(env) fmt.Println("Deploying keystone forwarder contract...") - forwarderContract := DeployForwarder(env) + forwarderContract := DeployForwarder(env, routerContract.Address()) fmt.Println("Writing deployed contract addresses to file...") contracts := deployedContracts{ OCRContract: ocrContract.Address(), + RouterContract: routerContract.Address(), ForwarderContract: forwarderContract.Address(), } jsonBytes, err := json.Marshal(contracts) @@ -121,6 +126,11 @@ func deploy( err = os.WriteFile(DeployedContractsFilePath(), jsonBytes, 0600) PanicErr(err) + // Add forwarder to router allow list + tx, err := routerContract.AddForwarder(env.Owner, forwarderContract.Address()) + PanicErr(err) + _ = helpers.ConfirmTXMined(context.Background(), env.Ec, tx, env.ChainID) + setOCR3Config(env, ocrConfig) if skipFunding { @@ -189,8 +199,16 @@ func DeployedContractsFilePath() string { return filepath.Join(artefactsDir, deployedContractsJSON) } -func DeployForwarder(e helpers.Environment) *forwarder.KeystoneForwarder { - _, tx, contract, err := forwarder.DeployKeystoneForwarder(e.Owner, e.Ec) +func DeployRouter(e helpers.Environment) *router.KeystoneRouter { + _, tx, contract, err := router.DeployKeystoneRouter(e.Owner, e.Ec) + PanicErr(err) + helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID) + + return contract +} + +func DeployForwarder(e helpers.Environment, routerAddress common.Address) *forwarder.KeystoneForwarder { + _, tx, contract, err := forwarder.DeployKeystoneForwarder(e.Owner, e.Ec, routerAddress) PanicErr(err) helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID)