From 15cfe65743965431db3ad8dcaa2b3cbaabd23e7b Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Thu, 25 Jan 2024 14:36:24 -0500 Subject: [PATCH 1/2] pull latest middleware contract branch break up services into bls and ecdsa create ecdsa SignMsg function - more of a placeholder for now generated bindings for ecdsaSignatureChecker updated middleware contracts again (after rebasing on master) and updated bindings renamed bls/bls_aggregation -> bls/aggregation updated middleware contracts and generated bindings some updates to ecdsa types ecdsa avs registry service tests pass no more compilation errors - mocks generated - ecdsa agg tests still failing tests are passing --- .../clients/avsregistry/{ => bls}/reader.go | 18 +- .../avsregistry/{ => bls}/subscriber.go | 2 +- .../clients/avsregistry/{ => bls}/writer.go | 2 +- chainio/clients/avsregistry/ecdsa/reader.go | 109 ++++ chainio/clients/builder.go | 16 +- chainio/gen.go | 7 +- .../mocks/avsEcdsaRegistryContractsReader.go | 71 +++ chainio/mocks/avsRegistryContractsReader.go | 4 +- .../mocks/avsRegistryContractsSubscriber.go | 4 +- chainio/mocks/avsRegistryContractsWriter.go | 4 +- contracts/bindings/BLSApkRegistry/binding.go | 2 +- .../ECDSAOperatorStateRetriever/binding.go | 347 +++++++++++ .../bindings/ECDSASignatureChecker/binding.go | 573 ++++++++++++++++++ .../OperatorStateRetriever/binding.go | 2 +- .../bindings/RegistryCoordinator/binding.go | 2 +- contracts/bindings/StakeRegistry/binding.go | 2 +- contracts/generate-bindings.sh | 8 +- contracts/lib/eigenlayer-middleware | 2 +- crypto/ecdsa/ecdsa.go | 38 ++ metrics/collectors/economic/economic.go | 8 +- metrics/collectors/economic/economic_test.go | 2 +- services/README.md | 2 +- .../aggregation}/blsagg.go | 26 +- .../aggregation}/blsagg_test.go | 94 +-- services/{ => bls}/avsregistry/avsregistry.go | 6 +- .../avsregistry/avsregistry_chaincaller.go | 18 +- .../avsregistry_chaincaller_test.go | 22 +- .../{ => bls}/avsregistry/avsregistry_fake.go | 18 +- services/{ => bls}/gen.go | 6 +- services/{ => bls}/mocks/avsregistry.go | 12 +- .../{ => bls}/mocks/blsagg/blsaggregation.go | 6 +- services/{ => bls}/mocks/operatorpubkeys.go | 4 +- .../operatorpubkeys/operatorpubkeys.go | 0 .../operatorpubkeys_inmemory.go | 10 +- .../operatorpubkeys_inmemory_test.go | 0 services/ecdsa/aggregation/agg.go | 358 +++++++++++ services/ecdsa/aggregation/agg_test.go | 434 +++++++++++++ services/ecdsa/avsregistry/avsregistry.go | 23 + .../avsregistry/avsregistry_chaincaller.go | 87 +++ .../avsregistry_chaincaller_test.go | 149 +++++ .../ecdsa/avsregistry/avsregistry_fake.go | 74 +++ services/ecdsa/gen.go | 3 + services/ecdsa/mocks/avsregistry.go | 88 +++ types/avs.go | 14 +- types/operator.go | 26 +- types/test.go | 15 +- 46 files changed, 2556 insertions(+), 162 deletions(-) rename chainio/clients/avsregistry/{ => bls}/reader.go (97%) rename chainio/clients/avsregistry/{ => bls}/subscriber.go (98%) rename chainio/clients/avsregistry/{ => bls}/writer.go (99%) create mode 100644 chainio/clients/avsregistry/ecdsa/reader.go create mode 100644 chainio/mocks/avsEcdsaRegistryContractsReader.go create mode 100644 contracts/bindings/ECDSAOperatorStateRetriever/binding.go create mode 100644 contracts/bindings/ECDSASignatureChecker/binding.go create mode 100644 crypto/ecdsa/ecdsa.go rename services/{bls_aggregation => bls/aggregation}/blsagg.go (95%) rename services/{bls_aggregation => bls/aggregation}/blsagg_test.go (90%) rename services/{ => bls}/avsregistry/avsregistry.go (85%) rename services/{ => bls}/avsregistry/avsregistry_chaincaller.go (89%) rename services/{ => bls}/avsregistry/avsregistry_chaincaller_test.go (93%) rename services/{ => bls}/avsregistry/avsregistry_fake.go (79%) rename services/{ => bls}/gen.go (77%) rename services/{ => bls}/mocks/avsregistry.go (91%) rename services/{ => bls}/mocks/blsagg/blsaggregation.go (94%) rename services/{ => bls}/mocks/operatorpubkeys.go (90%) rename services/{ => bls}/operatorpubkeys/operatorpubkeys.go (100%) rename services/{ => bls}/operatorpubkeys/operatorpubkeys_inmemory.go (96%) rename services/{ => bls}/operatorpubkeys/operatorpubkeys_inmemory_test.go (100%) create mode 100644 services/ecdsa/aggregation/agg.go create mode 100644 services/ecdsa/aggregation/agg_test.go create mode 100644 services/ecdsa/avsregistry/avsregistry.go create mode 100644 services/ecdsa/avsregistry/avsregistry_chaincaller.go create mode 100644 services/ecdsa/avsregistry/avsregistry_chaincaller_test.go create mode 100644 services/ecdsa/avsregistry/avsregistry_fake.go create mode 100644 services/ecdsa/gen.go create mode 100644 services/ecdsa/mocks/avsregistry.go diff --git a/chainio/clients/avsregistry/reader.go b/chainio/clients/avsregistry/bls/reader.go similarity index 97% rename from chainio/clients/avsregistry/reader.go rename to chainio/clients/avsregistry/bls/reader.go index 868fde950..50478d521 100644 --- a/chainio/clients/avsregistry/reader.go +++ b/chainio/clients/avsregistry/bls/reader.go @@ -1,4 +1,4 @@ -package avsregistry +package avsblsregistry import ( "bytes" @@ -44,18 +44,18 @@ type AvsRegistryReader interface { GetOperatorsStakeInQuorumsOfOperatorAtBlock( opts *bind.CallOpts, - operatorId types.OperatorId, + operatorId types.BlsOperatorId, blockNumber uint32, ) ([]types.QuorumNum, [][]opstateretriever.OperatorStateRetrieverOperator, error) GetOperatorsStakeInQuorumsOfOperatorAtCurrentBlock( opts *bind.CallOpts, - operatorId types.OperatorId, + operatorId types.BlsOperatorId, ) ([]types.QuorumNum, [][]opstateretriever.OperatorStateRetrieverOperator, error) GetOperatorStakeInQuorumsOfOperatorAtCurrentBlock( opts *bind.CallOpts, - operatorId types.OperatorId, + operatorId types.BlsOperatorId, ) (map[types.QuorumNum]types.StakeAmount, error) GetCheckSignaturesIndices( @@ -67,7 +67,7 @@ type AvsRegistryReader interface { GetOperatorId(opts *bind.CallOpts, operatorAddress gethcommon.Address) ([32]byte, error) - GetOperatorFromId(opts *bind.CallOpts, operatorId types.OperatorId) (gethcommon.Address, error) + GetOperatorFromId(opts *bind.CallOpts, operatorId types.BlsOperatorId) (gethcommon.Address, error) IsOperatorRegistered(opts *bind.CallOpts, operatorAddress gethcommon.Address) (bool, error) @@ -233,7 +233,7 @@ func (r *AvsRegistryChainReader) GetOperatorAddrsInQuorumsAtCurrentBlock( func (r *AvsRegistryChainReader) GetOperatorsStakeInQuorumsOfOperatorAtBlock( opts *bind.CallOpts, - operatorId types.OperatorId, + operatorId types.BlsOperatorId, blockNumber uint32, ) ([]types.QuorumNum, [][]opstateretriever.OperatorStateRetrieverOperator, error) { quorumBitmap, operatorStakes, err := r.operatorStateRetriever.GetOperatorState0( @@ -259,7 +259,7 @@ func (r *AvsRegistryChainReader) GetOperatorsStakeInQuorumsOfOperatorAtBlock( // blockNumber in opts will be ignored, and the chain will be queried to get the latest blockNumber func (r *AvsRegistryChainReader) GetOperatorsStakeInQuorumsOfOperatorAtCurrentBlock( opts *bind.CallOpts, - operatorId types.OperatorId, + operatorId types.BlsOperatorId, ) ([]types.QuorumNum, [][]opstateretriever.OperatorStateRetrieverOperator, error) { if opts.Context == nil { opts.Context = context.Background() @@ -282,7 +282,7 @@ func (r *AvsRegistryChainReader) GetOperatorsStakeInQuorumsOfOperatorAtCurrentBl // so some of them could actually return information from different blocks func (r *AvsRegistryChainReader) GetOperatorStakeInQuorumsOfOperatorAtCurrentBlock( opts *bind.CallOpts, - operatorId types.OperatorId, + operatorId types.BlsOperatorId, ) (map[types.QuorumNum]types.StakeAmount, error) { quorumBitmap, err := r.registryCoordinator.GetCurrentQuorumBitmap(opts, operatorId) if err != nil { @@ -343,7 +343,7 @@ func (r *AvsRegistryChainReader) GetOperatorId( func (r *AvsRegistryChainReader) GetOperatorFromId( opts *bind.CallOpts, - operatorId types.OperatorId, + operatorId types.BlsOperatorId, ) (gethcommon.Address, error) { operatorAddress, err := r.registryCoordinator.GetOperatorFromId( opts, diff --git a/chainio/clients/avsregistry/subscriber.go b/chainio/clients/avsregistry/bls/subscriber.go similarity index 98% rename from chainio/clients/avsregistry/subscriber.go rename to chainio/clients/avsregistry/bls/subscriber.go index 96ec9d33b..ac0794df7 100644 --- a/chainio/clients/avsregistry/subscriber.go +++ b/chainio/clients/avsregistry/bls/subscriber.go @@ -1,4 +1,4 @@ -package avsregistry +package avsblsregistry import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" diff --git a/chainio/clients/avsregistry/writer.go b/chainio/clients/avsregistry/bls/writer.go similarity index 99% rename from chainio/clients/avsregistry/writer.go rename to chainio/clients/avsregistry/bls/writer.go index e3501bc4d..b24932ffd 100644 --- a/chainio/clients/avsregistry/writer.go +++ b/chainio/clients/avsregistry/bls/writer.go @@ -1,4 +1,4 @@ -package avsregistry +package avsblsregistry import ( "context" diff --git a/chainio/clients/avsregistry/ecdsa/reader.go b/chainio/clients/avsregistry/ecdsa/reader.go new file mode 100644 index 000000000..63bd2ed07 --- /dev/null +++ b/chainio/clients/avsregistry/ecdsa/reader.go @@ -0,0 +1,109 @@ +package avsecdsaregistry + +import ( + "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + gethcommon "github.com/ethereum/go-ethereum/common" + + opstateretriever "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSAOperatorStateRetriever" +) + +type AvsEcdsaRegistryReader interface { + GetOperatorsStakeInQuorumsAtBlock( + opts *bind.CallOpts, + quorumNumbers []byte, + blockNumber uint32, + ) ([][]opstateretriever.ECDSAOperatorStateRetrieverOperator, error) + + GetCheckSignaturesIndices( + opts *bind.CallOpts, + referenceBlockNumber uint32, + quorumNumbers []byte, + nonSignerOperatorIds []gethcommon.Address, + ) (opstateretriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) +} + +type AvsEcdsaRegistryChainReader struct { + logger logging.Logger + registryCoordinatorAddr gethcommon.Address + operatorStateRetriever *opstateretriever.ContractECDSAOperatorStateRetriever + ethClient eth.EthClient +} + +// forces AvsReader to implement the clients.ReaderInterface interface +var _ AvsEcdsaRegistryReader = (*AvsEcdsaRegistryChainReader)(nil) + +func NewAvsEcdsaRegistryChainReader( + registryCoordinatorAddr gethcommon.Address, + operatorStateRetriever *opstateretriever.ContractECDSAOperatorStateRetriever, + logger logging.Logger, + ethClient eth.EthClient, +) *AvsEcdsaRegistryChainReader { + return &AvsEcdsaRegistryChainReader{ + registryCoordinatorAddr: registryCoordinatorAddr, + operatorStateRetriever: operatorStateRetriever, + logger: logger, + ethClient: ethClient, + } +} + +func BuildAvsEcdsaRegistryChainReader( + registryCoordinatorAddr gethcommon.Address, + operatorStateRetrieverAddr gethcommon.Address, + ethClient eth.EthClient, + logger logging.Logger, +) (*AvsEcdsaRegistryChainReader, error) { + contractOperatorStateRetriever, err := opstateretriever.NewContractECDSAOperatorStateRetriever( + operatorStateRetrieverAddr, + ethClient, + ) + if err != nil { + return nil, err + } + return NewAvsEcdsaRegistryChainReader( + registryCoordinatorAddr, + contractOperatorStateRetriever, + logger, + ethClient, + ), nil +} + +func (r *AvsEcdsaRegistryChainReader) GetCheckSignaturesIndices( + opts *bind.CallOpts, + referenceBlockNumber uint32, + quorumNumbers []byte, + signerOperatorIds []gethcommon.Address, +) (opstateretriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) { + checkSignatureIndices, err := r.operatorStateRetriever.GetCheckSignaturesIndices( + opts, + r.registryCoordinatorAddr, + referenceBlockNumber, + quorumNumbers, + signerOperatorIds, + ) + if err != nil { + r.logger.Error("Failed to get check signatures indices", "err", err) + return opstateretriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices{}, err + } + return checkSignatureIndices, nil +} + +// the contract stores historical state, so blockNumber should be the block number of the state you want to query +// and the blockNumber in opts should be the block number of the latest block (or set to nil, which is equivalent) +func (r *AvsEcdsaRegistryChainReader) GetOperatorsStakeInQuorumsAtBlock( + opts *bind.CallOpts, + quorumNumbers []byte, + blockNumber uint32, +) ([][]opstateretriever.ECDSAOperatorStateRetrieverOperator, error) { + operatorStakes, err := r.operatorStateRetriever.GetOperatorState0( + opts, + r.registryCoordinatorAddr, + quorumNumbers, + blockNumber) + if err != nil { + r.logger.Error("Failed to get operators state", "err", err) + return nil, err + } + return operatorStakes, nil +} diff --git a/chainio/clients/builder.go b/chainio/clients/builder.go index fabe5e650..0d6d2b1fa 100644 --- a/chainio/clients/builder.go +++ b/chainio/clients/builder.go @@ -1,7 +1,7 @@ package clients import ( - "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls" "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" @@ -29,9 +29,9 @@ type BuildAllConfig struct { // for non-instrumented clients that doesn't return metrics/reg, and another instrumented-constructor // that returns instrumented clients and the metrics/reg. type Clients struct { - AvsRegistryChainReader *avsregistry.AvsRegistryChainReader - AvsRegistryChainSubscriber *avsregistry.AvsRegistryChainSubscriber - AvsRegistryChainWriter *avsregistry.AvsRegistryChainWriter + AvsRegistryChainReader *avsblsregistry.AvsRegistryChainReader + AvsRegistryChainSubscriber *avsblsregistry.AvsRegistryChainSubscriber + AvsRegistryChainWriter *avsblsregistry.AvsRegistryChainWriter ElChainReader *elcontracts.ELChainReader ElChainWriter *elcontracts.ELChainWriter EthHttpClient *eth.Client @@ -167,7 +167,7 @@ func (config *BuildAllConfig) buildAvsClients( ethWsClient eth.EthClient, txMgr txmgr.TxManager, logger logging.Logger, -) (*avsregistry.AvsRegistryChainReader, *avsregistry.AvsRegistryChainSubscriber, *avsregistry.AvsRegistryChainWriter, error) { +) (*avsblsregistry.AvsRegistryChainReader, *avsblsregistry.AvsRegistryChainSubscriber, *avsblsregistry.AvsRegistryChainWriter, error) { avsRegistryContractBindings, err := chainioutils.NewAVSRegistryContractBindings( gethcommon.HexToAddress(config.RegistryCoordinatorAddr), @@ -180,7 +180,7 @@ func (config *BuildAllConfig) buildAvsClients( return nil, nil, nil, err } - avsRegistryChainReader := avsregistry.NewAvsRegistryChainReader( + avsRegistryChainReader := avsblsregistry.NewAvsRegistryChainReader( avsRegistryContractBindings.RegistryCoordinatorAddr, avsRegistryContractBindings.BlsApkRegistryAddr, avsRegistryContractBindings.RegistryCoordinator, @@ -190,7 +190,7 @@ func (config *BuildAllConfig) buildAvsClients( ethHttpClient, ) - avsRegistryChainWriter, err := avsregistry.NewAvsRegistryChainWriter( + avsRegistryChainWriter, err := avsblsregistry.NewAvsRegistryChainWriter( avsRegistryContractBindings.ServiceManagerAddr, avsRegistryContractBindings.RegistryCoordinator, avsRegistryContractBindings.OperatorStateRetriever, @@ -208,7 +208,7 @@ func (config *BuildAllConfig) buildAvsClients( // get the Subscriber for Avs Registry contracts // note that the subscriber needs a ws connection instead of http - avsRegistrySubscriber, err := avsregistry.BuildAvsRegistryChainSubscriber( + avsRegistrySubscriber, err := avsblsregistry.BuildAvsRegistryChainSubscriber( avsRegistryContractBindings.BlsApkRegistryAddr, ethWsClient, logger, diff --git a/chainio/gen.go b/chainio/gen.go index 3e7486f7f..eb92a63de 100644 --- a/chainio/gen.go +++ b/chainio/gen.go @@ -1,8 +1,9 @@ package chainio -//go:generate mockgen -destination=./mocks/avsRegistryContractsReader.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry AvsRegistryReader -//go:generate mockgen -destination=./mocks/avsRegistryContractsSubscriber.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry AvsRegistrySubscriber -//go:generate mockgen -destination=./mocks/avsRegistryContractsWriter.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry AvsRegistryWriter +//go:generate mockgen -destination=./mocks/avsEcdsaRegistryContractsReader.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/ecdsa AvsEcdsaRegistryReader +//go:generate mockgen -destination=./mocks/avsRegistryContractsReader.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls AvsRegistryReader +//go:generate mockgen -destination=./mocks/avsRegistryContractsSubscriber.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls AvsRegistrySubscriber +//go:generate mockgen -destination=./mocks/avsRegistryContractsWriter.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls AvsRegistryWriter //go:generate mockgen -destination=./mocks/elContractsReader.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts ELReader //go:generate mockgen -destination=./mocks/elContractsWriter.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts ELWriter //go:generate mockgen -destination=./mocks/ethclient.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/eth EthClient diff --git a/chainio/mocks/avsEcdsaRegistryContractsReader.go b/chainio/mocks/avsEcdsaRegistryContractsReader.go new file mode 100644 index 000000000..08a8b2f76 --- /dev/null +++ b/chainio/mocks/avsEcdsaRegistryContractsReader.go @@ -0,0 +1,71 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/ecdsa (interfaces: AvsEcdsaRegistryReader) +// +// Generated by this command: +// +// mockgen -destination=./mocks/avsEcdsaRegistryContractsReader.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/ecdsa AvsEcdsaRegistryReader +// +// Package mocks is a generated GoMock package. +package mocks + +import ( + reflect "reflect" + + contractECDSAOperatorStateRetriever "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSAOperatorStateRetriever" + bind "github.com/ethereum/go-ethereum/accounts/abi/bind" + common "github.com/ethereum/go-ethereum/common" + gomock "go.uber.org/mock/gomock" +) + +// MockAvsEcdsaRegistryReader is a mock of AvsEcdsaRegistryReader interface. +type MockAvsEcdsaRegistryReader struct { + ctrl *gomock.Controller + recorder *MockAvsEcdsaRegistryReaderMockRecorder +} + +// MockAvsEcdsaRegistryReaderMockRecorder is the mock recorder for MockAvsEcdsaRegistryReader. +type MockAvsEcdsaRegistryReaderMockRecorder struct { + mock *MockAvsEcdsaRegistryReader +} + +// NewMockAvsEcdsaRegistryReader creates a new mock instance. +func NewMockAvsEcdsaRegistryReader(ctrl *gomock.Controller) *MockAvsEcdsaRegistryReader { + mock := &MockAvsEcdsaRegistryReader{ctrl: ctrl} + mock.recorder = &MockAvsEcdsaRegistryReaderMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAvsEcdsaRegistryReader) EXPECT() *MockAvsEcdsaRegistryReaderMockRecorder { + return m.recorder +} + +// GetCheckSignaturesIndices mocks base method. +func (m *MockAvsEcdsaRegistryReader) GetCheckSignaturesIndices(arg0 *bind.CallOpts, arg1 uint32, arg2 []byte, arg3 []common.Address) (contractECDSAOperatorStateRetriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCheckSignaturesIndices", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(contractECDSAOperatorStateRetriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetCheckSignaturesIndices indicates an expected call of GetCheckSignaturesIndices. +func (mr *MockAvsEcdsaRegistryReaderMockRecorder) GetCheckSignaturesIndices(arg0, arg1, arg2, arg3 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCheckSignaturesIndices", reflect.TypeOf((*MockAvsEcdsaRegistryReader)(nil).GetCheckSignaturesIndices), arg0, arg1, arg2, arg3) +} + +// GetOperatorsStakeInQuorumsAtBlock mocks base method. +func (m *MockAvsEcdsaRegistryReader) GetOperatorsStakeInQuorumsAtBlock(arg0 *bind.CallOpts, arg1 []byte, arg2 uint32) ([][]contractECDSAOperatorStateRetriever.ECDSAOperatorStateRetrieverOperator, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOperatorsStakeInQuorumsAtBlock", arg0, arg1, arg2) + ret0, _ := ret[0].([][]contractECDSAOperatorStateRetriever.ECDSAOperatorStateRetrieverOperator) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperatorsStakeInQuorumsAtBlock indicates an expected call of GetOperatorsStakeInQuorumsAtBlock. +func (mr *MockAvsEcdsaRegistryReaderMockRecorder) GetOperatorsStakeInQuorumsAtBlock(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorsStakeInQuorumsAtBlock", reflect.TypeOf((*MockAvsEcdsaRegistryReader)(nil).GetOperatorsStakeInQuorumsAtBlock), arg0, arg1, arg2) +} diff --git a/chainio/mocks/avsRegistryContractsReader.go b/chainio/mocks/avsRegistryContractsReader.go index 5ab1e664e..550f34a4b 100644 --- a/chainio/mocks/avsRegistryContractsReader.go +++ b/chainio/mocks/avsRegistryContractsReader.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry (interfaces: AvsRegistryReader) +// Source: github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls (interfaces: AvsRegistryReader) // // Generated by this command: // -// mockgen -destination=./mocks/avsRegistryContractsReader.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry AvsRegistryReader +// mockgen -destination=./mocks/avsRegistryContractsReader.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls AvsRegistryReader // // Package mocks is a generated GoMock package. package mocks diff --git a/chainio/mocks/avsRegistryContractsSubscriber.go b/chainio/mocks/avsRegistryContractsSubscriber.go index d1098925c..6779c7286 100644 --- a/chainio/mocks/avsRegistryContractsSubscriber.go +++ b/chainio/mocks/avsRegistryContractsSubscriber.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry (interfaces: AvsRegistrySubscriber) +// Source: github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls (interfaces: AvsRegistrySubscriber) // // Generated by this command: // -// mockgen -destination=./mocks/avsRegistryContractsSubscriber.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry AvsRegistrySubscriber +// mockgen -destination=./mocks/avsRegistryContractsSubscriber.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls AvsRegistrySubscriber // // Package mocks is a generated GoMock package. package mocks diff --git a/chainio/mocks/avsRegistryContractsWriter.go b/chainio/mocks/avsRegistryContractsWriter.go index a51975985..b274a0c97 100644 --- a/chainio/mocks/avsRegistryContractsWriter.go +++ b/chainio/mocks/avsRegistryContractsWriter.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry (interfaces: AvsRegistryWriter) +// Source: github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls (interfaces: AvsRegistryWriter) // // Generated by this command: // -// mockgen -destination=./mocks/avsRegistryContractsWriter.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry AvsRegistryWriter +// mockgen -destination=./mocks/avsRegistryContractsWriter.go -package=mocks github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls AvsRegistryWriter // // Package mocks is a generated GoMock package. package mocks diff --git a/contracts/bindings/BLSApkRegistry/binding.go b/contracts/bindings/BLSApkRegistry/binding.go index 4f68adf91..46ec6acc9 100644 --- a/contracts/bindings/BLSApkRegistry/binding.go +++ b/contracts/bindings/BLSApkRegistry/binding.go @@ -58,7 +58,7 @@ type IBLSApkRegistryPubkeyRegistrationParams struct { // ContractBLSApkRegistryMetaData contains all meta data concerning the ContractBLSApkRegistry contract. var ContractBLSApkRegistryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractIRegistryCoordinator\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"apkHistory\",\"inputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"apkHash\",\"type\":\"bytes24\",\"internalType\":\"bytes24\"},{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currentApk\",\"inputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getApk\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getApkHashAtBlockNumberAndIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes24\",\"internalType\":\"bytes24\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getApkHistoryLength\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getApkIndicesAtBlockNumber\",\"inputs\":[{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"blockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getApkUpdateAtIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIBLSApkRegistry.ApkUpdate\",\"components\":[{\"name\":\"apkHash\",\"type\":\"bytes24\",\"internalType\":\"bytes24\"},{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorFromPubkeyHash\",\"inputs\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorId\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRegisteredPubkey\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initializeQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"operatorToPubkey\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorToPubkeyHash\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pubkeyHashToOperator\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerBLSPublicKey\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIBLSApkRegistry.PubkeyRegistrationParams\",\"components\":[{\"name\":\"pubkeyRegistrationSignature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"pubkeyG1\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"pubkeyG2\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}]},{\"name\":\"pubkeyRegistrationMessageHash\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registryCoordinator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewPubkeyRegistration\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"pubkeyG1\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"pubkeyG2\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAddedToQuorums\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRemovedFromQuorums\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false}]", - Bin: "0x60a06040523480156200001157600080fd5b506040516200213738038062002137833981016040819052620000349162000116565b6001600160a01b038116608052806200004c62000054565b505062000148565b600054610100900460ff1615620000c15760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000114576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012957600080fd5b81516001600160a01b03811681146200014157600080fd5b9392505050565b608051611fb7620001806000396000818161030f01528181610466015281816105bf015281816109a501526110420152611fb76000f3fe608060405234801561001057600080fd5b50600436106101155760003560e01c80636d14a987116100a2578063bf79ce5811610071578063bf79ce58146103cc578063d5254a8c146103df578063de29fac0146103ff578063e8bb9ae61461041f578063f4e24fe51461044857600080fd5b80636d14a9871461030a5780637916cea6146103315780637ff81a8714610372578063a3db80e2146103a557600080fd5b80633fb27952116100e95780633fb27952146101df57806347b314e8146101f25780635f61a88414610233578063605747d51461028f57806368bccaac146102dd57600080fd5b8062a1f4cb1461011a57806313542a4e1461015b57806326d941f214610192578063377ed99d146101a7575b600080fd5b610141610128366004611905565b6003602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b610184610169366004611905565b6001600160a01b031660009081526001602052604090205490565b604051908152602001610152565b6101a56101a0366004611938565b61045b565b005b6101ca6101b5366004611938565b60ff1660009081526004602052604090205490565b60405163ffffffff9091168152602001610152565b6101a56101ed3660046119c3565b6105b4565b61021b610200366004611a69565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001610152565b610282610241366004611938565b60408051808201909152600080825260208201525060ff16600090815260056020908152604091829020825180840190935280548352600101549082015290565b6040516101529190611a82565b6102a261029d366004611a99565b610652565b60408051825167ffffffffffffffff1916815260208084015163ffffffff908116918301919091529282015190921690820152606001610152565b6102f06102eb366004611ac3565b6106e5565b60405167ffffffffffffffff199091168152602001610152565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b61034461033f366004611a99565b610880565b6040805167ffffffffffffffff19909416845263ffffffff9283166020850152911690820152606001610152565b610385610380366004611905565b6108cb565b604080518351815260209384015193810193909352820152606001610152565b6101416103b3366004611938565b6005602052600090815260409020805460019091015482565b6101846103da366004611b0b565b610998565b6103f26103ed366004611b68565b610dec565b6040516101529190611be0565b61018461040d366004611905565b60016020526000908152604090205481565b61021b61042d366004611a69565b6002602052600090815260409020546001600160a01b031681565b6101a56104563660046119c3565b611037565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ac5760405162461bcd60e51b81526004016104a390611c2a565b60405180910390fd5b60ff81166000908152600460205260409020541561052b5760405162461bcd60e51b815260206004820152603660248201527f424c5341706b52656769737472792e696e697469616c697a6551756f72756d3a6044820152752071756f72756d20616c72656164792065786973747360501b60648201526084016104a3565b60ff166000908152600460209081526040808320815160608101835284815263ffffffff4381168286019081528285018781528454600181018655948852959096209151919092018054955194518316600160e01b026001600160e01b0395909316600160c01b026001600160e01b03199096169190931c179390931791909116919091179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105fc5760405162461bcd60e51b81526004016104a390611c2a565b6000610607836108cb565b50905061061482826110d0565b7f5358c5b42179178c8fc757734ac2a3198f9071c765ee0d8389211525f50052468383604051610645929190611c9e565b60405180910390a1505050565b604080516060810182526000808252602080830182905282840182905260ff86168252600490529190912080548390811061068f5761068f611d03565b600091825260209182902060408051606081018252919092015467ffffffffffffffff1981841b16825263ffffffff600160c01b8204811694830194909452600160e01b90049092169082015290505b92915050565b60ff8316600090815260046020526040812080548291908490811061070c5761070c611d03565b600091825260209182902060408051606081018252919092015467ffffffffffffffff1981841b16825263ffffffff600160c01b82048116948301859052600160e01b9091048116928201929092529250851610156107d35760405162461bcd60e51b815260206004820152603e60248201527f424c5341706b52656769737472792e5f76616c696461746541706b486173684160448201527f74426c6f636b4e756d6265723a20696e64657820746f6f20726563656e74000060648201526084016104a3565b604081015163ffffffff1615806107f95750806040015163ffffffff168463ffffffff16105b6108775760405162461bcd60e51b815260206004820152604360248201527f424c5341706b52656769737472792e5f76616c696461746541706b486173684160448201527f74426c6f636b4e756d6265723a206e6f74206c61746573742061706b2075706460648201526261746560e81b608482015260a4016104a3565b51949350505050565b6004602052816000526040600020818154811061089c57600080fd5b600091825260209091200154604081901b925063ffffffff600160c01b820481169250600160e01b9091041683565b60408051808201909152600080825260208201526001600160a01b03821660008181526003602090815260408083208151808301835281548152600191820154818501529484529091528120549091908061098e5760405162461bcd60e51b815260206004820152603e60248201527f424c5341706b52656769737472792e676574526567697374657265645075626b60448201527f65793a206f70657261746f72206973206e6f742072656769737465726564000060648201526084016104a3565b9094909350915050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109e25760405162461bcd60e51b81526004016104a390611c2a565b6000610a106109f936869003860160408701611d19565b805160009081526020918201519091526040902090565b90507fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5811415610a98576040805162461bcd60e51b8152602060048201526024810191909152600080516020611f6283398151915260448201527f4b65793a2063616e6e6f74207265676973746572207a65726f207075626b657960648201526084016104a3565b6001600160a01b03851660009081526001602052604090205415610b225760405162461bcd60e51b81526020600482015260476024820152600080516020611f6283398151915260448201527f4b65793a206f70657261746f7220616c72656164792072656769737465726564606482015266207075626b657960c81b608482015260a4016104a3565b6000818152600260205260409020546001600160a01b031615610ba65760405162461bcd60e51b81526020600482015260426024820152600080516020611f6283398151915260448201527f4b65793a207075626c6963206b657920616c7265616479207265676973746572606482015261195960f21b608482015260a4016104a3565b604080516000917f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000191610bff918835916020808b0135928b01359160608c01359160808d019160c08e01918d35918e8201359101611d4b565b6040516020818303038152906040528051906020012060001c610c229190611d96565b9050610cbc610c5b610c4683610c40368a90038a0160408b01611d19565b9061131b565b610c5536899003890189611d19565b906113b2565b610c63611446565b610ca5610c9685610c40604080518082018252600080825260209182015281518083019092526001825260029082015290565b610c55368a90038a018a611d19565b610cb7368a90038a0160808b01611e08565b611506565b610d575760405162461bcd60e51b815260206004820152606c6024820152600080516020611f6283398151915260448201527f4b65793a2065697468657220746865204731207369676e61747572652069732060648201527f77726f6e672c206f7220473120616e642047322070726976617465206b65792060848201526b0c8de40dcdee840dac2e8c6d60a31b60a482015260c4016104a3565b6001600160a01b03861660008181526003602090815260408083208982018035825560608b013560019283015590835281842087905586845260029092529182902080546001600160a01b0319168417905590517fe3fb6613af2e8930cf85d47fcf6db10192224a64c6cbe8023e0eee1ba382804191610ddb9160808a0190611e65565b60405180910390a250949350505050565b606060008367ffffffffffffffff811115610e0957610e09611953565b604051908082528060200260200182016040528015610e32578160200160208202803683370190505b50905060005b8481101561102e576000868683818110610e5457610e54611d03565b919091013560f81c600081815260046020526040902054909250905063ffffffff81161580610ebd575060ff821660009081526004602052604081208054909190610ea157610ea1611d03565b600091825260209091200154600160c01b900463ffffffff1686105b15610f4a5760405162461bcd60e51b815260206004820152605160248201527f424c5341706b52656769737472792e67657441706b496e64696365734174426c60448201527f6f636b4e756d6265723a20626c6f636b4e756d626572206973206265666f7265606482015270207468652066697273742075706461746560781b608482015260a4016104a3565b60005b8163ffffffff168163ffffffff1610156110185760ff8316600090815260046020526040902087906001610f818486611eaf565b610f8b9190611eaf565b63ffffffff1681548110610fa157610fa1611d03565b600091825260209091200154600160c01b900463ffffffff1611611006576001610fcb8284611eaf565b610fd59190611eaf565b858581518110610fe757610fe7611d03565b602002602001019063ffffffff16908163ffffffff1681525050611018565b8061101081611ed4565b915050610f4d565b505050808061102690611ef8565b915050610e38565b50949350505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461107f5760405162461bcd60e51b81526004016104a390611c2a565b600061108a836108cb565b50905061109f8261109a83611773565b6110d0565b7f14a5172b312e9d2c22b8468f9c70ec2caa9de934fe380734fbc6f3beff2b14ba8383604051610645929190611c9e565b604080518082019091526000808252602082015260005b835181101561131557600084828151811061110457611104611d03565b0160209081015160f81c60008181526004909252604090912054909150806111945760405162461bcd60e51b815260206004820152603d60248201527f424c5341706b52656769737472792e5f70726f6365737351756f72756d41706b60448201527f5570646174653a2071756f72756d20646f6573206e6f7420657869737400000060648201526084016104a3565b60ff821660009081526005602090815260409182902082518084019093528054835260010154908201526111c890866113b2565b60ff831660008181526005602090815260408083208551808255868401805160019384015590855251835281842094845260049092528220939750919290916112119085611f13565b8154811061122157611221611d03565b600091825260209091200180549091504363ffffffff908116600160c01b9092041614156112625780546001600160c01b031916604083901c1781556112fe565b805463ffffffff438116600160e01b8181026001600160e01b0394851617855560ff88166000908152600460209081526040808320815160608101835267ffffffffffffffff198b16815280840196875280830185815282546001810184559286529390942093519301805495519251871690940291909516600160c01b026001600160e01b0319949094169190941c17919091179092161790555b50505050808061130d90611ef8565b9150506110e7565b50505050565b6040805180820190915260008082526020820152611337611832565b835181526020808501519082015260408082018490526000908360608460076107d05a03fa905080801561136a5761136c565bfe5b50806113aa5760405162461bcd60e51b815260206004820152600d60248201526c1958cb5b5d5b0b59985a5b1959609a1b60448201526064016104a3565b505092915050565b60408051808201909152600080825260208201526113ce611850565b835181526020808501518183015283516040808401919091529084015160608301526000908360808460066107d05a03fa905080801561136a5750806113aa5760405162461bcd60e51b815260206004820152600d60248201526c1958cb5859190b59985a5b1959609a1b60448201526064016104a3565b61144e61186e565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b604080518082018252858152602080820185905282518084019093528583528201839052600091611535611893565b60005b60028110156116fa57600061154e826006611f2a565b905084826002811061156257611562611d03565b60200201515183611574836000611f49565b600c811061158457611584611d03565b602002015284826002811061159b5761159b611d03565b602002015160200151838260016115b29190611f49565b600c81106115c2576115c2611d03565b60200201528382600281106115d9576115d9611d03565b60200201515151836115ec836002611f49565b600c81106115fc576115fc611d03565b602002015283826002811061161357611613611d03565b602002015151600160200201518361162c836003611f49565b600c811061163c5761163c611d03565b602002015283826002811061165357611653611d03565b60200201516020015160006002811061166e5761166e611d03565b60200201518361167f836004611f49565b600c811061168f5761168f611d03565b60200201528382600281106116a6576116a6611d03565b6020020151602001516001600281106116c1576116c1611d03565b6020020151836116d2836005611f49565b600c81106116e2576116e2611d03565b602002015250806116f281611ef8565b915050611538565b506117036118b2565b60006020826101808560086107d05a03fa905080801561136a5750806117635760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b60448201526064016104a3565b5051151598975050505050505050565b6040805180820190915260008082526020820152815115801561179857506020820151155b156117b6575050604080518082019091526000808252602082015290565b6040518060400160405280836000015181526020017f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4784602001516117fb9190611d96565b611825907f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47611f13565b905292915050565b919050565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806118816118d0565b815260200161188e6118d0565b905290565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b80356001600160a01b038116811461182d57600080fd5b60006020828403121561191757600080fd5b611920826118ee565b9392505050565b803560ff8116811461182d57600080fd5b60006020828403121561194a57600080fd5b61192082611927565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561198c5761198c611953565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156119bb576119bb611953565b604052919050565b600080604083850312156119d657600080fd5b6119df836118ee565b915060208084013567ffffffffffffffff808211156119fd57600080fd5b818601915086601f830112611a1157600080fd5b813581811115611a2357611a23611953565b611a35601f8201601f19168501611992565b91508082528784828501011115611a4b57600080fd5b80848401858401376000848284010152508093505050509250929050565b600060208284031215611a7b57600080fd5b5035919050565b8151815260208083015190820152604081016106df565b60008060408385031215611aac57600080fd5b611ab583611927565b946020939093013593505050565b600080600060608486031215611ad857600080fd5b611ae184611927565b9250602084013563ffffffff81168114611afa57600080fd5b929592945050506040919091013590565b6000806000838503610160811215611b2257600080fd5b611b2b856118ee565b9350610100601f1982011215611b4057600080fd5b602085019250604061011f1982011215611b5957600080fd5b50610120840190509250925092565b600080600060408486031215611b7d57600080fd5b833567ffffffffffffffff80821115611b9557600080fd5b818601915086601f830112611ba957600080fd5b813581811115611bb857600080fd5b876020828501011115611bca57600080fd5b6020928301989097509590910135949350505050565b6020808252825182820181905260009190848201906040850190845b81811015611c1e57835163ffffffff1683529284019291840191600101611bfc565b50909695505050505050565b6020808252604e908201527f424c5341706b52656769737472792e6f6e6c795265676973747279436f6f726460408201527f696e61746f723a2063616c6c6572206973206e6f74207468652072656769737460608201526d393c9031b7b7b93234b730ba37b960911b608082015260a00190565b60018060a01b038316815260006020604081840152835180604085015260005b81811015611cda57858101830151858201606001528201611cbe565b81811115611cec576000606083870101525b50601f01601f191692909201606001949350505050565b634e487b7160e01b600052603260045260246000fd5b600060408284031215611d2b57600080fd5b611d33611969565b82358152602083013560208201528091505092915050565b8881528760208201528660408201528560608201526040856080830137600060c082016000815260408682375050610100810192909252610120820152610140019695505050505050565b600082611db357634e487b7160e01b600052601260045260246000fd5b500690565b600082601f830112611dc957600080fd5b611dd1611969565b806040840185811115611de357600080fd5b845b81811015611dfd578035845260209384019301611de5565b509095945050505050565b600060808284031215611e1a57600080fd5b6040516040810181811067ffffffffffffffff82111715611e3d57611e3d611953565b604052611e4a8484611db8565b8152611e598460408501611db8565b60208201529392505050565b823581526020808401359082015260c081016040838184013760808201600081526040808501823750600081529392505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff83811690831681811015611ecc57611ecc611e99565b039392505050565b600063ffffffff80831681811415611eee57611eee611e99565b6001019392505050565b6000600019821415611f0c57611f0c611e99565b5060010190565b600082821015611f2557611f25611e99565b500390565b6000816000190483118215151615611f4457611f44611e99565b500290565b60008219821115611f5c57611f5c611e99565b50019056fe424c5341706b52656769737472792e7265676973746572424c535075626c6963a264697066735822122071c74ffc7d8293ba4fb9d589c2376e4573d94ac072817e7d5cf749062945ab3c64736f6c634300080c0033", + Bin: "0x60a06040523480156200001157600080fd5b506040516200213738038062002137833981016040819052620000349162000116565b6001600160a01b038116608052806200004c62000054565b505062000148565b600054610100900460ff1615620000c15760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000114576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012957600080fd5b81516001600160a01b03811681146200014157600080fd5b9392505050565b608051611fb7620001806000396000818161030f01528181610466015281816105bf015281816109a501526110420152611fb76000f3fe608060405234801561001057600080fd5b50600436106101155760003560e01c80636d14a987116100a2578063bf79ce5811610071578063bf79ce58146103cc578063d5254a8c146103df578063de29fac0146103ff578063e8bb9ae61461041f578063f4e24fe51461044857600080fd5b80636d14a9871461030a5780637916cea6146103315780637ff81a8714610372578063a3db80e2146103a557600080fd5b80633fb27952116100e95780633fb27952146101df57806347b314e8146101f25780635f61a88414610233578063605747d51461028f57806368bccaac146102dd57600080fd5b8062a1f4cb1461011a57806313542a4e1461015b57806326d941f214610192578063377ed99d146101a7575b600080fd5b610141610128366004611905565b6003602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b610184610169366004611905565b6001600160a01b031660009081526001602052604090205490565b604051908152602001610152565b6101a56101a0366004611938565b61045b565b005b6101ca6101b5366004611938565b60ff1660009081526004602052604090205490565b60405163ffffffff9091168152602001610152565b6101a56101ed3660046119c3565b6105b4565b61021b610200366004611a69565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001610152565b610282610241366004611938565b60408051808201909152600080825260208201525060ff16600090815260056020908152604091829020825180840190935280548352600101549082015290565b6040516101529190611a82565b6102a261029d366004611a99565b610652565b60408051825167ffffffffffffffff1916815260208084015163ffffffff908116918301919091529282015190921690820152606001610152565b6102f06102eb366004611ac3565b6106e5565b60405167ffffffffffffffff199091168152602001610152565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b61034461033f366004611a99565b610880565b6040805167ffffffffffffffff19909416845263ffffffff9283166020850152911690820152606001610152565b610385610380366004611905565b6108cb565b604080518351815260209384015193810193909352820152606001610152565b6101416103b3366004611938565b6005602052600090815260409020805460019091015482565b6101846103da366004611b0b565b610998565b6103f26103ed366004611b68565b610dec565b6040516101529190611be0565b61018461040d366004611905565b60016020526000908152604090205481565b61021b61042d366004611a69565b6002602052600090815260409020546001600160a01b031681565b6101a56104563660046119c3565b611037565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104ac5760405162461bcd60e51b81526004016104a390611c2a565b60405180910390fd5b60ff81166000908152600460205260409020541561052b5760405162461bcd60e51b815260206004820152603660248201527f424c5341706b52656769737472792e696e697469616c697a6551756f72756d3a6044820152752071756f72756d20616c72656164792065786973747360501b60648201526084016104a3565b60ff166000908152600460209081526040808320815160608101835284815263ffffffff4381168286019081528285018781528454600181018655948852959096209151919092018054955194518316600160e01b026001600160e01b0395909316600160c01b026001600160e01b03199096169190931c179390931791909116919091179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105fc5760405162461bcd60e51b81526004016104a390611c2a565b6000610607836108cb565b50905061061482826110d0565b7f5358c5b42179178c8fc757734ac2a3198f9071c765ee0d8389211525f50052468383604051610645929190611c9e565b60405180910390a1505050565b604080516060810182526000808252602080830182905282840182905260ff86168252600490529190912080548390811061068f5761068f611d03565b600091825260209182902060408051606081018252919092015467ffffffffffffffff1981841b16825263ffffffff600160c01b8204811694830194909452600160e01b90049092169082015290505b92915050565b60ff8316600090815260046020526040812080548291908490811061070c5761070c611d03565b600091825260209182902060408051606081018252919092015467ffffffffffffffff1981841b16825263ffffffff600160c01b82048116948301859052600160e01b9091048116928201929092529250851610156107d35760405162461bcd60e51b815260206004820152603e60248201527f424c5341706b52656769737472792e5f76616c696461746541706b486173684160448201527f74426c6f636b4e756d6265723a20696e64657820746f6f20726563656e74000060648201526084016104a3565b604081015163ffffffff1615806107f95750806040015163ffffffff168463ffffffff16105b6108775760405162461bcd60e51b815260206004820152604360248201527f424c5341706b52656769737472792e5f76616c696461746541706b486173684160448201527f74426c6f636b4e756d6265723a206e6f74206c61746573742061706b2075706460648201526261746560e81b608482015260a4016104a3565b51949350505050565b6004602052816000526040600020818154811061089c57600080fd5b600091825260209091200154604081901b925063ffffffff600160c01b820481169250600160e01b9091041683565b60408051808201909152600080825260208201526001600160a01b03821660008181526003602090815260408083208151808301835281548152600191820154818501529484529091528120549091908061098e5760405162461bcd60e51b815260206004820152603e60248201527f424c5341706b52656769737472792e676574526567697374657265645075626b60448201527f65793a206f70657261746f72206973206e6f742072656769737465726564000060648201526084016104a3565b9094909350915050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109e25760405162461bcd60e51b81526004016104a390611c2a565b6000610a106109f936869003860160408701611d19565b805160009081526020918201519091526040902090565b90507fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5811415610a98576040805162461bcd60e51b8152602060048201526024810191909152600080516020611f6283398151915260448201527f4b65793a2063616e6e6f74207265676973746572207a65726f207075626b657960648201526084016104a3565b6001600160a01b03851660009081526001602052604090205415610b225760405162461bcd60e51b81526020600482015260476024820152600080516020611f6283398151915260448201527f4b65793a206f70657261746f7220616c72656164792072656769737465726564606482015266207075626b657960c81b608482015260a4016104a3565b6000818152600260205260409020546001600160a01b031615610ba65760405162461bcd60e51b81526020600482015260426024820152600080516020611f6283398151915260448201527f4b65793a207075626c6963206b657920616c7265616479207265676973746572606482015261195960f21b608482015260a4016104a3565b604080516000917f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000191610bff918835916020808b0135928b01359160608c01359160808d019160c08e01918d35918e8201359101611d4b565b6040516020818303038152906040528051906020012060001c610c229190611d96565b9050610cbc610c5b610c4683610c40368a90038a0160408b01611d19565b9061131b565b610c5536899003890189611d19565b906113b2565b610c63611446565b610ca5610c9685610c40604080518082018252600080825260209182015281518083019092526001825260029082015290565b610c55368a90038a018a611d19565b610cb7368a90038a0160808b01611e08565b611506565b610d575760405162461bcd60e51b815260206004820152606c6024820152600080516020611f6283398151915260448201527f4b65793a2065697468657220746865204731207369676e61747572652069732060648201527f77726f6e672c206f7220473120616e642047322070726976617465206b65792060848201526b0c8de40dcdee840dac2e8c6d60a31b60a482015260c4016104a3565b6001600160a01b03861660008181526003602090815260408083208982018035825560608b013560019283015590835281842087905586845260029092529182902080546001600160a01b0319168417905590517fe3fb6613af2e8930cf85d47fcf6db10192224a64c6cbe8023e0eee1ba382804191610ddb9160808a0190611e65565b60405180910390a250949350505050565b606060008367ffffffffffffffff811115610e0957610e09611953565b604051908082528060200260200182016040528015610e32578160200160208202803683370190505b50905060005b8481101561102e576000868683818110610e5457610e54611d03565b919091013560f81c600081815260046020526040902054909250905063ffffffff81161580610ebd575060ff821660009081526004602052604081208054909190610ea157610ea1611d03565b600091825260209091200154600160c01b900463ffffffff1686105b15610f4a5760405162461bcd60e51b815260206004820152605160248201527f424c5341706b52656769737472792e67657441706b496e64696365734174426c60448201527f6f636b4e756d6265723a20626c6f636b4e756d626572206973206265666f7265606482015270207468652066697273742075706461746560781b608482015260a4016104a3565b60005b8163ffffffff168163ffffffff1610156110185760ff8316600090815260046020526040902087906001610f818486611eaf565b610f8b9190611eaf565b63ffffffff1681548110610fa157610fa1611d03565b600091825260209091200154600160c01b900463ffffffff1611611006576001610fcb8284611eaf565b610fd59190611eaf565b858581518110610fe757610fe7611d03565b602002602001019063ffffffff16908163ffffffff1681525050611018565b8061101081611ed4565b915050610f4d565b505050808061102690611ef8565b915050610e38565b50949350505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461107f5760405162461bcd60e51b81526004016104a390611c2a565b600061108a836108cb565b50905061109f8261109a83611773565b6110d0565b7f14a5172b312e9d2c22b8468f9c70ec2caa9de934fe380734fbc6f3beff2b14ba8383604051610645929190611c9e565b604080518082019091526000808252602082015260005b835181101561131557600084828151811061110457611104611d03565b0160209081015160f81c60008181526004909252604090912054909150806111945760405162461bcd60e51b815260206004820152603d60248201527f424c5341706b52656769737472792e5f70726f6365737351756f72756d41706b60448201527f5570646174653a2071756f72756d20646f6573206e6f7420657869737400000060648201526084016104a3565b60ff821660009081526005602090815260409182902082518084019093528054835260010154908201526111c890866113b2565b60ff831660008181526005602090815260408083208551808255868401805160019384015590855251835281842094845260049092528220939750919290916112119085611f13565b8154811061122157611221611d03565b600091825260209091200180549091504363ffffffff908116600160c01b9092041614156112625780546001600160c01b031916604083901c1781556112fe565b805463ffffffff438116600160e01b8181026001600160e01b0394851617855560ff88166000908152600460209081526040808320815160608101835267ffffffffffffffff198b16815280840196875280830185815282546001810184559286529390942093519301805495519251871690940291909516600160c01b026001600160e01b0319949094169190941c17919091179092161790555b50505050808061130d90611ef8565b9150506110e7565b50505050565b6040805180820190915260008082526020820152611337611832565b835181526020808501519082015260408082018490526000908360608460076107d05a03fa905080801561136a5761136c565bfe5b50806113aa5760405162461bcd60e51b815260206004820152600d60248201526c1958cb5b5d5b0b59985a5b1959609a1b60448201526064016104a3565b505092915050565b60408051808201909152600080825260208201526113ce611850565b835181526020808501518183015283516040808401919091529084015160608301526000908360808460066107d05a03fa905080801561136a5750806113aa5760405162461bcd60e51b815260206004820152600d60248201526c1958cb5859190b59985a5b1959609a1b60448201526064016104a3565b61144e61186e565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b604080518082018252858152602080820185905282518084019093528583528201839052600091611535611893565b60005b60028110156116fa57600061154e826006611f2a565b905084826002811061156257611562611d03565b60200201515183611574836000611f49565b600c811061158457611584611d03565b602002015284826002811061159b5761159b611d03565b602002015160200151838260016115b29190611f49565b600c81106115c2576115c2611d03565b60200201528382600281106115d9576115d9611d03565b60200201515151836115ec836002611f49565b600c81106115fc576115fc611d03565b602002015283826002811061161357611613611d03565b602002015151600160200201518361162c836003611f49565b600c811061163c5761163c611d03565b602002015283826002811061165357611653611d03565b60200201516020015160006002811061166e5761166e611d03565b60200201518361167f836004611f49565b600c811061168f5761168f611d03565b60200201528382600281106116a6576116a6611d03565b6020020151602001516001600281106116c1576116c1611d03565b6020020151836116d2836005611f49565b600c81106116e2576116e2611d03565b602002015250806116f281611ef8565b915050611538565b506117036118b2565b60006020826101808560086107d05a03fa905080801561136a5750806117635760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b60448201526064016104a3565b5051151598975050505050505050565b6040805180820190915260008082526020820152815115801561179857506020820151155b156117b6575050604080518082019091526000808252602082015290565b6040518060400160405280836000015181526020017f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4784602001516117fb9190611d96565b611825907f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47611f13565b905292915050565b919050565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806118816118d0565b815260200161188e6118d0565b905290565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b80356001600160a01b038116811461182d57600080fd5b60006020828403121561191757600080fd5b611920826118ee565b9392505050565b803560ff8116811461182d57600080fd5b60006020828403121561194a57600080fd5b61192082611927565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561198c5761198c611953565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156119bb576119bb611953565b604052919050565b600080604083850312156119d657600080fd5b6119df836118ee565b915060208084013567ffffffffffffffff808211156119fd57600080fd5b818601915086601f830112611a1157600080fd5b813581811115611a2357611a23611953565b611a35601f8201601f19168501611992565b91508082528784828501011115611a4b57600080fd5b80848401858401376000848284010152508093505050509250929050565b600060208284031215611a7b57600080fd5b5035919050565b8151815260208083015190820152604081016106df565b60008060408385031215611aac57600080fd5b611ab583611927565b946020939093013593505050565b600080600060608486031215611ad857600080fd5b611ae184611927565b9250602084013563ffffffff81168114611afa57600080fd5b929592945050506040919091013590565b6000806000838503610160811215611b2257600080fd5b611b2b856118ee565b9350610100601f1982011215611b4057600080fd5b602085019250604061011f1982011215611b5957600080fd5b50610120840190509250925092565b600080600060408486031215611b7d57600080fd5b833567ffffffffffffffff80821115611b9557600080fd5b818601915086601f830112611ba957600080fd5b813581811115611bb857600080fd5b876020828501011115611bca57600080fd5b6020928301989097509590910135949350505050565b6020808252825182820181905260009190848201906040850190845b81811015611c1e57835163ffffffff1683529284019291840191600101611bfc565b50909695505050505050565b6020808252604e908201527f424c5341706b52656769737472792e6f6e6c795265676973747279436f6f726460408201527f696e61746f723a2063616c6c6572206973206e6f74207468652072656769737460608201526d393c9031b7b7b93234b730ba37b960911b608082015260a00190565b60018060a01b038316815260006020604081840152835180604085015260005b81811015611cda57858101830151858201606001528201611cbe565b81811115611cec576000606083870101525b50601f01601f191692909201606001949350505050565b634e487b7160e01b600052603260045260246000fd5b600060408284031215611d2b57600080fd5b611d33611969565b82358152602083013560208201528091505092915050565b8881528760208201528660408201528560608201526040856080830137600060c082016000815260408682375050610100810192909252610120820152610140019695505050505050565b600082611db357634e487b7160e01b600052601260045260246000fd5b500690565b600082601f830112611dc957600080fd5b611dd1611969565b806040840185811115611de357600080fd5b845b81811015611dfd578035845260209384019301611de5565b509095945050505050565b600060808284031215611e1a57600080fd5b6040516040810181811067ffffffffffffffff82111715611e3d57611e3d611953565b604052611e4a8484611db8565b8152611e598460408501611db8565b60208201529392505050565b823581526020808401359082015260c081016040838184013760808201600081526040808501823750600081529392505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff83811690831681811015611ecc57611ecc611e99565b039392505050565b600063ffffffff80831681811415611eee57611eee611e99565b6001019392505050565b6000600019821415611f0c57611f0c611e99565b5060010190565b600082821015611f2557611f25611e99565b500390565b6000816000190483118215151615611f4457611f44611e99565b500290565b60008219821115611f5c57611f5c611e99565b50019056fe424c5341706b52656769737472792e7265676973746572424c535075626c6963a2646970667358221220e30e2a39a5aac4131fd3e1c3e83592848f3634b62d720de800c6dd624e8f294d64736f6c634300080c0033", } // ContractBLSApkRegistryABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/ECDSAOperatorStateRetriever/binding.go b/contracts/bindings/ECDSAOperatorStateRetriever/binding.go new file mode 100644 index 000000000..4e4894364 --- /dev/null +++ b/contracts/bindings/ECDSAOperatorStateRetriever/binding.go @@ -0,0 +1,347 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contractECDSAOperatorStateRetriever + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ECDSAOperatorStateRetrieverCheckSignaturesIndices is an auto generated low-level Go binding around an user-defined struct. +type ECDSAOperatorStateRetrieverCheckSignaturesIndices struct { + SignerQuorumBitmapIndices []uint32 + TotalStakeIndices []uint32 + SignerStakeIndices [][]uint32 +} + +// ECDSAOperatorStateRetrieverOperator is an auto generated low-level Go binding around an user-defined struct. +type ECDSAOperatorStateRetrieverOperator struct { + Operator common.Address + OperatorId common.Address + Stake *big.Int +} + +// ContractECDSAOperatorStateRetrieverMetaData contains all meta data concerning the ContractECDSAOperatorStateRetriever contract. +var ContractECDSAOperatorStateRetrieverMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"getCheckSignaturesIndices\",\"inputs\":[{\"name\":\"registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractECDSARegistryCoordinator\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signerOperatorIds\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structECDSAOperatorStateRetriever.CheckSignaturesIndices\",\"components\":[{\"name\":\"signerQuorumBitmapIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"totalStakeIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"signerStakeIndices\",\"type\":\"uint32[][]\",\"internalType\":\"uint32[][]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorState\",\"inputs\":[{\"name\":\"registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractECDSARegistryCoordinator\"},{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"tuple[][]\",\"internalType\":\"structECDSAOperatorStateRetriever.Operator[][]\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorState\",\"inputs\":[{\"name\":\"registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractECDSARegistryCoordinator\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[][]\",\"internalType\":\"structECDSAOperatorStateRetriever.Operator[][]\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"}]", + Bin: "0x6", +} + +// ContractECDSAOperatorStateRetrieverABI is the input ABI used to generate the binding from. +// Deprecated: Use ContractECDSAOperatorStateRetrieverMetaData.ABI instead. +var ContractECDSAOperatorStateRetrieverABI = ContractECDSAOperatorStateRetrieverMetaData.ABI + +// ContractECDSAOperatorStateRetrieverBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ContractECDSAOperatorStateRetrieverMetaData.Bin instead. +var ContractECDSAOperatorStateRetrieverBin = ContractECDSAOperatorStateRetrieverMetaData.Bin + +// DeployContractECDSAOperatorStateRetriever deploys a new Ethereum contract, binding an instance of ContractECDSAOperatorStateRetriever to it. +func DeployContractECDSAOperatorStateRetriever(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ContractECDSAOperatorStateRetriever, error) { + parsed, err := ContractECDSAOperatorStateRetrieverMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ContractECDSAOperatorStateRetrieverBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ContractECDSAOperatorStateRetriever{ContractECDSAOperatorStateRetrieverCaller: ContractECDSAOperatorStateRetrieverCaller{contract: contract}, ContractECDSAOperatorStateRetrieverTransactor: ContractECDSAOperatorStateRetrieverTransactor{contract: contract}, ContractECDSAOperatorStateRetrieverFilterer: ContractECDSAOperatorStateRetrieverFilterer{contract: contract}}, nil +} + +// ContractECDSAOperatorStateRetrieverMethods is an auto generated interface around an Ethereum contract. +type ContractECDSAOperatorStateRetrieverMethods interface { + ContractECDSAOperatorStateRetrieverCalls + ContractECDSAOperatorStateRetrieverTransacts + ContractECDSAOperatorStateRetrieverFilters +} + +// ContractECDSAOperatorStateRetrieverCalls is an auto generated interface that defines the call methods available for an Ethereum contract. +type ContractECDSAOperatorStateRetrieverCalls interface { + GetCheckSignaturesIndices(opts *bind.CallOpts, registryCoordinator common.Address, referenceBlockNumber uint32, quorumNumbers []byte, signerOperatorIds []common.Address) (ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) + + GetOperatorState(opts *bind.CallOpts, registryCoordinator common.Address, operatorId common.Address, blockNumber uint32) (*big.Int, [][]ECDSAOperatorStateRetrieverOperator, error) + + GetOperatorState0(opts *bind.CallOpts, registryCoordinator common.Address, quorumNumbers []byte, blockNumber uint32) ([][]ECDSAOperatorStateRetrieverOperator, error) +} + +// ContractECDSAOperatorStateRetrieverTransacts is an auto generated interface that defines the transact methods available for an Ethereum contract. +type ContractECDSAOperatorStateRetrieverTransacts interface { +} + +// ContractECDSAOperatorStateRetrieverFilterer is an auto generated interface that defines the log filtering methods available for an Ethereum contract. +type ContractECDSAOperatorStateRetrieverFilters interface { +} + +// ContractECDSAOperatorStateRetriever is an auto generated Go binding around an Ethereum contract. +type ContractECDSAOperatorStateRetriever struct { + ContractECDSAOperatorStateRetrieverCaller // Read-only binding to the contract + ContractECDSAOperatorStateRetrieverTransactor // Write-only binding to the contract + ContractECDSAOperatorStateRetrieverFilterer // Log filterer for contract events +} + +// ContractECDSAOperatorStateRetriever implements the ContractECDSAOperatorStateRetrieverMethods interface. +var _ ContractECDSAOperatorStateRetrieverMethods = (*ContractECDSAOperatorStateRetriever)(nil) + +// ContractECDSAOperatorStateRetrieverCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContractECDSAOperatorStateRetrieverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSAOperatorStateRetrieverCaller implements the ContractECDSAOperatorStateRetrieverCalls interface. +var _ ContractECDSAOperatorStateRetrieverCalls = (*ContractECDSAOperatorStateRetrieverCaller)(nil) + +// ContractECDSAOperatorStateRetrieverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContractECDSAOperatorStateRetrieverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSAOperatorStateRetrieverTransactor implements the ContractECDSAOperatorStateRetrieverTransacts interface. +var _ ContractECDSAOperatorStateRetrieverTransacts = (*ContractECDSAOperatorStateRetrieverTransactor)(nil) + +// ContractECDSAOperatorStateRetrieverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContractECDSAOperatorStateRetrieverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSAOperatorStateRetrieverFilterer implements the ContractECDSAOperatorStateRetrieverFilters interface. +var _ ContractECDSAOperatorStateRetrieverFilters = (*ContractECDSAOperatorStateRetrieverFilterer)(nil) + +// ContractECDSAOperatorStateRetrieverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContractECDSAOperatorStateRetrieverSession struct { + Contract *ContractECDSAOperatorStateRetriever // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContractECDSAOperatorStateRetrieverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContractECDSAOperatorStateRetrieverCallerSession struct { + Contract *ContractECDSAOperatorStateRetrieverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContractECDSAOperatorStateRetrieverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContractECDSAOperatorStateRetrieverTransactorSession struct { + Contract *ContractECDSAOperatorStateRetrieverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContractECDSAOperatorStateRetrieverRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContractECDSAOperatorStateRetrieverRaw struct { + Contract *ContractECDSAOperatorStateRetriever // Generic contract binding to access the raw methods on +} + +// ContractECDSAOperatorStateRetrieverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContractECDSAOperatorStateRetrieverCallerRaw struct { + Contract *ContractECDSAOperatorStateRetrieverCaller // Generic read-only contract binding to access the raw methods on +} + +// ContractECDSAOperatorStateRetrieverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContractECDSAOperatorStateRetrieverTransactorRaw struct { + Contract *ContractECDSAOperatorStateRetrieverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContractECDSAOperatorStateRetriever creates a new instance of ContractECDSAOperatorStateRetriever, bound to a specific deployed contract. +func NewContractECDSAOperatorStateRetriever(address common.Address, backend bind.ContractBackend) (*ContractECDSAOperatorStateRetriever, error) { + contract, err := bindContractECDSAOperatorStateRetriever(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContractECDSAOperatorStateRetriever{ContractECDSAOperatorStateRetrieverCaller: ContractECDSAOperatorStateRetrieverCaller{contract: contract}, ContractECDSAOperatorStateRetrieverTransactor: ContractECDSAOperatorStateRetrieverTransactor{contract: contract}, ContractECDSAOperatorStateRetrieverFilterer: ContractECDSAOperatorStateRetrieverFilterer{contract: contract}}, nil +} + +// NewContractECDSAOperatorStateRetrieverCaller creates a new read-only instance of ContractECDSAOperatorStateRetriever, bound to a specific deployed contract. +func NewContractECDSAOperatorStateRetrieverCaller(address common.Address, caller bind.ContractCaller) (*ContractECDSAOperatorStateRetrieverCaller, error) { + contract, err := bindContractECDSAOperatorStateRetriever(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContractECDSAOperatorStateRetrieverCaller{contract: contract}, nil +} + +// NewContractECDSAOperatorStateRetrieverTransactor creates a new write-only instance of ContractECDSAOperatorStateRetriever, bound to a specific deployed contract. +func NewContractECDSAOperatorStateRetrieverTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractECDSAOperatorStateRetrieverTransactor, error) { + contract, err := bindContractECDSAOperatorStateRetriever(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContractECDSAOperatorStateRetrieverTransactor{contract: contract}, nil +} + +// NewContractECDSAOperatorStateRetrieverFilterer creates a new log filterer instance of ContractECDSAOperatorStateRetriever, bound to a specific deployed contract. +func NewContractECDSAOperatorStateRetrieverFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractECDSAOperatorStateRetrieverFilterer, error) { + contract, err := bindContractECDSAOperatorStateRetriever(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContractECDSAOperatorStateRetrieverFilterer{contract: contract}, nil +} + +// bindContractECDSAOperatorStateRetriever binds a generic wrapper to an already deployed contract. +func bindContractECDSAOperatorStateRetriever(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ContractECDSAOperatorStateRetrieverMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContractECDSAOperatorStateRetriever.Contract.ContractECDSAOperatorStateRetrieverCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSAOperatorStateRetriever.Contract.ContractECDSAOperatorStateRetrieverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContractECDSAOperatorStateRetriever.Contract.ContractECDSAOperatorStateRetrieverTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContractECDSAOperatorStateRetriever.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSAOperatorStateRetriever.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContractECDSAOperatorStateRetriever.Contract.contract.Transact(opts, method, params...) +} + +// GetCheckSignaturesIndices is a free data retrieval call binding the contract method 0x93169f46. +// +// Solidity: function getCheckSignaturesIndices(address registryCoordinator, uint32 referenceBlockNumber, bytes quorumNumbers, address[] signerOperatorIds) view returns((uint32[],uint32[],uint32[][])) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverCaller) GetCheckSignaturesIndices(opts *bind.CallOpts, registryCoordinator common.Address, referenceBlockNumber uint32, quorumNumbers []byte, signerOperatorIds []common.Address) (ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) { + var out []interface{} + err := _ContractECDSAOperatorStateRetriever.contract.Call(opts, &out, "getCheckSignaturesIndices", registryCoordinator, referenceBlockNumber, quorumNumbers, signerOperatorIds) + + if err != nil { + return *new(ECDSAOperatorStateRetrieverCheckSignaturesIndices), err + } + + out0 := *abi.ConvertType(out[0], new(ECDSAOperatorStateRetrieverCheckSignaturesIndices)).(*ECDSAOperatorStateRetrieverCheckSignaturesIndices) + + return out0, err + +} + +// GetCheckSignaturesIndices is a free data retrieval call binding the contract method 0x93169f46. +// +// Solidity: function getCheckSignaturesIndices(address registryCoordinator, uint32 referenceBlockNumber, bytes quorumNumbers, address[] signerOperatorIds) view returns((uint32[],uint32[],uint32[][])) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverSession) GetCheckSignaturesIndices(registryCoordinator common.Address, referenceBlockNumber uint32, quorumNumbers []byte, signerOperatorIds []common.Address) (ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) { + return _ContractECDSAOperatorStateRetriever.Contract.GetCheckSignaturesIndices(&_ContractECDSAOperatorStateRetriever.CallOpts, registryCoordinator, referenceBlockNumber, quorumNumbers, signerOperatorIds) +} + +// GetCheckSignaturesIndices is a free data retrieval call binding the contract method 0x93169f46. +// +// Solidity: function getCheckSignaturesIndices(address registryCoordinator, uint32 referenceBlockNumber, bytes quorumNumbers, address[] signerOperatorIds) view returns((uint32[],uint32[],uint32[][])) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverCallerSession) GetCheckSignaturesIndices(registryCoordinator common.Address, referenceBlockNumber uint32, quorumNumbers []byte, signerOperatorIds []common.Address) (ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) { + return _ContractECDSAOperatorStateRetriever.Contract.GetCheckSignaturesIndices(&_ContractECDSAOperatorStateRetriever.CallOpts, registryCoordinator, referenceBlockNumber, quorumNumbers, signerOperatorIds) +} + +// GetOperatorState is a free data retrieval call binding the contract method 0x2617c130. +// +// Solidity: function getOperatorState(address registryCoordinator, address operatorId, uint32 blockNumber) view returns(uint256, (address,address,uint96)[][]) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverCaller) GetOperatorState(opts *bind.CallOpts, registryCoordinator common.Address, operatorId common.Address, blockNumber uint32) (*big.Int, [][]ECDSAOperatorStateRetrieverOperator, error) { + var out []interface{} + err := _ContractECDSAOperatorStateRetriever.contract.Call(opts, &out, "getOperatorState", registryCoordinator, operatorId, blockNumber) + + if err != nil { + return *new(*big.Int), *new([][]ECDSAOperatorStateRetrieverOperator), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new([][]ECDSAOperatorStateRetrieverOperator)).(*[][]ECDSAOperatorStateRetrieverOperator) + + return out0, out1, err + +} + +// GetOperatorState is a free data retrieval call binding the contract method 0x2617c130. +// +// Solidity: function getOperatorState(address registryCoordinator, address operatorId, uint32 blockNumber) view returns(uint256, (address,address,uint96)[][]) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverSession) GetOperatorState(registryCoordinator common.Address, operatorId common.Address, blockNumber uint32) (*big.Int, [][]ECDSAOperatorStateRetrieverOperator, error) { + return _ContractECDSAOperatorStateRetriever.Contract.GetOperatorState(&_ContractECDSAOperatorStateRetriever.CallOpts, registryCoordinator, operatorId, blockNumber) +} + +// GetOperatorState is a free data retrieval call binding the contract method 0x2617c130. +// +// Solidity: function getOperatorState(address registryCoordinator, address operatorId, uint32 blockNumber) view returns(uint256, (address,address,uint96)[][]) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverCallerSession) GetOperatorState(registryCoordinator common.Address, operatorId common.Address, blockNumber uint32) (*big.Int, [][]ECDSAOperatorStateRetrieverOperator, error) { + return _ContractECDSAOperatorStateRetriever.Contract.GetOperatorState(&_ContractECDSAOperatorStateRetriever.CallOpts, registryCoordinator, operatorId, blockNumber) +} + +// GetOperatorState0 is a free data retrieval call binding the contract method 0x3563b0d1. +// +// Solidity: function getOperatorState(address registryCoordinator, bytes quorumNumbers, uint32 blockNumber) view returns((address,address,uint96)[][]) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverCaller) GetOperatorState0(opts *bind.CallOpts, registryCoordinator common.Address, quorumNumbers []byte, blockNumber uint32) ([][]ECDSAOperatorStateRetrieverOperator, error) { + var out []interface{} + err := _ContractECDSAOperatorStateRetriever.contract.Call(opts, &out, "getOperatorState0", registryCoordinator, quorumNumbers, blockNumber) + + if err != nil { + return *new([][]ECDSAOperatorStateRetrieverOperator), err + } + + out0 := *abi.ConvertType(out[0], new([][]ECDSAOperatorStateRetrieverOperator)).(*[][]ECDSAOperatorStateRetrieverOperator) + + return out0, err + +} + +// GetOperatorState0 is a free data retrieval call binding the contract method 0x3563b0d1. +// +// Solidity: function getOperatorState(address registryCoordinator, bytes quorumNumbers, uint32 blockNumber) view returns((address,address,uint96)[][]) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverSession) GetOperatorState0(registryCoordinator common.Address, quorumNumbers []byte, blockNumber uint32) ([][]ECDSAOperatorStateRetrieverOperator, error) { + return _ContractECDSAOperatorStateRetriever.Contract.GetOperatorState0(&_ContractECDSAOperatorStateRetriever.CallOpts, registryCoordinator, quorumNumbers, blockNumber) +} + +// GetOperatorState0 is a free data retrieval call binding the contract method 0x3563b0d1. +// +// Solidity: function getOperatorState(address registryCoordinator, bytes quorumNumbers, uint32 blockNumber) view returns((address,address,uint96)[][]) +func (_ContractECDSAOperatorStateRetriever *ContractECDSAOperatorStateRetrieverCallerSession) GetOperatorState0(registryCoordinator common.Address, quorumNumbers []byte, blockNumber uint32) ([][]ECDSAOperatorStateRetrieverOperator, error) { + return _ContractECDSAOperatorStateRetriever.Contract.GetOperatorState0(&_ContractECDSAOperatorStateRetriever.CallOpts, registryCoordinator, quorumNumbers, blockNumber) +} diff --git a/contracts/bindings/ECDSASignatureChecker/binding.go b/contracts/bindings/ECDSASignatureChecker/binding.go new file mode 100644 index 000000000..6a3b2ab07 --- /dev/null +++ b/contracts/bindings/ECDSASignatureChecker/binding.go @@ -0,0 +1,573 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contractECDSASignatureChecker + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ECDSASignatureCheckerQuorumStakeTotals is an auto generated low-level Go binding around an user-defined struct. +type ECDSASignatureCheckerQuorumStakeTotals struct { + SignedStakeForQuorum []*big.Int + TotalStakeForQuorum []*big.Int +} + +// ECDSASignatureCheckerSignerStakeIndicesAndSignatures is an auto generated low-level Go binding around an user-defined struct. +type ECDSASignatureCheckerSignerStakeIndicesAndSignatures struct { + SignerIds []common.Address + Signatures [][]byte + SignerQuorumBitmapIndices []uint32 + TotalStakeIndices []uint32 + SignerStakeIndices [][]uint32 +} + +// ContractECDSASignatureCheckerMetaData contains all meta data concerning the ContractECDSASignatureChecker contract. +var ContractECDSASignatureCheckerMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractECDSARegistryCoordinator\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"checkSignatures\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structECDSASignatureChecker.SignerStakeIndicesAndSignatures\",\"components\":[{\"name\":\"signerIds\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"signatures\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"signerQuorumBitmapIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"totalStakeIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"signerStakeIndices\",\"type\":\"uint32[][]\",\"internalType\":\"uint32[][]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structECDSASignatureChecker.QuorumStakeTotals\",\"components\":[{\"name\":\"signedStakeForQuorum\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"totalStakeForQuorum\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}]},{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registryCoordinator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractECDSARegistryCoordinator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setStaleStakesForbidden\",\"inputs\":[{\"name\":\"value\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stakeRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractECDSAStakeRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"staleStakesForbidden\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"StaleStakesForbiddenUpdate\",\"inputs\":[{\"name\":\"value\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false}]", + Bin: "0x6", +} + +// ContractECDSASignatureCheckerABI is the input ABI used to generate the binding from. +// Deprecated: Use ContractECDSASignatureCheckerMetaData.ABI instead. +var ContractECDSASignatureCheckerABI = ContractECDSASignatureCheckerMetaData.ABI + +// ContractECDSASignatureCheckerBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ContractECDSASignatureCheckerMetaData.Bin instead. +var ContractECDSASignatureCheckerBin = ContractECDSASignatureCheckerMetaData.Bin + +// DeployContractECDSASignatureChecker deploys a new Ethereum contract, binding an instance of ContractECDSASignatureChecker to it. +func DeployContractECDSASignatureChecker(auth *bind.TransactOpts, backend bind.ContractBackend, _registryCoordinator common.Address) (common.Address, *types.Transaction, *ContractECDSASignatureChecker, error) { + parsed, err := ContractECDSASignatureCheckerMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ContractECDSASignatureCheckerBin), backend, _registryCoordinator) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ContractECDSASignatureChecker{ContractECDSASignatureCheckerCaller: ContractECDSASignatureCheckerCaller{contract: contract}, ContractECDSASignatureCheckerTransactor: ContractECDSASignatureCheckerTransactor{contract: contract}, ContractECDSASignatureCheckerFilterer: ContractECDSASignatureCheckerFilterer{contract: contract}}, nil +} + +// ContractECDSASignatureCheckerMethods is an auto generated interface around an Ethereum contract. +type ContractECDSASignatureCheckerMethods interface { + ContractECDSASignatureCheckerCalls + ContractECDSASignatureCheckerTransacts + ContractECDSASignatureCheckerFilters +} + +// ContractECDSASignatureCheckerCalls is an auto generated interface that defines the call methods available for an Ethereum contract. +type ContractECDSASignatureCheckerCalls interface { + CheckSignatures(opts *bind.CallOpts, msgHash [32]byte, quorumNumbers []byte, referenceBlockNumber uint32, params ECDSASignatureCheckerSignerStakeIndicesAndSignatures) (ECDSASignatureCheckerQuorumStakeTotals, [32]byte, error) + + Delegation(opts *bind.CallOpts) (common.Address, error) + + RegistryCoordinator(opts *bind.CallOpts) (common.Address, error) + + StakeRegistry(opts *bind.CallOpts) (common.Address, error) + + StaleStakesForbidden(opts *bind.CallOpts) (bool, error) +} + +// ContractECDSASignatureCheckerTransacts is an auto generated interface that defines the transact methods available for an Ethereum contract. +type ContractECDSASignatureCheckerTransacts interface { + SetStaleStakesForbidden(opts *bind.TransactOpts, value bool) (*types.Transaction, error) +} + +// ContractECDSASignatureCheckerFilterer is an auto generated interface that defines the log filtering methods available for an Ethereum contract. +type ContractECDSASignatureCheckerFilters interface { + FilterStaleStakesForbiddenUpdate(opts *bind.FilterOpts) (*ContractECDSASignatureCheckerStaleStakesForbiddenUpdateIterator, error) + WatchStaleStakesForbiddenUpdate(opts *bind.WatchOpts, sink chan<- *ContractECDSASignatureCheckerStaleStakesForbiddenUpdate) (event.Subscription, error) + ParseStaleStakesForbiddenUpdate(log types.Log) (*ContractECDSASignatureCheckerStaleStakesForbiddenUpdate, error) +} + +// ContractECDSASignatureChecker is an auto generated Go binding around an Ethereum contract. +type ContractECDSASignatureChecker struct { + ContractECDSASignatureCheckerCaller // Read-only binding to the contract + ContractECDSASignatureCheckerTransactor // Write-only binding to the contract + ContractECDSASignatureCheckerFilterer // Log filterer for contract events +} + +// ContractECDSASignatureChecker implements the ContractECDSASignatureCheckerMethods interface. +var _ ContractECDSASignatureCheckerMethods = (*ContractECDSASignatureChecker)(nil) + +// ContractECDSASignatureCheckerCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContractECDSASignatureCheckerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSASignatureCheckerCaller implements the ContractECDSASignatureCheckerCalls interface. +var _ ContractECDSASignatureCheckerCalls = (*ContractECDSASignatureCheckerCaller)(nil) + +// ContractECDSASignatureCheckerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContractECDSASignatureCheckerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSASignatureCheckerTransactor implements the ContractECDSASignatureCheckerTransacts interface. +var _ ContractECDSASignatureCheckerTransacts = (*ContractECDSASignatureCheckerTransactor)(nil) + +// ContractECDSASignatureCheckerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContractECDSASignatureCheckerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSASignatureCheckerFilterer implements the ContractECDSASignatureCheckerFilters interface. +var _ ContractECDSASignatureCheckerFilters = (*ContractECDSASignatureCheckerFilterer)(nil) + +// ContractECDSASignatureCheckerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContractECDSASignatureCheckerSession struct { + Contract *ContractECDSASignatureChecker // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContractECDSASignatureCheckerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContractECDSASignatureCheckerCallerSession struct { + Contract *ContractECDSASignatureCheckerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContractECDSASignatureCheckerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContractECDSASignatureCheckerTransactorSession struct { + Contract *ContractECDSASignatureCheckerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContractECDSASignatureCheckerRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContractECDSASignatureCheckerRaw struct { + Contract *ContractECDSASignatureChecker // Generic contract binding to access the raw methods on +} + +// ContractECDSASignatureCheckerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContractECDSASignatureCheckerCallerRaw struct { + Contract *ContractECDSASignatureCheckerCaller // Generic read-only contract binding to access the raw methods on +} + +// ContractECDSASignatureCheckerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContractECDSASignatureCheckerTransactorRaw struct { + Contract *ContractECDSASignatureCheckerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContractECDSASignatureChecker creates a new instance of ContractECDSASignatureChecker, bound to a specific deployed contract. +func NewContractECDSASignatureChecker(address common.Address, backend bind.ContractBackend) (*ContractECDSASignatureChecker, error) { + contract, err := bindContractECDSASignatureChecker(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContractECDSASignatureChecker{ContractECDSASignatureCheckerCaller: ContractECDSASignatureCheckerCaller{contract: contract}, ContractECDSASignatureCheckerTransactor: ContractECDSASignatureCheckerTransactor{contract: contract}, ContractECDSASignatureCheckerFilterer: ContractECDSASignatureCheckerFilterer{contract: contract}}, nil +} + +// NewContractECDSASignatureCheckerCaller creates a new read-only instance of ContractECDSASignatureChecker, bound to a specific deployed contract. +func NewContractECDSASignatureCheckerCaller(address common.Address, caller bind.ContractCaller) (*ContractECDSASignatureCheckerCaller, error) { + contract, err := bindContractECDSASignatureChecker(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContractECDSASignatureCheckerCaller{contract: contract}, nil +} + +// NewContractECDSASignatureCheckerTransactor creates a new write-only instance of ContractECDSASignatureChecker, bound to a specific deployed contract. +func NewContractECDSASignatureCheckerTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractECDSASignatureCheckerTransactor, error) { + contract, err := bindContractECDSASignatureChecker(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContractECDSASignatureCheckerTransactor{contract: contract}, nil +} + +// NewContractECDSASignatureCheckerFilterer creates a new log filterer instance of ContractECDSASignatureChecker, bound to a specific deployed contract. +func NewContractECDSASignatureCheckerFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractECDSASignatureCheckerFilterer, error) { + contract, err := bindContractECDSASignatureChecker(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContractECDSASignatureCheckerFilterer{contract: contract}, nil +} + +// bindContractECDSASignatureChecker binds a generic wrapper to an already deployed contract. +func bindContractECDSASignatureChecker(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ContractECDSASignatureCheckerMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContractECDSASignatureChecker.Contract.ContractECDSASignatureCheckerCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSASignatureChecker.Contract.ContractECDSASignatureCheckerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContractECDSASignatureChecker.Contract.ContractECDSASignatureCheckerTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContractECDSASignatureChecker.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSASignatureChecker.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContractECDSASignatureChecker.Contract.contract.Transact(opts, method, params...) +} + +// CheckSignatures is a free data retrieval call binding the contract method 0x5f62d642. +// +// Solidity: function checkSignatures(bytes32 msgHash, bytes quorumNumbers, uint32 referenceBlockNumber, (address[],bytes[],uint32[],uint32[],uint32[][]) params) view returns((uint96[],uint96[]), bytes32) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCaller) CheckSignatures(opts *bind.CallOpts, msgHash [32]byte, quorumNumbers []byte, referenceBlockNumber uint32, params ECDSASignatureCheckerSignerStakeIndicesAndSignatures) (ECDSASignatureCheckerQuorumStakeTotals, [32]byte, error) { + var out []interface{} + err := _ContractECDSASignatureChecker.contract.Call(opts, &out, "checkSignatures", msgHash, quorumNumbers, referenceBlockNumber, params) + + if err != nil { + return *new(ECDSASignatureCheckerQuorumStakeTotals), *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new(ECDSASignatureCheckerQuorumStakeTotals)).(*ECDSASignatureCheckerQuorumStakeTotals) + out1 := *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) + + return out0, out1, err + +} + +// CheckSignatures is a free data retrieval call binding the contract method 0x5f62d642. +// +// Solidity: function checkSignatures(bytes32 msgHash, bytes quorumNumbers, uint32 referenceBlockNumber, (address[],bytes[],uint32[],uint32[],uint32[][]) params) view returns((uint96[],uint96[]), bytes32) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerSession) CheckSignatures(msgHash [32]byte, quorumNumbers []byte, referenceBlockNumber uint32, params ECDSASignatureCheckerSignerStakeIndicesAndSignatures) (ECDSASignatureCheckerQuorumStakeTotals, [32]byte, error) { + return _ContractECDSASignatureChecker.Contract.CheckSignatures(&_ContractECDSASignatureChecker.CallOpts, msgHash, quorumNumbers, referenceBlockNumber, params) +} + +// CheckSignatures is a free data retrieval call binding the contract method 0x5f62d642. +// +// Solidity: function checkSignatures(bytes32 msgHash, bytes quorumNumbers, uint32 referenceBlockNumber, (address[],bytes[],uint32[],uint32[],uint32[][]) params) view returns((uint96[],uint96[]), bytes32) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCallerSession) CheckSignatures(msgHash [32]byte, quorumNumbers []byte, referenceBlockNumber uint32, params ECDSASignatureCheckerSignerStakeIndicesAndSignatures) (ECDSASignatureCheckerQuorumStakeTotals, [32]byte, error) { + return _ContractECDSASignatureChecker.Contract.CheckSignatures(&_ContractECDSASignatureChecker.CallOpts, msgHash, quorumNumbers, referenceBlockNumber, params) +} + +// Delegation is a free data retrieval call binding the contract method 0xdf5cf723. +// +// Solidity: function delegation() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCaller) Delegation(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSASignatureChecker.contract.Call(opts, &out, "delegation") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Delegation is a free data retrieval call binding the contract method 0xdf5cf723. +// +// Solidity: function delegation() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerSession) Delegation() (common.Address, error) { + return _ContractECDSASignatureChecker.Contract.Delegation(&_ContractECDSASignatureChecker.CallOpts) +} + +// Delegation is a free data retrieval call binding the contract method 0xdf5cf723. +// +// Solidity: function delegation() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCallerSession) Delegation() (common.Address, error) { + return _ContractECDSASignatureChecker.Contract.Delegation(&_ContractECDSASignatureChecker.CallOpts) +} + +// RegistryCoordinator is a free data retrieval call binding the contract method 0x6d14a987. +// +// Solidity: function registryCoordinator() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCaller) RegistryCoordinator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSASignatureChecker.contract.Call(opts, &out, "registryCoordinator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// RegistryCoordinator is a free data retrieval call binding the contract method 0x6d14a987. +// +// Solidity: function registryCoordinator() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerSession) RegistryCoordinator() (common.Address, error) { + return _ContractECDSASignatureChecker.Contract.RegistryCoordinator(&_ContractECDSASignatureChecker.CallOpts) +} + +// RegistryCoordinator is a free data retrieval call binding the contract method 0x6d14a987. +// +// Solidity: function registryCoordinator() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCallerSession) RegistryCoordinator() (common.Address, error) { + return _ContractECDSASignatureChecker.Contract.RegistryCoordinator(&_ContractECDSASignatureChecker.CallOpts) +} + +// StakeRegistry is a free data retrieval call binding the contract method 0x68304835. +// +// Solidity: function stakeRegistry() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCaller) StakeRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSASignatureChecker.contract.Call(opts, &out, "stakeRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// StakeRegistry is a free data retrieval call binding the contract method 0x68304835. +// +// Solidity: function stakeRegistry() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerSession) StakeRegistry() (common.Address, error) { + return _ContractECDSASignatureChecker.Contract.StakeRegistry(&_ContractECDSASignatureChecker.CallOpts) +} + +// StakeRegistry is a free data retrieval call binding the contract method 0x68304835. +// +// Solidity: function stakeRegistry() view returns(address) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCallerSession) StakeRegistry() (common.Address, error) { + return _ContractECDSASignatureChecker.Contract.StakeRegistry(&_ContractECDSASignatureChecker.CallOpts) +} + +// StaleStakesForbidden is a free data retrieval call binding the contract method 0xb98d0908. +// +// Solidity: function staleStakesForbidden() view returns(bool) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCaller) StaleStakesForbidden(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _ContractECDSASignatureChecker.contract.Call(opts, &out, "staleStakesForbidden") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// StaleStakesForbidden is a free data retrieval call binding the contract method 0xb98d0908. +// +// Solidity: function staleStakesForbidden() view returns(bool) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerSession) StaleStakesForbidden() (bool, error) { + return _ContractECDSASignatureChecker.Contract.StaleStakesForbidden(&_ContractECDSASignatureChecker.CallOpts) +} + +// StaleStakesForbidden is a free data retrieval call binding the contract method 0xb98d0908. +// +// Solidity: function staleStakesForbidden() view returns(bool) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerCallerSession) StaleStakesForbidden() (bool, error) { + return _ContractECDSASignatureChecker.Contract.StaleStakesForbidden(&_ContractECDSASignatureChecker.CallOpts) +} + +// SetStaleStakesForbidden is a paid mutator transaction binding the contract method 0x416c7e5e. +// +// Solidity: function setStaleStakesForbidden(bool value) returns() +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerTransactor) SetStaleStakesForbidden(opts *bind.TransactOpts, value bool) (*types.Transaction, error) { + return _ContractECDSASignatureChecker.contract.Transact(opts, "setStaleStakesForbidden", value) +} + +// SetStaleStakesForbidden is a paid mutator transaction binding the contract method 0x416c7e5e. +// +// Solidity: function setStaleStakesForbidden(bool value) returns() +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerSession) SetStaleStakesForbidden(value bool) (*types.Transaction, error) { + return _ContractECDSASignatureChecker.Contract.SetStaleStakesForbidden(&_ContractECDSASignatureChecker.TransactOpts, value) +} + +// SetStaleStakesForbidden is a paid mutator transaction binding the contract method 0x416c7e5e. +// +// Solidity: function setStaleStakesForbidden(bool value) returns() +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerTransactorSession) SetStaleStakesForbidden(value bool) (*types.Transaction, error) { + return _ContractECDSASignatureChecker.Contract.SetStaleStakesForbidden(&_ContractECDSASignatureChecker.TransactOpts, value) +} + +// ContractECDSASignatureCheckerStaleStakesForbiddenUpdateIterator is returned from FilterStaleStakesForbiddenUpdate and is used to iterate over the raw logs and unpacked data for StaleStakesForbiddenUpdate events raised by the ContractECDSASignatureChecker contract. +type ContractECDSASignatureCheckerStaleStakesForbiddenUpdateIterator struct { + Event *ContractECDSASignatureCheckerStaleStakesForbiddenUpdate // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSASignatureCheckerStaleStakesForbiddenUpdateIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSASignatureCheckerStaleStakesForbiddenUpdate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSASignatureCheckerStaleStakesForbiddenUpdate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSASignatureCheckerStaleStakesForbiddenUpdateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSASignatureCheckerStaleStakesForbiddenUpdateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSASignatureCheckerStaleStakesForbiddenUpdate represents a StaleStakesForbiddenUpdate event raised by the ContractECDSASignatureChecker contract. +type ContractECDSASignatureCheckerStaleStakesForbiddenUpdate struct { + Value bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStaleStakesForbiddenUpdate is a free log retrieval operation binding the contract event 0x40e4ed880a29e0f6ddce307457fb75cddf4feef7d3ecb0301bfdf4976a0e2dfc. +// +// Solidity: event StaleStakesForbiddenUpdate(bool value) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerFilterer) FilterStaleStakesForbiddenUpdate(opts *bind.FilterOpts) (*ContractECDSASignatureCheckerStaleStakesForbiddenUpdateIterator, error) { + + logs, sub, err := _ContractECDSASignatureChecker.contract.FilterLogs(opts, "StaleStakesForbiddenUpdate") + if err != nil { + return nil, err + } + return &ContractECDSASignatureCheckerStaleStakesForbiddenUpdateIterator{contract: _ContractECDSASignatureChecker.contract, event: "StaleStakesForbiddenUpdate", logs: logs, sub: sub}, nil +} + +// WatchStaleStakesForbiddenUpdate is a free log subscription operation binding the contract event 0x40e4ed880a29e0f6ddce307457fb75cddf4feef7d3ecb0301bfdf4976a0e2dfc. +// +// Solidity: event StaleStakesForbiddenUpdate(bool value) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerFilterer) WatchStaleStakesForbiddenUpdate(opts *bind.WatchOpts, sink chan<- *ContractECDSASignatureCheckerStaleStakesForbiddenUpdate) (event.Subscription, error) { + + logs, sub, err := _ContractECDSASignatureChecker.contract.WatchLogs(opts, "StaleStakesForbiddenUpdate") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSASignatureCheckerStaleStakesForbiddenUpdate) + if err := _ContractECDSASignatureChecker.contract.UnpackLog(event, "StaleStakesForbiddenUpdate", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseStaleStakesForbiddenUpdate is a log parse operation binding the contract event 0x40e4ed880a29e0f6ddce307457fb75cddf4feef7d3ecb0301bfdf4976a0e2dfc. +// +// Solidity: event StaleStakesForbiddenUpdate(bool value) +func (_ContractECDSASignatureChecker *ContractECDSASignatureCheckerFilterer) ParseStaleStakesForbiddenUpdate(log types.Log) (*ContractECDSASignatureCheckerStaleStakesForbiddenUpdate, error) { + event := new(ContractECDSASignatureCheckerStaleStakesForbiddenUpdate) + if err := _ContractECDSASignatureChecker.contract.UnpackLog(event, "StaleStakesForbiddenUpdate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/bindings/OperatorStateRetriever/binding.go b/contracts/bindings/OperatorStateRetriever/binding.go index b07a5d4ef..c5c36c34e 100644 --- a/contracts/bindings/OperatorStateRetriever/binding.go +++ b/contracts/bindings/OperatorStateRetriever/binding.go @@ -47,7 +47,7 @@ type OperatorStateRetrieverOperator struct { // ContractOperatorStateRetrieverMetaData contains all meta data concerning the ContractOperatorStateRetriever contract. var ContractOperatorStateRetrieverMetaData = &bind.MetaData{ ABI: "[{\"type\":\"function\",\"name\":\"getCheckSignaturesIndices\",\"inputs\":[{\"name\":\"registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractIRegistryCoordinator\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"nonSignerOperatorIds\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorStateRetriever.CheckSignaturesIndices\",\"components\":[{\"name\":\"nonSignerQuorumBitmapIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"quorumApkIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"totalStakeIndices\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"nonSignerStakeIndices\",\"type\":\"uint32[][]\",\"internalType\":\"uint32[][]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorState\",\"inputs\":[{\"name\":\"registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractIRegistryCoordinator\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[][]\",\"internalType\":\"structOperatorStateRetriever.Operator[][]\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorState\",\"inputs\":[{\"name\":\"registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractIRegistryCoordinator\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"tuple[][]\",\"internalType\":\"structOperatorStateRetriever.Operator[][]\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"}]", - Bin: "0x608060405234801561001057600080fd5b50611600806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80633563b0d1146100465780634f739f741461006f578063cefdc1d41461008f575b600080fd5b610059610054366004610e3f565b6100b0565b6040516100669190610f9e565b60405180910390f35b61008261007d366004611004565b610548565b6040516100669190611108565b6100a261009d3660046111c3565b610bcf565b604051610066929190611205565b60606000846001600160a01b031663683048356040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101169190611226565b90506000856001600160a01b0316639e9923c26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017c9190611226565b90506000866001600160a01b0316635df459466040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e29190611226565b90506000865167ffffffffffffffff81111561020057610200610dd6565b60405190808252806020026020018201604052801561023357816020015b606081526020019060019003908161021e5790505b50905060005b875181101561053c57600088828151811061025657610256611243565b0160200151604051638902624560e01b815260f89190911c6004820181905263ffffffff8a16602483015291506000906001600160a01b03871690638902624590604401600060405180830381865afa1580156102b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102df919081019061127d565b9050805167ffffffffffffffff8111156102fb576102fb610dd6565b60405190808252806020026020018201604052801561034657816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816103195790505b5084848151811061035957610359611243565b602002602001018190525060005b8151811015610526576040518060600160405280876001600160a01b03166347b314e885858151811061039c5761039c611243565b60200260200101516040518263ffffffff1660e01b81526004016103c291815260200190565b602060405180830381865afa1580156103df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104039190611226565b6001600160a01b0316815260200183838151811061042357610423611243565b60200260200101518152602001896001600160a01b031663fa28c62785858151811061045157610451611243565b60209081029190910101516040516001600160e01b031960e084901b168152600481019190915260ff8816602482015263ffffffff8f166044820152606401602060405180830381865afa1580156104ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d19190611313565b6001600160601b03168152508585815181106104ef576104ef611243565b6020026020010151828151811061050857610508611243565b6020026020010181905250808061051e90611352565b915050610367565b505050808061053490611352565b915050610239565b50979650505050505050565b6105736040518060800160405280606081526020016060815260200160608152602001606081525090565b6000876001600160a01b031663683048356040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d79190611226565b90506106046040518060800160405280606081526020016060815260200160608152602001606081525090565b6040516361c8a12f60e11b81526001600160a01b038a169063c391425e90610634908b908990899060040161136d565b600060405180830381865afa158015610651573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261067991908101906113b7565b81526040516340e03a8160e11b81526001600160a01b038316906381c07502906106ab908b908b908b9060040161146f565b600060405180830381865afa1580156106c8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106f091908101906113b7565b60408201528567ffffffffffffffff81111561070e5761070e610dd6565b60405190808252806020026020018201604052801561074157816020015b606081526020019060019003908161072c5790505b50606082015260005b60ff8116871115610ae05760008567ffffffffffffffff81111561077057610770610dd6565b604051908082528060200260200182016040528015610799578160200160208202803683370190505b5083606001518360ff16815181106107b3576107b3611243565b602002602001018190525060005b868110156109df5760008c6001600160a01b03166304ec63518a8a858181106107ec576107ec611243565b905060200201358e8860000151868151811061080a5761080a611243565b60200260200101516040518463ffffffff1660e01b81526004016108479392919092835263ffffffff918216602084015216604082015260600190565b602060405180830381865afa158015610864573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108889190611498565b90508a8a8560ff1681811061089f5761089f611243565b6001600160c01b03841692013560f81c9190911c6001908116141590506109cc57856001600160a01b031663dd9846b98a8a858181106108e1576108e1611243565b905060200201358d8d8860ff168181106108fd576108fd611243565b6040516001600160e01b031960e087901b1681526004810194909452919091013560f81c60248301525063ffffffff8f166044820152606401602060405180830381865afa158015610953573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097791906114c1565b85606001518560ff168151811061099057610990611243565b602002602001015184815181106109a9576109a9611243565b63ffffffff90921660209283029190910190910152826109c881611352565b9350505b50806109d781611352565b9150506107c1565b5060008167ffffffffffffffff8111156109fb576109fb610dd6565b604051908082528060200260200182016040528015610a24578160200160208202803683370190505b50905060005b82811015610aa55784606001518460ff1681518110610a4b57610a4b611243565b60200260200101518181518110610a6457610a64611243565b6020026020010151828281518110610a7e57610a7e611243565b63ffffffff9092166020928302919091019091015280610a9d81611352565b915050610a2a565b508084606001518460ff1681518110610ac057610ac0611243565b602002602001018190525050508080610ad8906114de565b91505061074a565b506000896001600160a01b0316635df459466040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b459190611226565b60405163354952a360e21b81529091506001600160a01b0382169063d5254a8c90610b78908b908b908e906004016114fe565b600060405180830381865afa158015610b95573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bbd91908101906113b7565b60208301525098975050505050505050565b6040805160018082528183019092526000916060918391602080830190803683370190505090508481600081518110610c0a57610c0a611243565b60209081029190910101526040516361c8a12f60e11b81526000906001600160a01b0388169063c391425e90610c469088908690600401611528565b600060405180830381865afa158015610c63573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c8b91908101906113b7565b600081518110610c9d57610c9d611243565b60209081029190910101516040516304ec635160e01b81526004810188905263ffffffff87811660248301529091166044820181905291506000906001600160a01b038916906304ec635190606401602060405180830381865afa158015610d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2d9190611498565b6001600160c01b031690506000610d4382610d61565b905081610d518a838a6100b0565b9550955050505050935093915050565b60606000805b610100811015610db7576001811b915083821615610da757828160f81b604051602001610d9592919061157c565b60405160208183030381529060405292505b610db081611352565b9050610d67565b5050919050565b6001600160a01b0381168114610dd357600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610e1557610e15610dd6565b604052919050565b63ffffffff81168114610dd357600080fd5b8035610e3a81610e1d565b919050565b600080600060608486031215610e5457600080fd5b8335610e5f81610dbe565b925060208481013567ffffffffffffffff80821115610e7d57600080fd5b818701915087601f830112610e9157600080fd5b813581811115610ea357610ea3610dd6565b610eb5601f8201601f19168501610dec565b91508082528884828501011115610ecb57600080fd5b8084840185840137600084828401015250809450505050610eee60408501610e2f565b90509250925092565b600082825180855260208086019550808260051b8401018186016000805b85811015610f9057868403601f19018a52825180518086529086019086860190845b81811015610f7b57835180516001600160a01b03168452898101518a8501526040908101516001600160601b03169084015292880192606090920191600101610f37565b50509a86019a94505091840191600101610f15565b509198975050505050505050565b602081526000610fb16020830184610ef7565b9392505050565b60008083601f840112610fca57600080fd5b50813567ffffffffffffffff811115610fe257600080fd5b6020830191508360208260051b8501011115610ffd57600080fd5b9250929050565b6000806000806000806080878903121561101d57600080fd5b863561102881610dbe565b9550602087013561103881610e1d565b9450604087013567ffffffffffffffff8082111561105557600080fd5b818901915089601f83011261106957600080fd5b81358181111561107857600080fd5b8a602082850101111561108a57600080fd5b6020830196508095505060608901359150808211156110a857600080fd5b506110b589828a01610fb8565b979a9699509497509295939492505050565b600081518084526020808501945080840160005b838110156110fd57815163ffffffff16875295820195908201906001016110db565b509495945050505050565b60006020808352835160808285015261112460a08501826110c7565b905081850151601f198086840301604087015261114183836110c7565b9250604087015191508086840301606087015261115e83836110c7565b60608801518782038301608089015280518083529194508501925084840190600581901b8501860160005b828110156111b557848783030184526111a38287516110c7565b95880195938801939150600101611189565b509998505050505050505050565b6000806000606084860312156111d857600080fd5b83356111e381610dbe565b92506020840135915060408401356111fa81610e1d565b809150509250925092565b82815260406020820152600061121e6040830184610ef7565b949350505050565b60006020828403121561123857600080fd5b8151610fb181610dbe565b634e487b7160e01b600052603260045260246000fd5b600067ffffffffffffffff82111561127357611273610dd6565b5060051b60200190565b6000602080838503121561129057600080fd5b825167ffffffffffffffff8111156112a757600080fd5b8301601f810185136112b857600080fd5b80516112cb6112c682611259565b610dec565b81815260059190911b820183019083810190878311156112ea57600080fd5b928401925b82841015611308578351825292840192908401906112ef565b979650505050505050565b60006020828403121561132557600080fd5b81516001600160601b0381168114610fb157600080fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156113665761136661133c565b5060010190565b63ffffffff84168152604060208201819052810182905260006001600160fb1b0383111561139a57600080fd5b8260051b8085606085013760009201606001918252509392505050565b600060208083850312156113ca57600080fd5b825167ffffffffffffffff8111156113e157600080fd5b8301601f810185136113f257600080fd5b80516114006112c682611259565b81815260059190911b8201830190838101908783111561141f57600080fd5b928401925b8284101561130857835161143781610e1d565b82529284019290840190611424565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b63ffffffff8416815260406020820152600061148f604083018486611446565b95945050505050565b6000602082840312156114aa57600080fd5b81516001600160c01b0381168114610fb157600080fd5b6000602082840312156114d357600080fd5b8151610fb181610e1d565b600060ff821660ff8114156114f5576114f561133c565b60010192915050565b604081526000611512604083018587611446565b905063ffffffff83166020830152949350505050565b60006040820163ffffffff851683526020604081850152818551808452606086019150828701935060005b8181101561156f57845183529383019391830191600101611553565b5090979650505050505050565b6000835160005b8181101561159d5760208187018101518583015201611583565b818111156115ac576000828501525b506001600160f81b031993909316919092019081526001019291505056fea26469706673582212204de1f2dba2a4f9b1a10d17d1b2f6c44537507c445516dbc36388edc0270b22ee64736f6c634300080c0033", + Bin: "0x608060405234801561001057600080fd5b50611722806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80633563b0d1146100465780634f739f741461006f578063cefdc1d41461008f575b600080fd5b610059610054366004610f7f565b6100b0565b60405161006691906110da565b60405180910390f35b61008261007d36600461113f565b610546565b6040516100669190611242565b6100a261009d3660046112fd565b610c70565b60405161006692919061133f565b60606000846001600160a01b031663683048356040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101169190611360565b90506000856001600160a01b0316639e9923c26040518163ffffffff1660e01b8152600401602060405180830381865afa158015610158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017c9190611360565b90506000866001600160a01b0316635df459466040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e29190611360565b9050600086516001600160401b038111156101ff576101ff610f17565b60405190808252806020026020018201604052801561023257816020015b606081526020019060019003908161021d5790505b50905060005b875181101561053a5760008882815181106102555761025561137d565b0160200151604051638902624560e01b815260f89190911c6004820181905263ffffffff8a16602483015291506000906001600160a01b03871690638902624590604401600060405180830381865afa1580156102b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102de91908101906113b6565b905080516001600160401b038111156102f9576102f9610f17565b60405190808252806020026020018201604052801561034457816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816103175790505b508484815181106103575761035761137d565b602002602001018190525060005b8151811015610524576040518060600160405280876001600160a01b03166347b314e885858151811061039a5761039a61137d565b60200260200101516040518263ffffffff1660e01b81526004016103c091815260200190565b602060405180830381865afa1580156103dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190611360565b6001600160a01b031681526020018383815181106104215761042161137d565b60200260200101518152602001896001600160a01b031663fa28c62785858151811061044f5761044f61137d565b60209081029190910101516040516001600160e01b031960e084901b168152600481019190915260ff8816602482015263ffffffff8f166044820152606401602060405180830381865afa1580156104ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cf919061144b565b6001600160601b03168152508585815181106104ed576104ed61137d565b602002602001015182815181106105065761050661137d565b6020026020010181905250808061051c9061148a565b915050610365565b50505080806105329061148a565b915050610238565b50979650505050505050565b6105716040518060800160405280606081526020016060815260200160608152602001606081525090565b6000876001600160a01b031663683048356040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d59190611360565b90506106026040518060800160405280606081526020016060815260200160608152602001606081525090565b6040516361c8a12f60e11b81526001600160a01b038a169063c391425e90610632908b90899089906004016114a5565b600060405180830381865afa15801561064f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261067791908101906114ef565b81526040516340e03a8160e11b81526001600160a01b038316906381c07502906106a9908b908b908b906004016115a6565b600060405180830381865afa1580156106c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106ee91908101906114ef565b6040820152856001600160401b0381111561070b5761070b610f17565b60405190808252806020026020018201604052801561073e57816020015b60608152602001906001900390816107295790505b50606082015260005b60ff8116871115610b81576000856001600160401b0381111561076c5761076c610f17565b604051908082528060200260200182016040528015610795578160200160208202803683370190505b5083606001518360ff16815181106107af576107af61137d565b602002602001018190525060005b86811015610a815760008c6001600160a01b03166304ec63518a8a858181106107e8576107e861137d565b905060200201358e886000015186815181106108065761080661137d565b60200260200101516040518463ffffffff1660e01b81526004016108439392919092835263ffffffff918216602084015216604082015260600190565b602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088491906115cf565b90506001600160c01b03811661092c5760405162461bcd60e51b815260206004820152605c60248201527f4f70657261746f7253746174655265747269657665722e676574436865636b5360448201527f69676e617475726573496e64696365733a206f70657261746f72206d7573742060648201527f6265207265676973746572656420617420626c6f636b6e756d62657200000000608482015260a40160405180910390fd5b8a8a8560ff168181106109415761094161137d565b6001600160c01b03841692013560f81c9190911c600190811614159050610a6e57856001600160a01b031663dd9846b98a8a858181106109835761098361137d565b905060200201358d8d8860ff1681811061099f5761099f61137d565b6040516001600160e01b031960e087901b1681526004810194909452919091013560f81c60248301525063ffffffff8f166044820152606401602060405180830381865afa1580156109f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1991906115f8565b85606001518560ff1681518110610a3257610a3261137d565b60200260200101518481518110610a4b57610a4b61137d565b63ffffffff9092166020928302919091019091015282610a6a8161148a565b9350505b5080610a798161148a565b9150506107bd565b506000816001600160401b03811115610a9c57610a9c610f17565b604051908082528060200260200182016040528015610ac5578160200160208202803683370190505b50905060005b82811015610b465784606001518460ff1681518110610aec57610aec61137d565b60200260200101518181518110610b0557610b0561137d565b6020026020010151828281518110610b1f57610b1f61137d565b63ffffffff9092166020928302919091019091015280610b3e8161148a565b915050610acb565b508084606001518460ff1681518110610b6157610b6161137d565b602002602001018190525050508080610b7990611615565b915050610747565b506000896001600160a01b0316635df459466040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be69190611360565b60405163354952a360e21b81529091506001600160a01b0382169063d5254a8c90610c19908b908b908e90600401611635565b600060405180830381865afa158015610c36573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c5e91908101906114ef565b60208301525098975050505050505050565b6040805160018082528183019092526000916060918391602080830190803683370190505090508481600081518110610cab57610cab61137d565b60209081029190910101526040516361c8a12f60e11b81526000906001600160a01b0388169063c391425e90610ce7908890869060040161165f565b600060405180830381865afa158015610d04573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d2c91908101906114ef565b600081518110610d3e57610d3e61137d565b60209081029190910101516040516304ec635160e01b81526004810188905263ffffffff87811660248301529091166044820181905291506000906001600160a01b038916906304ec635190606401602060405180830381865afa158015610daa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dce91906115cf565b6001600160c01b031690506000610de482610e02565b905081610df28a838a6100b0565b9550955050505050935093915050565b6060600080610e1084610ece565b61ffff166001600160401b03811115610e2b57610e2b610f17565b6040519080825280601f01601f191660200182016040528015610e55576020820181803683370190505b5090506000805b825182108015610e6d575061010081105b15610ec4576001811b935085841615610eb4578060f81b838381518110610e9657610e9661137d565b60200101906001600160f81b031916908160001a9053508160010191505b610ebd8161148a565b9050610e5c565b5090949350505050565b6000805b8215610ef957610ee36001846116b3565b9092169180610ef1816116ca565b915050610ed2565b92915050565b6001600160a01b0381168114610f1457600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715610f5557610f55610f17565b604052919050565b63ffffffff81168114610f1457600080fd5b8035610f7a81610f5d565b919050565b600080600060608486031215610f9457600080fd5b8335610f9f81610eff565b92506020848101356001600160401b0380821115610fbc57600080fd5b818701915087601f830112610fd057600080fd5b813581811115610fe257610fe2610f17565b610ff4601f8201601f19168501610f2d565b9150808252888482850101111561100a57600080fd5b808484018584013760008482840101525080945050505061102d60408501610f6f565b90509250925092565b600081518084526020808501808196508360051b810191508286016000805b868110156110cc578385038a52825180518087529087019087870190845b818110156110b757835180516001600160a01b031684528a8101518b8501526040908101516001600160601b03169084015292890192606090920191600101611073565b50509a87019a95505091850191600101611055565b509298975050505050505050565b6020815260006110ed6020830184611036565b9392505050565b60008083601f84011261110657600080fd5b5081356001600160401b0381111561111d57600080fd5b6020830191508360208260051b850101111561113857600080fd5b9250929050565b6000806000806000806080878903121561115857600080fd5b863561116381610eff565b9550602087013561117381610f5d565b945060408701356001600160401b038082111561118f57600080fd5b818901915089601f8301126111a357600080fd5b8135818111156111b257600080fd5b8a60208285010111156111c457600080fd5b6020830196508095505060608901359150808211156111e257600080fd5b506111ef89828a016110f4565b979a9699509497509295939492505050565b600081518084526020808501945080840160005b8381101561123757815163ffffffff1687529582019590820190600101611215565b509495945050505050565b60006020808352835160808285015261125e60a0850182611201565b905081850151601f198086840301604087015261127b8383611201565b925060408701519150808684030160608701526112988383611201565b60608801518782038301608089015280518083529194508501925084840190600581901b8501860160005b828110156112ef57848783030184526112dd828751611201565b958801959388019391506001016112c3565b509998505050505050505050565b60008060006060848603121561131257600080fd5b833561131d81610eff565b925060208401359150604084013561133481610f5d565b809150509250925092565b8281526040602082015260006113586040830184611036565b949350505050565b60006020828403121561137257600080fd5b81516110ed81610eff565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b038211156113ac576113ac610f17565b5060051b60200190565b600060208083850312156113c957600080fd5b82516001600160401b038111156113df57600080fd5b8301601f810185136113f057600080fd5b80516114036113fe82611393565b610f2d565b81815260059190911b8201830190838101908783111561142257600080fd5b928401925b8284101561144057835182529284019290840190611427565b979650505050505050565b60006020828403121561145d57600080fd5b81516001600160601b03811681146110ed57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561149e5761149e611474565b5060010190565b63ffffffff84168152604060208201819052810182905260006001600160fb1b038311156114d257600080fd5b8260051b8085606085013760009201606001918252509392505050565b6000602080838503121561150257600080fd5b82516001600160401b0381111561151857600080fd5b8301601f8101851361152957600080fd5b80516115376113fe82611393565b81815260059190911b8201830190838101908783111561155657600080fd5b928401925b8284101561144057835161156e81610f5d565b8252928401929084019061155b565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b63ffffffff841681526040602082015260006115c660408301848661157d565b95945050505050565b6000602082840312156115e157600080fd5b81516001600160c01b03811681146110ed57600080fd5b60006020828403121561160a57600080fd5b81516110ed81610f5d565b600060ff821660ff81141561162c5761162c611474565b60010192915050565b60408152600061164960408301858761157d565b905063ffffffff83166020830152949350505050565b60006040820163ffffffff851683526020604081850152818551808452606086019150828701935060005b818110156116a65784518352938301939183019160010161168a565b5090979650505050505050565b6000828210156116c5576116c5611474565b500390565b600061ffff808316818114156116e2576116e2611474565b600101939250505056fea2646970667358221220e903071f7e83d89347c2ac822e176af30899a466d0c4739bd8cbd148137d403364736f6c634300080c0033", } // ContractOperatorStateRetrieverABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/RegistryCoordinator/binding.go b/contracts/bindings/RegistryCoordinator/binding.go index 05952d04f..c8aef8823 100644 --- a/contracts/bindings/RegistryCoordinator/binding.go +++ b/contracts/bindings/RegistryCoordinator/binding.go @@ -90,7 +90,7 @@ type IStakeRegistryStrategyParams struct { // ContractRegistryCoordinatorMetaData contains all meta data concerning the ContractRegistryCoordinator contract. var ContractRegistryCoordinatorMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_serviceManager\",\"type\":\"address\",\"internalType\":\"contractIServiceManager\"},{\"name\":\"_stakeRegistry\",\"type\":\"address\",\"internalType\":\"contractIStakeRegistry\"},{\"name\":\"_blsApkRegistry\",\"type\":\"address\",\"internalType\":\"contractIBLSApkRegistry\"},{\"name\":\"_indexRegistry\",\"type\":\"address\",\"internalType\":\"contractIIndexRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"OPERATOR_CHURN_APPROVAL_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PUBKEY_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blsApkRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBLSApkRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorChurnApprovalDigestHash\",\"inputs\":[{\"name\":\"registeringOperatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"operatorKickParams\",\"type\":\"tuple[]\",\"internalType\":\"structIRegistryCoordinator.OperatorKickParam[]\",\"components\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"churnApprover\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createQuorum\",\"inputs\":[{\"name\":\"operatorSetParams\",\"type\":\"tuple\",\"internalType\":\"structIRegistryCoordinator.OperatorSetParam\",\"components\":[{\"name\":\"maxOperatorCount\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"kickBIPsOfOperatorStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"kickBIPsOfTotalStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"}]},{\"name\":\"minimumStake\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"strategyParams\",\"type\":\"tuple[]\",\"internalType\":\"structIStakeRegistry.StrategyParams[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deregisterOperator\",\"inputs\":[{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ejectOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ejector\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentQuorumBitmap\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint192\",\"internalType\":\"uint192\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRegistryCoordinator.OperatorInfo\",\"components\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumIRegistryCoordinator.OperatorStatus\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorFromId\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorId\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetParams\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRegistryCoordinator.OperatorSetParam\",\"components\":[{\"name\":\"maxOperatorCount\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"kickBIPsOfOperatorStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"kickBIPsOfTotalStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorStatus\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIRegistryCoordinator.OperatorStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQuorumBitmapAtBlockNumberByIndex\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint192\",\"internalType\":\"uint192\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQuorumBitmapHistoryLength\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQuorumBitmapIndicesAtBlockNumber\",\"inputs\":[{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIds\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQuorumBitmapUpdateByIndex\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIRegistryCoordinator.QuorumBitmapUpdate\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"quorumBitmap\",\"type\":\"uint192\",\"internalType\":\"uint192\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"indexRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIIndexRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_churnApprover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_ejector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_operatorSetParams\",\"type\":\"tuple[]\",\"internalType\":\"structIRegistryCoordinator.OperatorSetParam[]\",\"components\":[{\"name\":\"maxOperatorCount\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"kickBIPsOfOperatorStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"kickBIPsOfTotalStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"}]},{\"name\":\"_minimumStakes\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"_strategyParams\",\"type\":\"tuple[][]\",\"internalType\":\"structIStakeRegistry.StrategyParams[][]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isChurnApproverSaltUsed\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"numRegistries\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pubkeyRegistrationMessageHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"quorumCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"quorumUpdateBlockNumber\",\"inputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerOperator\",\"inputs\":[{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"socket\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIBLSApkRegistry.PubkeyRegistrationParams\",\"components\":[{\"name\":\"pubkeyRegistrationSignature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"pubkeyG1\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"pubkeyG2\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}]},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerOperatorWithChurn\",\"inputs\":[{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"socket\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIBLSApkRegistry.PubkeyRegistrationParams\",\"components\":[{\"name\":\"pubkeyRegistrationSignature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"pubkeyG1\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"pubkeyG2\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}]},{\"name\":\"operatorKickParams\",\"type\":\"tuple[]\",\"internalType\":\"structIRegistryCoordinator.OperatorKickParam[]\",\"components\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"churnApproverSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registries\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"serviceManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIServiceManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setChurnApprover\",\"inputs\":[{\"name\":\"_churnApprover\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setEjector\",\"inputs\":[{\"name\":\"_ejector\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setOperatorSetParams\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"operatorSetParams\",\"type\":\"tuple\",\"internalType\":\"structIRegistryCoordinator.OperatorSetParam\",\"components\":[{\"name\":\"maxOperatorCount\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"kickBIPsOfOperatorStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"kickBIPsOfTotalStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stakeRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStakeRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperators\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorsForQuorum\",\"inputs\":[{\"name\":\"operatorsPerQuorum\",\"type\":\"address[][]\",\"internalType\":\"address[][]\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateSocket\",\"inputs\":[{\"name\":\"socket\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ChurnApproverUpdated\",\"inputs\":[{\"name\":\"prevChurnApprover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newChurnApprover\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EjectorUpdated\",\"inputs\":[{\"name\":\"prevEjector\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newEjector\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDeregistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRegistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetParamsUpdated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"operatorSetParams\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIRegistryCoordinator.OperatorSetParam\",\"components\":[{\"name\":\"maxOperatorCount\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"kickBIPsOfOperatorStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"kickBIPsOfTotalStake\",\"type\":\"uint16\",\"internalType\":\"uint16\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSocketUpdate\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"socket\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"QuorumBlockNumberUpdated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"blocknumber\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", - Bin: "0x6101c06040523480156200001257600080fd5b506040516200628c3803806200628c833981016040819052620000359162000254565b604080518082018252601681527f4156535265676973747279436f6f7264696e61746f720000000000000000000060208083019182528351808501909452600684526576302e302e3160d01b908401528151902060e08190527f6bda7e3f385e48841048390444cced5cc795af87758af67622e5f4f0882c4a996101008190524660a05287938793879387939192917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620001358184846040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6080523060c05261012052505050506001600160a01b039384166101405291831661018052821661016052166101a0526200016f62000179565b50505050620002bc565b600054610100900460ff1615620001e65760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000239576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200025157600080fd5b50565b600080600080608085870312156200026b57600080fd5b845162000278816200023b565b60208601519094506200028b816200023b565b60408601519093506200029e816200023b565b6060860151909250620002b1816200023b565b939692955090935050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051615ec8620003c4600039600081816106240152818161118c0152818161204901528181612dec015281816136730152613c4b01526000818161057c01528181611fd40152818161245401528181612d6c015281816135ca015281816138200152613bca01526000818161054201528181610eae0152818161201201528181612cee01528181612ed401528181612f4a0152818161354a0152613cc701526000818161048601528181612c44015261349201526000613ea301526000613ef201526000613ecd01526000613e2601526000613e5001526000613e7a0152615ec86000f3fe608060405234801561001057600080fd5b50600436106102945760003560e01c80635df4594611610167578063a50857bf116100ce578063dd8283f311610087578063dd8283f3146106f5578063e65797ad14610708578063f2fde38b146107ab578063f8581191146107be578063fabc1cbc146107d1578063fd39105a146107e457600080fd5b8063a50857bf1461066d578063c391425e14610680578063ca0de882146106a0578063ca4f2d97146106c7578063d72d8dd6146106da578063d75b4c88146106e257600080fd5b8063886f119511610120578063886f1195146105cc5780638da5cb5b146105e55780639aa1653d146105ed5780639b5d177b1461060c5780639e9923c21461061f5780639feab8591461064657600080fd5b80635df459461461053d5780636347c9001461056457806368304835146105775780636e3b17db1461059e578063715018a6146105b1578063871ef049146105b957600080fd5b806328f61b311161020b5780635140a548116101c45780635140a548146104c85780635865c60c146104db578063595c6a67146104fb5780635ac86ab7146105035780635b0b829f146105225780635c975abb1461053557600080fd5b806328f61b3114610435578063296bb0641461044857806329d1e0c31461045b5780632cdd1e861461046e5780633998fdd3146104815780633c2a7f4c146104a857600080fd5b806310d67a2f1161025d57806310d67a2f1461034a57806313542a4e1461035d578063136439dd146103865780631478851f146103995780631eb812da146103cc578063249a0c421461041557600080fd5b8062cf2ab51461029957806303fd3492146102ae57806304ec6351146102e1578063054310e61461030c5780630cf4b76714610337575b600080fd5b6102ac6102a73660046149a3565b610820565b005b6102ce6102bc3660046149e4565b60009081526098602052604090205490565b6040519081526020015b60405180910390f35b6102f46102ef366004614a0f565b610936565b6040516001600160c01b0390911681526020016102d8565b609d5461031f906001600160a01b031681565b6040516001600160a01b0390911681526020016102d8565b6102ac610345366004614b2e565b610b2c565b6102ac610358366004614ba3565b610c14565b6102ce61036b366004614ba3565b6001600160a01b031660009081526099602052604090205490565b6102ac6103943660046149e4565b610cc7565b6103bc6103a73660046149e4565b609a6020526000908152604090205460ff1681565b60405190151581526020016102d8565b6103df6103da366004614bc0565b610e04565b60408051825163ffffffff908116825260208085015190911690820152918101516001600160c01b0316908201526060016102d8565b6102ce610423366004614bf3565b609b6020526000908152604090205481565b609e5461031f906001600160a01b031681565b61031f6104563660046149e4565b610e95565b6102ac610469366004614ba3565b610f21565b6102ac61047c366004614ba3565b610f32565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b6104bb6104b6366004614ba3565b610f43565b6040516102d89190614c0e565b6102ac6104d6366004614c66565b610fc2565b6104ee6104e9366004614ba3565b61154c565b6040516102d89190614d09565b6102ac6115c0565b6103bc610511366004614bf3565b6001805460ff9092161b9081161490565b6102ac610530366004614d8e565b61168c565b6001546102ce565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b61031f6105723660046149e4565b611723565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b6102ac6105ac366004614dc2565b61174d565b6102ac61180d565b6102f46105c73660046149e4565b611821565b60005461031f906201000090046001600160a01b031681565b61031f61182c565b6096546105fa9060ff1681565b60405160ff90911681526020016102d8565b6102ac61061a366004614ee2565b611845565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b6102ce7f2bd82124057f0913bc3b772ce7b83e8057c1ad1f3510fc83778be20f10ec5de681565b6102ac61067b366004614fdb565b611b7c565b61069361068e3660046150a6565b611d00565b6040516102d89190615150565b6102ce7ff843b3116d574f43e69f8dda5d93ebf11dccc4a465983f9453058005cd6b34a081565b6102ac6106d536600461519a565b611db9565b609c546102ce565b6102ac6106f0366004615280565b611e20565b6102ac610703366004615433565b611e33565b610777610716366004614bf3565b60408051606080820183526000808352602080840182905292840181905260ff9490941684526097825292829020825193840183525463ffffffff8116845261ffff600160201b8204811692850192909252600160301b9004169082015290565b60408051825163ffffffff16815260208084015161ffff9081169183019190915292820151909216908201526060016102d8565b6102ac6107b9366004614ba3565b612137565b6102ce6107cc366004615547565b6121ad565b6102ac6107df3660046149e4565b6121f4565b6108136107f2366004614ba3565b6001600160a01b031660009081526099602052604090206001015460ff1690565b6040516102d891906155fc565b600154600290600490811614156108525760405162461bcd60e51b81526004016108499061560a565b60405180910390fd5b60005b8281101561093057600084848381811061087157610871615641565b90506020020160208101906108869190614ba3565b6001600160a01b03811660009081526099602090815260408083208151808301909252805482526001810154949550929390929183019060ff1660028111156108d1576108d1614cd1565b60028111156108e2576108e2614cd1565b905250805190915060006108f582612350565b9050600061090b826001600160c01b03166123b9565b9050610918858583612416565b505050505080806109289061566d565b915050610855565b50505050565b600083815260986020526040812080548291908490811061095957610959615641565b600091825260209182902060408051606081018252929091015463ffffffff808216808552600160201b8304821695850195909552600160401b9091046001600160c01b03169183019190915290925085161015610a535760405162461bcd60e51b815260206004820152606560248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d61704174426c6f636b4e756d6265724279496e6465783a2071756f72756d4260648201527f69746d61705570646174652069732066726f6d20616674657220626c6f636b4e6084820152643ab6b132b960d91b60a482015260c401610849565b602081015163ffffffff161580610a795750806020015163ffffffff168463ffffffff16105b610b205760405162461bcd60e51b815260206004820152606660248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d61704174426c6f636b4e756d6265724279496e6465783a2071756f72756d4260648201527f69746d61705570646174652069732066726f6d206265666f726520626c6f636b608482015265273ab6b132b960d11b60a482015260c401610849565b60400151949350505050565b60013360009081526099602052604090206001015460ff166002811115610b5557610b55614cd1565b14610bc85760405162461bcd60e51b815260206004820152603c60248201527f5265676973747279436f6f7264696e61746f722e757064617465536f636b657460448201527f3a206f70657261746f72206973206e6f742072656769737465726564000000006064820152608401610849565b33600090815260996020526040908190205490517fec2963ab21c1e50e1e582aa542af2e4bf7bf38e6e1403c27b42e1c5d6e621eaa90610c099084906156e0565b60405180910390a250565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b91906156f3565b6001600160a01b0316336001600160a01b031614610cbb5760405162461bcd60e51b815260040161084990615710565b610cc481612503565b50565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d38919061575a565b610d545760405162461bcd60e51b81526004016108499061577c565b60015481811614610dcd5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610849565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d90602001610c09565b60408051606081018252600080825260208201819052918101919091526000838152609860205260409020805483908110610e4157610e41615641565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160c01b03600160401b909304929092169082015290505b92915050565b6040516308f6629d60e31b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906347b314e890602401602060405180830381865afa158015610efd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8f91906156f3565b610f29612608565b610cc481612667565b610f3a612608565b610cc4816126d0565b6040805180820190915260008082526020820152610e8f610fbd7f2bd82124057f0913bc3b772ce7b83e8057c1ad1f3510fc83778be20f10ec5de684604051602001610fa29291909182526001600160a01b0316602082015260400190565b60405160208183030381529060405280519060200120612739565b612787565b60015460029060049081161415610feb5760405162461bcd60e51b81526004016108499061560a565b600061103384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060965460ff1691506128179050565b905061103e816128d0565b6110ae5760405162461bcd60e51b81526020600482015260476024820152600080516020615e1383398151915260448201527f6f7273466f7251756f72756d3a20736f6d652071756f72756d7320646f206e6f6064820152661d08195e1a5cdd60ca1b608482015260a401610849565b84831461111d5760405162461bcd60e51b81526020600482015260436024820152600080516020615e1383398151915260448201527f6f7273466f7251756f72756d3a20696e707574206c656e677468206d69736d616064820152620e8c6d60eb1b608482015260a401610849565b60005b8381101561154357600085858381811061113c5761113c615641565b919091013560f81c9150369050600089898581811061115d5761115d615641565b905060200281019061116f91906157c4565b6040516379a0849160e11b815260ff8616600482015291935091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f341092290602401602060405180830381865afa1580156111db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ff919061580d565b63ffffffff16811461129b5760405162461bcd60e51b81526020600482015260656024820152600080516020615e1383398151915260448201527f6f7273466f7251756f72756d3a206e756d626572206f6620757064617465642060648201527f6f70657261746f727320646f6573206e6f74206d617463682071756f72756d206084820152641d1bdd185b60da1b60a482015260c401610849565b6000805b828110156114e25760008484838181106112bb576112bb615641565b90506020020160208101906112d09190614ba3565b6001600160a01b03811660009081526099602090815260408083208151808301909252805482526001810154949550929390929183019060ff16600281111561131b5761131b614cd1565b600281111561132c5761132c614cd1565b9052508051909150600061133f82612350565b905060016001600160c01b03821660ff8b161c8116146113c35760405162461bcd60e51b815260206004820152604460248201819052600080516020615e13833981519152908201527f6f7273466f7251756f72756d3a206f70657261746f72206e6f7420696e2071756064820152636f72756d60e01b608482015260a401610849565b856001600160a01b0316846001600160a01b03161161146e5760405162461bcd60e51b81526020600482015260676024820152600080516020615e1383398151915260448201527f6f7273466f7251756f72756d3a206f70657261746f7273206172726179206d7560648201527f737420626520736f7274656420696e20617363656e64696e6720616464726573608482015266399037b93232b960c91b60a482015260c401610849565b506114cc83838f8f8d908e6001611485919061582a565b9261149293929190615842565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061241692505050565b509092506114db90508161566d565b905061129f565b5060ff84166000818152609b6020908152604091829020439081905591519182527f46077d55330763f16269fd75e5761663f4192d2791747c0189b16ad31db07db4910160405180910390a2505050508061153c9061566d565b9050611120565b50505050505050565b60408051808201909152600080825260208201526001600160a01b0382166000908152609960209081526040918290208251808401909352805483526001810154909183019060ff1660028111156115a6576115a6614cd1565b60028111156115b7576115b7614cd1565b90525092915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa15801561160d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611631919061575a565b61164d5760405162461bcd60e51b81526004016108499061577c565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b611694612608565b609654829060ff908116908216106117145760405162461bcd60e51b815260206004820152603760248201527f5265676973747279436f6f7264696e61746f722e71756f72756d45786973747360448201527f3a2071756f72756d20646f6573206e6f742065786973740000000000000000006064820152608401610849565b61171e8383612903565b505050565b609c818154811061173357600080fd5b6000918252602090912001546001600160a01b0316905081565b609e546001600160a01b031633146117cd5760405162461bcd60e51b815260206004820152603a60248201527f5265676973747279436f6f7264696e61746f722e6f6e6c79456a6563746f723a60448201527f2063616c6c6572206973206e6f742074686520656a6563746f720000000000006064820152608401610849565b61171e8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506129b092505050565b611815612608565b61181f6000612e60565b565b6000610e8f82612350565b60006118406064546001600160a01b031690565b905090565b60018054600091908116141561186d5760405162461bcd60e51b81526004016108499061560a565b8389146118f05760405162461bcd60e51b8152602060048201526044602482018190527f5265676973747279436f6f7264696e61746f722e72656769737465724f706572908201527f61746f7257697468436875726e3a20696e707574206c656e677468206d69736d6064820152630c2e8c6d60e31b608482015260a401610849565b60006118fc3388612eb2565b905061195b818787808060200260200160405190810160405280939291908181526020016000905b82821015611950576119416040830286013681900381019061586c565b81526020019060010190611924565b505050505086612fe3565b60006119a233838e8e8e8e8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061316d915050565b905060005b8b811015611b6d576000609760008f8f858181106119c7576119c7615641565b919091013560f81c82525060208082019290925260409081016000208151606081018352905463ffffffff811680835261ffff600160201b8304811695840195909552600160301b90910490931691810191909152845180519193509084908110611a3457611a34615641565b602002602001015163ffffffff161115611b5a57611ad58e8e84818110611a5d57611a5d615641565b9050013560f81c60f81b60f81c84604001518481518110611a8057611a80615641565b60200260200101513386602001518681518110611a9f57611a9f615641565b60200260200101518d8d88818110611ab957611ab9615641565b905060400201803603810190611acf919061586c565b86613701565b611b5a898984818110611aea57611aea615641565b9050604002016020016020810190611b029190614ba3565b8f8f8590866001611b13919061582a565b92611b2093929190615842565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506129b092505050565b5080611b658161566d565b9150506119a7565b50505050505050505050505050565b600180546000919081161415611ba45760405162461bcd60e51b81526004016108499061560a565b6000611bb03385612eb2565b90506000611bf933838b8b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061316d915050565b51905060005b88811015611cf45760008a8a83818110611c1b57611c1b615641565b919091013560f81c600081815260976020526040902054855191935063ffffffff169150849084908110611c5157611c51615641565b602002602001015163ffffffff161115611ce15760405162461bcd60e51b8152602060048201526044602482018190527f5265676973747279436f6f7264696e61746f722e72656769737465724f706572908201527f61746f723a206f70657261746f7220636f756e742065786365656473206d6178606482015263696d756d60e01b608482015260a401610849565b5080611cec8161566d565b915050611bff565b50505050505050505050565b6060600082516001600160401b03811115611d1d57611d1d614a47565b604051908082528060200260200182016040528015611d46578160200160208202803683370190505b50905060005b8351811015611db157611d7885858381518110611d6b57611d6b615641565b60200260200101516139d6565b828281518110611d8a57611d8a615641565b63ffffffff9092166020928302919091019091015280611da98161566d565b915050611d4c565b509392505050565b6001805460029081161415611de05760405162461bcd60e51b81526004016108499061560a565b61171e3384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506129b092505050565b611e28612608565b61171e838383613b12565b600054610100900460ff1615808015611e535750600054600160ff909116105b80611e6d5750303b158015611e6d575060005460ff166001145b611ed05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610849565b6000805460ff191660011790558015611ef3576000805461ff0019166101001790555b82518451148015611f05575081518351145b611f6f5760405162461bcd60e51b815260206004820152603560248201527f5265676973747279436f6f7264696e61746f722e696e697469616c697a653a206044820152740d2dce0eae840d8cadccee8d040dad2e6dac2e8c6d605b1b6064820152608401610849565b611f7889612e60565b611f828686613d29565b611f8b88612667565b611f94876126d0565b609c80546001818101835560008381527faf85b9071dfafeac1409d3f1d19bafc9bc7c37974cde8df0ee6168f0086e539c92830180546001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166001600160a01b03199283161790925585548085018755850180547f0000000000000000000000000000000000000000000000000000000000000000841690831617905585549384019095559190920180547f000000000000000000000000000000000000000000000000000000000000000090921691909316179091555b84518110156120e5576120d385828151811061209257612092615641565b60200260200101518583815181106120ac576120ac615641565b60200260200101518584815181106120c6576120c6615641565b6020026020010151613b12565b806120dd8161566d565b915050612074565b50801561212c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b61213f612608565b6001600160a01b0381166121a45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610849565b610cc481612e60565b60006121eb7ff843b3116d574f43e69f8dda5d93ebf11dccc4a465983f9453058005cd6b34a086868686604051602001610fa2959493929190615888565b95945050505050565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226b91906156f3565b6001600160a01b0316336001600160a01b03161461229b5760405162461bcd60e51b815260040161084990615710565b6001541981196001541916146123195760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610849565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610c09565b6000818152609860205260408120548061236d5750600092915050565b60008381526098602052604090206123866001836158fe565b8154811061239657612396615641565b600091825260209091200154600160401b90046001600160c01b03169392505050565b60606000805b61010081101561240f576001811b9150838216156123ff57828160f81b6040516020016123ed929190615915565b60405160208183030381529060405292505b6124088161566d565b90506123bf565b5050919050565b60018260200151600281111561242e5761242e614cd1565b1461243857505050565b81516040516333567f7f60e11b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906366acfefe9061248d90889086908890600401615944565b6020604051808303816000875af11580156124ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d0919061596b565b90506001600160c01b038116156124fc576124fc856124f7836001600160c01b03166123b9565b6129b0565b5050505050565b6001600160a01b0381166125915760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610849565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b3361261161182c565b6001600160a01b03161461181f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610849565b609d54604080516001600160a01b03928316815291831660208301527f315457d8a8fe60f04af17c16e2f5a5e1db612b31648e58030360759ef8f3528c910160405180910390a1609d80546001600160a01b0319166001600160a01b0392909216919091179055565b609e54604080516001600160a01b03928316815291831660208301527f8f30ab09f43a6c157d7fce7e0a13c003042c1c95e8a72e7a146a21c0caa24dc9910160405180910390a1609e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610e8f612746613e19565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6040805180820190915260008082526020820152600080806127b7600080516020615e53833981519152866159aa565b90505b6127c381613f40565b9093509150600080516020615e538339815191528283098314156127fd576040805180820190915290815260208101919091529392505050565b600080516020615e538339815191526001820890506127ba565b60008061282384613fc2565b905080156128c9578260ff16846001865161283e91906158fe565b8151811061284e5761284e615641565b016020015160f81c106128c95760405162461bcd60e51b815260206004820152603f60248201527f4269746d61705574696c732e6f72646572656442797465734172726179546f4260448201527f69746d61703a206269746d61702065786365656473206d61782076616c7565006064820152608401610849565b9392505050565b60965460009081906128ea9060019060ff1681901b6158fe565b90506128c96001600160c01b0384811690831681161490565b60ff8216600081815260976020908152604091829020845181548684018051888701805163ffffffff90951665ffffffffffff199094168417600160201b61ffff938416021767ffff0000000000001916600160301b95831695909502949094179094558551918252518316938101939093525116918101919091527f3ee6fe8d54610244c3e9d3c066ae4aee997884aa28f10616ae821925401318ac9060600160405180910390a25050565b6001600160a01b0382166000908152609960205260409020805460018083015460ff1660028111156129e4576129e4614cd1565b14612a515760405162461bcd60e51b81526020600482015260436024820152600080516020615e7383398151915260448201527f70657261746f723a206f70657261746f72206973206e6f7420726567697374656064820152621c995960ea1b608482015260a401610849565b609654600090612a6590859060ff16612817565b90506000612a7283612350565b90506001600160c01b038216612ade5760405162461bcd60e51b815260206004820152603b6024820152600080516020615e7383398151915260448201527f70657261746f723a206269746d61702063616e6e6f74206265203000000000006064820152608401610849565b612ae7826128d0565b612b525760405162461bcd60e51b81526020600482015260426024820152600080516020615e7383398151915260448201527f70657261746f723a20736f6d652071756f72756d7320646f206e6f74206578696064820152611cdd60f21b608482015260a401610849565b612b696001600160c01b0383811690831681161490565b612bef5760405162461bcd60e51b81526020600482015260596024820152600080516020615e7383398151915260448201527f70657261746f723a206f70657261746f72206973206e6f74207265676973746560648201527f72656420666f72207370656369666965642071756f72756d7300000000000000608482015260a401610849565b6001600160c01b0382811619821616612c08848261414f565b6001600160c01b038116612cd75760018501805460ff191660021790556040516351b27a6d60e11b81526001600160a01b0388811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a364f4da90602401600060405180830381600087803b158015612c8857600080fd5b505af1158015612c9c573d6000803e3d6000fd5b50506040518692506001600160a01b038a1691507f396fdcb180cb0fea26928113fb0fd1c3549863f9cd563e6a184f1d578116c8e490600090a35b60405163f4e24fe560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f4e24fe590612d25908a908a906004016159be565b600060405180830381600087803b158015612d3f57600080fd5b505af1158015612d53573d6000803e3d6000fd5b505060405163bd29b8cd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063bd29b8cd9150612da59087908a906004016159e2565b600060405180830381600087803b158015612dbf57600080fd5b505af1158015612dd3573d6000803e3d6000fd5b505060405163bd29b8cd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063bd29b8cd9150612e259087908a906004016159e2565b600060405180830381600087803b158015612e3f57600080fd5b505af1158015612e53573d6000803e3d6000fd5b5050505050505050505050565b606480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516309aa152760e11b81526001600160a01b0383811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906313542a4e90602401602060405180830381865afa158015612f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4191906159fb565b905080610e8f577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bf79ce588484612f8287610f43565b6040518463ffffffff1660e01b8152600401612fa093929190615a14565b6020604051808303816000875af1158015612fbf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c991906159fb565b6020808201516000908152609a909152604090205460ff16156130895760405162461bcd60e51b815260206004820152605260248201527f5265676973747279436f6f7264696e61746f722e5f766572696679436875726e60448201527f417070726f7665725369676e61747572653a20636875726e417070726f766572606482015271081cd85b1d08185b1c9958591e481d5cd95960721b608482015260a401610849565b428160400151101561311e5760405162461bcd60e51b815260206004820152605260248201527f5265676973747279436f6f7264696e61746f722e5f766572696679436875726e60448201527f417070726f7665725369676e61747572653a20636875726e417070726f766572606482015271081cda59db985d1d5c9948195e1c1a5c995960721b608482015260a401610849565b602080820180516000908152609a909252604091829020805460ff19166001179055609d5490519183015161171e926001600160a01b039092169161316691879187916121ad565b835161430f565b61319160405180606001604052806060815260200160608152602001606081525090565b60006131d986868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060965460ff1691506128179050565b905060006131e688612350565b90506001600160c01b0382166132645760405162461bcd60e51b815260206004820152603960248201527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a206269746d61702063616e6e6f742062652030000000000000006064820152608401610849565b61326d826128d0565b6132e1576040805162461bcd60e51b81526020600482015260248101919091527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a20736f6d652071756f72756d7320646f206e6f742065786973746064820152608401610849565b8082166001600160c01b0316156133975760405162461bcd60e51b815260206004820152606860248201527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a206f70657261746f7220616c726561647920726567697374657260648201527f656420666f7220736f6d652071756f72756d73206265696e672072656769737460848201526732b932b2103337b960c11b60a482015260c401610849565b6001600160c01b03818116908316176133b0898261414f565b887fec2963ab21c1e50e1e582aa542af2e4bf7bf38e6e1403c27b42e1c5d6e621eaa876040516133e091906156e0565b60405180910390a260016001600160a01b038b1660009081526099602052604090206001015460ff16600281111561341a5761341a614cd1565b14613533576040805180820182528a8152600160208083018281526001600160a01b038f166000908152609990925293902082518155925183820180549394939192909160ff19169083600281111561347557613475614cd1565b021790555050604051639926ee7d60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169150639926ee7d906134ca908d908990600401615a93565b600060405180830381600087803b1580156134e457600080fd5b505af11580156134f8573d6000803e3d6000fd5b50506040518b92506001600160a01b038d1691507fe8e68cef1c3a761ed7be7e8463a375f27f7bc335e51824223cacce636ec5c3fe90600090a35b604051631fd93ca960e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633fb2795290613583908d908c908c90600401615b07565b600060405180830381600087803b15801561359d57600080fd5b505af11580156135b1573d6000803e3d6000fd5b5050604051632550477760e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063255047779150613607908d908d908d908d90600401615b2c565b6000604051808303816000875af1158015613626573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261364e9190810190615bc2565b60408087019190915260208601919091525162bff04d60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169062bff04d906136ab908c908c908c90600401615c25565b6000604051808303816000875af11580156136ca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526136f29190810190615c3f565b84525050509695505050505050565b6020808301516001600160a01b0380821660008181526099909452604090932054919290871614156137815760405162461bcd60e51b81526020600482015260356024820152600080516020615e3383398151915260448201527439371d1031b0b73737ba1031b43ab9371039b2b63360591b6064820152608401610849565b8760ff16846000015160ff16146137fe5760405162461bcd60e51b81526020600482015260476024820152600080516020615e3383398151915260448201527f726e3a2071756f72756d4e756d626572206e6f74207468652073616d65206173606482015266081cda59db995960ca1b608482015260a401610849565b604051635401ed2760e01b81526004810182905260ff891660248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635401ed2790604401602060405180830381865afa15801561386f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138939190615cd8565b905061389f81856144c9565b6001600160601b0316866001600160601b0316116139325760405162461bcd60e51b81526020600482015260566024820152600080516020615e3383398151915260448201527f726e3a20696e636f6d696e67206f70657261746f722068617320696e7375666660648201527534b1b4b2b73a1039ba30b5b2903337b91031b43ab93760511b608482015260a401610849565b61393c88856144ed565b6001600160601b0316816001600160601b03161061212c5760405162461bcd60e51b815260206004820152605c6024820152600080516020615e3383398151915260448201527f726e3a2063616e6e6f74206b69636b206f70657261746f722077697468206d6f60648201527f7265207468616e206b69636b424950734f66546f74616c5374616b6500000000608482015260a401610849565b600081815260986020526040812054815b81811015613a685760016139fb82846158fe565b613a0591906158fe565b92508463ffffffff16609860008681526020019081526020016000208463ffffffff1681548110613a3857613a38615641565b60009182526020909120015463ffffffff1611613a56575050610e8f565b80613a608161566d565b9150506139e7565b5060405162461bcd60e51b815260206004820152606c60248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d6170496e6465784174426c6f636b4e756d6265723a206e6f206269746d617060648201527f2075706461746520666f756e6420666f72206f70657261746f7249642061742060848201526b313637b1b590373ab6b132b960a11b60a482015260c401610849565b60965460ff1660c08110613b865760405162461bcd60e51b815260206004820152603560248201527f5265676973747279436f6f7264696e61746f722e63726561746551756f72756d6044820152740e881b585e081c5d5bdc9d5b5cc81c995858da1959605a1b6064820152608401610849565b613b91816001615cf5565b6096805460ff191660ff9290921691909117905580613bb08186612903565b60405160016296b58960e01b031981526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ff694a7790613c0390849088908890600401615d1a565b600060405180830381600087803b158015613c1d57600080fd5b505af1158015613c31573d6000803e3d6000fd5b505060405163136ca0f960e11b815260ff841660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506326d941f29150602401600060405180830381600087803b158015613c9957600080fd5b505af1158015613cad573d6000803e3d6000fd5b505060405163136ca0f960e11b815260ff841660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506326d941f29150602401600060405180830381600087803b158015613d1557600080fd5b505af115801561212c573d6000803e3d6000fd5b6000546201000090046001600160a01b0316158015613d5057506001600160a01b03821615155b613dd25760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610849565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2613e1582612503565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015613e7257507f000000000000000000000000000000000000000000000000000000000000000046145b15613e9c57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b60008080600080516020615e538339815191526003600080516020615e5383398151915286600080516020615e53833981519152888909090890506000613fb6827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f52600080516020615e53833981519152614507565b91959194509092505050565b60006101008251111561404b5760405162461bcd60e51b8152602060048201526044602482018190527f4269746d61705574696c732e6f72646572656442797465734172726179546f42908201527f69746d61703a206f7264657265644279746573417272617920697320746f6f206064820152636c6f6e6760e01b608482015260a401610849565b815161405957506000919050565b6000808360008151811061406f5761406f615641565b0160200151600160f89190911c81901b92505b84518110156141465784818151811061409d5761409d615641565b0160200151600160f89190911c1b91508282116141325760405162461bcd60e51b815260206004820152604760248201527f4269746d61705574696c732e6f72646572656442797465734172726179546f4260448201527f69746d61703a206f72646572656442797465734172726179206973206e6f74206064820152661bdc99195c995960ca1b608482015260a401610849565b9181179161413f8161566d565b9050614082565b50909392505050565b600082815260986020526040902054806141f4576000838152609860209081526040808320815160608101835263ffffffff43811682528185018681526001600160c01b03808a16958401958652845460018101865594885295909620915191909201805495519351909416600160401b026001600160401b03938316600160201b0267ffffffffffffffff1990961691909216179390931716919091179055505050565b600083815260986020526040812061420d6001846158fe565b8154811061421d5761421d615641565b600091825260209091200180549091504363ffffffff908116911614156142615780546001600160401b0316600160401b6001600160c01b03851602178155610930565b805463ffffffff438116600160201b81810267ffffffff0000000019909416939093178455600087815260986020908152604080832081516060810183529485528483018481526001600160c01b03808c1693870193845282546001810184559286529390942094519401805493519151909216600160401b026001600160401b0391861690960267ffffffffffffffff199093169390941692909217179190911691909117905550505050565b6001600160a01b0383163b1561442957604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e9061434f90869086906004016159e2565b602060405180830381865afa15801561436c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143909190615d93565b6001600160e01b0319161461171e5760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a401610849565b826001600160a01b031661443d83836145b6565b6001600160a01b03161461171e5760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a401610849565b6020810151600090612710906144e39061ffff1685615dbd565b6128c99190615dec565b6040810151600090612710906144e39061ffff1685615dbd565b600080614512614923565b61451a614941565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa925082801561455b5761455d565bfe5b50826145ab5760405162461bcd60e51b815260206004820152601a60248201527f424e3235342e6578704d6f643a2063616c6c206661696c7572650000000000006044820152606401610849565b505195945050505050565b60008060006145c585856145d2565b91509150611db181614642565b6000808251604114156146095760208301516040840151606085015160001a6145fd878285856147fd565b9450945050505061463b565b82516040141561463357602083015160408401516146288683836148ea565b93509350505061463b565b506000905060025b9250929050565b600081600481111561465657614656614cd1565b141561465f5750565b600181600481111561467357614673614cd1565b14156146c15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610849565b60028160048111156146d5576146d5614cd1565b14156147235760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610849565b600381600481111561473757614737614cd1565b14156147905760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610849565b60048160048111156147a4576147a4614cd1565b1415610cc45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610849565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561483457506000905060036148e1565b8460ff16601b1415801561484c57508460ff16601c14155b1561485d57506000905060046148e1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156148b1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166148da576000600192509250506148e1565b9150600090505b94509492505050565b6000806001600160ff1b0383168161490760ff86901c601b61582a565b9050614915878288856147fd565b935093505050935093915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60008083601f84011261497157600080fd5b5081356001600160401b0381111561498857600080fd5b6020830191508360208260051b850101111561463b57600080fd5b600080602083850312156149b657600080fd5b82356001600160401b038111156149cc57600080fd5b6149d88582860161495f565b90969095509350505050565b6000602082840312156149f657600080fd5b5035919050565b63ffffffff81168114610cc457600080fd5b600080600060608486031215614a2457600080fd5b833592506020840135614a36816149fd565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614a7f57614a7f614a47565b60405290565b604080519081016001600160401b0381118282101715614a7f57614a7f614a47565b604051601f8201601f191681016001600160401b0381118282101715614acf57614acf614a47565b604052919050565b60006001600160401b03831115614af057614af0614a47565b614b03601f8401601f1916602001614aa7565b9050828152838383011115614b1757600080fd5b828260208301376000602084830101529392505050565b600060208284031215614b4057600080fd5b81356001600160401b03811115614b5657600080fd5b8201601f81018413614b6757600080fd5b614b7684823560208401614ad7565b949350505050565b6001600160a01b0381168114610cc457600080fd5b8035614b9e81614b7e565b919050565b600060208284031215614bb557600080fd5b81356128c981614b7e565b60008060408385031215614bd357600080fd5b50508035926020909101359150565b803560ff81168114614b9e57600080fd5b600060208284031215614c0557600080fd5b6128c982614be2565b815181526020808301519082015260408101610e8f565b60008083601f840112614c3757600080fd5b5081356001600160401b03811115614c4e57600080fd5b60208301915083602082850101111561463b57600080fd5b60008060008060408587031215614c7c57600080fd5b84356001600160401b0380821115614c9357600080fd5b614c9f8883890161495f565b90965094506020870135915080821115614cb857600080fd5b50614cc587828801614c25565b95989497509550505050565b634e487b7160e01b600052602160045260246000fd5b60038110614d0557634e487b7160e01b600052602160045260246000fd5b9052565b815181526020808301516040830191614d2490840182614ce7565b5092915050565b803561ffff81168114614b9e57600080fd5b600060608284031215614d4f57600080fd5b614d57614a5d565b90508135614d64816149fd565b8152614d7260208301614d2b565b6020820152614d8360408301614d2b565b604082015292915050565b60008060808385031215614da157600080fd5b614daa83614be2565b9150614db98460208501614d3d565b90509250929050565b600080600060408486031215614dd757600080fd5b8335614de281614b7e565b925060208401356001600160401b03811115614dfd57600080fd5b614e0986828701614c25565b9497909650939450505050565b60006101008284031215614e2957600080fd5b50919050565b60008083601f840112614e4157600080fd5b5081356001600160401b03811115614e5857600080fd5b6020830191508360208260061b850101111561463b57600080fd5b600060608284031215614e8557600080fd5b614e8d614a5d565b905081356001600160401b03811115614ea557600080fd5b8201601f81018413614eb657600080fd5b614ec584823560208401614ad7565b825250602082013560208201526040820135604082015292915050565b60008060008060008060008060006101a08a8c031215614f0157600080fd5b89356001600160401b0380821115614f1857600080fd5b614f248d838e01614c25565b909b50995060208c0135915080821115614f3d57600080fd5b614f498d838e01614c25565b9099509750879150614f5e8d60408e01614e16565b96506101408c0135915080821115614f7557600080fd5b614f818d838e01614e2f565b90965094506101608c0135915080821115614f9b57600080fd5b614fa78d838e01614e73565b93506101808c0135915080821115614fbe57600080fd5b50614fcb8c828d01614e73565b9150509295985092959850929598565b6000806000806000806101608789031215614ff557600080fd5b86356001600160401b038082111561500c57600080fd5b6150188a838b01614c25565b9098509650602089013591508082111561503157600080fd5b61503d8a838b01614c25565b90965094508491506150528a60408b01614e16565b935061014089013591508082111561506957600080fd5b5061507689828a01614e73565b9150509295509295509295565b60006001600160401b0382111561509c5761509c614a47565b5060051b60200190565b600080604083850312156150b957600080fd5b82356150c4816149fd565b91506020838101356001600160401b038111156150e057600080fd5b8401601f810186136150f157600080fd5b80356151046150ff82615083565b614aa7565b81815260059190911b8201830190838101908883111561512357600080fd5b928401925b8284101561514157833582529284019290840190615128565b80955050505050509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561518e57835163ffffffff168352928401929184019160010161516c565b50909695505050505050565b600080602083850312156151ad57600080fd5b82356001600160401b038111156151c357600080fd5b6149d885828601614c25565b6001600160601b0381168114610cc457600080fd5b600082601f8301126151f557600080fd5b813560206152056150ff83615083565b82815260069290921b8401810191818101908684111561522457600080fd5b8286015b8481101561527557604081890312156152415760008081fd5b615249614a85565b813561525481614b7e565b815281850135615263816151cf565b81860152835291830191604001615228565b509695505050505050565b600080600060a0848603121561529557600080fd5b61529f8585614d3d565b925060608401356152af816151cf565b915060808401356001600160401b038111156152ca57600080fd5b6152d6868287016151e4565b9150509250925092565b600082601f8301126152f157600080fd5b813560206153016150ff83615083565b8281526060928302850182019282820191908785111561532057600080fd5b8387015b85811015615343576153368982614d3d565b8452928401928101615324565b5090979650505050505050565b600082601f83011261536157600080fd5b813560206153716150ff83615083565b82815260059290921b8401810191818101908684111561539057600080fd5b8286015b848110156152755780356153a7816151cf565b8352918301918301615394565b600082601f8301126153c557600080fd5b813560206153d56150ff83615083565b82815260059290921b840181019181810190868411156153f457600080fd5b8286015b848110156152755780356001600160401b038111156154175760008081fd5b6154258986838b01016151e4565b8452509183019183016153f8565b600080600080600080600080610100898b03121561545057600080fd5b61545989614b93565b975061546760208a01614b93565b965061547560408a01614b93565b955061548360608a01614b93565b94506080890135935060a08901356001600160401b03808211156154a657600080fd5b6154b28c838d016152e0565b945060c08b01359150808211156154c857600080fd5b6154d48c838d01615350565b935060e08b01359150808211156154ea57600080fd5b506154f78b828c016153b4565b9150509295985092959890939650565b60006040828403121561551957600080fd5b615521614a85565b905061552c82614be2565b8152602082013561553c81614b7e565b602082015292915050565b6000806000806080858703121561555d57600080fd5b843593506020808601356001600160401b0381111561557b57600080fd5b8601601f8101881361558c57600080fd5b803561559a6150ff82615083565b81815260069190911b8201830190838101908a8311156155b957600080fd5b928401925b828410156155e2576155d08b85615507565b825284820191506040840193506155be565b979a97995050505060408601359560600135949350505050565b60208101610e8f8284614ce7565b60208082526019908201527f5061757361626c653a20696e6465782069732070617573656400000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561568157615681615657565b5060010190565b60005b838110156156a357818101518382015260200161568b565b838111156109305750506000910152565b600081518084526156cc816020860160208601615688565b601f01601f19169290920160200192915050565b6020815260006128c960208301846156b4565b60006020828403121561570557600080fd5b81516128c981614b7e565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b60006020828403121561576c57600080fd5b815180151581146128c957600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b6000808335601e198436030181126157db57600080fd5b8301803591506001600160401b038211156157f557600080fd5b6020019150600581901b360382131561463b57600080fd5b60006020828403121561581f57600080fd5b81516128c9816149fd565b6000821982111561583d5761583d615657565b500190565b6000808585111561585257600080fd5b8386111561585f57600080fd5b5050820193919092039150565b60006040828403121561587e57600080fd5b6128c98383615507565b600060a0820187835260208781850152604060a08186015282885180855260c087019150838a01945060005b818110156158e5578551805160ff1684528501516001600160a01b03168584015294840194918301916001016158b4565b5050606086019790975250505050608001529392505050565b60008282101561591057615910615657565b500390565b60008351615927818460208801615688565b6001600160f81b0319939093169190920190815260010192915050565b60018060a01b03841681528260208201526060604082015260006121eb60608301846156b4565b60006020828403121561597d57600080fd5b81516001600160c01b03811681146128c957600080fd5b634e487b7160e01b600052601260045260246000fd5b6000826159b9576159b9615994565b500690565b6001600160a01b0383168152604060208201819052600090614b76908301846156b4565b828152604060208201526000614b7660408301846156b4565b600060208284031215615a0d57600080fd5b5051919050565b6001600160a01b03841681526101608101615a3c602083018580358252602090810135910152565b615a56606083016040860180358252602090810135910152565b60406080850160a084013760e0820160008152604060c0860182375060006101208301908152835190526020909201516101409091015292915050565b60018060a01b0383168152604060208201526000825160606040840152615abd60a08401826156b4565b90506020840151606084015260408401516080840152809150509392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03841681526040602082018190526000906121eb9083018486615ade565b60018060a01b0385168152836020820152606060408201526000615b54606083018486615ade565b9695505050505050565b600082601f830112615b6f57600080fd5b81516020615b7f6150ff83615083565b82815260059290921b84018101918181019086841115615b9e57600080fd5b8286015b84811015615275578051615bb5816151cf565b8352918301918301615ba2565b60008060408385031215615bd557600080fd5b82516001600160401b0380821115615bec57600080fd5b615bf886838701615b5e565b93506020850151915080821115615c0e57600080fd5b50615c1b85828601615b5e565b9150509250929050565b8381526040602082015260006121eb604083018486615ade565b60006020808385031215615c5257600080fd5b82516001600160401b03811115615c6857600080fd5b8301601f81018513615c7957600080fd5b8051615c876150ff82615083565b81815260059190911b82018301908381019087831115615ca657600080fd5b928401925b82841015615ccd578351615cbe816149fd565b82529284019290840190615cab565b979650505050505050565b600060208284031215615cea57600080fd5b81516128c9816151cf565b600060ff821660ff84168060ff03821115615d1257615d12615657565b019392505050565b60006060820160ff8616835260206001600160601b03808716828601526040606081870152838751808652608088019150848901955060005b81811015615d8357865180516001600160a01b031684528601518516868401529585019591830191600101615d53565b50909a9950505050505050505050565b600060208284031215615da557600080fd5b81516001600160e01b0319811681146128c957600080fd5b60006001600160601b0380831681851681830481118215151615615de357615de3615657565b02949350505050565b60006001600160601b0380841680615e0657615e06615994565b9216919091049291505056fe5265676973747279436f6f7264696e61746f722e7570646174654f70657261745265676973747279436f6f7264696e61746f722e5f76616c696461746543687530644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd475265676973747279436f6f7264696e61746f722e5f646572656769737465724fa264697066735822122007c44046a56826a1ceafa023d61e50742d9e749b629679d895b4b4d6978629c564736f6c634300080c0033", + Bin: "0x6101c06040523480156200001257600080fd5b506040516200630e3803806200630e833981016040819052620000359162000254565b604080518082018252601681527f4156535265676973747279436f6f7264696e61746f720000000000000000000060208083019182528351808501909452600684526576302e302e3160d01b908401528151902060e08190527f6bda7e3f385e48841048390444cced5cc795af87758af67622e5f4f0882c4a996101008190524660a05287938793879387939192917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620001358184846040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6080523060c05261012052505050506001600160a01b039384166101405291831661018052821661016052166101a0526200016f62000179565b50505050620002bc565b600054610100900460ff1615620001e65760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116101562000239576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200025157600080fd5b50565b600080600080608085870312156200026b57600080fd5b845162000278816200023b565b60208601519094506200028b816200023b565b60408601519093506200029e816200023b565b6060860151909250620002b1816200023b565b939692955090935050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051615f4a620003c4600039600081816106240152818161118c0152818161204901528181612e5b015281816136e20152613cba01526000818161057c01528181611fd4015281816124c301528181612ddb015281816136390152818161388f0152613c3901526000818161054201528181610eae0152818161201201528181612d5d01528181612f4301528181612fb9015281816135b90152613d3601526000818161048601528181612cb3015261350101526000613f3d01526000613f8c01526000613f6701526000613ec001526000613eea01526000613f140152615f4a6000f3fe608060405234801561001057600080fd5b50600436106102945760003560e01c80635df4594611610167578063a50857bf116100ce578063dd8283f311610087578063dd8283f3146106f5578063e65797ad14610708578063f2fde38b146107ab578063f8581191146107be578063fabc1cbc146107d1578063fd39105a146107e457600080fd5b8063a50857bf1461066d578063c391425e14610680578063ca0de882146106a0578063ca4f2d97146106c7578063d72d8dd6146106da578063d75b4c88146106e257600080fd5b8063886f119511610120578063886f1195146105cc5780638da5cb5b146105e55780639aa1653d146105ed5780639b5d177b1461060c5780639e9923c21461061f5780639feab8591461064657600080fd5b80635df459461461053d5780636347c9001461056457806368304835146105775780636e3b17db1461059e578063715018a6146105b1578063871ef049146105b957600080fd5b806328f61b311161020b5780635140a548116101c45780635140a548146104c85780635865c60c146104db578063595c6a67146104fb5780635ac86ab7146105035780635b0b829f146105225780635c975abb1461053557600080fd5b806328f61b3114610435578063296bb0641461044857806329d1e0c31461045b5780632cdd1e861461046e5780633998fdd3146104815780633c2a7f4c146104a857600080fd5b806310d67a2f1161025d57806310d67a2f1461034a57806313542a4e1461035d578063136439dd146103865780631478851f146103995780631eb812da146103cc578063249a0c421461041557600080fd5b8062cf2ab51461029957806303fd3492146102ae57806304ec6351146102e1578063054310e61461030c5780630cf4b76714610337575b600080fd5b6102ac6102a7366004614a3d565b610820565b005b6102ce6102bc366004614a7e565b60009081526098602052604090205490565b6040519081526020015b60405180910390f35b6102f46102ef366004614aa9565b610936565b6040516001600160c01b0390911681526020016102d8565b609d5461031f906001600160a01b031681565b6040516001600160a01b0390911681526020016102d8565b6102ac610345366004614bc8565b610b2c565b6102ac610358366004614c3d565b610c14565b6102ce61036b366004614c3d565b6001600160a01b031660009081526099602052604090205490565b6102ac610394366004614a7e565b610cc7565b6103bc6103a7366004614a7e565b609a6020526000908152604090205460ff1681565b60405190151581526020016102d8565b6103df6103da366004614c5a565b610e04565b60408051825163ffffffff908116825260208085015190911690820152918101516001600160c01b0316908201526060016102d8565b6102ce610423366004614c8d565b609b6020526000908152604090205481565b609e5461031f906001600160a01b031681565b61031f610456366004614a7e565b610e95565b6102ac610469366004614c3d565b610f21565b6102ac61047c366004614c3d565b610f32565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b6104bb6104b6366004614c3d565b610f43565b6040516102d89190614ca8565b6102ac6104d6366004614d00565b610fc2565b6104ee6104e9366004614c3d565b61154c565b6040516102d89190614da3565b6102ac6115c0565b6103bc610511366004614c8d565b6001805460ff9092161b9081161490565b6102ac610530366004614e28565b61168c565b6001546102ce565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b61031f610572366004614a7e565b611723565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b6102ac6105ac366004614e5c565b61174d565b6102ac61180d565b6102f46105c7366004614a7e565b611821565b60005461031f906201000090046001600160a01b031681565b61031f61182c565b6096546105fa9060ff1681565b60405160ff90911681526020016102d8565b6102ac61061a366004614f7c565b611845565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b6102ce7f2bd82124057f0913bc3b772ce7b83e8057c1ad1f3510fc83778be20f10ec5de681565b6102ac61067b366004615075565b611b7c565b61069361068e366004615140565b611d00565b6040516102d891906151ea565b6102ce7ff843b3116d574f43e69f8dda5d93ebf11dccc4a465983f9453058005cd6b34a081565b6102ac6106d5366004615234565b611db9565b609c546102ce565b6102ac6106f036600461531a565b611e20565b6102ac6107033660046154cd565b611e33565b610777610716366004614c8d565b60408051606080820183526000808352602080840182905292840181905260ff9490941684526097825292829020825193840183525463ffffffff8116845261ffff600160201b8204811692850192909252600160301b9004169082015290565b60408051825163ffffffff16815260208084015161ffff9081169183019190915292820151909216908201526060016102d8565b6102ac6107b9366004614c3d565b612137565b6102ce6107cc3660046155e1565b6121ad565b6102ac6107df366004614a7e565b6121f4565b6108136107f2366004614c3d565b6001600160a01b031660009081526099602052604090206001015460ff1690565b6040516102d89190615696565b600154600290600490811614156108525760405162461bcd60e51b8152600401610849906156a4565b60405180910390fd5b60005b82811015610930576000848483818110610871576108716156db565b90506020020160208101906108869190614c3d565b6001600160a01b03811660009081526099602090815260408083208151808301909252805482526001810154949550929390929183019060ff1660028111156108d1576108d1614d6b565b60028111156108e2576108e2614d6b565b905250805190915060006108f582612350565b9050600061090b826001600160c01b03166123b9565b9050610918858583612485565b5050505050808061092890615707565b915050610855565b50505050565b6000838152609860205260408120805482919084908110610959576109596156db565b600091825260209182902060408051606081018252929091015463ffffffff808216808552600160201b8304821695850195909552600160401b9091046001600160c01b03169183019190915290925085161015610a535760405162461bcd60e51b815260206004820152606560248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d61704174426c6f636b4e756d6265724279496e6465783a2071756f72756d4260648201527f69746d61705570646174652069732066726f6d20616674657220626c6f636b4e6084820152643ab6b132b960d91b60a482015260c401610849565b602081015163ffffffff161580610a795750806020015163ffffffff168463ffffffff16105b610b205760405162461bcd60e51b815260206004820152606660248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d61704174426c6f636b4e756d6265724279496e6465783a2071756f72756d4260648201527f69746d61705570646174652069732066726f6d206265666f726520626c6f636b608482015265273ab6b132b960d11b60a482015260c401610849565b60400151949350505050565b60013360009081526099602052604090206001015460ff166002811115610b5557610b55614d6b565b14610bc85760405162461bcd60e51b815260206004820152603c60248201527f5265676973747279436f6f7264696e61746f722e757064617465536f636b657460448201527f3a206f70657261746f72206973206e6f742072656769737465726564000000006064820152608401610849565b33600090815260996020526040908190205490517fec2963ab21c1e50e1e582aa542af2e4bf7bf38e6e1403c27b42e1c5d6e621eaa90610c0990849061576f565b60405180910390a250565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b9190615782565b6001600160a01b0316336001600160a01b031614610cbb5760405162461bcd60e51b81526004016108499061579f565b610cc481612572565b50565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3891906157e9565b610d545760405162461bcd60e51b81526004016108499061580b565b60015481811614610dcd5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610849565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d90602001610c09565b60408051606081018252600080825260208201819052918101919091526000838152609860205260409020805483908110610e4157610e416156db565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160c01b03600160401b909304929092169082015290505b92915050565b6040516308f6629d60e31b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906347b314e890602401602060405180830381865afa158015610efd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8f9190615782565b610f29612677565b610cc4816126d6565b610f3a612677565b610cc48161273f565b6040805180820190915260008082526020820152610e8f610fbd7f2bd82124057f0913bc3b772ce7b83e8057c1ad1f3510fc83778be20f10ec5de684604051602001610fa29291909182526001600160a01b0316602082015260400190565b604051602081830303815290604052805190602001206127a8565b6127f6565b60015460029060049081161415610feb5760405162461bcd60e51b8152600401610849906156a4565b600061103384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060965460ff1691506128869050565b905061103e8161293f565b6110ae5760405162461bcd60e51b81526020600482015260476024820152600080516020615e9583398151915260448201527f6f7273466f7251756f72756d3a20736f6d652071756f72756d7320646f206e6f6064820152661d08195e1a5cdd60ca1b608482015260a401610849565b84831461111d5760405162461bcd60e51b81526020600482015260436024820152600080516020615e9583398151915260448201527f6f7273466f7251756f72756d3a20696e707574206c656e677468206d69736d616064820152620e8c6d60eb1b608482015260a401610849565b60005b8381101561154357600085858381811061113c5761113c6156db565b919091013560f81c9150369050600089898581811061115d5761115d6156db565b905060200281019061116f9190615853565b6040516379a0849160e11b815260ff8616600482015291935091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f341092290602401602060405180830381865afa1580156111db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ff919061589c565b63ffffffff16811461129b5760405162461bcd60e51b81526020600482015260656024820152600080516020615e9583398151915260448201527f6f7273466f7251756f72756d3a206e756d626572206f6620757064617465642060648201527f6f70657261746f727320646f6573206e6f74206d617463682071756f72756d206084820152641d1bdd185b60da1b60a482015260c401610849565b6000805b828110156114e25760008484838181106112bb576112bb6156db565b90506020020160208101906112d09190614c3d565b6001600160a01b03811660009081526099602090815260408083208151808301909252805482526001810154949550929390929183019060ff16600281111561131b5761131b614d6b565b600281111561132c5761132c614d6b565b9052508051909150600061133f82612350565b905060016001600160c01b03821660ff8b161c8116146113c35760405162461bcd60e51b815260206004820152604460248201819052600080516020615e95833981519152908201527f6f7273466f7251756f72756d3a206f70657261746f72206e6f7420696e2071756064820152636f72756d60e01b608482015260a401610849565b856001600160a01b0316846001600160a01b03161161146e5760405162461bcd60e51b81526020600482015260676024820152600080516020615e9583398151915260448201527f6f7273466f7251756f72756d3a206f70657261746f7273206172726179206d7560648201527f737420626520736f7274656420696e20617363656e64696e6720616464726573608482015266399037b93232b960c91b60a482015260c401610849565b506114cc83838f8f8d908e600161148591906158b9565b92611492939291906158d1565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061248592505050565b509092506114db905081615707565b905061129f565b5060ff84166000818152609b6020908152604091829020439081905591519182527f46077d55330763f16269fd75e5761663f4192d2791747c0189b16ad31db07db4910160405180910390a2505050508061153c90615707565b9050611120565b50505050505050565b60408051808201909152600080825260208201526001600160a01b0382166000908152609960209081526040918290208251808401909352805483526001810154909183019060ff1660028111156115a6576115a6614d6b565b60028111156115b7576115b7614d6b565b90525092915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa15801561160d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163191906157e9565b61164d5760405162461bcd60e51b81526004016108499061580b565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b611694612677565b609654829060ff908116908216106117145760405162461bcd60e51b815260206004820152603760248201527f5265676973747279436f6f7264696e61746f722e71756f72756d45786973747360448201527f3a2071756f72756d20646f6573206e6f742065786973740000000000000000006064820152608401610849565b61171e8383612972565b505050565b609c818154811061173357600080fd5b6000918252602090912001546001600160a01b0316905081565b609e546001600160a01b031633146117cd5760405162461bcd60e51b815260206004820152603a60248201527f5265676973747279436f6f7264696e61746f722e6f6e6c79456a6563746f723a60448201527f2063616c6c6572206973206e6f742074686520656a6563746f720000000000006064820152608401610849565b61171e8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a1f92505050565b611815612677565b61181f6000612ecf565b565b6000610e8f82612350565b60006118406064546001600160a01b031690565b905090565b60018054600091908116141561186d5760405162461bcd60e51b8152600401610849906156a4565b8389146118f05760405162461bcd60e51b8152602060048201526044602482018190527f5265676973747279436f6f7264696e61746f722e72656769737465724f706572908201527f61746f7257697468436875726e3a20696e707574206c656e677468206d69736d6064820152630c2e8c6d60e31b608482015260a401610849565b60006118fc3388612f21565b905061195b818787808060200260200160405190810160405280939291908181526020016000905b8282101561195057611941604083028601368190038101906158fb565b81526020019060010190611924565b505050505086613052565b60006119a233838e8e8e8e8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92506131dc915050565b905060005b8b811015611b6d576000609760008f8f858181106119c7576119c76156db565b919091013560f81c82525060208082019290925260409081016000208151606081018352905463ffffffff811680835261ffff600160201b8304811695840195909552600160301b90910490931691810191909152845180519193509084908110611a3457611a346156db565b602002602001015163ffffffff161115611b5a57611ad58e8e84818110611a5d57611a5d6156db565b9050013560f81c60f81b60f81c84604001518481518110611a8057611a806156db565b60200260200101513386602001518681518110611a9f57611a9f6156db565b60200260200101518d8d88818110611ab957611ab96156db565b905060400201803603810190611acf91906158fb565b86613770565b611b5a898984818110611aea57611aea6156db565b9050604002016020016020810190611b029190614c3d565b8f8f8590866001611b1391906158b9565b92611b20939291906158d1565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a1f92505050565b5080611b6581615707565b9150506119a7565b50505050505050505050505050565b600180546000919081161415611ba45760405162461bcd60e51b8152600401610849906156a4565b6000611bb03385612f21565b90506000611bf933838b8b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92506131dc915050565b51905060005b88811015611cf45760008a8a83818110611c1b57611c1b6156db565b919091013560f81c600081815260976020526040902054855191935063ffffffff169150849084908110611c5157611c516156db565b602002602001015163ffffffff161115611ce15760405162461bcd60e51b8152602060048201526044602482018190527f5265676973747279436f6f7264696e61746f722e72656769737465724f706572908201527f61746f723a206f70657261746f7220636f756e742065786365656473206d6178606482015263696d756d60e01b608482015260a401610849565b5080611cec81615707565b915050611bff565b50505050505050505050565b6060600082516001600160401b03811115611d1d57611d1d614ae1565b604051908082528060200260200182016040528015611d46578160200160208202803683370190505b50905060005b8351811015611db157611d7885858381518110611d6b57611d6b6156db565b6020026020010151613a45565b828281518110611d8a57611d8a6156db565b63ffffffff9092166020928302919091019091015280611da981615707565b915050611d4c565b509392505050565b6001805460029081161415611de05760405162461bcd60e51b8152600401610849906156a4565b61171e3384848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a1f92505050565b611e28612677565b61171e838383613b81565b600054610100900460ff1615808015611e535750600054600160ff909116105b80611e6d5750303b158015611e6d575060005460ff166001145b611ed05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610849565b6000805460ff191660011790558015611ef3576000805461ff0019166101001790555b82518451148015611f05575081518351145b611f6f5760405162461bcd60e51b815260206004820152603560248201527f5265676973747279436f6f7264696e61746f722e696e697469616c697a653a206044820152740d2dce0eae840d8cadccee8d040dad2e6dac2e8c6d605b1b6064820152608401610849565b611f7889612ecf565b611f828686613d98565b611f8b886126d6565b611f948761273f565b609c80546001818101835560008381527faf85b9071dfafeac1409d3f1d19bafc9bc7c37974cde8df0ee6168f0086e539c92830180546001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166001600160a01b03199283161790925585548085018755850180547f0000000000000000000000000000000000000000000000000000000000000000841690831617905585549384019095559190920180547f000000000000000000000000000000000000000000000000000000000000000090921691909316179091555b84518110156120e5576120d3858281518110612092576120926156db565b60200260200101518583815181106120ac576120ac6156db565b60200260200101518584815181106120c6576120c66156db565b6020026020010151613b81565b806120dd81615707565b915050612074565b50801561212c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b61213f612677565b6001600160a01b0381166121a45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610849565b610cc481612ecf565b60006121eb7ff843b3116d574f43e69f8dda5d93ebf11dccc4a465983f9453058005cd6b34a086868686604051602001610fa2959493929190615917565b95945050505050565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226b9190615782565b6001600160a01b0316336001600160a01b03161461229b5760405162461bcd60e51b81526004016108499061579f565b6001541981196001541916146123195760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610849565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c90602001610c09565b6000818152609860205260408120548061236d5750600092915050565b600083815260986020526040902061238660018361598d565b81548110612396576123966156db565b600091825260209091200154600160401b90046001600160c01b03169392505050565b60606000806123c784613e88565b61ffff166001600160401b038111156123e2576123e2614ae1565b6040519080825280601f01601f19166020018201604052801561240c576020820181803683370190505b5090506000805b825182108015612424575061010081105b1561247b576001811b93508584161561246b578060f81b83838151811061244d5761244d6156db565b60200101906001600160f81b031916908160001a9053508160010191505b61247481615707565b9050612413565b5090949350505050565b60018260200151600281111561249d5761249d614d6b565b146124a757505050565b81516040516333567f7f60e11b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906366acfefe906124fc908890869088906004016159a4565b6020604051808303816000875af115801561251b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253f91906159cb565b90506001600160c01b0381161561256b5761256b85612566836001600160c01b03166123b9565b612a1f565b5050505050565b6001600160a01b0381166126005760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610849565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b3361268061182c565b6001600160a01b03161461181f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610849565b609d54604080516001600160a01b03928316815291831660208301527f315457d8a8fe60f04af17c16e2f5a5e1db612b31648e58030360759ef8f3528c910160405180910390a1609d80546001600160a01b0319166001600160a01b0392909216919091179055565b609e54604080516001600160a01b03928316815291831660208301527f8f30ab09f43a6c157d7fce7e0a13c003042c1c95e8a72e7a146a21c0caa24dc9910160405180910390a1609e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610e8f6127b5613eb3565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b604080518082019091526000808252602082015260008080612826600080516020615ed583398151915286615a0a565b90505b61283281613fda565b9093509150600080516020615ed583398151915282830983141561286c576040805180820190915290815260208101919091529392505050565b600080516020615ed5833981519152600182089050612829565b6000806128928461405c565b90508015612938578260ff1684600186516128ad919061598d565b815181106128bd576128bd6156db565b016020015160f81c106129385760405162461bcd60e51b815260206004820152603f60248201527f4269746d61705574696c732e6f72646572656442797465734172726179546f4260448201527f69746d61703a206269746d61702065786365656473206d61782076616c7565006064820152608401610849565b9392505050565b60965460009081906129599060019060ff1681901b61598d565b90506129386001600160c01b0384811690831681161490565b60ff8216600081815260976020908152604091829020845181548684018051888701805163ffffffff90951665ffffffffffff199094168417600160201b61ffff938416021767ffff0000000000001916600160301b95831695909502949094179094558551918252518316938101939093525116918101919091527f3ee6fe8d54610244c3e9d3c066ae4aee997884aa28f10616ae821925401318ac9060600160405180910390a25050565b6001600160a01b0382166000908152609960205260409020805460018083015460ff166002811115612a5357612a53614d6b565b14612ac05760405162461bcd60e51b81526020600482015260436024820152600080516020615ef583398151915260448201527f70657261746f723a206f70657261746f72206973206e6f7420726567697374656064820152621c995960ea1b608482015260a401610849565b609654600090612ad490859060ff16612886565b90506000612ae183612350565b90506001600160c01b038216612b4d5760405162461bcd60e51b815260206004820152603b6024820152600080516020615ef583398151915260448201527f70657261746f723a206269746d61702063616e6e6f74206265203000000000006064820152608401610849565b612b568261293f565b612bc15760405162461bcd60e51b81526020600482015260426024820152600080516020615ef583398151915260448201527f70657261746f723a20736f6d652071756f72756d7320646f206e6f74206578696064820152611cdd60f21b608482015260a401610849565b612bd86001600160c01b0383811690831681161490565b612c5e5760405162461bcd60e51b81526020600482015260596024820152600080516020615ef583398151915260448201527f70657261746f723a206f70657261746f72206973206e6f74207265676973746560648201527f72656420666f72207370656369666965642071756f72756d7300000000000000608482015260a401610849565b6001600160c01b0382811619821616612c7784826141e9565b6001600160c01b038116612d465760018501805460ff191660021790556040516351b27a6d60e11b81526001600160a01b0388811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a364f4da90602401600060405180830381600087803b158015612cf757600080fd5b505af1158015612d0b573d6000803e3d6000fd5b50506040518692506001600160a01b038a1691507f396fdcb180cb0fea26928113fb0fd1c3549863f9cd563e6a184f1d578116c8e490600090a35b60405163f4e24fe560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f4e24fe590612d94908a908a90600401615a1e565b600060405180830381600087803b158015612dae57600080fd5b505af1158015612dc2573d6000803e3d6000fd5b505060405163bd29b8cd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063bd29b8cd9150612e149087908a90600401615a42565b600060405180830381600087803b158015612e2e57600080fd5b505af1158015612e42573d6000803e3d6000fd5b505060405163bd29b8cd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063bd29b8cd9150612e949087908a90600401615a42565b600060405180830381600087803b158015612eae57600080fd5b505af1158015612ec2573d6000803e3d6000fd5b5050505050505050505050565b606480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516309aa152760e11b81526001600160a01b0383811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906313542a4e90602401602060405180830381865afa158015612f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fb09190615a5b565b905080610e8f577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bf79ce588484612ff187610f43565b6040518463ffffffff1660e01b815260040161300f93929190615a74565b6020604051808303816000875af115801561302e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129389190615a5b565b6020808201516000908152609a909152604090205460ff16156130f85760405162461bcd60e51b815260206004820152605260248201527f5265676973747279436f6f7264696e61746f722e5f766572696679436875726e60448201527f417070726f7665725369676e61747572653a20636875726e417070726f766572606482015271081cd85b1d08185b1c9958591e481d5cd95960721b608482015260a401610849565b428160400151101561318d5760405162461bcd60e51b815260206004820152605260248201527f5265676973747279436f6f7264696e61746f722e5f766572696679436875726e60448201527f417070726f7665725369676e61747572653a20636875726e417070726f766572606482015271081cda59db985d1d5c9948195e1c1a5c995960721b608482015260a401610849565b602080820180516000908152609a909252604091829020805460ff19166001179055609d5490519183015161171e926001600160a01b03909216916131d591879187916121ad565b83516143a9565b61320060405180606001604052806060815260200160608152602001606081525090565b600061324886868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060965460ff1691506128869050565b9050600061325588612350565b90506001600160c01b0382166132d35760405162461bcd60e51b815260206004820152603960248201527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a206269746d61702063616e6e6f742062652030000000000000006064820152608401610849565b6132dc8261293f565b613350576040805162461bcd60e51b81526020600482015260248101919091527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a20736f6d652071756f72756d7320646f206e6f742065786973746064820152608401610849565b8082166001600160c01b0316156134065760405162461bcd60e51b815260206004820152606860248201527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a206f70657261746f7220616c726561647920726567697374657260648201527f656420666f7220736f6d652071756f72756d73206265696e672072656769737460848201526732b932b2103337b960c11b60a482015260c401610849565b6001600160c01b038181169083161761341f89826141e9565b887fec2963ab21c1e50e1e582aa542af2e4bf7bf38e6e1403c27b42e1c5d6e621eaa8760405161344f919061576f565b60405180910390a260016001600160a01b038b1660009081526099602052604090206001015460ff16600281111561348957613489614d6b565b146135a2576040805180820182528a8152600160208083018281526001600160a01b038f166000908152609990925293902082518155925183820180549394939192909160ff1916908360028111156134e4576134e4614d6b565b021790555050604051639926ee7d60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169150639926ee7d90613539908d908990600401615af3565b600060405180830381600087803b15801561355357600080fd5b505af1158015613567573d6000803e3d6000fd5b50506040518b92506001600160a01b038d1691507fe8e68cef1c3a761ed7be7e8463a375f27f7bc335e51824223cacce636ec5c3fe90600090a35b604051631fd93ca960e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633fb27952906135f2908d908c908c90600401615b67565b600060405180830381600087803b15801561360c57600080fd5b505af1158015613620573d6000803e3d6000fd5b5050604051632550477760e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063255047779150613676908d908d908d908d90600401615b8c565b6000604051808303816000875af1158015613695573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526136bd9190810190615c22565b60408087019190915260208601919091525162bff04d60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169062bff04d9061371a908c908c908c90600401615c85565b6000604051808303816000875af1158015613739573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526137619190810190615c9f565b84525050509695505050505050565b6020808301516001600160a01b0380821660008181526099909452604090932054919290871614156137f05760405162461bcd60e51b81526020600482015260356024820152600080516020615eb583398151915260448201527439371d1031b0b73737ba1031b43ab9371039b2b63360591b6064820152608401610849565b8760ff16846000015160ff161461386d5760405162461bcd60e51b81526020600482015260476024820152600080516020615eb583398151915260448201527f726e3a2071756f72756d4e756d626572206e6f74207468652073616d65206173606482015266081cda59db995960ca1b608482015260a401610849565b604051635401ed2760e01b81526004810182905260ff891660248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635401ed2790604401602060405180830381865afa1580156138de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139029190615d38565b905061390e8185614563565b6001600160601b0316866001600160601b0316116139a15760405162461bcd60e51b81526020600482015260566024820152600080516020615eb583398151915260448201527f726e3a20696e636f6d696e67206f70657261746f722068617320696e7375666660648201527534b1b4b2b73a1039ba30b5b2903337b91031b43ab93760511b608482015260a401610849565b6139ab8885614587565b6001600160601b0316816001600160601b03161061212c5760405162461bcd60e51b815260206004820152605c6024820152600080516020615eb583398151915260448201527f726e3a2063616e6e6f74206b69636b206f70657261746f722077697468206d6f60648201527f7265207468616e206b69636b424950734f66546f74616c5374616b6500000000608482015260a401610849565b600081815260986020526040812054815b81811015613ad7576001613a6a828461598d565b613a74919061598d565b92508463ffffffff16609860008681526020019081526020016000208463ffffffff1681548110613aa757613aa76156db565b60009182526020909120015463ffffffff1611613ac5575050610e8f565b80613acf81615707565b915050613a56565b5060405162461bcd60e51b815260206004820152606c60248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d6170496e6465784174426c6f636b4e756d6265723a206e6f206269746d617060648201527f2075706461746520666f756e6420666f72206f70657261746f7249642061742060848201526b313637b1b590373ab6b132b960a11b60a482015260c401610849565b60965460ff1660c08110613bf55760405162461bcd60e51b815260206004820152603560248201527f5265676973747279436f6f7264696e61746f722e63726561746551756f72756d6044820152740e881b585e081c5d5bdc9d5b5cc81c995858da1959605a1b6064820152608401610849565b613c00816001615d55565b6096805460ff191660ff9290921691909117905580613c1f8186612972565b60405160016296b58960e01b031981526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ff694a7790613c7290849088908890600401615d7a565b600060405180830381600087803b158015613c8c57600080fd5b505af1158015613ca0573d6000803e3d6000fd5b505060405163136ca0f960e11b815260ff841660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506326d941f29150602401600060405180830381600087803b158015613d0857600080fd5b505af1158015613d1c573d6000803e3d6000fd5b505060405163136ca0f960e11b815260ff841660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506326d941f29150602401600060405180830381600087803b158015613d8457600080fd5b505af115801561212c573d6000803e3d6000fd5b6000546201000090046001600160a01b0316158015613dbf57506001600160a01b03821615155b613e415760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610849565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2613e8482612572565b5050565b6000805b8215610e8f57613e9d60018461598d565b9092169180613eab81615df3565b915050613e8c565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015613f0c57507f000000000000000000000000000000000000000000000000000000000000000046145b15613f3657507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b60008080600080516020615ed58339815191526003600080516020615ed583398151915286600080516020615ed5833981519152888909090890506000614050827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f52600080516020615ed58339815191526145a1565b91959194509092505050565b6000610100825111156140e55760405162461bcd60e51b8152602060048201526044602482018190527f4269746d61705574696c732e6f72646572656442797465734172726179546f42908201527f69746d61703a206f7264657265644279746573417272617920697320746f6f206064820152636c6f6e6760e01b608482015260a401610849565b81516140f357506000919050565b60008083600081518110614109576141096156db565b0160200151600160f89190911c81901b92505b84518110156141e057848181518110614137576141376156db565b0160200151600160f89190911c1b91508282116141cc5760405162461bcd60e51b815260206004820152604760248201527f4269746d61705574696c732e6f72646572656442797465734172726179546f4260448201527f69746d61703a206f72646572656442797465734172726179206973206e6f74206064820152661bdc99195c995960ca1b608482015260a401610849565b918117916141d981615707565b905061411c565b50909392505050565b6000828152609860205260409020548061428e576000838152609860209081526040808320815160608101835263ffffffff43811682528185018681526001600160c01b03808a16958401958652845460018101865594885295909620915191909201805495519351909416600160401b026001600160401b03938316600160201b0267ffffffffffffffff1990961691909216179390931716919091179055505050565b60008381526098602052604081206142a760018461598d565b815481106142b7576142b76156db565b600091825260209091200180549091504363ffffffff908116911614156142fb5780546001600160401b0316600160401b6001600160c01b03851602178155610930565b805463ffffffff438116600160201b81810267ffffffff0000000019909416939093178455600087815260986020908152604080832081516060810183529485528483018481526001600160c01b03808c1693870193845282546001810184559286529390942094519401805493519151909216600160401b026001600160401b0391861690960267ffffffffffffffff199093169390941692909217179190911691909117905550505050565b6001600160a01b0383163b156144c357604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e906143e99086908690600401615a42565b602060405180830381865afa158015614406573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061442a9190615e15565b6001600160e01b0319161461171e5760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a401610849565b826001600160a01b03166144d78383614650565b6001600160a01b03161461171e5760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a401610849565b60208101516000906127109061457d9061ffff1685615e3f565b6129389190615e6e565b60408101516000906127109061457d9061ffff1685615e3f565b6000806145ac6149bd565b6145b46149db565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa92508280156145f5576145f7565bfe5b50826146455760405162461bcd60e51b815260206004820152601a60248201527f424e3235342e6578704d6f643a2063616c6c206661696c7572650000000000006044820152606401610849565b505195945050505050565b600080600061465f858561466c565b91509150611db1816146dc565b6000808251604114156146a35760208301516040840151606085015160001a61469787828585614897565b945094505050506146d5565b8251604014156146cd57602083015160408401516146c2868383614984565b9350935050506146d5565b506000905060025b9250929050565b60008160048111156146f0576146f0614d6b565b14156146f95750565b600181600481111561470d5761470d614d6b565b141561475b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610849565b600281600481111561476f5761476f614d6b565b14156147bd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610849565b60038160048111156147d1576147d1614d6b565b141561482a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610849565b600481600481111561483e5761483e614d6b565b1415610cc45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610849565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148ce575060009050600361497b565b8460ff16601b141580156148e657508460ff16601c14155b156148f7575060009050600461497b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561494b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166149745760006001925092505061497b565b9150600090505b94509492505050565b6000806001600160ff1b038316816149a160ff86901c601b6158b9565b90506149af87828885614897565b935093505050935093915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60008083601f840112614a0b57600080fd5b5081356001600160401b03811115614a2257600080fd5b6020830191508360208260051b85010111156146d557600080fd5b60008060208385031215614a5057600080fd5b82356001600160401b03811115614a6657600080fd5b614a72858286016149f9565b90969095509350505050565b600060208284031215614a9057600080fd5b5035919050565b63ffffffff81168114610cc457600080fd5b600080600060608486031215614abe57600080fd5b833592506020840135614ad081614a97565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715614b1957614b19614ae1565b60405290565b604080519081016001600160401b0381118282101715614b1957614b19614ae1565b604051601f8201601f191681016001600160401b0381118282101715614b6957614b69614ae1565b604052919050565b60006001600160401b03831115614b8a57614b8a614ae1565b614b9d601f8401601f1916602001614b41565b9050828152838383011115614bb157600080fd5b828260208301376000602084830101529392505050565b600060208284031215614bda57600080fd5b81356001600160401b03811115614bf057600080fd5b8201601f81018413614c0157600080fd5b614c1084823560208401614b71565b949350505050565b6001600160a01b0381168114610cc457600080fd5b8035614c3881614c18565b919050565b600060208284031215614c4f57600080fd5b813561293881614c18565b60008060408385031215614c6d57600080fd5b50508035926020909101359150565b803560ff81168114614c3857600080fd5b600060208284031215614c9f57600080fd5b61293882614c7c565b815181526020808301519082015260408101610e8f565b60008083601f840112614cd157600080fd5b5081356001600160401b03811115614ce857600080fd5b6020830191508360208285010111156146d557600080fd5b60008060008060408587031215614d1657600080fd5b84356001600160401b0380821115614d2d57600080fd5b614d39888389016149f9565b90965094506020870135915080821115614d5257600080fd5b50614d5f87828801614cbf565b95989497509550505050565b634e487b7160e01b600052602160045260246000fd5b60038110614d9f57634e487b7160e01b600052602160045260246000fd5b9052565b815181526020808301516040830191614dbe90840182614d81565b5092915050565b803561ffff81168114614c3857600080fd5b600060608284031215614de957600080fd5b614df1614af7565b90508135614dfe81614a97565b8152614e0c60208301614dc5565b6020820152614e1d60408301614dc5565b604082015292915050565b60008060808385031215614e3b57600080fd5b614e4483614c7c565b9150614e538460208501614dd7565b90509250929050565b600080600060408486031215614e7157600080fd5b8335614e7c81614c18565b925060208401356001600160401b03811115614e9757600080fd5b614ea386828701614cbf565b9497909650939450505050565b60006101008284031215614ec357600080fd5b50919050565b60008083601f840112614edb57600080fd5b5081356001600160401b03811115614ef257600080fd5b6020830191508360208260061b85010111156146d557600080fd5b600060608284031215614f1f57600080fd5b614f27614af7565b905081356001600160401b03811115614f3f57600080fd5b8201601f81018413614f5057600080fd5b614f5f84823560208401614b71565b825250602082013560208201526040820135604082015292915050565b60008060008060008060008060006101a08a8c031215614f9b57600080fd5b89356001600160401b0380821115614fb257600080fd5b614fbe8d838e01614cbf565b909b50995060208c0135915080821115614fd757600080fd5b614fe38d838e01614cbf565b9099509750879150614ff88d60408e01614eb0565b96506101408c013591508082111561500f57600080fd5b61501b8d838e01614ec9565b90965094506101608c013591508082111561503557600080fd5b6150418d838e01614f0d565b93506101808c013591508082111561505857600080fd5b506150658c828d01614f0d565b9150509295985092959850929598565b600080600080600080610160878903121561508f57600080fd5b86356001600160401b03808211156150a657600080fd5b6150b28a838b01614cbf565b909850965060208901359150808211156150cb57600080fd5b6150d78a838b01614cbf565b90965094508491506150ec8a60408b01614eb0565b935061014089013591508082111561510357600080fd5b5061511089828a01614f0d565b9150509295509295509295565b60006001600160401b0382111561513657615136614ae1565b5060051b60200190565b6000806040838503121561515357600080fd5b823561515e81614a97565b91506020838101356001600160401b0381111561517a57600080fd5b8401601f8101861361518b57600080fd5b803561519e6151998261511d565b614b41565b81815260059190911b820183019083810190888311156151bd57600080fd5b928401925b828410156151db578335825292840192908401906151c2565b80955050505050509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561522857835163ffffffff1683529284019291840191600101615206565b50909695505050505050565b6000806020838503121561524757600080fd5b82356001600160401b0381111561525d57600080fd5b614a7285828601614cbf565b6001600160601b0381168114610cc457600080fd5b600082601f83011261528f57600080fd5b8135602061529f6151998361511d565b82815260069290921b840181019181810190868411156152be57600080fd5b8286015b8481101561530f57604081890312156152db5760008081fd5b6152e3614b1f565b81356152ee81614c18565b8152818501356152fd81615269565b818601528352918301916040016152c2565b509695505050505050565b600080600060a0848603121561532f57600080fd5b6153398585614dd7565b9250606084013561534981615269565b915060808401356001600160401b0381111561536457600080fd5b6153708682870161527e565b9150509250925092565b600082601f83011261538b57600080fd5b8135602061539b6151998361511d565b828152606092830285018201928282019190878511156153ba57600080fd5b8387015b858110156153dd576153d08982614dd7565b84529284019281016153be565b5090979650505050505050565b600082601f8301126153fb57600080fd5b8135602061540b6151998361511d565b82815260059290921b8401810191818101908684111561542a57600080fd5b8286015b8481101561530f57803561544181615269565b835291830191830161542e565b600082601f83011261545f57600080fd5b8135602061546f6151998361511d565b82815260059290921b8401810191818101908684111561548e57600080fd5b8286015b8481101561530f5780356001600160401b038111156154b15760008081fd5b6154bf8986838b010161527e565b845250918301918301615492565b600080600080600080600080610100898b0312156154ea57600080fd5b6154f389614c2d565b975061550160208a01614c2d565b965061550f60408a01614c2d565b955061551d60608a01614c2d565b94506080890135935060a08901356001600160401b038082111561554057600080fd5b61554c8c838d0161537a565b945060c08b013591508082111561556257600080fd5b61556e8c838d016153ea565b935060e08b013591508082111561558457600080fd5b506155918b828c0161544e565b9150509295985092959890939650565b6000604082840312156155b357600080fd5b6155bb614b1f565b90506155c682614c7c565b815260208201356155d681614c18565b602082015292915050565b600080600080608085870312156155f757600080fd5b843593506020808601356001600160401b0381111561561557600080fd5b8601601f8101881361562657600080fd5b80356156346151998261511d565b81815260069190911b8201830190838101908a83111561565357600080fd5b928401925b8284101561567c5761566a8b856155a1565b82528482019150604084019350615658565b979a97995050505060408601359560600135949350505050565b60208101610e8f8284614d81565b60208082526019908201527f5061757361626c653a20696e6465782069732070617573656400000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561571b5761571b6156f1565b5060010190565b6000815180845260005b818110156157485760208185018101518683018201520161572c565b8181111561575a576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006129386020830184615722565b60006020828403121561579457600080fd5b815161293881614c18565b6020808252602a908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526939903ab73830bab9b2b960b11b606082015260800190565b6000602082840312156157fb57600080fd5b8151801515811461293857600080fd5b60208082526028908201527f6d73672e73656e646572206973206e6f74207065726d697373696f6e6564206160408201526739903830bab9b2b960c11b606082015260800190565b6000808335601e1984360301811261586a57600080fd5b8301803591506001600160401b0382111561588457600080fd5b6020019150600581901b36038213156146d557600080fd5b6000602082840312156158ae57600080fd5b815161293881614a97565b600082198211156158cc576158cc6156f1565b500190565b600080858511156158e157600080fd5b838611156158ee57600080fd5b5050820193919092039150565b60006040828403121561590d57600080fd5b61293883836155a1565b600060a0820187835260208781850152604060a08186015282885180855260c087019150838a01945060005b81811015615974578551805160ff1684528501516001600160a01b0316858401529484019491830191600101615943565b5050606086019790975250505050608001529392505050565b60008282101561599f5761599f6156f1565b500390565b60018060a01b03841681528260208201526060604082015260006121eb6060830184615722565b6000602082840312156159dd57600080fd5b81516001600160c01b038116811461293857600080fd5b634e487b7160e01b600052601260045260246000fd5b600082615a1957615a196159f4565b500690565b6001600160a01b0383168152604060208201819052600090614c1090830184615722565b828152604060208201526000614c106040830184615722565b600060208284031215615a6d57600080fd5b5051919050565b6001600160a01b03841681526101608101615a9c602083018580358252602090810135910152565b615ab6606083016040860180358252602090810135910152565b60406080850160a084013760e0820160008152604060c0860182375060006101208301908152835190526020909201516101409091015292915050565b60018060a01b0383168152604060208201526000825160606040840152615b1d60a0840182615722565b90506020840151606084015260408401516080840152809150509392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03841681526040602082018190526000906121eb9083018486615b3e565b60018060a01b0385168152836020820152606060408201526000615bb4606083018486615b3e565b9695505050505050565b600082601f830112615bcf57600080fd5b81516020615bdf6151998361511d565b82815260059290921b84018101918181019086841115615bfe57600080fd5b8286015b8481101561530f578051615c1581615269565b8352918301918301615c02565b60008060408385031215615c3557600080fd5b82516001600160401b0380821115615c4c57600080fd5b615c5886838701615bbe565b93506020850151915080821115615c6e57600080fd5b50615c7b85828601615bbe565b9150509250929050565b8381526040602082015260006121eb604083018486615b3e565b60006020808385031215615cb257600080fd5b82516001600160401b03811115615cc857600080fd5b8301601f81018513615cd957600080fd5b8051615ce76151998261511d565b81815260059190911b82018301908381019087831115615d0657600080fd5b928401925b82841015615d2d578351615d1e81614a97565b82529284019290840190615d0b565b979650505050505050565b600060208284031215615d4a57600080fd5b815161293881615269565b600060ff821660ff84168060ff03821115615d7257615d726156f1565b019392505050565b60006060820160ff8616835260206001600160601b03808716828601526040606081870152838751808652608088019150848901955060005b81811015615de357865180516001600160a01b031684528601518516868401529585019591830191600101615db3565b50909a9950505050505050505050565b600061ffff80831681811415615e0b57615e0b6156f1565b6001019392505050565b600060208284031215615e2757600080fd5b81516001600160e01b03198116811461293857600080fd5b60006001600160601b0380831681851681830481118215151615615e6557615e656156f1565b02949350505050565b60006001600160601b0380841680615e8857615e886159f4565b9216919091049291505056fe5265676973747279436f6f7264696e61746f722e7570646174654f70657261745265676973747279436f6f7264696e61746f722e5f76616c696461746543687530644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd475265676973747279436f6f7264696e61746f722e5f646572656769737465724fa26469706673582212202e8309a61acd08ec5b10306992d9d18407d54e75f50781cd3b9fde8f31b1852664736f6c634300080c0033", } // ContractRegistryCoordinatorABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/StakeRegistry/binding.go b/contracts/bindings/StakeRegistry/binding.go index adcdaf6eb..736460eac 100644 --- a/contracts/bindings/StakeRegistry/binding.go +++ b/contracts/bindings/StakeRegistry/binding.go @@ -45,7 +45,7 @@ type IStakeRegistryStrategyParams struct { // ContractStakeRegistryMetaData contains all meta data concerning the ContractStakeRegistry contract. var ContractStakeRegistryMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractIRegistryCoordinator\"},{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"MAX_WEIGHING_FUNCTION_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"WEIGHTING_DIVISOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addStrategies\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"_strategyParams\",\"type\":\"tuple[]\",\"internalType\":\"structIStakeRegistry.StrategyParams[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterOperator\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getCurrentStake\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentTotalStake\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLatestStakeUpdate\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIStakeRegistry.StakeUpdate\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeAtBlockNumber\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeAtBlockNumberAndIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeHistory\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIStakeRegistry.StakeUpdate[]\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeHistoryLength\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeUpdateAtIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIStakeRegistry.StakeUpdate\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeUpdateIndexAtBlockNumber\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeAtBlockNumberFromIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeHistoryLength\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeIndicesAtBlockNumber\",\"inputs\":[{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeUpdateAtIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIStakeRegistry.StakeUpdate\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initializeQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumStake\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"_strategyParams\",\"type\":\"tuple[]\",\"internalType\":\"structIStakeRegistry.StrategyParams[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minimumStakeForQuorum\",\"inputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyStrategyParams\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"strategyIndices\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"newMultipliers\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registryCoordinator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeStrategies\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"indicesToRemove\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinimumStakeForQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumStake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyParams\",\"inputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyParamsByIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIStakeRegistry.StrategyParams\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyParamsLength\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorStake\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint192\",\"internalType\":\"uint192\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"weightOfOperatorForQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"MinimumStakeForQuorumUpdated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"minimumStake\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorStakeUpdate\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"},{\"name\":\"stake\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"QuorumCreated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyMultiplierUpdated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false}]", - Bin: "0x60c06040523480156200001157600080fd5b506040516200374b3803806200374b833981016040819052620000349162000065565b6001600160a01b0391821660a05216608052620000a4565b6001600160a01b03811681146200006257600080fd5b50565b600080604083850312156200007957600080fd5b825162000086816200004c565b602084015190925062000099816200004c565b809150509250929050565b60805160a051613642620001096000396000818161036f015281816106140152818161095101528181610cc80152818161101e0152818161154101528181611643015281816117670152611b2501526000818161050b0152611d4901526136426000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063ac6bfb0311610104578063c8294c56116100a2578063f2be94ae11610071578063f2be94ae1461052d578063f851e19814610540578063fa28c62714610553578063ff694a771461056657600080fd5b8063c8294c56146104b8578063d5eccc05146104cb578063dd9846b9146104de578063df5cf7231461050657600080fd5b8063bc9a40c3116100de578063bc9a40c314610456578063bd29b8cd14610469578063c46778a51461047c578063c601527d146104a557600080fd5b8063ac6bfb03146103e3578063adc804da14610403578063b6904b781461044357600080fd5b80634bd26e091161017c57806366acfefe1161014b57806366acfefe1461033f5780636d14a9871461036a5780637c172347146103a957806381c07502146103c357600080fd5b80634bd26e09146102da5780635401ed271461030a5780635e5a67751461031d5780635f1f2d771461032c57600080fd5b806320b66298116101b857806320b662981461026157806325504777146102765780632cd95940146102975780633ca5a5f5146102b757600080fd5b80630491b41c146101df57806308732461146102155780631f9b74e014610236575b600080fd5b6102026101ed366004612b07565b60ff1660009081526001602052604090205490565b6040519081526020015b60405180910390f35b610228610223366004612b22565b610579565b60405161020c929190612b4c565b610249610244366004612b86565b6105c2565b6040516001600160601b03909116815260200161020c565b61027461026f366004612c01565b610612565b005b610289610284366004612cc2565b610943565b60405161020c929190612d61565b6102aa6102a5366004612d86565b610c0e565b60405161020c9190612db2565b6102026102c5366004612b07565b60ff1660009081526003602052604090205490565b6102026102e8366004612d86565b600091825260026020908152604080842060ff93909316845291905290205490565b610249610318366004612d86565b610cad565b610202670de0b6b3a764000081565b61027461033a366004612ebb565b610cc6565b61035261034d366004612cc2565b611011565b6040516001600160c01b03909116815260200161020c565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020c565b6103b1602081565b60405160ff909116815260200161020c565b6103d66103d1366004612f77565b61116b565b60405161020c9190612fc9565b6103f66103f1366004613007565b61139e565b60405161020c919061303a565b610416610411366004612b22565b611436565b6040805182516001600160a01b031681526020928301516001600160601b0316928101929092520161020c565b6103f6610451366004612b22565b6114b0565b610274610464366004613086565b61153f565b6102746104773660046130b0565b611638565b61024961048a366004612b07565b6000602081905290815260409020546001600160601b031681565b6102746104b336600461317c565b611765565b6102496104c63660046131c9565b611859565b6102496104d9366004612b07565b6118d7565b6104f16104ec366004613205565b61192a565b60405163ffffffff909116815260200161020c565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b61024961053b366004613241565b61193f565b6103f661054e366004612d86565b6119d4565b610249610561366004613205565b611ab9565b610274610574366004613283565b611b1a565b6003602052816000526040600020818154811061059557600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b60ff821660009081526001602052604081205483906105fc5760405162461bcd60e51b81526004016105f3906132e0565b60405180910390fd5b60006106088585611c85565b5095945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610670573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106949190613331565b6001600160a01b0316336001600160a01b0316146106c45760405162461bcd60e51b81526004016105f39061334e565b846106e08160ff16600090815260016020526040902054151590565b6106fc5760405162461bcd60e51b81526004016105f3906132e0565b8380610772576040805162461bcd60e51b81526020600482015260248101919091527f5374616b6552656769737472792e6d6f6469667953747261746567795061726160448201527f6d733a206e6f20737472617465677920696e64696365732070726f766964656460648201526084016105f3565b8281146107e75760405162461bcd60e51b815260206004820152603960248201527f5374616b6552656769737472792e6d6f6469667953747261746567795061726160448201527f6d733a20696e707574206c656e677468206d69736d617463680000000000000060648201526084016105f3565b60ff87166000908152600360205260408120905b8281101561093857858582818110610815576108156133ca565b905060200201602081019061082a91906133e0565b8289898481811061083d5761083d6133ca565b9050602002013581548110610854576108546133ca565b9060005260206000200160000160146101000a8154816001600160601b0302191690836001600160601b031602179055508860ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a75838a8a858181106108bd576108bd6133ca565b90506020020135815481106108d4576108d46133ca565b6000918252602090912001546001600160a01b03168888858181106108fb576108fb6133ca565b905060200201602081019061091091906133e0565b60405161091e929190612b4c565b60405180910390a28061093081613411565b9150506107fb565b505050505050505050565b606080336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461098e5760405162461bcd60e51b81526004016105f39061342c565b6000836001600160401b038111156109a8576109a8612e2a565b6040519080825280602002602001820160405280156109d1578160200160208202803683370190505b5090506000846001600160401b038111156109ee576109ee612e2a565b604051908082528060200260200182016040528015610a17578160200160208202803683370190505b50905060005b85811015610c00576000878783818110610a3957610a396133ca565b919091013560f81c60008181526001602052604090205490925015159050610ac15760405162461bcd60e51b815260206004820152603560248201527f5374616b6552656769737472792e72656769737465724f70657261746f723a206044820152741c5d5bdc9d5b48191bd95cc81b9bdd08195e1a5cdd605a1b60648201526084016105f3565b600080610ace838d611c85565b9150915080610b6b5760405162461bcd60e51b815260206004820152605b60248201527f5374616b6552656769737472792e72656769737465724f70657261746f723a2060448201527f4f70657261746f7220646f6573206e6f74206d656574206d696e696d756d207360648201527f74616b6520726571756972656d656e7420666f722071756f72756d0000000000608482015260a4016105f3565b6000610b788c8585611e3b565b905082878681518110610b8d57610b8d6133ca565b60200260200101906001600160601b031690816001600160601b031681525050610bb784826120bb565b868681518110610bc957610bc96133ca565b60200260200101906001600160601b031690816001600160601b031681525050505050508080610bf890613411565b915050610a1d565b509097909650945050505050565b600082815260026020908152604080832060ff851684528252808320805482518185028101850190935280835260609492939192909184015b82821015610ca0576000848152602090819020604080516060810182529185015463ffffffff8082168452600160201b82041683850152600160401b90046001600160601b031690820152825260019092019101610c47565b5050505090505b92915050565b600080610cba84846119d4565b60400151949350505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d489190613331565b6001600160a01b0316336001600160a01b031614610d785760405162461bcd60e51b81526004016105f39061334e565b81610d948160ff16600090815260016020526040902054151590565b610db05760405162461bcd60e51b81526004016105f3906132e0565b815180610e255760405162461bcd60e51b815260206004820152603d60248201527f5374616b6552656769737472792e72656d6f7665537472617465676965733a2060448201527f6e6f20696e646963657320746f2072656d6f76652070726f766964656400000060648201526084016105f3565b60ff84166000908152600360205260408120905b82811015611009578560ff167f31fa2e2cd280c9375e13ffcf3d81e2378100186e4058f8d3ddb690b82dcd31f783878481518110610e7957610e796133ca565b602002602001015181548110610e9157610e916133ca565b600091825260209182902001546040516001600160a01b0390911681520160405180910390a28560ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a7583878481518110610eef57610eef6133ca565b602002602001015181548110610f0757610f076133ca565b600091825260208083209190910154604080516001600160a01b039092168252918101929092520160405180910390a281548290610f479060019061349e565b81548110610f5757610f576133ca565b9060005260206000200182868381518110610f7457610f746133ca565b602002602001015181548110610f8c57610f8c6133ca565b600091825260209091208254910180546001600160a01b0319166001600160a01b03909216918217815591546001600160601b03600160a01b9182900416021790558154829080610fdf57610fdf6134b5565b6000828152602081208201600019908101919091550190558061100181613411565b915050610e39565b505050505050565b6000336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461105b5760405162461bcd60e51b81526004016105f39061342c565b6000805b8381101561060857600085858381811061107b5761107b6133ca565b919091013560f81c6000818152600160205260409020549092501515905061110b5760405162461bcd60e51b815260206004820152603860248201527f5374616b6552656769737472792e7570646174654f70657261746f725374616b60448201527f653a2071756f72756d20646f6573206e6f74206578697374000000000000000060648201526084016105f3565b600080611118838b611c85565b915091508061113a5760009150600160ff84161b6001600160c01b0386161794505b60006111478a8585611e3b565b905061115384826120bb565b5050505050808061116390613411565b91505061105f565b60606000826001600160401b0381111561118757611187612e2a565b6040519080825280602002602001820160405280156111b0578160200160208202803683370190505b50905060005b838110156113935760008585838181106111d2576111d26133ca565b919091013560f81c6000818152600160205260408120805492945063ffffffff8b16935091611203576112036133ca565b60009182526020909120015463ffffffff1611156112af5760405162461bcd60e51b815260206004820152605b60248201527f5374616b6552656769737472792e676574546f74616c5374616b65496e64696360448201527f65734174426c6f636b4e756d6265723a2071756f72756d20686173206e6f207360648201527f74616b6520686973746f727920617420626c6f636b4e756d6265720000000000608482015260a4016105f3565b60ff8116600090815260016020526040812054905b8181101561137d5760ff8316600090815260016020819052604090912063ffffffff8b16916112f3848661349e565b6112fd919061349e565b8154811061130d5761130d6133ca565b60009182526020909120015463ffffffff161161136b576001611330828461349e565b61133a919061349e565b85858151811061134c5761134c6133ca565b602002602001019063ffffffff16908163ffffffff168152505061137d565b8061137581613411565b9150506112c4565b505050808061138b90613411565b9150506111b6565b5090505b9392505050565b60408051606081018252600080825260208083018290528284018290528582526002815283822060ff881683529052919091208054839081106113e3576113e36133ca565b600091825260209182902060408051606081018252929091015463ffffffff8082168452600160201b82041693830193909352600160401b9092046001600160601b031691810191909152949350505050565b604080518082019091526000808252602082015260ff8316600090815260036020526040902080548390811061146e5761146e6133ca565b6000918252602091829020604080518082019091529101546001600160a01b0381168252600160a01b90046001600160601b0316918101919091529392505050565b604080516060810182526000808252602080830182905282840182905260ff8616825260019052919091208054839081106114ed576114ed6133ca565b600091825260209182902060408051606081018252929091015463ffffffff8082168452600160201b82041693830193909352600160401b9092046001600160601b0316918101919091529392505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561159d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c19190613331565b6001600160a01b0316336001600160a01b0316146115f15760405162461bcd60e51b81526004016105f39061334e565b8161160d8160ff16600090815260016020526040902054151590565b6116295760405162461bcd60e51b81526004016105f3906132e0565b6116338383612235565b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116805760405162461bcd60e51b81526004016105f39061342c565b60005b8181101561175f57600083838381811061169f5761169f6133ca565b919091013560f81c6000818152600160205260409020549092501515905061172f5760405162461bcd60e51b815260206004820152603760248201527f5374616b6552656769737472792e646572656769737465724f70657261746f7260448201527f3a2071756f72756d20646f6573206e6f7420657869737400000000000000000060648201526084016105f3565b600061173d86836000611e3b565b905061174982826120bb565b505050808061175790613411565b915050611683565b50505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e79190613331565b6001600160a01b0316336001600160a01b0316146118175760405162461bcd60e51b81526004016105f39061334e565b816118338160ff16600090815260016020526040902054151590565b61184f5760405162461bcd60e51b81526004016105f3906132e0565b611633838361229e565b60ff83166000908152600160205260408120805482919084908110611880576118806133ca565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b90930492909216908201529050610cba8185612682565b60ff811660009081526001602081905260408220805490916118f89161349e565b81548110611908576119086133ca565b600091825260209091200154600160401b90046001600160601b031692915050565b600061193784848461280d565b949350505050565b600082815260026020908152604080832060ff881684529091528120805482919084908110611970576119706133ca565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b909304929092169082015290506119c78186612682565b6040015195945050505050565b6040805160608082018352600080835260208084018290528385018290528682526002815284822060ff87168352815284822054855193840186528284529083018290529382015290919081611a2d579150610ca79050565b600085815260026020908152604080832060ff881684529091529020611a5460018461349e565b81548110611a6457611a646133ca565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b90930492909216908201529250610ca7915050565b600083815260026020908152604080832060ff861684529091528120611ae085858561280d565b63ffffffff1681548110611af657611af66133ca565b600091825260209091200154600160401b90046001600160601b0316949350505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b625760405162461bcd60e51b81526004016105f39061342c565b60ff831660009081526001602052604090205415611be05760405162461bcd60e51b815260206004820152603560248201527f5374616b6552656769737472792e696e697469616c697a6551756f72756d3a2060448201527471756f72756d20616c72656164792065786973747360581b60648201526084016105f3565b611bea838261229e565b611bf48383612235565b505060ff166000908152600160208181526040808420815160608101835263ffffffff438116825281850187815293820187815283549687018455928752939095209451949093018054915193516001600160601b0316600160401b02600160401b600160a01b0319948416600160201b0267ffffffffffffffff1990931695909316949094171791909116179055565b600080600080611ca48660ff1660009081526003602052604090205490565b604080518082019091526000808252602082015290915060005b82811015611e085760ff88166000908152600360205260409020805482908110611cea57611cea6133ca565b6000918252602080832060408051808201825293909101546001600160a01b03808216808652600160a01b9092046001600160601b031693850193909352905163778e55f360e01b81528b8316600482015260248101919091529194507f0000000000000000000000000000000000000000000000000000000000000000169063778e55f390604401602060405180830381865afa158015611d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db491906134cb565b90508015611df557670de0b6b3a764000083602001516001600160601b031682611dde91906134e4565b611de89190613503565b611df29086613525565b94505b5080611e0081613411565b915050611cbe565b50505060ff85166000908152602081905260409020549092506001600160601b03908116908316101590505b9250929050565b600083815260026020908152604080832060ff86168452909152812054819080611eff57600086815260026020908152604080832060ff891684528252808320815160608101835263ffffffff43811682528185018681526001600160601b03808c16958401958652845460018101865594885295909620915191909201805495519351909416600160401b02600160401b600160a01b0319938316600160201b0267ffffffffffffffff1990961691909216179390931716919091179055612061565b600086815260026020908152604080832060ff891684529091528120611f2660018461349e565b81548110611f3657611f366133ca565b600091825260209091200180546001600160601b03600160401b909104811694509091508516831415611f6f5760009350505050611397565b80544363ffffffff90811691161415611fa9578054600160401b600160a01b031916600160401b6001600160601b0387160217815561205f565b805467ffffffff000000001916600160201b4363ffffffff90811682810293909317845560008a815260026020908152604080832060ff8d168452825280832081516060810183529687528683018481526001600160601b038d81169389019384528254600181018455928652939094209651960180549351915196851667ffffffffffffffff1990941693909317931690930291909117600160401b600160a01b031916600160401b93909216929092021790555b505b6040805160ff871681526001600160601b038616602082015287917f2f527d527e95d8fe40aec55377743bb779087da3f6d0d08f12e36444da62327d910160405180910390a26120b18285612aab565b9695505050505050565b60ff8216600090815260016020819052604082208054918391906120df908461349e565b815481106120ef576120ef6133ca565b906000526020600020019050836000141561211e5754600160401b90046001600160601b03169150610ca79050565b805460009061213d90600160401b90046001600160601b031686612ac3565b82549091504363ffffffff9081169116141561217a578154600160401b600160a01b031916600160401b6001600160601b0383160217825561222c565b815463ffffffff438116600160201b81810267ffffffff000000001990941693909317855560ff8916600090815260016020818152604080842081516060810183529586528583018581526001600160601b03808b169388019384528254958601835591865292909420945194909201805491519251909316600160401b02600160401b600160a01b031992861690960267ffffffffffffffff19909116939094169290921792909217169190911790555b95945050505050565b60ff82166000818152602081815260409182902080546bffffffffffffffffffffffff19166001600160601b03861690811790915591519182527f26eecff2b70b0a71104ff4d940ba7162d23a95c248771fc487a7be17a596b3cf910160405180910390a25050565b60008151116123035760405162461bcd60e51b815260206004820152603860248201526000805160206135ed83398151915260448201527f3a206e6f20737472617465676965732070726f7669646564000000000000000060648201526084016105f3565b805160ff8316600090815260036020908152604090912054906123268383613550565b11156123965760405162461bcd60e51b815260206004820152604560248201526000805160206135ed83398151915260448201527f3a20657863656564204d41585f5745494748494e475f46554e4354494f4e5f4c60648201526408a9c8ea8960db1b608482015260a4016105f3565b60005b8281101561267b5760005b6123ae8284613550565b81101561248f578482815181106123c7576123c76133ca565b6020026020010151600001516001600160a01b0316600360008860ff1660ff1681526020019081526020016000208281548110612406576124066133ca565b6000918252602090912001546001600160a01b0316141561247d5760405162461bcd60e51b815260206004820152603d60248201526000805160206135ed83398151915260448201527f3a2063616e6e6f74206164642073616d6520737472617465677920327800000060648201526084016105f3565b8061248781613411565b9150506123a4565b5060008482815181106124a4576124a46133ca565b6020026020010151602001516001600160601b0316116125295760405162461bcd60e51b815260206004820152604660248201526000805160206135ed83398151915260448201527f3a2063616e6e6f74206164642073747261746567792077697468207a65726f206064820152651dd95a59da1d60d21b608482015260a4016105f3565b60ff85166000908152600360205260409020845185908390811061254f5761254f6133ca565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b0390911617910155835160ff8616907f10565e56cacbf32eca267945f054fec02e59750032d113d3302182ad967f5404908690849081106125cc576125cc6133ca565b602090810291909101810151516040516001600160a01b0390911681520160405180910390a28460ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a75858381518110612629576126296133ca565b602002602001015160000151868481518110612647576126476133ca565b602002602001015160200151604051612661929190612b4c565b60405180910390a28061267381613411565b915050612399565b5050505050565b816000015163ffffffff168163ffffffff16101561272e5760405162461bcd60e51b815260206004820152606060248201527f5374616b6552656769737472792e5f76616c69646174654f70657261746f725360448201527f74616b654174426c6f636b4e756d6265723a206f70657261746f725374616b6560648201527f5570646174652069732066726f6d20616674657220626c6f636b4e756d626572608482015260a4016105f3565b602082015163ffffffff1615806127545750816020015163ffffffff168163ffffffff16105b6128095760405162461bcd60e51b815260206004820152607460248201527f5374616b6552656769737472792e5f76616c69646174654f70657261746f725360448201527f74616b654174426c6f636b4e756d6265723a2074686572652069732061206e6560648201527f776572206f70657261746f725374616b6555706461746520617661696c61626c60848201527332903132b337b93290313637b1b5a73ab6b132b960611b60a482015260c4016105f3565b5050565b600083815260026020908152604080832060ff86168452909152812054815b818110156129e657600086815260026020908152604080832060ff89168452909152902063ffffffff8516906001612864848661349e565b61286e919061349e565b8154811061287e5761287e6133ca565b60009182526020909120015463ffffffff16116129d457600086815260026020908152604080832060ff89168452909152812060016128bd848661349e565b6128c7919061349e565b815481106128d7576128d76133ca565b600091825260209091200154600160201b900463ffffffff16905080158061290a57508463ffffffff168163ffffffff16115b6129b45760405162461bcd60e51b815260206004820152606960248201527f5374616b6552656769737472792e5f6765745374616b65557064617465496e6460448201527f6578466f724f70657261746f724174426c6f636b4e756d6265723a206f70657260648201527f61746f72496420686173206e6f207374616b652075706461746520617420626c60848201526837b1b5a73ab6b132b960b91b60a482015260c4016105f3565b60016129c0838561349e565b6129ca919061349e565b9350505050611397565b806129de81613411565b91505061282c565b5060405162461bcd60e51b815260206004820152608160248201527f5374616b6552656769737472792e5f6765745374616b65557064617465496e6460448201527f6578466f724f70657261746f724174426c6f636b4e756d6265723a206e6f207360648201527f74616b652075706461746520666f756e6420666f72206f70657261746f72496460848201527f20616e642071756f72756d4e756d62657220617420626c6f636b206e756d626560a4820152603960f91b60c482015260e4016105f3565b60006113976001600160601b03808516908416613568565b600080821215612ae757612ad6826135a7565b612ae090846135c4565b9050610ca7565b612ae08284613525565b803560ff81168114612b0257600080fd5b919050565b600060208284031215612b1957600080fd5b61139782612af1565b60008060408385031215612b3557600080fd5b612b3e83612af1565b946020939093013593505050565b6001600160a01b039290921682526001600160601b0316602082015260400190565b6001600160a01b0381168114612b8357600080fd5b50565b60008060408385031215612b9957600080fd5b612ba283612af1565b91506020830135612bb281612b6e565b809150509250929050565b60008083601f840112612bcf57600080fd5b5081356001600160401b03811115612be657600080fd5b6020830191508360208260051b8501011115611e3457600080fd5b600080600080600060608688031215612c1957600080fd5b612c2286612af1565b945060208601356001600160401b0380821115612c3e57600080fd5b612c4a89838a01612bbd565b90965094506040880135915080821115612c6357600080fd5b50612c7088828901612bbd565b969995985093965092949392505050565b60008083601f840112612c9357600080fd5b5081356001600160401b03811115612caa57600080fd5b602083019150836020828501011115611e3457600080fd5b60008060008060608587031215612cd857600080fd5b8435612ce381612b6e565b93506020850135925060408501356001600160401b03811115612d0557600080fd5b612d1187828801612c81565b95989497509550505050565b600081518084526020808501945080840160005b83811015612d565781516001600160601b031687529582019590820190600101612d31565b509495945050505050565b604081526000612d746040830185612d1d565b828103602084015261222c8185612d1d565b60008060408385031215612d9957600080fd5b82359150612da960208401612af1565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612e1e57612e0b83855163ffffffff808251168352806020830151166020840152506001600160601b0360408201511660408301525050565b9284019260609290920191600101612dce565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612e6257612e62612e2a565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612e9057612e90612e2a565b604052919050565b60006001600160401b03821115612eb157612eb1612e2a565b5060051b60200190565b60008060408385031215612ece57600080fd5b612ed783612af1565b91506020808401356001600160401b03811115612ef357600080fd5b8401601f81018613612f0457600080fd5b8035612f17612f1282612e98565b612e68565b81815260059190911b82018301908381019088831115612f3657600080fd5b928401925b82841015612f5457833582529284019290840190612f3b565b80955050505050509250929050565b803563ffffffff81168114612b0257600080fd5b600080600060408486031215612f8c57600080fd5b612f9584612f63565b925060208401356001600160401b03811115612fb057600080fd5b612fbc86828701612c81565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b81811015612e1e57835163ffffffff1683529284019291840191600101612fe5565b60008060006060848603121561301c57600080fd5b61302584612af1565b95602085013595506040909401359392505050565b815163ffffffff9081168252602080840151909116908201526040808301516001600160601b03169082015260608101610ca7565b80356001600160601b0381168114612b0257600080fd5b6000806040838503121561309957600080fd5b6130a283612af1565b9150612da96020840161306f565b6000806000604084860312156130c557600080fd5b8335925060208401356001600160401b03811115612fb057600080fd5b600082601f8301126130f357600080fd5b81356020613103612f1283612e98565b82815260069290921b8401810191818101908684111561312257600080fd5b8286015b84811015613171576040818903121561313f5760008081fd5b613147612e40565b813561315281612b6e565b815261315f82860161306f565b81860152835291830191604001613126565b509695505050505050565b6000806040838503121561318f57600080fd5b61319883612af1565b915060208301356001600160401b038111156131b357600080fd5b6131bf858286016130e2565b9150509250929050565b6000806000606084860312156131de57600080fd5b6131e784612af1565b92506131f560208501612f63565b9150604084013590509250925092565b60008060006060848603121561321a57600080fd5b8335925061322a60208501612af1565b915061323860408501612f63565b90509250925092565b6000806000806080858703121561325757600080fd5b61326085612af1565b935061326e60208601612f63565b93969395505050506040820135916060013590565b60008060006060848603121561329857600080fd5b6132a184612af1565b92506132af6020850161306f565b915060408401356001600160401b038111156132ca57600080fd5b6132d6868287016130e2565b9150509250925092565b60208082526031908201527f5374616b6552656769737472792e71756f72756d4578697374733a2071756f726040820152701d5b48191bd95cc81b9bdd08195e1a5cdd607a1b606082015260800190565b60006020828403121561334357600080fd5b815161139781612b6e565b60208082526056908201527f5374616b6552656769737472792e6f6e6c79436f6f7264696e61746f724f776e60408201527f65723a2063616c6c6572206973206e6f7420746865206f776e6572206f6620746060820152753432903932b3b4b9ba393ca1b7b7b93234b730ba37b960511b608082015260a00190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156133f257600080fd5b6113978261306f565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613425576134256133fb565b5060010190565b6020808252604c908201527f5374616b6552656769737472792e6f6e6c795265676973747279436f6f72646960408201527f6e61746f723a2063616c6c6572206973206e6f7420746865205265676973747260608201526b3ca1b7b7b93234b730ba37b960a11b608082015260a00190565b6000828210156134b0576134b06133fb565b500390565b634e487b7160e01b600052603160045260246000fd5b6000602082840312156134dd57600080fd5b5051919050565b60008160001904831182151516156134fe576134fe6133fb565b500290565b60008261352057634e487b7160e01b600052601260045260246000fd5b500490565b60006001600160601b03808316818516808303821115613547576135476133fb565b01949350505050565b60008219821115613563576135636133fb565b500190565b60008083128015600160ff1b850184121615613586576135866133fb565b6001600160ff1b03840183138116156135a1576135a16133fb565b50500390565b6000600160ff1b8214156135bd576135bd6133fb565b5060000390565b60006001600160601b03838116908316818110156135e4576135e46133fb565b03939250505056fe5374616b6552656769737472792e5f6164645374726174656779506172616d73a26469706673582212205e32ecef2c4234c218247eea65e7233b5babef90df9e758872dfeb68cd17e56164736f6c634300080c0033", + Bin: "0x60c06040523480156200001157600080fd5b50604051620037e2380380620037e2833981016040819052620000349162000065565b6001600160a01b0391821660a05216608052620000a4565b6001600160a01b03811681146200006257600080fd5b50565b600080604083850312156200007957600080fd5b825162000086816200004c565b602084015190925062000099816200004c565b809150509250929050565b60805160a0516136d9620001096000396000818161036f015281816106140152818161095101528181610cc80152818161101e015281816115d8015281816116da015281816117fe0152611bbc01526000818161050b0152611de001526136d96000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063ac6bfb0311610104578063c8294c56116100a2578063f2be94ae11610071578063f2be94ae1461052d578063f851e19814610540578063fa28c62714610553578063ff694a771461056657600080fd5b8063c8294c56146104b8578063d5eccc05146104cb578063dd9846b9146104de578063df5cf7231461050657600080fd5b8063bc9a40c3116100de578063bc9a40c314610456578063bd29b8cd14610469578063c46778a51461047c578063c601527d146104a557600080fd5b8063ac6bfb03146103e3578063adc804da14610403578063b6904b781461044357600080fd5b80634bd26e091161017c57806366acfefe1161014b57806366acfefe1461033f5780636d14a9871461036a5780637c172347146103a957806381c07502146103c357600080fd5b80634bd26e09146102da5780635401ed271461030a5780635e5a67751461031d5780635f1f2d771461032c57600080fd5b806320b66298116101b857806320b662981461026157806325504777146102765780632cd95940146102975780633ca5a5f5146102b757600080fd5b80630491b41c146101df57806308732461146102155780631f9b74e014610236575b600080fd5b6102026101ed366004612b9e565b60ff1660009081526001602052604090205490565b6040519081526020015b60405180910390f35b610228610223366004612bb9565b610579565b60405161020c929190612be3565b610249610244366004612c1d565b6105c2565b6040516001600160601b03909116815260200161020c565b61027461026f366004612c98565b610612565b005b610289610284366004612d59565b610943565b60405161020c929190612df8565b6102aa6102a5366004612e1d565b610c0e565b60405161020c9190612e49565b6102026102c5366004612b9e565b60ff1660009081526003602052604090205490565b6102026102e8366004612e1d565b600091825260026020908152604080842060ff93909316845291905290205490565b610249610318366004612e1d565b610cad565b610202670de0b6b3a764000081565b61027461033a366004612f52565b610cc6565b61035261034d366004612d59565b611011565b6040516001600160c01b03909116815260200161020c565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020c565b6103b1602081565b60405160ff909116815260200161020c565b6103d66103d136600461300e565b61116b565b60405161020c9190613060565b6103f66103f136600461309e565b611435565b60405161020c91906130d1565b610416610411366004612bb9565b6114cd565b6040805182516001600160a01b031681526020928301516001600160601b0316928101929092520161020c565b6103f6610451366004612bb9565b611547565b61027461046436600461311d565b6115d6565b610274610477366004613147565b6116cf565b61024961048a366004612b9e565b6000602081905290815260409020546001600160601b031681565b6102746104b3366004613213565b6117fc565b6102496104c6366004613260565b6118f0565b6102496104d9366004612b9e565b61196e565b6104f16104ec36600461329c565b6119c1565b60405163ffffffff909116815260200161020c565b6103917f000000000000000000000000000000000000000000000000000000000000000081565b61024961053b3660046132d8565b6119d6565b6103f661054e366004612e1d565b611a6b565b61024961056136600461329c565b611b50565b61027461057436600461331a565b611bb1565b6003602052816000526040600020818154811061059557600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b60ff821660009081526001602052604081205483906105fc5760405162461bcd60e51b81526004016105f390613377565b60405180910390fd5b60006106088585611d1c565b5095945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610670573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069491906133c8565b6001600160a01b0316336001600160a01b0316146106c45760405162461bcd60e51b81526004016105f3906133e5565b846106e08160ff16600090815260016020526040902054151590565b6106fc5760405162461bcd60e51b81526004016105f390613377565b8380610772576040805162461bcd60e51b81526020600482015260248101919091527f5374616b6552656769737472792e6d6f6469667953747261746567795061726160448201527f6d733a206e6f20737472617465677920696e64696365732070726f766964656460648201526084016105f3565b8281146107e75760405162461bcd60e51b815260206004820152603960248201527f5374616b6552656769737472792e6d6f6469667953747261746567795061726160448201527f6d733a20696e707574206c656e677468206d69736d617463680000000000000060648201526084016105f3565b60ff87166000908152600360205260408120905b828110156109385785858281811061081557610815613461565b905060200201602081019061082a9190613477565b8289898481811061083d5761083d613461565b905060200201358154811061085457610854613461565b9060005260206000200160000160146101000a8154816001600160601b0302191690836001600160601b031602179055508860ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a75838a8a858181106108bd576108bd613461565b90506020020135815481106108d4576108d4613461565b6000918252602090912001546001600160a01b03168888858181106108fb576108fb613461565b90506020020160208101906109109190613477565b60405161091e929190612be3565b60405180910390a280610930816134a8565b9150506107fb565b505050505050505050565b606080336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461098e5760405162461bcd60e51b81526004016105f3906134c3565b6000836001600160401b038111156109a8576109a8612ec1565b6040519080825280602002602001820160405280156109d1578160200160208202803683370190505b5090506000846001600160401b038111156109ee576109ee612ec1565b604051908082528060200260200182016040528015610a17578160200160208202803683370190505b50905060005b85811015610c00576000878783818110610a3957610a39613461565b919091013560f81c60008181526001602052604090205490925015159050610ac15760405162461bcd60e51b815260206004820152603560248201527f5374616b6552656769737472792e72656769737465724f70657261746f723a206044820152741c5d5bdc9d5b48191bd95cc81b9bdd08195e1a5cdd605a1b60648201526084016105f3565b600080610ace838d611d1c565b9150915080610b6b5760405162461bcd60e51b815260206004820152605b60248201527f5374616b6552656769737472792e72656769737465724f70657261746f723a2060448201527f4f70657261746f7220646f6573206e6f74206d656574206d696e696d756d207360648201527f74616b6520726571756972656d656e7420666f722071756f72756d0000000000608482015260a4016105f3565b6000610b788c8585611ed2565b905082878681518110610b8d57610b8d613461565b60200260200101906001600160601b031690816001600160601b031681525050610bb78482612152565b868681518110610bc957610bc9613461565b60200260200101906001600160601b031690816001600160601b031681525050505050508080610bf8906134a8565b915050610a1d565b509097909650945050505050565b600082815260026020908152604080832060ff851684528252808320805482518185028101850190935280835260609492939192909184015b82821015610ca0576000848152602090819020604080516060810182529185015463ffffffff8082168452600160201b82041683850152600160401b90046001600160601b031690820152825260019092019101610c47565b5050505090505b92915050565b600080610cba8484611a6b565b60400151949350505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4891906133c8565b6001600160a01b0316336001600160a01b031614610d785760405162461bcd60e51b81526004016105f3906133e5565b81610d948160ff16600090815260016020526040902054151590565b610db05760405162461bcd60e51b81526004016105f390613377565b815180610e255760405162461bcd60e51b815260206004820152603d60248201527f5374616b6552656769737472792e72656d6f7665537472617465676965733a2060448201527f6e6f20696e646963657320746f2072656d6f76652070726f766964656400000060648201526084016105f3565b60ff84166000908152600360205260408120905b82811015611009578560ff167f31fa2e2cd280c9375e13ffcf3d81e2378100186e4058f8d3ddb690b82dcd31f783878481518110610e7957610e79613461565b602002602001015181548110610e9157610e91613461565b600091825260209182902001546040516001600160a01b0390911681520160405180910390a28560ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a7583878481518110610eef57610eef613461565b602002602001015181548110610f0757610f07613461565b600091825260208083209190910154604080516001600160a01b039092168252918101929092520160405180910390a281548290610f4790600190613535565b81548110610f5757610f57613461565b9060005260206000200182868381518110610f7457610f74613461565b602002602001015181548110610f8c57610f8c613461565b600091825260209091208254910180546001600160a01b0319166001600160a01b03909216918217815591546001600160601b03600160a01b9182900416021790558154829080610fdf57610fdf61354c565b60008281526020812082016000199081019190915501905580611001816134a8565b915050610e39565b505050505050565b6000336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461105b5760405162461bcd60e51b81526004016105f3906134c3565b6000805b8381101561060857600085858381811061107b5761107b613461565b919091013560f81c6000818152600160205260409020549092501515905061110b5760405162461bcd60e51b815260206004820152603860248201527f5374616b6552656769737472792e7570646174654f70657261746f725374616b60448201527f653a2071756f72756d20646f6573206e6f74206578697374000000000000000060648201526084016105f3565b600080611118838b611d1c565b915091508061113a5760009150600160ff84161b6001600160c01b0386161794505b60006111478a8585611ed2565b90506111538482612152565b50505050508080611163906134a8565b91505061105f565b60606000826001600160401b0381111561118757611187612ec1565b6040519080825280602002602001820160405280156111b0578160200160208202803683370190505b50905060005b8381101561142a5760008585838181106111d2576111d2613461565b919091013560f81c600081815260016020526040902054909250151590506112715760405162461bcd60e51b815260206004820152604660248201527f5374616b6552656769737472792e676574546f74616c5374616b65496e64696360448201527f65734174426c6f636b4e756d6265723a2071756f72756d20646f6573206e6f7460648201526508195e1a5cdd60d21b608482015260a4016105f3565b60ff81166000908152600160205260408120805463ffffffff8a16929061129a5761129a613461565b60009182526020909120015463ffffffff1611156113465760405162461bcd60e51b815260206004820152605b60248201527f5374616b6552656769737472792e676574546f74616c5374616b65496e64696360448201527f65734174426c6f636b4e756d6265723a2071756f72756d20686173206e6f207360648201527f74616b6520686973746f727920617420626c6f636b4e756d6265720000000000608482015260a4016105f3565b60ff8116600090815260016020526040812054905b818110156114145760ff8316600090815260016020819052604090912063ffffffff8b169161138a8486613535565b6113949190613535565b815481106113a4576113a4613461565b60009182526020909120015463ffffffff16116114025760016113c78284613535565b6113d19190613535565b8585815181106113e3576113e3613461565b602002602001019063ffffffff16908163ffffffff1681525050611414565b8061140c816134a8565b91505061135b565b5050508080611422906134a8565b9150506111b6565b5090505b9392505050565b60408051606081018252600080825260208083018290528284018290528582526002815283822060ff8816835290529190912080548390811061147a5761147a613461565b600091825260209182902060408051606081018252929091015463ffffffff8082168452600160201b82041693830193909352600160401b9092046001600160601b031691810191909152949350505050565b604080518082019091526000808252602082015260ff8316600090815260036020526040902080548390811061150557611505613461565b6000918252602091829020604080518082019091529101546001600160a01b0381168252600160a01b90046001600160601b0316918101919091529392505050565b604080516060810182526000808252602080830182905282840182905260ff86168252600190529190912080548390811061158457611584613461565b600091825260209182902060408051606081018252929091015463ffffffff8082168452600160201b82041693830193909352600160401b9092046001600160601b0316918101919091529392505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611634573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165891906133c8565b6001600160a01b0316336001600160a01b0316146116885760405162461bcd60e51b81526004016105f3906133e5565b816116a48160ff16600090815260016020526040902054151590565b6116c05760405162461bcd60e51b81526004016105f390613377565b6116ca83836122cc565b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117175760405162461bcd60e51b81526004016105f3906134c3565b60005b818110156117f657600083838381811061173657611736613461565b919091013560f81c600081815260016020526040902054909250151590506117c65760405162461bcd60e51b815260206004820152603760248201527f5374616b6552656769737472792e646572656769737465724f70657261746f7260448201527f3a2071756f72756d20646f6573206e6f7420657869737400000000000000000060648201526084016105f3565b60006117d486836000611ed2565b90506117e08282612152565b50505080806117ee906134a8565b91505061171a565b50505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e91906133c8565b6001600160a01b0316336001600160a01b0316146118ae5760405162461bcd60e51b81526004016105f3906133e5565b816118ca8160ff16600090815260016020526040902054151590565b6118e65760405162461bcd60e51b81526004016105f390613377565b6116ca8383612335565b60ff8316600090815260016020526040812080548291908490811061191757611917613461565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b90930492909216908201529050610cba8185612719565b60ff8116600090815260016020819052604082208054909161198f91613535565b8154811061199f5761199f613461565b600091825260209091200154600160401b90046001600160601b031692915050565b60006119ce8484846128a4565b949350505050565b600082815260026020908152604080832060ff881684529091528120805482919084908110611a0757611a07613461565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b90930492909216908201529050611a5e8186612719565b6040015195945050505050565b6040805160608082018352600080835260208084018290528385018290528682526002815284822060ff87168352815284822054855193840186528284529083018290529382015290919081611ac4579150610ca79050565b600085815260026020908152604080832060ff881684529091529020611aeb600184613535565b81548110611afb57611afb613461565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b90930492909216908201529250610ca7915050565b600083815260026020908152604080832060ff861684529091528120611b778585856128a4565b63ffffffff1681548110611b8d57611b8d613461565b600091825260209091200154600160401b90046001600160601b0316949350505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611bf95760405162461bcd60e51b81526004016105f3906134c3565b60ff831660009081526001602052604090205415611c775760405162461bcd60e51b815260206004820152603560248201527f5374616b6552656769737472792e696e697469616c697a6551756f72756d3a2060448201527471756f72756d20616c72656164792065786973747360581b60648201526084016105f3565b611c818382612335565b611c8b83836122cc565b505060ff166000908152600160208181526040808420815160608101835263ffffffff438116825281850187815293820187815283549687018455928752939095209451949093018054915193516001600160601b0316600160401b02600160401b600160a01b0319948416600160201b0267ffffffffffffffff1990931695909316949094171791909116179055565b600080600080611d3b8660ff1660009081526003602052604090205490565b604080518082019091526000808252602082015290915060005b82811015611e9f5760ff88166000908152600360205260409020805482908110611d8157611d81613461565b6000918252602080832060408051808201825293909101546001600160a01b03808216808652600160a01b9092046001600160601b031693850193909352905163778e55f360e01b81528b8316600482015260248101919091529194507f0000000000000000000000000000000000000000000000000000000000000000169063778e55f390604401602060405180830381865afa158015611e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4b9190613562565b90508015611e8c57670de0b6b3a764000083602001516001600160601b031682611e75919061357b565b611e7f919061359a565b611e8990866135bc565b94505b5080611e97816134a8565b915050611d55565b50505060ff85166000908152602081905260409020549092506001600160601b03908116908316101590505b9250929050565b600083815260026020908152604080832060ff86168452909152812054819080611f9657600086815260026020908152604080832060ff891684528252808320815160608101835263ffffffff43811682528185018681526001600160601b03808c16958401958652845460018101865594885295909620915191909201805495519351909416600160401b02600160401b600160a01b0319938316600160201b0267ffffffffffffffff19909616919092161793909317169190911790556120f8565b600086815260026020908152604080832060ff891684529091528120611fbd600184613535565b81548110611fcd57611fcd613461565b600091825260209091200180546001600160601b03600160401b909104811694509091508516831415612006576000935050505061142e565b80544363ffffffff90811691161415612040578054600160401b600160a01b031916600160401b6001600160601b038716021781556120f6565b805467ffffffff000000001916600160201b4363ffffffff90811682810293909317845560008a815260026020908152604080832060ff8d168452825280832081516060810183529687528683018481526001600160601b038d81169389019384528254600181018455928652939094209651960180549351915196851667ffffffffffffffff1990941693909317931690930291909117600160401b600160a01b031916600160401b93909216929092021790555b505b6040805160ff871681526001600160601b038616602082015287917f2f527d527e95d8fe40aec55377743bb779087da3f6d0d08f12e36444da62327d910160405180910390a26121488285612b42565b9695505050505050565b60ff8216600090815260016020819052604082208054918391906121769084613535565b8154811061218657612186613461565b90600052602060002001905083600014156121b55754600160401b90046001600160601b03169150610ca79050565b80546000906121d490600160401b90046001600160601b031686612b5a565b82549091504363ffffffff90811691161415612211578154600160401b600160a01b031916600160401b6001600160601b038316021782556122c3565b815463ffffffff438116600160201b81810267ffffffff000000001990941693909317855560ff8916600090815260016020818152604080842081516060810183529586528583018581526001600160601b03808b169388019384528254958601835591865292909420945194909201805491519251909316600160401b02600160401b600160a01b031992861690960267ffffffffffffffff19909116939094169290921792909217169190911790555b95945050505050565b60ff82166000818152602081815260409182902080546bffffffffffffffffffffffff19166001600160601b03861690811790915591519182527f26eecff2b70b0a71104ff4d940ba7162d23a95c248771fc487a7be17a596b3cf910160405180910390a25050565b600081511161239a5760405162461bcd60e51b8152602060048201526038602482015260008051602061368483398151915260448201527f3a206e6f20737472617465676965732070726f7669646564000000000000000060648201526084016105f3565b805160ff8316600090815260036020908152604090912054906123bd83836135e7565b111561242d5760405162461bcd60e51b8152602060048201526045602482015260008051602061368483398151915260448201527f3a20657863656564204d41585f5745494748494e475f46554e4354494f4e5f4c60648201526408a9c8ea8960db1b608482015260a4016105f3565b60005b828110156127125760005b61244582846135e7565b8110156125265784828151811061245e5761245e613461565b6020026020010151600001516001600160a01b0316600360008860ff1660ff168152602001908152602001600020828154811061249d5761249d613461565b6000918252602090912001546001600160a01b031614156125145760405162461bcd60e51b815260206004820152603d602482015260008051602061368483398151915260448201527f3a2063616e6e6f74206164642073616d6520737472617465677920327800000060648201526084016105f3565b8061251e816134a8565b91505061243b565b50600084828151811061253b5761253b613461565b6020026020010151602001516001600160601b0316116125c05760405162461bcd60e51b8152602060048201526046602482015260008051602061368483398151915260448201527f3a2063616e6e6f74206164642073747261746567792077697468207a65726f206064820152651dd95a59da1d60d21b608482015260a4016105f3565b60ff8516600090815260036020526040902084518590839081106125e6576125e6613461565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b0390911617910155835160ff8616907f10565e56cacbf32eca267945f054fec02e59750032d113d3302182ad967f54049086908490811061266357612663613461565b602090810291909101810151516040516001600160a01b0390911681520160405180910390a28460ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a758583815181106126c0576126c0613461565b6020026020010151600001518684815181106126de576126de613461565b6020026020010151602001516040516126f8929190612be3565b60405180910390a28061270a816134a8565b915050612430565b5050505050565b816000015163ffffffff168163ffffffff1610156127c55760405162461bcd60e51b815260206004820152606060248201527f5374616b6552656769737472792e5f76616c69646174654f70657261746f725360448201527f74616b654174426c6f636b4e756d6265723a206f70657261746f725374616b6560648201527f5570646174652069732066726f6d20616674657220626c6f636b4e756d626572608482015260a4016105f3565b602082015163ffffffff1615806127eb5750816020015163ffffffff168163ffffffff16105b6128a05760405162461bcd60e51b815260206004820152607460248201527f5374616b6552656769737472792e5f76616c69646174654f70657261746f725360448201527f74616b654174426c6f636b4e756d6265723a2074686572652069732061206e6560648201527f776572206f70657261746f725374616b6555706461746520617661696c61626c60848201527332903132b337b93290313637b1b5a73ab6b132b960611b60a482015260c4016105f3565b5050565b600083815260026020908152604080832060ff86168452909152812054815b81811015612a7d57600086815260026020908152604080832060ff89168452909152902063ffffffff85169060016128fb8486613535565b6129059190613535565b8154811061291557612915613461565b60009182526020909120015463ffffffff1611612a6b57600086815260026020908152604080832060ff89168452909152812060016129548486613535565b61295e9190613535565b8154811061296e5761296e613461565b600091825260209091200154600160201b900463ffffffff1690508015806129a157508463ffffffff168163ffffffff16115b612a4b5760405162461bcd60e51b815260206004820152606960248201527f5374616b6552656769737472792e5f6765745374616b65557064617465496e6460448201527f6578466f724f70657261746f724174426c6f636b4e756d6265723a206f70657260648201527f61746f72496420686173206e6f207374616b652075706461746520617420626c60848201526837b1b5a73ab6b132b960b91b60a482015260c4016105f3565b6001612a578385613535565b612a619190613535565b935050505061142e565b80612a75816134a8565b9150506128c3565b5060405162461bcd60e51b815260206004820152608160248201527f5374616b6552656769737472792e5f6765745374616b65557064617465496e6460448201527f6578466f724f70657261746f724174426c6f636b4e756d6265723a206e6f207360648201527f74616b652075706461746520666f756e6420666f72206f70657261746f72496460848201527f20616e642071756f72756d4e756d62657220617420626c6f636b206e756d626560a4820152603960f91b60c482015260e4016105f3565b600061142e6001600160601b038085169084166135ff565b600080821215612b7e57612b6d8261363e565b612b77908461365b565b9050610ca7565b612b7782846135bc565b803560ff81168114612b9957600080fd5b919050565b600060208284031215612bb057600080fd5b61142e82612b88565b60008060408385031215612bcc57600080fd5b612bd583612b88565b946020939093013593505050565b6001600160a01b039290921682526001600160601b0316602082015260400190565b6001600160a01b0381168114612c1a57600080fd5b50565b60008060408385031215612c3057600080fd5b612c3983612b88565b91506020830135612c4981612c05565b809150509250929050565b60008083601f840112612c6657600080fd5b5081356001600160401b03811115612c7d57600080fd5b6020830191508360208260051b8501011115611ecb57600080fd5b600080600080600060608688031215612cb057600080fd5b612cb986612b88565b945060208601356001600160401b0380821115612cd557600080fd5b612ce189838a01612c54565b90965094506040880135915080821115612cfa57600080fd5b50612d0788828901612c54565b969995985093965092949392505050565b60008083601f840112612d2a57600080fd5b5081356001600160401b03811115612d4157600080fd5b602083019150836020828501011115611ecb57600080fd5b60008060008060608587031215612d6f57600080fd5b8435612d7a81612c05565b93506020850135925060408501356001600160401b03811115612d9c57600080fd5b612da887828801612d18565b95989497509550505050565b600081518084526020808501945080840160005b83811015612ded5781516001600160601b031687529582019590820190600101612dc8565b509495945050505050565b604081526000612e0b6040830185612db4565b82810360208401526122c38185612db4565b60008060408385031215612e3057600080fd5b82359150612e4060208401612b88565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612eb557612ea283855163ffffffff808251168352806020830151166020840152506001600160601b0360408201511660408301525050565b9284019260609290920191600101612e65565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612ef957612ef9612ec1565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612f2757612f27612ec1565b604052919050565b60006001600160401b03821115612f4857612f48612ec1565b5060051b60200190565b60008060408385031215612f6557600080fd5b612f6e83612b88565b91506020808401356001600160401b03811115612f8a57600080fd5b8401601f81018613612f9b57600080fd5b8035612fae612fa982612f2f565b612eff565b81815260059190911b82018301908381019088831115612fcd57600080fd5b928401925b82841015612feb57833582529284019290840190612fd2565b80955050505050509250929050565b803563ffffffff81168114612b9957600080fd5b60008060006040848603121561302357600080fd5b61302c84612ffa565b925060208401356001600160401b0381111561304757600080fd5b61305386828701612d18565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b81811015612eb557835163ffffffff168352928401929184019160010161307c565b6000806000606084860312156130b357600080fd5b6130bc84612b88565b95602085013595506040909401359392505050565b815163ffffffff9081168252602080840151909116908201526040808301516001600160601b03169082015260608101610ca7565b80356001600160601b0381168114612b9957600080fd5b6000806040838503121561313057600080fd5b61313983612b88565b9150612e4060208401613106565b60008060006040848603121561315c57600080fd5b8335925060208401356001600160401b0381111561304757600080fd5b600082601f83011261318a57600080fd5b8135602061319a612fa983612f2f565b82815260069290921b840181019181810190868411156131b957600080fd5b8286015b8481101561320857604081890312156131d65760008081fd5b6131de612ed7565b81356131e981612c05565b81526131f6828601613106565b818601528352918301916040016131bd565b509695505050505050565b6000806040838503121561322657600080fd5b61322f83612b88565b915060208301356001600160401b0381111561324a57600080fd5b61325685828601613179565b9150509250929050565b60008060006060848603121561327557600080fd5b61327e84612b88565b925061328c60208501612ffa565b9150604084013590509250925092565b6000806000606084860312156132b157600080fd5b833592506132c160208501612b88565b91506132cf60408501612ffa565b90509250925092565b600080600080608085870312156132ee57600080fd5b6132f785612b88565b935061330560208601612ffa565b93969395505050506040820135916060013590565b60008060006060848603121561332f57600080fd5b61333884612b88565b925061334660208501613106565b915060408401356001600160401b0381111561336157600080fd5b61336d86828701613179565b9150509250925092565b60208082526031908201527f5374616b6552656769737472792e71756f72756d4578697374733a2071756f726040820152701d5b48191bd95cc81b9bdd08195e1a5cdd607a1b606082015260800190565b6000602082840312156133da57600080fd5b815161142e81612c05565b60208082526056908201527f5374616b6552656769737472792e6f6e6c79436f6f7264696e61746f724f776e60408201527f65723a2063616c6c6572206973206e6f7420746865206f776e6572206f6620746060820152753432903932b3b4b9ba393ca1b7b7b93234b730ba37b960511b608082015260a00190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561348957600080fd5b61142e82613106565b634e487b7160e01b600052601160045260246000fd5b60006000198214156134bc576134bc613492565b5060010190565b6020808252604c908201527f5374616b6552656769737472792e6f6e6c795265676973747279436f6f72646960408201527f6e61746f723a2063616c6c6572206973206e6f7420746865205265676973747260608201526b3ca1b7b7b93234b730ba37b960a11b608082015260a00190565b60008282101561354757613547613492565b500390565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561357457600080fd5b5051919050565b600081600019048311821515161561359557613595613492565b500290565b6000826135b757634e487b7160e01b600052601260045260246000fd5b500490565b60006001600160601b038083168185168083038211156135de576135de613492565b01949350505050565b600082198211156135fa576135fa613492565b500190565b60008083128015600160ff1b85018412161561361d5761361d613492565b6001600160ff1b038401831381161561363857613638613492565b50500390565b6000600160ff1b82141561365457613654613492565b5060000390565b60006001600160601b038381169083168181101561367b5761367b613492565b03939250505056fe5374616b6552656769737472792e5f6164645374726174656779506172616d73a2646970667358221220ad3a98bd398d2fc1f99e35547741f7c039fa33199aced5b76fbb9f932344de5f64736f6c634300080c0033", } // ContractStakeRegistryABI is the input ABI used to generate the binding from. diff --git a/contracts/generate-bindings.sh b/contracts/generate-bindings.sh index 6638af8e6..edd46c151 100755 --- a/contracts/generate-bindings.sh +++ b/contracts/generate-bindings.sh @@ -37,8 +37,12 @@ cd $EIGENLAYER_MIDDLEWARE_PATH forge build # No idea why but ordering of the contracts matters here... when I move them around sometimes bindings fail -avs_contracts="RegistryCoordinator OperatorStateRetriever StakeRegistry BLSApkRegistry IBLSSignatureChecker ServiceManagerBase" -for contract in $avs_contracts; do +avs_bls_contracts="RegistryCoordinator OperatorStateRetriever StakeRegistry BLSApkRegistry IBLSSignatureChecker ServiceManagerBase" +for contract in $avs_bls_contracts; do + create_binding . $contract ../../bindings +done +avs_ecdsa_contracts="ECDSASignatureChecker ECDSAOperatorStateRetriever" +for contract in $avs_ecdsa_contracts; do create_binding . $contract ../../bindings done diff --git a/contracts/lib/eigenlayer-middleware b/contracts/lib/eigenlayer-middleware index 6761d2471..c4ae2f881 160000 --- a/contracts/lib/eigenlayer-middleware +++ b/contracts/lib/eigenlayer-middleware @@ -1 +1 @@ -Subproject commit 6761d2471a5749be1f4df8dc7521b3227fe14dec +Subproject commit c4ae2f881af6fb5a718509a9f53490a035798169 diff --git a/crypto/ecdsa/ecdsa.go b/crypto/ecdsa/ecdsa.go new file mode 100644 index 000000000..a5d6b29ac --- /dev/null +++ b/crypto/ecdsa/ecdsa.go @@ -0,0 +1,38 @@ +package ecdsa + +import ( + "crypto/ecdsa" + + "github.com/Layr-Labs/eigensdk-go/types" + "github.com/ethereum/go-ethereum/crypto" +) + +// SignMsg is a wrapper around geth's crypto.Sign function which adds 27 to the v value +// see https://github.com/ethereum/go-ethereum/issues/28757#issuecomment-1874525854 +// and https://twitter.com/pcaversaccio/status/1671488928262529031 +// Currently all of our contracts expect the v value to be 27 or 28, which is why we add it here. +// VerifySignature below thus subtracts 27 from the v value before verifying the signature. +// TODO(samlaf): if and when we figure out some avs contracts use the 0/1 v scheme, or the eip-155 scheme, +// then we should generalize this function to sign based on a scheme passed as argument. +func SignMsg(msg []byte, privateKey *ecdsa.PrivateKey) ([]byte, error) { + sig, err := crypto.Sign(msg, privateKey) + if err != nil { + return nil, err + } + // TODO(samlaf): if and when we figure out some avs contracts use the 0/1 v scheme, or the eip-155 scheme, + // then we should generalize this function to sign based on a scheme passed as argument. + sig[64] += 27 + return sig, nil +} + +// VerifySignature is a wrapper around geth's crypto.SigToPub function which subtracts 27 from the v value +// before verifying the signature. See the SignMsg function above for more details. +func VerifySignature(msgHash []byte, sig []byte, operatorId types.EcdsaOperatorId) (bool, error) { + sig[64] -= 27 + recoveredPubKey, err := crypto.SigToPub(msgHash, sig) + if err != nil { + return true, err + } + return crypto.PubkeyToAddress(*recoveredPubKey) == operatorId, nil + +} diff --git a/metrics/collectors/economic/economic.go b/metrics/collectors/economic/economic.go index 5d8b76259..005049e3f 100644 --- a/metrics/collectors/economic/economic.go +++ b/metrics/collectors/economic/economic.go @@ -5,7 +5,7 @@ import ( "errors" "strconv" - "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls" "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" "github.com/Layr-Labs/eigensdk-go/logging" "github.com/Layr-Labs/eigensdk-go/types" @@ -25,11 +25,11 @@ import ( type Collector struct { // TODO(samlaf): we use a chain as the backend for now, but should eventually move to a subgraph elReader elcontracts.ELReader - avsRegistryReader avsregistry.AvsRegistryReader + avsRegistryReader avsblsregistry.AvsRegistryReader logger logging.Logger // params to query the metrics for operatorAddr common.Address - operatorId types.OperatorId + operatorId types.BlsOperatorId quorumNames map[types.QuorumNum]string // metrics // TODO(samlaf): I feel like eigenlayer-core metrics like slashingStatus and delegatedShares, which are not avs specific, @@ -61,7 +61,7 @@ type Collector struct { var _ prometheus.Collector = (*Collector)(nil) func NewCollector( - elReader elcontracts.ELReader, avsRegistryReader avsregistry.AvsRegistryReader, + elReader elcontracts.ELReader, avsRegistryReader avsblsregistry.AvsRegistryReader, avsName string, logger logging.Logger, operatorAddr common.Address, quorumNames map[types.QuorumNum]string, ) *Collector { diff --git a/metrics/collectors/economic/economic_test.go b/metrics/collectors/economic/economic_test.go index ac095b85b..10bd5ec9a 100644 --- a/metrics/collectors/economic/economic_test.go +++ b/metrics/collectors/economic/economic_test.go @@ -16,7 +16,7 @@ import ( func TestEconomicCollector(t *testing.T) { operatorAddr := common.HexToAddress("0x0") - operatorId := types.OperatorId{1} + operatorId := types.BlsOperatorId{1} quorumNames := map[types.QuorumNum]string{ 0: "ethQuorum", 1: "someOtherTokenQuorum", diff --git a/services/README.md b/services/README.md index 6d272ebc6..1274faf02 100644 --- a/services/README.md +++ b/services/README.md @@ -2,7 +2,7 @@ eigensdk services are high level APIs that provide backend like functionality for avs nodes and aggregators processes. We provide the following suite of services as soon as possible: -- [operator pubkeys service](./operatorpubkeys/) +- [operator pubkeys service](./bls/operatorpubkeys/) - this service simply indexes the [NewPubkeyRegistration](https://github.com/Layr-Labs/eigenlayer-middleware/blob/9aa6eb543fe38db6e41516f89f15b654ad4d6bf4/src/interfaces/IBLSApkRegistry.sol#L38) events and provides a single endpoint to query for the registered G1 and G2 pubkeys of a given operator address. - this service is needed for aggregators to get the pubkey of their registered operators so as to verify their signatures - Registry service diff --git a/services/bls_aggregation/blsagg.go b/services/bls/aggregation/blsagg.go similarity index 95% rename from services/bls_aggregation/blsagg.go rename to services/bls/aggregation/blsagg.go index 54503b564..a70a37db7 100644 --- a/services/bls_aggregation/blsagg.go +++ b/services/bls/aggregation/blsagg.go @@ -10,7 +10,7 @@ import ( "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" - "github.com/Layr-Labs/eigensdk-go/services/avsregistry" + "github.com/Layr-Labs/eigensdk-go/services/bls/avsregistry" "github.com/Layr-Labs/eigensdk-go/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" ) @@ -23,7 +23,7 @@ var ( TaskNotFoundErrorFn = func(taskIndex types.TaskIndex) error { return fmt.Errorf("task %d not initialized or already completed", taskIndex) } - OperatorNotPartOfTaskQuorumErrorFn = func(operatorId types.OperatorId, taskIndex types.TaskIndex) error { + OperatorNotPartOfTaskQuorumErrorFn = func(operatorId types.BlsOperatorId, taskIndex types.TaskIndex) error { return fmt.Errorf("operator %x not part of task %d's quorum", operatorId, taskIndex) } SignatureVerificationError = func(err error) error { @@ -58,7 +58,7 @@ type aggregatedOperators struct { // aggregate stake of all operators who signed on this header for each quorum signersTotalStakePerQuorum map[types.QuorumNum]*big.Int // set of OperatorId of operators who signed on this header - signersOperatorIdsSet map[types.OperatorId]bool + signersOperatorIdsSet map[types.BlsOperatorId]bool } // BlsAggregationService is the interface provided to avs aggregator code for doing bls aggregation @@ -114,7 +114,7 @@ type BlsAggregatorService struct { aggregatedResponsesC chan BlsAggregationServiceResponse // signedTaskRespsCs are the channels to send the signed task responses to the goroutines processing them // each new task is assigned a new goroutine and a new channel - signedTaskRespsCs map[types.TaskIndex]chan types.SignedTaskResponseDigest + signedTaskRespsCs map[types.TaskIndex]chan types.SignedBlsTaskResponseDigest // we add chans to taskChans from the main thread (InitializeNewTask) when we create new tasks, // we read them in ProcessNewSignature from the main thread when we receive new signed tasks, // and remove them from its respective goroutine when the task is completed or reached timeout @@ -129,7 +129,7 @@ var _ BlsAggregationService = (*BlsAggregatorService)(nil) func NewBlsAggregatorService(avsRegistryService avsregistry.AvsRegistryService, logger logging.Logger) *BlsAggregatorService { return &BlsAggregatorService{ aggregatedResponsesC: make(chan BlsAggregationServiceResponse), - signedTaskRespsCs: make(map[types.TaskIndex]chan types.SignedTaskResponseDigest), + signedTaskRespsCs: make(map[types.TaskIndex]chan types.SignedBlsTaskResponseDigest), taskChansMutex: sync.RWMutex{}, avsRegistryService: avsRegistryService, logger: logger, @@ -155,7 +155,7 @@ func (a *BlsAggregatorService) InitializeNewTask( if _, taskExists := a.signedTaskRespsCs[taskIndex]; taskExists { return TaskAlreadyInitializedErrorFn(taskIndex) } - signedTaskRespsC := make(chan types.SignedTaskResponseDigest) + signedTaskRespsC := make(chan types.SignedBlsTaskResponseDigest) a.taskChansMutex.Lock() a.signedTaskRespsCs[taskIndex] = signedTaskRespsC a.taskChansMutex.Unlock() @@ -182,7 +182,7 @@ func (a *BlsAggregatorService) ProcessNewSignature( select { // we need to send this as part of select because if the goroutine is processing another SignedTaskResponseDigest // and cannot receive this one, we want the context to be able to cancel the request - case taskC <- types.SignedTaskResponseDigest{ + case taskC <- types.SignedBlsTaskResponseDigest{ TaskResponseDigest: taskResponseDigest, BlsSignature: blsSignature, OperatorId: operatorId, @@ -202,7 +202,7 @@ func (a *BlsAggregatorService) singleTaskAggregatorGoroutineFunc( quorumNumbers []types.QuorumNum, quorumThresholdPercentages []types.QuorumThresholdPercentage, timeToExpiry time.Duration, - signedTaskRespsC <-chan types.SignedTaskResponseDigest, + signedTaskRespsC <-chan types.SignedBlsTaskResponseDigest, ) { defer a.closeTaskGoroutine(taskIndex) @@ -246,7 +246,7 @@ func (a *BlsAggregatorService) singleTaskAggregatorGoroutineFunc( // we've already verified that the operator is part of the task's quorum, so we don't need checks here signersApkG2: bls.NewZeroG2Point().Add(operatorsAvsStateDict[signedTaskResponseDigest.OperatorId].Pubkeys.G2Pubkey), signersAggSigG1: signedTaskResponseDigest.BlsSignature, - signersOperatorIdsSet: map[types.OperatorId]bool{signedTaskResponseDigest.OperatorId: true}, + signersOperatorIdsSet: map[types.BlsOperatorId]bool{signedTaskResponseDigest.OperatorId: true}, signersTotalStakePerQuorum: operatorsAvsStateDict[signedTaskResponseDigest.OperatorId].StakePerQuorum, } } else { @@ -267,7 +267,7 @@ func (a *BlsAggregatorService) singleTaskAggregatorGoroutineFunc( aggregatedOperatorsDict[signedTaskResponseDigest.TaskResponseDigest] = digestAggregatedOperators if checkIfStakeThresholdsMet(digestAggregatedOperators.signersTotalStakePerQuorum, totalStakePerQuorum, quorumThresholdPercentagesMap) { - nonSignersOperatorIds := []types.OperatorId{} + nonSignersOperatorIds := []types.BlsOperatorId{} for operatorId := range operatorsAvsStateDict { if _, operatorSigned := digestAggregatedOperators.signersOperatorIdsSet[operatorId]; !operatorSigned { nonSignersOperatorIds = append(nonSignersOperatorIds, operatorId) @@ -326,8 +326,8 @@ func (a *BlsAggregatorService) closeTaskGoroutine(taskIndex types.TaskIndex) { // that we could use to hash and verify the taskResponse itself func (a *BlsAggregatorService) verifySignature( taskIndex types.TaskIndex, - signedTaskResponseDigest types.SignedTaskResponseDigest, - operatorsAvsStateDict map[types.OperatorId]types.OperatorAvsState, + signedTaskResponseDigest types.SignedBlsTaskResponseDigest, + operatorsAvsStateDict map[types.BlsOperatorId]types.OperatorBlsAvsState, ) error { _, ok := operatorsAvsStateDict[signedTaskResponseDigest.OperatorId] if !ok { @@ -377,7 +377,7 @@ func checkIfStakeThresholdsMet( return true } -func getG1PubkeysOfNonSigners(signersOperatorIdsSet map[types.OperatorId]bool, operatorAvsStateDict map[[32]byte]types.OperatorAvsState) []*bls.G1Point { +func getG1PubkeysOfNonSigners(signersOperatorIdsSet map[types.BlsOperatorId]bool, operatorAvsStateDict map[[32]byte]types.OperatorBlsAvsState) []*bls.G1Point { nonSignersG1Pubkeys := []*bls.G1Point{} for operatorId, operator := range operatorAvsStateDict { if _, operatorSigned := signersOperatorIdsSet[operatorId]; !operatorSigned { diff --git a/services/bls_aggregation/blsagg_test.go b/services/bls/aggregation/blsagg_test.go similarity index 90% rename from services/bls_aggregation/blsagg_test.go rename to services/bls/aggregation/blsagg_test.go index bf5c8f400..79c2ff4ab 100644 --- a/services/bls_aggregation/blsagg_test.go +++ b/services/bls/aggregation/blsagg_test.go @@ -8,7 +8,7 @@ import ( "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" - "github.com/Layr-Labs/eigensdk-go/services/avsregistry" + "github.com/Layr-Labs/eigensdk-go/services/bls/avsregistry" "github.com/Layr-Labs/eigensdk-go/types" "github.com/stretchr/testify/require" ) @@ -24,8 +24,8 @@ func TestBlsAgg(t *testing.T) { tasksTimeToExpiry := 1 * time.Second t.Run("1 quorum 1 operator 1 correct signature", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } @@ -36,7 +36,7 @@ func TestBlsAgg(t *testing.T) { taskResponseDigest := types.TaskResponseDigest{123} blsSig := testOperator1.BlsKeypair.SignMessage(taskResponseDigest) - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -58,18 +58,18 @@ func TestBlsAgg(t *testing.T) { }) t.Run("1 quorum 3 operator 3 correct signatures", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } - testOperator2 := types.TestOperator{ - OperatorId: types.OperatorId{2}, + testOperator2 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{2}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x2"), } - testOperator3 := types.TestOperator{ - OperatorId: types.OperatorId{3}, + testOperator3 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{3}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(300), 1: big.NewInt(100)}, BlsKeypair: newBlsKeyPairPanics("0x3"), } @@ -79,7 +79,7 @@ func TestBlsAgg(t *testing.T) { taskResponseDigest := types.TaskResponseDigest{123} blockNum := uint32(1) - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1, testOperator2, testOperator3}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1, testOperator2, testOperator3}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -116,13 +116,13 @@ func TestBlsAgg(t *testing.T) { }) t.Run("2 quorums 2 operators 2 correct signatures", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } - testOperator2 := types.TestOperator{ - OperatorId: types.OperatorId{2}, + testOperator2 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{2}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x2"), } @@ -132,7 +132,7 @@ func TestBlsAgg(t *testing.T) { taskResponseDigest := types.TaskResponseDigest{123} blockNum := uint32(1) - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1, testOperator2}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1, testOperator2}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -162,13 +162,13 @@ func TestBlsAgg(t *testing.T) { }) t.Run("2 concurrent tasks 2 quorums 2 operators 2 correct signatures", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } - testOperator2 := types.TestOperator{ - OperatorId: types.OperatorId{2}, + testOperator2 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{2}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x2"), } @@ -176,7 +176,7 @@ func TestBlsAgg(t *testing.T) { quorumThresholdPercentages := []types.QuorumThresholdPercentage{100, 100} blockNum := uint32(1) - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1, testOperator2}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1, testOperator2}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -242,8 +242,8 @@ func TestBlsAgg(t *testing.T) { }) t.Run("1 quorum 1 operator 0 signatures - task expired", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } @@ -252,7 +252,7 @@ func TestBlsAgg(t *testing.T) { quorumThresholdPercentages := []types.QuorumThresholdPercentage{100} blockNum := uint32(1) - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -266,13 +266,13 @@ func TestBlsAgg(t *testing.T) { }) t.Run("1 quorum 2 operator 1 correct signature quorumThreshold 50% - verified", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } - testOperator2 := types.TestOperator{ - OperatorId: types.OperatorId{2}, + testOperator2 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{2}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x2"), } @@ -283,7 +283,7 @@ func TestBlsAgg(t *testing.T) { blsSig := testOperator1.BlsKeypair.SignMessage(taskResponseDigest) blockNum := uint32(1) - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1, testOperator2}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1, testOperator2}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -305,13 +305,13 @@ func TestBlsAgg(t *testing.T) { }) t.Run("1 quorum 2 operator 1 correct signature quorumThreshold 60% - task expired", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } - testOperator2 := types.TestOperator{ - OperatorId: types.OperatorId{2}, + testOperator2 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{2}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x2"), } @@ -322,7 +322,7 @@ func TestBlsAgg(t *testing.T) { taskResponseDigest := types.TaskResponseDigest{123} blsSig := testOperator1.BlsKeypair.SignMessage(taskResponseDigest) - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1, testOperator2}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1, testOperator2}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -338,8 +338,8 @@ func TestBlsAgg(t *testing.T) { }) t.Run("send signature of task that isn't initialized - task not found error", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } @@ -348,7 +348,7 @@ func TestBlsAgg(t *testing.T) { taskResponseDigest := types.TaskResponseDigest{123} blsSig := testOperator1.BlsKeypair.SignMessage(taskResponseDigest) - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -359,13 +359,13 @@ func TestBlsAgg(t *testing.T) { // this is an edge case as typically we would send new tasks and listen for task responses in a for select loop // but this test makes sure the context deadline exceeded can get us out of a deadlock t.Run("send new signedTaskDigest before listen on responseChan - context timeout cancels the request to prevent deadlock", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } - testOperator2 := types.TestOperator{ - OperatorId: types.OperatorId{2}, + testOperator2 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{2}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x2"), } @@ -374,7 +374,7 @@ func TestBlsAgg(t *testing.T) { quorumNumbers := []types.QuorumNum{0} quorumThresholdPercentages := []types.QuorumThresholdPercentage{100} - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) @@ -407,13 +407,13 @@ func TestBlsAgg(t *testing.T) { }) t.Run("1 quorum 2 operator 2 signatures on 2 different msgs - task expired", func(t *testing.T) { - testOperator1 := types.TestOperator{ - OperatorId: types.OperatorId{1}, + testOperator1 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{1}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x1"), } - testOperator2 := types.TestOperator{ - OperatorId: types.OperatorId{2}, + testOperator2 := types.TestBlsOperator{ + OperatorId: types.BlsOperatorId{2}, StakePerQuorum: map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, BlsKeypair: newBlsKeyPairPanics("0x2"), } @@ -422,7 +422,7 @@ func TestBlsAgg(t *testing.T) { quorumNumbers := []types.QuorumNum{0} quorumThresholdPercentages := []types.QuorumThresholdPercentage{100} - fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestOperator{testOperator1, testOperator2}) + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestBlsOperator{testOperator1, testOperator2}) noopLogger := logging.NewNoopLogger() blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, noopLogger) diff --git a/services/avsregistry/avsregistry.go b/services/bls/avsregistry/avsregistry.go similarity index 85% rename from services/avsregistry/avsregistry.go rename to services/bls/avsregistry/avsregistry.go index 46a156ee7..7d110e5da 100644 --- a/services/avsregistry/avsregistry.go +++ b/services/bls/avsregistry/avsregistry.go @@ -13,11 +13,11 @@ import ( type AvsRegistryService interface { // GetOperatorsAvsState returns the state of an avs wrt to a list of quorums at a certain block. // The state includes the operatorId, pubkey, and staking amount in each quorum. - GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.OperatorId]types.OperatorAvsState, error) + GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.BlsOperatorId]types.OperatorBlsAvsState, error) // GetQuorumsAvsStateAtBlock returns the aggregated data for a list of quorums at a certain block. // The aggregated data includes the aggregated pubkey and total stake in each quorum. // This information is derivable from the Operators Avs State (returned from GetOperatorsAvsStateAtBlock), but this function is provided for convenience. - GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumAvsState, error) + GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumBlsAvsState, error) // GetCheckSignaturesIndices returns the registry indices of the nonsigner operators specified by nonSignerOperatorIds who were registered at referenceBlockNumber. - GetCheckSignaturesIndices(opts *bind.CallOpts, referenceBlockNumber types.BlockNum, quorumNumbers []types.QuorumNum, nonSignerOperatorIds []types.OperatorId) (opstateretriever.OperatorStateRetrieverCheckSignaturesIndices, error) + GetCheckSignaturesIndices(opts *bind.CallOpts, referenceBlockNumber types.BlockNum, quorumNumbers []types.QuorumNum, nonSignerOperatorIds []types.BlsOperatorId) (opstateretriever.OperatorStateRetrieverCheckSignaturesIndices, error) } diff --git a/services/avsregistry/avsregistry_chaincaller.go b/services/bls/avsregistry/avsregistry_chaincaller.go similarity index 89% rename from services/avsregistry/avsregistry_chaincaller.go rename to services/bls/avsregistry/avsregistry_chaincaller.go index e3ce65a66..22dbf5f2d 100644 --- a/services/avsregistry/avsregistry_chaincaller.go +++ b/services/bls/avsregistry/avsregistry_chaincaller.go @@ -4,10 +4,10 @@ import ( "context" "math/big" - avsregistry "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry" + avsregistry "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls" "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" - oppubkeysservice "github.com/Layr-Labs/eigensdk-go/services/operatorpubkeys" + oppubkeysservice "github.com/Layr-Labs/eigensdk-go/services/bls/operatorpubkeys" "github.com/Layr-Labs/eigensdk-go/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" ) @@ -30,8 +30,8 @@ func NewAvsRegistryServiceChainCaller(avsRegistryReader avsregistry.AvsRegistryR } } -func (ar *AvsRegistryServiceChainCaller) GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.OperatorId]types.OperatorAvsState, error) { - operatorsAvsState := make(map[types.OperatorId]types.OperatorAvsState) +func (ar *AvsRegistryServiceChainCaller) GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.BlsOperatorId]types.OperatorBlsAvsState, error) { + operatorsAvsState := make(map[types.BlsOperatorId]types.OperatorBlsAvsState) // Get operator state for each quorum by querying BLSOperatorStateRetriever (this call is why this service implementation is called ChainCaller) operatorsStakesInQuorums, err := ar.AvsRegistryReader.GetOperatorsStakeInQuorumsAtBlock(&bind.CallOpts{Context: ctx}, quorumNumbers, blockNumber) if err != nil { @@ -55,7 +55,7 @@ func (ar *AvsRegistryServiceChainCaller) GetOperatorsAvsStateAtBlock(ctx context } else { stakePerQuorum := make(map[types.QuorumNum]types.StakeAmount) stakePerQuorum[quorumNum] = operator.Stake - operatorsAvsState[operator.OperatorId] = types.OperatorAvsState{ + operatorsAvsState[operator.OperatorId] = types.OperatorBlsAvsState{ OperatorId: operator.OperatorId, Pubkeys: pubkeys, StakePerQuorum: stakePerQuorum, @@ -69,13 +69,13 @@ func (ar *AvsRegistryServiceChainCaller) GetOperatorsAvsStateAtBlock(ctx context return operatorsAvsState, nil } -func (ar *AvsRegistryServiceChainCaller) GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumAvsState, error) { +func (ar *AvsRegistryServiceChainCaller) GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumBlsAvsState, error) { operatorsAvsState, err := ar.GetOperatorsAvsStateAtBlock(ctx, quorumNumbers, blockNumber) if err != nil { ar.logger.Error("Failed to get quorum state", "err", err, "service", "AvsRegistryServiceChainCaller") return nil, err } - quorumsAvsState := make(map[types.QuorumNum]types.QuorumAvsState) + quorumsAvsState := make(map[types.QuorumNum]types.QuorumBlsAvsState) for _, quorumNum := range quorumNumbers { aggPubkeyG1 := bls.NewG1Point(big.NewInt(0), big.NewInt(0)) totalStake := big.NewInt(0) @@ -86,7 +86,7 @@ func (ar *AvsRegistryServiceChainCaller) GetQuorumsAvsStateAtBlock(ctx context.C totalStake.Add(totalStake, stake) } } - quorumsAvsState[quorumNum] = types.QuorumAvsState{ + quorumsAvsState[quorumNum] = types.QuorumBlsAvsState{ QuorumNumber: quorumNum, AggPubkeyG1: aggPubkeyG1, TotalStake: totalStake, @@ -103,7 +103,7 @@ func (ar *AvsRegistryServiceChainCaller) GetQuorumsAvsStateAtBlock(ctx context.C // and the BLSApkRegistry contract stores the mapping G1pubkeyHash -> operatorAddr // When the above PR is merged, we should change this to instead call GetOperatorAddressFromOperatorId on the avsRegistryReader // and not hardcode the definition of the operatorId here -func (ar *AvsRegistryServiceChainCaller) getOperatorPubkeys(ctx context.Context, operatorId types.OperatorId) (types.OperatorPubkeys, error) { +func (ar *AvsRegistryServiceChainCaller) getOperatorPubkeys(ctx context.Context, operatorId types.BlsOperatorId) (types.OperatorPubkeys, error) { operatorAddr, err := ar.AvsRegistryReader.GetOperatorFromId(&bind.CallOpts{Context: ctx}, operatorId) if err != nil { ar.logger.Error("Failed to get operator address from pubkey hash", "err", err, "service", "AvsRegistryServiceChainCaller") diff --git a/services/avsregistry/avsregistry_chaincaller_test.go b/services/bls/avsregistry/avsregistry_chaincaller_test.go similarity index 93% rename from services/avsregistry/avsregistry_chaincaller_test.go rename to services/bls/avsregistry/avsregistry_chaincaller_test.go index 525af13b1..608b1ffab 100644 --- a/services/avsregistry/avsregistry_chaincaller_test.go +++ b/services/bls/avsregistry/avsregistry_chaincaller_test.go @@ -10,7 +10,7 @@ import ( opstateretrievar "github.com/Layr-Labs/eigensdk-go/contracts/bindings/OperatorStateRetriever" "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" - servicemocks "github.com/Layr-Labs/eigensdk-go/services/mocks" + servicemocks "github.com/Layr-Labs/eigensdk-go/services/bls/mocks" "github.com/Layr-Labs/eigensdk-go/types" "github.com/ethereum/go-ethereum/common" "go.uber.org/mock/gomock" @@ -18,7 +18,7 @@ import ( type testOperator struct { operatorAddr common.Address - operatorId types.OperatorId + operatorId types.BlsOperatorId pubkeys types.OperatorPubkeys } @@ -26,7 +26,7 @@ func TestAvsRegistryServiceChainCaller_getOperatorPubkeys(t *testing.T) { logger := logging.NewNoopLogger() testOperator := testOperator{ operatorAddr: common.HexToAddress("0x1"), - operatorId: types.OperatorId{1}, + operatorId: types.BlsOperatorId{1}, pubkeys: types.OperatorPubkeys{ G1Pubkey: bls.NewG1Point(big.NewInt(1), big.NewInt(1)), G2Pubkey: bls.NewG2Point([2]*big.Int{big.NewInt(1), big.NewInt(1)}, [2]*big.Int{big.NewInt(1), big.NewInt(1)}), @@ -37,7 +37,7 @@ func TestAvsRegistryServiceChainCaller_getOperatorPubkeys(t *testing.T) { var tests = []struct { name string mocksInitializationFunc func(*chainiomocks.MockAvsRegistryReader, *servicemocks.MockOperatorPubkeysService) - queryOperatorId types.OperatorId + queryOperatorId types.BlsOperatorId wantErr error wantOperatorPubkeys types.OperatorPubkeys }{ @@ -82,7 +82,7 @@ func TestAvsRegistryServiceChainCaller_GetOperatorsAvsState(t *testing.T) { logger := logging.NewNoopLogger() testOperator := testOperator{ operatorAddr: common.HexToAddress("0x1"), - operatorId: types.OperatorId{1}, + operatorId: types.BlsOperatorId{1}, pubkeys: types.OperatorPubkeys{ G1Pubkey: bls.NewG1Point(big.NewInt(1), big.NewInt(1)), G2Pubkey: bls.NewG2Point([2]*big.Int{big.NewInt(1), big.NewInt(1)}, [2]*big.Int{big.NewInt(1), big.NewInt(1)}), @@ -95,7 +95,7 @@ func TestAvsRegistryServiceChainCaller_GetOperatorsAvsState(t *testing.T) { queryQuorumNumbers []types.QuorumNum queryBlockNum types.BlockNum wantErr error - wantOperatorsAvsStateDict map[types.OperatorId]types.OperatorAvsState + wantOperatorsAvsStateDict map[types.BlsOperatorId]types.OperatorBlsAvsState }{ { name: "should return operatorsAvsState", @@ -114,7 +114,7 @@ func TestAvsRegistryServiceChainCaller_GetOperatorsAvsState(t *testing.T) { queryQuorumNumbers: []types.QuorumNum{1}, queryBlockNum: 1, wantErr: nil, - wantOperatorsAvsStateDict: map[types.OperatorId]types.OperatorAvsState{ + wantOperatorsAvsStateDict: map[types.BlsOperatorId]types.OperatorBlsAvsState{ testOperator.operatorId: { OperatorId: testOperator.operatorId, Pubkeys: testOperator.pubkeys, @@ -154,7 +154,7 @@ func TestAvsRegistryServiceChainCaller_GetQuorumsAvsState(t *testing.T) { logger := logging.NewNoopLogger() testOperator := testOperator{ operatorAddr: common.HexToAddress("0x1"), - operatorId: types.OperatorId{1}, + operatorId: types.BlsOperatorId{1}, pubkeys: types.OperatorPubkeys{ G1Pubkey: bls.NewG1Point(big.NewInt(1), big.NewInt(1)), G2Pubkey: bls.NewG2Point([2]*big.Int{big.NewInt(1), big.NewInt(1)}, [2]*big.Int{big.NewInt(1), big.NewInt(1)}), @@ -167,7 +167,7 @@ func TestAvsRegistryServiceChainCaller_GetQuorumsAvsState(t *testing.T) { queryQuorumNumbers []types.QuorumNum queryBlockNum types.BlockNum wantErr error - wantQuorumsAvsStateDict map[types.QuorumNum]types.QuorumAvsState + wantQuorumsAvsStateDict map[types.QuorumNum]types.QuorumBlsAvsState }{ { name: "should return operatorsAvsState", @@ -186,8 +186,8 @@ func TestAvsRegistryServiceChainCaller_GetQuorumsAvsState(t *testing.T) { queryQuorumNumbers: []types.QuorumNum{1}, queryBlockNum: 1, wantErr: nil, - wantQuorumsAvsStateDict: map[types.QuorumNum]types.QuorumAvsState{ - 1: types.QuorumAvsState{ + wantQuorumsAvsStateDict: map[types.QuorumNum]types.QuorumBlsAvsState{ + 1: types.QuorumBlsAvsState{ QuorumNumber: types.QuorumNum(1), TotalStake: big.NewInt(123), AggPubkeyG1: bls.NewG1Point(big.NewInt(1), big.NewInt(1)), diff --git a/services/avsregistry/avsregistry_fake.go b/services/bls/avsregistry/avsregistry_fake.go similarity index 79% rename from services/avsregistry/avsregistry_fake.go rename to services/bls/avsregistry/avsregistry_fake.go index c5759ba34..801922bdc 100644 --- a/services/avsregistry/avsregistry_fake.go +++ b/services/bls/avsregistry/avsregistry_fake.go @@ -12,17 +12,17 @@ import ( ) type FakeAvsRegistryService struct { - operators map[types.BlockNum]map[types.OperatorId]types.OperatorAvsState + operators map[types.BlockNum]map[types.BlsOperatorId]types.OperatorBlsAvsState } -func NewFakeAvsRegistryService(blockNum types.BlockNum, operators []types.TestOperator) *FakeAvsRegistryService { +func NewFakeAvsRegistryService(blockNum types.BlockNum, operators []types.TestBlsOperator) *FakeAvsRegistryService { fakeAvsRegistryService := &FakeAvsRegistryService{ - operators: map[types.BlockNum]map[types.OperatorId]types.OperatorAvsState{ + operators: map[types.BlockNum]map[types.BlsOperatorId]types.OperatorBlsAvsState{ blockNum: {}, }, } for _, operator := range operators { - fakeAvsRegistryService.operators[blockNum][operator.OperatorId] = types.OperatorAvsState{ + fakeAvsRegistryService.operators[blockNum][operator.OperatorId] = types.OperatorBlsAvsState{ OperatorId: operator.OperatorId, Pubkeys: types.OperatorPubkeys{G1Pubkey: operator.BlsKeypair.GetPubKeyG1(), G2Pubkey: operator.BlsKeypair.GetPubKeyG2()}, StakePerQuorum: operator.StakePerQuorum, @@ -34,7 +34,7 @@ func NewFakeAvsRegistryService(blockNum types.BlockNum, operators []types.TestOp var _ AvsRegistryService = (*FakeAvsRegistryService)(nil) -func (f *FakeAvsRegistryService) GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.OperatorId]types.OperatorAvsState, error) { +func (f *FakeAvsRegistryService) GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.BlsOperatorId]types.OperatorBlsAvsState, error) { operatorsAvsState, ok := f.operators[blockNumber] if !ok { return nil, errors.New("block number not found") @@ -42,12 +42,12 @@ func (f *FakeAvsRegistryService) GetOperatorsAvsStateAtBlock(ctx context.Context return operatorsAvsState, nil } -func (f *FakeAvsRegistryService) GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumAvsState, error) { +func (f *FakeAvsRegistryService) GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumBlsAvsState, error) { operatorsAvsState, ok := f.operators[blockNumber] if !ok { return nil, errors.New("block number not found") } - quorumsAvsState := make(map[types.QuorumNum]types.QuorumAvsState) + quorumsAvsState := make(map[types.QuorumNum]types.QuorumBlsAvsState) for _, quorumNum := range quorumNumbers { aggPubkeyG1 := bls.NewG1Point(big.NewInt(0), big.NewInt(0)) totalStake := big.NewInt(0) @@ -58,7 +58,7 @@ func (f *FakeAvsRegistryService) GetQuorumsAvsStateAtBlock(ctx context.Context, totalStake.Add(totalStake, stake) } } - quorumsAvsState[quorumNum] = types.QuorumAvsState{ + quorumsAvsState[quorumNum] = types.QuorumBlsAvsState{ QuorumNumber: quorumNum, AggPubkeyG1: aggPubkeyG1, TotalStake: totalStake, @@ -70,7 +70,7 @@ func (f *FakeAvsRegistryService) GetQuorumsAvsStateAtBlock(ctx context.Context, func (f *FakeAvsRegistryService) GetCheckSignaturesIndices( opts *bind.CallOpts, referenceBlockNumber types.BlockNum, - quorumNumbers []types.QuorumNum, nonSignerOperatorIds []types.OperatorId, + quorumNumbers []types.QuorumNum, nonSignerOperatorIds []types.BlsOperatorId, ) (opstateretriever.OperatorStateRetrieverCheckSignaturesIndices, error) { return opstateretriever.OperatorStateRetrieverCheckSignaturesIndices{}, nil } diff --git a/services/gen.go b/services/bls/gen.go similarity index 77% rename from services/gen.go rename to services/bls/gen.go index 6d9268192..6f6d6535d 100644 --- a/services/gen.go +++ b/services/bls/gen.go @@ -1,7 +1,7 @@ package services -//go:generate mockgen -destination=./mocks/operatorpubkeys.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/operatorpubkeys OperatorPubkeysService -//go:generate mockgen -destination=./mocks/avsregistry.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/avsregistry AvsRegistryService +//go:generate mockgen -destination=./mocks/operatorpubkeys.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/operatorpubkeys OperatorPubkeysService +//go:generate mockgen -destination=./mocks/avsregistry.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/avsregistry AvsRegistryService // We generate it in ./mocks/blsagg/ instead of ./mocks like the others because otherwise we get a circular dependency // avsregistry -> mocks -> avsregistry @@ -10,4 +10,4 @@ package services // TODO: are there better ways to organize these dependencies? Maybe by using ben johnson // and having the avs registry interface be in the /avsregistry dir but the avsregistry_chaincaller // and its test in a subdir? -//go:generate mockgen -destination=./mocks/blsagg/blsaggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls_aggregation BlsAggregationService +//go:generate mockgen -destination=./mocks/blsagg/blsaggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/aggregation BlsAggregationService diff --git a/services/mocks/avsregistry.go b/services/bls/mocks/avsregistry.go similarity index 91% rename from services/mocks/avsregistry.go rename to services/bls/mocks/avsregistry.go index 0c53110c0..d3149c865 100644 --- a/services/mocks/avsregistry.go +++ b/services/bls/mocks/avsregistry.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Layr-Labs/eigensdk-go/services/avsregistry (interfaces: AvsRegistryService) +// Source: github.com/Layr-Labs/eigensdk-go/services/bls/avsregistry (interfaces: AvsRegistryService) // // Generated by this command: // -// mockgen -destination=./mocks/avsregistry.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/avsregistry AvsRegistryService +// mockgen -destination=./mocks/avsregistry.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/avsregistry AvsRegistryService // // Package mocks is a generated GoMock package. package mocks @@ -57,10 +57,10 @@ func (mr *MockAvsRegistryServiceMockRecorder) GetCheckSignaturesIndices(arg0, ar } // GetOperatorsAvsStateAtBlock mocks base method. -func (m *MockAvsRegistryService) GetOperatorsAvsStateAtBlock(arg0 context.Context, arg1 []byte, arg2 uint32) (map[[32]byte]types.OperatorAvsState, error) { +func (m *MockAvsRegistryService) GetOperatorsAvsStateAtBlock(arg0 context.Context, arg1 []byte, arg2 uint32) (map[[32]byte]types.OperatorBlsAvsState, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetOperatorsAvsStateAtBlock", arg0, arg1, arg2) - ret0, _ := ret[0].(map[[32]byte]types.OperatorAvsState) + ret0, _ := ret[0].(map[[32]byte]types.OperatorBlsAvsState) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -72,10 +72,10 @@ func (mr *MockAvsRegistryServiceMockRecorder) GetOperatorsAvsStateAtBlock(arg0, } // GetQuorumsAvsStateAtBlock mocks base method. -func (m *MockAvsRegistryService) GetQuorumsAvsStateAtBlock(arg0 context.Context, arg1 []byte, arg2 uint32) (map[byte]types.QuorumAvsState, error) { +func (m *MockAvsRegistryService) GetQuorumsAvsStateAtBlock(arg0 context.Context, arg1 []byte, arg2 uint32) (map[byte]types.QuorumBlsAvsState, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetQuorumsAvsStateAtBlock", arg0, arg1, arg2) - ret0, _ := ret[0].(map[byte]types.QuorumAvsState) + ret0, _ := ret[0].(map[byte]types.QuorumBlsAvsState) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/services/mocks/blsagg/blsaggregation.go b/services/bls/mocks/blsagg/blsaggregation.go similarity index 94% rename from services/mocks/blsagg/blsaggregation.go rename to services/bls/mocks/blsagg/blsaggregation.go index 08c15afe4..e2a62e597 100644 --- a/services/mocks/blsagg/blsaggregation.go +++ b/services/bls/mocks/blsagg/blsaggregation.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Layr-Labs/eigensdk-go/services/bls_aggregation (interfaces: BlsAggregationService) +// Source: github.com/Layr-Labs/eigensdk-go/services/bls/aggregation (interfaces: BlsAggregationService) // // Generated by this command: // -// mockgen -destination=./mocks/blsagg/blsaggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls_aggregation BlsAggregationService +// mockgen -destination=./mocks/blsagg/blsaggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/aggregation BlsAggregationService // // Package mocks is a generated GoMock package. package mocks @@ -14,7 +14,7 @@ import ( time "time" bls "github.com/Layr-Labs/eigensdk-go/crypto/bls" - blsagg "github.com/Layr-Labs/eigensdk-go/services/bls_aggregation" + blsagg "github.com/Layr-Labs/eigensdk-go/services/bls/aggregation" types "github.com/Layr-Labs/eigensdk-go/types" gomock "go.uber.org/mock/gomock" ) diff --git a/services/mocks/operatorpubkeys.go b/services/bls/mocks/operatorpubkeys.go similarity index 90% rename from services/mocks/operatorpubkeys.go rename to services/bls/mocks/operatorpubkeys.go index 8fe32953f..aee71dabe 100644 --- a/services/mocks/operatorpubkeys.go +++ b/services/bls/mocks/operatorpubkeys.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Layr-Labs/eigensdk-go/services/operatorpubkeys (interfaces: OperatorPubkeysService) +// Source: github.com/Layr-Labs/eigensdk-go/services/bls/operatorpubkeys (interfaces: OperatorPubkeysService) // // Generated by this command: // -// mockgen -destination=./mocks/operatorpubkeys.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/operatorpubkeys OperatorPubkeysService +// mockgen -destination=./mocks/operatorpubkeys.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/operatorpubkeys OperatorPubkeysService // // Package mocks is a generated GoMock package. package mocks diff --git a/services/operatorpubkeys/operatorpubkeys.go b/services/bls/operatorpubkeys/operatorpubkeys.go similarity index 100% rename from services/operatorpubkeys/operatorpubkeys.go rename to services/bls/operatorpubkeys/operatorpubkeys.go diff --git a/services/operatorpubkeys/operatorpubkeys_inmemory.go b/services/bls/operatorpubkeys/operatorpubkeys_inmemory.go similarity index 96% rename from services/operatorpubkeys/operatorpubkeys_inmemory.go rename to services/bls/operatorpubkeys/operatorpubkeys_inmemory.go index 35036cbc8..e9334219a 100644 --- a/services/operatorpubkeys/operatorpubkeys_inmemory.go +++ b/services/bls/operatorpubkeys/operatorpubkeys_inmemory.go @@ -4,7 +4,7 @@ import ( "context" "sync" - "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/bls" "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" "github.com/Layr-Labs/eigensdk-go/types" @@ -23,8 +23,8 @@ import ( // better than silently failing, since it will be easier to debug. Naturally, this means that this aggregator using this service needs // to be replicated and load-balanced, so that when it fails traffic can be switched to the other aggregator. type OperatorPubkeysServiceInMemory struct { - avsRegistrySubscriber avsregistry.AvsRegistrySubscriber - avsRegistryReader avsregistry.AvsRegistryReader + avsRegistrySubscriber avsblsregistry.AvsRegistrySubscriber + avsRegistryReader avsblsregistry.AvsRegistryReader logger logging.Logger queryC chan<- query } @@ -48,8 +48,8 @@ var _ OperatorPubkeysService = (*OperatorPubkeysServiceInMemory)(nil) // Using a separate initialize() function might lead to some users forgetting to call it and the service not behaving properly. func NewOperatorPubkeysServiceInMemory( ctx context.Context, - avsRegistrySubscriber avsregistry.AvsRegistrySubscriber, - avsRegistryReader avsregistry.AvsRegistryReader, + avsRegistrySubscriber avsblsregistry.AvsRegistrySubscriber, + avsRegistryReader avsblsregistry.AvsRegistryReader, logger logging.Logger, ) *OperatorPubkeysServiceInMemory { queryC := make(chan query) diff --git a/services/operatorpubkeys/operatorpubkeys_inmemory_test.go b/services/bls/operatorpubkeys/operatorpubkeys_inmemory_test.go similarity index 100% rename from services/operatorpubkeys/operatorpubkeys_inmemory_test.go rename to services/bls/operatorpubkeys/operatorpubkeys_inmemory_test.go diff --git a/services/ecdsa/aggregation/agg.go b/services/ecdsa/aggregation/agg.go new file mode 100644 index 000000000..559e2a991 --- /dev/null +++ b/services/ecdsa/aggregation/agg.go @@ -0,0 +1,358 @@ +package aggregation + +import ( + "context" + "errors" + "fmt" + "math/big" + "sync" + "time" + + "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/Layr-Labs/eigensdk-go/services/ecdsa/avsregistry" + "github.com/Layr-Labs/eigensdk-go/types" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" +) + +var ( + TaskAlreadyInitializedErrorFn = func(taskIndex types.TaskIndex) error { + return fmt.Errorf("task %d already initialized", taskIndex) + } + TaskExpiredError = fmt.Errorf("task expired") + TaskNotFoundErrorFn = func(taskIndex types.TaskIndex) error { + return fmt.Errorf("task %d not initialized or already completed", taskIndex) + } + OperatorNotPartOfTaskQuorumErrorFn = func(operatorId types.EcdsaOperatorId, taskIndex types.TaskIndex) error { + return fmt.Errorf("operator %x not part of task %d's quorum", operatorId, taskIndex) + } + SignatureVerificationError = func(err error) error { + return fmt.Errorf("Failed to verify signature: %w", err) + } + IncorrectSignatureError = errors.New("Signature verification failed. Incorrect Signature.") +) + +// EcdsaAggregationServiceResponse is the response from the ecdsa aggregation service +type EcdsaAggregationServiceResponse struct { + Err error + TaskIndex types.TaskIndex + TaskResponseDigest types.TaskResponseDigest + SignerIds []common.Address + Signatures [][]byte + SignerQuorumBitmapIndices []uint32 + TotalStakeIndices []uint32 + SignerStakeIndices [][]uint32 +} + +// aggregatedOperators is meant to be used as a value in a map +// map[taskResponseDigest]aggregatedOperators +type aggregatedOperators struct { + // address of all operators who signed on this taskResponseDigest + signersIds []common.Address + // signatures of all operators who signed on this taskResponseDigest + signatures [][]byte + // aggregate stake of all operators who signed on this header for each quorum + signersTotalStakePerQuorum map[types.QuorumNum]*big.Int +} + +// EcdsaAggregationService is the interface provided to avs aggregator code for doing ecdsa aggregation +// Currently its only implementation is the EcdsaAggregatorService, so see the comment there for more details +type EcdsaAggregationService interface { + // InitializeNewTask should be called whenever a new task is created. ProcessNewSignature will return an error + // if the task it is trying to process has not been initialized yet. + // quorumNumbers and quorumThresholdPercentages set the requirements for this task to be considered complete, which happens + // when a particular TaskResponseDigest (received via the a.taskChans[taskIndex]) has been signed by signers whose stake + // in each of the listed quorums adds up to at least quorumThresholdPercentages[i] of the total stake in that quorum + InitializeNewTask( + taskIndex types.TaskIndex, + taskCreatedBlock uint32, + quorumNumbers []types.QuorumNum, + quorumThresholdPercentages []types.QuorumThresholdPercentage, + timeToExpiry time.Duration, + ) error + + // ProcessNewSignature processes a new signature over a taskResponseDigest for a particular taskIndex by a particular operator + // It verifies that the signature is correct and returns an error if it is not, and then aggregates the signature and stake of + // the operator with all other signatures for the same taskIndex and taskResponseDigest pair. + // Note: This function currently only verifies signatures over the taskResponseDigest directly, so avs code needs to verify that the digest + // passed to ProcessNewSignature is indeed the digest of a valid taskResponse (that is, EcdsaAggregationService does not verify semantic integrity of the taskResponses) + ProcessNewSignature( + ctx context.Context, + taskIndex types.TaskIndex, + taskResponseDigest types.TaskResponseDigest, + ecdsaSignature []byte, + operatorId common.Address, + ) error + + // GetResponseChannel returns the single channel that meant to be used as the response channel + // Any task that is completed (see the completion criterion in the comment above InitializeNewTask) + // will be sent on this channel along with all the necessary information to call ECDSASignatureChecker onchain + GetResponseChannel() <-chan EcdsaAggregationServiceResponse +} + +// EcdsaAggregatorService is a service that performs Ecdsa signature aggregation for an AVS' tasks +// Assumptions: +// 1. EcdsaAggregatorService only verifies digest signatures, so avs code needs to verify that the digest +// passed to ProcessNewSignature is indeed the digest of a valid taskResponse +// (see the comment above checkSignature for more details) +// 2. EcdsaAggregatorService is VERY generic and makes very few assumptions about the tasks structure or +// the time at which operators will send their signatures. It is mostly suitable for offchain computation +// oracle (a la truebit) type of AVS, where tasks are sent onchain by users sporadically, and where +// new tasks can start even before the previous ones have finished aggregation. +// AVSs like eigenDA that have a much more controlled task submission schedule and where new tasks are +// only submitted after the previous one's response has been aggregated and responded onchain, could have +// a much simpler AggregationService without all the complicated parallel goroutines. +type EcdsaAggregatorService struct { + // aggregatedResponsesC is the channel which all goroutines share to send their responses back to the + // main thread after they are done aggregating (either they reached the threshold, or timeout expired) + aggregatedResponsesC chan EcdsaAggregationServiceResponse + // signedTaskRespsCs are the channels to send the signed task responses to the goroutines processing them + // each new task is assigned a new goroutine and a new channel + signedTaskRespsCs map[types.TaskIndex]chan types.SignedEcdsaTaskResponseDigest + // we add chans to taskChans from the main thread (InitializeNewTask) when we create new tasks, + // we read them in ProcessNewSignature from the main thread when we receive new signed tasks, + // and remove them from its respective goroutine when the task is completed or reached timeout + // we thus need a mutex to protect taskChans + taskChansMutex sync.RWMutex + avsRegistryService avsregistry.AvsRegistryService + logger logging.Logger +} + +var _ EcdsaAggregationService = (*EcdsaAggregatorService)(nil) + +func NewEcdsaAggregatorService(avsRegistryService avsregistry.AvsRegistryService, logger logging.Logger) *EcdsaAggregatorService { + return &EcdsaAggregatorService{ + aggregatedResponsesC: make(chan EcdsaAggregationServiceResponse), + signedTaskRespsCs: make(map[types.TaskIndex]chan types.SignedEcdsaTaskResponseDigest), + taskChansMutex: sync.RWMutex{}, + avsRegistryService: avsRegistryService, + logger: logger, + } +} + +func (a *EcdsaAggregatorService) GetResponseChannel() <-chan EcdsaAggregationServiceResponse { + return a.aggregatedResponsesC +} + +// InitializeNewTask creates a new task goroutine meant to process new signed task responses for that task +// (that are sent via ProcessNewSignature) and adds a channel to a.taskChans to send the signed task responses to it +// quorumNumbers and quorumThresholdPercentages set the requirements for this task to be considered complete, which happens +// when a particular TaskResponseDigest (received via the a.taskChans[taskIndex]) has been signed by signers whose stake +// in each of the listed quorums adds up to at least quorumThresholdPercentages[i] of the total stake in that quorum +func (a *EcdsaAggregatorService) InitializeNewTask( + taskIndex types.TaskIndex, + taskCreatedBlock uint32, + quorumNumbers []types.QuorumNum, + quorumThresholdPercentages []types.QuorumThresholdPercentage, + timeToExpiry time.Duration, +) error { + if _, taskExists := a.signedTaskRespsCs[taskIndex]; taskExists { + return TaskAlreadyInitializedErrorFn(taskIndex) + } + signedTaskRespsC := make(chan types.SignedEcdsaTaskResponseDigest) + a.taskChansMutex.Lock() + a.signedTaskRespsCs[taskIndex] = signedTaskRespsC + a.taskChansMutex.Unlock() + go a.singleTaskAggregatorGoroutineFunc(taskIndex, taskCreatedBlock, quorumNumbers, quorumThresholdPercentages, timeToExpiry, signedTaskRespsC) + return nil +} + +func (a *EcdsaAggregatorService) ProcessNewSignature( + ctx context.Context, + taskIndex types.TaskIndex, + taskResponseDigest types.TaskResponseDigest, + ecdsaSignature []byte, + operatorId common.Address, +) error { + a.taskChansMutex.Lock() + taskC, taskInitialized := a.signedTaskRespsCs[taskIndex] + a.taskChansMutex.Unlock() + if !taskInitialized { + return TaskNotFoundErrorFn(taskIndex) + } + signatureVerificationErrorC := make(chan error) + // send the task to the goroutine processing this task + // and return the error (if any) returned by the signature verification routine + select { + // we need to send this as part of select because if the goroutine is processing another SignedTaskResponseDigest + // and cannot receive this one, we want the context to be able to cancel the request + case taskC <- types.SignedEcdsaTaskResponseDigest{ + TaskResponseDigest: taskResponseDigest, + EcdsaSignature: ecdsaSignature, + OperatorId: operatorId, + SignatureVerificationErrorC: signatureVerificationErrorC, + }: + // note that we need to wait synchronously here for this response because we want to + // send back an informative error message to the operator who sent his signature to the aggregator + return <-signatureVerificationErrorC + case <-ctx.Done(): + return ctx.Err() + } +} + +func (a *EcdsaAggregatorService) singleTaskAggregatorGoroutineFunc( + taskIndex types.TaskIndex, + taskCreatedBlock uint32, + quorumNumbers []types.QuorumNum, + quorumThresholdPercentages []types.QuorumThresholdPercentage, + timeToExpiry time.Duration, + signedTaskRespsC <-chan types.SignedEcdsaTaskResponseDigest, +) { + defer a.closeTaskGoroutine(taskIndex) + + quorumThresholdPercentagesMap := make(map[types.QuorumNum]types.QuorumThresholdPercentage) + for i, quorumNumber := range quorumNumbers { + quorumThresholdPercentagesMap[quorumNumber] = quorumThresholdPercentages[i] + } + operatorsAvsStateDict, err := a.avsRegistryService.GetOperatorsAvsStateAtBlock(context.Background(), quorumNumbers, taskCreatedBlock) + if err != nil { + // TODO: how should we handle such an error? + a.logger.Fatal("Aggregator failed to get operators state from avs registry", "err", err) + } + quorumsAvsStakeDict, err := a.avsRegistryService.GetQuorumsAvsStateAtBlock(context.Background(), quorumNumbers, taskCreatedBlock) + if err != nil { + a.logger.Fatal("Aggregator failed to get quorums state from avs registry", "err", err) + } + totalStakePerQuorum := make(map[types.QuorumNum]*big.Int) + for quorumNum, quorumAvsState := range quorumsAvsStakeDict { + totalStakePerQuorum[quorumNum] = quorumAvsState.TotalStake + } + + // TODO(samlaf): instead of taking a TTE, we should take a block as input + // and monitor the chain and only close the task goroutine when that block is reached + taskExpiredTimer := time.NewTimer(timeToExpiry) + + aggregatedOperatorsDict := map[types.TaskResponseDigest]aggregatedOperators{} + for { + select { + case signedTaskResponseDigest := <-signedTaskRespsC: + a.logger.Debug("Task goroutine received new signed task response digest", + "taskIndex", taskIndex, "TaskResponseDigest", signedTaskResponseDigest.TaskResponseDigest, + "OperatorId", signedTaskResponseDigest.OperatorId, "ecdsaSignature", signedTaskResponseDigest.EcdsaSignature, + ) + signedTaskResponseDigest.SignatureVerificationErrorC <- a.verifySignature(taskIndex, signedTaskResponseDigest, operatorsAvsStateDict) + // after verifying signature we aggregate its sig and pubkey, and update the signed stake amount + digestAggregatedOperators, ok := aggregatedOperatorsDict[signedTaskResponseDigest.TaskResponseDigest] + if !ok { + // first operator to sign on this digest + digestAggregatedOperators = aggregatedOperators{ + // we've already verified that the operator is part of the task's quorum, so we don't need checks here + signersIds: []common.Address{signedTaskResponseDigest.OperatorId}, + signatures: [][]byte{signedTaskResponseDigest.EcdsaSignature}, + signersTotalStakePerQuorum: operatorsAvsStateDict[signedTaskResponseDigest.OperatorId].StakePerQuorum, + } + } else { + digestAggregatedOperators.signersIds = append(digestAggregatedOperators.signersIds, signedTaskResponseDigest.OperatorId) + digestAggregatedOperators.signatures = append(digestAggregatedOperators.signatures, signedTaskResponseDigest.EcdsaSignature) + for quorumNum, stake := range operatorsAvsStateDict[signedTaskResponseDigest.OperatorId].StakePerQuorum { + if _, ok := digestAggregatedOperators.signersTotalStakePerQuorum[quorumNum]; !ok { + // if we haven't seen this quorum before, initialize its signed stake to 0 + // possible if previous operators who sent us signatures were not part of this quorum + digestAggregatedOperators.signersTotalStakePerQuorum[quorumNum] = big.NewInt(0) + } + digestAggregatedOperators.signersTotalStakePerQuorum[quorumNum].Add(digestAggregatedOperators.signersTotalStakePerQuorum[quorumNum], stake) + } + } + // update the aggregatedOperatorsDict. Note that we need to assign the whole struct value at once, + // because of https://github.com/golang/go/issues/3117 + aggregatedOperatorsDict[signedTaskResponseDigest.TaskResponseDigest] = digestAggregatedOperators + + if checkIfStakeThresholdsMet(digestAggregatedOperators.signersTotalStakePerQuorum, totalStakePerQuorum, quorumThresholdPercentagesMap) { + indices, err := a.avsRegistryService.GetCheckSignaturesIndices(&bind.CallOpts{}, taskCreatedBlock, quorumNumbers, digestAggregatedOperators.signersIds) + if err != nil { + a.logger.Error("Failed to get check signatures indices", "err", err) + a.aggregatedResponsesC <- EcdsaAggregationServiceResponse{ + Err: err, + } + return + } + ecdsaAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: nil, + TaskIndex: taskIndex, + TaskResponseDigest: signedTaskResponseDigest.TaskResponseDigest, + // TODO(samlaf): I think we'll have to order these by operatorId to pass the require in the contract iirc + SignerIds: digestAggregatedOperators.signersIds, + Signatures: digestAggregatedOperators.signatures, + SignerQuorumBitmapIndices: indices.SignerQuorumBitmapIndices, + TotalStakeIndices: indices.TotalStakeIndices, + SignerStakeIndices: indices.SignerStakeIndices, + } + a.aggregatedResponsesC <- ecdsaAggregationServiceResponse + return + } + case <-taskExpiredTimer.C: + a.aggregatedResponsesC <- EcdsaAggregationServiceResponse{ + Err: TaskExpiredError, + } + return + } + } + +} + +// closeTaskGoroutine is run when the goroutine processing taskIndex's task responses ends (for whatever reason) +// it deletes the response channel for taskIndex from a.taskChans +// so that the main thread knows that this task goroutine is no longer running +// and doesn't try to send new signatures to it +func (a *EcdsaAggregatorService) closeTaskGoroutine(taskIndex types.TaskIndex) { + a.taskChansMutex.Lock() + delete(a.signedTaskRespsCs, taskIndex) + a.taskChansMutex.Unlock() +} + +// verifySignature verifies that a signature is valid against the operator pubkey stored in the +// operatorsAvsStateDict for that particular task +// TODO(samlaf): right now we are only checking that the *digest* is signed correctly!! +// we could be sent a signature of any kind of garbage and we would happily aggregate it +// this forces the avs code to verify that the digest is indeed the digest of a valid taskResponse +// we could take taskResponse as an interface{} and have avs code pass us a taskResponseHashFunction +// that we could use to hash and verify the taskResponse itself +func (a *EcdsaAggregatorService) verifySignature( + taskIndex types.TaskIndex, + signedTaskResponseDigest types.SignedEcdsaTaskResponseDigest, + operatorsAvsStateDict map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState, +) error { + _, ok := operatorsAvsStateDict[signedTaskResponseDigest.OperatorId] + if !ok { + a.logger.Warnf("Operator %#v not found. Skipping message.", signedTaskResponseDigest.OperatorId) + return OperatorNotPartOfTaskQuorumErrorFn(signedTaskResponseDigest.OperatorId, taskIndex) + } + + // 0. verify that the msg actually came from the correct operator + a.logger.Debug("Verifying signed task response digest signature", + "taskResponseDigest", signedTaskResponseDigest.TaskResponseDigest, + "operatorId", signedTaskResponseDigest.OperatorId, + "ecdsaSignature", signedTaskResponseDigest.EcdsaSignature, + ) + signatureVerified, err := ecdsa.VerifySignature(signedTaskResponseDigest.TaskResponseDigest[:], signedTaskResponseDigest.EcdsaSignature, signedTaskResponseDigest.OperatorId) + if err != nil { + a.logger.Error(SignatureVerificationError(err).Error()) + return SignatureVerificationError(err) + } + if !signatureVerified { + a.logger.Error(IncorrectSignatureError.Error()) + return IncorrectSignatureError + } + return nil +} + +// checkIfStakeThresholdsMet checks at least quorumThresholdPercentage of stake +// has signed for each quorum. +func checkIfStakeThresholdsMet( + signedStakePerQuorum map[types.QuorumNum]*big.Int, + totalStakePerQuorum map[types.QuorumNum]*big.Int, + quorumThresholdPercentagesMap map[types.QuorumNum]types.QuorumThresholdPercentage, +) bool { + for quorumNum, quorumThresholdPercentage := range quorumThresholdPercentagesMap { + // we check that signedStake >= totalStake * quorumThresholdPercentage / 100 + // to be exact (and do like the contracts), we actually check that + // signedStake * 100 >= totalStake * quorumThresholdPercentage + signedStake := big.NewInt(0).Mul(signedStakePerQuorum[quorumNum], big.NewInt(100)) + thresholdStake := big.NewInt(0).Mul(totalStakePerQuorum[quorumNum], big.NewInt(int64(quorumThresholdPercentage))) + if signedStake.Cmp(thresholdStake) < 0 { + return false + } + } + return true +} diff --git a/services/ecdsa/aggregation/agg_test.go b/services/ecdsa/aggregation/agg_test.go new file mode 100644 index 000000000..a580987ec --- /dev/null +++ b/services/ecdsa/aggregation/agg_test.go @@ -0,0 +1,434 @@ +package aggregation + +import ( + "context" + "crypto/ecdsa" + "math/big" + "testing" + "time" + + sdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/Layr-Labs/eigensdk-go/services/ecdsa/avsregistry" + "github.com/Layr-Labs/eigensdk-go/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/require" +) + +// TestEcdsaAgg is a suite of test that tests the main aggregation logic of the aggregation service +// it don't check any of the indices fields because those are just provided as a convenience to the caller +// and aren't related to the main logic which we actually need to test +// they are gotten from a call to the chain at the end of the aggregation so we should test that elsewhere +func TestEcdsaAgg(t *testing.T) { + + // we hardcode this for now, until we implement this feature properly + // 1 second seems to be enough for tests to pass. Currently takes 5s to run all tests + tasksTimeToExpiry := 1 * time.Second + + t.Run("1 quorum 1 operator 1 correct signature", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + blockNum := uint32(1) + taskIndex := types.TaskIndex(0) + quorumNumbers := []types.QuorumNum{0} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{100} + taskResponseDigest := types.TaskResponseDigest{123} + ecdsaSig, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err = ecdsaAggServ.InitializeNewTask(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSig, testOperator1.OperatorId) + require.Nil(t, err) + wantAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: nil, + TaskIndex: taskIndex, + TaskResponseDigest: taskResponseDigest, + SignerIds: []types.EcdsaOperatorId{testOperator1.OperatorId}, + Signatures: [][]byte{ecdsaSig}, + } + gotAggregationServiceResponse := <-ecdsaAggServ.aggregatedResponsesC + require.Equal(t, wantAggregationServiceResponse, gotAggregationServiceResponse) + }) + + t.Run("1 quorum 3 operator 3 correct signatures", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + testOperator2 := newTestOperator( + newEcdsaPrivKeyPanics("0x2"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + testOperator3 := newTestOperator( + newEcdsaPrivKeyPanics("0x3"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(300), 1: big.NewInt(100)}, + ) + taskIndex := types.TaskIndex(0) + quorumNumbers := []types.QuorumNum{0} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{100} + taskResponseDigest := types.TaskResponseDigest{123} + blockNum := uint32(1) + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1, testOperator2, testOperator3}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err := ecdsaAggServ.InitializeNewTask(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + ecdsaSigOp1, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSigOp1, testOperator1.OperatorId) + require.Nil(t, err) + ecdsaSigOp2, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator2.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSigOp2, testOperator2.OperatorId) + require.Nil(t, err) + ecdsaSigOp3, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator3.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSigOp3, testOperator3.OperatorId) + require.Nil(t, err) + + wantAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: nil, + TaskIndex: taskIndex, + TaskResponseDigest: taskResponseDigest, + SignerIds: []types.EcdsaOperatorId{testOperator1.OperatorId, testOperator2.OperatorId, testOperator3.OperatorId}, + Signatures: [][]byte{ecdsaSigOp1, ecdsaSigOp2, ecdsaSigOp3}, + } + gotAggregationServiceResponse := <-ecdsaAggServ.aggregatedResponsesC + require.Equal(t, wantAggregationServiceResponse, gotAggregationServiceResponse) + }) + + t.Run("2 quorums 2 operators 2 correct signatures", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + testOperator2 := newTestOperator( + newEcdsaPrivKeyPanics("0x2"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + taskIndex := types.TaskIndex(0) + quorumNumbers := []types.QuorumNum{0, 1} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{100, 100} + taskResponseDigest := types.TaskResponseDigest{123} + blockNum := uint32(1) + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1, testOperator2}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err := ecdsaAggServ.InitializeNewTask(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + ecdsaSigOp1, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSigOp1, testOperator1.OperatorId) + require.Nil(t, err) + ecdsaSigOp2, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator2.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSigOp2, testOperator2.OperatorId) + require.Nil(t, err) + + wantAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: nil, + TaskIndex: taskIndex, + TaskResponseDigest: taskResponseDigest, + SignerIds: []types.EcdsaOperatorId{testOperator1.OperatorId, testOperator2.OperatorId}, + Signatures: [][]byte{ecdsaSigOp1, ecdsaSigOp2}, + } + gotAggregationServiceResponse := <-ecdsaAggServ.aggregatedResponsesC + require.EqualValues(t, wantAggregationServiceResponse, gotAggregationServiceResponse) + }) + + t.Run("2 concurrent tasks 2 quorums 2 operators 2 correct signatures", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + testOperator2 := newTestOperator( + newEcdsaPrivKeyPanics("0x2"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + quorumNumbers := []types.QuorumNum{0, 1} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{100, 100} + blockNum := uint32(1) + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1, testOperator2}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + // initialize 2 concurrent tasks + task1Index := types.TaskIndex(1) + task1ResponseDigest := types.TaskResponseDigest{123} + err := ecdsaAggServ.InitializeNewTask(task1Index, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + task2Index := types.TaskIndex(2) + task2ResponseDigest := types.TaskResponseDigest{230} + err = ecdsaAggServ.InitializeNewTask(task2Index, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + + ecdsaSigTask1Op1, err := sdkecdsa.SignMsg(task1ResponseDigest[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), task1Index, task1ResponseDigest, ecdsaSigTask1Op1, testOperator1.OperatorId) + require.Nil(t, err) + ecdsaSigTask2Op1, err := sdkecdsa.SignMsg(task2ResponseDigest[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), task2Index, task2ResponseDigest, ecdsaSigTask2Op1, testOperator1.OperatorId) + require.Nil(t, err) + ecdsaSigTask1Op2, err := sdkecdsa.SignMsg(task1ResponseDigest[:], testOperator2.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), task1Index, task1ResponseDigest, ecdsaSigTask1Op2, testOperator2.OperatorId) + require.Nil(t, err) + ecdsaSigTask2Op2, err := sdkecdsa.SignMsg(task2ResponseDigest[:], testOperator2.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), task2Index, task2ResponseDigest, ecdsaSigTask2Op2, testOperator2.OperatorId) + require.Nil(t, err) + + wantAggregationServiceResponseTask1 := EcdsaAggregationServiceResponse{ + Err: nil, + TaskIndex: task1Index, + TaskResponseDigest: task1ResponseDigest, + SignerIds: []types.EcdsaOperatorId{testOperator1.OperatorId, testOperator2.OperatorId}, + Signatures: [][]byte{ecdsaSigTask1Op1, ecdsaSigTask1Op2}, + } + wantAggregationServiceResponseTask2 := EcdsaAggregationServiceResponse{ + Err: nil, + TaskIndex: task2Index, + TaskResponseDigest: task2ResponseDigest, + SignerIds: []types.EcdsaOperatorId{testOperator1.OperatorId, testOperator2.OperatorId}, + Signatures: [][]byte{ecdsaSigTask2Op1, ecdsaSigTask2Op2}, + } + + // we don't know which of task1 or task2 responses will be received first + gotAggregationServiceResponseTaskFirstReceived := <-ecdsaAggServ.aggregatedResponsesC + gotAggregationServiceResponseTaskSecondReceived := <-ecdsaAggServ.aggregatedResponsesC + + if gotAggregationServiceResponseTaskFirstReceived.TaskIndex == task1Index { + require.EqualValues(t, wantAggregationServiceResponseTask1, gotAggregationServiceResponseTaskFirstReceived) + require.EqualValues(t, wantAggregationServiceResponseTask2, gotAggregationServiceResponseTaskSecondReceived) + } else { + require.EqualValues(t, wantAggregationServiceResponseTask2, gotAggregationServiceResponseTaskFirstReceived) + require.EqualValues(t, wantAggregationServiceResponseTask1, gotAggregationServiceResponseTaskSecondReceived) + } + }) + + t.Run("1 quorum 1 operator 0 signatures - task expired", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + taskIndex := types.TaskIndex(0) + quorumNumbers := []types.QuorumNum{0} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{100} + blockNum := uint32(1) + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err := ecdsaAggServ.InitializeNewTask(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + wantAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: TaskExpiredError, + } + gotAggregationServiceResponse := <-ecdsaAggServ.aggregatedResponsesC + require.Equal(t, wantAggregationServiceResponse, gotAggregationServiceResponse) + }) + + t.Run("1 quorum 2 operator 1 correct signature quorumThreshold 50% - verified", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + testOperator2 := newTestOperator( + newEcdsaPrivKeyPanics("0x2"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + taskIndex := types.TaskIndex(0) + quorumNumbers := []types.QuorumNum{0} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{50} + taskResponseDigest := types.TaskResponseDigest{123} + + ecdsaSig, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + blockNum := uint32(1) + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1, testOperator2}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err = ecdsaAggServ.InitializeNewTask(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSig, testOperator1.OperatorId) + require.Nil(t, err) + wantAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: nil, + TaskIndex: taskIndex, + TaskResponseDigest: taskResponseDigest, + SignerIds: []types.EcdsaOperatorId{testOperator1.OperatorId}, + Signatures: [][]byte{ecdsaSig}, + } + gotAggregationServiceResponse := <-ecdsaAggServ.aggregatedResponsesC + require.Equal(t, wantAggregationServiceResponse, gotAggregationServiceResponse) + }) + + t.Run("1 quorum 2 operator 1 correct signature quorumThreshold 60% - task expired", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + testOperator2 := newTestOperator( + newEcdsaPrivKeyPanics("0x2"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + blockNum := uint32(1) + taskIndex := types.TaskIndex(0) + quorumNumbers := []types.QuorumNum{0} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{60} + taskResponseDigest := types.TaskResponseDigest{123} + ecdsaSig, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1, testOperator2}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err = ecdsaAggServ.InitializeNewTask(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSig, testOperator1.OperatorId) + require.Nil(t, err) + wantAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: TaskExpiredError, + } + gotAggregationServiceResponse := <-ecdsaAggServ.aggregatedResponsesC + require.Equal(t, wantAggregationServiceResponse, gotAggregationServiceResponse) + }) + + t.Run("send signature of task that isn't initialized - task not found error", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + blockNum := uint32(1) + taskIndex := types.TaskIndex(0) + taskResponseDigest := types.TaskResponseDigest{123} + ecdsaSig, err := sdkecdsa.SignMsg(taskResponseDigest[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest, ecdsaSig, testOperator1.OperatorId) + require.Equal(t, TaskNotFoundErrorFn(taskIndex), err) + }) + + // this is an edge case as typically we would send new tasks and listen for task responses in a for select loop + // but this test makes sure the context deadline exceeded can get us out of a deadlock + t.Run("send new signedTaskDigest before listen on responseChan - context timeout cancels the request to prevent deadlock", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + testOperator2 := newTestOperator( + newEcdsaPrivKeyPanics("0x2"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + blockNum := uint32(1) + taskIndex := types.TaskIndex(0) + quorumNumbers := []types.QuorumNum{0} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{100} + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err := ecdsaAggServ.InitializeNewTask(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + taskResponseDigest1 := types.TaskResponseDigest{1} + ecdsaSigOp1, err := sdkecdsa.SignMsg(taskResponseDigest1[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest1, ecdsaSigOp1, testOperator1.OperatorId) + require.Nil(t, err) + + taskResponseDigest2 := types.TaskResponseDigest{2} + ecdsaSigOp2, err := sdkecdsa.SignMsg(taskResponseDigest2[:], testOperator2.EcdsaPrivKey) + require.Nil(t, err) + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + err = ecdsaAggServ.ProcessNewSignature(ctx, taskIndex, taskResponseDigest2, ecdsaSigOp2, testOperator2.OperatorId) + // this should timeout because the task goroutine is blocked on the response channel (since we only listen for it below) + require.Equal(t, context.DeadlineExceeded, err) + + wantAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: nil, + TaskIndex: taskIndex, + TaskResponseDigest: taskResponseDigest1, + SignerIds: []types.EcdsaOperatorId{testOperator1.OperatorId}, + Signatures: [][]byte{ecdsaSigOp1}, + } + gotAggregationServiceResponse := <-ecdsaAggServ.aggregatedResponsesC + require.Equal(t, wantAggregationServiceResponse, gotAggregationServiceResponse) + }) + + t.Run("1 quorum 2 operator 2 signatures on 2 different msgs - task expired", func(t *testing.T) { + testOperator1 := newTestOperator( + newEcdsaPrivKeyPanics("0x1"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + testOperator2 := newTestOperator( + newEcdsaPrivKeyPanics("0x2"), + map[types.QuorumNum]types.StakeAmount{0: big.NewInt(100), 1: big.NewInt(200)}, + ) + blockNum := uint32(1) + taskIndex := types.TaskIndex(0) + quorumNumbers := []types.QuorumNum{0} + quorumThresholdPercentages := []types.QuorumThresholdPercentage{100} + + fakeAvsRegistryService := avsregistry.NewFakeAvsRegistryService(blockNum, []types.TestEcdsaOperator{testOperator1, testOperator2}) + noopLogger := logging.NewNoopLogger() + ecdsaAggServ := NewEcdsaAggregatorService(fakeAvsRegistryService, noopLogger) + + err := ecdsaAggServ.InitializeNewTask(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) + require.Nil(t, err) + taskResponseDigest1 := types.TaskResponseDigest{1} + + ecdsaSigOp1, err := sdkecdsa.SignMsg(taskResponseDigest1[:], testOperator1.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest1, ecdsaSigOp1, testOperator1.OperatorId) + require.Nil(t, err) + taskResponseDigest2 := types.TaskResponseDigest{2} + ecdsaSigOp2, err := sdkecdsa.SignMsg(taskResponseDigest2[:], testOperator2.EcdsaPrivKey) + require.Nil(t, err) + err = ecdsaAggServ.ProcessNewSignature(context.Background(), taskIndex, taskResponseDigest2, ecdsaSigOp2, testOperator2.OperatorId) + require.Nil(t, err) + wantAggregationServiceResponse := EcdsaAggregationServiceResponse{ + Err: TaskExpiredError, + } + gotAggregationServiceResponse := <-ecdsaAggServ.aggregatedResponsesC + require.Equal(t, wantAggregationServiceResponse, gotAggregationServiceResponse) + }) +} + +func newEcdsaPrivKeyPanics(hexKey string) *ecdsa.PrivateKey { + keypair, err := crypto.GenerateKey() + if err != nil { + panic(err) + } + return keypair +} + +func newTestOperator(ecdsaPrivKey *ecdsa.PrivateKey, stakePerQuorum map[types.QuorumNum]types.StakeAmount) types.TestEcdsaOperator { + return types.TestEcdsaOperator{ + OperatorId: crypto.PubkeyToAddress(ecdsaPrivKey.PublicKey), + StakePerQuorum: stakePerQuorum, + EcdsaPrivKey: ecdsaPrivKey, + } +} diff --git a/services/ecdsa/avsregistry/avsregistry.go b/services/ecdsa/avsregistry/avsregistry.go new file mode 100644 index 000000000..7871f769c --- /dev/null +++ b/services/ecdsa/avsregistry/avsregistry.go @@ -0,0 +1,23 @@ +package avsregistry + +import ( + "context" + + opstateretriever "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSAOperatorStateRetriever" + "github.com/Layr-Labs/eigensdk-go/types" + "github.com/ethereum/go-ethereum/accounts/abi/bind" +) + +// AvsRegistryServicemService is a service that indexes the Avs Registry contracts and provides a way to query for operator state +// at certain blocks, including operatorIds, pubkeys, and staking status in each quorum. +type AvsRegistryService interface { + // GetOperatorsAvsState returns the state of an avs wrt to a list of quorums at a certain block. + // The state includes the operatorId, pubkey, and staking amount in each quorum. + GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState, error) + // GetQuorumsAvsStateAtBlock returns the aggregated data for a list of quorums at a certain block. + // The aggregated data includes the aggregated pubkey and total stake in each quorum. + // This information is derivable from the Operators Avs State (returned from GetOperatorsAvsStateAtBlock), but this function is provided for convenience. + GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumEcdsaAvsState, error) + // GetCheckSignaturesIndices returns the registry indices of the signer operators specified by signerOperatorIds who were registered at referenceBlockNumber. + GetCheckSignaturesIndices(opts *bind.CallOpts, referenceBlockNumber types.BlockNum, quorumNumbers []types.QuorumNum, signerOperatorIds []types.EcdsaOperatorId) (opstateretriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) +} diff --git a/services/ecdsa/avsregistry/avsregistry_chaincaller.go b/services/ecdsa/avsregistry/avsregistry_chaincaller.go new file mode 100644 index 000000000..ea2280579 --- /dev/null +++ b/services/ecdsa/avsregistry/avsregistry_chaincaller.go @@ -0,0 +1,87 @@ +package avsregistry + +import ( + "context" + "math/big" + + avsecdsaregistry "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry/ecdsa" + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/Layr-Labs/eigensdk-go/types" + "github.com/ethereum/go-ethereum/accounts/abi/bind" +) + +// AvsRegistryServiceChainCaller is a wrapper around AvsRegistryReader that transforms the data into +// nicer golang types that are easier to work with +type AvsRegistryServiceChainCaller struct { + avsecdsaregistry.AvsEcdsaRegistryReader + logger logging.Logger +} + +var _ AvsRegistryService = (*AvsRegistryServiceChainCaller)(nil) + +func NewAvsRegistryServiceChainCaller(avsRegistryReader avsecdsaregistry.AvsEcdsaRegistryReader, logger logging.Logger) *AvsRegistryServiceChainCaller { + return &AvsRegistryServiceChainCaller{ + AvsEcdsaRegistryReader: avsRegistryReader, + logger: logger, + } +} + +func (ar *AvsRegistryServiceChainCaller) GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState, error) { + operatorsAvsState := make(map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState) + // Get operator state for each quorum by querying ECDSAOperatorStateRetriever (this call is why this service implementation is called ChainCaller) + operatorsStakesInQuorums, err := ar.AvsEcdsaRegistryReader.GetOperatorsStakeInQuorumsAtBlock(&bind.CallOpts{Context: ctx}, quorumNumbers, blockNumber) + if err != nil { + ar.logger.Error("Failed to get operator state", "err", err, "service", "AvsRegistryServiceChainCaller") + return nil, err + } + numquorums := len(quorumNumbers) + if len(operatorsStakesInQuorums) != numquorums { + ar.logger.Fatal("Number of quorums returned from GetOperatorsStakeInQuorumsAtBlock does not match number of quorums requested. Probably pointing to old contract or wrong implementation.", "service", "AvsRegistryServiceChainCaller") + } + + for quorumIdx, quorumNum := range quorumNumbers { + for _, operator := range operatorsStakesInQuorums[quorumIdx] { + if operatorAvsState, ok := operatorsAvsState[operator.OperatorId]; ok { + operatorAvsState.StakePerQuorum[quorumNum] = operator.Stake + } else { + stakePerQuorum := make(map[types.QuorumNum]types.StakeAmount) + stakePerQuorum[quorumNum] = operator.Stake + operatorsAvsState[operator.OperatorId] = types.OperatorEcdsaAvsState{ + OperatorId: operator.OperatorId, + StakePerQuorum: stakePerQuorum, + BlockNumber: blockNumber, + } + operatorsAvsState[operator.OperatorId].StakePerQuorum[quorumNum] = operator.Stake + } + } + } + + return operatorsAvsState, nil +} + +func (ar *AvsRegistryServiceChainCaller) GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumEcdsaAvsState, error) { + operatorsAvsState, err := ar.GetOperatorsAvsStateAtBlock(ctx, quorumNumbers, blockNumber) + if err != nil { + ar.logger.Error("Failed to get quorum state", "err", err, "service", "AvsRegistryServiceChainCaller") + return nil, err + } + quorumsAvsState := make(map[types.QuorumNum]types.QuorumEcdsaAvsState) + for _, quorumNum := range quorumNumbers { + totalStake := big.NewInt(0) + operatorIds := make([]types.EcdsaOperatorId, 0, len(operatorsAvsState)) + for _, operator := range operatorsAvsState { + // only include operators that have a stake in this quorum + if stake, ok := operator.StakePerQuorum[quorumNum]; ok { + totalStake.Add(totalStake, stake) + operatorIds = append(operatorIds, operator.OperatorId) + } + } + quorumsAvsState[quorumNum] = types.QuorumEcdsaAvsState{ + QuorumNumber: quorumNum, + OperatorIds: operatorIds, + TotalStake: totalStake, + BlockNumber: blockNumber, + } + } + return quorumsAvsState, nil +} diff --git a/services/ecdsa/avsregistry/avsregistry_chaincaller_test.go b/services/ecdsa/avsregistry/avsregistry_chaincaller_test.go new file mode 100644 index 000000000..e9d794b5e --- /dev/null +++ b/services/ecdsa/avsregistry/avsregistry_chaincaller_test.go @@ -0,0 +1,149 @@ +package avsregistry + +import ( + "context" + "math/big" + "reflect" + "testing" + + chainiomocks "github.com/Layr-Labs/eigensdk-go/chainio/mocks" + opstateretrievar "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSAOperatorStateRetriever" + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/Layr-Labs/eigensdk-go/types" + "github.com/ethereum/go-ethereum/common" + "go.uber.org/mock/gomock" +) + +type testOperator struct { + operatorAddr common.Address + operatorId types.EcdsaOperatorId +} + +func TestAvsRegistryServiceChainCaller_GetOperatorsAvsState(t *testing.T) { + logger := logging.NewNoopLogger() + testOperator := testOperator{ + operatorAddr: common.HexToAddress("0x1"), + operatorId: types.EcdsaOperatorId{1}, + } + + var tests = []struct { + name string + mocksInitializationFunc func(*chainiomocks.MockAvsEcdsaRegistryReader) + queryQuorumNumbers []types.QuorumNum + queryBlockNum types.BlockNum + wantErr error + wantOperatorsAvsStateDict map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState + }{ + { + name: "should return operatorsAvsState", + mocksInitializationFunc: func(mockAvsRegistryReader *chainiomocks.MockAvsEcdsaRegistryReader) { + mockAvsRegistryReader.EXPECT().GetOperatorsStakeInQuorumsAtBlock(gomock.Any(), []types.QuorumNum{1}, types.BlockNum(1)).Return([][]opstateretrievar.ECDSAOperatorStateRetrieverOperator{ + { + { + OperatorId: testOperator.operatorId, + Stake: big.NewInt(123), + }, + }, + }, nil) + }, + queryQuorumNumbers: []types.QuorumNum{1}, + queryBlockNum: 1, + wantErr: nil, + wantOperatorsAvsStateDict: map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState{ + testOperator.operatorId: { + OperatorId: testOperator.operatorId, + StakePerQuorum: map[types.QuorumNum]types.StakeAmount{1: big.NewInt(123)}, + BlockNumber: 1, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Create mocks + mockCtrl := gomock.NewController(t) + mockAvsRegistryReader := chainiomocks.NewMockAvsEcdsaRegistryReader(mockCtrl) + + if tt.mocksInitializationFunc != nil { + tt.mocksInitializationFunc(mockAvsRegistryReader) + } + // Create a new instance of the avsregistry service + service := NewAvsRegistryServiceChainCaller(mockAvsRegistryReader, logger) + + // Call the GetOperatorPubkeys method with the test operator address + gotOperatorsAvsStateDict, gotErr := service.GetOperatorsAvsStateAtBlock(context.Background(), tt.queryQuorumNumbers, tt.queryBlockNum) + if tt.wantErr != gotErr { + t.Fatalf("GetOperatorsAvsState returned wrong error. Got: %v, want: %v.", gotErr, tt.wantErr) + } + if tt.wantErr == nil && !reflect.DeepEqual(tt.wantOperatorsAvsStateDict, gotOperatorsAvsStateDict) { + t.Fatalf("GetOperatorsAvsState returned wrong operatorsAvsStateDict. Got: %v, want: %v.", gotOperatorsAvsStateDict, tt.wantOperatorsAvsStateDict) + } + }) + } +} + +func TestAvsRegistryServiceChainCaller_GetQuorumsAvsState(t *testing.T) { + logger := logging.NewNoopLogger() + testOperator := testOperator{ + operatorAddr: common.HexToAddress("0x1"), + operatorId: types.EcdsaOperatorId{1}, + } + + var tests = []struct { + name string + mocksInitializationFunc func(*chainiomocks.MockAvsEcdsaRegistryReader) + queryQuorumNumbers []types.QuorumNum + queryBlockNum types.BlockNum + wantErr error + wantQuorumsAvsStateDict map[types.QuorumNum]types.QuorumEcdsaAvsState + }{ + { + name: "should return operatorsAvsState", + mocksInitializationFunc: func(mockAvsRegistryReader *chainiomocks.MockAvsEcdsaRegistryReader) { + mockAvsRegistryReader.EXPECT().GetOperatorsStakeInQuorumsAtBlock(gomock.Any(), []types.QuorumNum{1}, types.BlockNum(1)).Return([][]opstateretrievar.ECDSAOperatorStateRetrieverOperator{ + { + { + OperatorId: testOperator.operatorId, + Stake: big.NewInt(123), + }, + }, + }, nil) + }, + queryQuorumNumbers: []types.QuorumNum{1}, + queryBlockNum: 1, + wantErr: nil, + wantQuorumsAvsStateDict: map[types.QuorumNum]types.QuorumEcdsaAvsState{ + 1: types.QuorumEcdsaAvsState{ + QuorumNumber: types.QuorumNum(1), + TotalStake: big.NewInt(123), + OperatorIds: []types.EcdsaOperatorId{testOperator.operatorId}, + BlockNumber: 1, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Create mocks + mockCtrl := gomock.NewController(t) + mockAvsRegistryReader := chainiomocks.NewMockAvsEcdsaRegistryReader(mockCtrl) + + if tt.mocksInitializationFunc != nil { + tt.mocksInitializationFunc(mockAvsRegistryReader) + } + // Create a new instance of the avsregistry service + service := NewAvsRegistryServiceChainCaller(mockAvsRegistryReader, logger) + + // Call the GetOperatorPubkeys method with the test operator address + aggG1PubkeyPerQuorum, gotErr := service.GetQuorumsAvsStateAtBlock(context.Background(), tt.queryQuorumNumbers, tt.queryBlockNum) + if tt.wantErr != gotErr { + t.Fatalf("GetOperatorsAvsState returned wrong error. Got: %v, want: %v.", gotErr, tt.wantErr) + } + if tt.wantErr == nil && !reflect.DeepEqual(tt.wantQuorumsAvsStateDict, aggG1PubkeyPerQuorum) { + t.Fatalf("GetOperatorsAvsState returned wrong aggG1PubkeyPerQuorum. Got: %v, want: %v.", aggG1PubkeyPerQuorum, tt.wantQuorumsAvsStateDict) + } + }) + } +} diff --git a/services/ecdsa/avsregistry/avsregistry_fake.go b/services/ecdsa/avsregistry/avsregistry_fake.go new file mode 100644 index 000000000..528e350a8 --- /dev/null +++ b/services/ecdsa/avsregistry/avsregistry_fake.go @@ -0,0 +1,74 @@ +package avsregistry + +import ( + "context" + "errors" + "math/big" + + opstateretriever "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSAOperatorStateRetriever" + "github.com/Layr-Labs/eigensdk-go/types" + "github.com/ethereum/go-ethereum/accounts/abi/bind" +) + +type FakeAvsRegistryService struct { + operators map[types.BlockNum]map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState +} + +func NewFakeAvsRegistryService(blockNum types.BlockNum, operators []types.TestEcdsaOperator) *FakeAvsRegistryService { + fakeAvsRegistryService := &FakeAvsRegistryService{ + operators: map[types.BlockNum]map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState{ + blockNum: {}, + }, + } + for _, operator := range operators { + fakeAvsRegistryService.operators[blockNum][operator.OperatorId] = types.OperatorEcdsaAvsState{ + OperatorId: operator.OperatorId, + StakePerQuorum: operator.StakePerQuorum, + BlockNumber: blockNum, + } + } + return fakeAvsRegistryService +} + +var _ AvsRegistryService = (*FakeAvsRegistryService)(nil) + +func (f *FakeAvsRegistryService) GetOperatorsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.EcdsaOperatorId]types.OperatorEcdsaAvsState, error) { + operatorsAvsState, ok := f.operators[blockNumber] + if !ok { + return nil, errors.New("block number not found") + } + return operatorsAvsState, nil +} + +func (f *FakeAvsRegistryService) GetQuorumsAvsStateAtBlock(ctx context.Context, quorumNumbers []types.QuorumNum, blockNumber types.BlockNum) (map[types.QuorumNum]types.QuorumEcdsaAvsState, error) { + operatorsAvsState, ok := f.operators[blockNumber] + if !ok { + return nil, errors.New("block number not found") + } + quorumsAvsState := make(map[types.QuorumNum]types.QuorumEcdsaAvsState) + for _, quorumNum := range quorumNumbers { + operatorIds := make([]types.EcdsaOperatorId, 0, len(operatorsAvsState)) + totalStake := big.NewInt(0) + for _, operator := range operatorsAvsState { + // only include operators that have a stake in this quorum + if stake, ok := operator.StakePerQuorum[quorumNum]; ok { + operatorIds = append(operatorIds, operator.OperatorId) + totalStake.Add(totalStake, stake) + } + } + quorumsAvsState[quorumNum] = types.QuorumEcdsaAvsState{ + QuorumNumber: quorumNum, + OperatorIds: operatorIds, + TotalStake: totalStake, + BlockNumber: blockNumber, + } + } + return quorumsAvsState, nil +} + +func (f *FakeAvsRegistryService) GetCheckSignaturesIndices( + opts *bind.CallOpts, referenceBlockNumber types.BlockNum, + quorumNumbers []types.QuorumNum, signerOperatorIds []types.EcdsaOperatorId, +) (opstateretriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) { + return opstateretriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices{}, nil +} diff --git a/services/ecdsa/gen.go b/services/ecdsa/gen.go new file mode 100644 index 000000000..dfaa0ed3c --- /dev/null +++ b/services/ecdsa/gen.go @@ -0,0 +1,3 @@ +package services + +//go:generate mockgen -destination=./mocks/avsregistry.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/ecdsa/avsregistry AvsRegistryService diff --git a/services/ecdsa/mocks/avsregistry.go b/services/ecdsa/mocks/avsregistry.go new file mode 100644 index 000000000..03d31ab46 --- /dev/null +++ b/services/ecdsa/mocks/avsregistry.go @@ -0,0 +1,88 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/Layr-Labs/eigensdk-go/services/ecdsa/avsregistry (interfaces: AvsRegistryService) +// +// Generated by this command: +// +// mockgen -destination=./mocks/avsregistry.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/ecdsa/avsregistry AvsRegistryService +// +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + + contractECDSAOperatorStateRetriever "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSAOperatorStateRetriever" + types "github.com/Layr-Labs/eigensdk-go/types" + bind "github.com/ethereum/go-ethereum/accounts/abi/bind" + common "github.com/ethereum/go-ethereum/common" + gomock "go.uber.org/mock/gomock" +) + +// MockAvsRegistryService is a mock of AvsRegistryService interface. +type MockAvsRegistryService struct { + ctrl *gomock.Controller + recorder *MockAvsRegistryServiceMockRecorder +} + +// MockAvsRegistryServiceMockRecorder is the mock recorder for MockAvsRegistryService. +type MockAvsRegistryServiceMockRecorder struct { + mock *MockAvsRegistryService +} + +// NewMockAvsRegistryService creates a new mock instance. +func NewMockAvsRegistryService(ctrl *gomock.Controller) *MockAvsRegistryService { + mock := &MockAvsRegistryService{ctrl: ctrl} + mock.recorder = &MockAvsRegistryServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAvsRegistryService) EXPECT() *MockAvsRegistryServiceMockRecorder { + return m.recorder +} + +// GetCheckSignaturesIndices mocks base method. +func (m *MockAvsRegistryService) GetCheckSignaturesIndices(arg0 *bind.CallOpts, arg1 uint32, arg2 []byte, arg3 []common.Address) (contractECDSAOperatorStateRetriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCheckSignaturesIndices", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(contractECDSAOperatorStateRetriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetCheckSignaturesIndices indicates an expected call of GetCheckSignaturesIndices. +func (mr *MockAvsRegistryServiceMockRecorder) GetCheckSignaturesIndices(arg0, arg1, arg2, arg3 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCheckSignaturesIndices", reflect.TypeOf((*MockAvsRegistryService)(nil).GetCheckSignaturesIndices), arg0, arg1, arg2, arg3) +} + +// GetOperatorsAvsStateAtBlock mocks base method. +func (m *MockAvsRegistryService) GetOperatorsAvsStateAtBlock(arg0 context.Context, arg1 []byte, arg2 uint32) (map[common.Address]types.OperatorEcdsaAvsState, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOperatorsAvsStateAtBlock", arg0, arg1, arg2) + ret0, _ := ret[0].(map[common.Address]types.OperatorEcdsaAvsState) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperatorsAvsStateAtBlock indicates an expected call of GetOperatorsAvsStateAtBlock. +func (mr *MockAvsRegistryServiceMockRecorder) GetOperatorsAvsStateAtBlock(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorsAvsStateAtBlock", reflect.TypeOf((*MockAvsRegistryService)(nil).GetOperatorsAvsStateAtBlock), arg0, arg1, arg2) +} + +// GetQuorumsAvsStateAtBlock mocks base method. +func (m *MockAvsRegistryService) GetQuorumsAvsStateAtBlock(arg0 context.Context, arg1 []byte, arg2 uint32) (map[byte]types.QuorumEcdsaAvsState, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetQuorumsAvsStateAtBlock", arg0, arg1, arg2) + ret0, _ := ret[0].(map[byte]types.QuorumEcdsaAvsState) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetQuorumsAvsStateAtBlock indicates an expected call of GetQuorumsAvsStateAtBlock. +func (mr *MockAvsRegistryServiceMockRecorder) GetQuorumsAvsStateAtBlock(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQuorumsAvsStateAtBlock", reflect.TypeOf((*MockAvsRegistryService)(nil).GetQuorumsAvsStateAtBlock), arg0, arg1, arg2) +} diff --git a/types/avs.go b/types/avs.go index 92f02fb3a..879704c5b 100644 --- a/types/avs.go +++ b/types/avs.go @@ -1,13 +1,23 @@ package types -import "github.com/Layr-Labs/eigensdk-go/crypto/bls" +import ( + "github.com/Layr-Labs/eigensdk-go/crypto/bls" + "github.com/ethereum/go-ethereum/common" +) type TaskIndex = uint32 type TaskResponseDigest [32]byte -type SignedTaskResponseDigest struct { +type SignedBlsTaskResponseDigest struct { TaskResponseDigest TaskResponseDigest BlsSignature *bls.Signature OperatorId bls.OperatorId SignatureVerificationErrorC chan error } + +type SignedEcdsaTaskResponseDigest struct { + TaskResponseDigest TaskResponseDigest + EcdsaSignature []byte + OperatorId common.Address + SignatureVerificationErrorC chan error +} diff --git a/types/operator.go b/types/operator.go index 1df53e5c5..487668aa4 100644 --- a/types/operator.go +++ b/types/operator.go @@ -86,21 +86,28 @@ type OperatorPubkeys struct { type OperatorAddr = common.Address type StakeAmount = *big.Int -// OperatorId is the ID of an operator, defined by the AVS registry +// BlsOperatorId is the ID of an operator, defined by the AVS registry // It is currently the hash of the operator's G1 pubkey (in the bls pubkey registry) -type OperatorId = [32]byte +type BlsOperatorId = [32]byte +type EcdsaOperatorId = common.Address type QuorumNum = uint8 type QuorumThresholdPercentage = uint32 type BlockNum = uint32 // AvsOperator represents the operator state in AVS registries -type OperatorAvsState struct { - OperatorId OperatorId +type OperatorBlsAvsState struct { + OperatorId BlsOperatorId Pubkeys OperatorPubkeys // Stake of the operator for each quorum StakePerQuorum map[QuorumNum]StakeAmount BlockNumber BlockNum } +type OperatorEcdsaAvsState struct { + OperatorId EcdsaOperatorId + // Stake of the operator for each quorum + StakePerQuorum map[QuorumNum]StakeAmount + BlockNumber BlockNum +} var ( maxNumberOfQuorums = 192 @@ -117,9 +124,18 @@ func BitmapToQuorumIds(bitmap *big.Int) []QuorumNum { return quorumIds } -type QuorumAvsState struct { +type QuorumBlsAvsState struct { QuorumNumber QuorumNum TotalStake StakeAmount AggPubkeyG1 *bls.G1Point BlockNumber BlockNum } +type QuorumEcdsaAvsState struct { + QuorumNumber QuorumNum + TotalStake StakeAmount + // Note that operatorId is not the same as operatorAddr! + // one is the address of the ecdsa wallet that controls the operator, the other one is the address of the ecdsa + // private key that the operator uses to sign messages (these could and should be different) + OperatorIds []common.Address + BlockNumber BlockNum +} diff --git a/types/test.go b/types/test.go index 01a754b99..52e066fbf 100644 --- a/types/test.go +++ b/types/test.go @@ -1,9 +1,18 @@ package types -import "github.com/Layr-Labs/eigensdk-go/crypto/bls" +import ( + "crypto/ecdsa" -type TestOperator struct { - OperatorId OperatorId + "github.com/Layr-Labs/eigensdk-go/crypto/bls" +) + +type TestBlsOperator struct { + OperatorId BlsOperatorId StakePerQuorum map[QuorumNum]StakeAmount BlsKeypair *bls.KeyPair } +type TestEcdsaOperator struct { + OperatorId EcdsaOperatorId + StakePerQuorum map[QuorumNum]StakeAmount + EcdsaPrivKey *ecdsa.PrivateKey +} From bb1b8c6643a2af74d23e0ff6de4b28f2b7f4e3d7 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Wed, 31 Jan 2024 21:00:34 -0500 Subject: [PATCH 2/2] inc-sq now works so this should be the final commit for this branch --- chainio/clients/avsregistry/ecdsa/reader.go | 32 + chainio/clients/avsregistry/ecdsa/writer.go | 278 ++ .../mocks/avsEcdsaRegistryContractsReader.go | 15 + chainio/mocks/avsRegistryContractsWriter.go | 12 +- chainio/utils/bindings.go | 4 +- .../ECDSARegistryCoordinator/binding.go | 2612 +++++++++++++++++ .../bindings/ECDSAStakeRegistry/binding.go | 2066 +++++++++++++ contracts/generate-bindings.sh | 4 +- crypto/ecdsa/ecdsa.go | 14 +- crypto/ecdsa/utils.go | 16 + services/bls/gen.go | 2 +- .../{blsaggregation.go => aggregation.go} | 2 +- services/ecdsa/aggregation/agg.go | 8 +- services/ecdsa/aggregation/agg_test.go | 4 +- services/ecdsa/gen.go | 1 + services/ecdsa/mocks/aggregation.go | 85 + 16 files changed, 5136 insertions(+), 19 deletions(-) create mode 100644 chainio/clients/avsregistry/ecdsa/writer.go create mode 100644 contracts/bindings/ECDSARegistryCoordinator/binding.go create mode 100644 contracts/bindings/ECDSAStakeRegistry/binding.go rename services/bls/mocks/blsagg/{blsaggregation.go => aggregation.go} (95%) create mode 100644 services/ecdsa/mocks/aggregation.go diff --git a/chainio/clients/avsregistry/ecdsa/reader.go b/chainio/clients/avsregistry/ecdsa/reader.go index 63bd2ed07..091b87792 100644 --- a/chainio/clients/avsregistry/ecdsa/reader.go +++ b/chainio/clients/avsregistry/ecdsa/reader.go @@ -7,6 +7,7 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" opstateretriever "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSAOperatorStateRetriever" + regcoord "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSARegistryCoordinator" ) type AvsEcdsaRegistryReader interface { @@ -22,11 +23,17 @@ type AvsEcdsaRegistryReader interface { quorumNumbers []byte, nonSignerOperatorIds []gethcommon.Address, ) (opstateretriever.ECDSAOperatorStateRetrieverCheckSignaturesIndices, error) + + IsOperatorRegistered( + opts *bind.CallOpts, + operatorAddress gethcommon.Address, + ) (bool, error) } type AvsEcdsaRegistryChainReader struct { logger logging.Logger registryCoordinatorAddr gethcommon.Address + registryCoordinator *regcoord.ContractECDSARegistryCoordinator operatorStateRetriever *opstateretriever.ContractECDSAOperatorStateRetriever ethClient eth.EthClient } @@ -36,12 +43,14 @@ var _ AvsEcdsaRegistryReader = (*AvsEcdsaRegistryChainReader)(nil) func NewAvsEcdsaRegistryChainReader( registryCoordinatorAddr gethcommon.Address, + registerCoordinator *regcoord.ContractECDSARegistryCoordinator, operatorStateRetriever *opstateretriever.ContractECDSAOperatorStateRetriever, logger logging.Logger, ethClient eth.EthClient, ) *AvsEcdsaRegistryChainReader { return &AvsEcdsaRegistryChainReader{ registryCoordinatorAddr: registryCoordinatorAddr, + registryCoordinator: registerCoordinator, operatorStateRetriever: operatorStateRetriever, logger: logger, ethClient: ethClient, @@ -61,8 +70,16 @@ func BuildAvsEcdsaRegistryChainReader( if err != nil { return nil, err } + contractRegistryCoordinator, err := regcoord.NewContractECDSARegistryCoordinator( + registryCoordinatorAddr, + ethClient, + ) + if err != nil { + return nil, err + } return NewAvsEcdsaRegistryChainReader( registryCoordinatorAddr, + contractRegistryCoordinator, contractOperatorStateRetriever, logger, ethClient, @@ -107,3 +124,18 @@ func (r *AvsEcdsaRegistryChainReader) GetOperatorsStakeInQuorumsAtBlock( } return operatorStakes, nil } + +func (r *AvsEcdsaRegistryChainReader) IsOperatorRegistered( + opts *bind.CallOpts, + operatorAddress gethcommon.Address, +) (bool, error) { + operatorStatus, err := r.registryCoordinator.GetOperatorStatus(opts, operatorAddress) + if err != nil { + r.logger.Error("Cannot get operator status", "err", err) + return false, err + } + + // 0 = NEVER_REGISTERED, 1 = REGISTERED, 2 = DEREGISTERED + registeredWithAvs := operatorStatus == 1 + return registeredWithAvs, nil +} diff --git a/chainio/clients/avsregistry/ecdsa/writer.go b/chainio/clients/avsregistry/ecdsa/writer.go new file mode 100644 index 000000000..e60e0a3d3 --- /dev/null +++ b/chainio/clients/avsregistry/ecdsa/writer.go @@ -0,0 +1,278 @@ +package avsecdsaregistry + +import ( + "context" + "errors" + "math/big" + + "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" + "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" + sdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + gethcommon "github.com/ethereum/go-ethereum/common" + gethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + + regcoord "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSARegistryCoordinator" + stakereg "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ECDSAStakeRegistry" +) + +type AvsEcdsaRegistryWriter interface { + // TODO(samlaf): an operator that is already registered in a quorum can register with another quorum without passing signatures + // perhaps we should add another sdk function for this purpose, that just takes in a quorumNumber? + // RegisterOperatorInQuorumWithAVSRegistryCoordinator is used to register a single operator with the AVS's registry coordinator. + // - operatorEcdsaPrivateKey is the operator's ecdsa private key (used to sign a message to register operator in eigenlayer's delegation manager) + // - operatorToAvsRegistrationSigSalt is a random salt used to prevent replay attacks + // - operatorToAvsRegistrationSigExpiry is the expiry time of the signature + RegisterOperatorInQuorumWithAVSRegistryCoordinator( + ctx context.Context, + operatorEcdsaPrivateKey *sdkecdsa.PrivateKey, + operatorToAvsRegistrationSigSalt [32]byte, + operatorToAvsRegistrationSigExpiry *big.Int, + avsEcdsaKeyPair *sdkecdsa.PrivateKey, + quorumNumbers []byte, + ) (*gethtypes.Receipt, error) + + // UpdateStakesOfEntireOperatorSetForQuorums is used by avs teams running https://github.com/Layr-Labs/avs-sync + // to updates the stake of their entire operator set. + // Because of high gas costs of this operation, it typically needs to be called for every quorum, or perhaps for a small grouping of quorums + // (highly dependent on number of operators per quorum) + UpdateStakesOfEntireOperatorSetForQuorums( + ctx context.Context, + operatorsPerQuorum [][]gethcommon.Address, + quorumNumbers []byte, + ) (*gethtypes.Receipt, error) + + // UpdateStakesOfOperatorSubsetForAllQuorums is meant to be used by single operators (or teams of operators, possibly running https://github.com/Layr-Labs/avs-sync) + // to update the stake of their own operator(s). This might be needed in the case that they received a lot of new stake delegations, and want this to be reflected + // in the AVS's registry coordinator. + UpdateStakesOfOperatorSubsetForAllQuorums( + ctx context.Context, + operators []gethcommon.Address, + ) (*gethtypes.Receipt, error) + + DeregisterOperator( + ctx context.Context, + quorumNumbers []byte, + ) (*gethtypes.Receipt, error) +} + +type AvsEcdsaRegistryChainWriter struct { + serviceManagerAddr gethcommon.Address + registryCoordinator *regcoord.ContractECDSARegistryCoordinator + elReader elcontracts.ELReader + logger logging.Logger + ethClient eth.EthClient + txMgr txmgr.TxManager +} + +var _ AvsEcdsaRegistryWriter = (*AvsEcdsaRegistryChainWriter)(nil) + +func NewAvsRegistryChainWriter( + serviceManagerAddr gethcommon.Address, + registryCoordinator *regcoord.ContractECDSARegistryCoordinator, + elReader elcontracts.ELReader, + logger logging.Logger, + ethClient eth.EthClient, + txMgr txmgr.TxManager, +) (*AvsEcdsaRegistryChainWriter, error) { + return &AvsEcdsaRegistryChainWriter{ + serviceManagerAddr: serviceManagerAddr, + registryCoordinator: registryCoordinator, + elReader: elReader, + logger: logger, + ethClient: ethClient, + txMgr: txMgr, + }, nil +} + +func BuildAvsRegistryChainWriter( + registryCoordinatorAddr gethcommon.Address, + operatorStateRetrieverAddr gethcommon.Address, + logger logging.Logger, + ethClient eth.EthClient, + txMgr txmgr.TxManager, +) (*AvsEcdsaRegistryChainWriter, error) { + registryCoordinator, err := regcoord.NewContractECDSARegistryCoordinator(registryCoordinatorAddr, ethClient) + if err != nil { + return nil, err + } + serviceManagerAddr, err := registryCoordinator.ServiceManager(&bind.CallOpts{}) + if err != nil { + return nil, err + } + stakeRegistryAddr, err := registryCoordinator.StakeRegistry(&bind.CallOpts{}) + if err != nil { + return nil, err + } + stakeRegistry, err := stakereg.NewContractECDSAStakeRegistry(stakeRegistryAddr, ethClient) + if err != nil { + return nil, err + } + delegationManagerAddr, err := stakeRegistry.Delegation(&bind.CallOpts{}) + if err != nil { + return nil, err + } + elReader, err := elcontracts.BuildELChainReader(delegationManagerAddr, ethClient, logger) + if err != nil { + return nil, err + } + return NewAvsRegistryChainWriter( + serviceManagerAddr, + registryCoordinator, + elReader, + logger, + ethClient, + txMgr, + ) +} + +// RegisterOperatorInQuorumWithAVSRegistryCoordinator is used to register a single operator with the AVS's registry coordinator, +// in a given set of quorum numbers. +// We reuse operatorToAvsRegistrationSigSalt and operatorToAvsRegistrationSigExpiry for both the operator's registration with the AVS's registry coordinator +// and the operator's registration with the eigenlayer's delegation manager. +func (w *AvsEcdsaRegistryChainWriter) RegisterOperatorInQuorumWithAVSRegistryCoordinator( + ctx context.Context, + // we need to pass the private key explicitly and can't use the signer because registering requires signing a message which isn't a transaction + // and the signer can only signs transactions + // see operatorSignature in https://github.com/Layr-Labs/eigenlayer-middleware/blob/m2-mainnet/docs/RegistryCoordinator.md#registeroperator + // TODO(madhur): check to see if we can make the signer and txmgr more flexible so we can use them (and remote signers) to sign non txs + operatorEcdsaPrivateKey *sdkecdsa.PrivateKey, + operatorToAvsRegistrationSigSalt [32]byte, + operatorToAvsRegistrationSigExpiry *big.Int, + avsEcdsaPrivateKey *sdkecdsa.PrivateKey, + quorumNumbers []byte, +) (*gethtypes.Receipt, error) { + w.logger.Info("registering operator with the AVS's registry coordinator") + // params to register avs ecdsa pubkey with ecdsaRegistryCoordinator + operatorAddr := crypto.PubkeyToAddress(operatorEcdsaPrivateKey.PublicKey) + // Note that we sign a message containing the operatorAddr, which basically tells the contract + // "I am binding this avsEcdsa key that is signing the message to my operatorAddr" + msgHashToSign, err := w.registryCoordinator.PubkeyRegistrationMessageHash(&bind.CallOpts{}, operatorAddr) + if err != nil { + return nil, err + } + signedMsg, err := sdkecdsa.SignMsg(msgHashToSign[:], avsEcdsaPrivateKey) + if err != nil { + return nil, err + } + avsEcdsaAddr := crypto.PubkeyToAddress(avsEcdsaPrivateKey.PublicKey) + pubkeyRegParams := regcoord.ECDSARegistryCoordinatorECDSAPubkeyRegistrationParams{ + SigningAddress: avsEcdsaAddr, + SignatureAndExpiry: regcoord.ISignatureUtilsSignatureWithSaltAndExpiry{ + Signature: signedMsg, + Salt: operatorToAvsRegistrationSigSalt, + Expiry: operatorToAvsRegistrationSigExpiry, + }, + } + + // params to register operator in delegation manager's operator-avs mapping + msgToSign, err := w.elReader.CalculateDelegationApprovalDigestHash( + &bind.CallOpts{}, operatorAddr, w.serviceManagerAddr, operatorToAvsRegistrationSigSalt, operatorToAvsRegistrationSigExpiry) + if err != nil { + return nil, err + } + operatorSignature, err := sdkecdsa.SignMsg(msgToSign[:], operatorEcdsaPrivateKey) + if err != nil { + return nil, err + } + operatorSignatureWithSaltAndExpiry := regcoord.ISignatureUtilsSignatureWithSaltAndExpiry{ + Signature: operatorSignature, + Salt: operatorToAvsRegistrationSigSalt, + Expiry: operatorToAvsRegistrationSigExpiry, + } + + noSendTxOpts, err := w.txMgr.GetNoSendTxOpts() + if err != nil { + return nil, err + } + // TODO: this call will fail if max number of operators are already registered + // in that case, need to call churner to kick out another operator. See eigenDA's node/operator.go implementation + tx, err := w.registryCoordinator.RegisterOperator( + noSendTxOpts, + quorumNumbers, + pubkeyRegParams, + operatorSignatureWithSaltAndExpiry, + ) + if err != nil { + return nil, err + } + receipt, err := w.txMgr.Send(ctx, tx) + if err != nil { + return nil, errors.New("failed to send tx with err: " + err.Error()) + } + w.logger.Infof("tx hash: %s", tx.Hash().String()) + w.logger.Info("registered operator with the AVS's registry coordinator") + return receipt, nil +} + +func (w *AvsEcdsaRegistryChainWriter) UpdateStakesOfEntireOperatorSetForQuorums( + ctx context.Context, + operatorsPerQuorum [][]gethcommon.Address, + quorumNumbers []byte, +) (*gethtypes.Receipt, error) { + w.logger.Info("updating stakes for entire operator set", "quorumNumbers", quorumNumbers) + noSendTxOpts, err := w.txMgr.GetNoSendTxOpts() + if err != nil { + return nil, err + } + tx, err := w.registryCoordinator.UpdateOperatorsForQuorum(noSendTxOpts, operatorsPerQuorum, quorumNumbers) + if err != nil { + return nil, err + } + receipt, err := w.txMgr.Send(ctx, tx) + if err != nil { + return nil, errors.New("failed to send tx with err: " + err.Error()) + } + w.logger.Infof("tx hash: %s", tx.Hash().String()) + w.logger.Info("updated stakes for entire operator set", "quorumNumbers", quorumNumbers) + return receipt, nil + +} + +func (w *AvsEcdsaRegistryChainWriter) UpdateStakesOfOperatorSubsetForAllQuorums( + ctx context.Context, + operators []gethcommon.Address, +) (*gethtypes.Receipt, error) { + w.logger.Info("updating stakes of operator subset for all quorums", "operators", operators) + noSendTxOpts, err := w.txMgr.GetNoSendTxOpts() + if err != nil { + return nil, err + } + tx, err := w.registryCoordinator.UpdateOperators(noSendTxOpts, operators) + if err != nil { + return nil, err + } + receipt, err := w.txMgr.Send(ctx, tx) + if err != nil { + return nil, errors.New("failed to send tx with err: " + err.Error()) + } + w.logger.Infof("tx hash: %s", tx.Hash().String()) + w.logger.Info("updated stakes of operator subset for all quorums", "operators", operators) + return receipt, nil + +} + +func (w *AvsEcdsaRegistryChainWriter) DeregisterOperator( + ctx context.Context, + quorumNumbers []byte, +) (*gethtypes.Receipt, error) { + w.logger.Info("deregistering operator with the AVS's registry coordinator") + noSendTxOpts, err := w.txMgr.GetNoSendTxOpts() + if err != nil { + return nil, err + } + tx, err := w.registryCoordinator.DeregisterOperator(noSendTxOpts, quorumNumbers) + if err != nil { + return nil, err + } + receipt, err := w.txMgr.Send(ctx, tx) + if err != nil { + return nil, errors.New("failed to send tx with err: " + err.Error()) + } + w.logger.Infof("tx hash: %s", tx.Hash().String()) + w.logger.Info("deregistered operator with the AVS's registry coordinator") + return receipt, nil +} diff --git a/chainio/mocks/avsEcdsaRegistryContractsReader.go b/chainio/mocks/avsEcdsaRegistryContractsReader.go index 08a8b2f76..ec702dca4 100644 --- a/chainio/mocks/avsEcdsaRegistryContractsReader.go +++ b/chainio/mocks/avsEcdsaRegistryContractsReader.go @@ -69,3 +69,18 @@ func (mr *MockAvsEcdsaRegistryReaderMockRecorder) GetOperatorsStakeInQuorumsAtBl mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorsStakeInQuorumsAtBlock", reflect.TypeOf((*MockAvsEcdsaRegistryReader)(nil).GetOperatorsStakeInQuorumsAtBlock), arg0, arg1, arg2) } + +// IsOperatorRegistered mocks base method. +func (m *MockAvsEcdsaRegistryReader) IsOperatorRegistered(arg0 *bind.CallOpts, arg1 common.Address) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsOperatorRegistered", arg0, arg1) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IsOperatorRegistered indicates an expected call of IsOperatorRegistered. +func (mr *MockAvsEcdsaRegistryReaderMockRecorder) IsOperatorRegistered(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOperatorRegistered", reflect.TypeOf((*MockAvsEcdsaRegistryReader)(nil).IsOperatorRegistered), arg0, arg1) +} diff --git a/chainio/mocks/avsRegistryContractsWriter.go b/chainio/mocks/avsRegistryContractsWriter.go index b274a0c97..71a374ffd 100644 --- a/chainio/mocks/avsRegistryContractsWriter.go +++ b/chainio/mocks/avsRegistryContractsWriter.go @@ -59,19 +59,19 @@ func (mr *MockAvsRegistryWriterMockRecorder) DeregisterOperator(arg0, arg1, arg2 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeregisterOperator", reflect.TypeOf((*MockAvsRegistryWriter)(nil).DeregisterOperator), arg0, arg1, arg2) } -// RegisterOperatorWithAVSRegistryCoordinator mocks base method. -func (m *MockAvsRegistryWriter) RegisterOperatorWithAVSRegistryCoordinator(arg0 context.Context, arg1 *ecdsa.PrivateKey, arg2 [32]byte, arg3 *big.Int, arg4 *bls.KeyPair, arg5 []byte, arg6 string) (*types.Receipt, error) { +// RegisterOperatorInQuorumWithAVSRegistryCoordinator mocks base method. +func (m *MockAvsRegistryWriter) RegisterOperatorInQuorumWithAVSRegistryCoordinator(arg0 context.Context, arg1 *ecdsa.PrivateKey, arg2 [32]byte, arg3 *big.Int, arg4 *bls.KeyPair, arg5 []byte, arg6 string) (*types.Receipt, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RegisterOperatorWithAVSRegistryCoordinator", arg0, arg1, arg2, arg3, arg4, arg5, arg6) + ret := m.ctrl.Call(m, "RegisterOperatorInQuorumWithAVSRegistryCoordinator", arg0, arg1, arg2, arg3, arg4, arg5, arg6) ret0, _ := ret[0].(*types.Receipt) ret1, _ := ret[1].(error) return ret0, ret1 } -// RegisterOperatorWithAVSRegistryCoordinator indicates an expected call of RegisterOperatorWithAVSRegistryCoordinator. -func (mr *MockAvsRegistryWriterMockRecorder) RegisterOperatorWithAVSRegistryCoordinator(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +// RegisterOperatorInQuorumWithAVSRegistryCoordinator indicates an expected call of RegisterOperatorInQuorumWithAVSRegistryCoordinator. +func (mr *MockAvsRegistryWriterMockRecorder) RegisterOperatorInQuorumWithAVSRegistryCoordinator(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterOperatorWithAVSRegistryCoordinator", reflect.TypeOf((*MockAvsRegistryWriter)(nil).RegisterOperatorWithAVSRegistryCoordinator), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterOperatorInQuorumWithAVSRegistryCoordinator", reflect.TypeOf((*MockAvsRegistryWriter)(nil).RegisterOperatorInQuorumWithAVSRegistryCoordinator), arg0, arg1, arg2, arg3, arg4, arg5, arg6) } // UpdateStakesOfEntireOperatorSetForQuorums mocks base method. diff --git a/chainio/utils/bindings.go b/chainio/utils/bindings.go index a8b4c015a..f1b0e274f 100644 --- a/chainio/utils/bindings.go +++ b/chainio/utils/bindings.go @@ -134,7 +134,7 @@ func NewAVSRegistryContractBindings( blsApkRegistryAddr, err := contractBlsRegistryCoordinator.BlsApkRegistry(&bind.CallOpts{}) if err != nil { - logger.Error("Failed to fetch BLSPubkeyRegistry address", "err", err) + logger.Error("Failed to fetch BLSApkRegistry address", "err", err) return nil, err } contractBlsApkRegistry, err := blsapkregistry.NewContractBLSApkRegistry( @@ -142,7 +142,7 @@ func NewAVSRegistryContractBindings( ethclient, ) if err != nil { - logger.Error("Failed to fetch BLSPubkeyRegistry contract", "err", err) + logger.Error("Failed to fetch BLSApkRegistry contract", "err", err) return nil, err } diff --git a/contracts/bindings/ECDSARegistryCoordinator/binding.go b/contracts/bindings/ECDSARegistryCoordinator/binding.go new file mode 100644 index 000000000..3e8932158 --- /dev/null +++ b/contracts/bindings/ECDSARegistryCoordinator/binding.go @@ -0,0 +1,2612 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contractECDSARegistryCoordinator + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ECDSARegistryCoordinatorECDSAPubkeyRegistrationParams is an auto generated low-level Go binding around an user-defined struct. +type ECDSARegistryCoordinatorECDSAPubkeyRegistrationParams struct { + SigningAddress common.Address + SignatureAndExpiry ISignatureUtilsSignatureWithSaltAndExpiry +} + +// ECDSARegistryCoordinatorOperatorInfo is an auto generated low-level Go binding around an user-defined struct. +type ECDSARegistryCoordinatorOperatorInfo struct { + OperatorId common.Address + Status uint8 +} + +// ECDSARegistryCoordinatorQuorumBitmapUpdate is an auto generated low-level Go binding around an user-defined struct. +type ECDSARegistryCoordinatorQuorumBitmapUpdate struct { + UpdateBlockNumber uint32 + NextUpdateBlockNumber uint32 + QuorumBitmap *big.Int +} + +// ECDSAStakeRegistryStrategyParams is an auto generated low-level Go binding around an user-defined struct. +type ECDSAStakeRegistryStrategyParams struct { + Strategy common.Address + Multiplier *big.Int +} + +// ISignatureUtilsSignatureWithSaltAndExpiry is an auto generated low-level Go binding around an user-defined struct. +type ISignatureUtilsSignatureWithSaltAndExpiry struct { + Signature []byte + Salt [32]byte + Expiry *big.Int +} + +// ContractECDSARegistryCoordinatorMetaData contains all meta data concerning the ContractECDSARegistryCoordinator contract. +var ContractECDSARegistryCoordinatorMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_serviceManager\",\"type\":\"address\",\"internalType\":\"contractIServiceManager\"},{\"name\":\"_stakeRegistry\",\"type\":\"address\",\"internalType\":\"contractECDSAStakeRegistry\"},{\"name\":\"_indexRegistry\",\"type\":\"address\",\"internalType\":\"contractECDSAIndexRegistry\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"PUBKEY_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createQuorum\",\"inputs\":[{\"name\":\"minimumStake\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"strategyParams\",\"type\":\"tuple[]\",\"internalType\":\"structECDSAStakeRegistry.StrategyParams[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deregisterOperator\",\"inputs\":[{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ejectOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ejector\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentQuorumBitmap\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint192\",\"internalType\":\"uint192\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structECDSARegistryCoordinator.OperatorInfo\",\"components\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumECDSARegistryCoordinator.OperatorStatus\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorFromId\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorId\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorStatus\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumECDSARegistryCoordinator.OperatorStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQuorumBitmapAtBlockNumberByIndex\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint192\",\"internalType\":\"uint192\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQuorumBitmapHistoryLength\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQuorumBitmapIndicesAtBlockNumber\",\"inputs\":[{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIds\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getQuorumBitmapUpdateByIndex\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structECDSARegistryCoordinator.QuorumBitmapUpdate\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"quorumBitmap\",\"type\":\"uint192\",\"internalType\":\"uint192\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"indexRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractECDSAIndexRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_ejector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minimumStakes\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"_strategyParams\",\"type\":\"tuple[][]\",\"internalType\":\"structECDSAStakeRegistry.StrategyParams[][]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pubkeyRegistrationMessageHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"quorumCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"quorumUpdateBlockNumber\",\"inputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerOperator\",\"inputs\":[{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structECDSARegistryCoordinator.ECDSAPubkeyRegistrationParams\",\"components\":[{\"name\":\"signingAddress\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"signatureAndExpiry\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"operatorSignature\",\"type\":\"tuple\",\"internalType\":\"structISignatureUtils.SignatureWithSaltAndExpiry\",\"components\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"expiry\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"serviceManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIServiceManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setEjector\",\"inputs\":[{\"name\":\"_ejector\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPauserRegistry\",\"inputs\":[{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stakeRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractECDSAStakeRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperators\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorsForQuorum\",\"inputs\":[{\"name\":\"operatorsPerQuorum\",\"type\":\"address[][]\",\"internalType\":\"address[][]\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"EjectorUpdated\",\"inputs\":[{\"name\":\"prevEjector\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newEjector\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorDeregistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRegistered\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PauserRegistrySet\",\"inputs\":[{\"name\":\"pauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"newPauserRegistry\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIPauserRegistry\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"QuorumBlockNumberUpdated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"blocknumber\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]", + Bin: "0x6101a06040523480156200001257600080fd5b5060405162004b4938038062004b49833981016040819052620000359162000246565b604080518082018252601681527f4156535265676973747279436f6f7264696e61746f720000000000000000000060208083019182528351808501909452600684526576302e302e3160d01b908401528151902060e08190527f6bda7e3f385e48841048390444cced5cc795af87758af67622e5f4f0882c4a996101008190524660a0529192917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6200012d8184846040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6080523060c05261012052505050506001600160a01b038381166101405282811661016052811661018052620001626200016b565b5050506200029a565b600054610100900460ff1615620001d85760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156200022b576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200024357600080fd5b50565b6000806000606084860312156200025c57600080fd5b835162000269816200022d565b60208501519093506200027c816200022d565b60408501519092506200028f816200022d565b809150509250925092565b60805160a05160c05160e05161010051610120516101405161016051610180516147f8620003516000396000818161052c01528181610dca01528181611e16015281816123930152612a5a01526000818161042e01528181611adc01528181611d8d015281816122eb01526129dc0152600081816103180152818161223101526129300152600061312f0152600061317e01526000613159015260006130b2015260006130dc0152600061310601526147f86000f3fe608060405234801561001057600080fd5b50600436106102105760003560e01c80635c975abb116101255780638da5cb5b116100ad578063ca4f2d971161007c578063ca4f2d9714610575578063e4b312c014610588578063f2fde38b146105b1578063fabc1cbc146105c4578063fd39105a146105d757600080fd5b80638da5cb5b146105005780639aa1653d146105085780639e9923c2146105275780639feab8591461054e57600080fd5b80636e3b17db116100f45780636e3b17db14610499578063715018a6146104ac57806380080441146104b4578063828538cd146104d4578063886f1195146104e757600080fd5b80635c975abb146103f657806367c49936146103fe57806368304835146104295780636b389a0f1461045057600080fd5b80633596b242116101a85780635140a548116101775780635140a548146103605780635865c60c14610373578063595c6a67146103935780635ac86ab71461039b5780635c0ae784146103ca57600080fd5b80633596b242146103005780633998fdd3146103135780633c2a7f4c1461033a57806348d1da851461034d57600080fd5b8063231a5abb116101e4578063231a5abb14610299578063249a0c42146102ac57806328f61b31146102da5780632cdd1e86146102ed57600080fd5b8062cf2ab51461021557806310d67a2f1461022a57806313542a4e1461023d578063136439dd14610286575b600080fd5b6102286102233660046138c4565b610617565b005b61022861023836600461391a565b610733565b61026961024b36600461391a565b6001600160a01b039081166000908152609860205260409020541690565b6040516001600160a01b0390911681526020015b60405180910390f35b610228610294366004613937565b6107e6565b6102286102a7366004613abe565b61092a565b6102cc6102ba366004613b0d565b60996020526000908152604090205481565b60405190815260200161027d565b609b54610269906001600160a01b031681565b6102286102fb36600461391a565b610940565b61022861030e366004613c23565b610951565b6102697f000000000000000000000000000000000000000000000000000000000000000081565b6102cc61034836600461391a565b6109a0565b61022861035b366004613d70565b610a0b565b61022861036e366004613e73565b610c00565b61038661038136600461391a565b611188565b60405161027d9190613f16565b610228611203565b6103ba6103a9366004613b0d565b6001805460ff9092161b9081161490565b604051901515815260200161027d565b6102696103d836600461391a565b6001600160a01b039081166000908152609a60205260409020541690565b6001546102cc565b61041161040c36600461391a565b6112cf565b6040516001600160c01b03909116815260200161027d565b6102697f000000000000000000000000000000000000000000000000000000000000000081565b61046361045e366004613f41565b6112da565b60408051825163ffffffff908116825260208085015190911690820152918101516001600160c01b03169082015260600161027d565b6102286104a7366004613f6d565b611370565b610228611435565b6104c76104c2366004613fd3565b611449565b60405161027d9190614081565b6104116104e23660046140cb565b611502565b600054610269906201000090046001600160a01b031681565b610269611703565b6096546105159060ff1681565b60405160ff909116815260200161027d565b6102697f000000000000000000000000000000000000000000000000000000000000000081565b6102cc7f95815655292205725291827ed02ac675e9ede8811f9f15aa6699759297eb39ed81565b61022861058336600461410c565b61171c565b6102cc61059636600461391a565b6001600160a01b031660009081526097602052604090205490565b6102286105bf36600461391a565b611783565b6102286105d2366004613937565b6117f9565b61060a6105e536600461391a565b6001600160a01b0316600090815260986020526040902054600160a01b900460ff1690565b60405161027d9190614141565b600154600290600490811614156106495760405162461bcd60e51b81526004016106409061414f565b60405180910390fd5b60005b8281101561072d57600084848381811061066857610668614186565b905060200201602081019061067d919061391a565b6001600160a01b0381811660009081526098602090815260408083208151808301909252805494851682529495509193919290830190600160a01b900460ff1660028111156106ce576106ce613ede565b60028111156106df576106df613ede565b905250805190915060006106f282611955565b90506000610708826001600160c01b03166119d2565b9050610715858583611a9e565b50505050508080610725906141b2565b91505061064c565b50505050565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa91906141cd565b6001600160a01b0316336001600160a01b0316146107da5760405162461bcd60e51b8152600401610640906141ea565b6107e381611b82565b50565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015610833573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108579190614234565b6108735760405162461bcd60e51b815260040161064090614256565b600154818116146108ec5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e70617573653a20696e76616c696420617474656d70742060448201527f746f20756e70617573652066756e6374696f6e616c69747900000000000000006064820152608401610640565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d906020015b60405180910390a250565b610932611c87565b61093c8282611ce6565b5050565b610948611c87565b6107e381611e78565b6001805460009190811614156109795760405162461bcd60e51b81526004016106409061414f565b60006109853385611ee1565b905060006109963383898988611f1b565b5050505050505050565b6000610a057f95815655292205725291827ed02ac675e9ede8811f9f15aa6699759297eb39ed836040516020016109ea9291909182526001600160a01b0316602082015260400190565b60405160208183030381529060405280519060200120612421565b92915050565b600054610100900460ff1615808015610a2b5750600054600160ff909116105b80610a455750303b158015610a45575060005460ff166001145b610aa85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610640565b6000805460ff191660011790558015610acb576000805461ff0019166101001790555b8151835114610b3a5760405162461bcd60e51b815260206004820152603560248201527f5265676973747279436f6f7264696e61746f722e696e697469616c697a653a206044820152740d2dce0eae840d8cadccee8d040dad2e6dac2e8c6d605b1b6064820152608401610640565b610b438761246f565b610b4d85856124c1565b610b5686611e78565b60005b8351811015610bb057610b9e848281518110610b7757610b77614186565b6020026020010151848381518110610b9157610b91614186565b6020026020010151611ce6565b80610ba8816141b2565b915050610b59565b508015610bf7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b60015460029060049081161415610c295760405162461bcd60e51b81526004016106409061414f565b6000610c7184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060965460ff1691506125ad9050565b9050610c7c8161265f565b610cec5760405162461bcd60e51b8152602060048201526047602482015260008051602061476383398151915260448201527f6f7273466f7251756f72756d3a20736f6d652071756f72756d7320646f206e6f6064820152661d08195e1a5cdd60ca1b608482015260a401610640565b848314610d5b5760405162461bcd60e51b8152602060048201526043602482015260008051602061476383398151915260448201527f6f7273466f7251756f72756d3a20696e707574206c656e677468206d69736d616064820152620e8c6d60eb1b608482015260a401610640565b60005b83811015610bf7576000858583818110610d7a57610d7a614186565b919091013560f81c91503690506000898985818110610d9b57610d9b614186565b9050602002810190610dad919061429e565b6040516379a0849160e11b815260ff8616600482015291935091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f341092290602401602060405180830381865afa158015610e19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3d91906142e7565b63ffffffff168114610ed95760405162461bcd60e51b8152602060048201526065602482015260008051602061476383398151915260448201527f6f7273466f7251756f72756d3a206e756d626572206f6620757064617465642060648201527f6f70657261746f727320646f6573206e6f74206d617463682071756f72756d206084820152641d1bdd185b60da1b60a482015260c401610640565b6000805b82811015611127576000848483818110610ef957610ef9614186565b9050602002016020810190610f0e919061391a565b6001600160a01b0381811660009081526098602090815260408083208151808301909252805494851682529495509193919290830190600160a01b900460ff166002811115610f5f57610f5f613ede565b6002811115610f7057610f70613ede565b90525080519091506000610f8382611955565b6001600160c01b03169050600160ff8a1682901c8116146110085760405162461bcd60e51b815260206004820152604460248201819052600080516020614763833981519152908201527f6f7273466f7251756f72756d3a206f70657261746f72206e6f7420696e2071756064820152636f72756d60e01b608482015260a401610640565b856001600160a01b0316846001600160a01b0316116110b35760405162461bcd60e51b8152602060048201526067602482015260008051602061476383398151915260448201527f6f7273466f7251756f72756d3a206f70657261746f7273206172726179206d7560648201527f737420626520736f7274656420696e20617363656e64696e6720616464726573608482015266399037b93232b960c91b60a482015260c401610640565b5061111183838f8f8d908e60016110ca9190614304565b926110d79392919061431c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a9e92505050565b509092506111209050816141b2565b9050610edd565b5060ff8416600081815260996020908152604091829020439081905591519182527f46077d55330763f16269fd75e5761663f4192d2791747c0189b16ad31db07db4910160405180910390a25050505080611181906141b2565b9050610d5e565b60408051808201909152600080825260208201526001600160a01b03828116600090815260986020908152604091829020825180840190935280549384168352919290830190600160a01b900460ff1660028111156111e9576111e9613ede565b60028111156111fa576111fa613ede565b90525092915050565b60005460405163237dfb4760e11b8152336004820152620100009091046001600160a01b0316906346fbf68e90602401602060405180830381865afa158015611250573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112749190614234565b6112905760405162461bcd60e51b815260040161064090614256565b600019600181905560405190815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a2565b6000610a0582611955565b60408051606081018252600080825260208083018290528284018290526001600160a01b0386168252609790529190912080548390811061131d5761131d614186565b600091825260209182902060408051606081018252929091015463ffffffff808216845264010000000082041693830193909352600160401b9092046001600160c01b0316918101919091529392505050565b609b546001600160a01b031633146113f05760405162461bcd60e51b815260206004820152603a60248201527f5265676973747279436f6f7264696e61746f722e6f6e6c79456a6563746f723a60448201527f2063616c6c6572206973206e6f742074686520656a6563746f720000000000006064820152608401610640565b6114308383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061268f92505050565b505050565b61143d611c87565b611447600061246f565b565b6060600082516001600160401b038111156114665761146661396a565b60405190808252806020026020018201604052801561148f578160200160208202803683370190505b50905060005b83518110156114fa576114c1858583815181106114b4576114b4614186565b6020026020010151612ace565b8282815181106114d3576114d3614186565b63ffffffff90921660209283029190910190910152806114f2816141b2565b915050611495565b509392505050565b6001600160a01b038316600090815260976020526040812080548291908490811061152f5761152f614186565b600091825260209182902060408051606081018252929091015463ffffffff8082168085526401000000008304821695850195909552600160401b9091046001600160c01b0316918301919091529092508516101561162a5760405162461bcd60e51b815260206004820152606560248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d61704174426c6f636b4e756d6265724279496e6465783a2071756f72756d4260648201527f69746d61705570646174652069732066726f6d20616674657220626c6f636b4e6084820152643ab6b132b960d91b60a482015260c401610640565b602081015163ffffffff1615806116505750806020015163ffffffff168463ffffffff16105b6116f75760405162461bcd60e51b815260206004820152606660248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d61704174426c6f636b4e756d6265724279496e6465783a2071756f72756d4260648201527f69746d61705570646174652069732066726f6d206265666f726520626c6f636b608482015265273ab6b132b960d11b60a482015260c401610640565b60400151949350505050565b60006117176064546001600160a01b031690565b905090565b60018054600290811614156117435760405162461bcd60e51b81526004016106409061414f565b6114303384848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061268f92505050565b61178b611c87565b6001600160a01b0381166117f05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610640565b6107e38161246f565b600060029054906101000a90046001600160a01b03166001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561184c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187091906141cd565b6001600160a01b0316336001600160a01b0316146118a05760405162461bcd60e51b8152600401610640906141ea565b60015419811960015419161461191e5760405162461bcd60e51b815260206004820152603860248201527f5061757361626c652e756e70617573653a20696e76616c696420617474656d7060448201527f7420746f2070617573652066756e6374696f6e616c69747900000000000000006064820152608401610640565b600181905560405181815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200161091f565b6001600160a01b0381166000908152609760205260408120548061197c5750600092915050565b6001600160a01b038316600090815260976020526040902061199f600183614346565b815481106119af576119af614186565b600091825260209091200154600160401b90046001600160c01b03169392505050565b60606000806119e084612c19565b61ffff166001600160401b038111156119fb576119fb61396a565b6040519080825280601f01601f191660200182016040528015611a25576020820181803683370190505b5090506000805b825182108015611a3d575061010081105b15611a94576001811b935085841615611a84578060f81b838381518110611a6657611a66614186565b60200101906001600160f81b031916908160001a9053508160010191505b611a8d816141b2565b9050611a2c565b5090949350505050565b600182602001516002811115611ab657611ab6613ede565b14611ac057505050565b81516040516341bddc1760e11b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063837bb82e90611b15908890869088906004016143aa565b6020604051808303816000875af1158015611b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5891906143df565b6001600160c01b031690508015611b7b57611b7b85611b76836119d2565b61268f565b5050505050565b6001600160a01b038116611c105760405162461bcd60e51b815260206004820152604960248201527f5061757361626c652e5f73657450617573657252656769737472793a206e657760448201527f50617573657252656769737472792063616e6e6f7420626520746865207a65726064820152686f206164647265737360b81b608482015260a401610640565b600054604080516001600160a01b03620100009093048316815291831660208301527f6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6910160405180910390a1600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b33611c90611703565b6001600160a01b0316146114475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610640565b60965460ff1660c08110611d5a5760405162461bcd60e51b815260206004820152603560248201527f5265676973747279436f6f7264696e61746f722e63726561746551756f72756d6044820152740e881b585e081c5d5bdc9d5b5cc81c995858da1959605a1b6064820152608401610640565b611d65816001614408565b6096805460ff191660ff9290921691909117905560405160016296b58960e01b0319815281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ff694a7790611dce9084908890889060040161442d565b600060405180830381600087803b158015611de857600080fd5b505af1158015611dfc573d6000803e3d6000fd5b505060405163136ca0f960e11b815260ff841660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506326d941f29150602401600060405180830381600087803b158015611e6457600080fd5b505af1158015610996573d6000803e3d6000fd5b609b54604080516001600160a01b03928316815291831660208301527f8f30ab09f43a6c157d7fce7e0a13c003042c1c95e8a72e7a146a21c0caa24dc9910160405180910390a1609b80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038083166000908152609860205260409020541680610a0557611f148383611f0f866109a0565b612c44565b9392505050565b611f3f60405180606001604052806060815260200160608152602001606081525090565b6000611f8785858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060965460ff1691506125ad9050565b90506000611f9487611955565b90506001600160c01b0382166120125760405162461bcd60e51b815260206004820152603960248201527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a206269746d61702063616e6e6f742062652030000000000000006064820152608401610640565b61201b8261265f565b61208f576040805162461bcd60e51b81526020600482015260248101919091527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a20736f6d652071756f72756d7320646f206e6f742065786973746064820152608401610640565b8082166001600160c01b0316156121455760405162461bcd60e51b815260206004820152606860248201527f5265676973747279436f6f7264696e61746f722e5f72656769737465724f706560448201527f7261746f723a206f70657261746f7220616c726561647920726567697374657260648201527f656420666f7220736f6d652071756f72756d73206265696e672072656769737460848201526732b932b2103337b960c11b60a482015260c401610640565b6001600160c01b038181169083161761215e8882612ebb565b60016001600160a01b038a16600090815260986020526040902054600160a01b900460ff16600281111561219457612194613ede565b146122d457604080518082019091526001600160a01b038916815260208101600190526001600160a01b03808b1660009081526098602090815260409091208351815493166001600160a01b0319841681178255918401519092909183916001600160a81b03191617600160a01b83600281111561221457612214613ede565b021790555050604051639926ee7d60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169150639926ee7d90612269908c9089906004016144ab565b600060405180830381600087803b15801561228357600080fd5b505af1158015612297573d6000803e3d6000fd5b50506040516001600160a01b03808c1693508c1691507fa453db612af59e5521d6ab9284dc3e2d06af286eb1b1b7b771fce4716c19f2c190600090a35b60405163781c8f2d60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f0391e5a90612326908c908c908c908c9060040161451f565b6000604051808303816000875af1158015612345573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261236d91908101906145ba565b604080870191909152602086019190915251631fd93ca960e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633fb27952906123cc908b908b908b90600401614613565b6000604051808303816000875af11580156123eb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124139190810190614638565b845250505095945050505050565b6000610a0561242e6130a5565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b606480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000546201000090046001600160a01b03161580156124e857506001600160a01b03821615155b61256a5760405162461bcd60e51b815260206004820152604760248201527f5061757361626c652e5f696e697469616c697a655061757365723a205f696e6960448201527f7469616c697a6550617573657228292063616e206f6e6c792062652063616c6c6064820152666564206f6e636560c81b608482015260a401610640565b600181905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a261093c82611b82565b6000806125b9846131cc565b90508015611f14578260ff1684600186516125d49190614346565b815181106125e4576125e4614186565b016020015160f81c10611f145760405162461bcd60e51b815260206004820152603f60248201527f4269746d61705574696c732e6f72646572656442797465734172726179546f4260448201527f69746d61703a206269746d61702065786365656473206d61782076616c7565006064820152608401610640565b60965460009081906126799060019060ff1681901b614346565b9050611f146001600160c01b0384168281161490565b6001600160a01b038083166000908152609860205260409020805490911660018254600160a01b900460ff1660028111156126cc576126cc613ede565b146127395760405162461bcd60e51b815260206004820152604360248201526000805160206147a383398151915260448201527f70657261746f723a206f70657261746f72206973206e6f7420726567697374656064820152621c995960ea1b608482015260a401610640565b60965460009061274d90859060ff166125ad565b9050600061275a83611955565b90506001600160c01b0382166127c65760405162461bcd60e51b815260206004820152603b60248201526000805160206147a383398151915260448201527f70657261746f723a206269746d61702063616e6e6f74206265203000000000006064820152608401610640565b6127cf8261265f565b61283a5760405162461bcd60e51b815260206004820152604260248201526000805160206147a383398151915260448201527f70657261746f723a20736f6d652071756f72756d7320646f206e6f74206578696064820152611cdd60f21b608482015260a401610640565b6128516001600160c01b0383811690831681161490565b6128d75760405162461bcd60e51b815260206004820152605960248201526000805160206147a383398151915260448201527f70657261746f723a206f70657261746f72206973206e6f74207265676973746560648201527f72656420666f72207370656369666965642071756f72756d7300000000000000608482015260a401610640565b6001600160c01b03828116198216166128f08482612ebb565b6001600160c01b0381166129c5578454600160a11b60ff60a01b199091161785556040516351b27a6d60e11b81526001600160a01b0388811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a364f4da90602401600060405180830381600087803b15801561297457600080fd5b505af1158015612988573d6000803e3d6000fd5b50506040516001600160a01b0380881693508a1691507f31e0adfec71bccee37b6e83a90c2fedb17d8f1693fee863c4771e7bfe2aed58090600090a35b60405163f4e24fe560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f4e24fe590612a139087908a906004016146d1565b600060405180830381600087803b158015612a2d57600080fd5b505af1158015612a41573d6000803e3d6000fd5b505060405163f4e24fe560e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063f4e24fe59150612a939087908a906004016146d1565b600060405180830381600087803b158015612aad57600080fd5b505af1158015612ac1573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b038116600090815260976020526040812054815b81811015612b6f576001612afd8284614346565b612b079190614346565b6001600160a01b0385166000908152609760205260409020805491945063ffffffff80881692908616908110612b3f57612b3f614186565b60009182526020909120015463ffffffff1611612b5d575050610a05565b80612b67816141b2565b915050612ae9565b5060405162461bcd60e51b815260206004820152606c60248201527f5265676973747279436f6f7264696e61746f722e67657451756f72756d42697460448201527f6d6170496e6465784174426c6f636b4e756d6265723a206e6f206269746d617060648201527f2075706461746520666f756e6420666f72206f70657261746f7249642061742060848201526b313637b1b590373ab6b132b960a11b60a482015260c401610640565b6000805b8215610a0557612c2e600184614346565b9092169180612c3c816146fd565b915050612c1d565b81516000906001600160a01b0316612cc85760405162461bcd60e51b815260206004820152604d602482015260008051602061478383398151915260448201527f657245434453415075626c69634b65793a2063616e6e6f74207265676973746560648201526c72207a65726f207075626b657960981b608482015260a401610640565b6001600160a01b038481166000908152609860205260409020541615612d615760405162461bcd60e51b8152602060048201526054602482015260008051602061478383398151915260448201527f657245434453415075626c69634b65793a206f70657261746f7220616c72656160648201527364792072656769737465726564207075626b657960601b608482015260a401610640565b5081516001600160a01b038082166000908152609a60205260409020541615612df85760405162461bcd60e51b815260206004820152604f602482015260008051602061478383398151915260448201527f657245434453415075626c69634b65793a207075626c6963206b657920616c7260648201526e1958591e481c9959da5cdd195c9959608a1b608482015260a401610640565b428360200151604001511015612e705760405162461bcd60e51b8152602060048201526043602482015260008051602061478383398151915260448201527f657245434453415075626c69634b65793a207369676e617475726520657870696064820152621c995960ea1b608482015260a401610640565b8251602084015151612e8491908490613359565b6001600160a01b038082166000908152609a6020526040902080549186166001600160a01b03199092169190911790559392505050565b6001600160a01b03821660009081526097602052604090205480612f75576001600160a01b0383166000908152609760209081526040808320815160608101835263ffffffff43811682528185018681526001600160c01b03808a16958401958652845460018101865594885295909620915191909201805495519351909416600160401b026001600160401b039383166401000000000267ffffffffffffffff1990961691909216179390931716919091179055505050565b6001600160a01b0383166000908152609760205260408120612f98600184614346565b81548110612fa857612fa8614186565b600091825260209091200180549091504363ffffffff90811691161415612fec5780546001600160401b0316600160401b6001600160c01b0385160217815561072d565b805463ffffffff43811664010000000081810267ffffffff00000000199094169390931784556001600160a01b038716600090815260976020908152604080832081516060810183529485528483018481526001600160c01b03808c1693870193845282546001810184559286529390942094519401805493519151909216600160401b026001600160401b0391861690960267ffffffffffffffff199093169390941692909217179190911691909117905550505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156130fe57507f000000000000000000000000000000000000000000000000000000000000000046145b1561312857507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000610100825111156132555760405162461bcd60e51b8152602060048201526044602482018190527f4269746d61705574696c732e6f72646572656442797465734172726179546f42908201527f69746d61703a206f7264657265644279746573417272617920697320746f6f206064820152636c6f6e6760e01b608482015260a401610640565b815161326357506000919050565b6000808360008151811061327957613279614186565b0160200151600160f89190911c81901b92505b8451811015613350578481815181106132a7576132a7614186565b0160200151600160f89190911c1b915082821161333c5760405162461bcd60e51b815260206004820152604760248201527f4269746d61705574696c732e6f72646572656442797465734172726179546f4260448201527f69746d61703a206f72646572656442797465734172726179206973206e6f74206064820152661bdc99195c995960ca1b608482015260a401610640565b91811791613349816141b2565b905061328c565b50909392505050565b6001600160a01b0383163b1561347357604051630b135d3f60e11b808252906001600160a01b03851690631626ba7e90613399908690869060040161471f565b602060405180830381865afa1580156133b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133da9190614738565b6001600160e01b031916146114305760405162461bcd60e51b815260206004820152605360248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a2045524331323731207369676e6174757265206064820152721d995c9a599a58d85d1a5bdb8819985a5b1959606a1b608482015260a401610640565b826001600160a01b03166134878383613513565b6001600160a01b0316146114305760405162461bcd60e51b815260206004820152604760248201527f454950313237315369676e61747572655574696c732e636865636b5369676e6160448201527f747572655f454950313237313a207369676e6174757265206e6f742066726f6d6064820152661039b4b3b732b960c91b608482015260a401610640565b6000806000613522858561352f565b915091506114fa8161359f565b60008082516041141561356657602083015160408401516060850", +} + +// ContractECDSARegistryCoordinatorABI is the input ABI used to generate the binding from. +// Deprecated: Use ContractECDSARegistryCoordinatorMetaData.ABI instead. +var ContractECDSARegistryCoordinatorABI = ContractECDSARegistryCoordinatorMetaData.ABI + +// ContractECDSARegistryCoordinatorBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ContractECDSARegistryCoordinatorMetaData.Bin instead. +var ContractECDSARegistryCoordinatorBin = ContractECDSARegistryCoordinatorMetaData.Bin + +// DeployContractECDSARegistryCoordinator deploys a new Ethereum contract, binding an instance of ContractECDSARegistryCoordinator to it. +func DeployContractECDSARegistryCoordinator(auth *bind.TransactOpts, backend bind.ContractBackend, _serviceManager common.Address, _stakeRegistry common.Address, _indexRegistry common.Address) (common.Address, *types.Transaction, *ContractECDSARegistryCoordinator, error) { + parsed, err := ContractECDSARegistryCoordinatorMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ContractECDSARegistryCoordinatorBin), backend, _serviceManager, _stakeRegistry, _indexRegistry) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ContractECDSARegistryCoordinator{ContractECDSARegistryCoordinatorCaller: ContractECDSARegistryCoordinatorCaller{contract: contract}, ContractECDSARegistryCoordinatorTransactor: ContractECDSARegistryCoordinatorTransactor{contract: contract}, ContractECDSARegistryCoordinatorFilterer: ContractECDSARegistryCoordinatorFilterer{contract: contract}}, nil +} + +// ContractECDSARegistryCoordinatorMethods is an auto generated interface around an Ethereum contract. +type ContractECDSARegistryCoordinatorMethods interface { + ContractECDSARegistryCoordinatorCalls + ContractECDSARegistryCoordinatorTransacts + ContractECDSARegistryCoordinatorFilters +} + +// ContractECDSARegistryCoordinatorCalls is an auto generated interface that defines the call methods available for an Ethereum contract. +type ContractECDSARegistryCoordinatorCalls interface { + PUBKEYREGISTRATIONTYPEHASH(opts *bind.CallOpts) ([32]byte, error) + + Ejector(opts *bind.CallOpts) (common.Address, error) + + GetCurrentQuorumBitmap(opts *bind.CallOpts, operatorId common.Address) (*big.Int, error) + + GetOperator(opts *bind.CallOpts, operator common.Address) (ECDSARegistryCoordinatorOperatorInfo, error) + + GetOperatorFromId(opts *bind.CallOpts, operatorId common.Address) (common.Address, error) + + GetOperatorId(opts *bind.CallOpts, operator common.Address) (common.Address, error) + + GetOperatorStatus(opts *bind.CallOpts, operator common.Address) (uint8, error) + + GetQuorumBitmapAtBlockNumberByIndex(opts *bind.CallOpts, operatorId common.Address, blockNumber uint32, index *big.Int) (*big.Int, error) + + GetQuorumBitmapHistoryLength(opts *bind.CallOpts, operatorId common.Address) (*big.Int, error) + + GetQuorumBitmapIndicesAtBlockNumber(opts *bind.CallOpts, blockNumber uint32, operatorIds []common.Address) ([]uint32, error) + + GetQuorumBitmapUpdateByIndex(opts *bind.CallOpts, operatorId common.Address, index *big.Int) (ECDSARegistryCoordinatorQuorumBitmapUpdate, error) + + IndexRegistry(opts *bind.CallOpts) (common.Address, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + Paused(opts *bind.CallOpts, index uint8) (bool, error) + + Paused0(opts *bind.CallOpts) (*big.Int, error) + + PauserRegistry(opts *bind.CallOpts) (common.Address, error) + + PubkeyRegistrationMessageHash(opts *bind.CallOpts, operator common.Address) ([32]byte, error) + + QuorumCount(opts *bind.CallOpts) (uint8, error) + + QuorumUpdateBlockNumber(opts *bind.CallOpts, arg0 uint8) (*big.Int, error) + + ServiceManager(opts *bind.CallOpts) (common.Address, error) + + StakeRegistry(opts *bind.CallOpts) (common.Address, error) +} + +// ContractECDSARegistryCoordinatorTransacts is an auto generated interface that defines the transact methods available for an Ethereum contract. +type ContractECDSARegistryCoordinatorTransacts interface { + CreateQuorum(opts *bind.TransactOpts, minimumStake *big.Int, strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) + + DeregisterOperator(opts *bind.TransactOpts, quorumNumbers []byte) (*types.Transaction, error) + + EjectOperator(opts *bind.TransactOpts, operator common.Address, quorumNumbers []byte) (*types.Transaction, error) + + Initialize(opts *bind.TransactOpts, _initialOwner common.Address, _ejector common.Address, _pauserRegistry common.Address, _initialPausedStatus *big.Int, _minimumStakes []*big.Int, _strategyParams [][]ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) + + Pause(opts *bind.TransactOpts, newPausedStatus *big.Int) (*types.Transaction, error) + + PauseAll(opts *bind.TransactOpts) (*types.Transaction, error) + + RegisterOperator(opts *bind.TransactOpts, quorumNumbers []byte, params ECDSARegistryCoordinatorECDSAPubkeyRegistrationParams, operatorSignature ISignatureUtilsSignatureWithSaltAndExpiry) (*types.Transaction, error) + + RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + SetEjector(opts *bind.TransactOpts, _ejector common.Address) (*types.Transaction, error) + + SetPauserRegistry(opts *bind.TransactOpts, newPauserRegistry common.Address) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) + + Unpause(opts *bind.TransactOpts, newPausedStatus *big.Int) (*types.Transaction, error) + + UpdateOperators(opts *bind.TransactOpts, operators []common.Address) (*types.Transaction, error) + + UpdateOperatorsForQuorum(opts *bind.TransactOpts, operatorsPerQuorum [][]common.Address, quorumNumbers []byte) (*types.Transaction, error) +} + +// ContractECDSARegistryCoordinatorFilterer is an auto generated interface that defines the log filtering methods available for an Ethereum contract. +type ContractECDSARegistryCoordinatorFilters interface { + FilterEjectorUpdated(opts *bind.FilterOpts) (*ContractECDSARegistryCoordinatorEjectorUpdatedIterator, error) + WatchEjectorUpdated(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorEjectorUpdated) (event.Subscription, error) + ParseEjectorUpdated(log types.Log) (*ContractECDSARegistryCoordinatorEjectorUpdated, error) + + FilterInitialized(opts *bind.FilterOpts) (*ContractECDSARegistryCoordinatorInitializedIterator, error) + WatchInitialized(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorInitialized) (event.Subscription, error) + ParseInitialized(log types.Log) (*ContractECDSARegistryCoordinatorInitialized, error) + + FilterOperatorDeregistered(opts *bind.FilterOpts, operator []common.Address, operatorId []common.Address) (*ContractECDSARegistryCoordinatorOperatorDeregisteredIterator, error) + WatchOperatorDeregistered(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorOperatorDeregistered, operator []common.Address, operatorId []common.Address) (event.Subscription, error) + ParseOperatorDeregistered(log types.Log) (*ContractECDSARegistryCoordinatorOperatorDeregistered, error) + + FilterOperatorRegistered(opts *bind.FilterOpts, operator []common.Address, operatorId []common.Address) (*ContractECDSARegistryCoordinatorOperatorRegisteredIterator, error) + WatchOperatorRegistered(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorOperatorRegistered, operator []common.Address, operatorId []common.Address) (event.Subscription, error) + ParseOperatorRegistered(log types.Log) (*ContractECDSARegistryCoordinatorOperatorRegistered, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ContractECDSARegistryCoordinatorOwnershipTransferredIterator, error) + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) + ParseOwnershipTransferred(log types.Log) (*ContractECDSARegistryCoordinatorOwnershipTransferred, error) + + FilterPaused(opts *bind.FilterOpts, account []common.Address) (*ContractECDSARegistryCoordinatorPausedIterator, error) + WatchPaused(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorPaused, account []common.Address) (event.Subscription, error) + ParsePaused(log types.Log) (*ContractECDSARegistryCoordinatorPaused, error) + + FilterPauserRegistrySet(opts *bind.FilterOpts) (*ContractECDSARegistryCoordinatorPauserRegistrySetIterator, error) + WatchPauserRegistrySet(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorPauserRegistrySet) (event.Subscription, error) + ParsePauserRegistrySet(log types.Log) (*ContractECDSARegistryCoordinatorPauserRegistrySet, error) + + FilterQuorumBlockNumberUpdated(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSARegistryCoordinatorQuorumBlockNumberUpdatedIterator, error) + WatchQuorumBlockNumberUpdated(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated, quorumNumber []uint8) (event.Subscription, error) + ParseQuorumBlockNumberUpdated(log types.Log) (*ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated, error) + + FilterUnpaused(opts *bind.FilterOpts, account []common.Address) (*ContractECDSARegistryCoordinatorUnpausedIterator, error) + WatchUnpaused(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorUnpaused, account []common.Address) (event.Subscription, error) + ParseUnpaused(log types.Log) (*ContractECDSARegistryCoordinatorUnpaused, error) +} + +// ContractECDSARegistryCoordinator is an auto generated Go binding around an Ethereum contract. +type ContractECDSARegistryCoordinator struct { + ContractECDSARegistryCoordinatorCaller // Read-only binding to the contract + ContractECDSARegistryCoordinatorTransactor // Write-only binding to the contract + ContractECDSARegistryCoordinatorFilterer // Log filterer for contract events +} + +// ContractECDSARegistryCoordinator implements the ContractECDSARegistryCoordinatorMethods interface. +var _ ContractECDSARegistryCoordinatorMethods = (*ContractECDSARegistryCoordinator)(nil) + +// ContractECDSARegistryCoordinatorCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContractECDSARegistryCoordinatorCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSARegistryCoordinatorCaller implements the ContractECDSARegistryCoordinatorCalls interface. +var _ ContractECDSARegistryCoordinatorCalls = (*ContractECDSARegistryCoordinatorCaller)(nil) + +// ContractECDSARegistryCoordinatorTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContractECDSARegistryCoordinatorTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSARegistryCoordinatorTransactor implements the ContractECDSARegistryCoordinatorTransacts interface. +var _ ContractECDSARegistryCoordinatorTransacts = (*ContractECDSARegistryCoordinatorTransactor)(nil) + +// ContractECDSARegistryCoordinatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContractECDSARegistryCoordinatorFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSARegistryCoordinatorFilterer implements the ContractECDSARegistryCoordinatorFilters interface. +var _ ContractECDSARegistryCoordinatorFilters = (*ContractECDSARegistryCoordinatorFilterer)(nil) + +// ContractECDSARegistryCoordinatorSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContractECDSARegistryCoordinatorSession struct { + Contract *ContractECDSARegistryCoordinator // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContractECDSARegistryCoordinatorCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContractECDSARegistryCoordinatorCallerSession struct { + Contract *ContractECDSARegistryCoordinatorCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContractECDSARegistryCoordinatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContractECDSARegistryCoordinatorTransactorSession struct { + Contract *ContractECDSARegistryCoordinatorTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContractECDSARegistryCoordinatorRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContractECDSARegistryCoordinatorRaw struct { + Contract *ContractECDSARegistryCoordinator // Generic contract binding to access the raw methods on +} + +// ContractECDSARegistryCoordinatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContractECDSARegistryCoordinatorCallerRaw struct { + Contract *ContractECDSARegistryCoordinatorCaller // Generic read-only contract binding to access the raw methods on +} + +// ContractECDSARegistryCoordinatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContractECDSARegistryCoordinatorTransactorRaw struct { + Contract *ContractECDSARegistryCoordinatorTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContractECDSARegistryCoordinator creates a new instance of ContractECDSARegistryCoordinator, bound to a specific deployed contract. +func NewContractECDSARegistryCoordinator(address common.Address, backend bind.ContractBackend) (*ContractECDSARegistryCoordinator, error) { + contract, err := bindContractECDSARegistryCoordinator(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinator{ContractECDSARegistryCoordinatorCaller: ContractECDSARegistryCoordinatorCaller{contract: contract}, ContractECDSARegistryCoordinatorTransactor: ContractECDSARegistryCoordinatorTransactor{contract: contract}, ContractECDSARegistryCoordinatorFilterer: ContractECDSARegistryCoordinatorFilterer{contract: contract}}, nil +} + +// NewContractECDSARegistryCoordinatorCaller creates a new read-only instance of ContractECDSARegistryCoordinator, bound to a specific deployed contract. +func NewContractECDSARegistryCoordinatorCaller(address common.Address, caller bind.ContractCaller) (*ContractECDSARegistryCoordinatorCaller, error) { + contract, err := bindContractECDSARegistryCoordinator(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorCaller{contract: contract}, nil +} + +// NewContractECDSARegistryCoordinatorTransactor creates a new write-only instance of ContractECDSARegistryCoordinator, bound to a specific deployed contract. +func NewContractECDSARegistryCoordinatorTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractECDSARegistryCoordinatorTransactor, error) { + contract, err := bindContractECDSARegistryCoordinator(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorTransactor{contract: contract}, nil +} + +// NewContractECDSARegistryCoordinatorFilterer creates a new log filterer instance of ContractECDSARegistryCoordinator, bound to a specific deployed contract. +func NewContractECDSARegistryCoordinatorFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractECDSARegistryCoordinatorFilterer, error) { + contract, err := bindContractECDSARegistryCoordinator(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorFilterer{contract: contract}, nil +} + +// bindContractECDSARegistryCoordinator binds a generic wrapper to an already deployed contract. +func bindContractECDSARegistryCoordinator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ContractECDSARegistryCoordinatorMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContractECDSARegistryCoordinator.Contract.ContractECDSARegistryCoordinatorCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.ContractECDSARegistryCoordinatorTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.ContractECDSARegistryCoordinatorTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContractECDSARegistryCoordinator.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.contract.Transact(opts, method, params...) +} + +// PUBKEYREGISTRATIONTYPEHASH is a free data retrieval call binding the contract method 0x9feab859. +// +// Solidity: function PUBKEY_REGISTRATION_TYPEHASH() view returns(bytes32) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) PUBKEYREGISTRATIONTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "PUBKEY_REGISTRATION_TYPEHASH") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PUBKEYREGISTRATIONTYPEHASH is a free data retrieval call binding the contract method 0x9feab859. +// +// Solidity: function PUBKEY_REGISTRATION_TYPEHASH() view returns(bytes32) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) PUBKEYREGISTRATIONTYPEHASH() ([32]byte, error) { + return _ContractECDSARegistryCoordinator.Contract.PUBKEYREGISTRATIONTYPEHASH(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// PUBKEYREGISTRATIONTYPEHASH is a free data retrieval call binding the contract method 0x9feab859. +// +// Solidity: function PUBKEY_REGISTRATION_TYPEHASH() view returns(bytes32) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) PUBKEYREGISTRATIONTYPEHASH() ([32]byte, error) { + return _ContractECDSARegistryCoordinator.Contract.PUBKEYREGISTRATIONTYPEHASH(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// Ejector is a free data retrieval call binding the contract method 0x28f61b31. +// +// Solidity: function ejector() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) Ejector(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "ejector") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Ejector is a free data retrieval call binding the contract method 0x28f61b31. +// +// Solidity: function ejector() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) Ejector() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.Ejector(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// Ejector is a free data retrieval call binding the contract method 0x28f61b31. +// +// Solidity: function ejector() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) Ejector() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.Ejector(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// GetCurrentQuorumBitmap is a free data retrieval call binding the contract method 0x67c49936. +// +// Solidity: function getCurrentQuorumBitmap(address operatorId) view returns(uint192) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetCurrentQuorumBitmap(opts *bind.CallOpts, operatorId common.Address) (*big.Int, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getCurrentQuorumBitmap", operatorId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCurrentQuorumBitmap is a free data retrieval call binding the contract method 0x67c49936. +// +// Solidity: function getCurrentQuorumBitmap(address operatorId) view returns(uint192) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetCurrentQuorumBitmap(operatorId common.Address) (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.GetCurrentQuorumBitmap(&_ContractECDSARegistryCoordinator.CallOpts, operatorId) +} + +// GetCurrentQuorumBitmap is a free data retrieval call binding the contract method 0x67c49936. +// +// Solidity: function getCurrentQuorumBitmap(address operatorId) view returns(uint192) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetCurrentQuorumBitmap(operatorId common.Address) (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.GetCurrentQuorumBitmap(&_ContractECDSARegistryCoordinator.CallOpts, operatorId) +} + +// GetOperator is a free data retrieval call binding the contract method 0x5865c60c. +// +// Solidity: function getOperator(address operator) view returns((address,uint8)) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetOperator(opts *bind.CallOpts, operator common.Address) (ECDSARegistryCoordinatorOperatorInfo, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getOperator", operator) + + if err != nil { + return *new(ECDSARegistryCoordinatorOperatorInfo), err + } + + out0 := *abi.ConvertType(out[0], new(ECDSARegistryCoordinatorOperatorInfo)).(*ECDSARegistryCoordinatorOperatorInfo) + + return out0, err + +} + +// GetOperator is a free data retrieval call binding the contract method 0x5865c60c. +// +// Solidity: function getOperator(address operator) view returns((address,uint8)) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetOperator(operator common.Address) (ECDSARegistryCoordinatorOperatorInfo, error) { + return _ContractECDSARegistryCoordinator.Contract.GetOperator(&_ContractECDSARegistryCoordinator.CallOpts, operator) +} + +// GetOperator is a free data retrieval call binding the contract method 0x5865c60c. +// +// Solidity: function getOperator(address operator) view returns((address,uint8)) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetOperator(operator common.Address) (ECDSARegistryCoordinatorOperatorInfo, error) { + return _ContractECDSARegistryCoordinator.Contract.GetOperator(&_ContractECDSARegistryCoordinator.CallOpts, operator) +} + +// GetOperatorFromId is a free data retrieval call binding the contract method 0x5c0ae784. +// +// Solidity: function getOperatorFromId(address operatorId) view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetOperatorFromId(opts *bind.CallOpts, operatorId common.Address) (common.Address, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getOperatorFromId", operatorId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetOperatorFromId is a free data retrieval call binding the contract method 0x5c0ae784. +// +// Solidity: function getOperatorFromId(address operatorId) view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetOperatorFromId(operatorId common.Address) (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.GetOperatorFromId(&_ContractECDSARegistryCoordinator.CallOpts, operatorId) +} + +// GetOperatorFromId is a free data retrieval call binding the contract method 0x5c0ae784. +// +// Solidity: function getOperatorFromId(address operatorId) view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetOperatorFromId(operatorId common.Address) (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.GetOperatorFromId(&_ContractECDSARegistryCoordinator.CallOpts, operatorId) +} + +// GetOperatorId is a free data retrieval call binding the contract method 0x13542a4e. +// +// Solidity: function getOperatorId(address operator) view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetOperatorId(opts *bind.CallOpts, operator common.Address) (common.Address, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getOperatorId", operator) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetOperatorId is a free data retrieval call binding the contract method 0x13542a4e. +// +// Solidity: function getOperatorId(address operator) view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetOperatorId(operator common.Address) (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.GetOperatorId(&_ContractECDSARegistryCoordinator.CallOpts, operator) +} + +// GetOperatorId is a free data retrieval call binding the contract method 0x13542a4e. +// +// Solidity: function getOperatorId(address operator) view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetOperatorId(operator common.Address) (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.GetOperatorId(&_ContractECDSARegistryCoordinator.CallOpts, operator) +} + +// GetOperatorStatus is a free data retrieval call binding the contract method 0xfd39105a. +// +// Solidity: function getOperatorStatus(address operator) view returns(uint8) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetOperatorStatus(opts *bind.CallOpts, operator common.Address) (uint8, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getOperatorStatus", operator) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetOperatorStatus is a free data retrieval call binding the contract method 0xfd39105a. +// +// Solidity: function getOperatorStatus(address operator) view returns(uint8) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetOperatorStatus(operator common.Address) (uint8, error) { + return _ContractECDSARegistryCoordinator.Contract.GetOperatorStatus(&_ContractECDSARegistryCoordinator.CallOpts, operator) +} + +// GetOperatorStatus is a free data retrieval call binding the contract method 0xfd39105a. +// +// Solidity: function getOperatorStatus(address operator) view returns(uint8) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetOperatorStatus(operator common.Address) (uint8, error) { + return _ContractECDSARegistryCoordinator.Contract.GetOperatorStatus(&_ContractECDSARegistryCoordinator.CallOpts, operator) +} + +// GetQuorumBitmapAtBlockNumberByIndex is a free data retrieval call binding the contract method 0x828538cd. +// +// Solidity: function getQuorumBitmapAtBlockNumberByIndex(address operatorId, uint32 blockNumber, uint256 index) view returns(uint192) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetQuorumBitmapAtBlockNumberByIndex(opts *bind.CallOpts, operatorId common.Address, blockNumber uint32, index *big.Int) (*big.Int, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getQuorumBitmapAtBlockNumberByIndex", operatorId, blockNumber, index) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetQuorumBitmapAtBlockNumberByIndex is a free data retrieval call binding the contract method 0x828538cd. +// +// Solidity: function getQuorumBitmapAtBlockNumberByIndex(address operatorId, uint32 blockNumber, uint256 index) view returns(uint192) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetQuorumBitmapAtBlockNumberByIndex(operatorId common.Address, blockNumber uint32, index *big.Int) (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.GetQuorumBitmapAtBlockNumberByIndex(&_ContractECDSARegistryCoordinator.CallOpts, operatorId, blockNumber, index) +} + +// GetQuorumBitmapAtBlockNumberByIndex is a free data retrieval call binding the contract method 0x828538cd. +// +// Solidity: function getQuorumBitmapAtBlockNumberByIndex(address operatorId, uint32 blockNumber, uint256 index) view returns(uint192) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetQuorumBitmapAtBlockNumberByIndex(operatorId common.Address, blockNumber uint32, index *big.Int) (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.GetQuorumBitmapAtBlockNumberByIndex(&_ContractECDSARegistryCoordinator.CallOpts, operatorId, blockNumber, index) +} + +// GetQuorumBitmapHistoryLength is a free data retrieval call binding the contract method 0xe4b312c0. +// +// Solidity: function getQuorumBitmapHistoryLength(address operatorId) view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetQuorumBitmapHistoryLength(opts *bind.CallOpts, operatorId common.Address) (*big.Int, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getQuorumBitmapHistoryLength", operatorId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetQuorumBitmapHistoryLength is a free data retrieval call binding the contract method 0xe4b312c0. +// +// Solidity: function getQuorumBitmapHistoryLength(address operatorId) view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetQuorumBitmapHistoryLength(operatorId common.Address) (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.GetQuorumBitmapHistoryLength(&_ContractECDSARegistryCoordinator.CallOpts, operatorId) +} + +// GetQuorumBitmapHistoryLength is a free data retrieval call binding the contract method 0xe4b312c0. +// +// Solidity: function getQuorumBitmapHistoryLength(address operatorId) view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetQuorumBitmapHistoryLength(operatorId common.Address) (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.GetQuorumBitmapHistoryLength(&_ContractECDSARegistryCoordinator.CallOpts, operatorId) +} + +// GetQuorumBitmapIndicesAtBlockNumber is a free data retrieval call binding the contract method 0x80080441. +// +// Solidity: function getQuorumBitmapIndicesAtBlockNumber(uint32 blockNumber, address[] operatorIds) view returns(uint32[]) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetQuorumBitmapIndicesAtBlockNumber(opts *bind.CallOpts, blockNumber uint32, operatorIds []common.Address) ([]uint32, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getQuorumBitmapIndicesAtBlockNumber", blockNumber, operatorIds) + + if err != nil { + return *new([]uint32), err + } + + out0 := *abi.ConvertType(out[0], new([]uint32)).(*[]uint32) + + return out0, err + +} + +// GetQuorumBitmapIndicesAtBlockNumber is a free data retrieval call binding the contract method 0x80080441. +// +// Solidity: function getQuorumBitmapIndicesAtBlockNumber(uint32 blockNumber, address[] operatorIds) view returns(uint32[]) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetQuorumBitmapIndicesAtBlockNumber(blockNumber uint32, operatorIds []common.Address) ([]uint32, error) { + return _ContractECDSARegistryCoordinator.Contract.GetQuorumBitmapIndicesAtBlockNumber(&_ContractECDSARegistryCoordinator.CallOpts, blockNumber, operatorIds) +} + +// GetQuorumBitmapIndicesAtBlockNumber is a free data retrieval call binding the contract method 0x80080441. +// +// Solidity: function getQuorumBitmapIndicesAtBlockNumber(uint32 blockNumber, address[] operatorIds) view returns(uint32[]) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetQuorumBitmapIndicesAtBlockNumber(blockNumber uint32, operatorIds []common.Address) ([]uint32, error) { + return _ContractECDSARegistryCoordinator.Contract.GetQuorumBitmapIndicesAtBlockNumber(&_ContractECDSARegistryCoordinator.CallOpts, blockNumber, operatorIds) +} + +// GetQuorumBitmapUpdateByIndex is a free data retrieval call binding the contract method 0x6b389a0f. +// +// Solidity: function getQuorumBitmapUpdateByIndex(address operatorId, uint256 index) view returns((uint32,uint32,uint192)) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) GetQuorumBitmapUpdateByIndex(opts *bind.CallOpts, operatorId common.Address, index *big.Int) (ECDSARegistryCoordinatorQuorumBitmapUpdate, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "getQuorumBitmapUpdateByIndex", operatorId, index) + + if err != nil { + return *new(ECDSARegistryCoordinatorQuorumBitmapUpdate), err + } + + out0 := *abi.ConvertType(out[0], new(ECDSARegistryCoordinatorQuorumBitmapUpdate)).(*ECDSARegistryCoordinatorQuorumBitmapUpdate) + + return out0, err + +} + +// GetQuorumBitmapUpdateByIndex is a free data retrieval call binding the contract method 0x6b389a0f. +// +// Solidity: function getQuorumBitmapUpdateByIndex(address operatorId, uint256 index) view returns((uint32,uint32,uint192)) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) GetQuorumBitmapUpdateByIndex(operatorId common.Address, index *big.Int) (ECDSARegistryCoordinatorQuorumBitmapUpdate, error) { + return _ContractECDSARegistryCoordinator.Contract.GetQuorumBitmapUpdateByIndex(&_ContractECDSARegistryCoordinator.CallOpts, operatorId, index) +} + +// GetQuorumBitmapUpdateByIndex is a free data retrieval call binding the contract method 0x6b389a0f. +// +// Solidity: function getQuorumBitmapUpdateByIndex(address operatorId, uint256 index) view returns((uint32,uint32,uint192)) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) GetQuorumBitmapUpdateByIndex(operatorId common.Address, index *big.Int) (ECDSARegistryCoordinatorQuorumBitmapUpdate, error) { + return _ContractECDSARegistryCoordinator.Contract.GetQuorumBitmapUpdateByIndex(&_ContractECDSARegistryCoordinator.CallOpts, operatorId, index) +} + +// IndexRegistry is a free data retrieval call binding the contract method 0x9e9923c2. +// +// Solidity: function indexRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) IndexRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "indexRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// IndexRegistry is a free data retrieval call binding the contract method 0x9e9923c2. +// +// Solidity: function indexRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) IndexRegistry() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.IndexRegistry(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// IndexRegistry is a free data retrieval call binding the contract method 0x9e9923c2. +// +// Solidity: function indexRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) IndexRegistry() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.IndexRegistry(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) Owner() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.Owner(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) Owner() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.Owner(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5ac86ab7. +// +// Solidity: function paused(uint8 index) view returns(bool) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) Paused(opts *bind.CallOpts, index uint8) (bool, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "paused", index) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5ac86ab7. +// +// Solidity: function paused(uint8 index) view returns(bool) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) Paused(index uint8) (bool, error) { + return _ContractECDSARegistryCoordinator.Contract.Paused(&_ContractECDSARegistryCoordinator.CallOpts, index) +} + +// Paused is a free data retrieval call binding the contract method 0x5ac86ab7. +// +// Solidity: function paused(uint8 index) view returns(bool) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) Paused(index uint8) (bool, error) { + return _ContractECDSARegistryCoordinator.Contract.Paused(&_ContractECDSARegistryCoordinator.CallOpts, index) +} + +// Paused0 is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) Paused0(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "paused0") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Paused0 is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) Paused0() (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.Paused0(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// Paused0 is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) Paused0() (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.Paused0(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// PauserRegistry is a free data retrieval call binding the contract method 0x886f1195. +// +// Solidity: function pauserRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) PauserRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "pauserRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PauserRegistry is a free data retrieval call binding the contract method 0x886f1195. +// +// Solidity: function pauserRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) PauserRegistry() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.PauserRegistry(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// PauserRegistry is a free data retrieval call binding the contract method 0x886f1195. +// +// Solidity: function pauserRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) PauserRegistry() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.PauserRegistry(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// PubkeyRegistrationMessageHash is a free data retrieval call binding the contract method 0x3c2a7f4c. +// +// Solidity: function pubkeyRegistrationMessageHash(address operator) view returns(bytes32) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) PubkeyRegistrationMessageHash(opts *bind.CallOpts, operator common.Address) ([32]byte, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "pubkeyRegistrationMessageHash", operator) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PubkeyRegistrationMessageHash is a free data retrieval call binding the contract method 0x3c2a7f4c. +// +// Solidity: function pubkeyRegistrationMessageHash(address operator) view returns(bytes32) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) PubkeyRegistrationMessageHash(operator common.Address) ([32]byte, error) { + return _ContractECDSARegistryCoordinator.Contract.PubkeyRegistrationMessageHash(&_ContractECDSARegistryCoordinator.CallOpts, operator) +} + +// PubkeyRegistrationMessageHash is a free data retrieval call binding the contract method 0x3c2a7f4c. +// +// Solidity: function pubkeyRegistrationMessageHash(address operator) view returns(bytes32) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) PubkeyRegistrationMessageHash(operator common.Address) ([32]byte, error) { + return _ContractECDSARegistryCoordinator.Contract.PubkeyRegistrationMessageHash(&_ContractECDSARegistryCoordinator.CallOpts, operator) +} + +// QuorumCount is a free data retrieval call binding the contract method 0x9aa1653d. +// +// Solidity: function quorumCount() view returns(uint8) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) QuorumCount(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "quorumCount") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// QuorumCount is a free data retrieval call binding the contract method 0x9aa1653d. +// +// Solidity: function quorumCount() view returns(uint8) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) QuorumCount() (uint8, error) { + return _ContractECDSARegistryCoordinator.Contract.QuorumCount(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// QuorumCount is a free data retrieval call binding the contract method 0x9aa1653d. +// +// Solidity: function quorumCount() view returns(uint8) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) QuorumCount() (uint8, error) { + return _ContractECDSARegistryCoordinator.Contract.QuorumCount(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// QuorumUpdateBlockNumber is a free data retrieval call binding the contract method 0x249a0c42. +// +// Solidity: function quorumUpdateBlockNumber(uint8 ) view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) QuorumUpdateBlockNumber(opts *bind.CallOpts, arg0 uint8) (*big.Int, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "quorumUpdateBlockNumber", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// QuorumUpdateBlockNumber is a free data retrieval call binding the contract method 0x249a0c42. +// +// Solidity: function quorumUpdateBlockNumber(uint8 ) view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) QuorumUpdateBlockNumber(arg0 uint8) (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.QuorumUpdateBlockNumber(&_ContractECDSARegistryCoordinator.CallOpts, arg0) +} + +// QuorumUpdateBlockNumber is a free data retrieval call binding the contract method 0x249a0c42. +// +// Solidity: function quorumUpdateBlockNumber(uint8 ) view returns(uint256) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) QuorumUpdateBlockNumber(arg0 uint8) (*big.Int, error) { + return _ContractECDSARegistryCoordinator.Contract.QuorumUpdateBlockNumber(&_ContractECDSARegistryCoordinator.CallOpts, arg0) +} + +// ServiceManager is a free data retrieval call binding the contract method 0x3998fdd3. +// +// Solidity: function serviceManager() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) ServiceManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "serviceManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ServiceManager is a free data retrieval call binding the contract method 0x3998fdd3. +// +// Solidity: function serviceManager() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) ServiceManager() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.ServiceManager(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// ServiceManager is a free data retrieval call binding the contract method 0x3998fdd3. +// +// Solidity: function serviceManager() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) ServiceManager() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.ServiceManager(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// StakeRegistry is a free data retrieval call binding the contract method 0x68304835. +// +// Solidity: function stakeRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCaller) StakeRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSARegistryCoordinator.contract.Call(opts, &out, "stakeRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// StakeRegistry is a free data retrieval call binding the contract method 0x68304835. +// +// Solidity: function stakeRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) StakeRegistry() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.StakeRegistry(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// StakeRegistry is a free data retrieval call binding the contract method 0x68304835. +// +// Solidity: function stakeRegistry() view returns(address) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorCallerSession) StakeRegistry() (common.Address, error) { + return _ContractECDSARegistryCoordinator.Contract.StakeRegistry(&_ContractECDSARegistryCoordinator.CallOpts) +} + +// CreateQuorum is a paid mutator transaction binding the contract method 0x231a5abb. +// +// Solidity: function createQuorum(uint96 minimumStake, (address,uint96)[] strategyParams) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) CreateQuorum(opts *bind.TransactOpts, minimumStake *big.Int, strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "createQuorum", minimumStake, strategyParams) +} + +// CreateQuorum is a paid mutator transaction binding the contract method 0x231a5abb. +// +// Solidity: function createQuorum(uint96 minimumStake, (address,uint96)[] strategyParams) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) CreateQuorum(minimumStake *big.Int, strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.CreateQuorum(&_ContractECDSARegistryCoordinator.TransactOpts, minimumStake, strategyParams) +} + +// CreateQuorum is a paid mutator transaction binding the contract method 0x231a5abb. +// +// Solidity: function createQuorum(uint96 minimumStake, (address,uint96)[] strategyParams) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) CreateQuorum(minimumStake *big.Int, strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.CreateQuorum(&_ContractECDSARegistryCoordinator.TransactOpts, minimumStake, strategyParams) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xca4f2d97. +// +// Solidity: function deregisterOperator(bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) DeregisterOperator(opts *bind.TransactOpts, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "deregisterOperator", quorumNumbers) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xca4f2d97. +// +// Solidity: function deregisterOperator(bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) DeregisterOperator(quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.DeregisterOperator(&_ContractECDSARegistryCoordinator.TransactOpts, quorumNumbers) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xca4f2d97. +// +// Solidity: function deregisterOperator(bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) DeregisterOperator(quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.DeregisterOperator(&_ContractECDSARegistryCoordinator.TransactOpts, quorumNumbers) +} + +// EjectOperator is a paid mutator transaction binding the contract method 0x6e3b17db. +// +// Solidity: function ejectOperator(address operator, bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) EjectOperator(opts *bind.TransactOpts, operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "ejectOperator", operator, quorumNumbers) +} + +// EjectOperator is a paid mutator transaction binding the contract method 0x6e3b17db. +// +// Solidity: function ejectOperator(address operator, bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) EjectOperator(operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.EjectOperator(&_ContractECDSARegistryCoordinator.TransactOpts, operator, quorumNumbers) +} + +// EjectOperator is a paid mutator transaction binding the contract method 0x6e3b17db. +// +// Solidity: function ejectOperator(address operator, bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) EjectOperator(operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.EjectOperator(&_ContractECDSARegistryCoordinator.TransactOpts, operator, quorumNumbers) +} + +// Initialize is a paid mutator transaction binding the contract method 0x48d1da85. +// +// Solidity: function initialize(address _initialOwner, address _ejector, address _pauserRegistry, uint256 _initialPausedStatus, uint96[] _minimumStakes, (address,uint96)[][] _strategyParams) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) Initialize(opts *bind.TransactOpts, _initialOwner common.Address, _ejector common.Address, _pauserRegistry common.Address, _initialPausedStatus *big.Int, _minimumStakes []*big.Int, _strategyParams [][]ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "initialize", _initialOwner, _ejector, _pauserRegistry, _initialPausedStatus, _minimumStakes, _strategyParams) +} + +// Initialize is a paid mutator transaction binding the contract method 0x48d1da85. +// +// Solidity: function initialize(address _initialOwner, address _ejector, address _pauserRegistry, uint256 _initialPausedStatus, uint96[] _minimumStakes, (address,uint96)[][] _strategyParams) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) Initialize(_initialOwner common.Address, _ejector common.Address, _pauserRegistry common.Address, _initialPausedStatus *big.Int, _minimumStakes []*big.Int, _strategyParams [][]ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.Initialize(&_ContractECDSARegistryCoordinator.TransactOpts, _initialOwner, _ejector, _pauserRegistry, _initialPausedStatus, _minimumStakes, _strategyParams) +} + +// Initialize is a paid mutator transaction binding the contract method 0x48d1da85. +// +// Solidity: function initialize(address _initialOwner, address _ejector, address _pauserRegistry, uint256 _initialPausedStatus, uint96[] _minimumStakes, (address,uint96)[][] _strategyParams) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) Initialize(_initialOwner common.Address, _ejector common.Address, _pauserRegistry common.Address, _initialPausedStatus *big.Int, _minimumStakes []*big.Int, _strategyParams [][]ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.Initialize(&_ContractECDSARegistryCoordinator.TransactOpts, _initialOwner, _ejector, _pauserRegistry, _initialPausedStatus, _minimumStakes, _strategyParams) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 newPausedStatus) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) Pause(opts *bind.TransactOpts, newPausedStatus *big.Int) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "pause", newPausedStatus) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 newPausedStatus) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) Pause(newPausedStatus *big.Int) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.Pause(&_ContractECDSARegistryCoordinator.TransactOpts, newPausedStatus) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 newPausedStatus) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) Pause(newPausedStatus *big.Int) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.Pause(&_ContractECDSARegistryCoordinator.TransactOpts, newPausedStatus) +} + +// PauseAll is a paid mutator transaction binding the contract method 0x595c6a67. +// +// Solidity: function pauseAll() returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) PauseAll(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "pauseAll") +} + +// PauseAll is a paid mutator transaction binding the contract method 0x595c6a67. +// +// Solidity: function pauseAll() returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) PauseAll() (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.PauseAll(&_ContractECDSARegistryCoordinator.TransactOpts) +} + +// PauseAll is a paid mutator transaction binding the contract method 0x595c6a67. +// +// Solidity: function pauseAll() returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) PauseAll() (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.PauseAll(&_ContractECDSARegistryCoordinator.TransactOpts) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0x3596b242. +// +// Solidity: function registerOperator(bytes quorumNumbers, (address,(bytes,bytes32,uint256)) params, (bytes,bytes32,uint256) operatorSignature) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) RegisterOperator(opts *bind.TransactOpts, quorumNumbers []byte, params ECDSARegistryCoordinatorECDSAPubkeyRegistrationParams, operatorSignature ISignatureUtilsSignatureWithSaltAndExpiry) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "registerOperator", quorumNumbers, params, operatorSignature) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0x3596b242. +// +// Solidity: function registerOperator(bytes quorumNumbers, (address,(bytes,bytes32,uint256)) params, (bytes,bytes32,uint256) operatorSignature) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) RegisterOperator(quorumNumbers []byte, params ECDSARegistryCoordinatorECDSAPubkeyRegistrationParams, operatorSignature ISignatureUtilsSignatureWithSaltAndExpiry) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.RegisterOperator(&_ContractECDSARegistryCoordinator.TransactOpts, quorumNumbers, params, operatorSignature) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0x3596b242. +// +// Solidity: function registerOperator(bytes quorumNumbers, (address,(bytes,bytes32,uint256)) params, (bytes,bytes32,uint256) operatorSignature) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) RegisterOperator(quorumNumbers []byte, params ECDSARegistryCoordinatorECDSAPubkeyRegistrationParams, operatorSignature ISignatureUtilsSignatureWithSaltAndExpiry) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.RegisterOperator(&_ContractECDSARegistryCoordinator.TransactOpts, quorumNumbers, params, operatorSignature) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) RenounceOwnership() (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.RenounceOwnership(&_ContractECDSARegistryCoordinator.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.RenounceOwnership(&_ContractECDSARegistryCoordinator.TransactOpts) +} + +// SetEjector is a paid mutator transaction binding the contract method 0x2cdd1e86. +// +// Solidity: function setEjector(address _ejector) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) SetEjector(opts *bind.TransactOpts, _ejector common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "setEjector", _ejector) +} + +// SetEjector is a paid mutator transaction binding the contract method 0x2cdd1e86. +// +// Solidity: function setEjector(address _ejector) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) SetEjector(_ejector common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.SetEjector(&_ContractECDSARegistryCoordinator.TransactOpts, _ejector) +} + +// SetEjector is a paid mutator transaction binding the contract method 0x2cdd1e86. +// +// Solidity: function setEjector(address _ejector) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) SetEjector(_ejector common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.SetEjector(&_ContractECDSARegistryCoordinator.TransactOpts, _ejector) +} + +// SetPauserRegistry is a paid mutator transaction binding the contract method 0x10d67a2f. +// +// Solidity: function setPauserRegistry(address newPauserRegistry) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) SetPauserRegistry(opts *bind.TransactOpts, newPauserRegistry common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "setPauserRegistry", newPauserRegistry) +} + +// SetPauserRegistry is a paid mutator transaction binding the contract method 0x10d67a2f. +// +// Solidity: function setPauserRegistry(address newPauserRegistry) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) SetPauserRegistry(newPauserRegistry common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.SetPauserRegistry(&_ContractECDSARegistryCoordinator.TransactOpts, newPauserRegistry) +} + +// SetPauserRegistry is a paid mutator transaction binding the contract method 0x10d67a2f. +// +// Solidity: function setPauserRegistry(address newPauserRegistry) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) SetPauserRegistry(newPauserRegistry common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.SetPauserRegistry(&_ContractECDSARegistryCoordinator.TransactOpts, newPauserRegistry) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.TransferOwnership(&_ContractECDSARegistryCoordinator.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.TransferOwnership(&_ContractECDSARegistryCoordinator.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0xfabc1cbc. +// +// Solidity: function unpause(uint256 newPausedStatus) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) Unpause(opts *bind.TransactOpts, newPausedStatus *big.Int) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "unpause", newPausedStatus) +} + +// Unpause is a paid mutator transaction binding the contract method 0xfabc1cbc. +// +// Solidity: function unpause(uint256 newPausedStatus) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) Unpause(newPausedStatus *big.Int) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.Unpause(&_ContractECDSARegistryCoordinator.TransactOpts, newPausedStatus) +} + +// Unpause is a paid mutator transaction binding the contract method 0xfabc1cbc. +// +// Solidity: function unpause(uint256 newPausedStatus) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) Unpause(newPausedStatus *big.Int) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.Unpause(&_ContractECDSARegistryCoordinator.TransactOpts, newPausedStatus) +} + +// UpdateOperators is a paid mutator transaction binding the contract method 0x00cf2ab5. +// +// Solidity: function updateOperators(address[] operators) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) UpdateOperators(opts *bind.TransactOpts, operators []common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "updateOperators", operators) +} + +// UpdateOperators is a paid mutator transaction binding the contract method 0x00cf2ab5. +// +// Solidity: function updateOperators(address[] operators) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) UpdateOperators(operators []common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.UpdateOperators(&_ContractECDSARegistryCoordinator.TransactOpts, operators) +} + +// UpdateOperators is a paid mutator transaction binding the contract method 0x00cf2ab5. +// +// Solidity: function updateOperators(address[] operators) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) UpdateOperators(operators []common.Address) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.UpdateOperators(&_ContractECDSARegistryCoordinator.TransactOpts, operators) +} + +// UpdateOperatorsForQuorum is a paid mutator transaction binding the contract method 0x5140a548. +// +// Solidity: function updateOperatorsForQuorum(address[][] operatorsPerQuorum, bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactor) UpdateOperatorsForQuorum(opts *bind.TransactOpts, operatorsPerQuorum [][]common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.contract.Transact(opts, "updateOperatorsForQuorum", operatorsPerQuorum, quorumNumbers) +} + +// UpdateOperatorsForQuorum is a paid mutator transaction binding the contract method 0x5140a548. +// +// Solidity: function updateOperatorsForQuorum(address[][] operatorsPerQuorum, bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorSession) UpdateOperatorsForQuorum(operatorsPerQuorum [][]common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.UpdateOperatorsForQuorum(&_ContractECDSARegistryCoordinator.TransactOpts, operatorsPerQuorum, quorumNumbers) +} + +// UpdateOperatorsForQuorum is a paid mutator transaction binding the contract method 0x5140a548. +// +// Solidity: function updateOperatorsForQuorum(address[][] operatorsPerQuorum, bytes quorumNumbers) returns() +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorTransactorSession) UpdateOperatorsForQuorum(operatorsPerQuorum [][]common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSARegistryCoordinator.Contract.UpdateOperatorsForQuorum(&_ContractECDSARegistryCoordinator.TransactOpts, operatorsPerQuorum, quorumNumbers) +} + +// ContractECDSARegistryCoordinatorEjectorUpdatedIterator is returned from FilterEjectorUpdated and is used to iterate over the raw logs and unpacked data for EjectorUpdated events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorEjectorUpdatedIterator struct { + Event *ContractECDSARegistryCoordinatorEjectorUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorEjectorUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorEjectorUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorEjectorUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorEjectorUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorEjectorUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorEjectorUpdated represents a EjectorUpdated event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorEjectorUpdated struct { + PrevEjector common.Address + NewEjector common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEjectorUpdated is a free log retrieval operation binding the contract event 0x8f30ab09f43a6c157d7fce7e0a13c003042c1c95e8a72e7a146a21c0caa24dc9. +// +// Solidity: event EjectorUpdated(address prevEjector, address newEjector) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterEjectorUpdated(opts *bind.FilterOpts) (*ContractECDSARegistryCoordinatorEjectorUpdatedIterator, error) { + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "EjectorUpdated") + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorEjectorUpdatedIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "EjectorUpdated", logs: logs, sub: sub}, nil +} + +// WatchEjectorUpdated is a free log subscription operation binding the contract event 0x8f30ab09f43a6c157d7fce7e0a13c003042c1c95e8a72e7a146a21c0caa24dc9. +// +// Solidity: event EjectorUpdated(address prevEjector, address newEjector) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchEjectorUpdated(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorEjectorUpdated) (event.Subscription, error) { + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "EjectorUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorEjectorUpdated) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "EjectorUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEjectorUpdated is a log parse operation binding the contract event 0x8f30ab09f43a6c157d7fce7e0a13c003042c1c95e8a72e7a146a21c0caa24dc9. +// +// Solidity: event EjectorUpdated(address prevEjector, address newEjector) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParseEjectorUpdated(log types.Log) (*ContractECDSARegistryCoordinatorEjectorUpdated, error) { + event := new(ContractECDSARegistryCoordinatorEjectorUpdated) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "EjectorUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSARegistryCoordinatorInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorInitializedIterator struct { + Event *ContractECDSARegistryCoordinatorInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorInitialized represents a Initialized event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterInitialized(opts *bind.FilterOpts) (*ContractECDSARegistryCoordinatorInitializedIterator, error) { + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorInitializedIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorInitialized) (event.Subscription, error) { + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorInitialized) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParseInitialized(log types.Log) (*ContractECDSARegistryCoordinatorInitialized, error) { + event := new(ContractECDSARegistryCoordinatorInitialized) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSARegistryCoordinatorOperatorDeregisteredIterator is returned from FilterOperatorDeregistered and is used to iterate over the raw logs and unpacked data for OperatorDeregistered events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorOperatorDeregisteredIterator struct { + Event *ContractECDSARegistryCoordinatorOperatorDeregistered // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorOperatorDeregisteredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorOperatorDeregistered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorOperatorDeregistered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorOperatorDeregisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorOperatorDeregisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorOperatorDeregistered represents a OperatorDeregistered event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorOperatorDeregistered struct { + Operator common.Address + OperatorId common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorDeregistered is a free log retrieval operation binding the contract event 0x31e0adfec71bccee37b6e83a90c2fedb17d8f1693fee863c4771e7bfe2aed580. +// +// Solidity: event OperatorDeregistered(address indexed operator, address indexed operatorId) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterOperatorDeregistered(opts *bind.FilterOpts, operator []common.Address, operatorId []common.Address) (*ContractECDSARegistryCoordinatorOperatorDeregisteredIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + var operatorIdRule []interface{} + for _, operatorIdItem := range operatorId { + operatorIdRule = append(operatorIdRule, operatorIdItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "OperatorDeregistered", operatorRule, operatorIdRule) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorOperatorDeregisteredIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "OperatorDeregistered", logs: logs, sub: sub}, nil +} + +// WatchOperatorDeregistered is a free log subscription operation binding the contract event 0x31e0adfec71bccee37b6e83a90c2fedb17d8f1693fee863c4771e7bfe2aed580. +// +// Solidity: event OperatorDeregistered(address indexed operator, address indexed operatorId) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchOperatorDeregistered(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorOperatorDeregistered, operator []common.Address, operatorId []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + var operatorIdRule []interface{} + for _, operatorIdItem := range operatorId { + operatorIdRule = append(operatorIdRule, operatorIdItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "OperatorDeregistered", operatorRule, operatorIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorOperatorDeregistered) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "OperatorDeregistered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOperatorDeregistered is a log parse operation binding the contract event 0x31e0adfec71bccee37b6e83a90c2fedb17d8f1693fee863c4771e7bfe2aed580. +// +// Solidity: event OperatorDeregistered(address indexed operator, address indexed operatorId) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParseOperatorDeregistered(log types.Log) (*ContractECDSARegistryCoordinatorOperatorDeregistered, error) { + event := new(ContractECDSARegistryCoordinatorOperatorDeregistered) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "OperatorDeregistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSARegistryCoordinatorOperatorRegisteredIterator is returned from FilterOperatorRegistered and is used to iterate over the raw logs and unpacked data for OperatorRegistered events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorOperatorRegisteredIterator struct { + Event *ContractECDSARegistryCoordinatorOperatorRegistered // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorOperatorRegisteredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorOperatorRegistered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorOperatorRegistered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorOperatorRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorOperatorRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorOperatorRegistered represents a OperatorRegistered event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorOperatorRegistered struct { + Operator common.Address + OperatorId common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorRegistered is a free log retrieval operation binding the contract event 0xa453db612af59e5521d6ab9284dc3e2d06af286eb1b1b7b771fce4716c19f2c1. +// +// Solidity: event OperatorRegistered(address indexed operator, address indexed operatorId) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterOperatorRegistered(opts *bind.FilterOpts, operator []common.Address, operatorId []common.Address) (*ContractECDSARegistryCoordinatorOperatorRegisteredIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + var operatorIdRule []interface{} + for _, operatorIdItem := range operatorId { + operatorIdRule = append(operatorIdRule, operatorIdItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "OperatorRegistered", operatorRule, operatorIdRule) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorOperatorRegisteredIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "OperatorRegistered", logs: logs, sub: sub}, nil +} + +// WatchOperatorRegistered is a free log subscription operation binding the contract event 0xa453db612af59e5521d6ab9284dc3e2d06af286eb1b1b7b771fce4716c19f2c1. +// +// Solidity: event OperatorRegistered(address indexed operator, address indexed operatorId) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchOperatorRegistered(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorOperatorRegistered, operator []common.Address, operatorId []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + var operatorIdRule []interface{} + for _, operatorIdItem := range operatorId { + operatorIdRule = append(operatorIdRule, operatorIdItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "OperatorRegistered", operatorRule, operatorIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorOperatorRegistered) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "OperatorRegistered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOperatorRegistered is a log parse operation binding the contract event 0xa453db612af59e5521d6ab9284dc3e2d06af286eb1b1b7b771fce4716c19f2c1. +// +// Solidity: event OperatorRegistered(address indexed operator, address indexed operatorId) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParseOperatorRegistered(log types.Log) (*ContractECDSARegistryCoordinatorOperatorRegistered, error) { + event := new(ContractECDSARegistryCoordinatorOperatorRegistered) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "OperatorRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSARegistryCoordinatorOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorOwnershipTransferredIterator struct { + Event *ContractECDSARegistryCoordinatorOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorOwnershipTransferred represents a OwnershipTransferred event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ContractECDSARegistryCoordinatorOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorOwnershipTransferredIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorOwnershipTransferred) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParseOwnershipTransferred(log types.Log) (*ContractECDSARegistryCoordinatorOwnershipTransferred, error) { + event := new(ContractECDSARegistryCoordinatorOwnershipTransferred) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSARegistryCoordinatorPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorPausedIterator struct { + Event *ContractECDSARegistryCoordinatorPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorPaused represents a Paused event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorPaused struct { + Account common.Address + NewPausedStatus *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0xab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d. +// +// Solidity: event Paused(address indexed account, uint256 newPausedStatus) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterPaused(opts *bind.FilterOpts, account []common.Address) (*ContractECDSARegistryCoordinatorPausedIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "Paused", accountRule) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorPausedIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0xab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d. +// +// Solidity: event Paused(address indexed account, uint256 newPausedStatus) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorPaused, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "Paused", accountRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorPaused) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0xab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d. +// +// Solidity: event Paused(address indexed account, uint256 newPausedStatus) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParsePaused(log types.Log) (*ContractECDSARegistryCoordinatorPaused, error) { + event := new(ContractECDSARegistryCoordinatorPaused) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSARegistryCoordinatorPauserRegistrySetIterator is returned from FilterPauserRegistrySet and is used to iterate over the raw logs and unpacked data for PauserRegistrySet events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorPauserRegistrySetIterator struct { + Event *ContractECDSARegistryCoordinatorPauserRegistrySet // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorPauserRegistrySetIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorPauserRegistrySet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorPauserRegistrySet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorPauserRegistrySetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorPauserRegistrySetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorPauserRegistrySet represents a PauserRegistrySet event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorPauserRegistrySet struct { + PauserRegistry common.Address + NewPauserRegistry common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPauserRegistrySet is a free log retrieval operation binding the contract event 0x6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6. +// +// Solidity: event PauserRegistrySet(address pauserRegistry, address newPauserRegistry) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterPauserRegistrySet(opts *bind.FilterOpts) (*ContractECDSARegistryCoordinatorPauserRegistrySetIterator, error) { + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "PauserRegistrySet") + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorPauserRegistrySetIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "PauserRegistrySet", logs: logs, sub: sub}, nil +} + +// WatchPauserRegistrySet is a free log subscription operation binding the contract event 0x6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6. +// +// Solidity: event PauserRegistrySet(address pauserRegistry, address newPauserRegistry) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchPauserRegistrySet(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorPauserRegistrySet) (event.Subscription, error) { + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "PauserRegistrySet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorPauserRegistrySet) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "PauserRegistrySet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePauserRegistrySet is a log parse operation binding the contract event 0x6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6. +// +// Solidity: event PauserRegistrySet(address pauserRegistry, address newPauserRegistry) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParsePauserRegistrySet(log types.Log) (*ContractECDSARegistryCoordinatorPauserRegistrySet, error) { + event := new(ContractECDSARegistryCoordinatorPauserRegistrySet) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "PauserRegistrySet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSARegistryCoordinatorQuorumBlockNumberUpdatedIterator is returned from FilterQuorumBlockNumberUpdated and is used to iterate over the raw logs and unpacked data for QuorumBlockNumberUpdated events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorQuorumBlockNumberUpdatedIterator struct { + Event *ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorQuorumBlockNumberUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorQuorumBlockNumberUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorQuorumBlockNumberUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated represents a QuorumBlockNumberUpdated event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated struct { + QuorumNumber uint8 + Blocknumber *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterQuorumBlockNumberUpdated is a free log retrieval operation binding the contract event 0x46077d55330763f16269fd75e5761663f4192d2791747c0189b16ad31db07db4. +// +// Solidity: event QuorumBlockNumberUpdated(uint8 indexed quorumNumber, uint256 blocknumber) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterQuorumBlockNumberUpdated(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSARegistryCoordinatorQuorumBlockNumberUpdatedIterator, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "QuorumBlockNumberUpdated", quorumNumberRule) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorQuorumBlockNumberUpdatedIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "QuorumBlockNumberUpdated", logs: logs, sub: sub}, nil +} + +// WatchQuorumBlockNumberUpdated is a free log subscription operation binding the contract event 0x46077d55330763f16269fd75e5761663f4192d2791747c0189b16ad31db07db4. +// +// Solidity: event QuorumBlockNumberUpdated(uint8 indexed quorumNumber, uint256 blocknumber) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchQuorumBlockNumberUpdated(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated, quorumNumber []uint8) (event.Subscription, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "QuorumBlockNumberUpdated", quorumNumberRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "QuorumBlockNumberUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseQuorumBlockNumberUpdated is a log parse operation binding the contract event 0x46077d55330763f16269fd75e5761663f4192d2791747c0189b16ad31db07db4. +// +// Solidity: event QuorumBlockNumberUpdated(uint8 indexed quorumNumber, uint256 blocknumber) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParseQuorumBlockNumberUpdated(log types.Log) (*ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated, error) { + event := new(ContractECDSARegistryCoordinatorQuorumBlockNumberUpdated) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "QuorumBlockNumberUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSARegistryCoordinatorUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorUnpausedIterator struct { + Event *ContractECDSARegistryCoordinatorUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSARegistryCoordinatorUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSARegistryCoordinatorUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSARegistryCoordinatorUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSARegistryCoordinatorUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSARegistryCoordinatorUnpaused represents a Unpaused event raised by the ContractECDSARegistryCoordinator contract. +type ContractECDSARegistryCoordinatorUnpaused struct { + Account common.Address + NewPausedStatus *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c. +// +// Solidity: event Unpaused(address indexed account, uint256 newPausedStatus) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) FilterUnpaused(opts *bind.FilterOpts, account []common.Address) (*ContractECDSARegistryCoordinatorUnpausedIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.FilterLogs(opts, "Unpaused", accountRule) + if err != nil { + return nil, err + } + return &ContractECDSARegistryCoordinatorUnpausedIterator{contract: _ContractECDSARegistryCoordinator.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c. +// +// Solidity: event Unpaused(address indexed account, uint256 newPausedStatus) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *ContractECDSARegistryCoordinatorUnpaused, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _ContractECDSARegistryCoordinator.contract.WatchLogs(opts, "Unpaused", accountRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSARegistryCoordinatorUnpaused) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c. +// +// Solidity: event Unpaused(address indexed account, uint256 newPausedStatus) +func (_ContractECDSARegistryCoordinator *ContractECDSARegistryCoordinatorFilterer) ParseUnpaused(log types.Log) (*ContractECDSARegistryCoordinatorUnpaused, error) { + event := new(ContractECDSARegistryCoordinatorUnpaused) + if err := _ContractECDSARegistryCoordinator.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/bindings/ECDSAStakeRegistry/binding.go b/contracts/bindings/ECDSAStakeRegistry/binding.go new file mode 100644 index 000000000..ff41c1593 --- /dev/null +++ b/contracts/bindings/ECDSAStakeRegistry/binding.go @@ -0,0 +1,2066 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contractECDSAStakeRegistry + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ECDSAStakeRegistryStakeUpdate is an auto generated low-level Go binding around an user-defined struct. +type ECDSAStakeRegistryStakeUpdate struct { + UpdateBlockNumber uint32 + NextUpdateBlockNumber uint32 + Stake *big.Int +} + +// ECDSAStakeRegistryStrategyParams is an auto generated low-level Go binding around an user-defined struct. +type ECDSAStakeRegistryStrategyParams struct { + Strategy common.Address + Multiplier *big.Int +} + +// ContractECDSAStakeRegistryMetaData contains all meta data concerning the ContractECDSAStakeRegistry contract. +var ContractECDSAStakeRegistryMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_registryCoordinator\",\"type\":\"address\",\"internalType\":\"contractECDSARegistryCoordinator\"},{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"MAX_WEIGHING_FUNCTION_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"WEIGHTING_DIVISOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addStrategies\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"_strategyParams\",\"type\":\"tuple[]\",\"internalType\":\"structECDSAStakeRegistry.StrategyParams[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterOperator\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getCurrentStake\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentTotalStake\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLatestStakeUpdate\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structECDSAStakeRegistry.StakeUpdate\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeAtBlockNumber\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeAtBlockNumberAndIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeHistory\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structECDSAStakeRegistry.StakeUpdate[]\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeHistoryLength\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeUpdateAtIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structECDSAStakeRegistry.StakeUpdate\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakeUpdateIndexAtBlockNumber\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeAtBlockNumberFromIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeHistoryLength\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeIndicesAtBlockNumber\",\"inputs\":[{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakeUpdateAtIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structECDSAStakeRegistry.StakeUpdate\",\"components\":[{\"name\":\"updateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"nextUpdateBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"stake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initializeQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumStake\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"_strategyParams\",\"type\":\"tuple[]\",\"internalType\":\"structECDSAStakeRegistry.StrategyParams[]\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minimumStakeForQuorum\",\"inputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyStrategyParams\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"strategyIndices\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"newMultipliers\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerOperator\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"},{\"name\":\"\",\"type\":\"uint96[]\",\"internalType\":\"uint96[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registryCoordinator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeStrategies\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"indicesToRemove\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinimumStakeForQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"minimumStake\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyParams\",\"inputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyParamsByIndex\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structECDSAStakeRegistry.StrategyParams\",\"components\":[{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint96\",\"internalType\":\"uint96\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyParamsLength\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorStake\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint192\",\"internalType\":\"uint192\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"weightOfOperatorForQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"MinimumStakeForQuorumUpdated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"minimumStake\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorStakeUpdate\",\"inputs\":[{\"name\":\"operatorId\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"},{\"name\":\"stake\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"QuorumCreated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyAddedToQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyMultiplierUpdated\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"multiplier\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromQuorum\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false}]", + Bin: "0x60c06040523480156200001157600080fd5b506040516200389b3803806200389b833981016040819052620000349162000065565b6001600160a01b0391821660a05216608052620000a4565b6001600160a01b03811681146200006257600080fd5b50565b600080604083850312156200007957600080fd5b825162000086816200004c565b602084015190925062000099816200004c565b809150509250929050565b60805160a05161379262000109600039600081816103410152818161063e01528181610a67015281816111a6015281816113fe015281816114f70152818161181101528181611ad90152611c060152600081816104d30152611e2a01526137926000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806381c0750211610104578063c8294c56116100a2578063ea595ab111610071578063ea595ab1146104f5578063f0391e5a14610515578063f4e24fe514610536578063ff694a771461054957600080fd5b8063c8294c5614610495578063cdb57ae4146104a8578063d5eccc05146104bb578063df5cf723146104ce57600080fd5b8063b6904b78116100de578063b6904b7814610433578063bc9a40c314610446578063c46778a514610459578063c601527d1461048257600080fd5b806381c07502146103a8578063837bb82e146103c8578063adc804da146103f357600080fd5b80633ca5a5f51161017c57806365f10aff1161014b57806365f10aff146103145780636d14a9871461033c5780637a64b5161461037b5780637c1723471461038e57600080fd5b80633ca5a5f5146102bc5780635e5a6775146102df5780635f1f2d77146102ee57806363efdb3e1461030157600080fd5b8063197cfc6e116101b8578063197cfc6e146102495780631f9b74e01461027457806320b6629814610287578063300ad3691461029c57600080fd5b80630491b41c146101df578063087324611461021557806312e7c5f914610236575b600080fd5b6102026101ed366004612c37565b60ff1660009081526001602052604090205490565b6040519081526020015b60405180910390f35b610228610223366004612c52565b61055c565b60405161020c929190612c7c565b610202610244366004612cb6565b6105a5565b61025c610257366004612cb6565b6105d3565b6040516001600160601b03909116815260200161020c565b61025c610282366004612ceb565b6105ec565b61029a610295366004612d66565b61063c565b005b6102af6102aa366004612cb6565b61096d565b60405161020c9190612de6565b6102026102ca366004612c37565b60ff1660009081526003602052604090205490565b610202670de0b6b3a764000081565b61029a6102fc366004612eac565b610a65565b61025c61030f366004612f68565b610db0565b610327610322366004612fb5565b610e4f565b60405163ffffffff909116815260200161020c565b6103637f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020c565b61025c610389366004612fb5565b610e66565b610396602081565b60405160ff909116815260200161020c565b6103bb6103b636600461303b565b610ed1565b60405161020c919061308d565b6103db6103d63660046130d7565b611199565b6040516001600160c01b03909116815260200161020c565b610406610401366004612c52565b6112f3565b6040805182516001600160a01b031681526020928301516001600160601b0316928101929092520161020c565b6102af610441366004612c52565b61136d565b61029a610454366004613152565b6113fc565b61025c610467366004612c37565b6000602081905290815260409020546001600160601b031681565b61029a610490366004613216565b6114f5565b61025c6104a3366004613263565b6115e9565b6102af6104b636600461329f565b611667565b61025c6104c9366004612c37565b611708565b6103637f000000000000000000000000000000000000000000000000000000000000000081565b610508610503366004612cb6565b61175b565b60405161020c91906132de565b6105286105233660046130d7565b611803565b60405161020c92919061338e565b61029a6105443660046133b3565b611ace565b61029a6105573660046133d3565b611bfb565b6003602052816000526040600020818154811061057857600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b6001600160a01b038216600090815260026020908152604080832060ff851684529091529020545b92915050565b6000806105e0848461096d565b60400151949350505050565b60ff821660009081526001602052604081205483906106265760405162461bcd60e51b815260040161061d90613430565b60405180910390fd5b60006106328585611d66565b5095945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561069a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106be9190613481565b6001600160a01b0316336001600160a01b0316146106ee5760405162461bcd60e51b815260040161061d9061349e565b8461070a8160ff16600090815260016020526040902054151590565b6107265760405162461bcd60e51b815260040161061d90613430565b838061079c576040805162461bcd60e51b81526020600482015260248101919091527f5374616b6552656769737472792e6d6f6469667953747261746567795061726160448201527f6d733a206e6f20737472617465677920696e64696365732070726f7669646564606482015260840161061d565b8281146108115760405162461bcd60e51b815260206004820152603960248201527f5374616b6552656769737472792e6d6f6469667953747261746567795061726160448201527f6d733a20696e707574206c656e677468206d69736d6174636800000000000000606482015260840161061d565b60ff87166000908152600360205260408120905b828110156109625785858281811061083f5761083f61351a565b90506020020160208101906108549190613530565b828989848181106108675761086761351a565b905060200201358154811061087e5761087e61351a565b9060005260206000200160000160146101000a8154816001600160601b0302191690836001600160601b031602179055508860ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a75838a8a858181106108e7576108e761351a565b90506020020135815481106108fe576108fe61351a565b6000918252602090912001546001600160a01b03168888858181106109255761092561351a565b905060200201602081019061093a9190613530565b604051610948929190612c7c565b60405180910390a28061095a81613561565b915050610825565b505050505050505050565b6040805160608082018352600080835260208084018290528385018290526001600160a01b03871682526002815284822060ff871683528152848220548551938401865282845290830182905293820152909190816109cf5791506105cd9050565b6001600160a01b038516600090815260026020908152604080832060ff881684529091529020610a0060018461357c565b81548110610a1057610a1061351a565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b909304929092169082015292506105cd915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae79190613481565b6001600160a01b0316336001600160a01b031614610b175760405162461bcd60e51b815260040161061d9061349e565b81610b338160ff16600090815260016020526040902054151590565b610b4f5760405162461bcd60e51b815260040161061d90613430565b815180610bc45760405162461bcd60e51b815260206004820152603d60248201527f5374616b6552656769737472792e72656d6f7665537472617465676965733a2060448201527f6e6f20696e646963657320746f2072656d6f76652070726f7669646564000000606482015260840161061d565b60ff84166000908152600360205260408120905b82811015610da8578560ff167f31fa2e2cd280c9375e13ffcf3d81e2378100186e4058f8d3ddb690b82dcd31f783878481518110610c1857610c1861351a565b602002602001015181548110610c3057610c3061351a565b600091825260209182902001546040516001600160a01b0390911681520160405180910390a28560ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a7583878481518110610c8e57610c8e61351a565b602002602001015181548110610ca657610ca661351a565b600091825260208083209190910154604080516001600160a01b039092168252918101929092520160405180910390a281548290610ce69060019061357c565b81548110610cf657610cf661351a565b9060005260206000200182868381518110610d1357610d1361351a565b602002602001015181548110610d2b57610d2b61351a565b600091825260209091208254910180546001600160a01b0319166001600160a01b03909216918217815591546001600160601b03600160a01b9182900416021790558154829080610d7e57610d7e613593565b60008281526020812082016000199081019190915501905580610da081613561565b915050610bd8565b505050505050565b6001600160a01b038216600090815260026020908152604080832060ff881684529091528120805482919084908110610deb57610deb61351a565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b90930492909216908201529050610e428186611f1c565b6040015195945050505050565b6000610e5c8484846120a7565b90505b9392505050565b6001600160a01b038316600090815260026020908152604080832060ff861684529091528120610e978585856120a7565b63ffffffff1681548110610ead57610ead61351a565b600091825260209091200154600160401b90046001600160601b0316949350505050565b60606000826001600160401b03811115610eed57610eed612e1b565b604051908082528060200260200182016040528015610f16578160200160208202803683370190505b50905060005b83811015611190576000858583818110610f3857610f3861351a565b919091013560f81c60008181526001602052604090205490925015159050610fd75760405162461bcd60e51b815260206004820152604660248201527f5374616b6552656769737472792e676574546f74616c5374616b65496e64696360448201527f65734174426c6f636b4e756d6265723a2071756f72756d20646f6573206e6f7460648201526508195e1a5cdd60d21b608482015260a40161061d565b60ff81166000908152600160205260408120805463ffffffff8a1692906110005761100061351a565b60009182526020909120015463ffffffff1611156110ac5760405162461bcd60e51b815260206004820152605b60248201527f5374616b6552656769737472792e676574546f74616c5374616b65496e64696360448201527f65734174426c6f636b4e756d6265723a2071756f72756d20686173206e6f207360648201527f74616b6520686973746f727920617420626c6f636b4e756d6265720000000000608482015260a40161061d565b60ff8116600090815260016020526040812054905b8181101561117a5760ff8316600090815260016020819052604090912063ffffffff8b16916110f0848661357c565b6110fa919061357c565b8154811061110a5761110a61351a565b60009182526020909120015463ffffffff161161116857600161112d828461357c565b611137919061357c565b8585815181106111495761114961351a565b602002602001019063ffffffff16908163ffffffff168152505061117a565b8061117281613561565b9150506110c1565b505050808061118890613561565b915050610f1c565b50949350505050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111e35760405162461bcd60e51b815260040161061d906135a9565b6000805b838110156106325760008585838181106112035761120361351a565b919091013560f81c600081815260016020526040902054909250151590506112935760405162461bcd60e51b815260206004820152603860248201527f5374616b6552656769737472792e7570646174654f70657261746f725374616b60448201527f653a2071756f72756d20646f6573206e6f742065786973740000000000000000606482015260840161061d565b6000806112a0838b611d66565b91509150806112c25760009150600160ff84161b6001600160c01b0386161794505b60006112cf8a8585612363565b90506112db8482612614565b505050505080806112eb90613561565b9150506111e7565b604080518082019091526000808252602082015260ff8316600090815260036020526040902080548390811061132b5761132b61351a565b6000918252602091829020604080518082019091529101546001600160a01b0381168252600160a01b90046001600160601b0316918101919091529392505050565b604080516060810182526000808252602080830182905282840182905260ff8616825260019052919091208054839081106113aa576113aa61351a565b600091825260209182902060408051606081018252929091015463ffffffff8082168452600160201b82041693830193909352600160401b9092046001600160601b0316918101919091529392505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561145a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147e9190613481565b6001600160a01b0316336001600160a01b0316146114ae5760405162461bcd60e51b815260040161061d9061349e565b816114ca8160ff16600090815260016020526040902054151590565b6114e65760405162461bcd60e51b815260040161061d90613430565b6114f0838361278e565b505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115779190613481565b6001600160a01b0316336001600160a01b0316146115a75760405162461bcd60e51b815260040161061d9061349e565b816115c38160ff16600090815260016020526040902054151590565b6115df5760405162461bcd60e51b815260040161061d90613430565b6114f083836127f7565b60ff831660009081526001602052604081208054829190849081106116105761161061351a565b600091825260209182902060408051606081018252919092015463ffffffff8082168352600160201b820416938201939093526001600160601b03600160401b909304929092169082015290506105e08185611f1c565b60408051606081018252600080825260208083018290528284018290526001600160a01b03861682526002815283822060ff881683529052919091208054839081106116b5576116b561351a565b600091825260209182902060408051606081018252929091015463ffffffff8082168452600160201b82041693830193909352600160401b9092046001600160601b031691810191909152949350505050565b60ff811660009081526001602081905260408220805490916117299161357c565b815481106117395761173961351a565b600091825260209091200154600160401b90046001600160601b031692915050565b6001600160a01b038216600090815260026020908152604080832060ff851684528252808320805482518185028101850190935280835260609492939192909184015b828210156117f7576000848152602090819020604080516060810182529185015463ffffffff8082168452600160201b82041683850152600160401b90046001600160601b03169082015282526001909201910161179e565b50505050905092915050565b606080336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461184e5760405162461bcd60e51b815260040161061d906135a9565b6000836001600160401b0381111561186857611868612e1b565b604051908082528060200260200182016040528015611891578160200160208202803683370190505b5090506000846001600160401b038111156118ae576118ae612e1b565b6040519080825280602002602001820160405280156118d7578160200160208202803683370190505b50905060005b85811015611ac05760008787838181106118f9576118f961351a565b919091013560f81c600081815260016020526040902054909250151590506119815760405162461bcd60e51b815260206004820152603560248201527f5374616b6552656769737472792e72656769737465724f70657261746f723a206044820152741c5d5bdc9d5b48191bd95cc81b9bdd08195e1a5cdd605a1b606482015260840161061d565b60008061198e838d611d66565b9150915080611a2b5760405162461bcd60e51b815260206004820152605b60248201527f5374616b6552656769737472792e72656769737465724f70657261746f723a2060448201527f4f70657261746f7220646f6573206e6f74206d656574206d696e696d756d207360648201527f74616b6520726571756972656d656e7420666f722071756f72756d0000000000608482015260a40161061d565b6000611a388c8585612363565b905082878681518110611a4d57611a4d61351a565b60200260200101906001600160601b031690816001600160601b031681525050611a778482612614565b868681518110611a8957611a8961351a565b60200260200101906001600160601b031690816001600160601b031681525050505050508080611ab890613561565b9150506118dd565b509097909650945050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b165760405162461bcd60e51b815260040161061d906135a9565b60005b81811015611bf5576000838383818110611b3557611b3561351a565b919091013560f81c60008181526001602052604090205490925015159050611bc55760405162461bcd60e51b815260206004820152603760248201527f5374616b6552656769737472792e646572656769737465724f70657261746f7260448201527f3a2071756f72756d20646f6573206e6f74206578697374000000000000000000606482015260840161061d565b6000611bd386836000612363565b9050611bdf8282612614565b5050508080611bed90613561565b915050611b19565b50505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c435760405162461bcd60e51b815260040161061d906135a9565b60ff831660009081526001602052604090205415611cc15760405162461bcd60e51b815260206004820152603560248201527f5374616b6552656769737472792e696e697469616c697a6551756f72756d3a2060448201527471756f72756d20616c72656164792065786973747360581b606482015260840161061d565b611ccb83826127f7565b611cd5838361278e565b505060ff166000908152600160208181526040808420815160608101835263ffffffff438116825281850187815293820187815283549687018455928752939095209451949093018054915193516001600160601b0316600160401b02600160401b600160a01b0319948416600160201b0267ffffffffffffffff1990931695909316949094171791909116179055565b600080600080611d858660ff1660009081526003602052604090205490565b604080518082019091526000808252602082015290915060005b82811015611ee95760ff88166000908152600360205260409020805482908110611dcb57611dcb61351a565b6000918252602080832060408051808201825293909101546001600160a01b03808216808652600160a01b9092046001600160601b031693850193909352905163778e55f360e01b81528b8316600482015260248101919091529194507f0000000000000000000000000000000000000000000000000000000000000000169063778e55f390604401602060405180830381865afa158015611e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e95919061361b565b90508015611ed657670de0b6b3a764000083602001516001600160601b031682611ebf9190613634565b611ec99190613653565b611ed39086613675565b94505b5080611ee181613561565b915050611d9f565b50505060ff85166000908152602081905260409020549092506001600160601b03908116908316101590505b9250929050565b816000015163ffffffff168163ffffffff161015611fc85760405162461bcd60e51b815260206004820152606060248201527f5374616b6552656769737472792e5f76616c69646174654f70657261746f725360448201527f74616b654174426c6f636b4e756d6265723a206f70657261746f725374616b6560648201527f5570646174652069732066726f6d20616674657220626c6f636b4e756d626572608482015260a40161061d565b602082015163ffffffff161580611fee5750816020015163ffffffff168163ffffffff16105b6120a35760405162461bcd60e51b815260206004820152607460248201527f5374616b6552656769737472792e5f76616c69646174654f70657261746f725360448201527f74616b654174426c6f636b4e756d6265723a2074686572652069732061206e6560648201527f776572206f70657261746f725374616b6555706461746520617661696c61626c60848201527332903132b337b93290313637b1b5a73ab6b132b960611b60a482015260c40161061d565b5050565b6001600160a01b038316600090815260026020908152604080832060ff86168452909152812054815b8181101561229e576001600160a01b038616600090815260026020908152604080832060ff89168452909152902063ffffffff8516906001612112848661357c565b61211c919061357c565b8154811061212c5761212c61351a565b60009182526020909120015463ffffffff161161228c576001600160a01b038616600090815260026020908152604080832060ff8916845290915281206001612175848661357c565b61217f919061357c565b8154811061218f5761218f61351a565b600091825260209091200154600160201b900463ffffffff1690508015806121c257508463ffffffff168163ffffffff16115b61226c5760405162461bcd60e51b815260206004820152606960248201527f5374616b6552656769737472792e5f6765745374616b65557064617465496e6460448201527f6578466f724f70657261746f724174426c6f636b4e756d6265723a206f70657260648201527f61746f72496420686173206e6f207374616b652075706461746520617420626c60848201526837b1b5a73ab6b132b960b91b60a482015260c40161061d565b6001612278838561357c565b612282919061357c565b9350505050610e5f565b8061229681613561565b9150506120d0565b5060405162461bcd60e51b815260206004820152608160248201527f5374616b6552656769737472792e5f6765745374616b65557064617465496e6460448201527f6578466f724f70657261746f724174426c6f636b4e756d6265723a206e6f207360648201527f74616b652075706461746520666f756e6420666f72206f70657261746f72496460848201527f20616e642071756f72756d4e756d62657220617420626c6f636b206e756d626560a4820152603960f91b60c482015260e40161061d565b6001600160a01b038316600090815260026020908152604080832060ff8616845290915281205481908061243b576001600160a01b038616600090815260026020908152604080832060ff891684528252808320815160608101835263ffffffff43811682528185018681526001600160601b03808c16958401958652845460018101865594885295909620915191909201805495519351909416600160401b02600160401b600160a01b0319938316600160201b0267ffffffffffffffff19909616919092161793909317169190911790556125b1565b6001600160a01b038616600090815260026020908152604080832060ff89168452909152812061246c60018461357c565b8154811061247c5761247c61351a565b600091825260209091200180546001600160601b03600160401b9091048116945090915085168314156124b55760009350505050610e5f565b80544363ffffffff908116911614156124ef578054600160401b600160a01b031916600160401b6001600160601b038716021781556125af565b805467ffffffff000000001916600160201b4363ffffffff9081168281029390931784556001600160a01b038a16600090815260026020908152604080832060ff8d168452825280832081516060810183529687528683018481526001600160601b038d81169389019384528254600181018455928652939094209651960180549351915196851667ffffffffffffffff1990941693909317931690930291909117600160401b600160a01b031916600160401b93909216929092021790555b505b6040805160ff871681526001600160601b03861660208201526001600160a01b038816917f2a539b406fea8ccdda7269c7a03c71f11636b75ff181f9ce2b19734fdf48f072910160405180910390a261260a8285612bdb565b9695505050505050565b60ff821660009081526001602081905260408220805491839190612638908461357c565b815481106126485761264861351a565b90600052602060002001905083600014156126775754600160401b90046001600160601b031691506105cd9050565b805460009061269690600160401b90046001600160601b031686612bf3565b82549091504363ffffffff908116911614156126d3578154600160401b600160a01b031916600160401b6001600160601b03831602178255612785565b815463ffffffff438116600160201b81810267ffffffff000000001990941693909317855560ff8916600090815260016020818152604080842081516060810183529586528583018581526001600160601b03808b169388019384528254958601835591865292909420945194909201805491519251909316600160401b02600160401b600160a01b031992861690960267ffffffffffffffff19909116939094169290921792909217169190911790555b95945050505050565b60ff82166000818152602081815260409182902080546bffffffffffffffffffffffff19166001600160601b03861690811790915591519182527f26eecff2b70b0a71104ff4d940ba7162d23a95c248771fc487a7be17a596b3cf910160405180910390a25050565b600081511161285c5760405162461bcd60e51b8152602060048201526038602482015260008051602061373d83398151915260448201527f3a206e6f20737472617465676965732070726f76696465640000000000000000606482015260840161061d565b805160ff83166000908152600360209081526040909120549061287f83836136a0565b11156128ef5760405162461bcd60e51b8152602060048201526045602482015260008051602061373d83398151915260448201527f3a20657863656564204d41585f5745494748494e475f46554e4354494f4e5f4c60648201526408a9c8ea8960db1b608482015260a40161061d565b60005b82811015612bd45760005b61290782846136a0565b8110156129e8578482815181106129205761292061351a565b6020026020010151600001516001600160a01b0316600360008860ff1660ff168152602001908152602001600020828154811061295f5761295f61351a565b6000918252602090912001546001600160a01b031614156129d65760405162461bcd60e51b815260206004820152603d602482015260008051602061373d83398151915260448201527f3a2063616e6e6f74206164642073616d65207374726174656779203278000000606482015260840161061d565b806129e081613561565b9150506128fd565b5060008482815181106129fd576129fd61351a565b6020026020010151602001516001600160601b031611612a825760405162461bcd60e51b8152602060048201526046602482015260008051602061373d83398151915260448201527f3a2063616e6e6f74206164642073747261746567792077697468207a65726f206064820152651dd95a59da1d60d21b608482015260a40161061d565b60ff851660009081526003602052604090208451859083908110612aa857612aa861351a565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b0390911617910155835160ff8616907f10565e56cacbf32eca267945f054fec02e59750032d113d3302182ad967f540490869084908110612b2557612b2561351a565b602090810291909101810151516040516001600160a01b0390911681520160405180910390a28460ff167f11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a75858381518110612b8257612b8261351a565b602002602001015160000151868481518110612ba057612ba061351a565b602002602001015160200151604051612bba929190612c7c565b60405180910390a280612bcc81613561565b9150506128f2565b5050505050565b6000610e5f6001600160601b038085169084166136b8565b600080821215612c1757612c06826136f7565b612c109084613714565b90506105cd565b612c108284613675565b803560ff81168114612c3257600080fd5b919050565b600060208284031215612c4957600080fd5b610e5f82612c21565b60008060408385031215612c6557600080fd5b612c6e83612c21565b946020939093013593505050565b6001600160a01b039290921682526001600160601b0316602082015260400190565b6001600160a01b0381168114612cb357600080fd5b50565b60008060408385031215612cc957600080fd5b8235612cd481612c9e565b9150612ce260208401612c21565b90509250929050565b60008060408385031215612cfe57600080fd5b612d0783612c21565b91506020830135612d1781612c9e565b809150509250929050565b60008083601f840112612d3457600080fd5b5081356001600160401b03811115612d4b57600080fd5b6020830191508360208260051b8501011115611f1557600080fd5b600080600080600060608688031215612d7e57600080fd5b612d8786612c21565b945060208601356001600160401b0380821115612da357600080fd5b612daf89838a01612d22565b90965094506040880135915080821115612dc857600080fd5b50612dd588828901612d22565b969995985093965092949392505050565b815163ffffffff9081168252602080840151909116908201526040808301516001600160601b031690820152606081016105cd565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612e5357612e53612e1b565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612e8157612e81612e1b565b604052919050565b60006001600160401b03821115612ea257612ea2612e1b565b5060051b60200190565b60008060408385031215612ebf57600080fd5b612ec883612c21565b91506020808401356001600160401b03811115612ee457600080fd5b8401601f81018613612ef557600080fd5b8035612f08612f0382612e89565b612e59565b81815260059190911b82018301908381019088831115612f2757600080fd5b928401925b82841015612f4557833582529284019290840190612f2c565b80955050505050509250929050565b803563ffffffff81168114612c3257600080fd5b60008060008060808587031215612f7e57600080fd5b612f8785612c21565b9350612f9560208601612f54565b92506040850135612fa581612c9e565b9396929550929360600135925050565b600080600060608486031215612fca57600080fd5b8335612fd581612c9e565b9250612fe360208501612c21565b9150612ff160408501612f54565b90509250925092565b60008083601f84011261300c57600080fd5b5081356001600160401b0381111561302357600080fd5b602083019150836020828501011115611f1557600080fd5b60008060006040848603121561305057600080fd5b61305984612f54565b925060208401356001600160401b0381111561307457600080fd5b61308086828701612ffa565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b818110156130cb57835163ffffffff16835292840192918401916001016130a9565b50909695505050505050565b600080600080606085870312156130ed57600080fd5b84356130f881612c9e565b9350602085013561310881612c9e565b925060408501356001600160401b0381111561312357600080fd5b61312f87828801612ffa565b95989497509550505050565b80356001600160601b0381168114612c3257600080fd5b6000806040838503121561316557600080fd5b61316e83612c21565b9150612ce26020840161313b565b600082601f83011261318d57600080fd5b8135602061319d612f0383612e89565b82815260069290921b840181019181810190868411156131bc57600080fd5b8286015b8481101561320b57604081890312156131d95760008081fd5b6131e1612e31565b81356131ec81612c9e565b81526131f982860161313b565b818601528352918301916040016131c0565b509695505050505050565b6000806040838503121561322957600080fd5b61323283612c21565b915060208301356001600160401b0381111561324d57600080fd5b6132598582860161317c565b9150509250929050565b60008060006060848603121561327857600080fd5b61328184612c21565b925061328f60208501612f54565b9150604084013590509250925092565b6000806000606084860312156132b457600080fd5b6132bd84612c21565b925060208401356132cd81612c9e565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b818110156130cb5761333783855163ffffffff808251168352806020830151166020840152506001600160601b0360408201511660408301525050565b92840192606092909201916001016132fa565b600081518084526020808501945080840160005b838110156133835781516001600160601b03168752958201959082019060010161335e565b509495945050505050565b6040815260006133a1604083018561334a565b8281036020840152612785818561334a565b6000806000604084860312156133c857600080fd5b833561305981612c9e565b6000806000606084860312156133e857600080fd5b6133f184612c21565b92506133ff6020850161313b565b915060408401356001600160401b0381111561341a57600080fd5b6134268682870161317c565b9150509250925092565b60208082526031908201527f5374616b6552656769737472792e71756f72756d4578697374733a2071756f726040820152701d5b48191bd95cc81b9bdd08195e1a5cdd607a1b606082015260800190565b60006020828403121561349357600080fd5b8151610e5f81612c9e565b60208082526056908201527f5374616b6552656769737472792e6f6e6c79436f6f7264696e61746f724f776e60408201527f65723a2063616c6c6572206973206e6f7420746865206f776e6572206f6620746060820152753432903932b3b4b9ba393ca1b7b7b93234b730ba37b960511b608082015260a00190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561354257600080fd5b610e5f8261313b565b634e487b7160e01b600052601160045260246000fd5b60006000198214156135755761357561354b565b5060010190565b60008282101561358e5761358e61354b565b500390565b634e487b7160e01b600052603160045260246000fd5b6020808252604c908201527f5374616b6552656769737472792e6f6e6c795265676973747279436f6f72646960408201527f6e61746f723a2063616c6c6572206973206e6f7420746865205265676973747260608201526b3ca1b7b7b93234b730ba37b960a11b608082015260a00190565b60006020828403121561362d57600080fd5b5051919050565b600081600019048311821515161561364e5761364e61354b565b500290565b60008261367057634e487b7160e01b600052601260045260246000fd5b500490565b60006001600160601b038083168185168083038211156136975761369761354b565b01949350505050565b600082198211156136b3576136b361354b565b500190565b60008083128015600160ff1b8501841216156136d6576136d661354b565b6001600160ff1b03840183138116156136f1576136f161354b565b50500390565b6000600160ff1b82141561370d5761370d61354b565b5060000390565b60006001600160601b03838116908316818110156137345761373461354b565b03939250505056fe5374616b6552656769737472792e5f6164645374726174656779506172616d73a26469706673582212206efaea4245f01e6817252510eb4f12ff24a9221631bdda112728c55af6432d4464736f6c634300080c0033", +} + +// ContractECDSAStakeRegistryABI is the input ABI used to generate the binding from. +// Deprecated: Use ContractECDSAStakeRegistryMetaData.ABI instead. +var ContractECDSAStakeRegistryABI = ContractECDSAStakeRegistryMetaData.ABI + +// ContractECDSAStakeRegistryBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ContractECDSAStakeRegistryMetaData.Bin instead. +var ContractECDSAStakeRegistryBin = ContractECDSAStakeRegistryMetaData.Bin + +// DeployContractECDSAStakeRegistry deploys a new Ethereum contract, binding an instance of ContractECDSAStakeRegistry to it. +func DeployContractECDSAStakeRegistry(auth *bind.TransactOpts, backend bind.ContractBackend, _registryCoordinator common.Address, _delegationManager common.Address) (common.Address, *types.Transaction, *ContractECDSAStakeRegistry, error) { + parsed, err := ContractECDSAStakeRegistryMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ContractECDSAStakeRegistryBin), backend, _registryCoordinator, _delegationManager) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ContractECDSAStakeRegistry{ContractECDSAStakeRegistryCaller: ContractECDSAStakeRegistryCaller{contract: contract}, ContractECDSAStakeRegistryTransactor: ContractECDSAStakeRegistryTransactor{contract: contract}, ContractECDSAStakeRegistryFilterer: ContractECDSAStakeRegistryFilterer{contract: contract}}, nil +} + +// ContractECDSAStakeRegistryMethods is an auto generated interface around an Ethereum contract. +type ContractECDSAStakeRegistryMethods interface { + ContractECDSAStakeRegistryCalls + ContractECDSAStakeRegistryTransacts + ContractECDSAStakeRegistryFilters +} + +// ContractECDSAStakeRegistryCalls is an auto generated interface that defines the call methods available for an Ethereum contract. +type ContractECDSAStakeRegistryCalls interface { + MAXWEIGHINGFUNCTIONLENGTH(opts *bind.CallOpts) (uint8, error) + + WEIGHTINGDIVISOR(opts *bind.CallOpts) (*big.Int, error) + + Delegation(opts *bind.CallOpts) (common.Address, error) + + GetCurrentStake(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8) (*big.Int, error) + + GetCurrentTotalStake(opts *bind.CallOpts, quorumNumber uint8) (*big.Int, error) + + GetLatestStakeUpdate(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8) (ECDSAStakeRegistryStakeUpdate, error) + + GetStakeAtBlockNumber(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8, blockNumber uint32) (*big.Int, error) + + GetStakeAtBlockNumberAndIndex(opts *bind.CallOpts, quorumNumber uint8, blockNumber uint32, operatorId common.Address, index *big.Int) (*big.Int, error) + + GetStakeHistory(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8) ([]ECDSAStakeRegistryStakeUpdate, error) + + GetStakeHistoryLength(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8) (*big.Int, error) + + GetStakeUpdateAtIndex(opts *bind.CallOpts, quorumNumber uint8, operatorId common.Address, index *big.Int) (ECDSAStakeRegistryStakeUpdate, error) + + GetStakeUpdateIndexAtBlockNumber(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8, blockNumber uint32) (uint32, error) + + GetTotalStakeAtBlockNumberFromIndex(opts *bind.CallOpts, quorumNumber uint8, blockNumber uint32, index *big.Int) (*big.Int, error) + + GetTotalStakeHistoryLength(opts *bind.CallOpts, quorumNumber uint8) (*big.Int, error) + + GetTotalStakeIndicesAtBlockNumber(opts *bind.CallOpts, blockNumber uint32, quorumNumbers []byte) ([]uint32, error) + + GetTotalStakeUpdateAtIndex(opts *bind.CallOpts, quorumNumber uint8, index *big.Int) (ECDSAStakeRegistryStakeUpdate, error) + + MinimumStakeForQuorum(opts *bind.CallOpts, arg0 uint8) (*big.Int, error) + + RegistryCoordinator(opts *bind.CallOpts) (common.Address, error) + + StrategyParams(opts *bind.CallOpts, arg0 uint8, arg1 *big.Int) (struct { + Strategy common.Address + Multiplier *big.Int + }, error) + + StrategyParamsByIndex(opts *bind.CallOpts, quorumNumber uint8, index *big.Int) (ECDSAStakeRegistryStrategyParams, error) + + StrategyParamsLength(opts *bind.CallOpts, quorumNumber uint8) (*big.Int, error) + + WeightOfOperatorForQuorum(opts *bind.CallOpts, quorumNumber uint8, operator common.Address) (*big.Int, error) +} + +// ContractECDSAStakeRegistryTransacts is an auto generated interface that defines the transact methods available for an Ethereum contract. +type ContractECDSAStakeRegistryTransacts interface { + AddStrategies(opts *bind.TransactOpts, quorumNumber uint8, _strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) + + DeregisterOperator(opts *bind.TransactOpts, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) + + InitializeQuorum(opts *bind.TransactOpts, quorumNumber uint8, minimumStake *big.Int, _strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) + + ModifyStrategyParams(opts *bind.TransactOpts, quorumNumber uint8, strategyIndices []*big.Int, newMultipliers []*big.Int) (*types.Transaction, error) + + RegisterOperator(opts *bind.TransactOpts, operator common.Address, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) + + RemoveStrategies(opts *bind.TransactOpts, quorumNumber uint8, indicesToRemove []*big.Int) (*types.Transaction, error) + + SetMinimumStakeForQuorum(opts *bind.TransactOpts, quorumNumber uint8, minimumStake *big.Int) (*types.Transaction, error) + + UpdateOperatorStake(opts *bind.TransactOpts, operator common.Address, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) +} + +// ContractECDSAStakeRegistryFilterer is an auto generated interface that defines the log filtering methods available for an Ethereum contract. +type ContractECDSAStakeRegistryFilters interface { + FilterMinimumStakeForQuorumUpdated(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryMinimumStakeForQuorumUpdatedIterator, error) + WatchMinimumStakeForQuorumUpdated(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated, quorumNumber []uint8) (event.Subscription, error) + ParseMinimumStakeForQuorumUpdated(log types.Log) (*ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated, error) + + FilterOperatorStakeUpdate(opts *bind.FilterOpts, operatorId []common.Address) (*ContractECDSAStakeRegistryOperatorStakeUpdateIterator, error) + WatchOperatorStakeUpdate(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryOperatorStakeUpdate, operatorId []common.Address) (event.Subscription, error) + ParseOperatorStakeUpdate(log types.Log) (*ContractECDSAStakeRegistryOperatorStakeUpdate, error) + + FilterQuorumCreated(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryQuorumCreatedIterator, error) + WatchQuorumCreated(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryQuorumCreated, quorumNumber []uint8) (event.Subscription, error) + ParseQuorumCreated(log types.Log) (*ContractECDSAStakeRegistryQuorumCreated, error) + + FilterStrategyAddedToQuorum(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryStrategyAddedToQuorumIterator, error) + WatchStrategyAddedToQuorum(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryStrategyAddedToQuorum, quorumNumber []uint8) (event.Subscription, error) + ParseStrategyAddedToQuorum(log types.Log) (*ContractECDSAStakeRegistryStrategyAddedToQuorum, error) + + FilterStrategyMultiplierUpdated(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryStrategyMultiplierUpdatedIterator, error) + WatchStrategyMultiplierUpdated(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryStrategyMultiplierUpdated, quorumNumber []uint8) (event.Subscription, error) + ParseStrategyMultiplierUpdated(log types.Log) (*ContractECDSAStakeRegistryStrategyMultiplierUpdated, error) + + FilterStrategyRemovedFromQuorum(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryStrategyRemovedFromQuorumIterator, error) + WatchStrategyRemovedFromQuorum(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryStrategyRemovedFromQuorum, quorumNumber []uint8) (event.Subscription, error) + ParseStrategyRemovedFromQuorum(log types.Log) (*ContractECDSAStakeRegistryStrategyRemovedFromQuorum, error) +} + +// ContractECDSAStakeRegistry is an auto generated Go binding around an Ethereum contract. +type ContractECDSAStakeRegistry struct { + ContractECDSAStakeRegistryCaller // Read-only binding to the contract + ContractECDSAStakeRegistryTransactor // Write-only binding to the contract + ContractECDSAStakeRegistryFilterer // Log filterer for contract events +} + +// ContractECDSAStakeRegistry implements the ContractECDSAStakeRegistryMethods interface. +var _ ContractECDSAStakeRegistryMethods = (*ContractECDSAStakeRegistry)(nil) + +// ContractECDSAStakeRegistryCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContractECDSAStakeRegistryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSAStakeRegistryCaller implements the ContractECDSAStakeRegistryCalls interface. +var _ ContractECDSAStakeRegistryCalls = (*ContractECDSAStakeRegistryCaller)(nil) + +// ContractECDSAStakeRegistryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContractECDSAStakeRegistryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSAStakeRegistryTransactor implements the ContractECDSAStakeRegistryTransacts interface. +var _ ContractECDSAStakeRegistryTransacts = (*ContractECDSAStakeRegistryTransactor)(nil) + +// ContractECDSAStakeRegistryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContractECDSAStakeRegistryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContractECDSAStakeRegistryFilterer implements the ContractECDSAStakeRegistryFilters interface. +var _ ContractECDSAStakeRegistryFilters = (*ContractECDSAStakeRegistryFilterer)(nil) + +// ContractECDSAStakeRegistrySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContractECDSAStakeRegistrySession struct { + Contract *ContractECDSAStakeRegistry // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContractECDSAStakeRegistryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContractECDSAStakeRegistryCallerSession struct { + Contract *ContractECDSAStakeRegistryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContractECDSAStakeRegistryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContractECDSAStakeRegistryTransactorSession struct { + Contract *ContractECDSAStakeRegistryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContractECDSAStakeRegistryRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContractECDSAStakeRegistryRaw struct { + Contract *ContractECDSAStakeRegistry // Generic contract binding to access the raw methods on +} + +// ContractECDSAStakeRegistryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContractECDSAStakeRegistryCallerRaw struct { + Contract *ContractECDSAStakeRegistryCaller // Generic read-only contract binding to access the raw methods on +} + +// ContractECDSAStakeRegistryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContractECDSAStakeRegistryTransactorRaw struct { + Contract *ContractECDSAStakeRegistryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContractECDSAStakeRegistry creates a new instance of ContractECDSAStakeRegistry, bound to a specific deployed contract. +func NewContractECDSAStakeRegistry(address common.Address, backend bind.ContractBackend) (*ContractECDSAStakeRegistry, error) { + contract, err := bindContractECDSAStakeRegistry(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistry{ContractECDSAStakeRegistryCaller: ContractECDSAStakeRegistryCaller{contract: contract}, ContractECDSAStakeRegistryTransactor: ContractECDSAStakeRegistryTransactor{contract: contract}, ContractECDSAStakeRegistryFilterer: ContractECDSAStakeRegistryFilterer{contract: contract}}, nil +} + +// NewContractECDSAStakeRegistryCaller creates a new read-only instance of ContractECDSAStakeRegistry, bound to a specific deployed contract. +func NewContractECDSAStakeRegistryCaller(address common.Address, caller bind.ContractCaller) (*ContractECDSAStakeRegistryCaller, error) { + contract, err := bindContractECDSAStakeRegistry(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryCaller{contract: contract}, nil +} + +// NewContractECDSAStakeRegistryTransactor creates a new write-only instance of ContractECDSAStakeRegistry, bound to a specific deployed contract. +func NewContractECDSAStakeRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractECDSAStakeRegistryTransactor, error) { + contract, err := bindContractECDSAStakeRegistry(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryTransactor{contract: contract}, nil +} + +// NewContractECDSAStakeRegistryFilterer creates a new log filterer instance of ContractECDSAStakeRegistry, bound to a specific deployed contract. +func NewContractECDSAStakeRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractECDSAStakeRegistryFilterer, error) { + contract, err := bindContractECDSAStakeRegistry(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryFilterer{contract: contract}, nil +} + +// bindContractECDSAStakeRegistry binds a generic wrapper to an already deployed contract. +func bindContractECDSAStakeRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ContractECDSAStakeRegistryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContractECDSAStakeRegistry.Contract.ContractECDSAStakeRegistryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.ContractECDSAStakeRegistryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.ContractECDSAStakeRegistryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContractECDSAStakeRegistry.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.contract.Transact(opts, method, params...) +} + +// MAXWEIGHINGFUNCTIONLENGTH is a free data retrieval call binding the contract method 0x7c172347. +// +// Solidity: function MAX_WEIGHING_FUNCTION_LENGTH() view returns(uint8) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) MAXWEIGHINGFUNCTIONLENGTH(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "MAX_WEIGHING_FUNCTION_LENGTH") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// MAXWEIGHINGFUNCTIONLENGTH is a free data retrieval call binding the contract method 0x7c172347. +// +// Solidity: function MAX_WEIGHING_FUNCTION_LENGTH() view returns(uint8) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) MAXWEIGHINGFUNCTIONLENGTH() (uint8, error) { + return _ContractECDSAStakeRegistry.Contract.MAXWEIGHINGFUNCTIONLENGTH(&_ContractECDSAStakeRegistry.CallOpts) +} + +// MAXWEIGHINGFUNCTIONLENGTH is a free data retrieval call binding the contract method 0x7c172347. +// +// Solidity: function MAX_WEIGHING_FUNCTION_LENGTH() view returns(uint8) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) MAXWEIGHINGFUNCTIONLENGTH() (uint8, error) { + return _ContractECDSAStakeRegistry.Contract.MAXWEIGHINGFUNCTIONLENGTH(&_ContractECDSAStakeRegistry.CallOpts) +} + +// WEIGHTINGDIVISOR is a free data retrieval call binding the contract method 0x5e5a6775. +// +// Solidity: function WEIGHTING_DIVISOR() view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) WEIGHTINGDIVISOR(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "WEIGHTING_DIVISOR") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// WEIGHTINGDIVISOR is a free data retrieval call binding the contract method 0x5e5a6775. +// +// Solidity: function WEIGHTING_DIVISOR() view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) WEIGHTINGDIVISOR() (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.WEIGHTINGDIVISOR(&_ContractECDSAStakeRegistry.CallOpts) +} + +// WEIGHTINGDIVISOR is a free data retrieval call binding the contract method 0x5e5a6775. +// +// Solidity: function WEIGHTING_DIVISOR() view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) WEIGHTINGDIVISOR() (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.WEIGHTINGDIVISOR(&_ContractECDSAStakeRegistry.CallOpts) +} + +// Delegation is a free data retrieval call binding the contract method 0xdf5cf723. +// +// Solidity: function delegation() view returns(address) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) Delegation(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "delegation") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Delegation is a free data retrieval call binding the contract method 0xdf5cf723. +// +// Solidity: function delegation() view returns(address) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) Delegation() (common.Address, error) { + return _ContractECDSAStakeRegistry.Contract.Delegation(&_ContractECDSAStakeRegistry.CallOpts) +} + +// Delegation is a free data retrieval call binding the contract method 0xdf5cf723. +// +// Solidity: function delegation() view returns(address) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) Delegation() (common.Address, error) { + return _ContractECDSAStakeRegistry.Contract.Delegation(&_ContractECDSAStakeRegistry.CallOpts) +} + +// GetCurrentStake is a free data retrieval call binding the contract method 0x197cfc6e. +// +// Solidity: function getCurrentStake(address operatorId, uint8 quorumNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetCurrentStake(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getCurrentStake", operatorId, quorumNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCurrentStake is a free data retrieval call binding the contract method 0x197cfc6e. +// +// Solidity: function getCurrentStake(address operatorId, uint8 quorumNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetCurrentStake(operatorId common.Address, quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetCurrentStake(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber) +} + +// GetCurrentStake is a free data retrieval call binding the contract method 0x197cfc6e. +// +// Solidity: function getCurrentStake(address operatorId, uint8 quorumNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetCurrentStake(operatorId common.Address, quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetCurrentStake(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber) +} + +// GetCurrentTotalStake is a free data retrieval call binding the contract method 0xd5eccc05. +// +// Solidity: function getCurrentTotalStake(uint8 quorumNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetCurrentTotalStake(opts *bind.CallOpts, quorumNumber uint8) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getCurrentTotalStake", quorumNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCurrentTotalStake is a free data retrieval call binding the contract method 0xd5eccc05. +// +// Solidity: function getCurrentTotalStake(uint8 quorumNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetCurrentTotalStake(quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetCurrentTotalStake(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber) +} + +// GetCurrentTotalStake is a free data retrieval call binding the contract method 0xd5eccc05. +// +// Solidity: function getCurrentTotalStake(uint8 quorumNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetCurrentTotalStake(quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetCurrentTotalStake(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber) +} + +// GetLatestStakeUpdate is a free data retrieval call binding the contract method 0x300ad369. +// +// Solidity: function getLatestStakeUpdate(address operatorId, uint8 quorumNumber) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetLatestStakeUpdate(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8) (ECDSAStakeRegistryStakeUpdate, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getLatestStakeUpdate", operatorId, quorumNumber) + + if err != nil { + return *new(ECDSAStakeRegistryStakeUpdate), err + } + + out0 := *abi.ConvertType(out[0], new(ECDSAStakeRegistryStakeUpdate)).(*ECDSAStakeRegistryStakeUpdate) + + return out0, err + +} + +// GetLatestStakeUpdate is a free data retrieval call binding the contract method 0x300ad369. +// +// Solidity: function getLatestStakeUpdate(address operatorId, uint8 quorumNumber) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetLatestStakeUpdate(operatorId common.Address, quorumNumber uint8) (ECDSAStakeRegistryStakeUpdate, error) { + return _ContractECDSAStakeRegistry.Contract.GetLatestStakeUpdate(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber) +} + +// GetLatestStakeUpdate is a free data retrieval call binding the contract method 0x300ad369. +// +// Solidity: function getLatestStakeUpdate(address operatorId, uint8 quorumNumber) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetLatestStakeUpdate(operatorId common.Address, quorumNumber uint8) (ECDSAStakeRegistryStakeUpdate, error) { + return _ContractECDSAStakeRegistry.Contract.GetLatestStakeUpdate(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber) +} + +// GetStakeAtBlockNumber is a free data retrieval call binding the contract method 0x7a64b516. +// +// Solidity: function getStakeAtBlockNumber(address operatorId, uint8 quorumNumber, uint32 blockNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetStakeAtBlockNumber(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8, blockNumber uint32) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getStakeAtBlockNumber", operatorId, quorumNumber, blockNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetStakeAtBlockNumber is a free data retrieval call binding the contract method 0x7a64b516. +// +// Solidity: function getStakeAtBlockNumber(address operatorId, uint8 quorumNumber, uint32 blockNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetStakeAtBlockNumber(operatorId common.Address, quorumNumber uint8, blockNumber uint32) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeAtBlockNumber(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber, blockNumber) +} + +// GetStakeAtBlockNumber is a free data retrieval call binding the contract method 0x7a64b516. +// +// Solidity: function getStakeAtBlockNumber(address operatorId, uint8 quorumNumber, uint32 blockNumber) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetStakeAtBlockNumber(operatorId common.Address, quorumNumber uint8, blockNumber uint32) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeAtBlockNumber(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber, blockNumber) +} + +// GetStakeAtBlockNumberAndIndex is a free data retrieval call binding the contract method 0x63efdb3e. +// +// Solidity: function getStakeAtBlockNumberAndIndex(uint8 quorumNumber, uint32 blockNumber, address operatorId, uint256 index) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetStakeAtBlockNumberAndIndex(opts *bind.CallOpts, quorumNumber uint8, blockNumber uint32, operatorId common.Address, index *big.Int) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getStakeAtBlockNumberAndIndex", quorumNumber, blockNumber, operatorId, index) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetStakeAtBlockNumberAndIndex is a free data retrieval call binding the contract method 0x63efdb3e. +// +// Solidity: function getStakeAtBlockNumberAndIndex(uint8 quorumNumber, uint32 blockNumber, address operatorId, uint256 index) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetStakeAtBlockNumberAndIndex(quorumNumber uint8, blockNumber uint32, operatorId common.Address, index *big.Int) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeAtBlockNumberAndIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, blockNumber, operatorId, index) +} + +// GetStakeAtBlockNumberAndIndex is a free data retrieval call binding the contract method 0x63efdb3e. +// +// Solidity: function getStakeAtBlockNumberAndIndex(uint8 quorumNumber, uint32 blockNumber, address operatorId, uint256 index) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetStakeAtBlockNumberAndIndex(quorumNumber uint8, blockNumber uint32, operatorId common.Address, index *big.Int) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeAtBlockNumberAndIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, blockNumber, operatorId, index) +} + +// GetStakeHistory is a free data retrieval call binding the contract method 0xea595ab1. +// +// Solidity: function getStakeHistory(address operatorId, uint8 quorumNumber) view returns((uint32,uint32,uint96)[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetStakeHistory(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8) ([]ECDSAStakeRegistryStakeUpdate, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getStakeHistory", operatorId, quorumNumber) + + if err != nil { + return *new([]ECDSAStakeRegistryStakeUpdate), err + } + + out0 := *abi.ConvertType(out[0], new([]ECDSAStakeRegistryStakeUpdate)).(*[]ECDSAStakeRegistryStakeUpdate) + + return out0, err + +} + +// GetStakeHistory is a free data retrieval call binding the contract method 0xea595ab1. +// +// Solidity: function getStakeHistory(address operatorId, uint8 quorumNumber) view returns((uint32,uint32,uint96)[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetStakeHistory(operatorId common.Address, quorumNumber uint8) ([]ECDSAStakeRegistryStakeUpdate, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeHistory(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber) +} + +// GetStakeHistory is a free data retrieval call binding the contract method 0xea595ab1. +// +// Solidity: function getStakeHistory(address operatorId, uint8 quorumNumber) view returns((uint32,uint32,uint96)[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetStakeHistory(operatorId common.Address, quorumNumber uint8) ([]ECDSAStakeRegistryStakeUpdate, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeHistory(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber) +} + +// GetStakeHistoryLength is a free data retrieval call binding the contract method 0x12e7c5f9. +// +// Solidity: function getStakeHistoryLength(address operatorId, uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetStakeHistoryLength(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getStakeHistoryLength", operatorId, quorumNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetStakeHistoryLength is a free data retrieval call binding the contract method 0x12e7c5f9. +// +// Solidity: function getStakeHistoryLength(address operatorId, uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetStakeHistoryLength(operatorId common.Address, quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeHistoryLength(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber) +} + +// GetStakeHistoryLength is a free data retrieval call binding the contract method 0x12e7c5f9. +// +// Solidity: function getStakeHistoryLength(address operatorId, uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetStakeHistoryLength(operatorId common.Address, quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeHistoryLength(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber) +} + +// GetStakeUpdateAtIndex is a free data retrieval call binding the contract method 0xcdb57ae4. +// +// Solidity: function getStakeUpdateAtIndex(uint8 quorumNumber, address operatorId, uint256 index) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetStakeUpdateAtIndex(opts *bind.CallOpts, quorumNumber uint8, operatorId common.Address, index *big.Int) (ECDSAStakeRegistryStakeUpdate, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getStakeUpdateAtIndex", quorumNumber, operatorId, index) + + if err != nil { + return *new(ECDSAStakeRegistryStakeUpdate), err + } + + out0 := *abi.ConvertType(out[0], new(ECDSAStakeRegistryStakeUpdate)).(*ECDSAStakeRegistryStakeUpdate) + + return out0, err + +} + +// GetStakeUpdateAtIndex is a free data retrieval call binding the contract method 0xcdb57ae4. +// +// Solidity: function getStakeUpdateAtIndex(uint8 quorumNumber, address operatorId, uint256 index) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetStakeUpdateAtIndex(quorumNumber uint8, operatorId common.Address, index *big.Int) (ECDSAStakeRegistryStakeUpdate, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeUpdateAtIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, operatorId, index) +} + +// GetStakeUpdateAtIndex is a free data retrieval call binding the contract method 0xcdb57ae4. +// +// Solidity: function getStakeUpdateAtIndex(uint8 quorumNumber, address operatorId, uint256 index) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetStakeUpdateAtIndex(quorumNumber uint8, operatorId common.Address, index *big.Int) (ECDSAStakeRegistryStakeUpdate, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeUpdateAtIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, operatorId, index) +} + +// GetStakeUpdateIndexAtBlockNumber is a free data retrieval call binding the contract method 0x65f10aff. +// +// Solidity: function getStakeUpdateIndexAtBlockNumber(address operatorId, uint8 quorumNumber, uint32 blockNumber) view returns(uint32) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetStakeUpdateIndexAtBlockNumber(opts *bind.CallOpts, operatorId common.Address, quorumNumber uint8, blockNumber uint32) (uint32, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getStakeUpdateIndexAtBlockNumber", operatorId, quorumNumber, blockNumber) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// GetStakeUpdateIndexAtBlockNumber is a free data retrieval call binding the contract method 0x65f10aff. +// +// Solidity: function getStakeUpdateIndexAtBlockNumber(address operatorId, uint8 quorumNumber, uint32 blockNumber) view returns(uint32) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetStakeUpdateIndexAtBlockNumber(operatorId common.Address, quorumNumber uint8, blockNumber uint32) (uint32, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeUpdateIndexAtBlockNumber(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber, blockNumber) +} + +// GetStakeUpdateIndexAtBlockNumber is a free data retrieval call binding the contract method 0x65f10aff. +// +// Solidity: function getStakeUpdateIndexAtBlockNumber(address operatorId, uint8 quorumNumber, uint32 blockNumber) view returns(uint32) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetStakeUpdateIndexAtBlockNumber(operatorId common.Address, quorumNumber uint8, blockNumber uint32) (uint32, error) { + return _ContractECDSAStakeRegistry.Contract.GetStakeUpdateIndexAtBlockNumber(&_ContractECDSAStakeRegistry.CallOpts, operatorId, quorumNumber, blockNumber) +} + +// GetTotalStakeAtBlockNumberFromIndex is a free data retrieval call binding the contract method 0xc8294c56. +// +// Solidity: function getTotalStakeAtBlockNumberFromIndex(uint8 quorumNumber, uint32 blockNumber, uint256 index) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetTotalStakeAtBlockNumberFromIndex(opts *bind.CallOpts, quorumNumber uint8, blockNumber uint32, index *big.Int) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getTotalStakeAtBlockNumberFromIndex", quorumNumber, blockNumber, index) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTotalStakeAtBlockNumberFromIndex is a free data retrieval call binding the contract method 0xc8294c56. +// +// Solidity: function getTotalStakeAtBlockNumberFromIndex(uint8 quorumNumber, uint32 blockNumber, uint256 index) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetTotalStakeAtBlockNumberFromIndex(quorumNumber uint8, blockNumber uint32, index *big.Int) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetTotalStakeAtBlockNumberFromIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, blockNumber, index) +} + +// GetTotalStakeAtBlockNumberFromIndex is a free data retrieval call binding the contract method 0xc8294c56. +// +// Solidity: function getTotalStakeAtBlockNumberFromIndex(uint8 quorumNumber, uint32 blockNumber, uint256 index) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetTotalStakeAtBlockNumberFromIndex(quorumNumber uint8, blockNumber uint32, index *big.Int) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetTotalStakeAtBlockNumberFromIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, blockNumber, index) +} + +// GetTotalStakeHistoryLength is a free data retrieval call binding the contract method 0x0491b41c. +// +// Solidity: function getTotalStakeHistoryLength(uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetTotalStakeHistoryLength(opts *bind.CallOpts, quorumNumber uint8) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getTotalStakeHistoryLength", quorumNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTotalStakeHistoryLength is a free data retrieval call binding the contract method 0x0491b41c. +// +// Solidity: function getTotalStakeHistoryLength(uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetTotalStakeHistoryLength(quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetTotalStakeHistoryLength(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber) +} + +// GetTotalStakeHistoryLength is a free data retrieval call binding the contract method 0x0491b41c. +// +// Solidity: function getTotalStakeHistoryLength(uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetTotalStakeHistoryLength(quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.GetTotalStakeHistoryLength(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber) +} + +// GetTotalStakeIndicesAtBlockNumber is a free data retrieval call binding the contract method 0x81c07502. +// +// Solidity: function getTotalStakeIndicesAtBlockNumber(uint32 blockNumber, bytes quorumNumbers) view returns(uint32[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetTotalStakeIndicesAtBlockNumber(opts *bind.CallOpts, blockNumber uint32, quorumNumbers []byte) ([]uint32, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getTotalStakeIndicesAtBlockNumber", blockNumber, quorumNumbers) + + if err != nil { + return *new([]uint32), err + } + + out0 := *abi.ConvertType(out[0], new([]uint32)).(*[]uint32) + + return out0, err + +} + +// GetTotalStakeIndicesAtBlockNumber is a free data retrieval call binding the contract method 0x81c07502. +// +// Solidity: function getTotalStakeIndicesAtBlockNumber(uint32 blockNumber, bytes quorumNumbers) view returns(uint32[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetTotalStakeIndicesAtBlockNumber(blockNumber uint32, quorumNumbers []byte) ([]uint32, error) { + return _ContractECDSAStakeRegistry.Contract.GetTotalStakeIndicesAtBlockNumber(&_ContractECDSAStakeRegistry.CallOpts, blockNumber, quorumNumbers) +} + +// GetTotalStakeIndicesAtBlockNumber is a free data retrieval call binding the contract method 0x81c07502. +// +// Solidity: function getTotalStakeIndicesAtBlockNumber(uint32 blockNumber, bytes quorumNumbers) view returns(uint32[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetTotalStakeIndicesAtBlockNumber(blockNumber uint32, quorumNumbers []byte) ([]uint32, error) { + return _ContractECDSAStakeRegistry.Contract.GetTotalStakeIndicesAtBlockNumber(&_ContractECDSAStakeRegistry.CallOpts, blockNumber, quorumNumbers) +} + +// GetTotalStakeUpdateAtIndex is a free data retrieval call binding the contract method 0xb6904b78. +// +// Solidity: function getTotalStakeUpdateAtIndex(uint8 quorumNumber, uint256 index) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) GetTotalStakeUpdateAtIndex(opts *bind.CallOpts, quorumNumber uint8, index *big.Int) (ECDSAStakeRegistryStakeUpdate, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "getTotalStakeUpdateAtIndex", quorumNumber, index) + + if err != nil { + return *new(ECDSAStakeRegistryStakeUpdate), err + } + + out0 := *abi.ConvertType(out[0], new(ECDSAStakeRegistryStakeUpdate)).(*ECDSAStakeRegistryStakeUpdate) + + return out0, err + +} + +// GetTotalStakeUpdateAtIndex is a free data retrieval call binding the contract method 0xb6904b78. +// +// Solidity: function getTotalStakeUpdateAtIndex(uint8 quorumNumber, uint256 index) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) GetTotalStakeUpdateAtIndex(quorumNumber uint8, index *big.Int) (ECDSAStakeRegistryStakeUpdate, error) { + return _ContractECDSAStakeRegistry.Contract.GetTotalStakeUpdateAtIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, index) +} + +// GetTotalStakeUpdateAtIndex is a free data retrieval call binding the contract method 0xb6904b78. +// +// Solidity: function getTotalStakeUpdateAtIndex(uint8 quorumNumber, uint256 index) view returns((uint32,uint32,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) GetTotalStakeUpdateAtIndex(quorumNumber uint8, index *big.Int) (ECDSAStakeRegistryStakeUpdate, error) { + return _ContractECDSAStakeRegistry.Contract.GetTotalStakeUpdateAtIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, index) +} + +// MinimumStakeForQuorum is a free data retrieval call binding the contract method 0xc46778a5. +// +// Solidity: function minimumStakeForQuorum(uint8 ) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) MinimumStakeForQuorum(opts *bind.CallOpts, arg0 uint8) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "minimumStakeForQuorum", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinimumStakeForQuorum is a free data retrieval call binding the contract method 0xc46778a5. +// +// Solidity: function minimumStakeForQuorum(uint8 ) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) MinimumStakeForQuorum(arg0 uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.MinimumStakeForQuorum(&_ContractECDSAStakeRegistry.CallOpts, arg0) +} + +// MinimumStakeForQuorum is a free data retrieval call binding the contract method 0xc46778a5. +// +// Solidity: function minimumStakeForQuorum(uint8 ) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) MinimumStakeForQuorum(arg0 uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.MinimumStakeForQuorum(&_ContractECDSAStakeRegistry.CallOpts, arg0) +} + +// RegistryCoordinator is a free data retrieval call binding the contract method 0x6d14a987. +// +// Solidity: function registryCoordinator() view returns(address) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) RegistryCoordinator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "registryCoordinator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// RegistryCoordinator is a free data retrieval call binding the contract method 0x6d14a987. +// +// Solidity: function registryCoordinator() view returns(address) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) RegistryCoordinator() (common.Address, error) { + return _ContractECDSAStakeRegistry.Contract.RegistryCoordinator(&_ContractECDSAStakeRegistry.CallOpts) +} + +// RegistryCoordinator is a free data retrieval call binding the contract method 0x6d14a987. +// +// Solidity: function registryCoordinator() view returns(address) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) RegistryCoordinator() (common.Address, error) { + return _ContractECDSAStakeRegistry.Contract.RegistryCoordinator(&_ContractECDSAStakeRegistry.CallOpts) +} + +// StrategyParams is a free data retrieval call binding the contract method 0x08732461. +// +// Solidity: function strategyParams(uint8 , uint256 ) view returns(address strategy, uint96 multiplier) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) StrategyParams(opts *bind.CallOpts, arg0 uint8, arg1 *big.Int) (struct { + Strategy common.Address + Multiplier *big.Int +}, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "strategyParams", arg0, arg1) + + outstruct := new(struct { + Strategy common.Address + Multiplier *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Strategy = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.Multiplier = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// StrategyParams is a free data retrieval call binding the contract method 0x08732461. +// +// Solidity: function strategyParams(uint8 , uint256 ) view returns(address strategy, uint96 multiplier) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) StrategyParams(arg0 uint8, arg1 *big.Int) (struct { + Strategy common.Address + Multiplier *big.Int +}, error) { + return _ContractECDSAStakeRegistry.Contract.StrategyParams(&_ContractECDSAStakeRegistry.CallOpts, arg0, arg1) +} + +// StrategyParams is a free data retrieval call binding the contract method 0x08732461. +// +// Solidity: function strategyParams(uint8 , uint256 ) view returns(address strategy, uint96 multiplier) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) StrategyParams(arg0 uint8, arg1 *big.Int) (struct { + Strategy common.Address + Multiplier *big.Int +}, error) { + return _ContractECDSAStakeRegistry.Contract.StrategyParams(&_ContractECDSAStakeRegistry.CallOpts, arg0, arg1) +} + +// StrategyParamsByIndex is a free data retrieval call binding the contract method 0xadc804da. +// +// Solidity: function strategyParamsByIndex(uint8 quorumNumber, uint256 index) view returns((address,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) StrategyParamsByIndex(opts *bind.CallOpts, quorumNumber uint8, index *big.Int) (ECDSAStakeRegistryStrategyParams, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "strategyParamsByIndex", quorumNumber, index) + + if err != nil { + return *new(ECDSAStakeRegistryStrategyParams), err + } + + out0 := *abi.ConvertType(out[0], new(ECDSAStakeRegistryStrategyParams)).(*ECDSAStakeRegistryStrategyParams) + + return out0, err + +} + +// StrategyParamsByIndex is a free data retrieval call binding the contract method 0xadc804da. +// +// Solidity: function strategyParamsByIndex(uint8 quorumNumber, uint256 index) view returns((address,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) StrategyParamsByIndex(quorumNumber uint8, index *big.Int) (ECDSAStakeRegistryStrategyParams, error) { + return _ContractECDSAStakeRegistry.Contract.StrategyParamsByIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, index) +} + +// StrategyParamsByIndex is a free data retrieval call binding the contract method 0xadc804da. +// +// Solidity: function strategyParamsByIndex(uint8 quorumNumber, uint256 index) view returns((address,uint96)) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) StrategyParamsByIndex(quorumNumber uint8, index *big.Int) (ECDSAStakeRegistryStrategyParams, error) { + return _ContractECDSAStakeRegistry.Contract.StrategyParamsByIndex(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, index) +} + +// StrategyParamsLength is a free data retrieval call binding the contract method 0x3ca5a5f5. +// +// Solidity: function strategyParamsLength(uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) StrategyParamsLength(opts *bind.CallOpts, quorumNumber uint8) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "strategyParamsLength", quorumNumber) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StrategyParamsLength is a free data retrieval call binding the contract method 0x3ca5a5f5. +// +// Solidity: function strategyParamsLength(uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) StrategyParamsLength(quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.StrategyParamsLength(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber) +} + +// StrategyParamsLength is a free data retrieval call binding the contract method 0x3ca5a5f5. +// +// Solidity: function strategyParamsLength(uint8 quorumNumber) view returns(uint256) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) StrategyParamsLength(quorumNumber uint8) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.StrategyParamsLength(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber) +} + +// WeightOfOperatorForQuorum is a free data retrieval call binding the contract method 0x1f9b74e0. +// +// Solidity: function weightOfOperatorForQuorum(uint8 quorumNumber, address operator) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCaller) WeightOfOperatorForQuorum(opts *bind.CallOpts, quorumNumber uint8, operator common.Address) (*big.Int, error) { + var out []interface{} + err := _ContractECDSAStakeRegistry.contract.Call(opts, &out, "weightOfOperatorForQuorum", quorumNumber, operator) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// WeightOfOperatorForQuorum is a free data retrieval call binding the contract method 0x1f9b74e0. +// +// Solidity: function weightOfOperatorForQuorum(uint8 quorumNumber, address operator) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) WeightOfOperatorForQuorum(quorumNumber uint8, operator common.Address) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.WeightOfOperatorForQuorum(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, operator) +} + +// WeightOfOperatorForQuorum is a free data retrieval call binding the contract method 0x1f9b74e0. +// +// Solidity: function weightOfOperatorForQuorum(uint8 quorumNumber, address operator) view returns(uint96) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryCallerSession) WeightOfOperatorForQuorum(quorumNumber uint8, operator common.Address) (*big.Int, error) { + return _ContractECDSAStakeRegistry.Contract.WeightOfOperatorForQuorum(&_ContractECDSAStakeRegistry.CallOpts, quorumNumber, operator) +} + +// AddStrategies is a paid mutator transaction binding the contract method 0xc601527d. +// +// Solidity: function addStrategies(uint8 quorumNumber, (address,uint96)[] _strategyParams) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactor) AddStrategies(opts *bind.TransactOpts, quorumNumber uint8, _strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.contract.Transact(opts, "addStrategies", quorumNumber, _strategyParams) +} + +// AddStrategies is a paid mutator transaction binding the contract method 0xc601527d. +// +// Solidity: function addStrategies(uint8 quorumNumber, (address,uint96)[] _strategyParams) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) AddStrategies(quorumNumber uint8, _strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.AddStrategies(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, _strategyParams) +} + +// AddStrategies is a paid mutator transaction binding the contract method 0xc601527d. +// +// Solidity: function addStrategies(uint8 quorumNumber, (address,uint96)[] _strategyParams) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorSession) AddStrategies(quorumNumber uint8, _strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.AddStrategies(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, _strategyParams) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xf4e24fe5. +// +// Solidity: function deregisterOperator(address operatorId, bytes quorumNumbers) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactor) DeregisterOperator(opts *bind.TransactOpts, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.contract.Transact(opts, "deregisterOperator", operatorId, quorumNumbers) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xf4e24fe5. +// +// Solidity: function deregisterOperator(address operatorId, bytes quorumNumbers) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) DeregisterOperator(operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.DeregisterOperator(&_ContractECDSAStakeRegistry.TransactOpts, operatorId, quorumNumbers) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xf4e24fe5. +// +// Solidity: function deregisterOperator(address operatorId, bytes quorumNumbers) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorSession) DeregisterOperator(operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.DeregisterOperator(&_ContractECDSAStakeRegistry.TransactOpts, operatorId, quorumNumbers) +} + +// InitializeQuorum is a paid mutator transaction binding the contract method 0xff694a77. +// +// Solidity: function initializeQuorum(uint8 quorumNumber, uint96 minimumStake, (address,uint96)[] _strategyParams) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactor) InitializeQuorum(opts *bind.TransactOpts, quorumNumber uint8, minimumStake *big.Int, _strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.contract.Transact(opts, "initializeQuorum", quorumNumber, minimumStake, _strategyParams) +} + +// InitializeQuorum is a paid mutator transaction binding the contract method 0xff694a77. +// +// Solidity: function initializeQuorum(uint8 quorumNumber, uint96 minimumStake, (address,uint96)[] _strategyParams) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) InitializeQuorum(quorumNumber uint8, minimumStake *big.Int, _strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.InitializeQuorum(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, minimumStake, _strategyParams) +} + +// InitializeQuorum is a paid mutator transaction binding the contract method 0xff694a77. +// +// Solidity: function initializeQuorum(uint8 quorumNumber, uint96 minimumStake, (address,uint96)[] _strategyParams) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorSession) InitializeQuorum(quorumNumber uint8, minimumStake *big.Int, _strategyParams []ECDSAStakeRegistryStrategyParams) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.InitializeQuorum(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, minimumStake, _strategyParams) +} + +// ModifyStrategyParams is a paid mutator transaction binding the contract method 0x20b66298. +// +// Solidity: function modifyStrategyParams(uint8 quorumNumber, uint256[] strategyIndices, uint96[] newMultipliers) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactor) ModifyStrategyParams(opts *bind.TransactOpts, quorumNumber uint8, strategyIndices []*big.Int, newMultipliers []*big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.contract.Transact(opts, "modifyStrategyParams", quorumNumber, strategyIndices, newMultipliers) +} + +// ModifyStrategyParams is a paid mutator transaction binding the contract method 0x20b66298. +// +// Solidity: function modifyStrategyParams(uint8 quorumNumber, uint256[] strategyIndices, uint96[] newMultipliers) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) ModifyStrategyParams(quorumNumber uint8, strategyIndices []*big.Int, newMultipliers []*big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.ModifyStrategyParams(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, strategyIndices, newMultipliers) +} + +// ModifyStrategyParams is a paid mutator transaction binding the contract method 0x20b66298. +// +// Solidity: function modifyStrategyParams(uint8 quorumNumber, uint256[] strategyIndices, uint96[] newMultipliers) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorSession) ModifyStrategyParams(quorumNumber uint8, strategyIndices []*big.Int, newMultipliers []*big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.ModifyStrategyParams(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, strategyIndices, newMultipliers) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0xf0391e5a. +// +// Solidity: function registerOperator(address operator, address operatorId, bytes quorumNumbers) returns(uint96[], uint96[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactor) RegisterOperator(opts *bind.TransactOpts, operator common.Address, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.contract.Transact(opts, "registerOperator", operator, operatorId, quorumNumbers) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0xf0391e5a. +// +// Solidity: function registerOperator(address operator, address operatorId, bytes quorumNumbers) returns(uint96[], uint96[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) RegisterOperator(operator common.Address, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.RegisterOperator(&_ContractECDSAStakeRegistry.TransactOpts, operator, operatorId, quorumNumbers) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0xf0391e5a. +// +// Solidity: function registerOperator(address operator, address operatorId, bytes quorumNumbers) returns(uint96[], uint96[]) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorSession) RegisterOperator(operator common.Address, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.RegisterOperator(&_ContractECDSAStakeRegistry.TransactOpts, operator, operatorId, quorumNumbers) +} + +// RemoveStrategies is a paid mutator transaction binding the contract method 0x5f1f2d77. +// +// Solidity: function removeStrategies(uint8 quorumNumber, uint256[] indicesToRemove) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactor) RemoveStrategies(opts *bind.TransactOpts, quorumNumber uint8, indicesToRemove []*big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.contract.Transact(opts, "removeStrategies", quorumNumber, indicesToRemove) +} + +// RemoveStrategies is a paid mutator transaction binding the contract method 0x5f1f2d77. +// +// Solidity: function removeStrategies(uint8 quorumNumber, uint256[] indicesToRemove) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) RemoveStrategies(quorumNumber uint8, indicesToRemove []*big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.RemoveStrategies(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, indicesToRemove) +} + +// RemoveStrategies is a paid mutator transaction binding the contract method 0x5f1f2d77. +// +// Solidity: function removeStrategies(uint8 quorumNumber, uint256[] indicesToRemove) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorSession) RemoveStrategies(quorumNumber uint8, indicesToRemove []*big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.RemoveStrategies(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, indicesToRemove) +} + +// SetMinimumStakeForQuorum is a paid mutator transaction binding the contract method 0xbc9a40c3. +// +// Solidity: function setMinimumStakeForQuorum(uint8 quorumNumber, uint96 minimumStake) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactor) SetMinimumStakeForQuorum(opts *bind.TransactOpts, quorumNumber uint8, minimumStake *big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.contract.Transact(opts, "setMinimumStakeForQuorum", quorumNumber, minimumStake) +} + +// SetMinimumStakeForQuorum is a paid mutator transaction binding the contract method 0xbc9a40c3. +// +// Solidity: function setMinimumStakeForQuorum(uint8 quorumNumber, uint96 minimumStake) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) SetMinimumStakeForQuorum(quorumNumber uint8, minimumStake *big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.SetMinimumStakeForQuorum(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, minimumStake) +} + +// SetMinimumStakeForQuorum is a paid mutator transaction binding the contract method 0xbc9a40c3. +// +// Solidity: function setMinimumStakeForQuorum(uint8 quorumNumber, uint96 minimumStake) returns() +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorSession) SetMinimumStakeForQuorum(quorumNumber uint8, minimumStake *big.Int) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.SetMinimumStakeForQuorum(&_ContractECDSAStakeRegistry.TransactOpts, quorumNumber, minimumStake) +} + +// UpdateOperatorStake is a paid mutator transaction binding the contract method 0x837bb82e. +// +// Solidity: function updateOperatorStake(address operator, address operatorId, bytes quorumNumbers) returns(uint192) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactor) UpdateOperatorStake(opts *bind.TransactOpts, operator common.Address, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.contract.Transact(opts, "updateOperatorStake", operator, operatorId, quorumNumbers) +} + +// UpdateOperatorStake is a paid mutator transaction binding the contract method 0x837bb82e. +// +// Solidity: function updateOperatorStake(address operator, address operatorId, bytes quorumNumbers) returns(uint192) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistrySession) UpdateOperatorStake(operator common.Address, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.UpdateOperatorStake(&_ContractECDSAStakeRegistry.TransactOpts, operator, operatorId, quorumNumbers) +} + +// UpdateOperatorStake is a paid mutator transaction binding the contract method 0x837bb82e. +// +// Solidity: function updateOperatorStake(address operator, address operatorId, bytes quorumNumbers) returns(uint192) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryTransactorSession) UpdateOperatorStake(operator common.Address, operatorId common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _ContractECDSAStakeRegistry.Contract.UpdateOperatorStake(&_ContractECDSAStakeRegistry.TransactOpts, operator, operatorId, quorumNumbers) +} + +// ContractECDSAStakeRegistryMinimumStakeForQuorumUpdatedIterator is returned from FilterMinimumStakeForQuorumUpdated and is used to iterate over the raw logs and unpacked data for MinimumStakeForQuorumUpdated events raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryMinimumStakeForQuorumUpdatedIterator struct { + Event *ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSAStakeRegistryMinimumStakeForQuorumUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSAStakeRegistryMinimumStakeForQuorumUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSAStakeRegistryMinimumStakeForQuorumUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated represents a MinimumStakeForQuorumUpdated event raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated struct { + QuorumNumber uint8 + MinimumStake *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinimumStakeForQuorumUpdated is a free log retrieval operation binding the contract event 0x26eecff2b70b0a71104ff4d940ba7162d23a95c248771fc487a7be17a596b3cf. +// +// Solidity: event MinimumStakeForQuorumUpdated(uint8 indexed quorumNumber, uint96 minimumStake) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) FilterMinimumStakeForQuorumUpdated(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryMinimumStakeForQuorumUpdatedIterator, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.FilterLogs(opts, "MinimumStakeForQuorumUpdated", quorumNumberRule) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryMinimumStakeForQuorumUpdatedIterator{contract: _ContractECDSAStakeRegistry.contract, event: "MinimumStakeForQuorumUpdated", logs: logs, sub: sub}, nil +} + +// WatchMinimumStakeForQuorumUpdated is a free log subscription operation binding the contract event 0x26eecff2b70b0a71104ff4d940ba7162d23a95c248771fc487a7be17a596b3cf. +// +// Solidity: event MinimumStakeForQuorumUpdated(uint8 indexed quorumNumber, uint96 minimumStake) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) WatchMinimumStakeForQuorumUpdated(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated, quorumNumber []uint8) (event.Subscription, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.WatchLogs(opts, "MinimumStakeForQuorumUpdated", quorumNumberRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "MinimumStakeForQuorumUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMinimumStakeForQuorumUpdated is a log parse operation binding the contract event 0x26eecff2b70b0a71104ff4d940ba7162d23a95c248771fc487a7be17a596b3cf. +// +// Solidity: event MinimumStakeForQuorumUpdated(uint8 indexed quorumNumber, uint96 minimumStake) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) ParseMinimumStakeForQuorumUpdated(log types.Log) (*ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated, error) { + event := new(ContractECDSAStakeRegistryMinimumStakeForQuorumUpdated) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "MinimumStakeForQuorumUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSAStakeRegistryOperatorStakeUpdateIterator is returned from FilterOperatorStakeUpdate and is used to iterate over the raw logs and unpacked data for OperatorStakeUpdate events raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryOperatorStakeUpdateIterator struct { + Event *ContractECDSAStakeRegistryOperatorStakeUpdate // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSAStakeRegistryOperatorStakeUpdateIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryOperatorStakeUpdate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryOperatorStakeUpdate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSAStakeRegistryOperatorStakeUpdateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSAStakeRegistryOperatorStakeUpdateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSAStakeRegistryOperatorStakeUpdate represents a OperatorStakeUpdate event raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryOperatorStakeUpdate struct { + OperatorId common.Address + QuorumNumber uint8 + Stake *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorStakeUpdate is a free log retrieval operation binding the contract event 0x2a539b406fea8ccdda7269c7a03c71f11636b75ff181f9ce2b19734fdf48f072. +// +// Solidity: event OperatorStakeUpdate(address indexed operatorId, uint8 quorumNumber, uint96 stake) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) FilterOperatorStakeUpdate(opts *bind.FilterOpts, operatorId []common.Address) (*ContractECDSAStakeRegistryOperatorStakeUpdateIterator, error) { + + var operatorIdRule []interface{} + for _, operatorIdItem := range operatorId { + operatorIdRule = append(operatorIdRule, operatorIdItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.FilterLogs(opts, "OperatorStakeUpdate", operatorIdRule) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryOperatorStakeUpdateIterator{contract: _ContractECDSAStakeRegistry.contract, event: "OperatorStakeUpdate", logs: logs, sub: sub}, nil +} + +// WatchOperatorStakeUpdate is a free log subscription operation binding the contract event 0x2a539b406fea8ccdda7269c7a03c71f11636b75ff181f9ce2b19734fdf48f072. +// +// Solidity: event OperatorStakeUpdate(address indexed operatorId, uint8 quorumNumber, uint96 stake) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) WatchOperatorStakeUpdate(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryOperatorStakeUpdate, operatorId []common.Address) (event.Subscription, error) { + + var operatorIdRule []interface{} + for _, operatorIdItem := range operatorId { + operatorIdRule = append(operatorIdRule, operatorIdItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.WatchLogs(opts, "OperatorStakeUpdate", operatorIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSAStakeRegistryOperatorStakeUpdate) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "OperatorStakeUpdate", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOperatorStakeUpdate is a log parse operation binding the contract event 0x2a539b406fea8ccdda7269c7a03c71f11636b75ff181f9ce2b19734fdf48f072. +// +// Solidity: event OperatorStakeUpdate(address indexed operatorId, uint8 quorumNumber, uint96 stake) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) ParseOperatorStakeUpdate(log types.Log) (*ContractECDSAStakeRegistryOperatorStakeUpdate, error) { + event := new(ContractECDSAStakeRegistryOperatorStakeUpdate) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "OperatorStakeUpdate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSAStakeRegistryQuorumCreatedIterator is returned from FilterQuorumCreated and is used to iterate over the raw logs and unpacked data for QuorumCreated events raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryQuorumCreatedIterator struct { + Event *ContractECDSAStakeRegistryQuorumCreated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSAStakeRegistryQuorumCreatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryQuorumCreated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryQuorumCreated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSAStakeRegistryQuorumCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSAStakeRegistryQuorumCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSAStakeRegistryQuorumCreated represents a QuorumCreated event raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryQuorumCreated struct { + QuorumNumber uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterQuorumCreated is a free log retrieval operation binding the contract event 0x831a9c86c45bb303caf3f064be2bc2b9fd4ecf19e47c4ac02a61e75dabfe55b4. +// +// Solidity: event QuorumCreated(uint8 indexed quorumNumber) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) FilterQuorumCreated(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryQuorumCreatedIterator, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.FilterLogs(opts, "QuorumCreated", quorumNumberRule) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryQuorumCreatedIterator{contract: _ContractECDSAStakeRegistry.contract, event: "QuorumCreated", logs: logs, sub: sub}, nil +} + +// WatchQuorumCreated is a free log subscription operation binding the contract event 0x831a9c86c45bb303caf3f064be2bc2b9fd4ecf19e47c4ac02a61e75dabfe55b4. +// +// Solidity: event QuorumCreated(uint8 indexed quorumNumber) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) WatchQuorumCreated(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryQuorumCreated, quorumNumber []uint8) (event.Subscription, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.WatchLogs(opts, "QuorumCreated", quorumNumberRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSAStakeRegistryQuorumCreated) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "QuorumCreated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseQuorumCreated is a log parse operation binding the contract event 0x831a9c86c45bb303caf3f064be2bc2b9fd4ecf19e47c4ac02a61e75dabfe55b4. +// +// Solidity: event QuorumCreated(uint8 indexed quorumNumber) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) ParseQuorumCreated(log types.Log) (*ContractECDSAStakeRegistryQuorumCreated, error) { + event := new(ContractECDSAStakeRegistryQuorumCreated) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "QuorumCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSAStakeRegistryStrategyAddedToQuorumIterator is returned from FilterStrategyAddedToQuorum and is used to iterate over the raw logs and unpacked data for StrategyAddedToQuorum events raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryStrategyAddedToQuorumIterator struct { + Event *ContractECDSAStakeRegistryStrategyAddedToQuorum // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSAStakeRegistryStrategyAddedToQuorumIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryStrategyAddedToQuorum) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryStrategyAddedToQuorum) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSAStakeRegistryStrategyAddedToQuorumIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSAStakeRegistryStrategyAddedToQuorumIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSAStakeRegistryStrategyAddedToQuorum represents a StrategyAddedToQuorum event raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryStrategyAddedToQuorum struct { + QuorumNumber uint8 + Strategy common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStrategyAddedToQuorum is a free log retrieval operation binding the contract event 0x10565e56cacbf32eca267945f054fec02e59750032d113d3302182ad967f5404. +// +// Solidity: event StrategyAddedToQuorum(uint8 indexed quorumNumber, address strategy) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) FilterStrategyAddedToQuorum(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryStrategyAddedToQuorumIterator, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.FilterLogs(opts, "StrategyAddedToQuorum", quorumNumberRule) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryStrategyAddedToQuorumIterator{contract: _ContractECDSAStakeRegistry.contract, event: "StrategyAddedToQuorum", logs: logs, sub: sub}, nil +} + +// WatchStrategyAddedToQuorum is a free log subscription operation binding the contract event 0x10565e56cacbf32eca267945f054fec02e59750032d113d3302182ad967f5404. +// +// Solidity: event StrategyAddedToQuorum(uint8 indexed quorumNumber, address strategy) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) WatchStrategyAddedToQuorum(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryStrategyAddedToQuorum, quorumNumber []uint8) (event.Subscription, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.WatchLogs(opts, "StrategyAddedToQuorum", quorumNumberRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSAStakeRegistryStrategyAddedToQuorum) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "StrategyAddedToQuorum", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseStrategyAddedToQuorum is a log parse operation binding the contract event 0x10565e56cacbf32eca267945f054fec02e59750032d113d3302182ad967f5404. +// +// Solidity: event StrategyAddedToQuorum(uint8 indexed quorumNumber, address strategy) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) ParseStrategyAddedToQuorum(log types.Log) (*ContractECDSAStakeRegistryStrategyAddedToQuorum, error) { + event := new(ContractECDSAStakeRegistryStrategyAddedToQuorum) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "StrategyAddedToQuorum", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSAStakeRegistryStrategyMultiplierUpdatedIterator is returned from FilterStrategyMultiplierUpdated and is used to iterate over the raw logs and unpacked data for StrategyMultiplierUpdated events raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryStrategyMultiplierUpdatedIterator struct { + Event *ContractECDSAStakeRegistryStrategyMultiplierUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSAStakeRegistryStrategyMultiplierUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryStrategyMultiplierUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryStrategyMultiplierUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSAStakeRegistryStrategyMultiplierUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSAStakeRegistryStrategyMultiplierUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSAStakeRegistryStrategyMultiplierUpdated represents a StrategyMultiplierUpdated event raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryStrategyMultiplierUpdated struct { + QuorumNumber uint8 + Strategy common.Address + Multiplier *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStrategyMultiplierUpdated is a free log retrieval operation binding the contract event 0x11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a75. +// +// Solidity: event StrategyMultiplierUpdated(uint8 indexed quorumNumber, address strategy, uint256 multiplier) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) FilterStrategyMultiplierUpdated(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryStrategyMultiplierUpdatedIterator, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.FilterLogs(opts, "StrategyMultiplierUpdated", quorumNumberRule) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryStrategyMultiplierUpdatedIterator{contract: _ContractECDSAStakeRegistry.contract, event: "StrategyMultiplierUpdated", logs: logs, sub: sub}, nil +} + +// WatchStrategyMultiplierUpdated is a free log subscription operation binding the contract event 0x11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a75. +// +// Solidity: event StrategyMultiplierUpdated(uint8 indexed quorumNumber, address strategy, uint256 multiplier) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) WatchStrategyMultiplierUpdated(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryStrategyMultiplierUpdated, quorumNumber []uint8) (event.Subscription, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.WatchLogs(opts, "StrategyMultiplierUpdated", quorumNumberRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSAStakeRegistryStrategyMultiplierUpdated) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "StrategyMultiplierUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseStrategyMultiplierUpdated is a log parse operation binding the contract event 0x11a5641322da1dff56a4b66eaac31ffa465295ece907cd163437793b4d009a75. +// +// Solidity: event StrategyMultiplierUpdated(uint8 indexed quorumNumber, address strategy, uint256 multiplier) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) ParseStrategyMultiplierUpdated(log types.Log) (*ContractECDSAStakeRegistryStrategyMultiplierUpdated, error) { + event := new(ContractECDSAStakeRegistryStrategyMultiplierUpdated) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "StrategyMultiplierUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ContractECDSAStakeRegistryStrategyRemovedFromQuorumIterator is returned from FilterStrategyRemovedFromQuorum and is used to iterate over the raw logs and unpacked data for StrategyRemovedFromQuorum events raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryStrategyRemovedFromQuorumIterator struct { + Event *ContractECDSAStakeRegistryStrategyRemovedFromQuorum // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ContractECDSAStakeRegistryStrategyRemovedFromQuorumIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryStrategyRemovedFromQuorum) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ContractECDSAStakeRegistryStrategyRemovedFromQuorum) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ContractECDSAStakeRegistryStrategyRemovedFromQuorumIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ContractECDSAStakeRegistryStrategyRemovedFromQuorumIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ContractECDSAStakeRegistryStrategyRemovedFromQuorum represents a StrategyRemovedFromQuorum event raised by the ContractECDSAStakeRegistry contract. +type ContractECDSAStakeRegistryStrategyRemovedFromQuorum struct { + QuorumNumber uint8 + Strategy common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStrategyRemovedFromQuorum is a free log retrieval operation binding the contract event 0x31fa2e2cd280c9375e13ffcf3d81e2378100186e4058f8d3ddb690b82dcd31f7. +// +// Solidity: event StrategyRemovedFromQuorum(uint8 indexed quorumNumber, address strategy) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) FilterStrategyRemovedFromQuorum(opts *bind.FilterOpts, quorumNumber []uint8) (*ContractECDSAStakeRegistryStrategyRemovedFromQuorumIterator, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.FilterLogs(opts, "StrategyRemovedFromQuorum", quorumNumberRule) + if err != nil { + return nil, err + } + return &ContractECDSAStakeRegistryStrategyRemovedFromQuorumIterator{contract: _ContractECDSAStakeRegistry.contract, event: "StrategyRemovedFromQuorum", logs: logs, sub: sub}, nil +} + +// WatchStrategyRemovedFromQuorum is a free log subscription operation binding the contract event 0x31fa2e2cd280c9375e13ffcf3d81e2378100186e4058f8d3ddb690b82dcd31f7. +// +// Solidity: event StrategyRemovedFromQuorum(uint8 indexed quorumNumber, address strategy) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) WatchStrategyRemovedFromQuorum(opts *bind.WatchOpts, sink chan<- *ContractECDSAStakeRegistryStrategyRemovedFromQuorum, quorumNumber []uint8) (event.Subscription, error) { + + var quorumNumberRule []interface{} + for _, quorumNumberItem := range quorumNumber { + quorumNumberRule = append(quorumNumberRule, quorumNumberItem) + } + + logs, sub, err := _ContractECDSAStakeRegistry.contract.WatchLogs(opts, "StrategyRemovedFromQuorum", quorumNumberRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ContractECDSAStakeRegistryStrategyRemovedFromQuorum) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "StrategyRemovedFromQuorum", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseStrategyRemovedFromQuorum is a log parse operation binding the contract event 0x31fa2e2cd280c9375e13ffcf3d81e2378100186e4058f8d3ddb690b82dcd31f7. +// +// Solidity: event StrategyRemovedFromQuorum(uint8 indexed quorumNumber, address strategy) +func (_ContractECDSAStakeRegistry *ContractECDSAStakeRegistryFilterer) ParseStrategyRemovedFromQuorum(log types.Log) (*ContractECDSAStakeRegistryStrategyRemovedFromQuorum, error) { + event := new(ContractECDSAStakeRegistryStrategyRemovedFromQuorum) + if err := _ContractECDSAStakeRegistry.contract.UnpackLog(event, "StrategyRemovedFromQuorum", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/generate-bindings.sh b/contracts/generate-bindings.sh index edd46c151..bc054b84e 100755 --- a/contracts/generate-bindings.sh +++ b/contracts/generate-bindings.sh @@ -7,7 +7,7 @@ script_path=$( ) # build abigen-with-interfaces docker image if it doesn't exist -if [[ "$(docker images -q abigen-with-interfaces 2> /dev/null)" == "" ]]; then +if [[ "$(docker images -q abigen-with-interfaces 2>/dev/null)" == "" ]]; then docker build -t abigen-with-interfaces -f abigen-with-interfaces.Dockerfile $script_path fi @@ -41,7 +41,7 @@ avs_bls_contracts="RegistryCoordinator OperatorStateRetriever StakeRegistry BLSA for contract in $avs_bls_contracts; do create_binding . $contract ../../bindings done -avs_ecdsa_contracts="ECDSASignatureChecker ECDSAOperatorStateRetriever" +avs_ecdsa_contracts="ECDSASignatureChecker ECDSAOperatorStateRetriever ECDSAStakeRegistry ECDSARegistryCoordinator" for contract in $avs_ecdsa_contracts; do create_binding . $contract ../../bindings done diff --git a/crypto/ecdsa/ecdsa.go b/crypto/ecdsa/ecdsa.go index a5d6b29ac..227f1ed57 100644 --- a/crypto/ecdsa/ecdsa.go +++ b/crypto/ecdsa/ecdsa.go @@ -7,6 +7,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" ) +type PrivateKey = ecdsa.PrivateKey +type Signature = []byte + // SignMsg is a wrapper around geth's crypto.Sign function which adds 27 to the v value // see https://github.com/ethereum/go-ethereum/issues/28757#issuecomment-1874525854 // and https://twitter.com/pcaversaccio/status/1671488928262529031 @@ -14,7 +17,7 @@ import ( // VerifySignature below thus subtracts 27 from the v value before verifying the signature. // TODO(samlaf): if and when we figure out some avs contracts use the 0/1 v scheme, or the eip-155 scheme, // then we should generalize this function to sign based on a scheme passed as argument. -func SignMsg(msg []byte, privateKey *ecdsa.PrivateKey) ([]byte, error) { +func SignMsg(msg []byte, privateKey *PrivateKey) (Signature, error) { sig, err := crypto.Sign(msg, privateKey) if err != nil { return nil, err @@ -27,9 +30,12 @@ func SignMsg(msg []byte, privateKey *ecdsa.PrivateKey) ([]byte, error) { // VerifySignature is a wrapper around geth's crypto.SigToPub function which subtracts 27 from the v value // before verifying the signature. See the SignMsg function above for more details. -func VerifySignature(msgHash []byte, sig []byte, operatorId types.EcdsaOperatorId) (bool, error) { - sig[64] -= 27 - recoveredPubKey, err := crypto.SigToPub(msgHash, sig) +func VerifySignature(msgHash []byte, sig Signature, operatorId types.EcdsaOperatorId) (bool, error) { + // make a copy so as not to modify the underlying signature array + sigCopy := make([]byte, len(sig)) + copy(sigCopy, sig) + sigCopy[64] -= 27 + recoveredPubKey, err := crypto.SigToPub(msgHash, sigCopy) if err != nil { return true, err } diff --git a/crypto/ecdsa/utils.go b/crypto/ecdsa/utils.go index c769d6285..2e78fd3c8 100644 --- a/crypto/ecdsa/utils.go +++ b/crypto/ecdsa/utils.go @@ -8,6 +8,7 @@ import ( "os" "path/filepath" + "github.com/Layr-Labs/eigensdk-go/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/accounts/keystore" @@ -15,6 +16,21 @@ import ( "github.com/google/uuid" ) +// GeneratePrivateKey generates a new ecdsa private key +// it just wraps geth's crypto.GenerateKey so that users +// of the sdk have everything they need in the same package +func GeneratePrivateKey() (*ecdsa.PrivateKey, error) { + return crypto.GenerateKey() +} + +func NewPrivateKeyFromHex(hexKey string) (*ecdsa.PrivateKey, error) { + return crypto.HexToECDSA(hexKey) +} + +func PrivateKeyToOperatorId(privateKey *ecdsa.PrivateKey) types.EcdsaOperatorId { + return crypto.PubkeyToAddress(privateKey.PublicKey) +} + func WriteKeyFromHex(path, privateKeyHex, password string) error { privateKey, err := crypto.HexToECDSA(privateKeyHex) if err != nil { diff --git a/services/bls/gen.go b/services/bls/gen.go index 6f6d6535d..e5afe3442 100644 --- a/services/bls/gen.go +++ b/services/bls/gen.go @@ -10,4 +10,4 @@ package services // TODO: are there better ways to organize these dependencies? Maybe by using ben johnson // and having the avs registry interface be in the /avsregistry dir but the avsregistry_chaincaller // and its test in a subdir? -//go:generate mockgen -destination=./mocks/blsagg/blsaggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/aggregation BlsAggregationService +//go:generate mockgen -destination=./mocks/blsagg/aggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/aggregation BlsAggregationService diff --git a/services/bls/mocks/blsagg/blsaggregation.go b/services/bls/mocks/blsagg/aggregation.go similarity index 95% rename from services/bls/mocks/blsagg/blsaggregation.go rename to services/bls/mocks/blsagg/aggregation.go index e2a62e597..a6011bc10 100644 --- a/services/bls/mocks/blsagg/blsaggregation.go +++ b/services/bls/mocks/blsagg/aggregation.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -destination=./mocks/blsagg/blsaggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/aggregation BlsAggregationService +// mockgen -destination=./mocks/blsagg/aggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/bls/aggregation BlsAggregationService // // Package mocks is a generated GoMock package. package mocks diff --git a/services/ecdsa/aggregation/agg.go b/services/ecdsa/aggregation/agg.go index 559e2a991..483cf5e99 100644 --- a/services/ecdsa/aggregation/agg.go +++ b/services/ecdsa/aggregation/agg.go @@ -206,6 +206,7 @@ func (a *EcdsaAggregatorService) singleTaskAggregatorGoroutineFunc( quorumThresholdPercentagesMap[quorumNumber] = quorumThresholdPercentages[i] } operatorsAvsStateDict, err := a.avsRegistryService.GetOperatorsAvsStateAtBlock(context.Background(), quorumNumbers, taskCreatedBlock) + a.logger.Debug("Aggregator received operators state from avs registry", "operatorsAvsStateDict", operatorsAvsStateDict) if err != nil { // TODO: how should we handle such an error? a.logger.Fatal("Aggregator failed to get operators state from avs registry", "err", err) @@ -231,7 +232,12 @@ func (a *EcdsaAggregatorService) singleTaskAggregatorGoroutineFunc( "taskIndex", taskIndex, "TaskResponseDigest", signedTaskResponseDigest.TaskResponseDigest, "OperatorId", signedTaskResponseDigest.OperatorId, "ecdsaSignature", signedTaskResponseDigest.EcdsaSignature, ) - signedTaskResponseDigest.SignatureVerificationErrorC <- a.verifySignature(taskIndex, signedTaskResponseDigest, operatorsAvsStateDict) + err := a.verifySignature(taskIndex, signedTaskResponseDigest, operatorsAvsStateDict) + signedTaskResponseDigest.SignatureVerificationErrorC <- err + if err != nil { + // if the signature is invalid, we skip this message + continue + } // after verifying signature we aggregate its sig and pubkey, and update the signed stake amount digestAggregatedOperators, ok := aggregatedOperatorsDict[signedTaskResponseDigest.TaskResponseDigest] if !ok { diff --git a/services/ecdsa/aggregation/agg_test.go b/services/ecdsa/aggregation/agg_test.go index a580987ec..b3299a134 100644 --- a/services/ecdsa/aggregation/agg_test.go +++ b/services/ecdsa/aggregation/agg_test.go @@ -418,11 +418,11 @@ func TestEcdsaAgg(t *testing.T) { } func newEcdsaPrivKeyPanics(hexKey string) *ecdsa.PrivateKey { - keypair, err := crypto.GenerateKey() + privateKey, err := sdkecdsa.GeneratePrivateKey() if err != nil { panic(err) } - return keypair + return privateKey } func newTestOperator(ecdsaPrivKey *ecdsa.PrivateKey, stakePerQuorum map[types.QuorumNum]types.StakeAmount) types.TestEcdsaOperator { diff --git a/services/ecdsa/gen.go b/services/ecdsa/gen.go index dfaa0ed3c..03be6d3bd 100644 --- a/services/ecdsa/gen.go +++ b/services/ecdsa/gen.go @@ -1,3 +1,4 @@ package services //go:generate mockgen -destination=./mocks/avsregistry.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/ecdsa/avsregistry AvsRegistryService +//go:generate mockgen -destination=./mocks/aggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/ecdsa/aggregation EcdsaAggregationService diff --git a/services/ecdsa/mocks/aggregation.go b/services/ecdsa/mocks/aggregation.go new file mode 100644 index 000000000..6c73807ba --- /dev/null +++ b/services/ecdsa/mocks/aggregation.go @@ -0,0 +1,85 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/Layr-Labs/eigensdk-go/services/ecdsa/aggregation (interfaces: EcdsaAggregationService) +// +// Generated by this command: +// +// mockgen -destination=./mocks/aggregation.go -package=mocks github.com/Layr-Labs/eigensdk-go/services/ecdsa/aggregation EcdsaAggregationService +// +// Package mocks is a generated GoMock package. +package mocks + +import ( + context "context" + reflect "reflect" + time "time" + + aggregation "github.com/Layr-Labs/eigensdk-go/services/ecdsa/aggregation" + types "github.com/Layr-Labs/eigensdk-go/types" + common "github.com/ethereum/go-ethereum/common" + gomock "go.uber.org/mock/gomock" +) + +// MockEcdsaAggregationService is a mock of EcdsaAggregationService interface. +type MockEcdsaAggregationService struct { + ctrl *gomock.Controller + recorder *MockEcdsaAggregationServiceMockRecorder +} + +// MockEcdsaAggregationServiceMockRecorder is the mock recorder for MockEcdsaAggregationService. +type MockEcdsaAggregationServiceMockRecorder struct { + mock *MockEcdsaAggregationService +} + +// NewMockEcdsaAggregationService creates a new mock instance. +func NewMockEcdsaAggregationService(ctrl *gomock.Controller) *MockEcdsaAggregationService { + mock := &MockEcdsaAggregationService{ctrl: ctrl} + mock.recorder = &MockEcdsaAggregationServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockEcdsaAggregationService) EXPECT() *MockEcdsaAggregationServiceMockRecorder { + return m.recorder +} + +// GetResponseChannel mocks base method. +func (m *MockEcdsaAggregationService) GetResponseChannel() <-chan aggregation.EcdsaAggregationServiceResponse { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetResponseChannel") + ret0, _ := ret[0].(<-chan aggregation.EcdsaAggregationServiceResponse) + return ret0 +} + +// GetResponseChannel indicates an expected call of GetResponseChannel. +func (mr *MockEcdsaAggregationServiceMockRecorder) GetResponseChannel() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResponseChannel", reflect.TypeOf((*MockEcdsaAggregationService)(nil).GetResponseChannel)) +} + +// InitializeNewTask mocks base method. +func (m *MockEcdsaAggregationService) InitializeNewTask(arg0, arg1 uint32, arg2 []byte, arg3 []uint32, arg4 time.Duration) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InitializeNewTask", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(error) + return ret0 +} + +// InitializeNewTask indicates an expected call of InitializeNewTask. +func (mr *MockEcdsaAggregationServiceMockRecorder) InitializeNewTask(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitializeNewTask", reflect.TypeOf((*MockEcdsaAggregationService)(nil).InitializeNewTask), arg0, arg1, arg2, arg3, arg4) +} + +// ProcessNewSignature mocks base method. +func (m *MockEcdsaAggregationService) ProcessNewSignature(arg0 context.Context, arg1 uint32, arg2 types.TaskResponseDigest, arg3 []byte, arg4 common.Address) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ProcessNewSignature", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(error) + return ret0 +} + +// ProcessNewSignature indicates an expected call of ProcessNewSignature. +func (mr *MockEcdsaAggregationServiceMockRecorder) ProcessNewSignature(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessNewSignature", reflect.TypeOf((*MockEcdsaAggregationService)(nil).ProcessNewSignature), arg0, arg1, arg2, arg3, arg4) +}