diff --git a/.github/workflows/operator_cli_build.yml b/.github/workflows/operator_cli_build.yml index 1b09a38..ba6f1c1 100644 --- a/.github/workflows/operator_cli_build.yml +++ b/.github/workflows/operator_cli_build.yml @@ -1,3 +1,5 @@ +permissions: + contents: read name: Operator CLI Build on: push: diff --git a/Makefile b/Makefile index 7c07300..12b3619 100644 --- a/Makefile +++ b/Makefile @@ -95,12 +95,12 @@ build: build-oprcli ## Build the oprcli binary .PHONY: build-oprcli build-oprcli: check-go ## Build oprcli binary $(info $(M) Building oprcli binary...) - $Q $(GO) build -o $(BASE_DIR)/bin/oprcli $(SRC_DIR)/main.go + $Q $(GO) build -o $(BASE_DIR)/bin/oprcli $(SRC_DIR)/cmd/main.go .PHONY: build-oprcli-% build-oprcli-%: check-go ## Build oprcli binary for a specific platform $(info $(M) Building oprcli binary for $*...) - $Q GOOS=linux GOARCH=$* $(GO) build -o $(BASE_DIR)/bin/oprcli-$* $(SRC_DIR)/main.go + $Q GOOS=linux GOARCH=$* $(GO) build -o $(BASE_DIR)/bin/oprcli-$* $(SRC_DIR)/cmd/main.go # --- Docker --- .PHONY: docker-build diff --git a/build/.goreleaser-operatorcli.yml b/build/.goreleaser-operatorcli.yml index a867ebf..0d705e6 100644 --- a/build/.goreleaser-operatorcli.yml +++ b/build/.goreleaser-operatorcli.yml @@ -8,7 +8,7 @@ builds: # Path to the main.go file or the directory containing the main package. # You can specify multiple paths if your project consists of multiple binaries. - main: ./main.go + main: ./cmd/main.go # Target platforms goos: @@ -37,10 +37,10 @@ dockers: - "build" - "cmd" - "contracts" + - "internal" - "go.mod" - "go.sum" - "Makefile" - - "main.go" goos: linux goarch: amd64 build_flag_templates: @@ -59,10 +59,10 @@ dockers: - "build" - "cmd" - "contracts" + - "internal" - "go.mod" - "go.sum" - "Makefile" - - "main.go" goos: linux goarch: arm64 build_flag_templates: diff --git a/cmd/VERSION b/cmd/VERSION new file mode 100644 index 0000000..81ef58f --- /dev/null +++ b/cmd/VERSION @@ -0,0 +1 @@ +v2.0.1 \ No newline at end of file diff --git a/cmd/commands/alias_encrypt.go b/cmd/commands/alias_encrypt.go new file mode 100644 index 0000000..9fd560f --- /dev/null +++ b/cmd/commands/alias_encrypt.go @@ -0,0 +1,82 @@ +package commands + +import ( + "context" + "fmt" + + "github.com/eodata/operator-cli/cmd/flags" + "github.com/eodata/operator-cli/internal/keystore" + "github.com/ethereum/go-ethereum/crypto" + "github.com/urfave/cli/v3" +) + +func NewAliasEcdsaEncryptCommand(ctx context.Context, version string) *cli.Command { + return &cli.Command{ + Name: "alias-ecdsa-encrypt", + Description: "Encrypt the ecdsa private key used as operator alias", + Version: version, + HideVersion: true, + Action: runAliasEcdsaEncrypt, + Flags: []cli.Flag{ + flags.EcdsaPrivateKeyFlag, + flags.PassphraseFlag, + flags.EcdsaPassphraseFlag, + flags.KeyStorePathFlag, + flags.GenerateKeyPairFlag, + }, + } +} + +func runAliasEcdsaEncrypt(ctx context.Context, c *cli.Command) error { + logger := flags.Logger + + var passphrase string + + if c.IsSet(flags.PassphraseFlag.Name) { + passphrase = c.String(flags.PassphraseFlag.Name) + } + + if c.IsSet(flags.EcdsaPassphraseFlag.Name) { + if passphrase != "" { + return fmt.Errorf("either common passphrase or specific passphrases should be set") + } + passphrase = c.String(flags.EcdsaPassphraseFlag.Name) + } + + if passphrase == "" { + return fmt.Errorf("either common passphrase or specific passphrases should be set") + } + + keystorePath := c.String(flags.KeyStorePathFlag.Name) + + ecdsaPair, err := crypto.HexToECDSA(c.String(flags.EcdsaPrivateKeyFlag.Name)) + if err != nil { + return fmt.Errorf("invalid ECDSA private key %v", err) + } + address := crypto.PubkeyToAddress(ecdsaPair.PublicKey) + + _, err = keystore.GetECDSAPrivateKey(passphrase, keystorePath, address.Hex()) + if err == nil && !c.Bool(flags.OverrideFlag.Name) { + logger.Info("alias ECDSA private key already exists", "address", address.Hex()) + return nil + } + + if c.Bool(flags.GenerateKeyPairFlag.Name) { + ecdsaPair, err = keystore.GenerateEcdsaKeyPair() + if err != nil { + return fmt.Errorf("error generating ECDSA key %v", err) + } + } + address = crypto.PubkeyToAddress(ecdsaPair.PublicKey) + + if err = keystore.SaveECDSAPrivateKey(passphrase, keystorePath, address.Hex(), ecdsaPair); err != nil { + return fmt.Errorf( + "error writing the alias ecdsa private key to %s file %v", + fmt.Sprintf(keystore.EcdsaEncryptedWallet, address.Hex()), + err, + ) + } + logger.Info("alias ecdsa address ", "address", address.Hex()) + + return nil +} diff --git a/cmd/commands/bls_encrypt.go b/cmd/commands/bls_encrypt.go new file mode 100644 index 0000000..bd1215b --- /dev/null +++ b/cmd/commands/bls_encrypt.go @@ -0,0 +1,82 @@ +package commands + +import ( + "context" + "fmt" + + eigensdkbls "github.com/Layr-Labs/eigensdk-go/crypto/bls" + "github.com/eodata/operator-cli/cmd/flags" + "github.com/eodata/operator-cli/internal/keystore" + "github.com/urfave/cli/v3" +) + +func NewBlsEncryptCommand(ctx context.Context, version string) *cli.Command { + return &cli.Command{ + Name: "bls-encrypt", + Description: "Encrypt the bls private key used as operator alias", + Version: version, + HideVersion: true, + Action: runBlsEncrypt, + Flags: []cli.Flag{ + flags.BlsPrivateKeyFlag, + flags.PassphraseFlag, + flags.BlsPassphraseFlag, + flags.KeyStorePathFlag, + flags.OverrideFlag, + flags.GenerateKeyPairFlag, + }, + } +} + +func runBlsEncrypt(ctx context.Context, c *cli.Command) error { + logger := flags.Logger + + var passphrase string + var blsKeyPair *eigensdkbls.KeyPair + var err error + + if c.IsSet(flags.PassphraseFlag.Name) { + passphrase = c.String(flags.PassphraseFlag.Name) + } + + if c.IsSet(flags.BlsPassphraseFlag.Name) { + if passphrase != "" { + return fmt.Errorf("either common passphrase or specific passphrases should be set") + } + passphrase = c.String(flags.BlsPassphraseFlag.Name) + } + + if passphrase == "" { + return fmt.Errorf("either common passphrase or specific passphrases should be set") + } + + keystorePath := c.String(flags.KeyStorePathFlag.Name) + + blsKeyPair, err = keystore.GetBLSPrivateKey(passphrase, keystorePath) + if err == nil && !c.Bool(flags.OverrideFlag.Name) { + logger.Info( + "BLS private key already exists, override flag not set", + "G1", blsKeyPair.GetPubKeyG1().String(), + "G2", blsKeyPair.GetPubKeyG2().String(), + ) + return nil + } + + if c.Bool(flags.GenerateKeyPairFlag.Name) { + blsKeyPair, err = keystore.GenerateBlsKeyPair() + if err != nil { + return fmt.Errorf("error generating BLS key %v", err) + } + } + + if err = keystore.SaveBLSPrivateKey(passphrase, keystorePath, blsKeyPair); err != nil { + return fmt.Errorf("error writing the BLS private key to %s file %v", keystore.BlsEncryptedWallet, err) + } + logger.Info( + "BLS private key saved", + "G1", blsKeyPair.GetPubKeyG1().String(), + "G2", blsKeyPair.GetPubKeyG2().String(), + ) + + return nil +} diff --git a/cmd/commands/decrypt.go b/cmd/commands/decrypt.go new file mode 100644 index 0000000..ed6712a --- /dev/null +++ b/cmd/commands/decrypt.go @@ -0,0 +1,99 @@ +package commands + +import ( + "context" + "encoding/hex" + "fmt" + + "github.com/eodata/operator-cli/cmd/flags" + "github.com/eodata/operator-cli/internal/keystore" + "github.com/ethereum/go-ethereum/crypto" + "github.com/urfave/cli/v3" +) + +func NewDecryptCommand(ctx context.Context, version string) *cli.Command { + return &cli.Command{ + Name: "decrypt", + Description: "Decrypt the ecdsa and bls private keys", + Version: version, + HideVersion: true, + Action: runDecrypt, + Flags: []cli.Flag{ + flags.PassphraseFlag, + flags.EcdsaPassphraseFlag, + flags.BlsPassphraseFlag, + flags.KeyStorePathFlag, + }, + } +} + +func runDecrypt(ctx context.Context, c *cli.Command) error { + logger := flags.Logger + + var ecdsaPassphrase string + var blsPassphrase string + + if c.IsSet(flags.PassphraseFlag.Name) { + ecdsaPassphrase = c.String(flags.PassphraseFlag.Name) + blsPassphrase = c.String(flags.PassphraseFlag.Name) + } + + if c.IsSet(flags.EcdsaPassphraseFlag.Name) { + if ecdsaPassphrase != "" { + return fmt.Errorf("either common passphrase or ecdsa passphrases should be set") + } + ecdsaPassphrase = c.String(flags.EcdsaPassphraseFlag.Name) + } + + if c.IsSet(flags.BlsPassphraseFlag.Name) { + if blsPassphrase != "" { + return fmt.Errorf("either common passphrase or bls passphrases should be set") + } + blsPassphrase = c.String(flags.BlsPassphraseFlag.Name) + } + + keystorePath := c.String(flags.KeyStorePathFlag.Name) + + senderEcdsaKeyPair, err := keystore.GetECDSAPrivateKey(ecdsaPassphrase, keystorePath, "") + if err != nil { + return fmt.Errorf("error reading the sender ECDSA private key %v", err) + } + + logger.Info( + "sender ecdsa info", + "address", crypto.PubkeyToAddress(senderEcdsaKeyPair.PublicKey), + "private key", hex.EncodeToString(senderEcdsaKeyPair.D.Bytes()), + ) + + blsKeyPair, err := keystore.GetBLSPrivateKey(blsPassphrase, keystorePath) + if err != nil { + return fmt.Errorf("error reading the BLS private key %v", err) + } + + logger.Info( + "BLS info", + "G1", blsKeyPair.GetPubKeyG1().String(), + "G2", blsKeyPair.GetPubKeyG2().String(), + "private key", blsKeyPair.PrivKey.String(), + ) + + ecdsaAddresses, err := keystore.ListEcdsaAddresses(keystorePath) + if err != nil { + return fmt.Errorf("error listing the ECDSA keys %v", err) + } + + for _, ecdsaAddress := range ecdsaAddresses { + ecdsaKeyPair, err := keystore.GetECDSAPrivateKey(ecdsaPassphrase, keystorePath, ecdsaAddress) + if err != nil { + return fmt.Errorf("error reading the ECDSA private key of %s %v", ecdsaAddress, err) + } + + logger.Info( + "ECDSA info", + "address", crypto.PubkeyToAddress(ecdsaKeyPair.PublicKey), + "private key", hex.EncodeToString(ecdsaKeyPair.D.Bytes()), + ) + } + + return nil +} diff --git a/cmd/deregister.go b/cmd/commands/deregister.g similarity index 99% rename from cmd/deregister.go rename to cmd/commands/deregister.g index 872f930..af9330d 100644 --- a/cmd/deregister.go +++ b/cmd/commands/deregister.g @@ -1,4 +1,4 @@ -package cmd +package commands import ( "context" diff --git a/cmd/print_status.go b/cmd/commands/print_status.g similarity index 99% rename from cmd/print_status.go rename to cmd/commands/print_status.g index 8ed9efd..36bc1a8 100644 --- a/cmd/print_status.go +++ b/cmd/commands/print_status.g @@ -1,4 +1,4 @@ -package cmd +package commands import ( "context" diff --git a/cmd/commands/register.go b/cmd/commands/register.go new file mode 100644 index 0000000..e1b6ef7 --- /dev/null +++ b/cmd/commands/register.go @@ -0,0 +1,334 @@ +package commands + +import ( + "context" + "fmt" + "math/big" + "strconv" + "strings" + + "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" + "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" + eigensdkbls "github.com/Layr-Labs/eigensdk-go/crypto/bls" + "github.com/Layr-Labs/eigensdk-go/signerv2" + "github.com/consensys/gnark-crypto/ecc/bn254" + "github.com/eodata/operator-cli/cmd/flags" + allocationmanager "github.com/eodata/operator-cli/contracts/bindings/AllocationManager" + regcoord "github.com/eodata/operator-cli/contracts/bindings/EORegistryCoordinator" + iblsapkregistry "github.com/eodata/operator-cli/contracts/bindings/IBLSApkRegistry" + "github.com/eodata/operator-cli/internal/eigen" + "github.com/eodata/operator-cli/internal/keystore" + "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/crypto" + "github.com/urfave/cli/v3" +) + +func NewRegisterCommand(ctx context.Context, version string) *cli.Command { + return &cli.Command{ + Name: "register", + Description: "Register the operator", + Version: version, + HideVersion: true, + Action: runRegister, + Flags: []cli.Flag{ + flags.ProfileFlag, + flags.EthRPCFlag, + flags.EOChainRPCFlag, + flags.OperatorAddressFlag, + flags.RegistryCoordinatorFlag, + flags.PassphraseFlag, + flags.EcdsaPassphraseFlag, + flags.BlsPassphraseFlag, + flags.KeyStorePathFlag, + flags.SaltFlag, + flags.ExpiryFlag, + flags.OperatorSetIDsFlag, + }, + } +} + +type operatorSetData struct { + RegistrationType int32 + Socket string + Params iblsapkregistry.IBLSApkRegistryTypesPubkeyRegistrationParams + OperatorAliases []common.Address +} + +func runRegister(ctx context.Context, c *cli.Command) error { + logger := flags.Logger + + err := flags.SetProfile(ctx, c) + if err != nil { + return fmt.Errorf("error setting profile: %v", err) + } + + var ecdsaPassphrase string + var blsPassphrase string + + if c.IsSet(flags.PassphraseFlag.Name) { + ecdsaPassphrase = c.String(flags.PassphraseFlag.Name) + blsPassphrase = c.String(flags.PassphraseFlag.Name) + } + + if c.IsSet(flags.EcdsaPassphraseFlag.Name) { + if ecdsaPassphrase != "" { + return fmt.Errorf("either common passphrase or ecdsa passphrases should be set") + } + ecdsaPassphrase = c.String(flags.EcdsaPassphraseFlag.Name) + } + + if ecdsaPassphrase == "" { + return fmt.Errorf("either common passphrase or ecdsa passphrases should be set") + } + + ecdsaPair, err := keystore.GetECDSAPrivateKey(ecdsaPassphrase, c.String(flags.KeyStorePathFlag.Name), "") + if err != nil { + return fmt.Errorf("error getting ECDSA private key %v", err) + } + + if c.IsSet(flags.BlsPassphraseFlag.Name) { + if blsPassphrase != "" { + return fmt.Errorf("either common passphrase or bls passphrases should be set") + } + blsPassphrase = c.String(flags.BlsPassphraseFlag.Name) + } + + if blsPassphrase == "" { + return fmt.Errorf("either common passphrase or bls passphrases should be set") + } + + blsKeyPair, err := keystore.GetBLSPrivateKey(blsPassphrase, c.String(flags.KeyStorePathFlag.Name)) + if err != nil { + return fmt.Errorf("error getting BLS private key %v", err) + } + + if !common.IsHexAddress(c.String(flags.RegistryCoordinatorFlag.Name)) { + return fmt.Errorf("registry-coordinator-address must be a valid Ethereum address") + } + registryCoordinatorAddress := common.HexToAddress(c.String(flags.RegistryCoordinatorFlag.Name)) + if registryCoordinatorAddress == (common.Address{}) { + return fmt.Errorf("registry-coordinator-address must be a valid Ethereum address") + } + + if !common.IsHexAddress(c.String(flags.OperatorAddressFlag.Name)) { + return fmt.Errorf("operator-address must be a valid Ethereum address") + } + operatorAddress := common.HexToAddress(c.String(flags.OperatorAddressFlag.Name)) + if operatorAddress == (common.Address{}) { + return fmt.Errorf("operator-address must be a valid Ethereum address") + } + + // parse operator-set-ids comma separated int:string tuple. The first item is integer of operator set id. + // The second item is the alias address for that operator set. + operatorSetIDStrings := c.StringSlice(flags.OperatorSetIDsFlag.Name) + operatorSetIds := []uint32{} + operatorSetAliases := []common.Address{} + + for _, idString := range operatorSetIDStrings { + parts := strings.Split(idString, ":") + if len(parts) != 2 { + return fmt.Errorf("invalid operator-set-id format: %s", idString) + } + + id, err := strconv.ParseInt(parts[0], 10, 32) + if err != nil { + return fmt.Errorf("invalid operator-set-id integer: %s", parts[0]) + } + + if !common.IsHexAddress(parts[1]) { + return fmt.Errorf("invalid operator-set-id alias: %s", parts[1]) + } + + alias := common.HexToAddress(parts[1]) + + operatorSetIds = append(operatorSetIds, uint32(id)) + operatorSetAliases = append(operatorSetAliases, alias) + } + + ethClient, err := eigen.CreateEthClient(c.String(flags.EthRPCFlag.Name)) + if err != nil { + return fmt.Errorf("error creating Eth client %v", err) + } + + avsClient, err := eigen.BuildAVSClient(ethClient, registryCoordinatorAddress) + if err != nil { + return fmt.Errorf("error creating AVS client %v", err) + } + + g1HashedMsgToSign, err := avsClient.RegistryCoordinator.PubkeyRegistrationMessageHash( + &bind.CallOpts{}, + operatorAddress, + ) + if err != nil { + return fmt.Errorf("error getting PubkeyRegistrationMessageHash from registryCoordinator contract %v", err) + } + + signedMsg := convertToBN254G1Point( + blsKeyPair.SignHashedToCurveMessage(convertBn254GethToGnark(g1HashedMsgToSign)).G1Point, + ) + G1pubkeyBN254 := convertToBN254G1Point(blsKeyPair.GetPubKeyG1()) + G2pubkeyBN254 := convertToBN254G2Point(blsKeyPair.GetPubKeyG2()) + + operatorSetData := operatorSetData{ + RegistrationType: 1, + Socket: "", + Params: iblsapkregistry.IBLSApkRegistryTypesPubkeyRegistrationParams{ + PubkeyRegistrationSignature: signedMsg, + PubkeyG1: G1pubkeyBN254, + PubkeyG2: G2pubkeyBN254, + }, + OperatorAliases: operatorSetAliases, + } + + const operatorSetDataABI = `[{ + "type": "tuple", + "components": [ + {"type": "int32", "name": "registrationType"}, + {"type": "string", "name": "socket"}, + {"type": "tuple", "name": "params", "components": [ + {"type": "tuple", "name": "pubkeyRegistrationSignature", "components": [ + {"type": "uint256", "name": "x"}, + {"type": "uint256", "name": "y"} + ]}, + {"type": "tuple", "name": "pubkeyG1", "components": [ + {"type": "uint256", "name": "x"}, + {"type": "uint256", "name": "y"} + ]}, + {"type": "tuple", "name": "pubkeyG2", "components": [ + {"type": "uint256[2]", "name": "x"}, + {"type": "uint256[2]", "name": "y"} + ]} + ]}, + {"type": "address[]", "name": "operatorAliases"} + ] +}]` + + parsedABI, err := abi.JSON(strings.NewReader(operatorSetDataABI)) + if err != nil { + return fmt.Errorf("error parsing ABI: %v", err) + } + + encodedData, err := parsedABI.Pack("", + operatorSetData.RegistrationType, + operatorSetData.Socket, + []interface{}{ + []interface{}{ + operatorSetData.Params.PubkeyRegistrationSignature.X, + operatorSetData.Params.PubkeyRegistrationSignature.Y, + }, + []interface{}{ + operatorSetData.Params.PubkeyG1.X, + operatorSetData.Params.PubkeyG1.Y, + }, + []interface{}{ + operatorSetData.Params.PubkeyG2.X, + operatorSetData.Params.PubkeyG2.Y, + }, + }, + operatorSetData.OperatorAliases, + ) + if err != nil { + return fmt.Errorf("error encoding operator set data: %v", err) + } + + chainIDBigInt, err := ethClient.ChainID(context.Background()) + if err != nil { + return fmt.Errorf("error getting chainId (%v): %v", c.String(flags.EthRPCFlag.Name), err) + } + + signerV2, signerAddr, err := signerv2.SignerFromConfig(signerv2.Config{PrivateKey: ecdsaPair}, chainIDBigInt) + if err != nil { + return fmt.Errorf("error creating the signer object of %v on Ethereum mainnet/holesky (%v) %v", + crypto.PubkeyToAddress(ecdsaPair.PublicKey), c.String(flags.EthRPCFlag.Name), err, + ) + } + + wallet, err := wallet.NewPrivateKeyWallet(ethClient, signerV2, signerAddr, logger) + if err != nil { + return fmt.Errorf("error creating the wallet object of %v on Ethereum mainnet/holesky (%v) %v", + crypto.PubkeyToAddress(ecdsaPair.PublicKey), c.String(flags.EthRPCFlag.Name), err, + ) + } + + txMgr := txmgr.NewSimpleTxManager( + wallet, + ethClient, + logger, + signerAddr, + ) + + noSendTxOpts, err := txMgr.GetNoSendTxOpts() + if err != nil { + return fmt.Errorf("error creating a noopSender parameters on Ethereum mainnet/Holesky (%v) %v", + c.String(flags.EthRPCFlag.Name), err, + ) + } + + registerParams := allocationmanager.IAllocationManagerTypesRegisterParams{ + Avs: registryCoordinatorAddress, + OperatorSetIds: operatorSetIds, + Data: encodedData, + } + + tx, err := avsClient.AllocationManager.RegisterForOperatorSets( + noSendTxOpts, + operatorAddress, + registerParams, + ) + if err != nil { + return fmt.Errorf( + "error building the registerForOperatorSets transaction of operator %v on Ethereum mainnet/Holesky (%v) %v", + operatorAddress.Hex(), + c.String(flags.EthRPCFlag.Name), + err, + ) + } + + receipt, err := txMgr.Send(ctx, tx, true) + if err != nil { + return fmt.Errorf( + "error sending the registerForOperatorSets transaction of operator %v on Ethereum mainnet/Holesky (%v) %v", + operatorAddress.Hex(), + c.String(flags.EthRPCFlag.Name), + err, + ) + } + if receipt.Status != 1 { + return fmt.Errorf( + "registerForOperatorSets transaction %v of operator %v on Ethereum mainnet/Holeskey (%v) reverted", + receipt.TxHash.Hex(), + operatorAddress.Hex(), + c.String(flags.EthRPCFlag.Name), + ) + } + + logger.Info( + "successfully registered to eoracle AVS", + "operator", operatorAddress.Hex(), + "tx hash", receipt.TxHash.Hex(), + "sender", signerAddr.Hex(), + ) + + return nil +} + +func convertBn254GethToGnark(input regcoord.BN254G1Point) *bn254.G1Affine { + return eigensdkbls.NewG1Point(input.X, input.Y).G1Affine +} + +func convertToBN254G2Point(input *eigensdkbls.G2Point) iblsapkregistry.BN254G2Point { + output := iblsapkregistry.BN254G2Point{ + X: [2]*big.Int{input.X.A1.BigInt(big.NewInt(0)), input.X.A0.BigInt(big.NewInt(0))}, + Y: [2]*big.Int{input.Y.A1.BigInt(big.NewInt(0)), input.Y.A0.BigInt(big.NewInt(0))}, + } + return output +} +func convertToBN254G1Point(input *eigensdkbls.G1Point) iblsapkregistry.BN254G1Point { + output := iblsapkregistry.BN254G1Point{ + X: input.X.BigInt(big.NewInt(0)), + Y: input.Y.BigInt(big.NewInt(0)), + } + return output +} diff --git a/cmd/commands/sender_encrypt.go b/cmd/commands/sender_encrypt.go new file mode 100644 index 0000000..fb6046e --- /dev/null +++ b/cmd/commands/sender_encrypt.go @@ -0,0 +1,70 @@ +package commands + +import ( + "context" + "fmt" + + "github.com/eodata/operator-cli/cmd/flags" + "github.com/eodata/operator-cli/internal/keystore" + "github.com/ethereum/go-ethereum/crypto" + "github.com/urfave/cli/v3" +) + +func NewSenderEcdsaEncryptCommand(ctx context.Context, version string) *cli.Command { + return &cli.Command{ + Name: "sender-ecdsa-encrypt", + Description: "Encrypt the ecdsa private key used to send transactions", + Version: version, + HideVersion: true, + Action: runSenderEcdsaEncrypt, + Flags: []cli.Flag{ + flags.EcdsaPrivateKeyFlag, + flags.PassphraseFlag, + flags.EcdsaPassphraseFlag, + flags.KeyStorePathFlag, + flags.OverrideFlag, + }, + } +} + +func runSenderEcdsaEncrypt(ctx context.Context, c *cli.Command) error { + logger := flags.Logger + + var passphrase string + + if c.IsSet(flags.PassphraseFlag.Name) { + passphrase = c.String(flags.PassphraseFlag.Name) + } + + if c.IsSet(flags.EcdsaPassphraseFlag.Name) { + if passphrase != "" { + return fmt.Errorf("either common passphrase or specific passphrases should be set") + } + passphrase = c.String(flags.EcdsaPassphraseFlag.Name) + } + + if passphrase == "" { + return fmt.Errorf("either common passphrase or specific passphrases should be set") + } + + keystorePath := c.String(flags.KeyStorePathFlag.Name) + + ecdsaPair, err := crypto.HexToECDSA(c.String(flags.EcdsaPrivateKeyFlag.Name)) + if err != nil { + return fmt.Errorf("invalid ECDSA private key %v", err) + } + address := crypto.PubkeyToAddress(ecdsaPair.PublicKey) + + _, err = keystore.GetECDSAPrivateKey(passphrase, keystorePath, "") + if err == nil && !c.Bool(flags.OverrideFlag.Name) { + logger.Info("sender ECDSA private key already exists, override flag not set", "address", address.Hex()) + return nil + } + + if err = keystore.SaveECDSAPrivateKey(passphrase, keystorePath, "", ecdsaPair); err != nil { + return fmt.Errorf("error writing the sender ecdsa private key to %s file %v", keystore.EcdsaEncryptedWallet, err) + } + logger.Info("sender ecdsa address ", "address", address.Hex()) + + return nil +} diff --git a/cmd/declare_alias.go b/cmd/declare_alias.go deleted file mode 100644 index 9f6105c..0000000 --- a/cmd/declare_alias.go +++ /dev/null @@ -1,114 +0,0 @@ -package cmd - -import ( - "context" - "crypto/ecdsa" - - "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" - "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" - "github.com/Layr-Labs/eigensdk-go/signerv2" - eoconfig "github.com/eodata/operator-cli/contracts/bindings/EOConfig" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/crypto" - "github.com/urfave/cli/v2" -) - -func NewDeclareAliasCommand() *cli.Command { - return &cli.Command{ - Name: "declare-alias", - Description: "Declare the alias in the eochain", - Before: setProfile, - Action: runDeclareAlias, - Flags: []cli.Flag{ - ProfileFlag, - PassphraseFlag, - KeyStorePathFlag, - EOChainRPCFlag, - EOConfigAddressFlag, - }, - } -} - -func runDeclareAlias(c *cli.Context) error { - if !c.IsSet(PassphraseFlag.Name) || !c.IsSet(KeyStorePathFlag.Name) { - utils.Fatalf("passphrase and keystore-path are required") - } - - ethEcdsaPair, aliasEcdsaPair, err := getOperatorAndAliasKeys(c) - if err != nil { - return err - } - - signerAddress := crypto.PubkeyToAddress(ethEcdsaPair.PublicKey) - logger.Infof("Declaring alias with signer: %s", signerAddress.String()) - - txMgr, contractEOConfig, err := getTxMgrForEOChain(ethEcdsaPair) - if err != nil { - return err - } - - noSendTxOpts, err := txMgr.GetNoSendTxOpts() - if err != nil { - utils.Fatalf("Error creating transaction object %v", err) - } - - tx, err := contractEOConfig.DeclareAlias( - noSendTxOpts, - crypto.PubkeyToAddress(aliasEcdsaPair.PublicKey), - ) - if err != nil { - utils.Fatalf("Failed to create EOConfig.declareAlias transaction %v", err) - } - - ctx := context.Background() - receipt, err := txMgr.Send(ctx, tx, true) - if err != nil { - utils.Fatalf("declareAlias transaction failed %s", err) - } - - if receipt.Status != 1 { - utils.Fatalf( - "declareAlias transaction %v for operator %v on eochain mainnet/testnet (%v) reverted", - receipt.TxHash.Hex(), - crypto.PubkeyToAddress(ethEcdsaPair.PublicKey), - profile.EOChainRPCEndpoint, - ) - } - - logger.Info( - "successfully declared an alias in the eochain", - "Ethereum address", crypto.PubkeyToAddress(ethEcdsaPair.PublicKey), - "eochain address", crypto.PubkeyToAddress(aliasEcdsaPair.PublicKey), - "tx hash", receipt.TxHash.Hex(), - ) - return nil -} - -func getTxMgrForEOChain(ethEcdsaPair *ecdsa.PrivateKey) (*txmgr.SimpleTxManager, *eoconfig.EOConfig, error) { - ethClient, err := createEthClient(profile.EOChainRPCEndpoint) - if err != nil { - return nil, nil, err - } - - chainIDBigInt, err := ethClient.ChainID(context.Background()) - if err != nil { - utils.Fatalf("cannot get chainId (%v): %v", profile.EOChainRPCEndpoint, err) - } - - signerV2, signerAddr, err := signerv2.SignerFromConfig(signerv2.Config{PrivateKey: ethEcdsaPair}, chainIDBigInt) - if err != nil { - utils.Fatalf("Error creating the signer function for %v %v", crypto.PubkeyToAddress(ethEcdsaPair.PublicKey), err) - } - txSender, err := wallet.NewPrivateKeyWallet(ethClient, signerV2, signerAddr, logger) - if err != nil { - utils.Fatalf("Failed to create transaction sender for declaring alias of operator %v on eoChain (%v) %v", - crypto.PubkeyToAddress(ethEcdsaPair.PublicKey), profile.EOChainRPCEndpoint, err) - } - - contractEOConfig, err := eoconfig.NewEOConfig(profile.EOConfigAddress, ethClient) - if err != nil { - utils.Fatalf("Failed to bind the eoconfig contract %v", err) - } - - return txmgr.NewSimpleTxManager(txSender, ethClient, logger, signerAddr), contractEOConfig, nil -} diff --git a/cmd/decrypt.go b/cmd/decrypt.go deleted file mode 100644 index 4af0402..0000000 --- a/cmd/decrypt.go +++ /dev/null @@ -1,53 +0,0 @@ -package cmd - -import ( - "encoding/hex" - "errors" - "fmt" - "os" - "path/filepath" - - eigensdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/crypto" - "github.com/urfave/cli/v2" -) - -func NewDecryptCommand() *cli.Command { - return &cli.Command{ - Name: "decrypt", - Description: "Decrypt the ecdsa and bls private keys", - Action: runDecrypt, - Flags: []cli.Flag{ - PassphraseFlag, - KeyStorePathFlag, - }, - } -} - -func runDecrypt(c *cli.Context) error { - ecdsaPair, err := getECDSAPrivateKey(c) - if err != nil { - utils.Fatalf("Error reading the ecdsaEncryptedWallet.json file %v", err) - } - fmt.Println("ecdsa address ", crypto.PubkeyToAddress(ecdsaPair.PublicKey), "private key", hex.EncodeToString(ecdsaPair.D.Bytes())) - - ecdsaEOChainPair, err := eigensdkecdsa.ReadKey(filepath.Join(c.String(KeyStorePathFlag.Name), "ecdsaAliasedEncryptedWallet.json"), c.String(PassphraseFlag.Name)) - if err != nil { - if errors.Is(err, os.ErrNotExist) { - fmt.Println("eochain alias was not set in the system") - return nil - } - utils.Fatalf("Error reading the ecdsaAliasedEncryptedWallet.json file %v", err) - } - fmt.Println("EOChain ecdsa address ", crypto.PubkeyToAddress(ecdsaEOChainPair.PublicKey), "private key", hex.EncodeToString(ecdsaEOChainPair.D.Bytes())) - - blsKeyPair, err := getBLSPrivateKey(c) - if err != nil { - utils.Fatalf("Error reading the blsEncryptedWallet.json file %v", err) - } - - fmt.Println("bls address G1, G2 ", blsKeyPair.GetPubKeyG1().String(), ", ", blsKeyPair.GetPubKeyG2().String(), "private key", blsKeyPair.PrivKey.String()) - - return nil -} diff --git a/cmd/encrypt.go b/cmd/encrypt.go deleted file mode 100644 index 5cf2cb0..0000000 --- a/cmd/encrypt.go +++ /dev/null @@ -1,53 +0,0 @@ -package cmd - -import ( - "fmt" - "path/filepath" - - eigensdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/crypto" - "github.com/urfave/cli/v2" -) - -func NewEncryptCommand() *cli.Command { - return &cli.Command{ - Name: "encrypt", - Description: "Encrypt the ecdsa and bls private keys", - Action: runEncrypt, - Flags: []cli.Flag{ - EcdsaPrivateKeyFlag, - BlsPrivateKeyFlag, - PassphraseFlag, - KeyStorePathFlag, - }, - } -} - -func runEncrypt(c *cli.Context) error { - // Encrypt the ecdsa private key and save it to a file - ecdsaPair, err := getECDSAPrivateKey(c) - if err != nil { - utils.Fatalf("Invalid ECDSA private key %v", err) - } - - if err = eigensdkecdsa.WriteKey(filepath.Join(c.String(KeyStorePathFlag.Name), "ecdsaEncryptedWallet.json"), ecdsaPair, c.String(PassphraseFlag.Name)); err != nil { - utils.Fatalf("Error writing the ecdsaEncryptedWallet.json file %v", err) - } - - fmt.Println("ecdsa address ", crypto.PubkeyToAddress(ecdsaPair.PublicKey), "saved") - - // Encrypt the bls private key and save it to a file - blsKeyPair, err := getBLSPrivateKey(c) - if err != nil { - utils.Fatalf("Invalid BLS private key %v", err) - } - - if err = blsKeyPair.SaveToFile(filepath.Join(c.String(KeyStorePathFlag.Name), "blsEncryptedWallet.json"), c.String(PassphraseFlag.Name)); err != nil { - utils.Fatalf("Error writing the blsEncryptedWallet.json file %v", err) - } - - fmt.Println("bls address G1, G2 ", blsKeyPair.GetPubKeyG1().String(), ", ", blsKeyPair.GetPubKeyG2().String(), "saved") - - return nil -} diff --git a/cmd/flags.go b/cmd/flags.go deleted file mode 100644 index 65e1d45..0000000 --- a/cmd/flags.go +++ /dev/null @@ -1,89 +0,0 @@ -package cmd - -import ( - "github.com/urfave/cli/v2" -) - -var ( - KeyStorePathFlag = &cli.StringFlag{ - Name: "keystore-path", - Usage: "location of the keystore folder", - EnvVars: []string{"EO_KEYSTORE_PATH"}, - Value: ".keystore", - } - EthRPCFlag = &cli.StringFlag{ - Name: "eth-rpc-endpoint", - Usage: "ethereum rpc url", - EnvVars: []string{"ETH_RPC_ENDPOINT"}, - } - RegistryCoordinatorFlag = &cli.StringFlag{ - Name: "registry-coordinator", - Usage: "registry coordinator contract address", - EnvVars: []string{"EO_REGISTRY_COORDINATOR"}, - } - EcdsaPrivateKeyFlag = &cli.StringFlag{ - Name: "ecdsa-private-key", - Usage: "ecdsa private key", - EnvVars: []string{"EO_ECDSA_PRIVATE_KEY"}, - } - BlsPrivateKeyFlag = &cli.StringFlag{ - Name: "bls-private-key", - Usage: "bls private key", - EnvVars: []string{"EO_BLS_PRIVATE_KEY"}, - } - SaltFlag = &cli.StringFlag{ - Name: "salt", - Usage: "salt", - EnvVars: []string{"EO_SALT"}, - Value: "0x01", - } - ExpiryFlag = &cli.StringFlag{ - Name: "expiry", - Usage: "expiry", - EnvVars: []string{"EO_EXPIRY"}, - Value: "115792089237316195423570985008687907853269984665640564039457584007913129639935", - } - PassphraseFlag = &cli.StringFlag{ - Name: "passphrase", - Usage: "passphrase to open the encrypted private key", - EnvVars: []string{"EO_PASSPHRASE"}, - } - ValidatorRoleFlag = &cli.StringFlag{ - Name: "validator-role", - Usage: "role of the operator", - EnvVars: []string{"EO_VALIDATOR_ROLE"}, - Value: "DATA_VALIDATOR", - } - ChainValidatorG1PointSignatureFlag = &cli.StringSliceFlag{ - Name: "chain-validator-g1-point-signature", - Usage: "G1Point signature of the chain operator", - EnvVars: []string{"EO_CHAIN_VALIDATOR_G1_POINT_SIGNATURE"}, - } - QuorumNumberFlag = &cli.IntFlag{ - Name: "quorum-number", - Usage: "quorum number", - EnvVars: []string{"EO_QUORUM_NUMBER"}, - Value: 0, - } - EOChainRPCFlag = &cli.StringFlag{ - Name: "eochain-rpc-endpoint", - Usage: "eochain rpc url", - EnvVars: []string{"EO_CHAIN_RPC_ENDPOINT"}, - } - OverrideFlag = &cli.BoolFlag{ - Name: "alias-override", - Usage: "Indication if a new alias key should be created", - EnvVars: []string{"EO_ALIAS_OVERRIDE"}, - } - EOConfigAddressFlag = &cli.StringFlag{ - Name: "eoconfig-address", - Usage: "eoconfig contract address", - EnvVars: []string{"EO_CONFIG_ADDRESS"}, - } - ProfileFlag = &cli.StringFlag{ - Name: "profile", - Usage: "Network to use: mainnet or testnet.", - EnvVars: []string{"EO_PROFILE"}, - Value: TestnetProfileName, - } -) diff --git a/cmd/config.go b/cmd/flags/config.go similarity index 83% rename from cmd/config.go rename to cmd/flags/config.go index 69cb33d..3dd04da 100644 --- a/cmd/config.go +++ b/cmd/flags/config.go @@ -1,4 +1,4 @@ -package cmd +package flags import ( "github.com/Layr-Labs/eigensdk-go/logging" @@ -7,7 +7,7 @@ import ( var ( profile *NetworkProfile - logger, _ = logging.NewZapLogger(logging.Production) + Logger, _ = logging.NewZapLogger(logging.Production) ) type NetworkProfile struct { diff --git a/cmd/flags/flags.go b/cmd/flags/flags.go new file mode 100644 index 0000000..242a690 --- /dev/null +++ b/cmd/flags/flags.go @@ -0,0 +1,115 @@ +package flags + +import ( + "github.com/urfave/cli/v3" +) + +var ( + KeyStorePathFlag = &cli.StringFlag{ + Name: "keystore-path", + Usage: "location of the keystore folder", + Sources: cli.EnvVars("EO_KEYSTORE_PATH"), + Value: ".keystore", + Required: true, + } + EthRPCFlag = &cli.StringFlag{ + Name: "eth-rpc-endpoint", + Usage: "ethereum rpc url", + Sources: cli.EnvVars("ETH_RPC_ENDPOINT"), + Required: true, + } + OperatorAddressFlag = &cli.StringFlag{ + Name: "operator-address", + Usage: "operator address", + Sources: cli.EnvVars("EO_OPERATOR_ADDRESS"), + Required: true, + } + RegistryCoordinatorFlag = &cli.StringFlag{ + Name: "registry-coordinator", + Usage: "registry coordinator contract address", + Sources: cli.EnvVars("EO_REGISTRY_COORDINATOR"), + Required: true, + } + EcdsaPrivateKeyFlag = &cli.StringFlag{ + Name: "ecdsa-private-key", + Usage: "ecdsa private key", + Sources: cli.EnvVars("EO_ECDSA_PRIVATE_KEY"), + Required: true, + } + BlsPrivateKeyFlag = &cli.StringFlag{ + Name: "bls-private-key", + Usage: "bls private key", + Sources: cli.EnvVars("EO_BLS_PRIVATE_KEY"), + Required: true, + } + SaltFlag = &cli.StringFlag{ + Name: "salt", + Usage: "salt", + Sources: cli.EnvVars("EO_SALT"), + Value: "0x01", + } + ExpiryFlag = &cli.StringFlag{ + Name: "expiry", + Usage: "expiry", + Sources: cli.EnvVars("EO_EXPIRY"), + Value: "115792089237316195423570985008687907853269984665640564039457584007913129639935", + } + PassphraseFlag = &cli.StringFlag{ + Name: "passphrase", + Usage: "passphrase to open the encrypted private key", + Sources: cli.EnvVars("EO_PASSPHRASE"), + } + EcdsaPassphraseFlag = &cli.StringFlag{ + Name: "ecdsa-passphrase", + Usage: "ecdsa passphrase", + Sources: cli.EnvVars("EO_ECDSA_PASSPHRASE"), + } + BlsPassphraseFlag = &cli.StringFlag{ + Name: "bls-passphrase", + Usage: "bls passphrase", + Sources: cli.EnvVars("EO_BLS_PASSPHRASE"), + } + ChainValidatorG1PointSignatureFlag = &cli.StringSliceFlag{ + Name: "chain-validator-g1-point-signature", + Usage: "G1Point signature of the chain operator", + Sources: cli.EnvVars("EO_CHAIN_VALIDATOR_G1_POINT_SIGNATURE"), + } + QuorumNumberFlag = &cli.IntFlag{ + Name: "quorum-number", + Usage: "quorum number", + Sources: cli.EnvVars("EO_QUORUM_NUMBER"), + Value: 0, + } + EOChainRPCFlag = &cli.StringFlag{ + Name: "eochain-rpc-endpoint", + Usage: "eochain rpc url", + Sources: cli.EnvVars("EO_CHAIN_RPC_ENDPOINT"), + } + GenerateKeyPairFlag = &cli.BoolFlag{ + Name: "generate-key-pair", + Usage: "Generate a new key pair", + Sources: cli.EnvVars("EO_GENERATE_KEY_PAIR"), + } + OverrideFlag = &cli.BoolFlag{ + Name: "alias-override", + Usage: "Indication if a new alias key should be created", + Sources: cli.EnvVars("EO_ALIAS_OVERRIDE"), + } + EOConfigAddressFlag = &cli.StringFlag{ + Name: "eoconfig-address", + Usage: "eoconfig contract address", + Sources: cli.EnvVars("EO_CONFIG_ADDRESS"), + } + ProfileFlag = &cli.StringFlag{ + Name: "profile", + Usage: "Network to use: mainnet or testnet.", + Sources: cli.EnvVars("EO_PROFILE"), + Value: TestnetProfileName, + } + OperatorSetIDsFlag = &cli.StringSliceFlag{ + Name: "operator-set-ids", + Usage: "operator set ids", + Sources: cli.EnvVars("EO_OPERATOR_SET_IDS"), + Required: true, + } +) diff --git a/cmd/profile.go b/cmd/flags/profile.go similarity index 75% rename from cmd/profile.go rename to cmd/flags/profile.go index d8904dc..863143a 100644 --- a/cmd/profile.go +++ b/cmd/flags/profile.go @@ -1,13 +1,14 @@ -package cmd +package flags import ( + "context" "encoding/hex" "fmt" "net/url" "strings" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) const ( @@ -22,7 +23,7 @@ var ( EOConfigAddress: gethcommon.HexToAddress("0x05a6f762f64Ac2ccE0588677317a0Ed8af9d0c16"), RegistryCoordinatorAddress: gethcommon.HexToAddress("0x757E6f572AfD8E111bD913d35314B5472C051cA8"), - EOChainRPCEndpoint: "https://rpc.eoracle.network", + EOChainRPCEndpoint: "https://rpc.eo.app", EthRPCEndpoint: "https://rpc.flashbots.net", } @@ -32,13 +33,13 @@ var ( EOConfigAddress: gethcommon.HexToAddress("0xf735Ad57952906a672eEEaDbef3bC69ECD24E50C"), RegistryCoordinatorAddress: gethcommon.HexToAddress("0xc4A6E362e8Bd89F28Eb405F9Aa533784884B9c4F"), - EOChainRPCEndpoint: "https://rpc.testnet.eoracle.network", + EOChainRPCEndpoint: "https://rpc.testnet.eo.app", EthRPCEndpoint: "https://holesky.gateway.tenderly.com", } ) -func setProfile(context *cli.Context) error { - profileName := context.String(ProfileFlag.Name) +func SetProfile(context context.Context, c *cli.Command) error { + profileName := c.String(ProfileFlag.Name) switch profileName { case MainnetProfileName: @@ -49,26 +50,26 @@ func setProfile(context *cli.Context) error { return fmt.Errorf("invalid profile name: %s", profileName) } - if err := overrideAddress(context, EOConfigAddressFlag.Name, &profile.EOConfigAddress); err != nil { + if err := OverrideAddress(c, EOConfigAddressFlag.Name, &profile.EOConfigAddress); err != nil { return err } - if err := overrideAddress(context, RegistryCoordinatorFlag.Name, &profile.RegistryCoordinatorAddress); err != nil { + if err := OverrideAddress(c, RegistryCoordinatorFlag.Name, &profile.RegistryCoordinatorAddress); err != nil { return err } - if err := overrideURL(context, EOChainRPCFlag.Name, &profile.EOChainRPCEndpoint); err != nil { + if err := OverrideURL(c, EOChainRPCFlag.Name, &profile.EOChainRPCEndpoint); err != nil { return err } - if err := overrideURL(context, EthRPCFlag.Name, &profile.EthRPCEndpoint); err != nil { + if err := OverrideURL(c, EthRPCFlag.Name, &profile.EthRPCEndpoint); err != nil { return err } return nil } -func overrideAddress(c *cli.Context, flagName string, address *gethcommon.Address) error { +func OverrideAddress(c *cli.Command, flagName string, address *gethcommon.Address) error { if c.IsSet(flagName) { addressOverride := c.String(flagName) if err := isValidAddress(addressOverride); err != nil { @@ -79,7 +80,7 @@ func overrideAddress(c *cli.Context, flagName string, address *gethcommon.Addres return nil } -func overrideURL(c *cli.Context, flagName string, urlStr *string) error { +func OverrideURL(c *cli.Command, flagName string, urlStr *string) error { if c.IsSet(flagName) { urlOverride := c.String(flagName) if err := isValidHttpURL(urlOverride); err != nil { diff --git a/cmd/generate_alias.go b/cmd/generate_alias.go deleted file mode 100644 index 664ad7f..0000000 --- a/cmd/generate_alias.go +++ /dev/null @@ -1,78 +0,0 @@ -package cmd - -import ( - "crypto/ecdsa" - "encoding/hex" - "fmt" - "path/filepath" - - eigensdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/crypto" - "github.com/urfave/cli/v2" -) - -func NewGenerateAliasCommand() *cli.Command { - return &cli.Command{ - Name: "generate-alias", - Description: "Create or Import an ECDSA private key only for oracle chain", - Action: runGenerateAlias, - Flags: []cli.Flag{ - EcdsaPrivateKeyFlag, - PassphraseFlag, - KeyStorePathFlag, - OverrideFlag, - }, - } -} - -func runGenerateAlias(c *cli.Context) error { - if !c.IsSet(PassphraseFlag.Name) || !c.IsSet(KeyStorePathFlag.Name) { - utils.Fatalf("passphrase and keystore-path are required") - } - - aliasEcdsaPair, err := getAliasECDSAPrivateKey(c) - if err != nil { - return err - } - - if err = eigensdkecdsa.WriteKey( - filepath.Join(c.String(KeyStorePathFlag.Name), "ecdsaAliasedEncryptedWallet.json"), - aliasEcdsaPair, - c.String(PassphraseFlag.Name), - ); err != nil { - utils.Fatalf("Error writing the ecdsaAliasedEncryptedWallet.json file %v", err) - } - - fmt.Println("alias ecdsa address ", crypto.PubkeyToAddress(aliasEcdsaPair.PublicKey), "encrypted and saved") - return nil -} - -func getAliasECDSAPrivateKey(c *cli.Context) (*ecdsa.PrivateKey, error) { - aliasEcdsaPair, err := eigensdkecdsa.ReadKey(filepath.Join(c.String(KeyStorePathFlag.Name), "ecdsaAliasedEncryptedWallet.json"), c.String(PassphraseFlag.Name)) - if err != nil { - if c.String(EcdsaPrivateKeyFlag.Name) != "" { - aliasEcdsaPair, err = crypto.HexToECDSA(c.String(EcdsaPrivateKeyFlag.Name)) - if err != nil { - utils.Fatalf("Invalid ECDSA private key %v", err) - } - } else { - aliasEcdsaPair, err = crypto.GenerateKey() - if err != nil { - utils.Fatalf("Failed to generate ECDSA key %v", err) - } - fmt.Println("a new alias ecdsa was generated address ", crypto.PubkeyToAddress(aliasEcdsaPair.PublicKey), "private key", hex.EncodeToString(aliasEcdsaPair.D.Bytes())) - } - } else { - if c.String(EcdsaPrivateKeyFlag.Name) != "" { - if !c.Bool(OverrideFlag.Name) { - utils.Fatalf("alias already exists, use --override to replace it") - } - aliasEcdsaPair, err = crypto.HexToECDSA(c.String(EcdsaPrivateKeyFlag.Name)) - if err != nil { - utils.Fatalf("Invalid ECDSA private key %v", err) - } - } - } - return aliasEcdsaPair, nil -} diff --git a/cmd/generate_bls_key.go b/cmd/generate_bls_key.go deleted file mode 100644 index c390aa9..0000000 --- a/cmd/generate_bls_key.go +++ /dev/null @@ -1,29 +0,0 @@ -package cmd - -import ( - "fmt" - - eigensdkbls "github.com/Layr-Labs/eigensdk-go/crypto/bls" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/urfave/cli/v2" -) - -func NewGenerateBLSKeyCommand() *cli.Command { - return &cli.Command{ - Name: "generate-bls-key", - Description: "Generate the BLS key", - Action: runGenerateBLSKey, - Flags: []cli.Flag{}, - } -} - -func runGenerateBLSKey(_ *cli.Context) error { - keyPair, err := eigensdkbls.GenRandomBlsKeys() - if err != nil { - utils.Fatalf("Failed to generate BLS key pair %v", err) - } - fmt.Println("BLS private key", keyPair.PrivKey.String()) - fmt.Println("BLS public key G1", keyPair.GetPubKeyG1().String()) - fmt.Println("BLS public key G2", keyPair.GetPubKeyG2().String()) - return nil -} diff --git a/cmd/main.go b/cmd/main.go new file mode 100644 index 0000000..3e4dd14 --- /dev/null +++ b/cmd/main.go @@ -0,0 +1,43 @@ +package main + +import ( + "context" + _ "embed" + "os" + + "github.com/eodata/operator-cli/cmd/commands" + "github.com/eodata/operator-cli/cmd/flags" + "github.com/urfave/cli/v3" +) + +const ( + // clientIdentifier to advertise over the network. + clientIdentifier = "eo-operator-cli" +) + +//go:embed VERSION +var version string + +func main() { + ctx := context.Background() + logger := flags.Logger + + app := new(cli.Command) + app.Name = clientIdentifier + app.EnableShellCompletion = true + app.Version = version + app.Usage = "The EO AVS operator command line" + app.Copyright = "Copyright 2025 The EO Authors" + app.Commands = []*cli.Command{ + commands.NewSenderEcdsaEncryptCommand(ctx, app.Version), + commands.NewAliasEcdsaEncryptCommand(ctx, app.Version), + commands.NewBlsEncryptCommand(ctx, app.Version), + commands.NewDecryptCommand(ctx, app.Version), + commands.NewRegisterCommand(ctx, app.Version), + // commands.NewDeregisterCommand(ctx,app.Version), + } + + if err := app.Run(ctx, os.Args); err != nil { + logger.Fatal("Error: ", err) + } +} diff --git a/cmd/profiles_test.go b/cmd/profiles_test.go deleted file mode 100644 index 5b07ebe..0000000 --- a/cmd/profiles_test.go +++ /dev/null @@ -1,145 +0,0 @@ -package cmd - -import ( - flaglib "flag" - "testing" - - gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/assert" - "github.com/urfave/cli/v2" -) - -func TestFromArgs(t *testing.T) { - tests := []struct { - name string - args []string - expectedError bool - expectedProfile *NetworkProfile - }{ - { - name: "valid mainnet profile", - args: []string{"--" + ProfileFlag.Name, MainnetProfileName}, - expectedError: false, - expectedProfile: &MainnetProfile, - }, - { - name: "valid testnet profile", - args: []string{"--" + ProfileFlag.Name, TestnetProfileName}, - expectedError: false, - expectedProfile: &TestnetProfile, - }, - { - name: "invalid profile", - args: []string{"--" + ProfileFlag.Name, "invalid"}, - expectedError: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - set := flaglib.NewFlagSet("test", flaglib.ContinueOnError) - set.String(ProfileFlag.Name, "", "profile name") - c := cli.NewContext(nil, set, nil) - err := set.Parse(tt.args) - assert.NoError(t, err) - err = setProfile(c) - assert.NoError(t, err) - - if tt.expectedError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - assert.Equal(t, tt.expectedProfile, profile) - } - }) - } -} - -func TestOverrideAddress(t *testing.T) { - tests := []struct { - name string - args []string - flagName string - expectedError bool - expectedAddress gethcommon.Address - }{ - { - name: "valid address", - args: []string{"--" + EOConfigAddressFlag.Name, "0xf735Ad57952906a672eEEaDbef3bC69ECD24E50C"}, - flagName: EOConfigAddressFlag.Name, - expectedError: false, - expectedAddress: gethcommon.HexToAddress("0xf735Ad57952906a672eEEaDbef3bC69ECD24E50C"), - }, - { - name: "invalid address", - args: []string{"--" + EOConfigAddressFlag.Name, "invalid"}, - flagName: EOConfigAddressFlag.Name, - expectedError: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - set := flaglib.NewFlagSet("test", flaglib.ContinueOnError) - set.String(tt.flagName, "", "address") - set.String(ProfileFlag.Name, "testnet", "profile name") - c := cli.NewContext(nil, set, nil) - err := set.Parse(tt.args) - assert.NoError(t, err) - - err = setProfile(c) - assert.NoError(t, err) - - if tt.expectedError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - assert.Equal(t, tt.expectedAddress, profile.EOConfigAddress) - } - }) - } -} - -func TestOverrideURL(t *testing.T) { - tests := []struct { - name string - args []string - flagName string - expectedError bool - expectedURL string - }{ - { - name: "valid URL", - args: []string{"--" + EOChainRPCFlag.Name, "https://rpc.eoracle.network"}, - flagName: EOChainRPCFlag.Name, - expectedError: false, - expectedURL: "https://rpc.eoracle.network", - }, - { - name: "invalid URL", - args: []string{"--" + EOChainRPCFlag.Name, "invalid"}, - flagName: EOChainRPCFlag.Name, - expectedError: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - set := flaglib.NewFlagSet("test", flaglib.ContinueOnError) - set.String(tt.flagName, "", "URL") - set.String(ProfileFlag.Name, "testnet", "profile name") - c := cli.NewContext(nil, set, nil) - err := set.Parse(tt.args) - assert.NoError(t, err) - err = setProfile(c) - assert.NoError(t, err) - - if tt.expectedError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - assert.Equal(t, tt.expectedURL, profile.EOChainRPCEndpoint) - } - }) - } -} diff --git a/cmd/register.go b/cmd/register.go deleted file mode 100644 index 610462f..0000000 --- a/cmd/register.go +++ /dev/null @@ -1,294 +0,0 @@ -package cmd - -import ( - "context" - "crypto/ecdsa" - "encoding/hex" - "math/big" - "path/filepath" - "strings" - - "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" - "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" - eigensdkbls "github.com/Layr-Labs/eigensdk-go/crypto/bls" - eigensdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" - "github.com/Layr-Labs/eigensdk-go/signerv2" - "github.com/consensys/gnark-crypto/ecc/bn254" - regcoord "github.com/eodata/operator-cli/contracts/bindings/EORegistryCoordinator" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/crypto" - "github.com/urfave/cli/v2" -) - -func NewRegisterCommand() *cli.Command { - return &cli.Command{ - Name: "register", - Description: "Register the operator", - Before: setProfile, - Action: runRegister, - Flags: []cli.Flag{ - ProfileFlag, - EthRPCFlag, - EOChainRPCFlag, - RegistryCoordinatorFlag, - EOConfigAddressFlag, - PassphraseFlag, - KeyStorePathFlag, - SaltFlag, - ExpiryFlag, - EcdsaPrivateKeyFlag, - BlsPrivateKeyFlag, - ChainValidatorG1PointSignatureFlag, - ValidatorRoleFlag, - QuorumNumberFlag, - }, - } -} - -func runRegister(c *cli.Context) error { - if (!c.IsSet(PassphraseFlag.Name) || !c.IsSet(KeyStorePathFlag.Name)) && (!c.IsSet(EcdsaPrivateKeyFlag.Name) || !c.IsSet(BlsPrivateKeyFlag.Name)) { - utils.Fatalf("either passphrase and keystore-path or ecdsa-private-key and bls-private-key are required") - } - - ecdsaPair, blsKeyPair, err := getKeys(c) - if err != nil { - return err - } - - ethClient, err := createEthClient(profile.EthRPCEndpoint) - if err != nil { - return err - } - - chainIDBigInt, err := ethClient.ChainID(context.Background()) - if err != nil { - utils.Fatalf("Error getting chainId (%v): %v", profile.EthRPCEndpoint, err) - } - - signerV2, signerAddr, err := signerv2.SignerFromConfig(signerv2.Config{PrivateKey: ecdsaPair}, chainIDBigInt) - if err != nil { - utils.Fatalf("Error creating the register transaction signer for operator %v on Ethereum mainnet/holesky (%v) %v", - crypto.PubkeyToAddress(ecdsaPair.PublicKey), profile.EthRPCEndpoint, err, - ) - } - - saltBytes, err := getSaltBytes(c) - if err != nil { - return err - } - - expiry, err := getExpiry(c) - if err != nil { - return err - } - - avsClient, err := buildAVSClient(ethClient) - if err != nil { - utils.Fatalf("Error creating AVS client %v", err) - } - - g1HashedMsgToSign, err := avsClient.registryCoordinator.PubkeyRegistrationMessageHash(&bind.CallOpts{}, signerAddr) - if err != nil { - utils.Fatalf("Error getting PubkeyRegistrationMessageHash from registryCoordinator contract %v", err) - } - - signedMsg := convertToBN254G1Point( - blsKeyPair.SignHashedToCurveMessage(convertBn254GethToGnark(g1HashedMsgToSign)).G1Point, - ) - G1pubkeyBN254 := convertToBN254G1Point(blsKeyPair.GetPubKeyG1()) - G2pubkeyBN254 := convertToBN254G2Point(blsKeyPair.GetPubKeyG2()) - - pubkeyRegParams := regcoord.IBLSApkRegistryTypesPubkeyRegistrationParams{ - PubkeyRegistrationSignature: signedMsg, - PubkeyG1: G1pubkeyBN254, - PubkeyG2: G2pubkeyBN254, - } - - msgToSign, err := avsClient.elReader.CalculateOperatorAVSRegistrationDigestHash( - context.Background(), - signerAddr, - avsClient.serviceManagerAddr, - saltBytes, - expiry, - ) - if err != nil { - utils.Fatalf( - "Error generating message to sign by operator %v on Ethereum mainnet/Holeskey (%v) using CalculateOperatorAVSRegistrationDigestHash %v", - crypto.PubkeyToAddress(ecdsaPair.PublicKey), - profile.EthRPCEndpoint, - err, - ) - } - - operatorSignature, err := crypto.Sign(msgToSign[:], ecdsaPair) - if err != nil { - utils.Fatalf( - "Error signing the message using CalculateOperatorAVSRegistrationDigestHash for operator %v on Ethereum mainnet/Holeskey (%v) %v", - crypto.PubkeyToAddress(ecdsaPair.PublicKey), - profile.EthRPCEndpoint, - err, - ) - } - - operatorSignature[64] += 27 - operatorSignatureWithSaltAndExpiry := regcoord.ISignatureUtilsMixinTypesSignatureWithSaltAndExpiry{ - Signature: operatorSignature, - Salt: saltBytes, - Expiry: expiry, - } - - txSender, err := wallet.NewPrivateKeyWallet(ethClient, signerV2, signerAddr, logger) - if err != nil { - utils.Fatalf( - "Error creating the register transaction sender for operator %v on Ethereum mainnet/Holesky (%v) %v", - crypto.PubkeyToAddress(ecdsaPair.PublicKey), - profile.EthRPCEndpoint, - err, - ) - } - - address, err := txSender.SenderAddress(context.Background()) - if err != nil { - return err - } - - addr := address.String() - logger.Info("sender address", "address", addr) - - txMgr := txmgr.NewSimpleTxManager(txSender, ethClient, logger, signerAddr) - noSendTxOpts, err := txMgr.GetNoSendTxOpts() - if err != nil { - utils.Fatalf("error creating transaction object %v", err) - } - - noSendTxOpts.GasLimit = 2_000_000 - - tx, err := avsClient.registryCoordinator.RegisterOperator( - noSendTxOpts, - []byte{0}, - "0.0.0.0:0", - pubkeyRegParams, - operatorSignatureWithSaltAndExpiry, - ) - if err != nil { - utils.Fatalf( - "Error creating the register transaction for operator %v on Ethereum mainnet/Holeskey (%v) %v", - crypto.PubkeyToAddress(ecdsaPair.PublicKey), - profile.EthRPCEndpoint, - err, - ) - } - - ctx := context.Background() - receipt, err := txMgr.Send(ctx, tx, true) - if err != nil { - utils.Fatalf( - "register transaction for operator %v on Ethereum mainnet/Holeskey (%v) failed %v", - crypto.PubkeyToAddress(ecdsaPair.PublicKey), - profile, - err, - ) - } - if receipt.Status != 1 { - utils.Fatalf( - "register transaction %v for operator %v on Ethereum mainnet/Holeskey (%v) reverted", - receipt.TxHash.Hex(), - crypto.PubkeyToAddress(ecdsaPair.PublicKey), - profile.EthRPCEndpoint, - ) - } - - logger.Info("successfully registered to eoracle AVS", "address", signerAddr, "tx hash", receipt.TxHash.Hex()) - - return nil -} - -func convertBn254GethToGnark(input regcoord.BN254G1Point) *bn254.G1Affine { - return eigensdkbls.NewG1Point(input.X, input.Y).G1Affine -} - -func convertToBN254G2Point(input *eigensdkbls.G2Point) regcoord.BN254G2Point { - output := regcoord.BN254G2Point{ - X: [2]*big.Int{input.X.A1.BigInt(big.NewInt(0)), input.X.A0.BigInt(big.NewInt(0))}, - Y: [2]*big.Int{input.Y.A1.BigInt(big.NewInt(0)), input.Y.A0.BigInt(big.NewInt(0))}, - } - return output -} -func convertToBN254G1Point(input *eigensdkbls.G1Point) regcoord.BN254G1Point { - output := regcoord.BN254G1Point{ - X: input.X.BigInt(big.NewInt(0)), - Y: input.Y.BigInt(big.NewInt(0)), - } - return output -} - -func getExpiry(c *cli.Context) (*big.Int, error) { - expiry, ok := big.NewInt(0).SetString(c.String(ExpiryFlag.Name), 10) - if !ok { - utils.Fatalf("Invalid expiry") - } - return expiry, nil -} - -func getKeys(c *cli.Context) (*ecdsa.PrivateKey, *eigensdkbls.KeyPair, error) { - var ecdsaPair *ecdsa.PrivateKey - var blsKeyPair *eigensdkbls.KeyPair - var err error - - if !c.IsSet(PassphraseFlag.Name) || !c.IsSet(KeyStorePathFlag.Name) { - ecdsaPair, err = crypto.HexToECDSA(c.String(EcdsaPrivateKeyFlag.Name)) - if err != nil { - utils.Fatalf("Invalid EDCSA private key %v", err) - } - blsKeyPair, err = eigensdkbls.NewKeyPairFromString(c.String(BlsPrivateKeyFlag.Name)) - if err != nil { - utils.Fatalf("Invalid BLS private key %v", err) - } - } else { - ecdsaPair, err = eigensdkecdsa.ReadKey( - filepath.Join(c.String(KeyStorePathFlag.Name), "ecdsaEncryptedWallet.json"), - c.String(PassphraseFlag.Name), - ) - if err != nil { - utils.Fatalf("Failed to read ecdsaEncryptedWallet.json file %v", err) - } - blsKeyPair, err = eigensdkbls.ReadPrivateKeyFromFile( - filepath.Join(c.String(KeyStorePathFlag.Name), "blsEncryptedWallet.json"), - c.String(PassphraseFlag.Name), - ) - if err != nil { - utils.Fatalf("Failed to read blsEncryptedWallet.json file %v", err) - } - } - return ecdsaPair, blsKeyPair, nil -} - -func getSaltBytes(c *cli.Context) ([32]byte, error) { - var saltBytes [32]byte - inputBytes, err := hex.DecodeString(strings.TrimPrefix(c.String(SaltFlag.Name), "0x")) - if err != nil { - utils.Fatalf("Invalid salt %v", err) - } - copy(saltBytes[:], inputBytes) - return saltBytes, nil -} - -func getChainValidatorG1PointSignature(c *cli.Context) (regcoord.BN254G1Point, error) { - chainValidatorG1PointSignature := convertToBN254G1Point(eigensdkbls.NewG1Point(big.NewInt(0), big.NewInt(0))) - if c.String(ValidatorRoleFlag.Name) != "DATA_VALIDATOR" { - if len(c.StringSlice(ChainValidatorG1PointSignatureFlag.Name)) != 2 { - utils.Fatalf("chain-validator-g1-point-signature is required or has too many values") - } - x, ok := new(big.Int).SetString(c.StringSlice(ChainValidatorG1PointSignatureFlag.Name)[0][2:], 16) - if !ok { - utils.Fatalf("Invalid chain-validator-g1-point-signature (x)") - } - y, ok := new(big.Int).SetString(c.StringSlice(ChainValidatorG1PointSignatureFlag.Name)[1][2:], 16) - if !ok { - utils.Fatalf("Invalid chain-validator-g1-point-signature (y)") - } - chainValidatorG1PointSignature = convertToBN254G1Point(eigensdkbls.NewG1Point(x, y)) - } - return chainValidatorG1PointSignature, nil -} diff --git a/cmd/reset_configuration.go b/cmd/reset_configuration.go deleted file mode 100644 index 29abc7a..0000000 --- a/cmd/reset_configuration.go +++ /dev/null @@ -1,137 +0,0 @@ -package cmd - -import ( - "context" - "math/big" - - "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" - "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" - "github.com/Layr-Labs/eigensdk-go/signerv2" - eoconfig "github.com/eodata/operator-cli/contracts/bindings/EOConfig" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/cmd/utils" - gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/urfave/cli/v2" -) - -func NewResetConfigurationCommand() *cli.Command { - return &cli.Command{ - Name: "reset-configuration", - Description: "Reset configuration in eOracle chain", - Before: setProfile, - Action: runResetConfiguration, - Flags: []cli.Flag{ - ProfileFlag, - EthRPCFlag, - EOChainRPCFlag, - EOConfigAddressFlag, - PassphraseFlag, - KeyStorePathFlag, - }, - } -} - -func runResetConfiguration(c *cli.Context) error { - if !c.IsSet(PassphraseFlag.Name) || !c.IsSet(KeyStorePathFlag.Name) { - utils.Fatalf("passphrase and keystore-path are required") - } - - ecdsaOperatorPair, ecdsaAliasPair, err := getOperatorAndAliasKeys(c) - if err != nil { - return err - } - - operatorAddress := crypto.PubkeyToAddress(ecdsaOperatorPair.PublicKey) - operatorAliasAddress := crypto.PubkeyToAddress(ecdsaAliasPair.PublicKey) - - eoChainEthClient, err := createEthClient(c.String(EOChainRPCFlag.Name)) - if err != nil { - return err - } - - contractEOConfig, err := getEOConfigContract(eoChainEthClient) - if err != nil { - return err - } - - operatorAlias, err := contractEOConfig.OperatorToAlias(&bind.CallOpts{Context: context.Background()}, operatorAddress) - if err != nil || operatorAlias == (gethcommon.Address{}) { - utils.Fatalf("Failed to get operator %v alias %v", operatorAddress, err) - } - - logger.Info("operator details", - "operator address", operatorAddress.Hex(), - "alias address", operatorAliasAddress.Hex(), - "operator is EOA", true, - ) - - if operatorAlias != operatorAliasAddress { - utils.Fatalf("Operator (%v) alias (%v) does not match the expected alias (%v), please contact eOracle support", - operatorAddress.Hex(), operatorAlias.Hex(), operatorAliasAddress.Hex()) - } - - balance, err := eoChainEthClient.BalanceAt(context.Background(), operatorAddress, nil) - if err != nil { - utils.Fatalf("Error while getting the operator (%v) balance %v on eoChain", operatorAddress, err) - } - - if balance.Cmp(big.NewInt(500000000000000000)) > 0 { - eochainChainIDBigInt, err := eoChainEthClient.ChainID(context.Background()) - if err != nil { - utils.Fatalf("Error getting chainId (%v): %v", c.String(EOChainRPCFlag.Name), err) - } - - returnBalance := balance.Sub(balance, big.NewInt(500000000000000000)) - signerV2, signerAddr, err := signerv2.SignerFromConfig(signerv2.Config{PrivateKey: ecdsaOperatorPair}, eochainChainIDBigInt) - if err != nil { - utils.Fatalf("Error creating the signer function for operator %v on eoChain (%v) %v", - crypto.PubkeyToAddress(ecdsaOperatorPair.PublicKey), c.String(EOChainRPCFlag.Name), err) - } - - txSender, err := wallet.NewPrivateKeyWallet(eoChainEthClient, signerV2, signerAddr, logger) - if err != nil { - utils.Fatalf("Error creating the transaction sender for operator %v on eoChain (%v) %v", - crypto.PubkeyToAddress(ecdsaOperatorPair.PublicKey), c.String(EOChainRPCFlag.Name), err) - } - txMgr := txmgr.NewSimpleTxManager(txSender, eoChainEthClient, logger, signerAddr) - txOpts, err := txMgr.GetNoSendTxOpts() - if err != nil { - utils.Fatalf("Error generating transaction for resetting eochain gas balance of operator %v on eoChain (%v) %v", - operatorAddress.Hex(), c.String(EOChainRPCFlag.Name), err) - } - txOpts.Value = returnBalance - - contractEOConfigRaw := eoconfig.EOConfigRaw{Contract: contractEOConfig} - tx, err := contractEOConfigRaw.Transfer(txOpts) - if err != nil { - utils.Fatalf("Error reseting the operator %v balance on eochain (%v) %v", operatorAddress.Hex(), c.String(EOChainRPCFlag.Name), err) - } - - ctx := context.Background() - receipt, err := txMgr.Send(ctx, tx, true) - if err != nil { - utils.Fatalf("Error sending the reset balance transaction of operator %v on eochain (%v) %v", - operatorAddress.Hex(), c.String(EOChainRPCFlag.Name), err) - } - - if receipt.Status != 1 { - utils.Fatalf("The transaction %v to reset the operator %v balance on eochain (%v) reverted", - receipt.TxHash.Hex(), operatorAddress.Hex(), c.String(EOChainRPCFlag.Name)) - } - - balance, err = eoChainEthClient.BalanceAt(context.Background(), operatorAddress, nil) - if err != nil { - utils.Fatalf("Error while getting the operator (%v) balance %v on eoChain", operatorAddress, err) - } - } - balanceInEth := new(big.Float).Quo(new(big.Float).SetInt(balance), new(big.Float).SetInt(big.NewInt(1e18))) - logger.Info("Operator balance", "operator address", operatorAddress.Hex(), "balance", balanceInEth.String()) - - return nil -} - -func getEOConfigContract(ethClient *ethclient.Client) (*eoconfig.EOConfig, error) { - return eoconfig.NewEOConfig(profile.EOConfigAddress, ethClient) -} diff --git a/cmd/utils.go b/cmd/utils.go deleted file mode 100644 index e81ad28..0000000 --- a/cmd/utils.go +++ /dev/null @@ -1,141 +0,0 @@ -package cmd - -import ( - "crypto/ecdsa" - "fmt" - "path/filepath" - - "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" - smbase "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ServiceManagerBase" - eigensdkbls "github.com/Layr-Labs/eigensdk-go/crypto/bls" - eigensdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" - regcoord "github.com/eodata/operator-cli/contracts/bindings/EORegistryCoordinator" - stakeregistry "github.com/eodata/operator-cli/contracts/bindings/EOStakeRegistry" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/cmd/utils" - gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/rpc" - "github.com/urfave/cli/v2" -) - -type avsClient struct { - registryCoordinatorAddr gethcommon.Address - serviceManagerAddr gethcommon.Address - delegationManagerAddr gethcommon.Address - avsDirectoryAddr gethcommon.Address - registryCoordinator *regcoord.EORegistryCoordinator - serviceManager *smbase.ContractServiceManagerBase - stakeRegistry *stakeregistry.EOStakeRegistry - elReader *elcontracts.ChainReader -} - -func buildAVSClient( - ethClient *ethclient.Client, -) (*avsClient, error) { - - avsClient := &avsClient{ - registryCoordinatorAddr: profile.RegistryCoordinatorAddress, - } - - registryCoordinator, err := regcoord.NewEORegistryCoordinator( - profile.RegistryCoordinatorAddress, - ethClient, - ) - - if err != nil { - return nil, fmt.Errorf("failed to create RegistryCoordinator contract %v", err) - } - avsClient.registryCoordinator = registryCoordinator - - serviceManagerAddr, err := registryCoordinator.ServiceManager(&bind.CallOpts{}) - if err != nil { - return nil, fmt.Errorf("failed to get ServiceManager from registryCoordinator contract %v", err) - } - avsClient.serviceManagerAddr = serviceManagerAddr - - serviceManager, err := smbase.NewContractServiceManagerBase(serviceManagerAddr, ethClient) - if err != nil { - return nil, fmt.Errorf("failed to create serviceManager contract %v", err) - } - avsClient.serviceManager = serviceManager - - stakeRegistryAddr, err := registryCoordinator.StakeRegistry(&bind.CallOpts{}) - if err != nil { - return nil, fmt.Errorf("failed to get stakeRegistryAddr %v", err) - } - stakeRegistry, err := stakeregistry.NewEOStakeRegistry(stakeRegistryAddr, ethClient) - if err != nil { - return nil, fmt.Errorf("failed to create stakeRegistry contract %v", err) - } - avsClient.stakeRegistry = stakeRegistry - - delegationManagerAddr, err := stakeRegistry.Delegation(&bind.CallOpts{}) - if err != nil { - return nil, fmt.Errorf("failed to get delegationManagerAddr %v", err) - } - avsClient.delegationManagerAddr = delegationManagerAddr - - avsDirectoryAddr, err := serviceManager.AvsDirectory(&bind.CallOpts{}) - if err != nil { - return nil, fmt.Errorf("failed to get avsDirectoryAddr %v", err) - } - avsClient.avsDirectoryAddr = avsDirectoryAddr - - elConfig := elcontracts.Config{ - AvsDirectoryAddress: avsDirectoryAddr, - RewardsCoordinatorAddress: gethcommon.Address{}, - PermissionControllerAddress: gethcommon.Address{}, - DontUseAllocationManager: true, - } - elReader, _, err := elcontracts.BuildReadClients(elConfig, ethClient, logger, nil) - if err != nil { - return nil, fmt.Errorf("failed to create ELChainReader %v", err) - } - avsClient.elReader = elReader - - return avsClient, nil -} - -func createEthClient(rpcEndpoint string) (*ethclient.Client, error) { - rpcClient, err := rpc.Dial(rpcEndpoint) - if err != nil { - utils.Fatalf("failed to create Eth client %v %v", rpcEndpoint, err) - } - return ethclient.NewClient(rpcClient), nil -} - -func getECDSAPrivateKey(c *cli.Context) (*ecdsa.PrivateKey, error) { - if !c.IsSet(PassphraseFlag.Name) { - utils.Fatalf("passphrase is required") - } - if !c.IsSet(KeyStorePathFlag.Name) { - utils.Fatalf("keystore-path is required") - } - if c.IsSet(EcdsaPrivateKeyFlag.Name) { - return crypto.HexToECDSA(c.String(EcdsaPrivateKeyFlag.Name)) - } - return eigensdkecdsa.ReadKey( - filepath.Join(c.String(KeyStorePathFlag.Name), "ecdsaEncryptedWallet.json"), - c.String(PassphraseFlag.Name), - ) -} - -func getBLSPrivateKey(c *cli.Context) (*eigensdkbls.KeyPair, error) { - return eigensdkbls.NewKeyPairFromString(c.String(BlsPrivateKeyFlag.Name)) -} - -func getOperatorAndAliasKeys(c *cli.Context) (*ecdsa.PrivateKey, *ecdsa.PrivateKey, error) { - ecdsaOperatorPair, err := eigensdkecdsa.ReadKey(filepath.Join(c.String(KeyStorePathFlag.Name), "ecdsaEncryptedWallet.json"), c.String(PassphraseFlag.Name)) - if err != nil { - utils.Fatalf("Failed to read ecdsaEncryptedWallet.json file %v", err) - } - - ecdsaAliasPair, err := eigensdkecdsa.ReadKey(filepath.Join(c.String(KeyStorePathFlag.Name), "ecdsaAliasedEncryptedWallet.json"), c.String(PassphraseFlag.Name)) - if err != nil { - utils.Fatalf("Failed to read ecdsaAliasedEncryptedWallet.json file %v", err) - } - - return ecdsaOperatorPair, ecdsaAliasPair, nil -} diff --git a/contracts/abi/AllocationManager.json b/contracts/abi/AllocationManager.json new file mode 100644 index 0000000..9744fb5 --- /dev/null +++ b/contracts/abi/AllocationManager.json @@ -0,0 +1,1884 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_delegation", + "type": "address", + "internalType": "contract IDelegationManager" + }, + { + "name": "_pauserRegistry", + "type": "address", + "internalType": "contract IPauserRegistry" + }, + { + "name": "_permissionController", + "type": "address", + "internalType": "contract IPermissionController" + }, + { + "name": "_DEALLOCATION_DELAY", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_ALLOCATION_CONFIGURATION_DELAY", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "_version", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "ALLOCATION_CONFIGURATION_DELAY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DEALLOCATION_DELAY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addStrategiesToOperatorSet", + "inputs": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSetId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "clearDeallocationQueue", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + }, + { + "name": "numToClear", + "type": "uint16[]", + "internalType": "uint16[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createOperatorSets", + "inputs": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "params", + "type": "tuple[]", + "internalType": "struct IAllocationManagerTypes.CreateSetParams[]", + "components": [ + { + "name": "operatorSetId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "delegation", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IDelegationManager" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deregisterFromOperatorSets", + "inputs": [ + { + "name": "params", + "type": "tuple", + "internalType": "struct IAllocationManagerTypes.DeregisterParams", + "components": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSetIds", + "type": "uint32[]", + "internalType": "uint32[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getAVSRegistrar", + "inputs": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAVSRegistrar" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocatableMagnitude", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "strategy", + "type": "address", + "internalType": "contract IStrategy" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocatedSets", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple[]", + "internalType": "struct OperatorSet[]", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocatedStake", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "operators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[][]", + "internalType": "uint256[][]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocatedStrategies", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "contract IStrategy[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocation", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "strategy", + "type": "address", + "internalType": "contract IStrategy" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IAllocationManagerTypes.Allocation", + "components": [ + { + "name": "currentMagnitude", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "pendingDiff", + "type": "int128", + "internalType": "int128" + }, + { + "name": "effectBlock", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocationDelay", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + }, + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocations", + "inputs": [ + { + "name": "operators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "strategy", + "type": "address", + "internalType": "contract IStrategy" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple[]", + "internalType": "struct IAllocationManagerTypes.Allocation[]", + "components": [ + { + "name": "currentMagnitude", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "pendingDiff", + "type": "int128", + "internalType": "int128" + }, + { + "name": "effectBlock", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getEncumberedMagnitude", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "strategy", + "type": "address", + "internalType": "contract IStrategy" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMaxMagnitude", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "strategy", + "type": "address", + "internalType": "contract IStrategy" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMaxMagnitudes", + "inputs": [ + { + "name": "operators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "strategy", + "type": "address", + "internalType": "contract IStrategy" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64[]", + "internalType": "uint64[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMaxMagnitudes", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64[]", + "internalType": "uint64[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMaxMagnitudesAtBlock", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + }, + { + "name": "blockNumber", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64[]", + "internalType": "uint64[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMemberCount", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMembers", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMinimumSlashableStake", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "operators", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + }, + { + "name": "futureBlock", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [ + { + "name": "slashableStake", + "type": "uint256[][]", + "internalType": "uint256[][]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOperatorSetCount", + "inputs": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRegisteredSets", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple[]", + "internalType": "struct OperatorSet[]", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getStrategiesInOperatorSet", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "contract IStrategy[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getStrategyAllocations", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "strategy", + "type": "address", + "internalType": "contract IStrategy" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple[]", + "internalType": "struct OperatorSet[]", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "", + "type": "tuple[]", + "internalType": "struct IAllocationManagerTypes.Allocation[]", + "components": [ + { + "name": "currentMagnitude", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "pendingDiff", + "type": "int128", + "internalType": "int128" + }, + { + "name": "effectBlock", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "initialOwner", + "type": "address", + "internalType": "address" + }, + { + "name": "initialPausedStatus", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isMemberOfOperatorSet", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isOperatorSet", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isOperatorSlashable", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "modifyAllocations", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "params", + "type": "tuple[]", + "internalType": "struct IAllocationManagerTypes.AllocateParams[]", + "components": [ + { + "name": "operatorSet", + "type": "tuple", + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + }, + { + "name": "newMagnitudes", + "type": "uint64[]", + "internalType": "uint64[]" + } + ] + } + ], + "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": "contract IPauserRegistry" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permissionController", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IPermissionController" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "registerForOperatorSets", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "params", + "type": "tuple", + "internalType": "struct IAllocationManagerTypes.RegisterParams", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSetIds", + "type": "uint32[]", + "internalType": "uint32[]" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeStrategiesFromOperatorSet", + "inputs": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSetId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setAVSRegistrar", + "inputs": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "registrar", + "type": "address", + "internalType": "contract IAVSRegistrar" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setAllocationDelay", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "delay", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "slashOperator", + "inputs": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "params", + "type": "tuple", + "internalType": "struct IAllocationManagerTypes.SlashingParams", + "components": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "operatorSetId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "strategies", + "type": "address[]", + "internalType": "contract IStrategy[]" + }, + { + "name": "wadsToSlash", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "description", + "type": "string", + "internalType": "string" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "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": "updateAVSMetadataURI", + "inputs": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "metadataURI", + "type": "string", + "internalType": "string" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "AVSMetadataURIUpdated", + "inputs": [ + { + "name": "avs", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "metadataURI", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AVSRegistrarSet", + "inputs": [ + { + "name": "avs", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "registrar", + "type": "address", + "indexed": false, + "internalType": "contract IAVSRegistrar" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AllocationDelaySet", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "delay", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "effectBlock", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AllocationUpdated", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "operatorSet", + "type": "tuple", + "indexed": false, + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "strategy", + "type": "address", + "indexed": false, + "internalType": "contract IStrategy" + }, + { + "name": "magnitude", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "effectBlock", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EncumberedMagnitudeUpdated", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "strategy", + "type": "address", + "indexed": false, + "internalType": "contract IStrategy" + }, + { + "name": "encumberedMagnitude", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MaxMagnitudeUpdated", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "strategy", + "type": "address", + "indexed": false, + "internalType": "contract IStrategy" + }, + { + "name": "maxMagnitude", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorAddedToOperatorSet", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "operatorSet", + "type": "tuple", + "indexed": false, + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorRemovedFromOperatorSet", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "operatorSet", + "type": "tuple", + "indexed": false, + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorSetCreated", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "indexed": false, + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorSlashed", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "operatorSet", + "type": "tuple", + "indexed": false, + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "strategies", + "type": "address[]", + "indexed": false, + "internalType": "contract IStrategy[]" + }, + { + "name": "wadSlashed", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "description", + "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": "StrategyAddedToOperatorSet", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "indexed": false, + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "strategy", + "type": "address", + "indexed": false, + "internalType": "contract IStrategy" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StrategyRemovedFromOperatorSet", + "inputs": [ + { + "name": "operatorSet", + "type": "tuple", + "indexed": false, + "internalType": "struct OperatorSet", + "components": [ + { + "name": "avs", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "strategy", + "type": "address", + "indexed": false, + "internalType": "contract IStrategy" + } + ], + "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 + }, + { + "type": "error", + "name": "AlreadyMemberOfSet", + "inputs": [] + }, + { + "type": "error", + "name": "CurrentlyPaused", + "inputs": [] + }, + { + "type": "error", + "name": "Empty", + "inputs": [] + }, + { + "type": "error", + "name": "InputAddressZero", + "inputs": [] + }, + { + "type": "error", + "name": "InputArrayLengthMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientMagnitude", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidAVSRegistrar", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidCaller", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidNewPausedStatus", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidOperator", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidOperatorSet", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPermissions", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidShortString", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSnapshotOrdering", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidWadToSlash", + "inputs": [] + }, + { + "type": "error", + "name": "ModificationAlreadyPending", + "inputs": [] + }, + { + "type": "error", + "name": "NonexistentAVSMetadata", + "inputs": [] + }, + { + "type": "error", + "name": "NotMemberOfSet", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyPauser", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyUnpauser", + "inputs": [] + }, + { + "type": "error", + "name": "OperatorNotSlashable", + "inputs": [] + }, + { + "type": "error", + "name": "OutOfBounds", + "inputs": [] + }, + { + "type": "error", + "name": "SameMagnitude", + "inputs": [] + }, + { + "type": "error", + "name": "StrategiesMustBeInAscendingOrder", + "inputs": [] + }, + { + "type": "error", + "name": "StrategyAlreadyInOperatorSet", + "inputs": [] + }, + { + "type": "error", + "name": "StrategyNotInOperatorSet", + "inputs": [] + }, + { + "type": "error", + "name": "StringTooLong", + "inputs": [ + { + "name": "str", + "type": "string", + "internalType": "string" + } + ] + }, + { + "type": "error", + "name": "UninitializedAllocationDelay", + "inputs": [] + } +] diff --git a/contracts/abi/IBLSApkRegistry.json b/contracts/abi/IBLSApkRegistry.json new file mode 100644 index 0000000..2125e85 --- /dev/null +++ b/contracts/abi/IBLSApkRegistry.json @@ -0,0 +1,816 @@ +[ + { + "type": "function", + "name": "apkHistory", + "inputs": [ + { + "name": "quorumNumber", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes24", + "internalType": "bytes24" + }, + { + "name": "", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "currentApk", + "inputs": [ + { + "name": "quorumNumber", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "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": "struct BN254.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": "struct IBLSApkRegistryTypes.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": "operator", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOperatorId", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "operatorId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOperatorPubkeyG2", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct BN254.G2Point", + "components": [ + { + "name": "X", + "type": "uint256[2]", + "internalType": "uint256[2]" + }, + { + "name": "Y", + "type": "uint256[2]", + "internalType": "uint256[2]" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOrRegisterOperatorId", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "params", + "type": "tuple", + "internalType": "struct IBLSApkRegistryTypes.PubkeyRegistrationParams", + "components": [ + { + "name": "pubkeyRegistrationSignature", + "type": "tuple", + "internalType": "struct BN254.G1Point", + "components": [ + { + "name": "X", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "Y", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "pubkeyG1", + "type": "tuple", + "internalType": "struct BN254.G1Point", + "components": [ + { + "name": "X", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "Y", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "pubkeyG2", + "type": "tuple", + "internalType": "struct BN254.G2Point", + "components": [ + { + "name": "X", + "type": "uint256[2]", + "internalType": "uint256[2]" + }, + { + "name": "Y", + "type": "uint256[2]", + "internalType": "uint256[2]" + } + ] + } + ] + }, + { + "name": "pubkeyRegistrationMessageHash", + "type": "tuple", + "internalType": "struct BN254.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": "getRegisteredPubkey", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct BN254.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": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "operatorToPubkeyHash", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "operatorId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pubkeyHashToOperator", + "inputs": [ + { + "name": "pubkeyHash", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "registerBLSPublicKey", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "params", + "type": "tuple", + "internalType": "struct IBLSApkRegistryTypes.PubkeyRegistrationParams", + "components": [ + { + "name": "pubkeyRegistrationSignature", + "type": "tuple", + "internalType": "struct BN254.G1Point", + "components": [ + { + "name": "X", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "Y", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "pubkeyG1", + "type": "tuple", + "internalType": "struct BN254.G1Point", + "components": [ + { + "name": "X", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "Y", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "pubkeyG2", + "type": "tuple", + "internalType": "struct BN254.G2Point", + "components": [ + { + "name": "X", + "type": "uint256[2]", + "internalType": "uint256[2]" + }, + { + "name": "Y", + "type": "uint256[2]", + "internalType": "uint256[2]" + } + ] + } + ] + }, + { + "name": "pubkeyRegistrationMessageHash", + "type": "tuple", + "internalType": "struct BN254.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": "NewG2PubkeyRegistration", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "pubkeyG2", + "type": "tuple", + "indexed": false, + "internalType": "struct BN254.G2Point", + "components": [ + { + "name": "X", + "type": "uint256[2]", + "internalType": "uint256[2]" + }, + { + "name": "Y", + "type": "uint256[2]", + "internalType": "uint256[2]" + } + ] + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NewPubkeyRegistration", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "pubkeyG1", + "type": "tuple", + "indexed": false, + "internalType": "struct BN254.G1Point", + "components": [ + { + "name": "X", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "Y", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "pubkeyG2", + "type": "tuple", + "indexed": false, + "internalType": "struct BN254.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": "operatorId", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "quorumNumbers", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorRemovedFromQuorums", + "inputs": [ + { + "name": "operator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "operatorId", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "quorumNumbers", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "BLSPubkeyAlreadyRegistered", + "inputs": [] + }, + { + "type": "error", + "name": "BlockNumberBeforeFirstUpdate", + "inputs": [] + }, + { + "type": "error", + "name": "BlockNumberNotLatest", + "inputs": [] + }, + { + "type": "error", + "name": "BlockNumberTooRecent", + "inputs": [] + }, + { + "type": "error", + "name": "G2PubkeyAlreadySet", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBLSSignatureOrPrivateKey", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyRegistryCoordinator", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyRegistryCoordinatorOwner", + "inputs": [] + }, + { + "type": "error", + "name": "OperatorAlreadyRegistered", + "inputs": [] + }, + { + "type": "error", + "name": "OperatorNotRegistered", + "inputs": [] + }, + { + "type": "error", + "name": "QuorumAlreadyExists", + "inputs": [] + }, + { + "type": "error", + "name": "QuorumDoesNotExist", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroPubKey", + "inputs": [] + } +] diff --git a/contracts/bindings/AllocationManager/binding.go b/contracts/bindings/AllocationManager/binding.go new file mode 100644 index 0000000..4fcb5a5 --- /dev/null +++ b/contracts/bindings/AllocationManager/binding.go @@ -0,0 +1,3816 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contractEOAllocationManager + +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 +) + +// IAllocationManagerTypesAllocateParams is an auto generated low-level Go binding around an user-defined struct. +type IAllocationManagerTypesAllocateParams struct { + OperatorSet OperatorSet + Strategies []common.Address + NewMagnitudes []uint64 +} + +// IAllocationManagerTypesAllocation is an auto generated low-level Go binding around an user-defined struct. +type IAllocationManagerTypesAllocation struct { + CurrentMagnitude uint64 + PendingDiff *big.Int + EffectBlock uint32 +} + +// IAllocationManagerTypesCreateSetParams is an auto generated low-level Go binding around an user-defined struct. +type IAllocationManagerTypesCreateSetParams struct { + OperatorSetId uint32 + Strategies []common.Address +} + +// IAllocationManagerTypesDeregisterParams is an auto generated low-level Go binding around an user-defined struct. +type IAllocationManagerTypesDeregisterParams struct { + Operator common.Address + Avs common.Address + OperatorSetIds []uint32 +} + +// IAllocationManagerTypesRegisterParams is an auto generated low-level Go binding around an user-defined struct. +type IAllocationManagerTypesRegisterParams struct { + Avs common.Address + OperatorSetIds []uint32 + Data []byte +} + +// IAllocationManagerTypesSlashingParams is an auto generated low-level Go binding around an user-defined struct. +type IAllocationManagerTypesSlashingParams struct { + Operator common.Address + OperatorSetId uint32 + Strategies []common.Address + WadsToSlash []*big.Int + Description string +} + +// OperatorSet is an auto generated low-level Go binding around an user-defined struct. +type OperatorSet struct { + Avs common.Address + Id uint32 +} + +// AllocationManagerMetaData contains all meta data concerning the AllocationManager contract. +var AllocationManagerMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_delegation\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_DEALLOCATION_DELAY\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_ALLOCATION_CONFIGURATION_DELAY\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ALLOCATION_CONFIGURATION_DELAY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEALLOCATION_DELAY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addStrategiesToOperatorSet\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"clearDeallocationQueue\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"numToClear\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createOperatorSets\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.CreateSetParams[]\",\"components\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"delegation\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deregisterFromOperatorSets\",\"inputs\":[{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.DeregisterParams\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetIds\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getAVSRegistrar\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatableMagnitude\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedSets\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedStake\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocatedStrategies\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocation\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.Allocation\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocationDelay\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAllocations\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.Allocation[]\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getEncumberedMagnitude\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitude\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudes\",\"inputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudes\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxMagnitudesAtBlock\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"blockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMemberCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMembers\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMinimumSlashableStake\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"futureBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"slashableStake\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetCount\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRegisteredSets\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStrategiesInOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStrategyAllocations\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structOperatorSet[]\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.Allocation[]\",\"components\":[{\"name\":\"currentMagnitude\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"pendingDiff\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"initialOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isMemberOfOperatorSet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperatorSlashable\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"modifyAllocations\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple[]\",\"internalType\":\"structIAllocationManagerTypes.AllocateParams[]\",\"components\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"newMagnitudes\",\"type\":\"uint64[]\",\"internalType\":\"uint64[]\"}]}],\"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\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerForOperatorSets\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.RegisterParams\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetIds\",\"type\":\"uint32[]\",\"internalType\":\"uint32[]\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeStrategiesFromOperatorSet\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAVSRegistrar\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"registrar\",\"type\":\"address\",\"internalType\":\"contractIAVSRegistrar\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setAllocationDelay\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"delay\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashOperator\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIAllocationManagerTypes.SlashingParams\",\"components\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"strategies\",\"type\":\"address[]\",\"internalType\":\"contractIStrategy[]\"},{\"name\":\"wadsToSlash\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"description\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"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\":\"updateAVSMetadataURI\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AVSMetadataURIUpdated\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"metadataURI\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AVSRegistrarSet\",\"inputs\":[{\"name\":\"avs\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"registrar\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIAVSRegistrar\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AllocationDelaySet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"delay\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"AllocationUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"magnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"effectBlock\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EncumberedMagnitudeUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"encumberedMagnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxMagnitudeUpdated\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"},{\"name\":\"maxMagnitude\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorAddedToOperatorSet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRemovedFromOperatorSet\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetCreated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategies\",\"type\":\"address[]\",\"indexed\":false,\"internalType\":\"contractIStrategy[]\"},{\"name\":\"wadSlashed\",\"type\":\"uint256[]\",\"indexed\":false,\"internalType\":\"uint256[]\"},{\"name\":\"description\",\"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\":\"StrategyAddedToOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StrategyRemovedFromOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"strategy\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIStrategy\"}],\"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},{\"type\":\"error\",\"name\":\"AlreadyMemberOfSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Empty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientMagnitude\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidAVSRegistrar\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCaller\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSnapshotOrdering\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidWadToSlash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ModificationAlreadyPending\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NonexistentAVSMetadata\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotMemberOfSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorNotSlashable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OutOfBounds\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SameMagnitude\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategiesMustBeInAscendingOrder\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyAlreadyInOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StrategyNotInOperatorSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"UninitializedAllocationDelay\",\"inputs\":[]}]", +} + +// AllocationManagerABI is the input ABI used to generate the binding from. +// Deprecated: Use AllocationManagerMetaData.ABI instead. +var AllocationManagerABI = AllocationManagerMetaData.ABI + +// AllocationManager is an auto generated Go binding around an Ethereum contract. +type AllocationManager struct { + AllocationManagerCaller // Read-only binding to the contract + AllocationManagerTransactor // Write-only binding to the contract + AllocationManagerFilterer // Log filterer for contract events +} + +// AllocationManagerCaller is an auto generated read-only Go binding around an Ethereum contract. +type AllocationManagerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AllocationManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AllocationManagerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AllocationManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AllocationManagerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AllocationManagerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type AllocationManagerSession struct { + Contract *AllocationManager // 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 +} + +// AllocationManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type AllocationManagerCallerSession struct { + Contract *AllocationManagerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// AllocationManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type AllocationManagerTransactorSession struct { + Contract *AllocationManagerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AllocationManagerRaw is an auto generated low-level Go binding around an Ethereum contract. +type AllocationManagerRaw struct { + Contract *AllocationManager // Generic contract binding to access the raw methods on +} + +// AllocationManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AllocationManagerCallerRaw struct { + Contract *AllocationManagerCaller // Generic read-only contract binding to access the raw methods on +} + +// AllocationManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AllocationManagerTransactorRaw struct { + Contract *AllocationManagerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewAllocationManager creates a new instance of AllocationManager, bound to a specific deployed contract. +func NewAllocationManager(address common.Address, backend bind.ContractBackend) (*AllocationManager, error) { + contract, err := bindAllocationManager(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &AllocationManager{AllocationManagerCaller: AllocationManagerCaller{contract: contract}, AllocationManagerTransactor: AllocationManagerTransactor{contract: contract}, AllocationManagerFilterer: AllocationManagerFilterer{contract: contract}}, nil +} + +// NewAllocationManagerCaller creates a new read-only instance of AllocationManager, bound to a specific deployed contract. +func NewAllocationManagerCaller(address common.Address, caller bind.ContractCaller) (*AllocationManagerCaller, error) { + contract, err := bindAllocationManager(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AllocationManagerCaller{contract: contract}, nil +} + +// NewAllocationManagerTransactor creates a new write-only instance of AllocationManager, bound to a specific deployed contract. +func NewAllocationManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*AllocationManagerTransactor, error) { + contract, err := bindAllocationManager(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AllocationManagerTransactor{contract: contract}, nil +} + +// NewAllocationManagerFilterer creates a new log filterer instance of AllocationManager, bound to a specific deployed contract. +func NewAllocationManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*AllocationManagerFilterer, error) { + contract, err := bindAllocationManager(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AllocationManagerFilterer{contract: contract}, nil +} + +// bindAllocationManager binds a generic wrapper to an already deployed contract. +func bindAllocationManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := AllocationManagerMetaData.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 (_AllocationManager *AllocationManagerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AllocationManager.Contract.AllocationManagerCaller.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 (_AllocationManager *AllocationManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AllocationManager.Contract.AllocationManagerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AllocationManager *AllocationManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AllocationManager.Contract.AllocationManagerTransactor.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 (_AllocationManager *AllocationManagerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AllocationManager.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 (_AllocationManager *AllocationManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AllocationManager.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AllocationManager *AllocationManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AllocationManager.Contract.contract.Transact(opts, method, params...) +} + +// ALLOCATIONCONFIGURATIONDELAY is a free data retrieval call binding the contract method 0x7bc1ef61. +// +// Solidity: function ALLOCATION_CONFIGURATION_DELAY() view returns(uint32) +func (_AllocationManager *AllocationManagerCaller) ALLOCATIONCONFIGURATIONDELAY(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "ALLOCATION_CONFIGURATION_DELAY") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// ALLOCATIONCONFIGURATIONDELAY is a free data retrieval call binding the contract method 0x7bc1ef61. +// +// Solidity: function ALLOCATION_CONFIGURATION_DELAY() view returns(uint32) +func (_AllocationManager *AllocationManagerSession) ALLOCATIONCONFIGURATIONDELAY() (uint32, error) { + return _AllocationManager.Contract.ALLOCATIONCONFIGURATIONDELAY(&_AllocationManager.CallOpts) +} + +// ALLOCATIONCONFIGURATIONDELAY is a free data retrieval call binding the contract method 0x7bc1ef61. +// +// Solidity: function ALLOCATION_CONFIGURATION_DELAY() view returns(uint32) +func (_AllocationManager *AllocationManagerCallerSession) ALLOCATIONCONFIGURATIONDELAY() (uint32, error) { + return _AllocationManager.Contract.ALLOCATIONCONFIGURATIONDELAY(&_AllocationManager.CallOpts) +} + +// DEALLOCATIONDELAY is a free data retrieval call binding the contract method 0x2981eb77. +// +// Solidity: function DEALLOCATION_DELAY() view returns(uint32) +func (_AllocationManager *AllocationManagerCaller) DEALLOCATIONDELAY(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "DEALLOCATION_DELAY") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// DEALLOCATIONDELAY is a free data retrieval call binding the contract method 0x2981eb77. +// +// Solidity: function DEALLOCATION_DELAY() view returns(uint32) +func (_AllocationManager *AllocationManagerSession) DEALLOCATIONDELAY() (uint32, error) { + return _AllocationManager.Contract.DEALLOCATIONDELAY(&_AllocationManager.CallOpts) +} + +// DEALLOCATIONDELAY is a free data retrieval call binding the contract method 0x2981eb77. +// +// Solidity: function DEALLOCATION_DELAY() view returns(uint32) +func (_AllocationManager *AllocationManagerCallerSession) DEALLOCATIONDELAY() (uint32, error) { + return _AllocationManager.Contract.DEALLOCATIONDELAY(&_AllocationManager.CallOpts) +} + +// Delegation is a free data retrieval call binding the contract method 0xdf5cf723. +// +// Solidity: function delegation() view returns(address) +func (_AllocationManager *AllocationManagerCaller) Delegation(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _AllocationManager.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 (_AllocationManager *AllocationManagerSession) Delegation() (common.Address, error) { + return _AllocationManager.Contract.Delegation(&_AllocationManager.CallOpts) +} + +// Delegation is a free data retrieval call binding the contract method 0xdf5cf723. +// +// Solidity: function delegation() view returns(address) +func (_AllocationManager *AllocationManagerCallerSession) Delegation() (common.Address, error) { + return _AllocationManager.Contract.Delegation(&_AllocationManager.CallOpts) +} + +// GetAVSRegistrar is a free data retrieval call binding the contract method 0x304c10cd. +// +// Solidity: function getAVSRegistrar(address avs) view returns(address) +func (_AllocationManager *AllocationManagerCaller) GetAVSRegistrar(opts *bind.CallOpts, avs common.Address) (common.Address, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getAVSRegistrar", avs) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetAVSRegistrar is a free data retrieval call binding the contract method 0x304c10cd. +// +// Solidity: function getAVSRegistrar(address avs) view returns(address) +func (_AllocationManager *AllocationManagerSession) GetAVSRegistrar(avs common.Address) (common.Address, error) { + return _AllocationManager.Contract.GetAVSRegistrar(&_AllocationManager.CallOpts, avs) +} + +// GetAVSRegistrar is a free data retrieval call binding the contract method 0x304c10cd. +// +// Solidity: function getAVSRegistrar(address avs) view returns(address) +func (_AllocationManager *AllocationManagerCallerSession) GetAVSRegistrar(avs common.Address) (common.Address, error) { + return _AllocationManager.Contract.GetAVSRegistrar(&_AllocationManager.CallOpts, avs) +} + +// GetAllocatableMagnitude is a free data retrieval call binding the contract method 0x6cfb4481. +// +// Solidity: function getAllocatableMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerCaller) GetAllocatableMagnitude(opts *bind.CallOpts, operator common.Address, strategy common.Address) (uint64, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getAllocatableMagnitude", operator, strategy) + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// GetAllocatableMagnitude is a free data retrieval call binding the contract method 0x6cfb4481. +// +// Solidity: function getAllocatableMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerSession) GetAllocatableMagnitude(operator common.Address, strategy common.Address) (uint64, error) { + return _AllocationManager.Contract.GetAllocatableMagnitude(&_AllocationManager.CallOpts, operator, strategy) +} + +// GetAllocatableMagnitude is a free data retrieval call binding the contract method 0x6cfb4481. +// +// Solidity: function getAllocatableMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerCallerSession) GetAllocatableMagnitude(operator common.Address, strategy common.Address) (uint64, error) { + return _AllocationManager.Contract.GetAllocatableMagnitude(&_AllocationManager.CallOpts, operator, strategy) +} + +// GetAllocatedSets is a free data retrieval call binding the contract method 0x15fe5028. +// +// Solidity: function getAllocatedSets(address operator) view returns((address,uint32)[]) +func (_AllocationManager *AllocationManagerCaller) GetAllocatedSets(opts *bind.CallOpts, operator common.Address) ([]OperatorSet, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getAllocatedSets", operator) + + if err != nil { + return *new([]OperatorSet), err + } + + out0 := *abi.ConvertType(out[0], new([]OperatorSet)).(*[]OperatorSet) + + return out0, err + +} + +// GetAllocatedSets is a free data retrieval call binding the contract method 0x15fe5028. +// +// Solidity: function getAllocatedSets(address operator) view returns((address,uint32)[]) +func (_AllocationManager *AllocationManagerSession) GetAllocatedSets(operator common.Address) ([]OperatorSet, error) { + return _AllocationManager.Contract.GetAllocatedSets(&_AllocationManager.CallOpts, operator) +} + +// GetAllocatedSets is a free data retrieval call binding the contract method 0x15fe5028. +// +// Solidity: function getAllocatedSets(address operator) view returns((address,uint32)[]) +func (_AllocationManager *AllocationManagerCallerSession) GetAllocatedSets(operator common.Address) ([]OperatorSet, error) { + return _AllocationManager.Contract.GetAllocatedSets(&_AllocationManager.CallOpts, operator) +} + +// GetAllocatedStake is a free data retrieval call binding the contract method 0x2b453a9a. +// +// Solidity: function getAllocatedStake((address,uint32) operatorSet, address[] operators, address[] strategies) view returns(uint256[][]) +func (_AllocationManager *AllocationManagerCaller) GetAllocatedStake(opts *bind.CallOpts, operatorSet OperatorSet, operators []common.Address, strategies []common.Address) ([][]*big.Int, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getAllocatedStake", operatorSet, operators, strategies) + + if err != nil { + return *new([][]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([][]*big.Int)).(*[][]*big.Int) + + return out0, err + +} + +// GetAllocatedStake is a free data retrieval call binding the contract method 0x2b453a9a. +// +// Solidity: function getAllocatedStake((address,uint32) operatorSet, address[] operators, address[] strategies) view returns(uint256[][]) +func (_AllocationManager *AllocationManagerSession) GetAllocatedStake(operatorSet OperatorSet, operators []common.Address, strategies []common.Address) ([][]*big.Int, error) { + return _AllocationManager.Contract.GetAllocatedStake(&_AllocationManager.CallOpts, operatorSet, operators, strategies) +} + +// GetAllocatedStake is a free data retrieval call binding the contract method 0x2b453a9a. +// +// Solidity: function getAllocatedStake((address,uint32) operatorSet, address[] operators, address[] strategies) view returns(uint256[][]) +func (_AllocationManager *AllocationManagerCallerSession) GetAllocatedStake(operatorSet OperatorSet, operators []common.Address, strategies []common.Address) ([][]*big.Int, error) { + return _AllocationManager.Contract.GetAllocatedStake(&_AllocationManager.CallOpts, operatorSet, operators, strategies) +} + +// GetAllocatedStrategies is a free data retrieval call binding the contract method 0xc221d8ae. +// +// Solidity: function getAllocatedStrategies(address operator, (address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerCaller) GetAllocatedStrategies(opts *bind.CallOpts, operator common.Address, operatorSet OperatorSet) ([]common.Address, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getAllocatedStrategies", operator, operatorSet) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetAllocatedStrategies is a free data retrieval call binding the contract method 0xc221d8ae. +// +// Solidity: function getAllocatedStrategies(address operator, (address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerSession) GetAllocatedStrategies(operator common.Address, operatorSet OperatorSet) ([]common.Address, error) { + return _AllocationManager.Contract.GetAllocatedStrategies(&_AllocationManager.CallOpts, operator, operatorSet) +} + +// GetAllocatedStrategies is a free data retrieval call binding the contract method 0xc221d8ae. +// +// Solidity: function getAllocatedStrategies(address operator, (address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerCallerSession) GetAllocatedStrategies(operator common.Address, operatorSet OperatorSet) ([]common.Address, error) { + return _AllocationManager.Contract.GetAllocatedStrategies(&_AllocationManager.CallOpts, operator, operatorSet) +} + +// GetAllocation is a free data retrieval call binding the contract method 0x10e1b9b8. +// +// Solidity: function getAllocation(address operator, (address,uint32) operatorSet, address strategy) view returns((uint64,int128,uint32)) +func (_AllocationManager *AllocationManagerCaller) GetAllocation(opts *bind.CallOpts, operator common.Address, operatorSet OperatorSet, strategy common.Address) (IAllocationManagerTypesAllocation, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getAllocation", operator, operatorSet, strategy) + + if err != nil { + return *new(IAllocationManagerTypesAllocation), err + } + + out0 := *abi.ConvertType(out[0], new(IAllocationManagerTypesAllocation)).(*IAllocationManagerTypesAllocation) + + return out0, err + +} + +// GetAllocation is a free data retrieval call binding the contract method 0x10e1b9b8. +// +// Solidity: function getAllocation(address operator, (address,uint32) operatorSet, address strategy) view returns((uint64,int128,uint32)) +func (_AllocationManager *AllocationManagerSession) GetAllocation(operator common.Address, operatorSet OperatorSet, strategy common.Address) (IAllocationManagerTypesAllocation, error) { + return _AllocationManager.Contract.GetAllocation(&_AllocationManager.CallOpts, operator, operatorSet, strategy) +} + +// GetAllocation is a free data retrieval call binding the contract method 0x10e1b9b8. +// +// Solidity: function getAllocation(address operator, (address,uint32) operatorSet, address strategy) view returns((uint64,int128,uint32)) +func (_AllocationManager *AllocationManagerCallerSession) GetAllocation(operator common.Address, operatorSet OperatorSet, strategy common.Address) (IAllocationManagerTypesAllocation, error) { + return _AllocationManager.Contract.GetAllocation(&_AllocationManager.CallOpts, operator, operatorSet, strategy) +} + +// GetAllocationDelay is a free data retrieval call binding the contract method 0xb9fbaed1. +// +// Solidity: function getAllocationDelay(address operator) view returns(bool, uint32) +func (_AllocationManager *AllocationManagerCaller) GetAllocationDelay(opts *bind.CallOpts, operator common.Address) (bool, uint32, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getAllocationDelay", operator) + + if err != nil { + return *new(bool), *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new(uint32)).(*uint32) + + return out0, out1, err + +} + +// GetAllocationDelay is a free data retrieval call binding the contract method 0xb9fbaed1. +// +// Solidity: function getAllocationDelay(address operator) view returns(bool, uint32) +func (_AllocationManager *AllocationManagerSession) GetAllocationDelay(operator common.Address) (bool, uint32, error) { + return _AllocationManager.Contract.GetAllocationDelay(&_AllocationManager.CallOpts, operator) +} + +// GetAllocationDelay is a free data retrieval call binding the contract method 0xb9fbaed1. +// +// Solidity: function getAllocationDelay(address operator) view returns(bool, uint32) +func (_AllocationManager *AllocationManagerCallerSession) GetAllocationDelay(operator common.Address) (bool, uint32, error) { + return _AllocationManager.Contract.GetAllocationDelay(&_AllocationManager.CallOpts, operator) +} + +// GetAllocations is a free data retrieval call binding the contract method 0x8ce64854. +// +// Solidity: function getAllocations(address[] operators, (address,uint32) operatorSet, address strategy) view returns((uint64,int128,uint32)[]) +func (_AllocationManager *AllocationManagerCaller) GetAllocations(opts *bind.CallOpts, operators []common.Address, operatorSet OperatorSet, strategy common.Address) ([]IAllocationManagerTypesAllocation, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getAllocations", operators, operatorSet, strategy) + + if err != nil { + return *new([]IAllocationManagerTypesAllocation), err + } + + out0 := *abi.ConvertType(out[0], new([]IAllocationManagerTypesAllocation)).(*[]IAllocationManagerTypesAllocation) + + return out0, err + +} + +// GetAllocations is a free data retrieval call binding the contract method 0x8ce64854. +// +// Solidity: function getAllocations(address[] operators, (address,uint32) operatorSet, address strategy) view returns((uint64,int128,uint32)[]) +func (_AllocationManager *AllocationManagerSession) GetAllocations(operators []common.Address, operatorSet OperatorSet, strategy common.Address) ([]IAllocationManagerTypesAllocation, error) { + return _AllocationManager.Contract.GetAllocations(&_AllocationManager.CallOpts, operators, operatorSet, strategy) +} + +// GetAllocations is a free data retrieval call binding the contract method 0x8ce64854. +// +// Solidity: function getAllocations(address[] operators, (address,uint32) operatorSet, address strategy) view returns((uint64,int128,uint32)[]) +func (_AllocationManager *AllocationManagerCallerSession) GetAllocations(operators []common.Address, operatorSet OperatorSet, strategy common.Address) ([]IAllocationManagerTypesAllocation, error) { + return _AllocationManager.Contract.GetAllocations(&_AllocationManager.CallOpts, operators, operatorSet, strategy) +} + +// GetEncumberedMagnitude is a free data retrieval call binding the contract method 0xf605ce08. +// +// Solidity: function getEncumberedMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerCaller) GetEncumberedMagnitude(opts *bind.CallOpts, operator common.Address, strategy common.Address) (uint64, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getEncumberedMagnitude", operator, strategy) + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// GetEncumberedMagnitude is a free data retrieval call binding the contract method 0xf605ce08. +// +// Solidity: function getEncumberedMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerSession) GetEncumberedMagnitude(operator common.Address, strategy common.Address) (uint64, error) { + return _AllocationManager.Contract.GetEncumberedMagnitude(&_AllocationManager.CallOpts, operator, strategy) +} + +// GetEncumberedMagnitude is a free data retrieval call binding the contract method 0xf605ce08. +// +// Solidity: function getEncumberedMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerCallerSession) GetEncumberedMagnitude(operator common.Address, strategy common.Address) (uint64, error) { + return _AllocationManager.Contract.GetEncumberedMagnitude(&_AllocationManager.CallOpts, operator, strategy) +} + +// GetMaxMagnitude is a free data retrieval call binding the contract method 0xa9333ec8. +// +// Solidity: function getMaxMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerCaller) GetMaxMagnitude(opts *bind.CallOpts, operator common.Address, strategy common.Address) (uint64, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getMaxMagnitude", operator, strategy) + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// GetMaxMagnitude is a free data retrieval call binding the contract method 0xa9333ec8. +// +// Solidity: function getMaxMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerSession) GetMaxMagnitude(operator common.Address, strategy common.Address) (uint64, error) { + return _AllocationManager.Contract.GetMaxMagnitude(&_AllocationManager.CallOpts, operator, strategy) +} + +// GetMaxMagnitude is a free data retrieval call binding the contract method 0xa9333ec8. +// +// Solidity: function getMaxMagnitude(address operator, address strategy) view returns(uint64) +func (_AllocationManager *AllocationManagerCallerSession) GetMaxMagnitude(operator common.Address, strategy common.Address) (uint64, error) { + return _AllocationManager.Contract.GetMaxMagnitude(&_AllocationManager.CallOpts, operator, strategy) +} + +// GetMaxMagnitudes is a free data retrieval call binding the contract method 0x4a10ffe5. +// +// Solidity: function getMaxMagnitudes(address[] operators, address strategy) view returns(uint64[]) +func (_AllocationManager *AllocationManagerCaller) GetMaxMagnitudes(opts *bind.CallOpts, operators []common.Address, strategy common.Address) ([]uint64, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getMaxMagnitudes", operators, strategy) + + if err != nil { + return *new([]uint64), err + } + + out0 := *abi.ConvertType(out[0], new([]uint64)).(*[]uint64) + + return out0, err + +} + +// GetMaxMagnitudes is a free data retrieval call binding the contract method 0x4a10ffe5. +// +// Solidity: function getMaxMagnitudes(address[] operators, address strategy) view returns(uint64[]) +func (_AllocationManager *AllocationManagerSession) GetMaxMagnitudes(operators []common.Address, strategy common.Address) ([]uint64, error) { + return _AllocationManager.Contract.GetMaxMagnitudes(&_AllocationManager.CallOpts, operators, strategy) +} + +// GetMaxMagnitudes is a free data retrieval call binding the contract method 0x4a10ffe5. +// +// Solidity: function getMaxMagnitudes(address[] operators, address strategy) view returns(uint64[]) +func (_AllocationManager *AllocationManagerCallerSession) GetMaxMagnitudes(operators []common.Address, strategy common.Address) ([]uint64, error) { + return _AllocationManager.Contract.GetMaxMagnitudes(&_AllocationManager.CallOpts, operators, strategy) +} + +// GetMaxMagnitudes0 is a free data retrieval call binding the contract method 0x547afb87. +// +// Solidity: function getMaxMagnitudes(address operator, address[] strategies) view returns(uint64[]) +func (_AllocationManager *AllocationManagerCaller) GetMaxMagnitudes0(opts *bind.CallOpts, operator common.Address, strategies []common.Address) ([]uint64, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getMaxMagnitudes0", operator, strategies) + + if err != nil { + return *new([]uint64), err + } + + out0 := *abi.ConvertType(out[0], new([]uint64)).(*[]uint64) + + return out0, err + +} + +// GetMaxMagnitudes0 is a free data retrieval call binding the contract method 0x547afb87. +// +// Solidity: function getMaxMagnitudes(address operator, address[] strategies) view returns(uint64[]) +func (_AllocationManager *AllocationManagerSession) GetMaxMagnitudes0(operator common.Address, strategies []common.Address) ([]uint64, error) { + return _AllocationManager.Contract.GetMaxMagnitudes0(&_AllocationManager.CallOpts, operator, strategies) +} + +// GetMaxMagnitudes0 is a free data retrieval call binding the contract method 0x547afb87. +// +// Solidity: function getMaxMagnitudes(address operator, address[] strategies) view returns(uint64[]) +func (_AllocationManager *AllocationManagerCallerSession) GetMaxMagnitudes0(operator common.Address, strategies []common.Address) ([]uint64, error) { + return _AllocationManager.Contract.GetMaxMagnitudes0(&_AllocationManager.CallOpts, operator, strategies) +} + +// GetMaxMagnitudesAtBlock is a free data retrieval call binding the contract method 0x94d7d00c. +// +// Solidity: function getMaxMagnitudesAtBlock(address operator, address[] strategies, uint32 blockNumber) view returns(uint64[]) +func (_AllocationManager *AllocationManagerCaller) GetMaxMagnitudesAtBlock(opts *bind.CallOpts, operator common.Address, strategies []common.Address, blockNumber uint32) ([]uint64, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getMaxMagnitudesAtBlock", operator, strategies, blockNumber) + + if err != nil { + return *new([]uint64), err + } + + out0 := *abi.ConvertType(out[0], new([]uint64)).(*[]uint64) + + return out0, err + +} + +// GetMaxMagnitudesAtBlock is a free data retrieval call binding the contract method 0x94d7d00c. +// +// Solidity: function getMaxMagnitudesAtBlock(address operator, address[] strategies, uint32 blockNumber) view returns(uint64[]) +func (_AllocationManager *AllocationManagerSession) GetMaxMagnitudesAtBlock(operator common.Address, strategies []common.Address, blockNumber uint32) ([]uint64, error) { + return _AllocationManager.Contract.GetMaxMagnitudesAtBlock(&_AllocationManager.CallOpts, operator, strategies, blockNumber) +} + +// GetMaxMagnitudesAtBlock is a free data retrieval call binding the contract method 0x94d7d00c. +// +// Solidity: function getMaxMagnitudesAtBlock(address operator, address[] strategies, uint32 blockNumber) view returns(uint64[]) +func (_AllocationManager *AllocationManagerCallerSession) GetMaxMagnitudesAtBlock(operator common.Address, strategies []common.Address, blockNumber uint32) ([]uint64, error) { + return _AllocationManager.Contract.GetMaxMagnitudesAtBlock(&_AllocationManager.CallOpts, operator, strategies, blockNumber) +} + +// GetMemberCount is a free data retrieval call binding the contract method 0xb2447af7. +// +// Solidity: function getMemberCount((address,uint32) operatorSet) view returns(uint256) +func (_AllocationManager *AllocationManagerCaller) GetMemberCount(opts *bind.CallOpts, operatorSet OperatorSet) (*big.Int, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getMemberCount", operatorSet) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMemberCount is a free data retrieval call binding the contract method 0xb2447af7. +// +// Solidity: function getMemberCount((address,uint32) operatorSet) view returns(uint256) +func (_AllocationManager *AllocationManagerSession) GetMemberCount(operatorSet OperatorSet) (*big.Int, error) { + return _AllocationManager.Contract.GetMemberCount(&_AllocationManager.CallOpts, operatorSet) +} + +// GetMemberCount is a free data retrieval call binding the contract method 0xb2447af7. +// +// Solidity: function getMemberCount((address,uint32) operatorSet) view returns(uint256) +func (_AllocationManager *AllocationManagerCallerSession) GetMemberCount(operatorSet OperatorSet) (*big.Int, error) { + return _AllocationManager.Contract.GetMemberCount(&_AllocationManager.CallOpts, operatorSet) +} + +// GetMembers is a free data retrieval call binding the contract method 0x6e875dba. +// +// Solidity: function getMembers((address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerCaller) GetMembers(opts *bind.CallOpts, operatorSet OperatorSet) ([]common.Address, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getMembers", operatorSet) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetMembers is a free data retrieval call binding the contract method 0x6e875dba. +// +// Solidity: function getMembers((address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerSession) GetMembers(operatorSet OperatorSet) ([]common.Address, error) { + return _AllocationManager.Contract.GetMembers(&_AllocationManager.CallOpts, operatorSet) +} + +// GetMembers is a free data retrieval call binding the contract method 0x6e875dba. +// +// Solidity: function getMembers((address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerCallerSession) GetMembers(operatorSet OperatorSet) ([]common.Address, error) { + return _AllocationManager.Contract.GetMembers(&_AllocationManager.CallOpts, operatorSet) +} + +// GetMinimumSlashableStake is a free data retrieval call binding the contract method 0x2bab2c4a. +// +// Solidity: function getMinimumSlashableStake((address,uint32) operatorSet, address[] operators, address[] strategies, uint32 futureBlock) view returns(uint256[][] slashableStake) +func (_AllocationManager *AllocationManagerCaller) GetMinimumSlashableStake(opts *bind.CallOpts, operatorSet OperatorSet, operators []common.Address, strategies []common.Address, futureBlock uint32) ([][]*big.Int, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getMinimumSlashableStake", operatorSet, operators, strategies, futureBlock) + + if err != nil { + return *new([][]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([][]*big.Int)).(*[][]*big.Int) + + return out0, err + +} + +// GetMinimumSlashableStake is a free data retrieval call binding the contract method 0x2bab2c4a. +// +// Solidity: function getMinimumSlashableStake((address,uint32) operatorSet, address[] operators, address[] strategies, uint32 futureBlock) view returns(uint256[][] slashableStake) +func (_AllocationManager *AllocationManagerSession) GetMinimumSlashableStake(operatorSet OperatorSet, operators []common.Address, strategies []common.Address, futureBlock uint32) ([][]*big.Int, error) { + return _AllocationManager.Contract.GetMinimumSlashableStake(&_AllocationManager.CallOpts, operatorSet, operators, strategies, futureBlock) +} + +// GetMinimumSlashableStake is a free data retrieval call binding the contract method 0x2bab2c4a. +// +// Solidity: function getMinimumSlashableStake((address,uint32) operatorSet, address[] operators, address[] strategies, uint32 futureBlock) view returns(uint256[][] slashableStake) +func (_AllocationManager *AllocationManagerCallerSession) GetMinimumSlashableStake(operatorSet OperatorSet, operators []common.Address, strategies []common.Address, futureBlock uint32) ([][]*big.Int, error) { + return _AllocationManager.Contract.GetMinimumSlashableStake(&_AllocationManager.CallOpts, operatorSet, operators, strategies, futureBlock) +} + +// GetOperatorSetCount is a free data retrieval call binding the contract method 0xba1a84e5. +// +// Solidity: function getOperatorSetCount(address avs) view returns(uint256) +func (_AllocationManager *AllocationManagerCaller) GetOperatorSetCount(opts *bind.CallOpts, avs common.Address) (*big.Int, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getOperatorSetCount", avs) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetOperatorSetCount is a free data retrieval call binding the contract method 0xba1a84e5. +// +// Solidity: function getOperatorSetCount(address avs) view returns(uint256) +func (_AllocationManager *AllocationManagerSession) GetOperatorSetCount(avs common.Address) (*big.Int, error) { + return _AllocationManager.Contract.GetOperatorSetCount(&_AllocationManager.CallOpts, avs) +} + +// GetOperatorSetCount is a free data retrieval call binding the contract method 0xba1a84e5. +// +// Solidity: function getOperatorSetCount(address avs) view returns(uint256) +func (_AllocationManager *AllocationManagerCallerSession) GetOperatorSetCount(avs common.Address) (*big.Int, error) { + return _AllocationManager.Contract.GetOperatorSetCount(&_AllocationManager.CallOpts, avs) +} + +// GetRegisteredSets is a free data retrieval call binding the contract method 0x79ae50cd. +// +// Solidity: function getRegisteredSets(address operator) view returns((address,uint32)[]) +func (_AllocationManager *AllocationManagerCaller) GetRegisteredSets(opts *bind.CallOpts, operator common.Address) ([]OperatorSet, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getRegisteredSets", operator) + + if err != nil { + return *new([]OperatorSet), err + } + + out0 := *abi.ConvertType(out[0], new([]OperatorSet)).(*[]OperatorSet) + + return out0, err + +} + +// GetRegisteredSets is a free data retrieval call binding the contract method 0x79ae50cd. +// +// Solidity: function getRegisteredSets(address operator) view returns((address,uint32)[]) +func (_AllocationManager *AllocationManagerSession) GetRegisteredSets(operator common.Address) ([]OperatorSet, error) { + return _AllocationManager.Contract.GetRegisteredSets(&_AllocationManager.CallOpts, operator) +} + +// GetRegisteredSets is a free data retrieval call binding the contract method 0x79ae50cd. +// +// Solidity: function getRegisteredSets(address operator) view returns((address,uint32)[]) +func (_AllocationManager *AllocationManagerCallerSession) GetRegisteredSets(operator common.Address) ([]OperatorSet, error) { + return _AllocationManager.Contract.GetRegisteredSets(&_AllocationManager.CallOpts, operator) +} + +// GetStrategiesInOperatorSet is a free data retrieval call binding the contract method 0x4177a87c. +// +// Solidity: function getStrategiesInOperatorSet((address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerCaller) GetStrategiesInOperatorSet(opts *bind.CallOpts, operatorSet OperatorSet) ([]common.Address, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getStrategiesInOperatorSet", operatorSet) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetStrategiesInOperatorSet is a free data retrieval call binding the contract method 0x4177a87c. +// +// Solidity: function getStrategiesInOperatorSet((address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerSession) GetStrategiesInOperatorSet(operatorSet OperatorSet) ([]common.Address, error) { + return _AllocationManager.Contract.GetStrategiesInOperatorSet(&_AllocationManager.CallOpts, operatorSet) +} + +// GetStrategiesInOperatorSet is a free data retrieval call binding the contract method 0x4177a87c. +// +// Solidity: function getStrategiesInOperatorSet((address,uint32) operatorSet) view returns(address[]) +func (_AllocationManager *AllocationManagerCallerSession) GetStrategiesInOperatorSet(operatorSet OperatorSet) ([]common.Address, error) { + return _AllocationManager.Contract.GetStrategiesInOperatorSet(&_AllocationManager.CallOpts, operatorSet) +} + +// GetStrategyAllocations is a free data retrieval call binding the contract method 0x40120dab. +// +// Solidity: function getStrategyAllocations(address operator, address strategy) view returns((address,uint32)[], (uint64,int128,uint32)[]) +func (_AllocationManager *AllocationManagerCaller) GetStrategyAllocations(opts *bind.CallOpts, operator common.Address, strategy common.Address) ([]OperatorSet, []IAllocationManagerTypesAllocation, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "getStrategyAllocations", operator, strategy) + + if err != nil { + return *new([]OperatorSet), *new([]IAllocationManagerTypesAllocation), err + } + + out0 := *abi.ConvertType(out[0], new([]OperatorSet)).(*[]OperatorSet) + out1 := *abi.ConvertType(out[1], new([]IAllocationManagerTypesAllocation)).(*[]IAllocationManagerTypesAllocation) + + return out0, out1, err + +} + +// GetStrategyAllocations is a free data retrieval call binding the contract method 0x40120dab. +// +// Solidity: function getStrategyAllocations(address operator, address strategy) view returns((address,uint32)[], (uint64,int128,uint32)[]) +func (_AllocationManager *AllocationManagerSession) GetStrategyAllocations(operator common.Address, strategy common.Address) ([]OperatorSet, []IAllocationManagerTypesAllocation, error) { + return _AllocationManager.Contract.GetStrategyAllocations(&_AllocationManager.CallOpts, operator, strategy) +} + +// GetStrategyAllocations is a free data retrieval call binding the contract method 0x40120dab. +// +// Solidity: function getStrategyAllocations(address operator, address strategy) view returns((address,uint32)[], (uint64,int128,uint32)[]) +func (_AllocationManager *AllocationManagerCallerSession) GetStrategyAllocations(operator common.Address, strategy common.Address) ([]OperatorSet, []IAllocationManagerTypesAllocation, error) { + return _AllocationManager.Contract.GetStrategyAllocations(&_AllocationManager.CallOpts, operator, strategy) +} + +// IsMemberOfOperatorSet is a free data retrieval call binding the contract method 0x670d3ba2. +// +// Solidity: function isMemberOfOperatorSet(address operator, (address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerCaller) IsMemberOfOperatorSet(opts *bind.CallOpts, operator common.Address, operatorSet OperatorSet) (bool, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "isMemberOfOperatorSet", operator, operatorSet) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsMemberOfOperatorSet is a free data retrieval call binding the contract method 0x670d3ba2. +// +// Solidity: function isMemberOfOperatorSet(address operator, (address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerSession) IsMemberOfOperatorSet(operator common.Address, operatorSet OperatorSet) (bool, error) { + return _AllocationManager.Contract.IsMemberOfOperatorSet(&_AllocationManager.CallOpts, operator, operatorSet) +} + +// IsMemberOfOperatorSet is a free data retrieval call binding the contract method 0x670d3ba2. +// +// Solidity: function isMemberOfOperatorSet(address operator, (address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerCallerSession) IsMemberOfOperatorSet(operator common.Address, operatorSet OperatorSet) (bool, error) { + return _AllocationManager.Contract.IsMemberOfOperatorSet(&_AllocationManager.CallOpts, operator, operatorSet) +} + +// IsOperatorSet is a free data retrieval call binding the contract method 0x260dc758. +// +// Solidity: function isOperatorSet((address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerCaller) IsOperatorSet(opts *bind.CallOpts, operatorSet OperatorSet) (bool, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "isOperatorSet", operatorSet) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOperatorSet is a free data retrieval call binding the contract method 0x260dc758. +// +// Solidity: function isOperatorSet((address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerSession) IsOperatorSet(operatorSet OperatorSet) (bool, error) { + return _AllocationManager.Contract.IsOperatorSet(&_AllocationManager.CallOpts, operatorSet) +} + +// IsOperatorSet is a free data retrieval call binding the contract method 0x260dc758. +// +// Solidity: function isOperatorSet((address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerCallerSession) IsOperatorSet(operatorSet OperatorSet) (bool, error) { + return _AllocationManager.Contract.IsOperatorSet(&_AllocationManager.CallOpts, operatorSet) +} + +// IsOperatorSlashable is a free data retrieval call binding the contract method 0x1352c3e6. +// +// Solidity: function isOperatorSlashable(address operator, (address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerCaller) IsOperatorSlashable(opts *bind.CallOpts, operator common.Address, operatorSet OperatorSet) (bool, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "isOperatorSlashable", operator, operatorSet) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOperatorSlashable is a free data retrieval call binding the contract method 0x1352c3e6. +// +// Solidity: function isOperatorSlashable(address operator, (address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerSession) IsOperatorSlashable(operator common.Address, operatorSet OperatorSet) (bool, error) { + return _AllocationManager.Contract.IsOperatorSlashable(&_AllocationManager.CallOpts, operator, operatorSet) +} + +// IsOperatorSlashable is a free data retrieval call binding the contract method 0x1352c3e6. +// +// Solidity: function isOperatorSlashable(address operator, (address,uint32) operatorSet) view returns(bool) +func (_AllocationManager *AllocationManagerCallerSession) IsOperatorSlashable(operator common.Address, operatorSet OperatorSet) (bool, error) { + return _AllocationManager.Contract.IsOperatorSlashable(&_AllocationManager.CallOpts, operator, operatorSet) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_AllocationManager *AllocationManagerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _AllocationManager.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 (_AllocationManager *AllocationManagerSession) Owner() (common.Address, error) { + return _AllocationManager.Contract.Owner(&_AllocationManager.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_AllocationManager *AllocationManagerCallerSession) Owner() (common.Address, error) { + return _AllocationManager.Contract.Owner(&_AllocationManager.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5ac86ab7. +// +// Solidity: function paused(uint8 index) view returns(bool) +func (_AllocationManager *AllocationManagerCaller) Paused(opts *bind.CallOpts, index uint8) (bool, error) { + var out []interface{} + err := _AllocationManager.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 (_AllocationManager *AllocationManagerSession) Paused(index uint8) (bool, error) { + return _AllocationManager.Contract.Paused(&_AllocationManager.CallOpts, index) +} + +// Paused is a free data retrieval call binding the contract method 0x5ac86ab7. +// +// Solidity: function paused(uint8 index) view returns(bool) +func (_AllocationManager *AllocationManagerCallerSession) Paused(index uint8) (bool, error) { + return _AllocationManager.Contract.Paused(&_AllocationManager.CallOpts, index) +} + +// Paused0 is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(uint256) +func (_AllocationManager *AllocationManagerCaller) Paused0(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _AllocationManager.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 (_AllocationManager *AllocationManagerSession) Paused0() (*big.Int, error) { + return _AllocationManager.Contract.Paused0(&_AllocationManager.CallOpts) +} + +// Paused0 is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(uint256) +func (_AllocationManager *AllocationManagerCallerSession) Paused0() (*big.Int, error) { + return _AllocationManager.Contract.Paused0(&_AllocationManager.CallOpts) +} + +// PauserRegistry is a free data retrieval call binding the contract method 0x886f1195. +// +// Solidity: function pauserRegistry() view returns(address) +func (_AllocationManager *AllocationManagerCaller) PauserRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _AllocationManager.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 (_AllocationManager *AllocationManagerSession) PauserRegistry() (common.Address, error) { + return _AllocationManager.Contract.PauserRegistry(&_AllocationManager.CallOpts) +} + +// PauserRegistry is a free data retrieval call binding the contract method 0x886f1195. +// +// Solidity: function pauserRegistry() view returns(address) +func (_AllocationManager *AllocationManagerCallerSession) PauserRegistry() (common.Address, error) { + return _AllocationManager.Contract.PauserRegistry(&_AllocationManager.CallOpts) +} + +// PermissionController is a free data retrieval call binding the contract method 0x4657e26a. +// +// Solidity: function permissionController() view returns(address) +func (_AllocationManager *AllocationManagerCaller) PermissionController(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "permissionController") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PermissionController is a free data retrieval call binding the contract method 0x4657e26a. +// +// Solidity: function permissionController() view returns(address) +func (_AllocationManager *AllocationManagerSession) PermissionController() (common.Address, error) { + return _AllocationManager.Contract.PermissionController(&_AllocationManager.CallOpts) +} + +// PermissionController is a free data retrieval call binding the contract method 0x4657e26a. +// +// Solidity: function permissionController() view returns(address) +func (_AllocationManager *AllocationManagerCallerSession) PermissionController() (common.Address, error) { + return _AllocationManager.Contract.PermissionController(&_AllocationManager.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_AllocationManager *AllocationManagerCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _AllocationManager.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_AllocationManager *AllocationManagerSession) Version() (string, error) { + return _AllocationManager.Contract.Version(&_AllocationManager.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_AllocationManager *AllocationManagerCallerSession) Version() (string, error) { + return _AllocationManager.Contract.Version(&_AllocationManager.CallOpts) +} + +// AddStrategiesToOperatorSet is a paid mutator transaction binding the contract method 0x50feea20. +// +// Solidity: function addStrategiesToOperatorSet(address avs, uint32 operatorSetId, address[] strategies) returns() +func (_AllocationManager *AllocationManagerTransactor) AddStrategiesToOperatorSet(opts *bind.TransactOpts, avs common.Address, operatorSetId uint32, strategies []common.Address) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "addStrategiesToOperatorSet", avs, operatorSetId, strategies) +} + +// AddStrategiesToOperatorSet is a paid mutator transaction binding the contract method 0x50feea20. +// +// Solidity: function addStrategiesToOperatorSet(address avs, uint32 operatorSetId, address[] strategies) returns() +func (_AllocationManager *AllocationManagerSession) AddStrategiesToOperatorSet(avs common.Address, operatorSetId uint32, strategies []common.Address) (*types.Transaction, error) { + return _AllocationManager.Contract.AddStrategiesToOperatorSet(&_AllocationManager.TransactOpts, avs, operatorSetId, strategies) +} + +// AddStrategiesToOperatorSet is a paid mutator transaction binding the contract method 0x50feea20. +// +// Solidity: function addStrategiesToOperatorSet(address avs, uint32 operatorSetId, address[] strategies) returns() +func (_AllocationManager *AllocationManagerTransactorSession) AddStrategiesToOperatorSet(avs common.Address, operatorSetId uint32, strategies []common.Address) (*types.Transaction, error) { + return _AllocationManager.Contract.AddStrategiesToOperatorSet(&_AllocationManager.TransactOpts, avs, operatorSetId, strategies) +} + +// ClearDeallocationQueue is a paid mutator transaction binding the contract method 0x4b5046ef. +// +// Solidity: function clearDeallocationQueue(address operator, address[] strategies, uint16[] numToClear) returns() +func (_AllocationManager *AllocationManagerTransactor) ClearDeallocationQueue(opts *bind.TransactOpts, operator common.Address, strategies []common.Address, numToClear []uint16) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "clearDeallocationQueue", operator, strategies, numToClear) +} + +// ClearDeallocationQueue is a paid mutator transaction binding the contract method 0x4b5046ef. +// +// Solidity: function clearDeallocationQueue(address operator, address[] strategies, uint16[] numToClear) returns() +func (_AllocationManager *AllocationManagerSession) ClearDeallocationQueue(operator common.Address, strategies []common.Address, numToClear []uint16) (*types.Transaction, error) { + return _AllocationManager.Contract.ClearDeallocationQueue(&_AllocationManager.TransactOpts, operator, strategies, numToClear) +} + +// ClearDeallocationQueue is a paid mutator transaction binding the contract method 0x4b5046ef. +// +// Solidity: function clearDeallocationQueue(address operator, address[] strategies, uint16[] numToClear) returns() +func (_AllocationManager *AllocationManagerTransactorSession) ClearDeallocationQueue(operator common.Address, strategies []common.Address, numToClear []uint16) (*types.Transaction, error) { + return _AllocationManager.Contract.ClearDeallocationQueue(&_AllocationManager.TransactOpts, operator, strategies, numToClear) +} + +// CreateOperatorSets is a paid mutator transaction binding the contract method 0x261f84e0. +// +// Solidity: function createOperatorSets(address avs, (uint32,address[])[] params) returns() +func (_AllocationManager *AllocationManagerTransactor) CreateOperatorSets(opts *bind.TransactOpts, avs common.Address, params []IAllocationManagerTypesCreateSetParams) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "createOperatorSets", avs, params) +} + +// CreateOperatorSets is a paid mutator transaction binding the contract method 0x261f84e0. +// +// Solidity: function createOperatorSets(address avs, (uint32,address[])[] params) returns() +func (_AllocationManager *AllocationManagerSession) CreateOperatorSets(avs common.Address, params []IAllocationManagerTypesCreateSetParams) (*types.Transaction, error) { + return _AllocationManager.Contract.CreateOperatorSets(&_AllocationManager.TransactOpts, avs, params) +} + +// CreateOperatorSets is a paid mutator transaction binding the contract method 0x261f84e0. +// +// Solidity: function createOperatorSets(address avs, (uint32,address[])[] params) returns() +func (_AllocationManager *AllocationManagerTransactorSession) CreateOperatorSets(avs common.Address, params []IAllocationManagerTypesCreateSetParams) (*types.Transaction, error) { + return _AllocationManager.Contract.CreateOperatorSets(&_AllocationManager.TransactOpts, avs, params) +} + +// DeregisterFromOperatorSets is a paid mutator transaction binding the contract method 0x6e3492b5. +// +// Solidity: function deregisterFromOperatorSets((address,address,uint32[]) params) returns() +func (_AllocationManager *AllocationManagerTransactor) DeregisterFromOperatorSets(opts *bind.TransactOpts, params IAllocationManagerTypesDeregisterParams) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "deregisterFromOperatorSets", params) +} + +// DeregisterFromOperatorSets is a paid mutator transaction binding the contract method 0x6e3492b5. +// +// Solidity: function deregisterFromOperatorSets((address,address,uint32[]) params) returns() +func (_AllocationManager *AllocationManagerSession) DeregisterFromOperatorSets(params IAllocationManagerTypesDeregisterParams) (*types.Transaction, error) { + return _AllocationManager.Contract.DeregisterFromOperatorSets(&_AllocationManager.TransactOpts, params) +} + +// DeregisterFromOperatorSets is a paid mutator transaction binding the contract method 0x6e3492b5. +// +// Solidity: function deregisterFromOperatorSets((address,address,uint32[]) params) returns() +func (_AllocationManager *AllocationManagerTransactorSession) DeregisterFromOperatorSets(params IAllocationManagerTypesDeregisterParams) (*types.Transaction, error) { + return _AllocationManager.Contract.DeregisterFromOperatorSets(&_AllocationManager.TransactOpts, params) +} + +// Initialize is a paid mutator transaction binding the contract method 0xcd6dc687. +// +// Solidity: function initialize(address initialOwner, uint256 initialPausedStatus) returns() +func (_AllocationManager *AllocationManagerTransactor) Initialize(opts *bind.TransactOpts, initialOwner common.Address, initialPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "initialize", initialOwner, initialPausedStatus) +} + +// Initialize is a paid mutator transaction binding the contract method 0xcd6dc687. +// +// Solidity: function initialize(address initialOwner, uint256 initialPausedStatus) returns() +func (_AllocationManager *AllocationManagerSession) Initialize(initialOwner common.Address, initialPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.Contract.Initialize(&_AllocationManager.TransactOpts, initialOwner, initialPausedStatus) +} + +// Initialize is a paid mutator transaction binding the contract method 0xcd6dc687. +// +// Solidity: function initialize(address initialOwner, uint256 initialPausedStatus) returns() +func (_AllocationManager *AllocationManagerTransactorSession) Initialize(initialOwner common.Address, initialPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.Contract.Initialize(&_AllocationManager.TransactOpts, initialOwner, initialPausedStatus) +} + +// ModifyAllocations is a paid mutator transaction binding the contract method 0x952899ee. +// +// Solidity: function modifyAllocations(address operator, ((address,uint32),address[],uint64[])[] params) returns() +func (_AllocationManager *AllocationManagerTransactor) ModifyAllocations(opts *bind.TransactOpts, operator common.Address, params []IAllocationManagerTypesAllocateParams) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "modifyAllocations", operator, params) +} + +// ModifyAllocations is a paid mutator transaction binding the contract method 0x952899ee. +// +// Solidity: function modifyAllocations(address operator, ((address,uint32),address[],uint64[])[] params) returns() +func (_AllocationManager *AllocationManagerSession) ModifyAllocations(operator common.Address, params []IAllocationManagerTypesAllocateParams) (*types.Transaction, error) { + return _AllocationManager.Contract.ModifyAllocations(&_AllocationManager.TransactOpts, operator, params) +} + +// ModifyAllocations is a paid mutator transaction binding the contract method 0x952899ee. +// +// Solidity: function modifyAllocations(address operator, ((address,uint32),address[],uint64[])[] params) returns() +func (_AllocationManager *AllocationManagerTransactorSession) ModifyAllocations(operator common.Address, params []IAllocationManagerTypesAllocateParams) (*types.Transaction, error) { + return _AllocationManager.Contract.ModifyAllocations(&_AllocationManager.TransactOpts, operator, params) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 newPausedStatus) returns() +func (_AllocationManager *AllocationManagerTransactor) Pause(opts *bind.TransactOpts, newPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "pause", newPausedStatus) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 newPausedStatus) returns() +func (_AllocationManager *AllocationManagerSession) Pause(newPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.Contract.Pause(&_AllocationManager.TransactOpts, newPausedStatus) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 newPausedStatus) returns() +func (_AllocationManager *AllocationManagerTransactorSession) Pause(newPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.Contract.Pause(&_AllocationManager.TransactOpts, newPausedStatus) +} + +// PauseAll is a paid mutator transaction binding the contract method 0x595c6a67. +// +// Solidity: function pauseAll() returns() +func (_AllocationManager *AllocationManagerTransactor) PauseAll(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "pauseAll") +} + +// PauseAll is a paid mutator transaction binding the contract method 0x595c6a67. +// +// Solidity: function pauseAll() returns() +func (_AllocationManager *AllocationManagerSession) PauseAll() (*types.Transaction, error) { + return _AllocationManager.Contract.PauseAll(&_AllocationManager.TransactOpts) +} + +// PauseAll is a paid mutator transaction binding the contract method 0x595c6a67. +// +// Solidity: function pauseAll() returns() +func (_AllocationManager *AllocationManagerTransactorSession) PauseAll() (*types.Transaction, error) { + return _AllocationManager.Contract.PauseAll(&_AllocationManager.TransactOpts) +} + +// RegisterForOperatorSets is a paid mutator transaction binding the contract method 0xadc2e3d9. +// +// Solidity: function registerForOperatorSets(address operator, (address,uint32[],bytes) params) returns() +func (_AllocationManager *AllocationManagerTransactor) RegisterForOperatorSets(opts *bind.TransactOpts, operator common.Address, params IAllocationManagerTypesRegisterParams) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "registerForOperatorSets", operator, params) +} + +// RegisterForOperatorSets is a paid mutator transaction binding the contract method 0xadc2e3d9. +// +// Solidity: function registerForOperatorSets(address operator, (address,uint32[],bytes) params) returns() +func (_AllocationManager *AllocationManagerSession) RegisterForOperatorSets(operator common.Address, params IAllocationManagerTypesRegisterParams) (*types.Transaction, error) { + return _AllocationManager.Contract.RegisterForOperatorSets(&_AllocationManager.TransactOpts, operator, params) +} + +// RegisterForOperatorSets is a paid mutator transaction binding the contract method 0xadc2e3d9. +// +// Solidity: function registerForOperatorSets(address operator, (address,uint32[],bytes) params) returns() +func (_AllocationManager *AllocationManagerTransactorSession) RegisterForOperatorSets(operator common.Address, params IAllocationManagerTypesRegisterParams) (*types.Transaction, error) { + return _AllocationManager.Contract.RegisterForOperatorSets(&_AllocationManager.TransactOpts, operator, params) +} + +// RemoveStrategiesFromOperatorSet is a paid mutator transaction binding the contract method 0xb66bd989. +// +// Solidity: function removeStrategiesFromOperatorSet(address avs, uint32 operatorSetId, address[] strategies) returns() +func (_AllocationManager *AllocationManagerTransactor) RemoveStrategiesFromOperatorSet(opts *bind.TransactOpts, avs common.Address, operatorSetId uint32, strategies []common.Address) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "removeStrategiesFromOperatorSet", avs, operatorSetId, strategies) +} + +// RemoveStrategiesFromOperatorSet is a paid mutator transaction binding the contract method 0xb66bd989. +// +// Solidity: function removeStrategiesFromOperatorSet(address avs, uint32 operatorSetId, address[] strategies) returns() +func (_AllocationManager *AllocationManagerSession) RemoveStrategiesFromOperatorSet(avs common.Address, operatorSetId uint32, strategies []common.Address) (*types.Transaction, error) { + return _AllocationManager.Contract.RemoveStrategiesFromOperatorSet(&_AllocationManager.TransactOpts, avs, operatorSetId, strategies) +} + +// RemoveStrategiesFromOperatorSet is a paid mutator transaction binding the contract method 0xb66bd989. +// +// Solidity: function removeStrategiesFromOperatorSet(address avs, uint32 operatorSetId, address[] strategies) returns() +func (_AllocationManager *AllocationManagerTransactorSession) RemoveStrategiesFromOperatorSet(avs common.Address, operatorSetId uint32, strategies []common.Address) (*types.Transaction, error) { + return _AllocationManager.Contract.RemoveStrategiesFromOperatorSet(&_AllocationManager.TransactOpts, avs, operatorSetId, strategies) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_AllocationManager *AllocationManagerTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_AllocationManager *AllocationManagerSession) RenounceOwnership() (*types.Transaction, error) { + return _AllocationManager.Contract.RenounceOwnership(&_AllocationManager.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_AllocationManager *AllocationManagerTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _AllocationManager.Contract.RenounceOwnership(&_AllocationManager.TransactOpts) +} + +// SetAVSRegistrar is a paid mutator transaction binding the contract method 0xd3d96ff4. +// +// Solidity: function setAVSRegistrar(address avs, address registrar) returns() +func (_AllocationManager *AllocationManagerTransactor) SetAVSRegistrar(opts *bind.TransactOpts, avs common.Address, registrar common.Address) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "setAVSRegistrar", avs, registrar) +} + +// SetAVSRegistrar is a paid mutator transaction binding the contract method 0xd3d96ff4. +// +// Solidity: function setAVSRegistrar(address avs, address registrar) returns() +func (_AllocationManager *AllocationManagerSession) SetAVSRegistrar(avs common.Address, registrar common.Address) (*types.Transaction, error) { + return _AllocationManager.Contract.SetAVSRegistrar(&_AllocationManager.TransactOpts, avs, registrar) +} + +// SetAVSRegistrar is a paid mutator transaction binding the contract method 0xd3d96ff4. +// +// Solidity: function setAVSRegistrar(address avs, address registrar) returns() +func (_AllocationManager *AllocationManagerTransactorSession) SetAVSRegistrar(avs common.Address, registrar common.Address) (*types.Transaction, error) { + return _AllocationManager.Contract.SetAVSRegistrar(&_AllocationManager.TransactOpts, avs, registrar) +} + +// SetAllocationDelay is a paid mutator transaction binding the contract method 0x56c483e6. +// +// Solidity: function setAllocationDelay(address operator, uint32 delay) returns() +func (_AllocationManager *AllocationManagerTransactor) SetAllocationDelay(opts *bind.TransactOpts, operator common.Address, delay uint32) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "setAllocationDelay", operator, delay) +} + +// SetAllocationDelay is a paid mutator transaction binding the contract method 0x56c483e6. +// +// Solidity: function setAllocationDelay(address operator, uint32 delay) returns() +func (_AllocationManager *AllocationManagerSession) SetAllocationDelay(operator common.Address, delay uint32) (*types.Transaction, error) { + return _AllocationManager.Contract.SetAllocationDelay(&_AllocationManager.TransactOpts, operator, delay) +} + +// SetAllocationDelay is a paid mutator transaction binding the contract method 0x56c483e6. +// +// Solidity: function setAllocationDelay(address operator, uint32 delay) returns() +func (_AllocationManager *AllocationManagerTransactorSession) SetAllocationDelay(operator common.Address, delay uint32) (*types.Transaction, error) { + return _AllocationManager.Contract.SetAllocationDelay(&_AllocationManager.TransactOpts, operator, delay) +} + +// SlashOperator is a paid mutator transaction binding the contract method 0x36352057. +// +// Solidity: function slashOperator(address avs, (address,uint32,address[],uint256[],string) params) returns() +func (_AllocationManager *AllocationManagerTransactor) SlashOperator(opts *bind.TransactOpts, avs common.Address, params IAllocationManagerTypesSlashingParams) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "slashOperator", avs, params) +} + +// SlashOperator is a paid mutator transaction binding the contract method 0x36352057. +// +// Solidity: function slashOperator(address avs, (address,uint32,address[],uint256[],string) params) returns() +func (_AllocationManager *AllocationManagerSession) SlashOperator(avs common.Address, params IAllocationManagerTypesSlashingParams) (*types.Transaction, error) { + return _AllocationManager.Contract.SlashOperator(&_AllocationManager.TransactOpts, avs, params) +} + +// SlashOperator is a paid mutator transaction binding the contract method 0x36352057. +// +// Solidity: function slashOperator(address avs, (address,uint32,address[],uint256[],string) params) returns() +func (_AllocationManager *AllocationManagerTransactorSession) SlashOperator(avs common.Address, params IAllocationManagerTypesSlashingParams) (*types.Transaction, error) { + return _AllocationManager.Contract.SlashOperator(&_AllocationManager.TransactOpts, avs, params) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_AllocationManager *AllocationManagerTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_AllocationManager *AllocationManagerSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _AllocationManager.Contract.TransferOwnership(&_AllocationManager.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_AllocationManager *AllocationManagerTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _AllocationManager.Contract.TransferOwnership(&_AllocationManager.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0xfabc1cbc. +// +// Solidity: function unpause(uint256 newPausedStatus) returns() +func (_AllocationManager *AllocationManagerTransactor) Unpause(opts *bind.TransactOpts, newPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "unpause", newPausedStatus) +} + +// Unpause is a paid mutator transaction binding the contract method 0xfabc1cbc. +// +// Solidity: function unpause(uint256 newPausedStatus) returns() +func (_AllocationManager *AllocationManagerSession) Unpause(newPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.Contract.Unpause(&_AllocationManager.TransactOpts, newPausedStatus) +} + +// Unpause is a paid mutator transaction binding the contract method 0xfabc1cbc. +// +// Solidity: function unpause(uint256 newPausedStatus) returns() +func (_AllocationManager *AllocationManagerTransactorSession) Unpause(newPausedStatus *big.Int) (*types.Transaction, error) { + return _AllocationManager.Contract.Unpause(&_AllocationManager.TransactOpts, newPausedStatus) +} + +// UpdateAVSMetadataURI is a paid mutator transaction binding the contract method 0xa9821821. +// +// Solidity: function updateAVSMetadataURI(address avs, string metadataURI) returns() +func (_AllocationManager *AllocationManagerTransactor) UpdateAVSMetadataURI(opts *bind.TransactOpts, avs common.Address, metadataURI string) (*types.Transaction, error) { + return _AllocationManager.contract.Transact(opts, "updateAVSMetadataURI", avs, metadataURI) +} + +// UpdateAVSMetadataURI is a paid mutator transaction binding the contract method 0xa9821821. +// +// Solidity: function updateAVSMetadataURI(address avs, string metadataURI) returns() +func (_AllocationManager *AllocationManagerSession) UpdateAVSMetadataURI(avs common.Address, metadataURI string) (*types.Transaction, error) { + return _AllocationManager.Contract.UpdateAVSMetadataURI(&_AllocationManager.TransactOpts, avs, metadataURI) +} + +// UpdateAVSMetadataURI is a paid mutator transaction binding the contract method 0xa9821821. +// +// Solidity: function updateAVSMetadataURI(address avs, string metadataURI) returns() +func (_AllocationManager *AllocationManagerTransactorSession) UpdateAVSMetadataURI(avs common.Address, metadataURI string) (*types.Transaction, error) { + return _AllocationManager.Contract.UpdateAVSMetadataURI(&_AllocationManager.TransactOpts, avs, metadataURI) +} + +// AllocationManagerAVSMetadataURIUpdatedIterator is returned from FilterAVSMetadataURIUpdated and is used to iterate over the raw logs and unpacked data for AVSMetadataURIUpdated events raised by the AllocationManager contract. +type AllocationManagerAVSMetadataURIUpdatedIterator struct { + Event *AllocationManagerAVSMetadataURIUpdated // 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 *AllocationManagerAVSMetadataURIUpdatedIterator) 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(AllocationManagerAVSMetadataURIUpdated) + 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(AllocationManagerAVSMetadataURIUpdated) + 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 *AllocationManagerAVSMetadataURIUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerAVSMetadataURIUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerAVSMetadataURIUpdated represents a AVSMetadataURIUpdated event raised by the AllocationManager contract. +type AllocationManagerAVSMetadataURIUpdated struct { + Avs common.Address + MetadataURI string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAVSMetadataURIUpdated is a free log retrieval operation binding the contract event 0xa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c943713. +// +// Solidity: event AVSMetadataURIUpdated(address indexed avs, string metadataURI) +func (_AllocationManager *AllocationManagerFilterer) FilterAVSMetadataURIUpdated(opts *bind.FilterOpts, avs []common.Address) (*AllocationManagerAVSMetadataURIUpdatedIterator, error) { + + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "AVSMetadataURIUpdated", avsRule) + if err != nil { + return nil, err + } + return &AllocationManagerAVSMetadataURIUpdatedIterator{contract: _AllocationManager.contract, event: "AVSMetadataURIUpdated", logs: logs, sub: sub}, nil +} + +// WatchAVSMetadataURIUpdated is a free log subscription operation binding the contract event 0xa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c943713. +// +// Solidity: event AVSMetadataURIUpdated(address indexed avs, string metadataURI) +func (_AllocationManager *AllocationManagerFilterer) WatchAVSMetadataURIUpdated(opts *bind.WatchOpts, sink chan<- *AllocationManagerAVSMetadataURIUpdated, avs []common.Address) (event.Subscription, error) { + + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "AVSMetadataURIUpdated", avsRule) + 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(AllocationManagerAVSMetadataURIUpdated) + if err := _AllocationManager.contract.UnpackLog(event, "AVSMetadataURIUpdated", 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 +} + +// ParseAVSMetadataURIUpdated is a log parse operation binding the contract event 0xa89c1dc243d8908a96dd84944bcc97d6bc6ac00dd78e20621576be6a3c943713. +// +// Solidity: event AVSMetadataURIUpdated(address indexed avs, string metadataURI) +func (_AllocationManager *AllocationManagerFilterer) ParseAVSMetadataURIUpdated(log types.Log) (*AllocationManagerAVSMetadataURIUpdated, error) { + event := new(AllocationManagerAVSMetadataURIUpdated) + if err := _AllocationManager.contract.UnpackLog(event, "AVSMetadataURIUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerAVSRegistrarSetIterator is returned from FilterAVSRegistrarSet and is used to iterate over the raw logs and unpacked data for AVSRegistrarSet events raised by the AllocationManager contract. +type AllocationManagerAVSRegistrarSetIterator struct { + Event *AllocationManagerAVSRegistrarSet // 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 *AllocationManagerAVSRegistrarSetIterator) 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(AllocationManagerAVSRegistrarSet) + 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(AllocationManagerAVSRegistrarSet) + 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 *AllocationManagerAVSRegistrarSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerAVSRegistrarSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerAVSRegistrarSet represents a AVSRegistrarSet event raised by the AllocationManager contract. +type AllocationManagerAVSRegistrarSet struct { + Avs common.Address + Registrar common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAVSRegistrarSet is a free log retrieval operation binding the contract event 0x2ae945c40c44dc0ec263f95609c3fdc6952e0aefa22d6374e44f2c997acedf85. +// +// Solidity: event AVSRegistrarSet(address avs, address registrar) +func (_AllocationManager *AllocationManagerFilterer) FilterAVSRegistrarSet(opts *bind.FilterOpts) (*AllocationManagerAVSRegistrarSetIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "AVSRegistrarSet") + if err != nil { + return nil, err + } + return &AllocationManagerAVSRegistrarSetIterator{contract: _AllocationManager.contract, event: "AVSRegistrarSet", logs: logs, sub: sub}, nil +} + +// WatchAVSRegistrarSet is a free log subscription operation binding the contract event 0x2ae945c40c44dc0ec263f95609c3fdc6952e0aefa22d6374e44f2c997acedf85. +// +// Solidity: event AVSRegistrarSet(address avs, address registrar) +func (_AllocationManager *AllocationManagerFilterer) WatchAVSRegistrarSet(opts *bind.WatchOpts, sink chan<- *AllocationManagerAVSRegistrarSet) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "AVSRegistrarSet") + 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(AllocationManagerAVSRegistrarSet) + if err := _AllocationManager.contract.UnpackLog(event, "AVSRegistrarSet", 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 +} + +// ParseAVSRegistrarSet is a log parse operation binding the contract event 0x2ae945c40c44dc0ec263f95609c3fdc6952e0aefa22d6374e44f2c997acedf85. +// +// Solidity: event AVSRegistrarSet(address avs, address registrar) +func (_AllocationManager *AllocationManagerFilterer) ParseAVSRegistrarSet(log types.Log) (*AllocationManagerAVSRegistrarSet, error) { + event := new(AllocationManagerAVSRegistrarSet) + if err := _AllocationManager.contract.UnpackLog(event, "AVSRegistrarSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerAllocationDelaySetIterator is returned from FilterAllocationDelaySet and is used to iterate over the raw logs and unpacked data for AllocationDelaySet events raised by the AllocationManager contract. +type AllocationManagerAllocationDelaySetIterator struct { + Event *AllocationManagerAllocationDelaySet // 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 *AllocationManagerAllocationDelaySetIterator) 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(AllocationManagerAllocationDelaySet) + 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(AllocationManagerAllocationDelaySet) + 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 *AllocationManagerAllocationDelaySetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerAllocationDelaySetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerAllocationDelaySet represents a AllocationDelaySet event raised by the AllocationManager contract. +type AllocationManagerAllocationDelaySet struct { + Operator common.Address + Delay uint32 + EffectBlock uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAllocationDelaySet is a free log retrieval operation binding the contract event 0x4e85751d6331506c6c62335f207eb31f12a61e570f34f5c17640308785c6d4db. +// +// Solidity: event AllocationDelaySet(address operator, uint32 delay, uint32 effectBlock) +func (_AllocationManager *AllocationManagerFilterer) FilterAllocationDelaySet(opts *bind.FilterOpts) (*AllocationManagerAllocationDelaySetIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "AllocationDelaySet") + if err != nil { + return nil, err + } + return &AllocationManagerAllocationDelaySetIterator{contract: _AllocationManager.contract, event: "AllocationDelaySet", logs: logs, sub: sub}, nil +} + +// WatchAllocationDelaySet is a free log subscription operation binding the contract event 0x4e85751d6331506c6c62335f207eb31f12a61e570f34f5c17640308785c6d4db. +// +// Solidity: event AllocationDelaySet(address operator, uint32 delay, uint32 effectBlock) +func (_AllocationManager *AllocationManagerFilterer) WatchAllocationDelaySet(opts *bind.WatchOpts, sink chan<- *AllocationManagerAllocationDelaySet) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "AllocationDelaySet") + 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(AllocationManagerAllocationDelaySet) + if err := _AllocationManager.contract.UnpackLog(event, "AllocationDelaySet", 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 +} + +// ParseAllocationDelaySet is a log parse operation binding the contract event 0x4e85751d6331506c6c62335f207eb31f12a61e570f34f5c17640308785c6d4db. +// +// Solidity: event AllocationDelaySet(address operator, uint32 delay, uint32 effectBlock) +func (_AllocationManager *AllocationManagerFilterer) ParseAllocationDelaySet(log types.Log) (*AllocationManagerAllocationDelaySet, error) { + event := new(AllocationManagerAllocationDelaySet) + if err := _AllocationManager.contract.UnpackLog(event, "AllocationDelaySet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerAllocationUpdatedIterator is returned from FilterAllocationUpdated and is used to iterate over the raw logs and unpacked data for AllocationUpdated events raised by the AllocationManager contract. +type AllocationManagerAllocationUpdatedIterator struct { + Event *AllocationManagerAllocationUpdated // 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 *AllocationManagerAllocationUpdatedIterator) 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(AllocationManagerAllocationUpdated) + 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(AllocationManagerAllocationUpdated) + 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 *AllocationManagerAllocationUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerAllocationUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerAllocationUpdated represents a AllocationUpdated event raised by the AllocationManager contract. +type AllocationManagerAllocationUpdated struct { + Operator common.Address + OperatorSet OperatorSet + Strategy common.Address + Magnitude uint64 + EffectBlock uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAllocationUpdated is a free log retrieval operation binding the contract event 0x1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd. +// +// Solidity: event AllocationUpdated(address operator, (address,uint32) operatorSet, address strategy, uint64 magnitude, uint32 effectBlock) +func (_AllocationManager *AllocationManagerFilterer) FilterAllocationUpdated(opts *bind.FilterOpts) (*AllocationManagerAllocationUpdatedIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "AllocationUpdated") + if err != nil { + return nil, err + } + return &AllocationManagerAllocationUpdatedIterator{contract: _AllocationManager.contract, event: "AllocationUpdated", logs: logs, sub: sub}, nil +} + +// WatchAllocationUpdated is a free log subscription operation binding the contract event 0x1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd. +// +// Solidity: event AllocationUpdated(address operator, (address,uint32) operatorSet, address strategy, uint64 magnitude, uint32 effectBlock) +func (_AllocationManager *AllocationManagerFilterer) WatchAllocationUpdated(opts *bind.WatchOpts, sink chan<- *AllocationManagerAllocationUpdated) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "AllocationUpdated") + 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(AllocationManagerAllocationUpdated) + if err := _AllocationManager.contract.UnpackLog(event, "AllocationUpdated", 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 +} + +// ParseAllocationUpdated is a log parse operation binding the contract event 0x1487af5418c47ee5ea45ef4a93398668120890774a9e13487e61e9dc3baf76dd. +// +// Solidity: event AllocationUpdated(address operator, (address,uint32) operatorSet, address strategy, uint64 magnitude, uint32 effectBlock) +func (_AllocationManager *AllocationManagerFilterer) ParseAllocationUpdated(log types.Log) (*AllocationManagerAllocationUpdated, error) { + event := new(AllocationManagerAllocationUpdated) + if err := _AllocationManager.contract.UnpackLog(event, "AllocationUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerEncumberedMagnitudeUpdatedIterator is returned from FilterEncumberedMagnitudeUpdated and is used to iterate over the raw logs and unpacked data for EncumberedMagnitudeUpdated events raised by the AllocationManager contract. +type AllocationManagerEncumberedMagnitudeUpdatedIterator struct { + Event *AllocationManagerEncumberedMagnitudeUpdated // 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 *AllocationManagerEncumberedMagnitudeUpdatedIterator) 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(AllocationManagerEncumberedMagnitudeUpdated) + 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(AllocationManagerEncumberedMagnitudeUpdated) + 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 *AllocationManagerEncumberedMagnitudeUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerEncumberedMagnitudeUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerEncumberedMagnitudeUpdated represents a EncumberedMagnitudeUpdated event raised by the AllocationManager contract. +type AllocationManagerEncumberedMagnitudeUpdated struct { + Operator common.Address + Strategy common.Address + EncumberedMagnitude uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEncumberedMagnitudeUpdated is a free log retrieval operation binding the contract event 0xacf9095feb3a370c9cf692421c69ef320d4db5c66e6a7d29c7694eb02364fc55. +// +// Solidity: event EncumberedMagnitudeUpdated(address operator, address strategy, uint64 encumberedMagnitude) +func (_AllocationManager *AllocationManagerFilterer) FilterEncumberedMagnitudeUpdated(opts *bind.FilterOpts) (*AllocationManagerEncumberedMagnitudeUpdatedIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "EncumberedMagnitudeUpdated") + if err != nil { + return nil, err + } + return &AllocationManagerEncumberedMagnitudeUpdatedIterator{contract: _AllocationManager.contract, event: "EncumberedMagnitudeUpdated", logs: logs, sub: sub}, nil +} + +// WatchEncumberedMagnitudeUpdated is a free log subscription operation binding the contract event 0xacf9095feb3a370c9cf692421c69ef320d4db5c66e6a7d29c7694eb02364fc55. +// +// Solidity: event EncumberedMagnitudeUpdated(address operator, address strategy, uint64 encumberedMagnitude) +func (_AllocationManager *AllocationManagerFilterer) WatchEncumberedMagnitudeUpdated(opts *bind.WatchOpts, sink chan<- *AllocationManagerEncumberedMagnitudeUpdated) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "EncumberedMagnitudeUpdated") + 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(AllocationManagerEncumberedMagnitudeUpdated) + if err := _AllocationManager.contract.UnpackLog(event, "EncumberedMagnitudeUpdated", 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 +} + +// ParseEncumberedMagnitudeUpdated is a log parse operation binding the contract event 0xacf9095feb3a370c9cf692421c69ef320d4db5c66e6a7d29c7694eb02364fc55. +// +// Solidity: event EncumberedMagnitudeUpdated(address operator, address strategy, uint64 encumberedMagnitude) +func (_AllocationManager *AllocationManagerFilterer) ParseEncumberedMagnitudeUpdated(log types.Log) (*AllocationManagerEncumberedMagnitudeUpdated, error) { + event := new(AllocationManagerEncumberedMagnitudeUpdated) + if err := _AllocationManager.contract.UnpackLog(event, "EncumberedMagnitudeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the AllocationManager contract. +type AllocationManagerInitializedIterator struct { + Event *AllocationManagerInitialized // 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 *AllocationManagerInitializedIterator) 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(AllocationManagerInitialized) + 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(AllocationManagerInitialized) + 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 *AllocationManagerInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerInitialized represents a Initialized event raised by the AllocationManager contract. +type AllocationManagerInitialized 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 (_AllocationManager *AllocationManagerFilterer) FilterInitialized(opts *bind.FilterOpts) (*AllocationManagerInitializedIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &AllocationManagerInitializedIterator{contract: _AllocationManager.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 (_AllocationManager *AllocationManagerFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *AllocationManagerInitialized) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.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(AllocationManagerInitialized) + if err := _AllocationManager.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 (_AllocationManager *AllocationManagerFilterer) ParseInitialized(log types.Log) (*AllocationManagerInitialized, error) { + event := new(AllocationManagerInitialized) + if err := _AllocationManager.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerMaxMagnitudeUpdatedIterator is returned from FilterMaxMagnitudeUpdated and is used to iterate over the raw logs and unpacked data for MaxMagnitudeUpdated events raised by the AllocationManager contract. +type AllocationManagerMaxMagnitudeUpdatedIterator struct { + Event *AllocationManagerMaxMagnitudeUpdated // 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 *AllocationManagerMaxMagnitudeUpdatedIterator) 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(AllocationManagerMaxMagnitudeUpdated) + 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(AllocationManagerMaxMagnitudeUpdated) + 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 *AllocationManagerMaxMagnitudeUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerMaxMagnitudeUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerMaxMagnitudeUpdated represents a MaxMagnitudeUpdated event raised by the AllocationManager contract. +type AllocationManagerMaxMagnitudeUpdated struct { + Operator common.Address + Strategy common.Address + MaxMagnitude uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMaxMagnitudeUpdated is a free log retrieval operation binding the contract event 0x1c6458079a41077d003c11faf9bf097e693bd67979e4e6500bac7b29db779b5c. +// +// Solidity: event MaxMagnitudeUpdated(address operator, address strategy, uint64 maxMagnitude) +func (_AllocationManager *AllocationManagerFilterer) FilterMaxMagnitudeUpdated(opts *bind.FilterOpts) (*AllocationManagerMaxMagnitudeUpdatedIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "MaxMagnitudeUpdated") + if err != nil { + return nil, err + } + return &AllocationManagerMaxMagnitudeUpdatedIterator{contract: _AllocationManager.contract, event: "MaxMagnitudeUpdated", logs: logs, sub: sub}, nil +} + +// WatchMaxMagnitudeUpdated is a free log subscription operation binding the contract event 0x1c6458079a41077d003c11faf9bf097e693bd67979e4e6500bac7b29db779b5c. +// +// Solidity: event MaxMagnitudeUpdated(address operator, address strategy, uint64 maxMagnitude) +func (_AllocationManager *AllocationManagerFilterer) WatchMaxMagnitudeUpdated(opts *bind.WatchOpts, sink chan<- *AllocationManagerMaxMagnitudeUpdated) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "MaxMagnitudeUpdated") + 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(AllocationManagerMaxMagnitudeUpdated) + if err := _AllocationManager.contract.UnpackLog(event, "MaxMagnitudeUpdated", 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 +} + +// ParseMaxMagnitudeUpdated is a log parse operation binding the contract event 0x1c6458079a41077d003c11faf9bf097e693bd67979e4e6500bac7b29db779b5c. +// +// Solidity: event MaxMagnitudeUpdated(address operator, address strategy, uint64 maxMagnitude) +func (_AllocationManager *AllocationManagerFilterer) ParseMaxMagnitudeUpdated(log types.Log) (*AllocationManagerMaxMagnitudeUpdated, error) { + event := new(AllocationManagerMaxMagnitudeUpdated) + if err := _AllocationManager.contract.UnpackLog(event, "MaxMagnitudeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerOperatorAddedToOperatorSetIterator is returned from FilterOperatorAddedToOperatorSet and is used to iterate over the raw logs and unpacked data for OperatorAddedToOperatorSet events raised by the AllocationManager contract. +type AllocationManagerOperatorAddedToOperatorSetIterator struct { + Event *AllocationManagerOperatorAddedToOperatorSet // 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 *AllocationManagerOperatorAddedToOperatorSetIterator) 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(AllocationManagerOperatorAddedToOperatorSet) + 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(AllocationManagerOperatorAddedToOperatorSet) + 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 *AllocationManagerOperatorAddedToOperatorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerOperatorAddedToOperatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerOperatorAddedToOperatorSet represents a OperatorAddedToOperatorSet event raised by the AllocationManager contract. +type AllocationManagerOperatorAddedToOperatorSet struct { + Operator common.Address + OperatorSet OperatorSet + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorAddedToOperatorSet is a free log retrieval operation binding the contract event 0x43232edf9071753d2321e5fa7e018363ee248e5f2142e6c08edd3265bfb4895e. +// +// Solidity: event OperatorAddedToOperatorSet(address indexed operator, (address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) FilterOperatorAddedToOperatorSet(opts *bind.FilterOpts, operator []common.Address) (*AllocationManagerOperatorAddedToOperatorSetIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "OperatorAddedToOperatorSet", operatorRule) + if err != nil { + return nil, err + } + return &AllocationManagerOperatorAddedToOperatorSetIterator{contract: _AllocationManager.contract, event: "OperatorAddedToOperatorSet", logs: logs, sub: sub}, nil +} + +// WatchOperatorAddedToOperatorSet is a free log subscription operation binding the contract event 0x43232edf9071753d2321e5fa7e018363ee248e5f2142e6c08edd3265bfb4895e. +// +// Solidity: event OperatorAddedToOperatorSet(address indexed operator, (address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) WatchOperatorAddedToOperatorSet(opts *bind.WatchOpts, sink chan<- *AllocationManagerOperatorAddedToOperatorSet, operator []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "OperatorAddedToOperatorSet", operatorRule) + 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(AllocationManagerOperatorAddedToOperatorSet) + if err := _AllocationManager.contract.UnpackLog(event, "OperatorAddedToOperatorSet", 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 +} + +// ParseOperatorAddedToOperatorSet is a log parse operation binding the contract event 0x43232edf9071753d2321e5fa7e018363ee248e5f2142e6c08edd3265bfb4895e. +// +// Solidity: event OperatorAddedToOperatorSet(address indexed operator, (address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) ParseOperatorAddedToOperatorSet(log types.Log) (*AllocationManagerOperatorAddedToOperatorSet, error) { + event := new(AllocationManagerOperatorAddedToOperatorSet) + if err := _AllocationManager.contract.UnpackLog(event, "OperatorAddedToOperatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerOperatorRemovedFromOperatorSetIterator is returned from FilterOperatorRemovedFromOperatorSet and is used to iterate over the raw logs and unpacked data for OperatorRemovedFromOperatorSet events raised by the AllocationManager contract. +type AllocationManagerOperatorRemovedFromOperatorSetIterator struct { + Event *AllocationManagerOperatorRemovedFromOperatorSet // 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 *AllocationManagerOperatorRemovedFromOperatorSetIterator) 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(AllocationManagerOperatorRemovedFromOperatorSet) + 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(AllocationManagerOperatorRemovedFromOperatorSet) + 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 *AllocationManagerOperatorRemovedFromOperatorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerOperatorRemovedFromOperatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerOperatorRemovedFromOperatorSet represents a OperatorRemovedFromOperatorSet event raised by the AllocationManager contract. +type AllocationManagerOperatorRemovedFromOperatorSet struct { + Operator common.Address + OperatorSet OperatorSet + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorRemovedFromOperatorSet is a free log retrieval operation binding the contract event 0xad34c3070be1dffbcaa499d000ba2b8d9848aefcac3059df245dd95c4ece14fe. +// +// Solidity: event OperatorRemovedFromOperatorSet(address indexed operator, (address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) FilterOperatorRemovedFromOperatorSet(opts *bind.FilterOpts, operator []common.Address) (*AllocationManagerOperatorRemovedFromOperatorSetIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "OperatorRemovedFromOperatorSet", operatorRule) + if err != nil { + return nil, err + } + return &AllocationManagerOperatorRemovedFromOperatorSetIterator{contract: _AllocationManager.contract, event: "OperatorRemovedFromOperatorSet", logs: logs, sub: sub}, nil +} + +// WatchOperatorRemovedFromOperatorSet is a free log subscription operation binding the contract event 0xad34c3070be1dffbcaa499d000ba2b8d9848aefcac3059df245dd95c4ece14fe. +// +// Solidity: event OperatorRemovedFromOperatorSet(address indexed operator, (address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) WatchOperatorRemovedFromOperatorSet(opts *bind.WatchOpts, sink chan<- *AllocationManagerOperatorRemovedFromOperatorSet, operator []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "OperatorRemovedFromOperatorSet", operatorRule) + 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(AllocationManagerOperatorRemovedFromOperatorSet) + if err := _AllocationManager.contract.UnpackLog(event, "OperatorRemovedFromOperatorSet", 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 +} + +// ParseOperatorRemovedFromOperatorSet is a log parse operation binding the contract event 0xad34c3070be1dffbcaa499d000ba2b8d9848aefcac3059df245dd95c4ece14fe. +// +// Solidity: event OperatorRemovedFromOperatorSet(address indexed operator, (address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) ParseOperatorRemovedFromOperatorSet(log types.Log) (*AllocationManagerOperatorRemovedFromOperatorSet, error) { + event := new(AllocationManagerOperatorRemovedFromOperatorSet) + if err := _AllocationManager.contract.UnpackLog(event, "OperatorRemovedFromOperatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerOperatorSetCreatedIterator is returned from FilterOperatorSetCreated and is used to iterate over the raw logs and unpacked data for OperatorSetCreated events raised by the AllocationManager contract. +type AllocationManagerOperatorSetCreatedIterator struct { + Event *AllocationManagerOperatorSetCreated // 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 *AllocationManagerOperatorSetCreatedIterator) 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(AllocationManagerOperatorSetCreated) + 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(AllocationManagerOperatorSetCreated) + 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 *AllocationManagerOperatorSetCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerOperatorSetCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerOperatorSetCreated represents a OperatorSetCreated event raised by the AllocationManager contract. +type AllocationManagerOperatorSetCreated struct { + OperatorSet OperatorSet + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorSetCreated is a free log retrieval operation binding the contract event 0x31629285ead2335ae0933f86ed2ae63321f7af77b4e6eaabc42c057880977e6c. +// +// Solidity: event OperatorSetCreated((address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) FilterOperatorSetCreated(opts *bind.FilterOpts) (*AllocationManagerOperatorSetCreatedIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "OperatorSetCreated") + if err != nil { + return nil, err + } + return &AllocationManagerOperatorSetCreatedIterator{contract: _AllocationManager.contract, event: "OperatorSetCreated", logs: logs, sub: sub}, nil +} + +// WatchOperatorSetCreated is a free log subscription operation binding the contract event 0x31629285ead2335ae0933f86ed2ae63321f7af77b4e6eaabc42c057880977e6c. +// +// Solidity: event OperatorSetCreated((address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) WatchOperatorSetCreated(opts *bind.WatchOpts, sink chan<- *AllocationManagerOperatorSetCreated) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "OperatorSetCreated") + 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(AllocationManagerOperatorSetCreated) + if err := _AllocationManager.contract.UnpackLog(event, "OperatorSetCreated", 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 +} + +// ParseOperatorSetCreated is a log parse operation binding the contract event 0x31629285ead2335ae0933f86ed2ae63321f7af77b4e6eaabc42c057880977e6c. +// +// Solidity: event OperatorSetCreated((address,uint32) operatorSet) +func (_AllocationManager *AllocationManagerFilterer) ParseOperatorSetCreated(log types.Log) (*AllocationManagerOperatorSetCreated, error) { + event := new(AllocationManagerOperatorSetCreated) + if err := _AllocationManager.contract.UnpackLog(event, "OperatorSetCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerOperatorSlashedIterator is returned from FilterOperatorSlashed and is used to iterate over the raw logs and unpacked data for OperatorSlashed events raised by the AllocationManager contract. +type AllocationManagerOperatorSlashedIterator struct { + Event *AllocationManagerOperatorSlashed // 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 *AllocationManagerOperatorSlashedIterator) 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(AllocationManagerOperatorSlashed) + 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(AllocationManagerOperatorSlashed) + 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 *AllocationManagerOperatorSlashedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerOperatorSlashedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerOperatorSlashed represents a OperatorSlashed event raised by the AllocationManager contract. +type AllocationManagerOperatorSlashed struct { + Operator common.Address + OperatorSet OperatorSet + Strategies []common.Address + WadSlashed []*big.Int + Description string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorSlashed is a free log retrieval operation binding the contract event 0x80969ad29428d6797ee7aad084f9e4a42a82fc506dcd2ca3b6fb431f85ccebe5. +// +// Solidity: event OperatorSlashed(address operator, (address,uint32) operatorSet, address[] strategies, uint256[] wadSlashed, string description) +func (_AllocationManager *AllocationManagerFilterer) FilterOperatorSlashed(opts *bind.FilterOpts) (*AllocationManagerOperatorSlashedIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "OperatorSlashed") + if err != nil { + return nil, err + } + return &AllocationManagerOperatorSlashedIterator{contract: _AllocationManager.contract, event: "OperatorSlashed", logs: logs, sub: sub}, nil +} + +// WatchOperatorSlashed is a free log subscription operation binding the contract event 0x80969ad29428d6797ee7aad084f9e4a42a82fc506dcd2ca3b6fb431f85ccebe5. +// +// Solidity: event OperatorSlashed(address operator, (address,uint32) operatorSet, address[] strategies, uint256[] wadSlashed, string description) +func (_AllocationManager *AllocationManagerFilterer) WatchOperatorSlashed(opts *bind.WatchOpts, sink chan<- *AllocationManagerOperatorSlashed) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "OperatorSlashed") + 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(AllocationManagerOperatorSlashed) + if err := _AllocationManager.contract.UnpackLog(event, "OperatorSlashed", 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 +} + +// ParseOperatorSlashed is a log parse operation binding the contract event 0x80969ad29428d6797ee7aad084f9e4a42a82fc506dcd2ca3b6fb431f85ccebe5. +// +// Solidity: event OperatorSlashed(address operator, (address,uint32) operatorSet, address[] strategies, uint256[] wadSlashed, string description) +func (_AllocationManager *AllocationManagerFilterer) ParseOperatorSlashed(log types.Log) (*AllocationManagerOperatorSlashed, error) { + event := new(AllocationManagerOperatorSlashed) + if err := _AllocationManager.contract.UnpackLog(event, "OperatorSlashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the AllocationManager contract. +type AllocationManagerOwnershipTransferredIterator struct { + Event *AllocationManagerOwnershipTransferred // 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 *AllocationManagerOwnershipTransferredIterator) 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(AllocationManagerOwnershipTransferred) + 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(AllocationManagerOwnershipTransferred) + 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 *AllocationManagerOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerOwnershipTransferred represents a OwnershipTransferred event raised by the AllocationManager contract. +type AllocationManagerOwnershipTransferred 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 (_AllocationManager *AllocationManagerFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*AllocationManagerOwnershipTransferredIterator, 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 := _AllocationManager.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &AllocationManagerOwnershipTransferredIterator{contract: _AllocationManager.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 (_AllocationManager *AllocationManagerFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *AllocationManagerOwnershipTransferred, 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 := _AllocationManager.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(AllocationManagerOwnershipTransferred) + if err := _AllocationManager.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 (_AllocationManager *AllocationManagerFilterer) ParseOwnershipTransferred(log types.Log) (*AllocationManagerOwnershipTransferred, error) { + event := new(AllocationManagerOwnershipTransferred) + if err := _AllocationManager.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the AllocationManager contract. +type AllocationManagerPausedIterator struct { + Event *AllocationManagerPaused // 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 *AllocationManagerPausedIterator) 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(AllocationManagerPaused) + 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(AllocationManagerPaused) + 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 *AllocationManagerPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerPaused represents a Paused event raised by the AllocationManager contract. +type AllocationManagerPaused 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 (_AllocationManager *AllocationManagerFilterer) FilterPaused(opts *bind.FilterOpts, account []common.Address) (*AllocationManagerPausedIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "Paused", accountRule) + if err != nil { + return nil, err + } + return &AllocationManagerPausedIterator{contract: _AllocationManager.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 (_AllocationManager *AllocationManagerFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *AllocationManagerPaused, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _AllocationManager.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(AllocationManagerPaused) + if err := _AllocationManager.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 (_AllocationManager *AllocationManagerFilterer) ParsePaused(log types.Log) (*AllocationManagerPaused, error) { + event := new(AllocationManagerPaused) + if err := _AllocationManager.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerStrategyAddedToOperatorSetIterator is returned from FilterStrategyAddedToOperatorSet and is used to iterate over the raw logs and unpacked data for StrategyAddedToOperatorSet events raised by the AllocationManager contract. +type AllocationManagerStrategyAddedToOperatorSetIterator struct { + Event *AllocationManagerStrategyAddedToOperatorSet // 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 *AllocationManagerStrategyAddedToOperatorSetIterator) 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(AllocationManagerStrategyAddedToOperatorSet) + 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(AllocationManagerStrategyAddedToOperatorSet) + 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 *AllocationManagerStrategyAddedToOperatorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerStrategyAddedToOperatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerStrategyAddedToOperatorSet represents a StrategyAddedToOperatorSet event raised by the AllocationManager contract. +type AllocationManagerStrategyAddedToOperatorSet struct { + OperatorSet OperatorSet + Strategy common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStrategyAddedToOperatorSet is a free log retrieval operation binding the contract event 0x7ab260fe0af193db5f4986770d831bda4ea46099dc817e8b6716dcae8af8e88b. +// +// Solidity: event StrategyAddedToOperatorSet((address,uint32) operatorSet, address strategy) +func (_AllocationManager *AllocationManagerFilterer) FilterStrategyAddedToOperatorSet(opts *bind.FilterOpts) (*AllocationManagerStrategyAddedToOperatorSetIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "StrategyAddedToOperatorSet") + if err != nil { + return nil, err + } + return &AllocationManagerStrategyAddedToOperatorSetIterator{contract: _AllocationManager.contract, event: "StrategyAddedToOperatorSet", logs: logs, sub: sub}, nil +} + +// WatchStrategyAddedToOperatorSet is a free log subscription operation binding the contract event 0x7ab260fe0af193db5f4986770d831bda4ea46099dc817e8b6716dcae8af8e88b. +// +// Solidity: event StrategyAddedToOperatorSet((address,uint32) operatorSet, address strategy) +func (_AllocationManager *AllocationManagerFilterer) WatchStrategyAddedToOperatorSet(opts *bind.WatchOpts, sink chan<- *AllocationManagerStrategyAddedToOperatorSet) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "StrategyAddedToOperatorSet") + 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(AllocationManagerStrategyAddedToOperatorSet) + if err := _AllocationManager.contract.UnpackLog(event, "StrategyAddedToOperatorSet", 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 +} + +// ParseStrategyAddedToOperatorSet is a log parse operation binding the contract event 0x7ab260fe0af193db5f4986770d831bda4ea46099dc817e8b6716dcae8af8e88b. +// +// Solidity: event StrategyAddedToOperatorSet((address,uint32) operatorSet, address strategy) +func (_AllocationManager *AllocationManagerFilterer) ParseStrategyAddedToOperatorSet(log types.Log) (*AllocationManagerStrategyAddedToOperatorSet, error) { + event := new(AllocationManagerStrategyAddedToOperatorSet) + if err := _AllocationManager.contract.UnpackLog(event, "StrategyAddedToOperatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerStrategyRemovedFromOperatorSetIterator is returned from FilterStrategyRemovedFromOperatorSet and is used to iterate over the raw logs and unpacked data for StrategyRemovedFromOperatorSet events raised by the AllocationManager contract. +type AllocationManagerStrategyRemovedFromOperatorSetIterator struct { + Event *AllocationManagerStrategyRemovedFromOperatorSet // 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 *AllocationManagerStrategyRemovedFromOperatorSetIterator) 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(AllocationManagerStrategyRemovedFromOperatorSet) + 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(AllocationManagerStrategyRemovedFromOperatorSet) + 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 *AllocationManagerStrategyRemovedFromOperatorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerStrategyRemovedFromOperatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerStrategyRemovedFromOperatorSet represents a StrategyRemovedFromOperatorSet event raised by the AllocationManager contract. +type AllocationManagerStrategyRemovedFromOperatorSet struct { + OperatorSet OperatorSet + Strategy common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStrategyRemovedFromOperatorSet is a free log retrieval operation binding the contract event 0x7b4b073d80dcac55a11177d8459ad9f664ceeb91f71f27167bb14f8152a7eeee. +// +// Solidity: event StrategyRemovedFromOperatorSet((address,uint32) operatorSet, address strategy) +func (_AllocationManager *AllocationManagerFilterer) FilterStrategyRemovedFromOperatorSet(opts *bind.FilterOpts) (*AllocationManagerStrategyRemovedFromOperatorSetIterator, error) { + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "StrategyRemovedFromOperatorSet") + if err != nil { + return nil, err + } + return &AllocationManagerStrategyRemovedFromOperatorSetIterator{contract: _AllocationManager.contract, event: "StrategyRemovedFromOperatorSet", logs: logs, sub: sub}, nil +} + +// WatchStrategyRemovedFromOperatorSet is a free log subscription operation binding the contract event 0x7b4b073d80dcac55a11177d8459ad9f664ceeb91f71f27167bb14f8152a7eeee. +// +// Solidity: event StrategyRemovedFromOperatorSet((address,uint32) operatorSet, address strategy) +func (_AllocationManager *AllocationManagerFilterer) WatchStrategyRemovedFromOperatorSet(opts *bind.WatchOpts, sink chan<- *AllocationManagerStrategyRemovedFromOperatorSet) (event.Subscription, error) { + + logs, sub, err := _AllocationManager.contract.WatchLogs(opts, "StrategyRemovedFromOperatorSet") + 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(AllocationManagerStrategyRemovedFromOperatorSet) + if err := _AllocationManager.contract.UnpackLog(event, "StrategyRemovedFromOperatorSet", 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 +} + +// ParseStrategyRemovedFromOperatorSet is a log parse operation binding the contract event 0x7b4b073d80dcac55a11177d8459ad9f664ceeb91f71f27167bb14f8152a7eeee. +// +// Solidity: event StrategyRemovedFromOperatorSet((address,uint32) operatorSet, address strategy) +func (_AllocationManager *AllocationManagerFilterer) ParseStrategyRemovedFromOperatorSet(log types.Log) (*AllocationManagerStrategyRemovedFromOperatorSet, error) { + event := new(AllocationManagerStrategyRemovedFromOperatorSet) + if err := _AllocationManager.contract.UnpackLog(event, "StrategyRemovedFromOperatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// AllocationManagerUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the AllocationManager contract. +type AllocationManagerUnpausedIterator struct { + Event *AllocationManagerUnpaused // 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 *AllocationManagerUnpausedIterator) 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(AllocationManagerUnpaused) + 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(AllocationManagerUnpaused) + 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 *AllocationManagerUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AllocationManagerUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AllocationManagerUnpaused represents a Unpaused event raised by the AllocationManager contract. +type AllocationManagerUnpaused 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 (_AllocationManager *AllocationManagerFilterer) FilterUnpaused(opts *bind.FilterOpts, account []common.Address) (*AllocationManagerUnpausedIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _AllocationManager.contract.FilterLogs(opts, "Unpaused", accountRule) + if err != nil { + return nil, err + } + return &AllocationManagerUnpausedIterator{contract: _AllocationManager.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 (_AllocationManager *AllocationManagerFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *AllocationManagerUnpaused, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _AllocationManager.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(AllocationManagerUnpaused) + if err := _AllocationManager.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 (_AllocationManager *AllocationManagerFilterer) ParseUnpaused(log types.Log) (*AllocationManagerUnpaused, error) { + event := new(AllocationManagerUnpaused) + if err := _AllocationManager.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/bindings/IBLSApkRegistry/binding.go b/contracts/bindings/IBLSApkRegistry/binding.go new file mode 100644 index 0000000..8f4e7ee --- /dev/null +++ b/contracts/bindings/IBLSApkRegistry/binding.go @@ -0,0 +1,1345 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contractIBLSApkRegistry + +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 +) + +// BN254G1Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G1Point struct { + X *big.Int + Y *big.Int +} + +// BN254G2Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G2Point struct { + X [2]*big.Int + Y [2]*big.Int +} + +// IBLSApkRegistryTypesApkUpdate is an auto generated low-level Go binding around an user-defined struct. +type IBLSApkRegistryTypesApkUpdate struct { + ApkHash [24]byte + UpdateBlockNumber uint32 + NextUpdateBlockNumber uint32 +} + +// IBLSApkRegistryTypesPubkeyRegistrationParams is an auto generated low-level Go binding around an user-defined struct. +type IBLSApkRegistryTypesPubkeyRegistrationParams struct { + PubkeyRegistrationSignature BN254G1Point + PubkeyG1 BN254G1Point + PubkeyG2 BN254G2Point +} + +// IBLSApkRegistryMetaData contains all meta data concerning the IBLSApkRegistry contract. +var IBLSApkRegistryMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"apkHistory\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes24\",\"internalType\":\"bytes24\"},{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"currentApk\",\"inputs\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"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\":\"structIBLSApkRegistryTypes.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\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorId\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorPubkeyG2\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOrRegisterOperatorId\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIBLSApkRegistryTypes.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\":\"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\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorToPubkeyHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"operatorId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pubkeyHashToOperator\",\"inputs\":[{\"name\":\"pubkeyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerBLSPublicKey\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structIBLSApkRegistryTypes.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\":\"NewG2PubkeyRegistration\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"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\":\"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\":\"operatorId\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorRemovedFromQuorums\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"operatorId\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"BLSPubkeyAlreadyRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BlockNumberBeforeFirstUpdate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BlockNumberNotLatest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BlockNumberTooRecent\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"G2PubkeyAlreadySet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidBLSSignatureOrPrivateKey\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyRegistryCoordinator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyRegistryCoordinatorOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorAlreadyRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorNotRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"QuorumAlreadyExists\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"QuorumDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ZeroPubKey\",\"inputs\":[]}]", +} + +// IBLSApkRegistryABI is the input ABI used to generate the binding from. +// Deprecated: Use IBLSApkRegistryMetaData.ABI instead. +var IBLSApkRegistryABI = IBLSApkRegistryMetaData.ABI + +// IBLSApkRegistry is an auto generated Go binding around an Ethereum contract. +type IBLSApkRegistry struct { + IBLSApkRegistryCaller // Read-only binding to the contract + IBLSApkRegistryTransactor // Write-only binding to the contract + IBLSApkRegistryFilterer // Log filterer for contract events +} + +// IBLSApkRegistryCaller is an auto generated read-only Go binding around an Ethereum contract. +type IBLSApkRegistryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IBLSApkRegistryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IBLSApkRegistryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IBLSApkRegistryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IBLSApkRegistryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IBLSApkRegistrySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IBLSApkRegistrySession struct { + Contract *IBLSApkRegistry // 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 +} + +// IBLSApkRegistryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IBLSApkRegistryCallerSession struct { + Contract *IBLSApkRegistryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IBLSApkRegistryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IBLSApkRegistryTransactorSession struct { + Contract *IBLSApkRegistryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IBLSApkRegistryRaw is an auto generated low-level Go binding around an Ethereum contract. +type IBLSApkRegistryRaw struct { + Contract *IBLSApkRegistry // Generic contract binding to access the raw methods on +} + +// IBLSApkRegistryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IBLSApkRegistryCallerRaw struct { + Contract *IBLSApkRegistryCaller // Generic read-only contract binding to access the raw methods on +} + +// IBLSApkRegistryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IBLSApkRegistryTransactorRaw struct { + Contract *IBLSApkRegistryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIBLSApkRegistry creates a new instance of IBLSApkRegistry, bound to a specific deployed contract. +func NewIBLSApkRegistry(address common.Address, backend bind.ContractBackend) (*IBLSApkRegistry, error) { + contract, err := bindIBLSApkRegistry(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IBLSApkRegistry{IBLSApkRegistryCaller: IBLSApkRegistryCaller{contract: contract}, IBLSApkRegistryTransactor: IBLSApkRegistryTransactor{contract: contract}, IBLSApkRegistryFilterer: IBLSApkRegistryFilterer{contract: contract}}, nil +} + +// NewIBLSApkRegistryCaller creates a new read-only instance of IBLSApkRegistry, bound to a specific deployed contract. +func NewIBLSApkRegistryCaller(address common.Address, caller bind.ContractCaller) (*IBLSApkRegistryCaller, error) { + contract, err := bindIBLSApkRegistry(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IBLSApkRegistryCaller{contract: contract}, nil +} + +// NewIBLSApkRegistryTransactor creates a new write-only instance of IBLSApkRegistry, bound to a specific deployed contract. +func NewIBLSApkRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*IBLSApkRegistryTransactor, error) { + contract, err := bindIBLSApkRegistry(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IBLSApkRegistryTransactor{contract: contract}, nil +} + +// NewIBLSApkRegistryFilterer creates a new log filterer instance of IBLSApkRegistry, bound to a specific deployed contract. +func NewIBLSApkRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*IBLSApkRegistryFilterer, error) { + contract, err := bindIBLSApkRegistry(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IBLSApkRegistryFilterer{contract: contract}, nil +} + +// bindIBLSApkRegistry binds a generic wrapper to an already deployed contract. +func bindIBLSApkRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IBLSApkRegistryMetaData.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 (_IBLSApkRegistry *IBLSApkRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IBLSApkRegistry.Contract.IBLSApkRegistryCaller.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 (_IBLSApkRegistry *IBLSApkRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.IBLSApkRegistryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IBLSApkRegistry *IBLSApkRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.IBLSApkRegistryTransactor.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 (_IBLSApkRegistry *IBLSApkRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IBLSApkRegistry.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 (_IBLSApkRegistry *IBLSApkRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IBLSApkRegistry *IBLSApkRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.contract.Transact(opts, method, params...) +} + +// ApkHistory is a free data retrieval call binding the contract method 0x7916cea6. +// +// Solidity: function apkHistory(uint8 quorumNumber, uint256 index) view returns(bytes24, uint32, uint32) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) ApkHistory(opts *bind.CallOpts, quorumNumber uint8, index *big.Int) ([24]byte, uint32, uint32, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "apkHistory", quorumNumber, index) + + if err != nil { + return *new([24]byte), *new(uint32), *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new([24]byte)).(*[24]byte) + out1 := *abi.ConvertType(out[1], new(uint32)).(*uint32) + out2 := *abi.ConvertType(out[2], new(uint32)).(*uint32) + + return out0, out1, out2, err + +} + +// ApkHistory is a free data retrieval call binding the contract method 0x7916cea6. +// +// Solidity: function apkHistory(uint8 quorumNumber, uint256 index) view returns(bytes24, uint32, uint32) +func (_IBLSApkRegistry *IBLSApkRegistrySession) ApkHistory(quorumNumber uint8, index *big.Int) ([24]byte, uint32, uint32, error) { + return _IBLSApkRegistry.Contract.ApkHistory(&_IBLSApkRegistry.CallOpts, quorumNumber, index) +} + +// ApkHistory is a free data retrieval call binding the contract method 0x7916cea6. +// +// Solidity: function apkHistory(uint8 quorumNumber, uint256 index) view returns(bytes24, uint32, uint32) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) ApkHistory(quorumNumber uint8, index *big.Int) ([24]byte, uint32, uint32, error) { + return _IBLSApkRegistry.Contract.ApkHistory(&_IBLSApkRegistry.CallOpts, quorumNumber, index) +} + +// CurrentApk is a free data retrieval call binding the contract method 0xa3db80e2. +// +// Solidity: function currentApk(uint8 quorumNumber) view returns(uint256, uint256) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) CurrentApk(opts *bind.CallOpts, quorumNumber uint8) (*big.Int, *big.Int, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "currentApk", quorumNumber) + + if err != nil { + return *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return out0, out1, err + +} + +// CurrentApk is a free data retrieval call binding the contract method 0xa3db80e2. +// +// Solidity: function currentApk(uint8 quorumNumber) view returns(uint256, uint256) +func (_IBLSApkRegistry *IBLSApkRegistrySession) CurrentApk(quorumNumber uint8) (*big.Int, *big.Int, error) { + return _IBLSApkRegistry.Contract.CurrentApk(&_IBLSApkRegistry.CallOpts, quorumNumber) +} + +// CurrentApk is a free data retrieval call binding the contract method 0xa3db80e2. +// +// Solidity: function currentApk(uint8 quorumNumber) view returns(uint256, uint256) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) CurrentApk(quorumNumber uint8) (*big.Int, *big.Int, error) { + return _IBLSApkRegistry.Contract.CurrentApk(&_IBLSApkRegistry.CallOpts, quorumNumber) +} + +// GetApk is a free data retrieval call binding the contract method 0x5f61a884. +// +// Solidity: function getApk(uint8 quorumNumber) view returns((uint256,uint256)) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetApk(opts *bind.CallOpts, quorumNumber uint8) (BN254G1Point, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getApk", quorumNumber) + + if err != nil { + return *new(BN254G1Point), err + } + + out0 := *abi.ConvertType(out[0], new(BN254G1Point)).(*BN254G1Point) + + return out0, err + +} + +// GetApk is a free data retrieval call binding the contract method 0x5f61a884. +// +// Solidity: function getApk(uint8 quorumNumber) view returns((uint256,uint256)) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetApk(quorumNumber uint8) (BN254G1Point, error) { + return _IBLSApkRegistry.Contract.GetApk(&_IBLSApkRegistry.CallOpts, quorumNumber) +} + +// GetApk is a free data retrieval call binding the contract method 0x5f61a884. +// +// Solidity: function getApk(uint8 quorumNumber) view returns((uint256,uint256)) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetApk(quorumNumber uint8) (BN254G1Point, error) { + return _IBLSApkRegistry.Contract.GetApk(&_IBLSApkRegistry.CallOpts, quorumNumber) +} + +// GetApkHashAtBlockNumberAndIndex is a free data retrieval call binding the contract method 0x68bccaac. +// +// Solidity: function getApkHashAtBlockNumberAndIndex(uint8 quorumNumber, uint32 blockNumber, uint256 index) view returns(bytes24) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetApkHashAtBlockNumberAndIndex(opts *bind.CallOpts, quorumNumber uint8, blockNumber uint32, index *big.Int) ([24]byte, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getApkHashAtBlockNumberAndIndex", quorumNumber, blockNumber, index) + + if err != nil { + return *new([24]byte), err + } + + out0 := *abi.ConvertType(out[0], new([24]byte)).(*[24]byte) + + return out0, err + +} + +// GetApkHashAtBlockNumberAndIndex is a free data retrieval call binding the contract method 0x68bccaac. +// +// Solidity: function getApkHashAtBlockNumberAndIndex(uint8 quorumNumber, uint32 blockNumber, uint256 index) view returns(bytes24) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetApkHashAtBlockNumberAndIndex(quorumNumber uint8, blockNumber uint32, index *big.Int) ([24]byte, error) { + return _IBLSApkRegistry.Contract.GetApkHashAtBlockNumberAndIndex(&_IBLSApkRegistry.CallOpts, quorumNumber, blockNumber, index) +} + +// GetApkHashAtBlockNumberAndIndex is a free data retrieval call binding the contract method 0x68bccaac. +// +// Solidity: function getApkHashAtBlockNumberAndIndex(uint8 quorumNumber, uint32 blockNumber, uint256 index) view returns(bytes24) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetApkHashAtBlockNumberAndIndex(quorumNumber uint8, blockNumber uint32, index *big.Int) ([24]byte, error) { + return _IBLSApkRegistry.Contract.GetApkHashAtBlockNumberAndIndex(&_IBLSApkRegistry.CallOpts, quorumNumber, blockNumber, index) +} + +// GetApkHistoryLength is a free data retrieval call binding the contract method 0x377ed99d. +// +// Solidity: function getApkHistoryLength(uint8 quorumNumber) view returns(uint32) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetApkHistoryLength(opts *bind.CallOpts, quorumNumber uint8) (uint32, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getApkHistoryLength", quorumNumber) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// GetApkHistoryLength is a free data retrieval call binding the contract method 0x377ed99d. +// +// Solidity: function getApkHistoryLength(uint8 quorumNumber) view returns(uint32) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetApkHistoryLength(quorumNumber uint8) (uint32, error) { + return _IBLSApkRegistry.Contract.GetApkHistoryLength(&_IBLSApkRegistry.CallOpts, quorumNumber) +} + +// GetApkHistoryLength is a free data retrieval call binding the contract method 0x377ed99d. +// +// Solidity: function getApkHistoryLength(uint8 quorumNumber) view returns(uint32) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetApkHistoryLength(quorumNumber uint8) (uint32, error) { + return _IBLSApkRegistry.Contract.GetApkHistoryLength(&_IBLSApkRegistry.CallOpts, quorumNumber) +} + +// GetApkIndicesAtBlockNumber is a free data retrieval call binding the contract method 0xd5254a8c. +// +// Solidity: function getApkIndicesAtBlockNumber(bytes quorumNumbers, uint256 blockNumber) view returns(uint32[]) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetApkIndicesAtBlockNumber(opts *bind.CallOpts, quorumNumbers []byte, blockNumber *big.Int) ([]uint32, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getApkIndicesAtBlockNumber", quorumNumbers, blockNumber) + + if err != nil { + return *new([]uint32), err + } + + out0 := *abi.ConvertType(out[0], new([]uint32)).(*[]uint32) + + return out0, err + +} + +// GetApkIndicesAtBlockNumber is a free data retrieval call binding the contract method 0xd5254a8c. +// +// Solidity: function getApkIndicesAtBlockNumber(bytes quorumNumbers, uint256 blockNumber) view returns(uint32[]) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetApkIndicesAtBlockNumber(quorumNumbers []byte, blockNumber *big.Int) ([]uint32, error) { + return _IBLSApkRegistry.Contract.GetApkIndicesAtBlockNumber(&_IBLSApkRegistry.CallOpts, quorumNumbers, blockNumber) +} + +// GetApkIndicesAtBlockNumber is a free data retrieval call binding the contract method 0xd5254a8c. +// +// Solidity: function getApkIndicesAtBlockNumber(bytes quorumNumbers, uint256 blockNumber) view returns(uint32[]) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetApkIndicesAtBlockNumber(quorumNumbers []byte, blockNumber *big.Int) ([]uint32, error) { + return _IBLSApkRegistry.Contract.GetApkIndicesAtBlockNumber(&_IBLSApkRegistry.CallOpts, quorumNumbers, blockNumber) +} + +// GetApkUpdateAtIndex is a free data retrieval call binding the contract method 0x605747d5. +// +// Solidity: function getApkUpdateAtIndex(uint8 quorumNumber, uint256 index) view returns((bytes24,uint32,uint32)) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetApkUpdateAtIndex(opts *bind.CallOpts, quorumNumber uint8, index *big.Int) (IBLSApkRegistryTypesApkUpdate, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getApkUpdateAtIndex", quorumNumber, index) + + if err != nil { + return *new(IBLSApkRegistryTypesApkUpdate), err + } + + out0 := *abi.ConvertType(out[0], new(IBLSApkRegistryTypesApkUpdate)).(*IBLSApkRegistryTypesApkUpdate) + + return out0, err + +} + +// GetApkUpdateAtIndex is a free data retrieval call binding the contract method 0x605747d5. +// +// Solidity: function getApkUpdateAtIndex(uint8 quorumNumber, uint256 index) view returns((bytes24,uint32,uint32)) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetApkUpdateAtIndex(quorumNumber uint8, index *big.Int) (IBLSApkRegistryTypesApkUpdate, error) { + return _IBLSApkRegistry.Contract.GetApkUpdateAtIndex(&_IBLSApkRegistry.CallOpts, quorumNumber, index) +} + +// GetApkUpdateAtIndex is a free data retrieval call binding the contract method 0x605747d5. +// +// Solidity: function getApkUpdateAtIndex(uint8 quorumNumber, uint256 index) view returns((bytes24,uint32,uint32)) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetApkUpdateAtIndex(quorumNumber uint8, index *big.Int) (IBLSApkRegistryTypesApkUpdate, error) { + return _IBLSApkRegistry.Contract.GetApkUpdateAtIndex(&_IBLSApkRegistry.CallOpts, quorumNumber, index) +} + +// GetOperatorFromPubkeyHash is a free data retrieval call binding the contract method 0x47b314e8. +// +// Solidity: function getOperatorFromPubkeyHash(bytes32 pubkeyHash) view returns(address operator) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetOperatorFromPubkeyHash(opts *bind.CallOpts, pubkeyHash [32]byte) (common.Address, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getOperatorFromPubkeyHash", pubkeyHash) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetOperatorFromPubkeyHash is a free data retrieval call binding the contract method 0x47b314e8. +// +// Solidity: function getOperatorFromPubkeyHash(bytes32 pubkeyHash) view returns(address operator) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetOperatorFromPubkeyHash(pubkeyHash [32]byte) (common.Address, error) { + return _IBLSApkRegistry.Contract.GetOperatorFromPubkeyHash(&_IBLSApkRegistry.CallOpts, pubkeyHash) +} + +// GetOperatorFromPubkeyHash is a free data retrieval call binding the contract method 0x47b314e8. +// +// Solidity: function getOperatorFromPubkeyHash(bytes32 pubkeyHash) view returns(address operator) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetOperatorFromPubkeyHash(pubkeyHash [32]byte) (common.Address, error) { + return _IBLSApkRegistry.Contract.GetOperatorFromPubkeyHash(&_IBLSApkRegistry.CallOpts, pubkeyHash) +} + +// GetOperatorId is a free data retrieval call binding the contract method 0x13542a4e. +// +// Solidity: function getOperatorId(address operator) view returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetOperatorId(opts *bind.CallOpts, operator common.Address) ([32]byte, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getOperatorId", operator) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetOperatorId is a free data retrieval call binding the contract method 0x13542a4e. +// +// Solidity: function getOperatorId(address operator) view returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetOperatorId(operator common.Address) ([32]byte, error) { + return _IBLSApkRegistry.Contract.GetOperatorId(&_IBLSApkRegistry.CallOpts, operator) +} + +// GetOperatorId is a free data retrieval call binding the contract method 0x13542a4e. +// +// Solidity: function getOperatorId(address operator) view returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetOperatorId(operator common.Address) ([32]byte, error) { + return _IBLSApkRegistry.Contract.GetOperatorId(&_IBLSApkRegistry.CallOpts, operator) +} + +// GetOperatorPubkeyG2 is a free data retrieval call binding the contract method 0x67169911. +// +// Solidity: function getOperatorPubkeyG2(address operator) view returns((uint256[2],uint256[2])) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetOperatorPubkeyG2(opts *bind.CallOpts, operator common.Address) (BN254G2Point, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getOperatorPubkeyG2", operator) + + if err != nil { + return *new(BN254G2Point), err + } + + out0 := *abi.ConvertType(out[0], new(BN254G2Point)).(*BN254G2Point) + + return out0, err + +} + +// GetOperatorPubkeyG2 is a free data retrieval call binding the contract method 0x67169911. +// +// Solidity: function getOperatorPubkeyG2(address operator) view returns((uint256[2],uint256[2])) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetOperatorPubkeyG2(operator common.Address) (BN254G2Point, error) { + return _IBLSApkRegistry.Contract.GetOperatorPubkeyG2(&_IBLSApkRegistry.CallOpts, operator) +} + +// GetOperatorPubkeyG2 is a free data retrieval call binding the contract method 0x67169911. +// +// Solidity: function getOperatorPubkeyG2(address operator) view returns((uint256[2],uint256[2])) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetOperatorPubkeyG2(operator common.Address) (BN254G2Point, error) { + return _IBLSApkRegistry.Contract.GetOperatorPubkeyG2(&_IBLSApkRegistry.CallOpts, operator) +} + +// GetRegisteredPubkey is a free data retrieval call binding the contract method 0x7ff81a87. +// +// Solidity: function getRegisteredPubkey(address operator) view returns((uint256,uint256), bytes32) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) GetRegisteredPubkey(opts *bind.CallOpts, operator common.Address) (BN254G1Point, [32]byte, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "getRegisteredPubkey", operator) + + if err != nil { + return *new(BN254G1Point), *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new(BN254G1Point)).(*BN254G1Point) + out1 := *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) + + return out0, out1, err + +} + +// GetRegisteredPubkey is a free data retrieval call binding the contract method 0x7ff81a87. +// +// Solidity: function getRegisteredPubkey(address operator) view returns((uint256,uint256), bytes32) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetRegisteredPubkey(operator common.Address) (BN254G1Point, [32]byte, error) { + return _IBLSApkRegistry.Contract.GetRegisteredPubkey(&_IBLSApkRegistry.CallOpts, operator) +} + +// GetRegisteredPubkey is a free data retrieval call binding the contract method 0x7ff81a87. +// +// Solidity: function getRegisteredPubkey(address operator) view returns((uint256,uint256), bytes32) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) GetRegisteredPubkey(operator common.Address) (BN254G1Point, [32]byte, error) { + return _IBLSApkRegistry.Contract.GetRegisteredPubkey(&_IBLSApkRegistry.CallOpts, operator) +} + +// OperatorToPubkey is a free data retrieval call binding the contract method 0x00a1f4cb. +// +// Solidity: function operatorToPubkey(address operator) view returns(uint256, uint256) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) OperatorToPubkey(opts *bind.CallOpts, operator common.Address) (*big.Int, *big.Int, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "operatorToPubkey", operator) + + if err != nil { + return *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return out0, out1, err + +} + +// OperatorToPubkey is a free data retrieval call binding the contract method 0x00a1f4cb. +// +// Solidity: function operatorToPubkey(address operator) view returns(uint256, uint256) +func (_IBLSApkRegistry *IBLSApkRegistrySession) OperatorToPubkey(operator common.Address) (*big.Int, *big.Int, error) { + return _IBLSApkRegistry.Contract.OperatorToPubkey(&_IBLSApkRegistry.CallOpts, operator) +} + +// OperatorToPubkey is a free data retrieval call binding the contract method 0x00a1f4cb. +// +// Solidity: function operatorToPubkey(address operator) view returns(uint256, uint256) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) OperatorToPubkey(operator common.Address) (*big.Int, *big.Int, error) { + return _IBLSApkRegistry.Contract.OperatorToPubkey(&_IBLSApkRegistry.CallOpts, operator) +} + +// OperatorToPubkeyHash is a free data retrieval call binding the contract method 0xde29fac0. +// +// Solidity: function operatorToPubkeyHash(address operator) view returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) OperatorToPubkeyHash(opts *bind.CallOpts, operator common.Address) ([32]byte, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "operatorToPubkeyHash", operator) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// OperatorToPubkeyHash is a free data retrieval call binding the contract method 0xde29fac0. +// +// Solidity: function operatorToPubkeyHash(address operator) view returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistrySession) OperatorToPubkeyHash(operator common.Address) ([32]byte, error) { + return _IBLSApkRegistry.Contract.OperatorToPubkeyHash(&_IBLSApkRegistry.CallOpts, operator) +} + +// OperatorToPubkeyHash is a free data retrieval call binding the contract method 0xde29fac0. +// +// Solidity: function operatorToPubkeyHash(address operator) view returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) OperatorToPubkeyHash(operator common.Address) ([32]byte, error) { + return _IBLSApkRegistry.Contract.OperatorToPubkeyHash(&_IBLSApkRegistry.CallOpts, operator) +} + +// PubkeyHashToOperator is a free data retrieval call binding the contract method 0xe8bb9ae6. +// +// Solidity: function pubkeyHashToOperator(bytes32 pubkeyHash) view returns(address operator) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) PubkeyHashToOperator(opts *bind.CallOpts, pubkeyHash [32]byte) (common.Address, error) { + var out []interface{} + err := _IBLSApkRegistry.contract.Call(opts, &out, "pubkeyHashToOperator", pubkeyHash) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PubkeyHashToOperator is a free data retrieval call binding the contract method 0xe8bb9ae6. +// +// Solidity: function pubkeyHashToOperator(bytes32 pubkeyHash) view returns(address operator) +func (_IBLSApkRegistry *IBLSApkRegistrySession) PubkeyHashToOperator(pubkeyHash [32]byte) (common.Address, error) { + return _IBLSApkRegistry.Contract.PubkeyHashToOperator(&_IBLSApkRegistry.CallOpts, pubkeyHash) +} + +// PubkeyHashToOperator is a free data retrieval call binding the contract method 0xe8bb9ae6. +// +// Solidity: function pubkeyHashToOperator(bytes32 pubkeyHash) view returns(address operator) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) PubkeyHashToOperator(pubkeyHash [32]byte) (common.Address, error) { + return _IBLSApkRegistry.Contract.PubkeyHashToOperator(&_IBLSApkRegistry.CallOpts, pubkeyHash) +} + +// RegistryCoordinator is a free data retrieval call binding the contract method 0x6d14a987. +// +// Solidity: function registryCoordinator() view returns(address) +func (_IBLSApkRegistry *IBLSApkRegistryCaller) RegistryCoordinator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IBLSApkRegistry.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 (_IBLSApkRegistry *IBLSApkRegistrySession) RegistryCoordinator() (common.Address, error) { + return _IBLSApkRegistry.Contract.RegistryCoordinator(&_IBLSApkRegistry.CallOpts) +} + +// RegistryCoordinator is a free data retrieval call binding the contract method 0x6d14a987. +// +// Solidity: function registryCoordinator() view returns(address) +func (_IBLSApkRegistry *IBLSApkRegistryCallerSession) RegistryCoordinator() (common.Address, error) { + return _IBLSApkRegistry.Contract.RegistryCoordinator(&_IBLSApkRegistry.CallOpts) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xf4e24fe5. +// +// Solidity: function deregisterOperator(address operator, bytes quorumNumbers) returns() +func (_IBLSApkRegistry *IBLSApkRegistryTransactor) DeregisterOperator(opts *bind.TransactOpts, operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _IBLSApkRegistry.contract.Transact(opts, "deregisterOperator", operator, quorumNumbers) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xf4e24fe5. +// +// Solidity: function deregisterOperator(address operator, bytes quorumNumbers) returns() +func (_IBLSApkRegistry *IBLSApkRegistrySession) DeregisterOperator(operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.DeregisterOperator(&_IBLSApkRegistry.TransactOpts, operator, quorumNumbers) +} + +// DeregisterOperator is a paid mutator transaction binding the contract method 0xf4e24fe5. +// +// Solidity: function deregisterOperator(address operator, bytes quorumNumbers) returns() +func (_IBLSApkRegistry *IBLSApkRegistryTransactorSession) DeregisterOperator(operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.DeregisterOperator(&_IBLSApkRegistry.TransactOpts, operator, quorumNumbers) +} + +// GetOrRegisterOperatorId is a paid mutator transaction binding the contract method 0x03c5a6b6. +// +// Solidity: function getOrRegisterOperatorId(address operator, ((uint256,uint256),(uint256,uint256),(uint256[2],uint256[2])) params, (uint256,uint256) pubkeyRegistrationMessageHash) returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistryTransactor) GetOrRegisterOperatorId(opts *bind.TransactOpts, operator common.Address, params IBLSApkRegistryTypesPubkeyRegistrationParams, pubkeyRegistrationMessageHash BN254G1Point) (*types.Transaction, error) { + return _IBLSApkRegistry.contract.Transact(opts, "getOrRegisterOperatorId", operator, params, pubkeyRegistrationMessageHash) +} + +// GetOrRegisterOperatorId is a paid mutator transaction binding the contract method 0x03c5a6b6. +// +// Solidity: function getOrRegisterOperatorId(address operator, ((uint256,uint256),(uint256,uint256),(uint256[2],uint256[2])) params, (uint256,uint256) pubkeyRegistrationMessageHash) returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistrySession) GetOrRegisterOperatorId(operator common.Address, params IBLSApkRegistryTypesPubkeyRegistrationParams, pubkeyRegistrationMessageHash BN254G1Point) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.GetOrRegisterOperatorId(&_IBLSApkRegistry.TransactOpts, operator, params, pubkeyRegistrationMessageHash) +} + +// GetOrRegisterOperatorId is a paid mutator transaction binding the contract method 0x03c5a6b6. +// +// Solidity: function getOrRegisterOperatorId(address operator, ((uint256,uint256),(uint256,uint256),(uint256[2],uint256[2])) params, (uint256,uint256) pubkeyRegistrationMessageHash) returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistryTransactorSession) GetOrRegisterOperatorId(operator common.Address, params IBLSApkRegistryTypesPubkeyRegistrationParams, pubkeyRegistrationMessageHash BN254G1Point) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.GetOrRegisterOperatorId(&_IBLSApkRegistry.TransactOpts, operator, params, pubkeyRegistrationMessageHash) +} + +// InitializeQuorum is a paid mutator transaction binding the contract method 0x26d941f2. +// +// Solidity: function initializeQuorum(uint8 quorumNumber) returns() +func (_IBLSApkRegistry *IBLSApkRegistryTransactor) InitializeQuorum(opts *bind.TransactOpts, quorumNumber uint8) (*types.Transaction, error) { + return _IBLSApkRegistry.contract.Transact(opts, "initializeQuorum", quorumNumber) +} + +// InitializeQuorum is a paid mutator transaction binding the contract method 0x26d941f2. +// +// Solidity: function initializeQuorum(uint8 quorumNumber) returns() +func (_IBLSApkRegistry *IBLSApkRegistrySession) InitializeQuorum(quorumNumber uint8) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.InitializeQuorum(&_IBLSApkRegistry.TransactOpts, quorumNumber) +} + +// InitializeQuorum is a paid mutator transaction binding the contract method 0x26d941f2. +// +// Solidity: function initializeQuorum(uint8 quorumNumber) returns() +func (_IBLSApkRegistry *IBLSApkRegistryTransactorSession) InitializeQuorum(quorumNumber uint8) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.InitializeQuorum(&_IBLSApkRegistry.TransactOpts, quorumNumber) +} + +// RegisterBLSPublicKey is a paid mutator transaction binding the contract method 0xbf79ce58. +// +// Solidity: function registerBLSPublicKey(address operator, ((uint256,uint256),(uint256,uint256),(uint256[2],uint256[2])) params, (uint256,uint256) pubkeyRegistrationMessageHash) returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistryTransactor) RegisterBLSPublicKey(opts *bind.TransactOpts, operator common.Address, params IBLSApkRegistryTypesPubkeyRegistrationParams, pubkeyRegistrationMessageHash BN254G1Point) (*types.Transaction, error) { + return _IBLSApkRegistry.contract.Transact(opts, "registerBLSPublicKey", operator, params, pubkeyRegistrationMessageHash) +} + +// RegisterBLSPublicKey is a paid mutator transaction binding the contract method 0xbf79ce58. +// +// Solidity: function registerBLSPublicKey(address operator, ((uint256,uint256),(uint256,uint256),(uint256[2],uint256[2])) params, (uint256,uint256) pubkeyRegistrationMessageHash) returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistrySession) RegisterBLSPublicKey(operator common.Address, params IBLSApkRegistryTypesPubkeyRegistrationParams, pubkeyRegistrationMessageHash BN254G1Point) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.RegisterBLSPublicKey(&_IBLSApkRegistry.TransactOpts, operator, params, pubkeyRegistrationMessageHash) +} + +// RegisterBLSPublicKey is a paid mutator transaction binding the contract method 0xbf79ce58. +// +// Solidity: function registerBLSPublicKey(address operator, ((uint256,uint256),(uint256,uint256),(uint256[2],uint256[2])) params, (uint256,uint256) pubkeyRegistrationMessageHash) returns(bytes32 operatorId) +func (_IBLSApkRegistry *IBLSApkRegistryTransactorSession) RegisterBLSPublicKey(operator common.Address, params IBLSApkRegistryTypesPubkeyRegistrationParams, pubkeyRegistrationMessageHash BN254G1Point) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.RegisterBLSPublicKey(&_IBLSApkRegistry.TransactOpts, operator, params, pubkeyRegistrationMessageHash) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0x3fb27952. +// +// Solidity: function registerOperator(address operator, bytes quorumNumbers) returns() +func (_IBLSApkRegistry *IBLSApkRegistryTransactor) RegisterOperator(opts *bind.TransactOpts, operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _IBLSApkRegistry.contract.Transact(opts, "registerOperator", operator, quorumNumbers) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0x3fb27952. +// +// Solidity: function registerOperator(address operator, bytes quorumNumbers) returns() +func (_IBLSApkRegistry *IBLSApkRegistrySession) RegisterOperator(operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.RegisterOperator(&_IBLSApkRegistry.TransactOpts, operator, quorumNumbers) +} + +// RegisterOperator is a paid mutator transaction binding the contract method 0x3fb27952. +// +// Solidity: function registerOperator(address operator, bytes quorumNumbers) returns() +func (_IBLSApkRegistry *IBLSApkRegistryTransactorSession) RegisterOperator(operator common.Address, quorumNumbers []byte) (*types.Transaction, error) { + return _IBLSApkRegistry.Contract.RegisterOperator(&_IBLSApkRegistry.TransactOpts, operator, quorumNumbers) +} + +// IBLSApkRegistryNewG2PubkeyRegistrationIterator is returned from FilterNewG2PubkeyRegistration and is used to iterate over the raw logs and unpacked data for NewG2PubkeyRegistration events raised by the IBLSApkRegistry contract. +type IBLSApkRegistryNewG2PubkeyRegistrationIterator struct { + Event *IBLSApkRegistryNewG2PubkeyRegistration // 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 *IBLSApkRegistryNewG2PubkeyRegistrationIterator) 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(IBLSApkRegistryNewG2PubkeyRegistration) + 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(IBLSApkRegistryNewG2PubkeyRegistration) + 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 *IBLSApkRegistryNewG2PubkeyRegistrationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IBLSApkRegistryNewG2PubkeyRegistrationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IBLSApkRegistryNewG2PubkeyRegistration represents a NewG2PubkeyRegistration event raised by the IBLSApkRegistry contract. +type IBLSApkRegistryNewG2PubkeyRegistration struct { + Operator common.Address + PubkeyG2 BN254G2Point + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNewG2PubkeyRegistration is a free log retrieval operation binding the contract event 0x5c4f9f28153dbf3f00e69607a59e82ad806fffb78d09f179f62432f7e9d2511a. +// +// Solidity: event NewG2PubkeyRegistration(address indexed operator, (uint256[2],uint256[2]) pubkeyG2) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) FilterNewG2PubkeyRegistration(opts *bind.FilterOpts, operator []common.Address) (*IBLSApkRegistryNewG2PubkeyRegistrationIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IBLSApkRegistry.contract.FilterLogs(opts, "NewG2PubkeyRegistration", operatorRule) + if err != nil { + return nil, err + } + return &IBLSApkRegistryNewG2PubkeyRegistrationIterator{contract: _IBLSApkRegistry.contract, event: "NewG2PubkeyRegistration", logs: logs, sub: sub}, nil +} + +// WatchNewG2PubkeyRegistration is a free log subscription operation binding the contract event 0x5c4f9f28153dbf3f00e69607a59e82ad806fffb78d09f179f62432f7e9d2511a. +// +// Solidity: event NewG2PubkeyRegistration(address indexed operator, (uint256[2],uint256[2]) pubkeyG2) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) WatchNewG2PubkeyRegistration(opts *bind.WatchOpts, sink chan<- *IBLSApkRegistryNewG2PubkeyRegistration, operator []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IBLSApkRegistry.contract.WatchLogs(opts, "NewG2PubkeyRegistration", operatorRule) + 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(IBLSApkRegistryNewG2PubkeyRegistration) + if err := _IBLSApkRegistry.contract.UnpackLog(event, "NewG2PubkeyRegistration", 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 +} + +// ParseNewG2PubkeyRegistration is a log parse operation binding the contract event 0x5c4f9f28153dbf3f00e69607a59e82ad806fffb78d09f179f62432f7e9d2511a. +// +// Solidity: event NewG2PubkeyRegistration(address indexed operator, (uint256[2],uint256[2]) pubkeyG2) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) ParseNewG2PubkeyRegistration(log types.Log) (*IBLSApkRegistryNewG2PubkeyRegistration, error) { + event := new(IBLSApkRegistryNewG2PubkeyRegistration) + if err := _IBLSApkRegistry.contract.UnpackLog(event, "NewG2PubkeyRegistration", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IBLSApkRegistryNewPubkeyRegistrationIterator is returned from FilterNewPubkeyRegistration and is used to iterate over the raw logs and unpacked data for NewPubkeyRegistration events raised by the IBLSApkRegistry contract. +type IBLSApkRegistryNewPubkeyRegistrationIterator struct { + Event *IBLSApkRegistryNewPubkeyRegistration // 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 *IBLSApkRegistryNewPubkeyRegistrationIterator) 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(IBLSApkRegistryNewPubkeyRegistration) + 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(IBLSApkRegistryNewPubkeyRegistration) + 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 *IBLSApkRegistryNewPubkeyRegistrationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IBLSApkRegistryNewPubkeyRegistrationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IBLSApkRegistryNewPubkeyRegistration represents a NewPubkeyRegistration event raised by the IBLSApkRegistry contract. +type IBLSApkRegistryNewPubkeyRegistration struct { + Operator common.Address + PubkeyG1 BN254G1Point + PubkeyG2 BN254G2Point + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNewPubkeyRegistration is a free log retrieval operation binding the contract event 0xe3fb6613af2e8930cf85d47fcf6db10192224a64c6cbe8023e0eee1ba3828041. +// +// Solidity: event NewPubkeyRegistration(address indexed operator, (uint256,uint256) pubkeyG1, (uint256[2],uint256[2]) pubkeyG2) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) FilterNewPubkeyRegistration(opts *bind.FilterOpts, operator []common.Address) (*IBLSApkRegistryNewPubkeyRegistrationIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IBLSApkRegistry.contract.FilterLogs(opts, "NewPubkeyRegistration", operatorRule) + if err != nil { + return nil, err + } + return &IBLSApkRegistryNewPubkeyRegistrationIterator{contract: _IBLSApkRegistry.contract, event: "NewPubkeyRegistration", logs: logs, sub: sub}, nil +} + +// WatchNewPubkeyRegistration is a free log subscription operation binding the contract event 0xe3fb6613af2e8930cf85d47fcf6db10192224a64c6cbe8023e0eee1ba3828041. +// +// Solidity: event NewPubkeyRegistration(address indexed operator, (uint256,uint256) pubkeyG1, (uint256[2],uint256[2]) pubkeyG2) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) WatchNewPubkeyRegistration(opts *bind.WatchOpts, sink chan<- *IBLSApkRegistryNewPubkeyRegistration, operator []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IBLSApkRegistry.contract.WatchLogs(opts, "NewPubkeyRegistration", operatorRule) + 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(IBLSApkRegistryNewPubkeyRegistration) + if err := _IBLSApkRegistry.contract.UnpackLog(event, "NewPubkeyRegistration", 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 +} + +// ParseNewPubkeyRegistration is a log parse operation binding the contract event 0xe3fb6613af2e8930cf85d47fcf6db10192224a64c6cbe8023e0eee1ba3828041. +// +// Solidity: event NewPubkeyRegistration(address indexed operator, (uint256,uint256) pubkeyG1, (uint256[2],uint256[2]) pubkeyG2) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) ParseNewPubkeyRegistration(log types.Log) (*IBLSApkRegistryNewPubkeyRegistration, error) { + event := new(IBLSApkRegistryNewPubkeyRegistration) + if err := _IBLSApkRegistry.contract.UnpackLog(event, "NewPubkeyRegistration", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IBLSApkRegistryOperatorAddedToQuorumsIterator is returned from FilterOperatorAddedToQuorums and is used to iterate over the raw logs and unpacked data for OperatorAddedToQuorums events raised by the IBLSApkRegistry contract. +type IBLSApkRegistryOperatorAddedToQuorumsIterator struct { + Event *IBLSApkRegistryOperatorAddedToQuorums // 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 *IBLSApkRegistryOperatorAddedToQuorumsIterator) 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(IBLSApkRegistryOperatorAddedToQuorums) + 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(IBLSApkRegistryOperatorAddedToQuorums) + 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 *IBLSApkRegistryOperatorAddedToQuorumsIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IBLSApkRegistryOperatorAddedToQuorumsIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IBLSApkRegistryOperatorAddedToQuorums represents a OperatorAddedToQuorums event raised by the IBLSApkRegistry contract. +type IBLSApkRegistryOperatorAddedToQuorums struct { + Operator common.Address + OperatorId [32]byte + QuorumNumbers []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorAddedToQuorums is a free log retrieval operation binding the contract event 0x73a2b7fb844724b971802ae9b15db094d4b7192df9d7350e14eb466b9b22eb4e. +// +// Solidity: event OperatorAddedToQuorums(address operator, bytes32 operatorId, bytes quorumNumbers) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) FilterOperatorAddedToQuorums(opts *bind.FilterOpts) (*IBLSApkRegistryOperatorAddedToQuorumsIterator, error) { + + logs, sub, err := _IBLSApkRegistry.contract.FilterLogs(opts, "OperatorAddedToQuorums") + if err != nil { + return nil, err + } + return &IBLSApkRegistryOperatorAddedToQuorumsIterator{contract: _IBLSApkRegistry.contract, event: "OperatorAddedToQuorums", logs: logs, sub: sub}, nil +} + +// WatchOperatorAddedToQuorums is a free log subscription operation binding the contract event 0x73a2b7fb844724b971802ae9b15db094d4b7192df9d7350e14eb466b9b22eb4e. +// +// Solidity: event OperatorAddedToQuorums(address operator, bytes32 operatorId, bytes quorumNumbers) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) WatchOperatorAddedToQuorums(opts *bind.WatchOpts, sink chan<- *IBLSApkRegistryOperatorAddedToQuorums) (event.Subscription, error) { + + logs, sub, err := _IBLSApkRegistry.contract.WatchLogs(opts, "OperatorAddedToQuorums") + 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(IBLSApkRegistryOperatorAddedToQuorums) + if err := _IBLSApkRegistry.contract.UnpackLog(event, "OperatorAddedToQuorums", 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 +} + +// ParseOperatorAddedToQuorums is a log parse operation binding the contract event 0x73a2b7fb844724b971802ae9b15db094d4b7192df9d7350e14eb466b9b22eb4e. +// +// Solidity: event OperatorAddedToQuorums(address operator, bytes32 operatorId, bytes quorumNumbers) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) ParseOperatorAddedToQuorums(log types.Log) (*IBLSApkRegistryOperatorAddedToQuorums, error) { + event := new(IBLSApkRegistryOperatorAddedToQuorums) + if err := _IBLSApkRegistry.contract.UnpackLog(event, "OperatorAddedToQuorums", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IBLSApkRegistryOperatorRemovedFromQuorumsIterator is returned from FilterOperatorRemovedFromQuorums and is used to iterate over the raw logs and unpacked data for OperatorRemovedFromQuorums events raised by the IBLSApkRegistry contract. +type IBLSApkRegistryOperatorRemovedFromQuorumsIterator struct { + Event *IBLSApkRegistryOperatorRemovedFromQuorums // 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 *IBLSApkRegistryOperatorRemovedFromQuorumsIterator) 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(IBLSApkRegistryOperatorRemovedFromQuorums) + 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(IBLSApkRegistryOperatorRemovedFromQuorums) + 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 *IBLSApkRegistryOperatorRemovedFromQuorumsIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IBLSApkRegistryOperatorRemovedFromQuorumsIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IBLSApkRegistryOperatorRemovedFromQuorums represents a OperatorRemovedFromQuorums event raised by the IBLSApkRegistry contract. +type IBLSApkRegistryOperatorRemovedFromQuorums struct { + Operator common.Address + OperatorId [32]byte + QuorumNumbers []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorRemovedFromQuorums is a free log retrieval operation binding the contract event 0xf843ecd53a563675e62107be1494fdde4a3d49aeedaf8d88c616d85346e3500e. +// +// Solidity: event OperatorRemovedFromQuorums(address operator, bytes32 operatorId, bytes quorumNumbers) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) FilterOperatorRemovedFromQuorums(opts *bind.FilterOpts) (*IBLSApkRegistryOperatorRemovedFromQuorumsIterator, error) { + + logs, sub, err := _IBLSApkRegistry.contract.FilterLogs(opts, "OperatorRemovedFromQuorums") + if err != nil { + return nil, err + } + return &IBLSApkRegistryOperatorRemovedFromQuorumsIterator{contract: _IBLSApkRegistry.contract, event: "OperatorRemovedFromQuorums", logs: logs, sub: sub}, nil +} + +// WatchOperatorRemovedFromQuorums is a free log subscription operation binding the contract event 0xf843ecd53a563675e62107be1494fdde4a3d49aeedaf8d88c616d85346e3500e. +// +// Solidity: event OperatorRemovedFromQuorums(address operator, bytes32 operatorId, bytes quorumNumbers) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) WatchOperatorRemovedFromQuorums(opts *bind.WatchOpts, sink chan<- *IBLSApkRegistryOperatorRemovedFromQuorums) (event.Subscription, error) { + + logs, sub, err := _IBLSApkRegistry.contract.WatchLogs(opts, "OperatorRemovedFromQuorums") + 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(IBLSApkRegistryOperatorRemovedFromQuorums) + if err := _IBLSApkRegistry.contract.UnpackLog(event, "OperatorRemovedFromQuorums", 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 +} + +// ParseOperatorRemovedFromQuorums is a log parse operation binding the contract event 0xf843ecd53a563675e62107be1494fdde4a3d49aeedaf8d88c616d85346e3500e. +// +// Solidity: event OperatorRemovedFromQuorums(address operator, bytes32 operatorId, bytes quorumNumbers) +func (_IBLSApkRegistry *IBLSApkRegistryFilterer) ParseOperatorRemovedFromQuorums(log types.Log) (*IBLSApkRegistryOperatorRemovedFromQuorums, error) { + event := new(IBLSApkRegistryOperatorRemovedFromQuorums) + if err := _IBLSApkRegistry.contract.UnpackLog(event, "OperatorRemovedFromQuorums", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/generate.go b/contracts/generate.go index bebe8ad..5662269 100644 --- a/contracts/generate.go +++ b/contracts/generate.go @@ -3,3 +3,5 @@ package contracts //go:generate tools/abigen.sh --abi ./abi/EOConfig.json --pkg eoconfig --type EOConfig --out ./bindings/EOConfig/binding.go //go:generate tools/abigen.sh --abi ./abi/EORegistryCoordinator.json --pkg contractEORegistryCoordinator --type EORegistryCoordinator --out ./bindings/EORegistryCoordinator/binding.go //go:generate tools/abigen.sh --abi ./abi/EOStakeRegistry.json --pkg contractEOStakeRegistry --type EOStakeRegistry --out ./bindings/EOStakeRegistry/binding.go +//go:generate tools/abigen.sh --abi ./abi/IBLSApkRegistry.json --pkg contractIBLSApkRegistry --type IBLSApkRegistry --out ./bindings/IBLSApkRegistry/binding.go +//go:generate tools/abigen.sh --abi ./abi/AllocationManager.json --pkg contractEOAllocationManager --type AllocationManager --out ./bindings/AllocationManager/binding.go diff --git a/go.mod b/go.mod index 92eeeb7..85ddb36 100644 --- a/go.mod +++ b/go.mod @@ -6,28 +6,28 @@ require ( github.com/Layr-Labs/eigensdk-go v1.0.0-rc.1 github.com/consensys/gnark-crypto v0.18.0 github.com/ethereum/go-ethereum v1.16.1 - github.com/stretchr/testify v1.10.0 - github.com/urfave/cli/v2 v2.27.7 + github.com/urfave/cli/v3 v3.3.8 ) +require github.com/urfave/cli/v2 v2.27.7 // indirect + require ( github.com/DataDog/zstd v1.5.7 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/VictoriaMetrics/fastcache v1.12.5 // indirect - github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect - github.com/aws/aws-sdk-go-v2 v1.36.5 // indirect - github.com/aws/aws-sdk-go-v2/config v1.29.17 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.70 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect + github.com/aws/aws-sdk-go-v2 v1.36.6 // indirect + github.com/aws/aws-sdk-go-v2/config v1.29.18 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.71 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.33 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect - github.com/aws/aws-sdk-go-v2/service/kms v1.41.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.41.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.25.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.34.1 // indirect github.com/aws/smithy-go v1.22.4 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.22.0 // indirect @@ -36,13 +36,10 @@ require ( github.com/cockroachdb/errors v1.12.0 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect - github.com/cockroachdb/pebble v1.1.5 // indirect github.com/cockroachdb/redact v1.1.6 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set/v2 v2.8.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/emicklei/dot v1.8.0 // indirect @@ -53,8 +50,6 @@ require ( github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/getsentry/sentry-go v0.34.1 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/gofrs/flock v0.12.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang/snappy v1.0.0 // indirect @@ -63,35 +58,23 @@ require ( github.com/graph-gophers/graphql-go v1.6.0 // indirect github.com/hashicorp/go-bexpr v0.1.14 // indirect github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db // indirect - github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.3.2 // indirect - github.com/huin/goupnp v1.3.0 // indirect github.com/influxdata/influxdb-client-go/v2 v2.14.0 // indirect - github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf // indirect - github.com/jackpal/go-nat-pmp v1.0.2 // indirect - github.com/klauspost/compress v1.18.0 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect github.com/lmittmann/tint v1.1.2 // indirect github.com/mattn/go-colorable v0.1.14 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mitchellh/pointerstructure v1.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/oapi-codegen/runtime v1.1.1 // indirect + github.com/oapi-codegen/runtime v1.1.2 // indirect github.com/olekukonko/tablewriter v1.0.6 // indirect github.com/peterh/liner v1.2.2 // indirect github.com/pion/dtls/v2 v2.2.12 // indirect github.com/pion/logging v0.2.4 // indirect - github.com/pion/stun/v2 v2.0.0 // indirect github.com/pion/transport/v2 v2.2.10 // indirect github.com/pion/transport/v3 v3.0.7 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.22.0 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.65.0 // indirect @@ -99,10 +82,8 @@ require ( github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/cors v1.11.1 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/supranational/blst v0.3.15 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tklauser/go-sysconf v0.3.15 // indirect github.com/tklauser/numcpus v0.10.0 // indirect github.com/wlynxg/anet v0.0.5 // indirect @@ -111,16 +92,12 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/crypto v0.40.0 // indirect - golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc // indirect + golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect golang.org/x/net v0.42.0 // indirect golang.org/x/sync v0.16.0 // indirect golang.org/x/sys v0.34.0 // indirect - golang.org/x/text v0.27.0 // indirect golang.org/x/time v0.12.0 // indirect google.golang.org/protobuf v1.36.6 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) // Force tablewriter to v0.0.5 for go-ethereum compatibility diff --git a/go.sum b/go.sum index b966eb5..f54be6f 100644 --- a/go.sum +++ b/go.sum @@ -8,54 +8,48 @@ github.com/Layr-Labs/eigensdk-go v1.0.0-rc.1 h1:pH4RnJEk9NzxwzGIoUCj3cuOYx3rsb5J github.com/Layr-Labs/eigensdk-go v1.0.0-rc.1/go.mod h1:PIBT6xEoHR0mSADTfdQ+pu4LySlt0sr7UML0Wa6DKrM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/VictoriaMetrics/fastcache v1.12.5 h1:966OX9JjqYmDAFdp3wEXLwzukiHIm+GVlZHv6B8KW3k= github.com/VictoriaMetrics/fastcache v1.12.5/go.mod h1:K+JGPBn0sueFlLjZ8rcVM0cKkWKNElKyQXmw57QOoYI= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= -github.com/aws/aws-sdk-go-v2 v1.36.5 h1:0OF9RiEMEdDdZEMqF9MRjevyxAQcf6gY+E7vwBILFj0= -github.com/aws/aws-sdk-go-v2 v1.36.5/go.mod h1:EYrzvCCN9CMUTa5+6lf6MM4tq3Zjp8UhSGR/cBsjai0= -github.com/aws/aws-sdk-go-v2/config v1.29.17 h1:jSuiQ5jEe4SAMH6lLRMY9OVC+TqJLP5655pBGjmnjr0= -github.com/aws/aws-sdk-go-v2/config v1.29.17/go.mod h1:9P4wwACpbeXs9Pm9w1QTh6BwWwJjwYvJ1iCt5QbCXh8= -github.com/aws/aws-sdk-go-v2/credentials v1.17.70 h1:ONnH5CM16RTXRkS8Z1qg7/s2eDOhHhaXVd72mmyv4/0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.70/go.mod h1:M+lWhhmomVGgtuPOhO85u4pEa3SmssPTdcYpP/5J/xc= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 h1:KAXP9JSHO1vKGCr5f4O6WmlVKLFFXgWYAGoJosorxzU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32/go.mod h1:h4Sg6FQdexC1yYG9RDnOvLbW1a/P986++/Y/a+GyEM8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 h1:SsytQyTMHMDPspp+spo7XwXTP44aJZZAC7fBV2C5+5s= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36/go.mod h1:Q1lnJArKRXkenyog6+Y+zr7WDpk4e6XlR6gs20bbeNo= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 h1:i2vNHQiXUvKhs3quBR6aqlgJaiaexz/aNvdCktW/kAM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36/go.mod h1:UdyGa7Q91id/sdyHPwth+043HhmP6yP9MBHgbZM0xo8= +github.com/aws/aws-sdk-go-v2 v1.36.6 h1:zJqGjVbRdTPojeCGWn5IR5pbJwSQSBh5RWFTQcEQGdU= +github.com/aws/aws-sdk-go-v2 v1.36.6/go.mod h1:EYrzvCCN9CMUTa5+6lf6MM4tq3Zjp8UhSGR/cBsjai0= +github.com/aws/aws-sdk-go-v2/config v1.29.18 h1:x4T1GRPnqKV8HMJOMtNktbpQMl3bIsfx8KbqmveUO2I= +github.com/aws/aws-sdk-go-v2/config v1.29.18/go.mod h1:bvz8oXugIsH8K7HLhBv06vDqnFv3NsGDt2Znpk7zmOU= +github.com/aws/aws-sdk-go-v2/credentials v1.17.71 h1:r2w4mQWnrTMJjOyIsZtGp3R3XGY3nqHn8C26C2lQWgA= +github.com/aws/aws-sdk-go-v2/credentials v1.17.71/go.mod h1:E7VF3acIup4GB5ckzbKFrCK0vTvEQxOxgdq4U3vcMCY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.33 h1:D9ixiWSG4lyUBL2DDNK924Px9V/NBVpML90MHqyTADY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.33/go.mod h1:caS/m4DI+cij2paz3rtProRBI4s/+TCiWoaWZuQ9010= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37 h1:osMWfm/sC/L4tvEdQ65Gri5ZZDCUpuYJZbTTDrsn4I0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.37/go.mod h1:ZV2/1fbjOPr4G4v38G3Ww5TBT4+hmsK45s/rxu1fGy0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37 h1:v+X21AvTb2wZ+ycg1gx+orkB/9U6L7AOp93R7qYxsxM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.37/go.mod h1:G0uM1kyssELxmJ2VZEfG0q2npObR3BAkF3c1VsfVnfs= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 h1:CXV68E2dNqhuynZJPB80bhPQwAKqBWVer887figW6Jc= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4/go.mod h1:/xFi9KtvBXP97ppCz1TAEvU1Uf66qvid89rbem3wCzQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 h1:t0E6FzREdtCsiLIoLCWsYliNsRBgyGD/MCK571qk4MI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17/go.mod h1:ygpklyoaypuyDvOM5ujWGrYWpAK3h7ugnmKCU/76Ys4= -github.com/aws/aws-sdk-go-v2/service/kms v1.41.2 h1:zJeUxFP7+XP52u23vrp4zMcVhShTWbNO8dHV6xCSvFo= -github.com/aws/aws-sdk-go-v2/service/kms v1.41.2/go.mod h1:Pqd9k4TuespkireN206cK2QBsaBTL6X+VPAez5Qcijk= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 h1:AIRJ3lfb2w/1/8wOOSqYb9fUKGwQbtysJ2H1MofRUPg= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.5/go.mod h1:b7SiVprpU+iGazDUqvRSLf5XmCdn+JtT1on7uNL6Ipc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 h1:BpOxT3yhLwSJ77qIY3DoHAQjZsc4HEGfMCE4NGy3uFg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3/go.mod h1:vq/GQR1gOFLquZMSrxUK/cpvKCNVYibNyJ1m7JrU88E= -github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 h1:NFOJ/NXEGV4Rq//71Hs1jC/NvPs1ezajK+yQmkwnPV0= -github.com/aws/aws-sdk-go-v2/service/sts v1.34.0/go.mod h1:7ph2tGpfQvwzgistp2+zga9f+bCjlQJPkPUmMgDSD7w= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18 h1:vvbXsA2TVO80/KT7ZqCbx934dt6PY+vQ8hZpUZ/cpYg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.18/go.mod h1:m2JJHledjBGNMsLOF1g9gbAxprzq3KjC8e4lxtn+eWg= +github.com/aws/aws-sdk-go-v2/service/kms v1.41.3 h1:P0mjq/4mqTRA8SlS/4jL946RBW287kkKI/fazTTDJ3E= +github.com/aws/aws-sdk-go-v2/service/kms v1.41.3/go.mod h1:79gw7fH6dqzJz3a5qwDnQv5GDPs8b6eJIb9hJ+/c/YU= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.6 h1:rGtWqkQbPk7Bkwuv3NzpE/scwwL9sC1Ul3tn9x83DUI= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.6/go.mod h1:u4ku9OLv4TO4bCPdxf4fA1upaMaJmP9ZijGk3AAOC6Q= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.4 h1:OV/pxyXh+eMA0TExHEC4jyWdumLxNbzz1P0zJoezkJc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.4/go.mod h1:8Mm5VGYwtm+r305FfPSuc+aFkrypeylGYhFim6XEPoc= +github.com/aws/aws-sdk-go-v2/service/sts v1.34.1 h1:aUrLQwJfZtwv3/ZNG2xRtEen+NqI3iesuacjP51Mv1s= +github.com/aws/aws-sdk-go-v2/service/sts v1.34.1/go.mod h1:3wFBZKoWnX3r+Sm7in79i54fBmNfwhdNdQuscCw7QIk= github.com/aws/smithy-go v1.22.4 h1:uqXzVZNuNexwc/xrh6Tb56u89WDlJY6HS+KC0S4QSjw= github.com/aws/smithy-go v1.22.4/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4= github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.12.0 h1:d7oCs6vuIMUQRVbi6jWWWEJZahLCfJpnJSVobd1/sUo= github.com/cockroachdb/errors v1.12.0/go.mod h1:SvzfYNNBshAVbZ8wzNc/UPK3w1vf0dKDUP41ucAIf7g= github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 h1:pU88SPhIFid6/k0egdR5V6eALQYq2qbSmukrkgIh/0A= @@ -84,7 +78,6 @@ github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -114,16 +107,12 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY= github.com/ferranbt/fastssz v0.1.4/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.34.1 h1:HSjc1C/OsnZttohEPrrqKH42Iud0HuLCXpv8cU1pWcw= github.com/getsentry/sentry-go v0.34.1/go.mod h1:C55omcY9ChRQIUcVcGcs+Zdy4ZpQGvNJ7JYHIoSWOtE= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= @@ -141,19 +130,8 @@ github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keL github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= @@ -173,7 +151,6 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/influxdata/influxdb-client-go/v2 v2.14.0 h1:AjbBfJuq+QoaXNcrova8smSjwJdUHnwvfjMF71M1iI4= @@ -184,9 +161,6 @@ github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf h1:7JTmne github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= @@ -215,7 +189,6 @@ github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6T github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.1 h1:ZhBBeX8tSlRpu/FFhXH4RC4OJzFlqsQhoHZAz4x7TIw= @@ -234,19 +207,10 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= -github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= +github.com/oapi-codegen/runtime v1.1.2 h1:P2+CubHq8fO4Q6fV1tqDBZHCwpVpvPg7oKiYzQgXIyI= +github.com/oapi-codegen/runtime v1.1.2/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -254,9 +218,6 @@ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2sz github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw= github.com/peterh/liner v1.2.2/go.mod h1:xFwJyiKIXJZUKItq5dGHZSTBRAuG/CpeNpWLyiNRNwI= -github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= github.com/pion/dtls/v2 v2.2.12 h1:KP7H5/c1EiVAAKUmXyCzPiQe5+bCJrpOeKg/L05dunk= github.com/pion/dtls/v2 v2.2.12/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= @@ -264,14 +225,11 @@ github.com/pion/logging v0.2.4 h1:tTew+7cmQ+Mc1pTBLKH2puKsOvhm32dROumOZ655zB8= github.com/pion/logging v0.2.4/go.mod h1:DffhXTKYdNZU+KtJ5pyQDjvOAh/GsNSyv1lbkFbe3so= github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0= github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ= -github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= github.com/pion/transport/v2 v2.2.10 h1:ucLBLE8nuxiHfvkFKnkDQRYWYfp8ejf4YBOPfaQpw6Q= github.com/pion/transport/v2 v2.2.10/go.mod h1:sq1kSLWs+cHW9E+2fJP95QudkzbK7wscs8yYgQToO5E= -github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= github.com/pion/transport/v3 v3.0.7 h1:iRbMH05BzSNwhILHoBoAPxoB9xQgOaJk+591KC9P1o0= github.com/pion/transport/v3 v3.0.7/go.mod h1:YleKiTZ4vqNxVwh77Z0zytYi7rXHl7j6uPLGhhz9rwo= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -286,12 +244,9 @@ github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2 github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0= github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw= -github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= -github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= @@ -306,14 +261,12 @@ github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFt github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -329,13 +282,13 @@ github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfj github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU= github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4= +github.com/urfave/cli/v3 v3.3.8 h1:BzolUExliMdet9NlJ/u4m5vHSotJ3PzEqSAZ1oPMa/E= +github.com/urfave/cli/v3 v3.3.8/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo= github.com/wlynxg/anet v0.0.3/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU= github.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg= github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= @@ -358,56 +311,31 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= -golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc h1:TS73t7x3KarrNd5qAipmspBDS1rkMcgVG/fS1aRb4Rc= -golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 h1:R9PFI6EUdfVKgwKjZef7QIwGcBKu86OEFpJ9nUEP2l4= +golang.org/x/exp v0.0.0-20250718183923-645b1fa84792/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -415,8 +343,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -425,12 +351,10 @@ golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= @@ -443,34 +367,15 @@ golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/eigen/eigen.go b/internal/eigen/eigen.go new file mode 100644 index 0000000..5db3168 --- /dev/null +++ b/internal/eigen/eigen.go @@ -0,0 +1,120 @@ +package eigen + +import ( + "fmt" + + "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" + smbase "github.com/Layr-Labs/eigensdk-go/contracts/bindings/ServiceManagerBase" + "github.com/Layr-Labs/eigensdk-go/logging" + allocationmanager "github.com/eodata/operator-cli/contracts/bindings/AllocationManager" + regcoord "github.com/eodata/operator-cli/contracts/bindings/EORegistryCoordinator" + stakeregistry "github.com/eodata/operator-cli/contracts/bindings/EOStakeRegistry" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/ethereum/go-ethereum/rpc" +) + +type AvsClient struct { + registryCoordinatorAddr gethcommon.Address + allocationManagerAddr gethcommon.Address + serviceManagerAddr gethcommon.Address + delegationManagerAddr gethcommon.Address + stakeRegistryAddr gethcommon.Address + avsDirectoryAddr gethcommon.Address + RegistryCoordinator *regcoord.EORegistryCoordinator + AllocationManager *allocationmanager.AllocationManager + ServiceManager *smbase.ContractServiceManagerBase + StakeRegistry *stakeregistry.EOStakeRegistry + ElReader *elcontracts.ChainReader +} + +func BuildAVSClient( + ethClient *ethclient.Client, + registryCoordinatorAddress gethcommon.Address, +) (*AvsClient, error) { + + logger, err := logging.NewZapLogger(logging.Production) + if err != nil { + return nil, fmt.Errorf("failed to create logger %v", err) + } + + avsClient := &AvsClient{ + registryCoordinatorAddr: registryCoordinatorAddress, + } + + registryCoordinator, err := regcoord.NewEORegistryCoordinator( + avsClient.registryCoordinatorAddr, + ethClient, + ) + if err != nil { + return nil, fmt.Errorf("failed to create RegistryCoordinator contract %v", err) + } + avsClient.RegistryCoordinator = registryCoordinator + + avsClient.allocationManagerAddr, err = registryCoordinator.AllocationManager(&bind.CallOpts{}) + if err != nil { + return nil, fmt.Errorf("failed to get AllocationManager from registryCoordinator contract %v", err) + } + + avsClient.AllocationManager, err = allocationmanager.NewAllocationManager(avsClient.allocationManagerAddr, ethClient) + if err != nil { + return nil, fmt.Errorf("failed to create AllocationManager contract %v", err) + } + + avsClient.serviceManagerAddr, err = registryCoordinator.ServiceManager(&bind.CallOpts{}) + if err != nil { + return nil, fmt.Errorf("failed to get ServiceManager from registryCoordinator contract %v", err) + } + + avsClient.serviceManagerAddr, err = registryCoordinator.ServiceManager(&bind.CallOpts{}) + if err != nil { + return nil, fmt.Errorf("failed to create serviceManager contract %v", err) + } + + avsClient.ServiceManager, err = smbase.NewContractServiceManagerBase(avsClient.serviceManagerAddr, ethClient) + if err != nil { + return nil, fmt.Errorf("failed to create ServiceManager contract %v", err) + } + + avsClient.stakeRegistryAddr, err = registryCoordinator.StakeRegistry(&bind.CallOpts{}) + if err != nil { + return nil, fmt.Errorf("failed to get stakeRegistryAddr %v", err) + } + avsClient.StakeRegistry, err = stakeregistry.NewEOStakeRegistry(avsClient.stakeRegistryAddr, ethClient) + if err != nil { + return nil, fmt.Errorf("failed to create stakeRegistry contract %v", err) + } + + avsClient.delegationManagerAddr, err = avsClient.StakeRegistry.Delegation(&bind.CallOpts{}) + if err != nil { + return nil, fmt.Errorf("failed to get delegationManagerAddr %v", err) + } + + avsClient.avsDirectoryAddr, err = avsClient.ServiceManager.AvsDirectory(&bind.CallOpts{}) + if err != nil { + return nil, fmt.Errorf("failed to get avsDirectoryAddr %v", err) + } + + elConfig := elcontracts.Config{ + AvsDirectoryAddress: avsClient.avsDirectoryAddr, + RewardsCoordinatorAddress: gethcommon.Address{}, + PermissionControllerAddress: gethcommon.Address{}, + DontUseAllocationManager: true, + } + elReader, _, err := elcontracts.BuildReadClients(elConfig, ethClient, logger, nil) + if err != nil { + return nil, fmt.Errorf("failed to create ELChainReader %v", err) + } + avsClient.ElReader = elReader + + return avsClient, nil +} + +func CreateEthClient(rpcEndpoint string) (*ethclient.Client, error) { + rpcClient, err := rpc.Dial(rpcEndpoint) + if err != nil { + return nil, fmt.Errorf("failed to create Eth client %v %v", rpcEndpoint, err) + } + return ethclient.NewClient(rpcClient), nil +} diff --git a/internal/keystore/keystore.go b/internal/keystore/keystore.go new file mode 100644 index 0000000..2711c62 --- /dev/null +++ b/internal/keystore/keystore.go @@ -0,0 +1,66 @@ +package keystore + +import ( + "crypto/ecdsa" + "fmt" + "os" + "path/filepath" + "strings" + + eigensdkbls "github.com/Layr-Labs/eigensdk-go/crypto/bls" + eigensdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" + "github.com/ethereum/go-ethereum/crypto" +) + +const ( + Suffix = ".json" + EcdsaPrefix = "ecdsaEncryptedWallet" + EcdsaEncryptedWallet = EcdsaPrefix + "%s" + Suffix + BlsEncryptedWallet = "blsEncryptedWallet" + Suffix +) + +func GetECDSAPrivateKey(passphrase string, keystorePath string, address string) (*ecdsa.PrivateKey, error) { + filePath := filepath.Join(keystorePath, fmt.Sprintf(EcdsaEncryptedWallet, address)) + return eigensdkecdsa.ReadKey(filePath, passphrase) +} + +func SaveECDSAPrivateKey(passphrase string, keystorePath string, address string, key *ecdsa.PrivateKey) error { + filePath := filepath.Join(keystorePath, fmt.Sprintf(EcdsaEncryptedWallet, address)) + return eigensdkecdsa.WriteKey(filePath, key, passphrase) +} + +func GenerateEcdsaKeyPair() (*ecdsa.PrivateKey, error) { + return crypto.GenerateKey() +} + +func ListEcdsaAddresses(keystorePath string) ([]string, error) { + files, err := os.ReadDir(keystorePath) + if err != nil { + return nil, err + } + + ecdsaKeys := make([]string, 0) + for _, file := range files { + if strings.HasPrefix(file.Name(), EcdsaPrefix) && file.Name() != EcdsaPrefix+Suffix { + ecdsaKeys = append( + ecdsaKeys, + strings.TrimPrefix(strings.TrimSuffix(file.Name(), Suffix), EcdsaPrefix), + ) + } + } + return ecdsaKeys, nil +} + +func GetBLSPrivateKey(passphrase string, keystorePath string) (*eigensdkbls.KeyPair, error) { + filePath := filepath.Join(keystorePath, BlsEncryptedWallet) + return eigensdkbls.ReadPrivateKeyFromFile(filePath, passphrase) +} + +func SaveBLSPrivateKey(passphrase string, keystorePath string, key *eigensdkbls.KeyPair) error { + filePath := filepath.Join(keystorePath, BlsEncryptedWallet) + return key.SaveToFile(filePath, passphrase) +} + +func GenerateBlsKeyPair() (*eigensdkbls.KeyPair, error) { + return eigensdkbls.GenRandomBlsKeys() +} diff --git a/main.go b/main.go deleted file mode 100644 index 6fc6742..0000000 --- a/main.go +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/eodata/operator-cli/cmd" - "github.com/urfave/cli/v2" -) - -func main() { - app := cli.NewApp() - app.Name = "operatorCli" - app.Description = "Eoracle generate operator signature and message for registration" - app.Usage = "Used to create operator signature and message for registration" - app.Commands = []*cli.Command{ - cmd.NewEncryptCommand(), - cmd.NewDecryptCommand(), - cmd.NewRegisterCommand(), - cmd.NewDeregisterCommand(), - cmd.NewPrintStatusCommand(), - cmd.NewGenerateBLSKeyCommand(), - cmd.NewGenerateAliasCommand(), - cmd.NewDeclareAliasCommand(), - cmd.NewResetConfigurationCommand(), - } - - if err := app.Run(os.Args); err != nil { - fmt.Println("Error: ", err) - os.Exit(1) - } -}