diff --git a/contracts/src/v0.8/keystone/CapabilityRegistry.sol b/contracts/src/v0.8/keystone/CapabilityRegistry.sol index 9fe91ebf467..71f046eda20 100644 --- a/contracts/src/v0.8/keystone/CapabilityRegistry.sol +++ b/contracts/src/v0.8/keystone/CapabilityRegistry.sol @@ -76,16 +76,16 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// /// @dev Given the following capability ID: {name}:{label1_key}_{label1_value}:{label2_key}_{label2_value}@{version} // Then we denote the `labelledName` as the `{name}:{label1_key}_{label1_value}:{label2_key}_{label2_value}` portion of the ID. - /// - /// Ex. id = "data-streams-reports:chain:ethereum@1.0.0" - /// labelledName = "data-streams-reports:chain:ethereum" - /// - /// bytes32(string); validation regex: ^[a-z0-9_\-:]{1,32}$ - bytes32 labelledName; - /// @notice Semver, e.g., "1.2.3" - /// @dev must be valid Semver + max 32 characters. - bytes32 version; - /// @notice Indicates whether remote response requires + // + // Ex. id = "data-streams-reports:chain:ethereum@1.0.0" + // labelledName = "data-streams-reports:chain:ethereum" + // + // validation regex: ^[a-z0-9_\-:]$ + string labelledName; + // Semver, e.g., "1.2.3" + // must be valid Semver. + string version; + // responseType indicates whether remote response requires // aggregation or is an OCR report. There are multiple possible // ways to aggregate. CapabilityResponseType responseType; @@ -583,8 +583,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @param labelledName The name of the capability /// @param version The capability's version number /// @return bytes32 A unique identifier for the capability - /// @dev The hash of the encoded labelledName and version - function getHashedCapabilityId(bytes32 labelledName, bytes32 version) public pure returns (bytes32) { + function getHashedCapabilityId(string calldata labelledName, string calldata version) public pure returns (bytes32) { return keccak256(abi.encodePacked(labelledName, version)); } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilityTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilityTest.t.sol index dbcc0ae1712..b19b846f54e 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilityTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilityTest.t.sol @@ -2,8 +2,6 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityConfigurationContract} from "./mocks/CapabilityConfigurationContract.sol"; - import {CapabilityRegistry} from "../CapabilityRegistry.sol"; contract CapabilityRegistry_AddCapabilityTest is BaseTest { @@ -47,10 +45,7 @@ contract CapabilityRegistry_AddCapabilityTest is BaseTest { function test_AddCapability_NoConfigurationContract() public { s_capabilityRegistry.addCapability(s_basicCapability); - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( - bytes32("data-streams-reports"), - bytes32("1.0.0") - ); + bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId("data-streams-reports", "1.0.0"); CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); assertEq(storedCapability.labelledName, s_basicCapability.labelledName); @@ -63,8 +58,8 @@ contract CapabilityRegistry_AddCapabilityTest is BaseTest { s_capabilityRegistry.addCapability(s_capabilityWithConfigurationContract); bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( - bytes32(s_capabilityWithConfigurationContract.labelledName), - bytes32(s_capabilityWithConfigurationContract.version) + s_capabilityWithConfigurationContract.labelledName, + s_capabilityWithConfigurationContract.version ); CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); diff --git a/core/capabilities/integration_tests/internal/testutils.go b/core/capabilities/integration_tests/internal/testutils.go new file mode 100644 index 00000000000..8e34736b3ce --- /dev/null +++ b/core/capabilities/integration_tests/internal/testutils.go @@ -0,0 +1,60 @@ +package testutils + +import ( + "fmt" + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/eth/ethconfig" + "github.com/stretchr/testify/require" + + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" +) + +// var OWNER_ADDR = types.MustEIP55Address("0x0000000000000000000000000000000000000001").Address() + +var DataStreamsReportCapability = kcr.CapabilityRegistryCapability{ + LabelledName: "data-streams-report", + Version: "1.0.0", + ResponseType: uint8(0), +} + +var WriteChainCapability = kcr.CapabilityRegistryCapability{ + LabelledName: "write-chain", + Version: "1.0.1", + ResponseType: uint8(1), +} + +func StartNewChain(t *testing.T) (*bind.TransactOpts, *backends.SimulatedBackend) { + owner := testutils.MustNewSimTransactor(t) + + oneEth, _ := new(big.Int).SetString("100000000000000000000", 10) + gasLimit := ethconfig.Defaults.Miner.GasCeil * 2 // 60 M blocks + + simulatedBackend := backends.NewSimulatedBackend(core.GenesisAlloc{owner.From: { + Balance: oneEth, + }}, gasLimit) + simulatedBackend.Commit() + + return owner, simulatedBackend +} + +func DeployCapabilityRegistry(t *testing.T, owner *bind.TransactOpts, simulatedBackend *backends.SimulatedBackend) (capabilityRegistry *kcr.CapabilityRegistry) { + capabilityRegistryAddress, _, capabilityRegistry, err := kcr.DeployCapabilityRegistry(owner, simulatedBackend) + require.NoError(t, err, "DeployCapabilityRegistry failed") + + fmt.Println("Deployed CapabilityRegistry at", capabilityRegistryAddress.Hex()) + simulatedBackend.Commit() + + return capabilityRegistry +} + +func AddCapability(t *testing.T, owner *bind.TransactOpts, simulatedBackend *backends.SimulatedBackend, capabilityRegistry *kcr.CapabilityRegistry, capability kcr.CapabilityRegistryCapability) { + _, err := capabilityRegistry.AddCapability(owner, capability) + require.NoError(t, err, "AddCapability failed for %s", capability.LabelledName) + simulatedBackend.Commit() +} diff --git a/core/capabilities/integration_tests/keystone_integration_test.go b/core/capabilities/integration_tests/keystone_integration_test.go new file mode 100644 index 00000000000..946b13b046d --- /dev/null +++ b/core/capabilities/integration_tests/keystone_integration_test.go @@ -0,0 +1,171 @@ +package capabilities_test + +import ( + "fmt" + "math/big" + "testing" + "time" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/stretchr/testify/require" + "github.com/test-go/testify/mock" + + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/mocks" + + cap "github.com/smartcontractkit/chainlink/v2/core/capabilities" + utils "github.com/smartcontractkit/chainlink/v2/core/capabilities/integration_tests/internal" + remoteMocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types/mocks" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" + evmmocks "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm/mocks" + "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types/mocks" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" +) + +func TestIntegration_GetCapabilities(t *testing.T) { + owner, simulatedBackend := utils.StartNewChain(t) + + capabilityRegistry := utils.DeployCapabilityRegistry(t, owner, simulatedBackend) + + utils.AddCapability(t, owner, simulatedBackend, capabilityRegistry, utils.DataStreamsReportCapability) + utils.AddCapability(t, owner, simulatedBackend, capabilityRegistry, utils.WriteChainCapability) + + capabilities, err := capabilityRegistry.GetCapabilities(&bind.CallOpts{}) + require.NoError(t, err, "GetCapabilities failed") + + fmt.Println("Capabilities:", capabilities) + + lggr := logger.TestLogger(t) + ctx := testutils.Context(t) + + simulatedBackendClient := client.NewSimulatedBackendClient(t, simulatedBackend, testutils.SimulatedChainID) + + // This requires having `CL_DATABASE_URL` set to something. DB does not appear to be used. + db := pgtest.NewSqlxDB(t) + lpOpts := logpoller.Opts{ + PollPeriod: time.Millisecond, + FinalityDepth: 4, + BackfillBatchSize: 1, + RpcBatchSize: 1, + KeepFinalizedBlocksDepth: 10000, + } + lp := logpoller.NewLogPoller( + logpoller.NewORM(testutils.SimulatedChainID, db, lggr), + simulatedBackendClient, + lggr, + lpOpts, + ) + + require.NoError(t, lp.Start(ctx)) + + // ========================================================================================== + // START - Using ChainReaderService - This works, but we want to use a relayer instead. + // ========================================================================================== + + // chainID, err := simulatedBackendClient.ChainID() + // require.NoError(t, err) + + // chainConfig := types.ChainReaderConfig{ + // Contracts: map[string]types.ChainContractReader{ + // "capability_registry": { + // ContractABI: keystone_capability_registry.CapabilityRegistryABI, + // Configs: map[string]*types.ChainReaderDefinition{ + // "get_capabilities": { + // ChainSpecificName: "getCapabilities", + // OutputModifications: codec.ModifiersConfig{ + // &codec.RenameModifierConfig{Fields: map[string]string{"labelledName": "name"}}, + // }, + // }, + // }, + // }, + // }, + // } + // cr, err := evm.NewChainReaderService(ctx, lggr, lp, simulatedBackendClient, chainConfig) + // require.NoError(t, err) + + // require.NoError(t, cr.Bind(ctx, []commontypes.BoundContract{ + // { + // Name: "capability_registry", + // Address: capabilityRegistry.Address().String(), + // }})) + + // require.NoError(t, cr.Start(ctx)) + + // type Cap struct { + // Name string + // Version string + // ResponseType int + // ConfigurationContract []byte + // } + + // var returnedCapabilities []Cap + + // err = cr.GetLatestValue(ctx, "capability_registry", "get_capabilities", nil, &returnedCapabilities) + // require.NoError(t, err) + + // fmt.Println("Returned capabilities:", returnedCapabilities) + + // ========================================================================================== + // END - Using ChainReaderService + // ========================================================================================== + + // SYNCER DEPENDENCIES + var pid ragetypes.PeerID + err = pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) + require.NoError(t, err) + peer := mocks.NewPeer(t) + peer.On("UpdateConnections", mock.Anything).Return(nil) + peer.On("ID").Return(pid) + wrapper := mocks.NewPeerWrapper(t) + wrapper.On("GetPeer").Return(peer) + workflowEngineCapabilitiesRegistry := commonMocks.NewCapabilitiesRegistry(t) + workflowEngineCapabilitiesRegistry.On("Add", mock.Anything, mock.Anything).Return(nil) + dispatcher := remoteMocks.NewDispatcher(t) + dispatcher.On("SetReceiver", mock.Anything, mock.Anything, mock.Anything).Return(nil) + + // ========================================================================================== + // Setting up a new relayer that reads from the simulated backend. This part doesn't work. + // ========================================================================================== + + keyStore := cltest.NewKeyStore(t, db) + mockChain := &evmmocks.Chain{} + c := client.NewSimulatedBackendClient(t, simulatedBackend, big.NewInt(1337)) + mockChain.On("Client").Return(c) + require.NoError(t, lp.Start(ctx)) + mockChain.On("LogPoller").Return(lp) + + relayer, err := evm.NewRelayer( + lggr, + mockChain, + evm.RelayerOpts{ + DS: db, + CSAETHKeystore: keyStore, + CapabilitiesRegistry: workflowEngineCapabilitiesRegistry, + }, + ) + require.NoError(t, err) + + syncer := cap.NewRegistrySyncer( + wrapper, + workflowEngineCapabilitiesRegistry, + dispatcher, + lggr, + relayer, // relayer + capabilityRegistry.Address().String(), + ) + + require.NoError(t, syncer.Start(ctx)) + + // Syncer.LocalState().getCapabilities() + // fmt.Println("Synced capabilities:", returnedCapabilities) + + // // Do assertions here + + // require.NoError(t, syncer.Close()) +} diff --git a/core/capabilities/syncer.go b/core/capabilities/syncer.go index 2567676bcd2..ae54261de5c 100644 --- a/core/capabilities/syncer.go +++ b/core/capabilities/syncer.go @@ -3,16 +3,24 @@ package capabilities import ( "context" "encoding/hex" + "fmt" "math/big" "slices" "sync" "time" + "github.com/ethereum/go-ethereum/common" + "github.com/gin-gonic/gin/internal/json" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/triggers" + "github.com/smartcontractkit/chainlink-common/pkg/codec" + "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/services" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/core" + evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" "github.com/smartcontractkit/libocr/ragep2p" ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" @@ -20,17 +28,65 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" "github.com/smartcontractkit/chainlink/v2/core/logger" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" ) +// CapabilityResponseType indicates whether remote response requires +// aggregation or is an already aggregated report. There are multiple +// possible ways to aggregate. +type CapabilityResponseType int + +// CapabilityResponseType enum values. +const ( + // No additional aggregation is needed on the remote response. + Report CapabilityResponseType = 0 + // A number of identical observations need to be aggregated. + ObservationIdentical CapabilityResponseType = 1 +) + +// CapabilityID is the unique identifier of the capability in the CR. +// It is calculated as keccak256(abi.encode(capabilityType, capabilityVersion)). +type CapabilityID = [32]byte + +type Capability struct { + ID CapabilityID + // The `Name` is a partially qualified ID for the capability. + // Validation: ^[a-z0-9_\-:]{1,32}$ + Name string + // Semver, e.g., "1.2.3" + Version string + ResponseType CapabilityResponseType + // An address to the capability configuration contract. Having this defined + // on a capability enforces consistent configuration across DON instances + // serving the same capability. + // + // The main use cases are: + // 1) Sharing capability configuration across DON instances + // 2) Inspect and modify on-chain configuration without off-chain + // capability code. + ConfigurationContract common.Address +} + +// RemoteRegistryState contains a local cache of the CapabilityRegistry deployed +// on-chain. It is updated by the syncer and is otherwise read-only. +type RemoteRegistryState struct { + Capabilities map[CapabilityID]Capability + CapabilityIDs []CapabilityID +} + type registrySyncer struct { - peerWrapper p2ptypes.PeerWrapper - registry core.CapabilitiesRegistry - dispatcher remotetypes.Dispatcher - subServices []services.Service - wg sync.WaitGroup - lggr logger.Logger + peerWrapper p2ptypes.PeerWrapper + registry core.CapabilitiesRegistry + dispatcher remotetypes.Dispatcher + subServices []services.Service + wg sync.WaitGroup + lggr logger.Logger + remoteRegistryState RemoteRegistryState + chainReader commontypes.ContractReader + relayer loop.Relayer + remoteRegistryAddress string } var _ services.Service = ®istrySyncer{} @@ -52,12 +108,21 @@ var defaultStreamConfig = p2ptypes.StreamConfig{ const maxRetryCount = 60 // RegistrySyncer updates local Registry to match its onchain counterpart -func NewRegistrySyncer(peerWrapper p2ptypes.PeerWrapper, registry core.CapabilitiesRegistry, dispatcher remotetypes.Dispatcher, lggr logger.Logger) *registrySyncer { +func NewRegistrySyncer( + peerWrapper p2ptypes.PeerWrapper, + registry core.CapabilitiesRegistry, + dispatcher remotetypes.Dispatcher, + lggr logger.Logger, + relayer loop.Relayer, + remoteRegistryAddress string, +) *registrySyncer { return ®istrySyncer{ - peerWrapper: peerWrapper, - registry: registry, - dispatcher: dispatcher, - lggr: lggr, + peerWrapper: peerWrapper, + registry: registry, + dispatcher: dispatcher, + lggr: lggr, + relayer: relayer, + remoteRegistryAddress: remoteRegistryAddress, } } @@ -70,6 +135,49 @@ func (s *registrySyncer) Start(ctx context.Context) error { // NOTE: this implementation of the Syncer is temporary and will be replaced by one // that reads the configuration from chain (KS-117). func (s *registrySyncer) launch(ctx context.Context) { + // Creating a JSON blob for chain-agnostic configuration + + contractReaderConfig := evmrelaytypes.ChainReaderConfig{ + Contracts: map[string]evmrelaytypes.ChainContractReader{ + "capability_registry": { + ContractABI: keystone_capability_registry.CapabilityRegistryABI, + Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ + "get_capabilities": { + ChainSpecificName: "getCapabilities", + OutputModifications: codec.ModifiersConfig{ + &codec.RenameModifierConfig{Fields: map[string]string{"labelledName": "name"}}, + }, + }, + }, + }, + }, + } + + contractReaderConfigEncoded, err := json.Marshal(contractReaderConfig) + if err != nil { + s.lggr.Errorw("failed to marshal contract reader config", "error", err) + } + + fmt.Println("contractReaderConfigEncoded", contractReaderConfigEncoded) + + cr, err := s.relayer.NewContractReader(ctx, contractReaderConfigEncoded) + + if err != nil { + // TODO: What to do here? + s.lggr.Errorw("failed to create contract reader", "error", err) + } + + err = cr.Bind(ctx, []commontypes.BoundContract{ + { + Name: "capability_registry", + Address: s.remoteRegistryAddress, + }}) + + if err != nil { + // TODO: What to do here? + s.lggr.Errorw("failed to bind to capability registry", "error", err) + } + defer s.wg.Done() // NOTE: temporary hard-coded DONs workflowDONPeers := []string{ diff --git a/core/capabilities/syncer_test.go b/core/capabilities/syncer_test.go index 757135635d8..b8f89974363 100644 --- a/core/capabilities/syncer_test.go +++ b/core/capabilities/syncer_test.go @@ -32,7 +32,7 @@ func TestSyncer_CleanStartClose(t *testing.T) { dispatcher := remoteMocks.NewDispatcher(t) dispatcher.On("SetReceiver", mock.Anything, mock.Anything, mock.Anything).Return(nil) - syncer := coreCapabilities.NewRegistrySyncer(wrapper, registry, dispatcher, lggr) + syncer := coreCapabilities.NewRegistrySyncer(wrapper, registry, dispatcher, lggr, "") require.NoError(t, syncer.Start(ctx)) require.NoError(t, syncer.Close()) } diff --git a/core/config/capabilities_config.go b/core/config/capabilities_config.go index 8cde986ccb7..86b0c9300c7 100644 --- a/core/config/capabilities_config.go +++ b/core/config/capabilities_config.go @@ -1,6 +1,15 @@ package config +type RemoteRegistry interface { + ContractAddress() string + Network() string + ChainID() string +} + type Capabilities interface { + // This enables Capability related features, such as DON-to-DON + // communication and CapabilityRegistry syncing. + Enabled() bool Peering() P2P - // NOTE: RegistrySyncer will need config with relay ID, chain ID and contract address when implemented + RemoteRegistry() RemoteRegistry } diff --git a/core/config/toml/types.go b/core/config/toml/types.go index e3e49dbb18b..f6cf71babc7 100644 --- a/core/config/toml/types.go +++ b/core/config/toml/types.go @@ -1406,12 +1406,28 @@ func (m *MercurySecrets) ValidateConfig() (err error) { return err } +type RemoteRegistry struct { + ContractAddress string + Network string + ChainID string +} + type Capabilities struct { - Peering P2P `toml:",omitempty"` + Enabled bool `toml:",omitempty"` + Peering P2P `toml:",omitempty"` + RemoteRegistry RemoteRegistry `toml:",omitempty"` } func (c *Capabilities) setFrom(f *Capabilities) { + c.Enabled = f.Enabled c.Peering.setFrom(&f.Peering) + c.RemoteRegistry.setFrom(&f.RemoteRegistry) +} + +func (rr *RemoteRegistry) setFrom(f *RemoteRegistry) { + rr.ContractAddress = f.ContractAddress + rr.Network = f.Network + rr.ChainID = f.ChainID } type ThresholdKeyShareSecrets struct { 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 1725189ced6..fb3319e94da 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 @@ -31,8 +31,8 @@ var ( ) type CapabilityRegistryCapability struct { - LabelledName [32]byte - Version [32]byte + LabelledName string + Version string ResponseType uint8 ConfigurationContract common.Address } @@ -63,8 +63,8 @@ type CapabilityRegistryNodeOperator struct { } var CapabilityRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"labelledName\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"version\",\"type\":\"bytes32\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"capability\",\"type\":\"tuple\"}],\"name\":\"addCapability\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"deprecateCapability\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"labelledName\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"version\",\"type\":\"bytes32\"},{\"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\":\"bytes32\",\"name\":\"labelledName\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"version\",\"type\":\"bytes32\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getDONCapabilityConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"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\":\"bytes32\",\"name\":\"labelledName\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"version\",\"type\":\"bytes32\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"},{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint256[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint256[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052601280546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b61437580620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c806365c14dc7116100ee5780639cb7c5f411610097578063c63239c511610071578063c63239c514610413578063ddbe4f8214610426578063e29581aa1461043b578063f2fde38b1461045157600080fd5b80639cb7c5f4146103cd578063ae3c241c146103ed578063b06e07a71461040057600080fd5b806373ac22b4116100c857806373ac22b41461038a57806379ba50971461039d5780638da5cb5b146103a557600080fd5b806365c14dc71461034257806366acaa33146103625780636ae5c5911461037757600080fd5b8063214502431161015b57806336b402fb1161013557806336b402fb146102b3578063398f3773146102fb57806350c946fe1461030e5780635e65e3091461032f57600080fd5b8063214502431461026b57806323537405146102805780632c01a1e8146102a057600080fd5b8063181f5a771161018c578063181f5a77146102035780631cdf6343146102455780631d05394c1461025857600080fd5b80630c5801e3146101b3578063117392ce146101c857806312570011146101db575b600080fd5b6101c66101c136600461328f565b610464565b005b6101c66101d63660046132fb565b610775565b6101ee6101e9366004613313565b6109c0565b60405190151581526020015b60405180910390f35b60408051808201909152601881527f4361706162696c697479526567697374727920312e302e30000000000000000060208201525b6040516101fa9190613390565b6101c66102533660046133a3565b6109d3565b6101c66102663660046133a3565b610aa3565b610273610be3565b6040516101fa91906134f5565b61029361028e36600461358e565b610d32565b6040516101fa91906135a9565b6101c66102ae3660046133a3565b610d65565b6102ed6102c13660046135bc565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6040519081526020016101fa565b6101c66103093660046133a3565b611009565b61032161031c366004613313565b6111cc565b6040516101fa92919061361f565b6101c661033d3660046133a3565b611201565b610355610350366004613313565b611704565b6040516101fa919061367c565b61036a6117ea565b6040516101fa919061368f565b6101c6610385366004613710565b6119a8565b6101c66103983660046133a3565b611a4b565b6101c6611eb1565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fa565b6103e06103db366004613313565b611fae565b6040516101fa9190613833565b6101c66103fb366004613313565b612058565b61023861040e366004613841565b612123565b6101c661042136600461386b565b6121f8565b61042e612287565b6040516101fa91906138fe565b61044361244d565b6040516101fa92919061394c565b6101c661045f366004613a2d565b6125d8565b8281146104ac576040517fab8b67c600000000000000000000000000000000000000000000000000000000815260048101849052602481018290526044015b60405180910390fd5b6000805473ffffffffffffffffffffffffffffffffffffffff16905b8481101561076d5760008686838181106104e4576104e4613a4a565b905060200201359050600085858481811061050157610501613a4a565b90506020028101906105139190613a79565b61051c90613b81565b805190915073ffffffffffffffffffffffffffffffffffffffff1661056d576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff1633148015906105aa57503373ffffffffffffffffffffffffffffffffffffffff851614155b156105e1576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516000838152600f602052604090205473ffffffffffffffffffffffffffffffffffffffff908116911614158061069357506020808201516040516106279201613390565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206000868152600f835292909220919261067a926001019101613c9a565b6040516020818303038152906040528051906020012014155b1561075a5780516000838152600f6020908152604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9093169290921782558201516001909101906107009082613d89565b50806000015173ffffffffffffffffffffffffffffffffffffffff167f14c8f513e8a6d86d2d16b0cb64976de4e72386c4f8068eca3b7354373f8fe97a838360200151604051610751929190613ea3565b60405180910390a25b50508061076690613eeb565b90506104c8565b505050505050565b61077d6125ec565b6040805182356020828101919091528084013582840152825180830384018152606090920190925280519101206107b560038261266f565b156107ec576040517fe288638f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107fe6080840160608501613a2d565b73ffffffffffffffffffffffffffffffffffffffff1614610969576108296080830160608401613a2d565b73ffffffffffffffffffffffffffffffffffffffff163b158061090957506108576080830160608401613a2d565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f73e8b41d00000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff91909116906301ffc9a790602401602060405180830381865afa1580156108e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109079190613f23565b155b156109695761091e6080830160608401613a2d565b6040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016104a3565b61097460038261268a565b506000818152600260205260409020829061098f8282613f40565b505060405181907f65610e5677eedff94555572640e442f89848a109ef8593fa927ac30b2565ff0690600090a25050565b60006109cd60058361266f565b92915050565b6109db6125ec565b60005b81811015610a9e5760008383838181106109fa576109fa613a4a565b602090810292909201356000818152600f9093526040832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155909350919050610a4b60018301826131f5565b50610a59905060078261268a565b506040518181527f1e5877d7b3001d1569bf733b76c7eceda58bd6c031e5b8d0b7042308ba2e9d4f9060200160405180910390a150610a9781613eeb565b90506109de565b505050565b610aab6125ec565b60005b81811015610a9e576000838383818110610aca57610aca613a4a565b9050602002016020810190610adf919061358e565b63ffffffff808216600090815260116020526040812080549394509264010000000090049091169003610b46576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff831660048201526024016104a3565b63ffffffff808316600081815260116020526040902080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000169055610b90916009919061268a16565b506040805163ffffffff84168152600060208201527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a1505080610bdc90613eeb565b9050610aae565b601254606090640100000000900463ffffffff1660006001610c056009612696565b601254610c209190640100000000900463ffffffff16613fc2565b610c2a9190613fc2565b67ffffffffffffffff811115610c4257610c42613ab7565b604051908082528060200260200182016040528015610cb857816020015b6040805160a08101825260008082526020808301829052928201526060808201819052608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610c605790505b509050600060015b838163ffffffff161015610d2957610ce2600963ffffffff8084169061266f16565b610d1957610cef816126a0565b838381518110610d0157610d01613a4a565b602002602001018190525081610d1690613eeb565b91505b610d2281613fd5565b9050610cc0565b50909392505050565b6040805160a08101825260008082526020820181905291810191909152606080820181905260808201526109cd826126a0565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015611003576000848483818110610d9f57610d9f613a4a565b602090810292909201356000818152601090935260409092206001015491925050151580610dfc576040517f64e2ee92000000000000000000000000000000000000000000000000000000008152600481018390526024016104a3565b60008281526010602090815260408083205463ffffffff168352600f82528083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001810180549293919291840191610e5690613c4d565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8290613c4d565b8015610ecf5780601f10610ea457610100808354040283529160200191610ecf565b820191906000526020600020905b815481529060010190602001808311610eb257829003601f168201915b505050505081525050905084158015610eff5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15610f36576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260106020526040902060010154610f5490600b90612939565b50600083815260106020526040902060020154610f7390600d90612939565b5060008381526010602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001681556001810183905560020191909155517f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320590610fe79085815260200190565b60405180910390a150505080610ffc90613eeb565b9050610d83565b50505050565b6110116125ec565b60005b81811015610a9e57600083838381811061103057611030613a4a565b90506020028101906110429190613a79565b61104b90613b81565b805190915073ffffffffffffffffffffffffffffffffffffffff1661109c576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600f909252939020825181547fffffffffffffffffffffffff000000000000000000000000000000000000000016921691909117815592519192909160018201906111289082613d89565b5050601280549091506000906111439063ffffffff16613fd5565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff167fda6697b182650034bd205cdc2dbfabb06bdb3a0a83a2b45bfefa3c4881284e0b8284602001516040516111b1929190613ea3565b60405180910390a25050806111c590613eeb565b9050611014565b60408051608081018252600080825260208201819052918101829052606080820152906111f883612945565b91509150915091565b60005b81811015610a9e57600083838381811061122057611220613a4a565b90506020028101906112329190613ff8565b61123b9061402c565b9050600061125e60005473ffffffffffffffffffffffffffffffffffffffff1690565b825163ffffffff166000908152600f602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff908116835260018201805496909116331496509394919390928401916112bb90613c4d565b80601f01602080910402602001604051908101604052809291908181526020018280546112e790613c4d565b80156113345780601f1061130957610100808354040283529160200191611334565b820191906000526020600020905b81548152906001019060200180831161131757829003601f168201915b5050505050815250509050811580156113645750805173ffffffffffffffffffffffffffffffffffffffff163314155b1561139b576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040808401516000908152601060205220600101541515806113f15783604001516040517f64e2ee920000000000000000000000000000000000000000000000000000000081526004016104a391815260200190565b6020840151158061143757508360200151601060008660400151815260200190815260200160002060010154141580156114375750602084015161143790600b9061266f565b1561146e576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606084015180516000036114b057806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016104a391906140ff565b60408581015160009081526010602052208054640100000000900463ffffffff169060046114dd83613fd5565b82546101009290920a63ffffffff8181021990931691831602179091556040878101516000908152601060205290812054640100000000900490911691505b82518110156115e85761155283828151811061153a5761153a613a4a565b6020026020010151600361266f90919063ffffffff16565b61158a57826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016104a391906140ff565b6115d783828151811061159f5761159f613a4a565b6020908102919091018101516040808b015160009081526010845281812063ffffffff80891683526003909101909452209161268a16565b506115e181613eeb565b905061151c565b5085516040808801805160009081526010602090815283822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9096169590951790945581518082528382206002015581518152828120600190810154948b015192518252929020909101541461169d5761166c600b82612939565b50602080880180516040808b015160009081526010909452909220600101919091555161169b90600b9061268a565b505b60408781015188516020808b0151845193845263ffffffff909216908301528183015290517ff101cfc54994c31624d25789378d71ec4dbdc533e26a4ecc6b7648f4798d09169181900360600190a150505050505050806116fd90613eeb565b9050611204565b6040805180820190915260008152606060208201526000828152600f60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff168352600181018054919284019161176190613c4d565b80601f016020809104026020016040519081016040528092919081815260200182805461178d90613c4d565b80156117da5780601f106117af576101008083540402835291602001916117da565b820191906000526020600020905b8154815290600101906020018083116117bd57829003601f168201915b5050505050815250509050919050565b60125460609063ffffffff16600060016118046007612696565b601254611817919063ffffffff16613fc2565b6118219190613fc2565b67ffffffffffffffff81111561183957611839613ab7565b60405190808252806020026020018201604052801561187f57816020015b6040805180820190915260008152606060208201528152602001906001900390816118575790505b509050600060015b8363ffffffff16811015610d29576118a060078261266f565b611998576000818152600f60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916118ec90613c4d565b80601f016020809104026020016040519081016040528092919081815260200182805461191890613c4d565b80156119655780601f1061193a57610100808354040283529160200191611965565b820191906000526020600020905b81548152906001019060200180831161194857829003601f168201915b50505050508152505083838151811061198057611980613a4a565b60200260200101819052508161199590613eeb565b91505b6119a181613eeb565b9050611887565b6119b06125ec565b601254640100000000900463ffffffff16600081815260116020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001682179055611a0781600188888888886129ea565b60128054600490611a2590640100000000900463ffffffff16613fd5565b91906101000a81548163ffffffff021916908363ffffffff160217905550505050505050565b60005b81811015610a9e576000838383818110611a6a57611a6a613a4a565b9050602002810190611a7c9190613ff8565b611a859061402c565b90506000611aa860005473ffffffffffffffffffffffffffffffffffffffff1690565b825163ffffffff166000908152600f602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff90811683526001820180549690911633149650939491939092840191611b0590613c4d565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3190613c4d565b8015611b7e5780601f10611b5357610100808354040283529160200191611b7e565b820191906000526020600020905b815481529060010190602001808311611b6157829003601f168201915b505050505081525050905081158015611bae5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611be5576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408084015160009081526010602052206001015415158080611c0a57506040840151155b15611c495783604001516040517f64e2ee920000000000000000000000000000000000000000000000000000000081526004016104a391815260200190565b60208401511580611c6657506020840151611c6690600b9061266f565b15611c9d576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608401518051600003611cdf57806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016104a391906140ff565b60408581015160009081526010602052208054600490611d0c90640100000000900463ffffffff16613fd5565b82546101009290920a63ffffffff81810219909316918316021790915560408681015160009081526010602052908120546401000000009004909116905b8251811015611dc657611d6883828151811061153a5761153a613a4a565b611da057826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016104a391906140ff565b611db583828151811061159f5761159f613a4a565b50611dbf81613eeb565b9050611d4a565b5085516040808801805160009081526010602090815283822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9687161790558251808352848320600201558a018051925182529290206001015551611e3891600b919061268a16565b506040860151611e4a90600d9061268a565b5060408681015187516020808a0151845193845263ffffffff909216908301528183015290517fc9296aa9b0951d8000e8ed7f2b5be30c5106de8df3dbedf9a57c93f5f9e4d7da9181900360600190a150505050505080611eaa90613eeb565b9050611a4e565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016104a3565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b604080516080808201835260008083526020808401829052838501829052606084018290528582526002808252918590208551938401865280548452600180820154928501929092529182015493949293919284019160ff169081111561201757612017613794565b600181111561202857612028613794565b815260029190910154610100900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b6120606125ec565b61206b60038261266f565b6120a4576040517fe181733f000000000000000000000000000000000000000000000000000000008152600481018290526024016104a3565b6120af60058261266f565b156120e9576040517ff7d7a294000000000000000000000000000000000000000000000000000000008152600481018290526024016104a3565b6120f460058261268a565b5060405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a250565b63ffffffff8083166000908152601160209081526040808320805464010000000090049094168084526001909401825280832085845260030190915290208054606092919061217190613c4d565b80601f016020809104026020016040519081016040528092919081815260200182805461219d90613c4d565b80156121ea5780601f106121bf576101008083540402835291602001916121ea565b820191906000526020600020905b8154815290600101906020018083116121cd57829003601f168201915b505050505091505092915050565b6122006125ec565b63ffffffff808716600090815260116020526040812054640100000000900490911690819003612264576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff881660048201526024016104a3565b61227e8761227183613fd5565b92508288888888886129ea565b50505050505050565b606060006122956003612e76565b905060006122a36005612696565b82516122af9190613fc2565b67ffffffffffffffff8111156122c7576122c7613ab7565b60405190808252806020026020018201604052801561233757816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816122e55790505b5090506000805b8351811015610d2957600084828151811061235b5761235b613a4a565b6020026020010151905061237981600561266f90919063ffffffff16565b61243c576002600082815260200190815260200160002060405180608001604052908160008201548152602001600182015481526020016002820160009054906101000a900460ff1660018111156123d3576123d3613794565b60018111156123e4576123e4613794565b815260029190910154610100900473ffffffffffffffffffffffffffffffffffffffff16602090910152845185908590811061242257612422613a4a565b6020026020010181905250828061243890613eeb565b9350505b5061244681613eeb565b905061233e565b606080600061245c600d612e76565b90506000815167ffffffffffffffff81111561247a5761247a613ab7565b6040519080825280602002602001820160405280156124e957816020015b60408051608081018252600080825260208083018290529282015260608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816124985790505b5090506000825167ffffffffffffffff81111561250857612508613ab7565b604051908082528060200260200182016040528015612531578160200160208202803683370190505b50905060005b83518110156125cd57600084828151811061255457612554613a4a565b6020026020010151905060008061256a83612945565b915091508186858151811061258157612581613a4a565b60200260200101819052508085858151811061259f5761259f613a4a565b602002602001019063ffffffff16908163ffffffff1681525050505050806125c690613eeb565b9050612537565b509094909350915050565b6125e06125ec565b6125e981612e83565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461266d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016104a3565b565b600081815260018301602052604081205415155b9392505050565b60006126838383612f78565b60006109cd825490565b6040805160a081018252600080825260208083018290528284018290526060808401819052608084015263ffffffff85811683526011825284832080546401000000009004909116808452600190910182528483206002810180548751818602810186019098528088529596929591949390919083018282801561274357602002820191906000526020600020905b81548152602001906001019080831161272f575b505050505090506000815167ffffffffffffffff81111561276657612766613ab7565b6040519080825280602002602001820160405280156127ac57816020015b6040805180820190915260008152606060208201528152602001906001900390816127845790505b50905060005b81518110156128cd5760405180604001604052808483815181106127d8576127d8613a4a565b602002602001015181526020018560030160008685815181106127fd576127fd613a4a565b60200260200101518152602001908152602001600020805461281e90613c4d565b80601f016020809104026020016040519081016040528092919081815260200182805461284a90613c4d565b80156128975780601f1061286c57610100808354040283529160200191612897565b820191906000526020600020905b81548152906001019060200180831161287a57829003601f168201915b50505050508152508282815181106128b1576128b1613a4a565b6020026020010181905250806128c690613eeb565b90506127b2565b506040805160a08101825263ffffffff888116600081815260116020818152868320548086168752948b168187015292909152905268010000000000000000900460ff161515918101919091526060810161292785612e76565b81526020019190915295945050505050565b60006126838383612fc7565b604080516080810182526000808252602082018190529181019190915260608082015260408051608081018252600084815260106020908152838220805463ffffffff8082168652600183015484870152600283015486880152640100000000909104168352600301905291822060608201906129c190612e76565b905260009384526010602052604090932054929364010000000090930463ffffffff1692915050565b63ffffffff8088166000908152601160209081526040808320938a16835260019093019052908120905b85811015612ad857612a41878783818110612a3157612a31613a4a565b859260209091020135905061266f565b15612aa25788878783818110612a5957612a59613a4a565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff909416600485015260200291909101356024830152506044016104a3565b612ac7878783818110612ab757612ab7613a4a565b859260209091020135905061268a565b50612ad181613eeb565b9050612a14565b5060005b83811015612db75736858583818110612af757612af7613a4a565b9050602002810190612b099190613a79565b9050612b176003823561266f565b612b50576040517fe181733f000000000000000000000000000000000000000000000000000000008152813560048201526024016104a3565b612b5c6005823561266f565b15612b96576040517ff7d7a294000000000000000000000000000000000000000000000000000000008152813560048201526024016104a3565b8035600090815260038401602052604081208054612bb390613c4d565b90501115612bfc576040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff8b166004820152813560248201526044016104a3565b60005b87811015612d0e57612ca38235601060008c8c86818110612c2257612c22613a4a565b9050602002013581526020019081526020016000206003016000601060008e8e88818110612c5257612c52613a4a565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002061266f90919063ffffffff16565b612cfe57888882818110612cb957612cb9613a4a565b6040517fa7e7925000000000000000000000000000000000000000000000000000000000815260209091029290920135600483015250823560248201526044016104a3565b612d0781613eeb565b9050612bff565b5060028301805460018101825560009182526020918290208335910155612d3790820182614137565b82356000908152600386016020526040902091612d5591908361419c565b50612da68a8a83358b8b612d6c6020880188614137565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506130ba92505050565b50612db081613eeb565b9050612adc565b5063ffffffff88811660008181526011602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffffff1668010000000000000000881515027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1617640100000000958d1695860217905581519283528201929092527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a15050505050505050565b6060600061268383613199565b3373ffffffffffffffffffffffffffffffffffffffff821603612f02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016104a3565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000818152600183016020526040812054612fbf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109cd565b5060006109cd565b600081815260018301602052604081205480156130b0576000612feb600183613fc2565b8554909150600090612fff90600190613fc2565b905081811461306457600086600001828154811061301f5761301f613a4a565b906000526020600020015490508087600001848154811061304257613042613a4a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613075576130756142b7565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109cd565b60009150506109cd565b60008481526002602081905260409091200154610100900473ffffffffffffffffffffffffffffffffffffffff161561076d57600084815260026020819052604091829020015490517ffba64a7c00000000000000000000000000000000000000000000000000000000815261010090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c9061315f908690869086908b908d906004016142e6565b600060405180830381600087803b15801561317957600080fd5b505af115801561318d573d6000803e3d6000fd5b50505050505050505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156131e957602002820191906000526020600020905b8154815260200190600101908083116131d5575b50505050509050919050565b50805461320190613c4d565b6000825580601f10613211575050565b601f0160209004906000526020600020908101906125e991905b8082111561323f576000815560010161322b565b5090565b60008083601f84011261325557600080fd5b50813567ffffffffffffffff81111561326d57600080fd5b6020830191508360208260051b850101111561328857600080fd5b9250929050565b600080600080604085870312156132a557600080fd5b843567ffffffffffffffff808211156132bd57600080fd5b6132c988838901613243565b909650945060208701359150808211156132e257600080fd5b506132ef87828801613243565b95989497509550505050565b60006080828403121561330d57600080fd5b50919050565b60006020828403121561332557600080fd5b5035919050565b6000815180845260005b8181101561335257602081850181015186830182015201613336565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000612683602083018461332c565b600080602083850312156133b657600080fd5b823567ffffffffffffffff8111156133cd57600080fd5b6133d985828601613243565b90969095509350505050565b600081518084526020808501945080840160005b83811015613415578151875295820195908201906001016133f9565b509495945050505050565b600063ffffffff8083511684526020818185015116818601526040915081840151151582860152606084015160a0606087015261346060a08701826133e5565b9050608085015186820360808801528181518084528484019150848160051b850101858401935060005b828110156134e7578582037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00184528451805183528701518783018990526134d48984018261332c565b958801959488019492505060010161348a565b509998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613568577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613556858351613420565b9450928501929085019060010161351c565b5092979650505050505050565b803563ffffffff8116811461358957600080fd5b919050565b6000602082840312156135a057600080fd5b61268382613575565b6020815260006126836020830184613420565b600080604083850312156135cf57600080fd5b50508035926020909101359150565b63ffffffff81511682526020810151602083015260408101516040830152600060608201516080606085015261361760808501826133e5565b949350505050565b60408152600061363260408301856135de565b905063ffffffff831660208301529392505050565b73ffffffffffffffffffffffffffffffffffffffff81511682526000602082015160406020850152613617604085018261332c565b6020815260006126836020830184613647565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613568577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526136f0858351613647565b945092850192908501906001016136b6565b80151581146125e957600080fd5b60008060008060006060868803121561372857600080fd5b853567ffffffffffffffff8082111561374057600080fd5b61374c89838a01613243565b9097509550602088013591508082111561376557600080fd5b5061377288828901613243565b909450925050604086013561378681613702565b809150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b805182526020810151602083015260408101516002811061380d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b604083015260609081015173ffffffffffffffffffffffffffffffffffffffff16910152565b608081016109cd82846137c3565b6000806040838503121561385457600080fd5b61385d83613575565b946020939093013593505050565b6000806000806000806080878903121561388457600080fd5b61388d87613575565b9550602087013567ffffffffffffffff808211156138aa57600080fd5b6138b68a838b01613243565b909750955060408901359150808211156138cf57600080fd5b506138dc89828a01613243565b90945092505060608701356138f081613702565b809150509295509295509295565b6020808252825182820181905260009190848201906040850190845b818110156139405761392d8385516137c3565b928401926080929092019160010161391a565b50909695505050505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b838110156139c1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08887030185526139af8683516135de565b95509382019390820190600101613975565b50508584038187015286518085528782019482019350915060005b828110156139fe57845163ffffffff16845293810193928101926001016139dc565b5091979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff811681146125e957600080fd5b600060208284031215613a3f57600080fd5b813561268381613a0b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613aad57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613b0957613b09613ab7565b60405290565b6040516080810167ffffffffffffffff81118282101715613b0957613b09613ab7565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613b7957613b79613ab7565b604052919050565b600060408236031215613b9357600080fd5b613b9b613ae6565b8235613ba681613a0b565b815260208381013567ffffffffffffffff80821115613bc457600080fd5b9085019036601f830112613bd757600080fd5b813581811115613be957613be9613ab7565b613c19847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613b32565b91508082523684828501011115613c2f57600080fd5b80848401858401376000908201840152918301919091525092915050565b600181811c90821680613c6157607f821691505b60208210810361330d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000602080835260008454613cae81613c4d565b80848701526040600180841660008114613ccf5760018114613d0757613d35565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550613d35565b896000528660002060005b85811015613d2d5781548b8201860152908301908801613d12565b8a0184019650505b509398975050505050505050565b601f821115610a9e57600081815260208120601f850160051c81016020861015613d6a5750805b601f850160051c820191505b8181101561076d57828155600101613d76565b815167ffffffffffffffff811115613da357613da3613ab7565b613db781613db18454613c4d565b84613d43565b602080601f831160018114613e0a5760008415613dd45750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561076d565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613e5757888601518255948401946001909101908401613e38565b5085821015613e9357878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b828152604060208201526000613617604083018461332c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613f1c57613f1c613ebc565b5060010190565b600060208284031215613f3557600080fd5b815161268381613702565b813581556020820135600182015560028101604083013560028110613f6457600080fd5b81546060850135613f7481613a0b565b74ffffffffffffffffffffffffffffffffffffffff008160081b1660ff84167fffffffffffffffffffffff000000000000000000000000000000000000000000841617178455505050505050565b818103818111156109cd576109cd613ebc565b600063ffffffff808316818103613fee57613fee613ebc565b6001019392505050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112613aad57600080fd5b60006080823603121561403e57600080fd5b614046613b0f565b61404f83613575565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff8082111561408057600080fd5b9085019036601f83011261409357600080fd5b8135818111156140a5576140a5613ab7565b8060051b91506140b6848301613b32565b81815291830184019184810190368411156140d057600080fd5b938501935b838510156140ee578435825293850193908501906140d5565b606087015250939695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156139405783518352928401929184019160010161411b565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261416c57600080fd5b83018035915067ffffffffffffffff82111561418757600080fd5b60200191503681900382131561328857600080fd5b67ffffffffffffffff8311156141b4576141b4613ab7565b6141c8836141c28354613c4d565b83613d43565b6000601f84116001811461421a57600085156141e45750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556142b0565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156142695786850135825560209485019460019092019101614249565b50868210156142a4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561431f57600080fd5b8560051b808860a0850137820182810360a090810160208501526143459082018761332c565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"capability\",\"type\":\"tuple\"}],\"name\":\"addCapability\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"deprecateCapability\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.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.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getDONCapabilityConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeOperatorId\",\"type\":\"uint256\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"},{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint256[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint256[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052601280546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b61485c80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c806365c14dc7116100ee5780639cb7c5f411610097578063c63239c511610071578063c63239c5146103ec578063ddbe4f82146103ff578063e29581aa14610414578063f2fde38b1461042a57600080fd5b80639cb7c5f4146103a6578063ae3c241c146103c6578063b06e07a7146103d957600080fd5b806373ac22b4116100c857806373ac22b41461036357806379ba5097146103765780638da5cb5b1461037e57600080fd5b806365c14dc71461031b57806366acaa331461033b5780636ae5c5911461035057600080fd5b8063214502431161015b578063398f377311610135578063398f3773146102c15780634810b7fe146102d457806350c946fe146102e75780635e65e3091461030857600080fd5b80632145024314610279578063235374051461028e5780632c01a1e8146102ae57600080fd5b8063181f5a771161018c578063181f5a77146102115780631cdf6343146102535780631d05394c1461026657600080fd5b80630c5801e3146101b35780630fe5800a146101c857806312570011146101ee575b600080fd5b6101c66101c136600461349a565b61043d565b005b6101db6101d6366004613548565b61074e565b6040519081526020015b60405180910390f35b6102016101fc3660046135a8565b610787565b60405190151581526020016101e5565b60408051808201909152601881527f4361706162696c697479526567697374727920312e302e30000000000000000060208201525b6040516101e59190613625565b6101c6610261366004613638565b61079a565b6101c6610274366004613638565b61086a565b6102816109aa565b6040516101e5919061378a565b6102a161029c366004613823565b610af9565b6040516101e5919061383e565b6101c66102bc366004613638565b610b2c565b6101c66102cf366004613638565b610dd0565b6101c66102e2366004613851565b610f93565b6102fa6102f53660046135a8565b6111cf565b6040516101e59291906138cd565b6101c6610316366004613638565b611204565b61032e6103293660046135a8565b611707565b6040516101e5919061392a565b6103436117ed565b6040516101e5919061393d565b6101c661035e3660046139be565b6119ab565b6101c6610371366004613638565b611a4e565b6101c6611eb4565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e5565b6103b96103b43660046135a8565b611fb1565b6040516101e59190613b0b565b6101c66103d43660046135a8565b612175565b6102466103e7366004613b1e565b612240565b6101c66103fa366004613b48565b612315565b6104076123a4565b6040516101e59190613bdb565b61041c612658565b6040516101e5929190613c4e565b6101c6610438366004613d2f565b6127e3565b828114610485576040517fab8b67c600000000000000000000000000000000000000000000000000000000815260048101849052602481018290526044015b60405180910390fd5b6000805473ffffffffffffffffffffffffffffffffffffffff16905b848110156107465760008686838181106104bd576104bd613d4c565b90506020020135905060008585848181106104da576104da613d4c565b90506020028101906104ec9190613d7b565b6104f590613e83565b805190915073ffffffffffffffffffffffffffffffffffffffff16610546576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061058357503373ffffffffffffffffffffffffffffffffffffffff851614155b156105ba576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516000838152600f602052604090205473ffffffffffffffffffffffffffffffffffffffff908116911614158061066c57506020808201516040516106009201613625565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206000868152600f8352929092209192610653926001019101613fa2565b6040516020818303038152906040528051906020012014155b156107335780516000838152600f6020908152604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9093169290921782558201516001909101906106d99082614091565b50806000015173ffffffffffffffffffffffffffffffffffffffff167f14c8f513e8a6d86d2d16b0cb64976de4e72386c4f8068eca3b7354373f8fe97a83836020015160405161072a9291906141ab565b60405180910390a25b50508061073f906141f3565b90506104a1565b505050505050565b600084848484604051602001610767949392919061422b565b604051602081830303815290604052805190602001209050949350505050565b60006107946005836127f7565b92915050565b6107a2612812565b60005b818110156108655760008383838181106107c1576107c1613d4c565b602090810292909201356000818152600f9093526040832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681559093509190506108126001830182613400565b506108209050600782612895565b506040518181527f1e5877d7b3001d1569bf733b76c7eceda58bd6c031e5b8d0b7042308ba2e9d4f9060200160405180910390a15061085e816141f3565b90506107a5565b505050565b610872612812565b60005b8181101561086557600083838381811061089157610891613d4c565b90506020020160208101906108a69190613823565b63ffffffff80821660009081526011602052604081208054939450926401000000009004909116900361090d576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8316600482015260240161047c565b63ffffffff808316600081815260116020526040902080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000169055610957916009919061289516565b506040805163ffffffff84168152600060208201527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a15050806109a3906141f3565b9050610875565b601254606090640100000000900463ffffffff16600060016109cc60096128a1565b6012546109e79190640100000000900463ffffffff1661424d565b6109f1919061424d565b67ffffffffffffffff811115610a0957610a09613db9565b604051908082528060200260200182016040528015610a7f57816020015b6040805160a08101825260008082526020808301829052928201526060808201819052608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610a275790505b509050600060015b838163ffffffff161015610af057610aa9600963ffffffff808416906127f716565b610ae057610ab6816128ab565b838381518110610ac857610ac8613d4c565b602002602001018190525081610add906141f3565b91505b610ae981614260565b9050610a87565b50909392505050565b6040805160a0810182526000808252602082018190529181019190915260608082018190526080820152610794826128ab565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610dca576000848483818110610b6657610b66613d4c565b602090810292909201356000818152601090935260409092206001015491925050151580610bc3576040517f64e2ee920000000000000000000000000000000000000000000000000000000081526004810183905260240161047c565b60008281526010602090815260408083205463ffffffff168352600f82528083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001810180549293919291840191610c1d90613f4f565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4990613f4f565b8015610c965780601f10610c6b57610100808354040283529160200191610c96565b820191906000526020600020905b815481529060010190602001808311610c7957829003601f168201915b505050505081525050905084158015610cc65750805173ffffffffffffffffffffffffffffffffffffffff163314155b15610cfd576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260106020526040902060010154610d1b90600b90612b44565b50600083815260106020526040902060020154610d3a90600d90612b44565b5060008381526010602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001681556001810183905560020191909155517f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320590610dae9085815260200190565b60405180910390a150505080610dc3906141f3565b9050610b4a565b50505050565b610dd8612812565b60005b81811015610865576000838383818110610df757610df7613d4c565b9050602002810190610e099190613d7b565b610e1290613e83565b805190915073ffffffffffffffffffffffffffffffffffffffff16610e63576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601254604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600f909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610eef9082614091565b505060128054909150600090610f0a9063ffffffff16614260565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff167fda6697b182650034bd205cdc2dbfabb06bdb3a0a83a2b45bfefa3c4881284e0b828460200151604051610f789291906141ab565b60405180910390a2505080610f8c906141f3565b9050610ddb565b610f9b612812565b6000610fb7610faa8380614283565b6101d66020860186614283565b9050610fc46003826127f7565b15610ffb576040517fe288638f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061100d6080840160608501613d2f565b73ffffffffffffffffffffffffffffffffffffffff1614611178576110386080830160608401613d2f565b73ffffffffffffffffffffffffffffffffffffffff163b158061111857506110666080830160608401613d2f565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f73e8b41d00000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff91909116906301ffc9a790602401602060405180830381865afa1580156110f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111691906142e8565b155b156111785761112d6080830160608401613d2f565b6040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240161047c565b611183600382612895565b506000818152600260205260409020829061119e82826144a6565b505060405181907f65610e5677eedff94555572640e442f89848a109ef8593fa927ac30b2565ff0690600090a25050565b60408051608081018252600080825260208201819052918101829052606080820152906111fb83612b50565b91509150915091565b60005b8181101561086557600083838381811061122357611223613d4c565b90506020028101906112359190614653565b61123e90614687565b9050600061126160005473ffffffffffffffffffffffffffffffffffffffff1690565b825163ffffffff166000908152600f602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff908116835260018201805496909116331496509394919390928401916112be90613f4f565b80601f01602080910402602001604051908101604052809291908181526020018280546112ea90613f4f565b80156113375780601f1061130c57610100808354040283529160200191611337565b820191906000526020600020905b81548152906001019060200180831161131a57829003601f168201915b5050505050815250509050811580156113675750805173ffffffffffffffffffffffffffffffffffffffff163314155b1561139e576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040808401516000908152601060205220600101541515806113f45783604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161047c91815260200190565b6020840151158061143a575083602001516010600086604001518152602001908152602001600020600101541415801561143a5750602084015161143a90600b906127f7565b15611471576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606084015180516000036114b357806040517f3748d4c600000000000000000000000000000000000000000000000000000000815260040161047c919061475a565b60408581015160009081526010602052208054640100000000900463ffffffff169060046114e083614260565b82546101009290920a63ffffffff8181021990931691831602179091556040878101516000908152601060205290812054640100000000900490911691505b82518110156115eb5761155583828151811061153d5761153d613d4c565b602002602001015160036127f790919063ffffffff16565b61158d57826040517f3748d4c600000000000000000000000000000000000000000000000000000000815260040161047c919061475a565b6115da8382815181106115a2576115a2613d4c565b6020908102919091018101516040808b015160009081526010845281812063ffffffff80891683526003909101909452209161289516565b506115e4816141f3565b905061151f565b5085516040808801805160009081526010602090815283822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9096169590951790945581518082528382206002015581518152828120600190810154948b01519251825292902090910154146116a05761166f600b82612b44565b50602080880180516040808b015160009081526010909452909220600101919091555161169e90600b90612895565b505b60408781015188516020808b0151845193845263ffffffff909216908301528183015290517ff101cfc54994c31624d25789378d71ec4dbdc533e26a4ecc6b7648f4798d09169181900360600190a15050505050505080611700906141f3565b9050611207565b6040805180820190915260008152606060208201526000828152600f60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff168352600181018054919284019161176490613f4f565b80601f016020809104026020016040519081016040528092919081815260200182805461179090613f4f565b80156117dd5780601f106117b2576101008083540402835291602001916117dd565b820191906000526020600020905b8154815290600101906020018083116117c057829003601f168201915b5050505050815250509050919050565b60125460609063ffffffff166000600161180760076128a1565b60125461181a919063ffffffff1661424d565b611824919061424d565b67ffffffffffffffff81111561183c5761183c613db9565b60405190808252806020026020018201604052801561188257816020015b60408051808201909152600081526060602082015281526020019060019003908161185a5790505b509050600060015b8363ffffffff16811015610af0576118a36007826127f7565b61199b576000818152600f60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916118ef90613f4f565b80601f016020809104026020016040519081016040528092919081815260200182805461191b90613f4f565b80156119685780601f1061193d57610100808354040283529160200191611968565b820191906000526020600020905b81548152906001019060200180831161194b57829003601f168201915b50505050508152505083838151811061198357611983613d4c565b602002602001018190525081611998906141f3565b91505b6119a4816141f3565b905061188a565b6119b3612812565b601254640100000000900463ffffffff16600081815260116020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001682179055611a0a8160018888888888612bf5565b60128054600490611a2890640100000000900463ffffffff16614260565b91906101000a81548163ffffffff021916908363ffffffff160217905550505050505050565b60005b81811015610865576000838383818110611a6d57611a6d613d4c565b9050602002810190611a7f9190614653565b611a8890614687565b90506000611aab60005473ffffffffffffffffffffffffffffffffffffffff1690565b825163ffffffff166000908152600f602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff90811683526001820180549690911633149650939491939092840191611b0890613f4f565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3490613f4f565b8015611b815780601f10611b5657610100808354040283529160200191611b81565b820191906000526020600020905b815481529060010190602001808311611b6457829003601f168201915b505050505081525050905081158015611bb15750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611be8576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408084015160009081526010602052206001015415158080611c0d57506040840151155b15611c4c5783604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161047c91815260200190565b60208401511580611c6957506020840151611c6990600b906127f7565b15611ca0576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608401518051600003611ce257806040517f3748d4c600000000000000000000000000000000000000000000000000000000815260040161047c919061475a565b60408581015160009081526010602052208054600490611d0f90640100000000900463ffffffff16614260565b82546101009290920a63ffffffff81810219909316918316021790915560408681015160009081526010602052908120546401000000009004909116905b8251811015611dc957611d6b83828151811061153d5761153d613d4c565b611da357826040517f3748d4c600000000000000000000000000000000000000000000000000000000815260040161047c919061475a565b611db88382815181106115a2576115a2613d4c565b50611dc2816141f3565b9050611d4d565b5085516040808801805160009081526010602090815283822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9687161790558251808352848320600201558a018051925182529290206001015551611e3b91600b919061289516565b506040860151611e4d90600d90612895565b5060408681015187516020808a0151845193845263ffffffff909216908301528183015290517fc9296aa9b0951d8000e8ed7f2b5be30c5106de8df3dbedf9a57c93f5f9e4d7da9181900360600190a150505050505080611ead906141f3565b9050611a51565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f35576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161047c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611fda604080516080810182526060808252602082015290810160008152600060209091015290565b6000828152600260205260409081902081516080810190925280548290829061200290613f4f565b80601f016020809104026020016040519081016040528092919081815260200182805461202e90613f4f565b801561207b5780601f106120505761010080835404028352916020019161207b565b820191906000526020600020905b81548152906001019060200180831161205e57829003601f168201915b5050505050815260200160018201805461209490613f4f565b80601f01602080910402602001604051908101604052809291908181526020018280546120c090613f4f565b801561210d5780601f106120e25761010080835404028352916020019161210d565b820191906000526020600020905b8154815290600101906020018083116120f057829003601f168201915b5050509183525050600282015460209091019060ff16600181111561213457612134613a42565b600181111561214557612145613a42565b815260029190910154610100900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b61217d612812565b6121886003826127f7565b6121c1576040517fe181733f0000000000000000000000000000000000000000000000000000000081526004810182905260240161047c565b6121cc6005826127f7565b15612206576040517ff7d7a2940000000000000000000000000000000000000000000000000000000081526004810182905260240161047c565b612211600582612895565b5060405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a250565b63ffffffff8083166000908152601160209081526040808320805464010000000090049094168084526001909401825280832085845260030190915290208054606092919061228e90613f4f565b80601f01602080910402602001604051908101604052809291908181526020018280546122ba90613f4f565b80156123075780601f106122dc57610100808354040283529160200191612307565b820191906000526020600020905b8154815290600101906020018083116122ea57829003601f168201915b505050505091505092915050565b61231d612812565b63ffffffff808716600090815260116020526040812054640100000000900490911690819003612381576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8816600482015260240161047c565b61239b8761238e83614260565b9250828888888888612bf5565b50505050505050565b606060006123b26003613081565b905060006123c060056128a1565b82516123cc919061424d565b67ffffffffffffffff8111156123e4576123e4613db9565b60405190808252806020026020018201604052801561243e57816020015b61242b604080516080810182526060808252602082015290810160008152600060209091015290565b8152602001906001900390816124025790505b5090506000805b8351811015610af057600084828151811061246257612462613d4c565b602002602001015190506124808160056127f790919063ffffffff16565b61264757600081815260026020526040908190208151608081019092528054829082906124ac90613f4f565b80601f01602080910402602001604051908101604052809291908181526020018280546124d890613f4f565b80156125255780601f106124fa57610100808354040283529160200191612525565b820191906000526020600020905b81548152906001019060200180831161250857829003601f168201915b5050505050815260200160018201805461253e90613f4f565b80601f016020809104026020016040519081016040528092919081815260200182805461256a90613f4f565b80156125b75780601f1061258c576101008083540402835291602001916125b7565b820191906000526020600020905b81548152906001019060200180831161259a57829003601f168201915b5050509183525050600282015460209091019060ff1660018111156125de576125de613a42565b60018111156125ef576125ef613a42565b815260029190910154610100900473ffffffffffffffffffffffffffffffffffffffff16602090910152845185908590811061262d5761262d613d4c565b60200260200101819052508280612643906141f3565b9350505b50612651816141f3565b9050612445565b6060806000612667600d613081565b90506000815167ffffffffffffffff81111561268557612685613db9565b6040519080825280602002602001820160405280156126f457816020015b60408051608081018252600080825260208083018290529282015260608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816126a35790505b5090506000825167ffffffffffffffff81111561271357612713613db9565b60405190808252806020026020018201604052801561273c578160200160208202803683370190505b50905060005b83518110156127d857600084828151811061275f5761275f613d4c565b6020026020010151905060008061277583612b50565b915091508186858151811061278c5761278c613d4c565b6020026020010181905250808585815181106127aa576127aa613d4c565b602002602001019063ffffffff16908163ffffffff1681525050505050806127d1906141f3565b9050612742565b509094909350915050565b6127eb612812565b6127f48161308e565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161047c565b565b600061280b8383613183565b6000610794825490565b6040805160a081018252600080825260208083018290528284018290526060808401819052608084015263ffffffff85811683526011825284832080546401000000009004909116808452600190910182528483206002810180548751818602810186019098528088529596929591949390919083018282801561294e57602002820191906000526020600020905b81548152602001906001019080831161293a575b505050505090506000815167ffffffffffffffff81111561297157612971613db9565b6040519080825280602002602001820160405280156129b757816020015b60408051808201909152600081526060602082015281526020019060019003908161298f5790505b50905060005b8151811015612ad85760405180604001604052808483815181106129e3576129e3613d4c565b60200260200101518152602001856003016000868581518110612a0857612a08613d4c565b602002602001015181526020019081526020016000208054612a2990613f4f565b80601f0160208091040260200160405190810160405280929190818152602001828054612a5590613f4f565b8015612aa25780601f10612a7757610100808354040283529160200191612aa2565b820191906000526020600020905b815481529060010190602001808311612a8557829003601f168201915b5050505050815250828281518110612abc57612abc613d4c565b602002602001018190525080612ad1906141f3565b90506129bd565b506040805160a08101825263ffffffff888116600081815260116020818152868320548086168752948b168187015292909152905268010000000000000000900460ff1615159181019190915260608101612b3285613081565b81526020019190915295945050505050565b600061280b83836131d2565b604080516080810182526000808252602082018190529181019190915260608082015260408051608081018252600084815260106020908152838220805463ffffffff808216865260018301548487015260028301548688015264010000000090910416835260030190529182206060820190612bcc90613081565b905260009384526010602052604090932054929364010000000090930463ffffffff1692915050565b63ffffffff8088166000908152601160209081526040808320938a16835260019093019052908120905b85811015612ce357612c4c878783818110612c3c57612c3c613d4c565b85926020909102013590506127f7565b15612cad5788878783818110612c6457612c64613d4c565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff9094166004850152602002919091013560248301525060440161047c565b612cd2878783818110612cc257612cc2613d4c565b8592602090910201359050612895565b50612cdc816141f3565b9050612c1f565b5060005b83811015612fc25736858583818110612d0257612d02613d4c565b9050602002810190612d149190613d7b565b9050612d22600382356127f7565b612d5b576040517fe181733f0000000000000000000000000000000000000000000000000000000081528135600482015260240161047c565b612d67600582356127f7565b15612da1576040517ff7d7a2940000000000000000000000000000000000000000000000000000000081528135600482015260240161047c565b8035600090815260038401602052604081208054612dbe90613f4f565b90501115612e07576040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff8b1660048201528135602482015260440161047c565b60005b87811015612f1957612eae8235601060008c8c86818110612e2d57612e2d613d4c565b9050602002013581526020019081526020016000206003016000601060008e8e88818110612e5d57612e5d613d4c565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000206127f790919063ffffffff16565b612f0957888882818110612ec457612ec4613d4c565b6040517fa7e79250000000000000000000000000000000000000000000000000000000008152602090910292909201356004830152508235602482015260440161047c565b612f12816141f3565b9050612e0a565b5060028301805460018101825560009182526020918290208335910155612f4290820182614283565b82356000908152600386016020526040902091612f60919083614305565b50612fb18a8a83358b8b612f776020880188614283565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506132c592505050565b50612fbb816141f3565b9050612ce7565b5063ffffffff88811660008181526011602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffffff1668010000000000000000881515027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1617640100000000958d1695860217905581519283528201929092527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a15050505050505050565b6060600061280b836133a4565b3373ffffffffffffffffffffffffffffffffffffffff82160361310d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161047c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008181526001830160205260408120546131ca57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610794565b506000610794565b600081815260018301602052604081205480156132bb5760006131f660018361424d565b855490915060009061320a9060019061424d565b905081811461326f57600086600001828154811061322a5761322a613d4c565b906000526020600020015490508087600001848154811061324d5761324d613d4c565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806132805761328061479e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610794565b6000915050610794565b60008481526002602081905260409091200154610100900473ffffffffffffffffffffffffffffffffffffffff161561074657600084815260026020819052604091829020015490517ffba64a7c00000000000000000000000000000000000000000000000000000000815261010090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c9061336a908690869086908b908d906004016147cd565b600060405180830381600087803b15801561338457600080fd5b505af1158015613398573d6000803e3d6000fd5b50505050505050505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156133f457602002820191906000526020600020905b8154815260200190600101908083116133e0575b50505050509050919050565b50805461340c90613f4f565b6000825580601f1061341c575050565b601f0160209004906000526020600020908101906127f491905b8082111561344a5760008155600101613436565b5090565b60008083601f84011261346057600080fd5b50813567ffffffffffffffff81111561347857600080fd5b6020830191508360208260051b850101111561349357600080fd5b9250929050565b600080600080604085870312156134b057600080fd5b843567ffffffffffffffff808211156134c857600080fd5b6134d48883890161344e565b909650945060208701359150808211156134ed57600080fd5b506134fa8782880161344e565b95989497509550505050565b60008083601f84011261351857600080fd5b50813567ffffffffffffffff81111561353057600080fd5b60208301915083602082850101111561349357600080fd5b6000806000806040858703121561355e57600080fd5b843567ffffffffffffffff8082111561357657600080fd5b61358288838901613506565b9096509450602087013591508082111561359b57600080fd5b506134fa87828801613506565b6000602082840312156135ba57600080fd5b5035919050565b6000815180845260005b818110156135e7576020818501810151868301820152016135cb565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061280b60208301846135c1565b6000806020838503121561364b57600080fd5b823567ffffffffffffffff81111561366257600080fd5b61366e8582860161344e565b90969095509350505050565b600081518084526020808501945080840160005b838110156136aa5781518752958201959082019060010161368e565b509495945050505050565b600063ffffffff8083511684526020818185015116818601526040915081840151151582860152606084015160a060608701526136f560a087018261367a565b9050608085015186820360808801528181518084528484019150848160051b850101858401935060005b8281101561377c578582037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018452845180518352870151878301899052613769898401826135c1565b958801959488019492505060010161371f565b509998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156137fd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526137eb8583516136b5565b945092850192908501906001016137b1565b5092979650505050505050565b803563ffffffff8116811461381e57600080fd5b919050565b60006020828403121561383557600080fd5b61280b8261380a565b60208152600061280b60208301846136b5565b60006020828403121561386357600080fd5b813567ffffffffffffffff81111561387a57600080fd5b82016080818503121561280b57600080fd5b63ffffffff8151168252602081015160208301526040810151604083015260006060820151608060608501526138c5608085018261367a565b949350505050565b6040815260006138e0604083018561388c565b905063ffffffff831660208301529392505050565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526138c560408501826135c1565b60208152600061280b60208301846138f5565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156137fd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261399e8583516138f5565b94509285019290850190600101613964565b80151581146127f457600080fd5b6000806000806000606086880312156139d657600080fd5b853567ffffffffffffffff808211156139ee57600080fd5b6139fa89838a0161344e565b90975095506020880135915080821115613a1357600080fd5b50613a208882890161344e565b9094509250506040860135613a34816139b0565b809150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160808452613a8660808501826135c1565b905060208301518482036020860152613a9f82826135c1565b915050604083015160028110613ade577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b604085015260609283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b60208152600061280b6020830184613a71565b60008060408385031215613b3157600080fd5b613b3a8361380a565b946020939093013593505050565b60008060008060008060808789031215613b6157600080fd5b613b6a8761380a565b9550602087013567ffffffffffffffff80821115613b8757600080fd5b613b938a838b0161344e565b90975095506040890135915080821115613bac57600080fd5b50613bb989828a0161344e565b9094509250506060870135613bcd816139b0565b809150509295509295509295565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156137fd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613c3c858351613a71565b94509285019290850190600101613c02565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b83811015613cc3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0888703018552613cb186835161388c565b95509382019390820190600101613c77565b50508584038187015286518085528782019482019350915060005b82811015613d0057845163ffffffff1684529381019392810192600101613cde565b5091979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff811681146127f457600080fd5b600060208284031215613d4157600080fd5b813561280b81613d0d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613daf57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613e0b57613e0b613db9565b60405290565b6040516080810167ffffffffffffffff81118282101715613e0b57613e0b613db9565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e7b57613e7b613db9565b604052919050565b600060408236031215613e9557600080fd5b613e9d613de8565b8235613ea881613d0d565b815260208381013567ffffffffffffffff80821115613ec657600080fd5b9085019036601f830112613ed957600080fd5b813581811115613eeb57613eeb613db9565b613f1b847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613e34565b91508082523684828501011115613f3157600080fd5b80848401858401376000908201840152918301919091525092915050565b600181811c90821680613f6357607f821691505b602082108103613f9c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000602080835260008454613fb681613f4f565b80848701526040600180841660008114613fd7576001811461400f5761403d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a0101955061403d565b896000528660002060005b858110156140355781548b820186015290830190880161401a565b8a0184019650505b509398975050505050505050565b601f82111561086557600081815260208120601f850160051c810160208610156140725750805b601f850160051c820191505b818110156107465782815560010161407e565b815167ffffffffffffffff8111156140ab576140ab613db9565b6140bf816140b98454613f4f565b8461404b565b602080601f83116001811461411257600084156140dc5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610746565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561415f57888601518255948401946001909101908401614140565b508582101561419b57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8281526040602082015260006138c560408301846135c1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614224576142246141c4565b5060010190565b8385823760008482016000815283858237600093019283525090949350505050565b81810381811115610794576107946141c4565b600063ffffffff808316818103614279576142796141c4565b6001019392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126142b857600080fd5b83018035915067ffffffffffffffff8211156142d357600080fd5b60200191503681900382131561349357600080fd5b6000602082840312156142fa57600080fd5b815161280b816139b0565b67ffffffffffffffff83111561431d5761431d613db9565b6143318361432b8354613f4f565b8361404b565b6000601f841160018114614383576000851561434d5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614419565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156143d257868501358255602094850194600190920191016143b2565b508682101561440d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b600081356002811061079457600080fd5b60028210614468577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff831681178255505050565b6000813561079481613d0d565b6144b08283614283565b67ffffffffffffffff8111156144c8576144c8613db9565b6144dc816144d68554613f4f565b8561404b565b6000601f82116001811461452e57600083156144f85750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1785556145c4565b6000858152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0841690835b8281101561457d578685013582556020948501946001909201910161455d565b50848210156145b8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88660031b161c19848701351681555b505060018360011b0185555b505050506145d56020830183614283565b6145e3818360018601614305565b5050600281016145fe6145f860408501614420565b82614431565b61086561460d60608501614499565b82547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1660089190911b74ffffffffffffffffffffffffffffffffffffffff0016178255565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112613daf57600080fd5b60006080823603121561469957600080fd5b6146a1613e11565b6146aa8361380a565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff808211156146db57600080fd5b9085019036601f8301126146ee57600080fd5b81358181111561470057614700613db9565b8060051b9150614711848301613e34565b818152918301840191848101903684111561472b57600080fd5b938501935b8385101561474957843582529385019390850190614730565b606087015250939695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561479257835183529284019291840191600101614776565b50909695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561480657600080fd5b8560051b808860a0850137820182810360a0908101602085015261482c908201876135c1565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", } var CapabilityRegistryABI = CapabilityRegistryMetaData.ABI @@ -313,7 +313,7 @@ func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetDONs() ([]Capabil return _CapabilityRegistry.Contract.GetDONs(&_CapabilityRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetHashedCapabilityId(opts *bind.CallOpts, labelledName [32]byte, version [32]byte) ([32]byte, error) { +func (_CapabilityRegistry *CapabilityRegistryCaller) GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) { var out []interface{} err := _CapabilityRegistry.contract.Call(opts, &out, "getHashedCapabilityId", labelledName, version) @@ -327,11 +327,11 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) GetHashedCapabilityId(opts } -func (_CapabilityRegistry *CapabilityRegistrySession) GetHashedCapabilityId(labelledName [32]byte, version [32]byte) ([32]byte, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { return _CapabilityRegistry.Contract.GetHashedCapabilityId(&_CapabilityRegistry.CallOpts, labelledName, version) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetHashedCapabilityId(labelledName [32]byte, version [32]byte) ([32]byte, error) { +func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { return _CapabilityRegistry.Contract.GetHashedCapabilityId(&_CapabilityRegistry.CallOpts, labelledName, version) } @@ -2110,7 +2110,7 @@ type CapabilityRegistryInterface interface { GetDONs(opts *bind.CallOpts) ([]CapabilityRegistryDONInfo, error) - GetHashedCapabilityId(opts *bind.CallOpts, labelledName [32]byte, version [32]byte) ([32]byte, error) + GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, uint32, error) diff --git a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt index c58901795ce..877786c0412 100644 --- a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,4 +1,4 @@ GETH_VERSION: 1.13.8 forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin ed9164cfe4619dff824b11df46b66f4c6834b2ca072923f10d9ebc57ce508ed8 -keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin 0a79d0eba13fd4a4b83d7618bb181c21c42222f3cc6c5a90a09302f685555033 +keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin 31d09dc4e9f908c9861e4576798437fe0af8545f764e205181201226a3537d4e ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 9dcbdf55bd5729ba266148da3f17733eb592c871c2108ccca546618628fd9ad2 diff --git a/core/services/chainlink/application.go b/core/services/chainlink/application.go index f847a032d81..b6a13fae828 100644 --- a/core/services/chainlink/application.go +++ b/core/services/chainlink/application.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" commonservices "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" coretypes "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" @@ -205,16 +206,35 @@ func NewApplication(opts ApplicationOpts) (Application, error) { } var externalPeerWrapper p2ptypes.PeerWrapper - if cfg.Capabilities().Peering().Enabled() { + if cfg.Capabilities().Enabled() { externalPeer := externalp2p.NewExternalPeerWrapper(keyStore.P2P(), cfg.Capabilities().Peering(), globalLogger) signer := externalPeer externalPeerWrapper = externalPeer srvcs = append(srvcs, externalPeerWrapper) - // NOTE: RegistrySyncer will depend on a Relayer when fully implemented dispatcher := remote.NewDispatcher(externalPeerWrapper, signer, opts.CapabilitiesRegistry, globalLogger) - registrySyncer := capabilities.NewRegistrySyncer(externalPeerWrapper, opts.CapabilitiesRegistry, dispatcher, globalLogger) + + relayID := commontypes.RelayID{ + Network: cfg.Capabilities().RemoteRegistry().Network(), + ChainID: cfg.Capabilities().RemoteRegistry().ChainID(), + } + relayer, err := relayerChainInterops.Get(relayID) + + if err != nil { + return nil, errors.Wrap(err, "remote registry - failed to get relayer. RelayID: "+relayID.String()) + } + + registrySyncer := capabilities.NewRegistrySyncer( + externalPeerWrapper, + opts.CapabilitiesRegistry, + dispatcher, + globalLogger, + // Passing the relayer and registry address to the syncer because + // ContractReader needs ctx + relayer, + cfg.Capabilities().RemoteRegistry().ContractAddress(), + ) srvcs = append(srvcs, dispatcher, registrySyncer) } diff --git a/core/services/chainlink/config_capabilities.go b/core/services/chainlink/config_capabilities.go index d432d31ad18..e3b2fc184ad 100644 --- a/core/services/chainlink/config_capabilities.go +++ b/core/services/chainlink/config_capabilities.go @@ -14,3 +14,11 @@ type capabilitiesConfig struct { func (c *capabilitiesConfig) Peering() config.P2P { return &p2p{c: c.c.Peering} } + +func (c *capabilitiesConfig) Enabled() bool { + return c.Enabled() +} + +func (c *capabilitiesConfig) OnchainCapabilityRegistryAddress() string { + return c.OnchainCapabilityRegistryAddress() +} diff --git a/core/services/relay/evm/types/codec_entry.go b/core/services/relay/evm/types/codec_entry.go index 21e5ac59847..bba05a27772 100644 --- a/core/services/relay/evm/types/codec_entry.go +++ b/core/services/relay/evm/types/codec_entry.go @@ -85,7 +85,15 @@ func (entry *codecEntry) EncodingPrefix() []byte { return tmp } -func (entry *codecEntry) Init() error { +func (entry *codecEntry) Init() (err error) { + // Since reflection panics if errors occur, best to recover in case of any unknown errors + defer func() { + if r := recover(); r != nil { + entry.checkedType = nil + entry.nativeType = nil + err = fmt.Errorf("%w: %v", commontypes.ErrInvalidConfig, r) + } + }() if entry.checkedType != nil { return nil } @@ -129,6 +137,7 @@ func (entry *codecEntry) Init() error { return fmt.Errorf("%w: empty field names are not supported for multiple returns", commontypes.ErrInvalidType) } + fmt.Printf("h") name := strings.ToUpper(arg.Name[:1]) + arg.Name[1:] if seenNames[name] { return fmt.Errorf("%w: duplicate field name %s, after ToCamelCase", commontypes.ErrInvalidConfig, name) @@ -234,6 +243,7 @@ func createTupleType(curType *abi.Type, converter func(reflect.Type) reflect.Typ checkedFields := make([]reflect.StructField, len(curType.TupleElems)) for i, elm := range curType.TupleElems { name := curType.TupleRawNames[i] + name = strings.ToUpper(name[:1]) + name[1:] nativeFields[i].Name = name checkedFields[i].Name = name nativeArgType, checkedArgType, err := getNativeAndCheckedTypes(elm) diff --git a/core/services/relay/evm/types/codec_entry_test.go b/core/services/relay/evm/types/codec_entry_test.go index 1ea3a9ae576..d4a0dd8edea 100644 --- a/core/services/relay/evm/types/codec_entry_test.go +++ b/core/services/relay/evm/types/codec_entry_test.go @@ -94,6 +94,43 @@ func TestCodecEntry(t *testing.T) { assertHaveSameStructureAndNames(t, iNative.Type(), entry.CheckedType()) }) + t.Run("nested tuple member names are capitalized", func(t *testing.T) { + type1, err := abi.NewType("uint16", "", []abi.ArgumentMarshaling{}) + require.NoError(t, err) + tupleType, err := abi.NewType("tuple", "", []abi.ArgumentMarshaling{ + {Name: "field3", Type: "uint24"}, + {Name: "field4", Type: "int24"}, + }) + require.NoError(t, err) + args := abi.Arguments{ + {Name: "field1", Type: type1}, + {Name: "field2", Type: tupleType}, + } + entry := NewCodecEntry(args, nil, nil) + require.NoError(t, entry.Init()) + + checked := reflect.New(entry.CheckedType()) + iChecked := reflect.Indirect(checked) + f1 := uint16(2) + iChecked.FieldByName("Field1").Set(reflect.ValueOf(&f1)) + f2 := iChecked.FieldByName("Field2") + f2.Set(reflect.New(f2.Type().Elem())) + f2 = reflect.Indirect(f2) + f3 := big.NewInt( /*2^24 - 1*/ 16777215) + setAndVerifyLimit(t, (*uint24)(f3), f3, f2.FieldByName("Field3")) + f4 := big.NewInt( /*2^23 - 1*/ 8388607) + setAndVerifyLimit(t, (*int24)(f4), f4, f2.FieldByName("Field4")) + + native, err := entry.ToNative(checked) + require.NoError(t, err) + iNative := reflect.Indirect(native) + require.Equal(t, iNative.Field(0).Interface(), iChecked.Field(0).Interface()) + nF2 := reflect.Indirect(iNative.Field(1)) + assert.Equal(t, nF2.Field(0).Interface(), f3) + assert.Equal(t, nF2.Field(1).Interface(), f4) + assertHaveSameStructureAndNames(t, iNative.Type(), entry.CheckedType()) + }) + t.Run("unwrapped types", func(t *testing.T) { // This exists to allow you to decode single returned values without naming the parameter wrappedTuple, err := abi.NewType("tuple", "", []abi.ArgumentMarshaling{