diff --git a/pkg/bindings/BN254TableCalculator/binding.go b/pkg/bindings/BN254TableCalculator/binding.go deleted file mode 100644 index 331cd1ca74..0000000000 --- a/pkg/bindings/BN254TableCalculator/binding.go +++ /dev/null @@ -1,491 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package BN254TableCalculator - -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 -} - -// IBN254TableCalculatorTypesBN254OperatorInfo is an auto generated low-level Go binding around an user-defined struct. -type IBN254TableCalculatorTypesBN254OperatorInfo struct { - Pubkey BN254G1Point - Weights []*big.Int -} - -// IBN254TableCalculatorTypesBN254OperatorSetInfo is an auto generated low-level Go binding around an user-defined struct. -type IBN254TableCalculatorTypesBN254OperatorSetInfo struct { - OperatorInfoTreeRoot [32]byte - NumOperators *big.Int - AggregatePubkey BN254G1Point - TotalWeights []*big.Int -} - -// OperatorSet is an auto generated low-level Go binding around an user-defined struct. -type OperatorSet struct { - Avs common.Address - Id uint32 -} - -// BN254TableCalculatorMetaData contains all meta data concerning the BN254TableCalculator contract. -var BN254TableCalculatorMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_keyRegistrar\",\"type\":\"address\",\"internalType\":\"contractIKeyRegistrar\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_LOOKAHEAD_BLOCKS\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"LOOKAHEAD_BLOCKS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"internalType\":\"structIBN254TableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableBytes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254TableCalculatorTypes.BN254OperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeight\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeights\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"keyRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIKeyRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]}]", - Bin: "0x60e060405234801561000f575f5ffd5b506040516118b23803806118b283398101604081905261002e91610060565b6001600160a01b03928316608052911660a05260c0526100a0565b6001600160a01b038116811461005d575f5ffd5b50565b5f5f5f60608486031215610072575f5ffd5b835161007d81610049565b602085015190935061008e81610049565b80925050604084015190509250925092565b60805160a05160c0516117b16101015f395f8181610133015261063401525f818161017b015281816104df0152818161056f015261060701525f818160d401528181610328015281816103d401528181610a040152610b1f01526117b15ff3fe608060405234801561000f575f5ffd5b5060043610610085575f3560e01c80635e120ffc116100585780635e120ffc1461012e57806371ca71d914610155578063ca8aa7c714610176578063cf2d90ef1461019d575f5ffd5b80631088794a14610089578063124c87e0146100af5780633ec45c7e146100cf57806341ee6d0e1461010e575b5f5ffd5b61009c610097366004610ff1565b6101bd565b6040519081526020015b60405180910390f35b6100c26100bd366004611027565b61025d565b6040516100a69190611082565b6100f67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100a6565b61012161011c366004611027565b61026e565b6040516100a691906110d5565b61009c7f000000000000000000000000000000000000000000000000000000000000000081565b610168610163366004611027565b61029f565b6040516100a6929190611143565b6100f67f000000000000000000000000000000000000000000000000000000000000000081565b6101b06101ab366004611027565b6102b4565b6040516100a691906111e7565b5f5f5f6101c9856104d9565b90925090505f5b825181101561025057846001600160a01b03168382815181106101f5576101f561124a565b60200260200101516001600160a01b0316036102485781818151811061021d5761021d61124a565b60200260200101515f815181106102365761023661124a565b60200260200101519350505050610257565b6001016101d0565b505f925050505b92915050565b610265610f46565b61025782610894565b606061027982610894565b6040516020016102899190611082565b6040516020818303038152906040529050919050565b6060806102ab836104d9565b91509150915091565b60605f5f6102c1846104d9565b915091505f82516001600160401b038111156102df576102df61125e565b60405190808252806020026020018201604052801561031857816020015b610305610f85565b8152602001906001900390816102fd5790505b5090505f5b83518110156104d0577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bd30a0b9878684815181106103685761036861124a565b60200260200101516040518363ffffffff1660e01b815260040161038d9291906112ab565b602060405180830381865afa1580156103a8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103cc91906112d1565b156104c8575f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639a43e3fb888785815181106104145761041461124a565b60200260200101516040518363ffffffff1660e01b81526004016104399291906112ab565b60c060405180830381865afa158015610454573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104789190611395565b509050604051806040016040528082815260200185848151811061049e5761049e61124a565b60200260200101518152508383815181106104bb576104bb61124a565b6020026020010181905250505b60010161031d565b50949350505050565b6060805f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e875dba856040518263ffffffff1660e01b81526004016105299190611412565b5f60405180830381865afa158015610543573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261056a9190810190611442565b90505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634177a87c866040518263ffffffff1660e01b81526004016105b99190611412565b5f60405180830381865afa1580156105d3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526105fa91908101906114e0565b90505f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016632bab2c4a8785856106597f000000000000000000000000000000000000000000000000000000000000000043611583565b6040518563ffffffff1660e01b81526004016106789493929190611596565b5f60405180830381865afa158015610692573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526106b9919081019061160f565b905082516001600160401b038111156106d4576106d461125e565b6040519080825280602002602001820160405280156106fd578160200160208202803683370190505b50945082516001600160401b038111156107195761071961125e565b60405190808252806020026020018201604052801561074c57816020015b60608152602001906001900390816107375790505b5093505f805b8451811015610884575f805b85518110156107af578483815181106107795761077961124a565b602002602001015181815181106107925761079261124a565b6020026020010151826107a59190611583565b915060010161075e565b50801561087b576040805160018082528183019092529060208083019080368337019050508784815181106107e6576107e661124a565b6020026020010181905250808784815181106108045761080461124a565b60200260200101515f8151811061081d5761081d61124a565b60200260200101818152505085828151811061083b5761083b61124a565b60200260200101518884815181106108555761085561124a565b6001600160a01b0390921660209283029190910190910152826108778161171b565b9350505b50600101610752565b5080865280855250505050915091565b61089c610f46565b5f5f6108a7846104d9565b9150915080515f036109325760405180608001604052805f5f1b81526020015f815260200160405180604001604052805f81526020015f81525081526020015f6001600160401b038111156108fe576108fe61125e565b604051908082528060200260200182016040528015610927578160200160208202803683370190505b509052949350505050565b5f815f815181106109455761094561124a565b60200260200101515190505f816001600160401b038111156109695761096961125e565b604051908082528060200260200182016040528015610992578160200160208202803683370190505b5090505f84516001600160401b038111156109af576109af61125e565b6040519080825280602002602001820160405280156109d8578160200160208202803683370190505b5090506109f660405180604001604052805f81526020015f81525090565b5f805b8751811015610c5a577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bd30a0b98b8a8481518110610a4457610a4461124a565b60200260200101516040518363ffffffff1660e01b8152600401610a699291906112ab565b602060405180830381865afa158015610a84573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610aa891906112d1565b15610c52575f5b86811015610b1b57878281518110610ac957610ac961124a565b60200260200101518181518110610ae257610ae261124a565b6020026020010151868281518110610afc57610afc61124a565b60200260200101818151610b109190611583565b905250600101610aaf565b505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639a43e3fb8c8b8581518110610b5f57610b5f61124a565b60200260200101516040518363ffffffff1660e01b8152600401610b849291906112ab565b60c060405180830381865afa158015610b9f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc39190611395565b5090506040518060400160405280828152602001898481518110610be957610be961124a565b6020026020010151815250604051602001610c049190611733565b60405160208183030381529060405280519060200120858381518110610c2c57610c2c61124a565b6020908102919091010152610c418482610d25565b935082610c4d8161171b565b935050505b6001016109f9565b50805f03610ce65760405180608001604052805f5f1b81526020015f815260200160405180604001604052805f81526020015f81525081526020015f6001600160401b03811115610cad57610cad61125e565b604051908082528060200260200182016040528015610cd6578160200160208202803683370190505b5090529998505050505050505050565b8083525f610cf384610da1565b905060405180608001604052808281526020018381526020018481526020018681525098505050505050505050919050565b604080518082019091525f8082526020820152610d40610fa6565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa90508080610d7a57fe5b5080610d995760405163d4b68fd760e01b815260040160405180910390fd5b505092915050565b5f60015b8251811015610dc057610db9600282611745565b9050610da5565b5f816001600160401b03811115610dd957610dd961125e565b604051908082528060200260200182016040528015610e02578160200160208202803683370190505b5090505f5b8451811015610e4f57848181518110610e2257610e2261124a565b6020026020010151828281518110610e3c57610e3c61124a565b6020908102919091010152600101610e07565b505b81600114610f23575f610e6560028461175c565b90505f5b81811015610f1b5782610e7d826002611745565b81518110610e8d57610e8d61124a565b602002602001015183826002610ea39190611745565b610eae906001611583565b81518110610ebe57610ebe61124a565b6020026020010151604051602001610ee0929190918252602082015260400190565b60405160208183030381529060405280519060200120838281518110610f0857610f0861124a565b6020908102919091010152600101610e69565b509150610e51565b805f81518110610f3557610f3561124a565b602002602001015192505050919050565b60405180608001604052805f81526020015f8152602001610f7860405180604001604052805f81526020015f81525090565b8152602001606081525090565b604080516080810182525f9181018281526060820192909252908190610f78565b60405180608001604052806004906020820280368337509192915050565b5f60408284031215610fd4575f5ffd5b50919050565b6001600160a01b0381168114610fee575f5ffd5b50565b5f5f60608385031215611002575f5ffd5b61100c8484610fc4565b9150604083013561101c81610fda565b809150509250929050565b5f60408284031215611037575f5ffd5b6110418383610fc4565b9392505050565b5f8151808452602084019350602083015f5b8281101561107857815186526020958601959091019060010161105a565b5093949350505050565b6020815281516020820152602082015160408201525f60408301516110b4606084018280518252602090810151910152565b50606083015160a0808401526110cd60c0840182611048565b949350505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f8151808452602084019350602083015f5b828110156110785781516001600160a01b031686526020958601959091019060010161111c565b604081525f611155604083018561110a565b828103602084015280845180835260208301915060208160051b840101602087015f5b838110156111aa57601f19868403018552611194838351611048565b6020958601959093509190910190600101611178565b509098975050505050505050565b6111cd82825180518252602090810151910152565b5f6020820151606060408501526110cd6060850182611048565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561123e57603f198786030184526112298583516111b8565b9450602093840193919091019060010161120d565b50929695505050505050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52604160045260245ffd5b803561127d81610fda565b6001600160a01b03168252602081013563ffffffff811680821461129f575f5ffd5b80602085015250505050565b606081016112b98285611272565b6001600160a01b039290921660409190910152919050565b5f602082840312156112e1575f5ffd5b81518015158114611041575f5ffd5b604080519081016001600160401b03811182821017156113125761131261125e565b60405290565b604051601f8201601f191681016001600160401b03811182821017156113405761134061125e565b604052919050565b5f82601f830112611357575f5ffd5b61135f6112f0565b806040840185811115611370575f5ffd5b845b8181101561138a578051845260209384019301611372565b509095945050505050565b5f5f82840360c08112156113a7575f5ffd5b60408112156113b4575f5ffd5b6113bc6112f0565b845181526020808601519082015292506080603f19820112156113dd575f5ffd5b506113e66112f0565b6113f38560408601611348565b81526114028560808601611348565b6020820152809150509250929050565b604081016102578284611272565b5f6001600160401b038211156114385761143861125e565b5060051b60200190565b5f60208284031215611452575f5ffd5b81516001600160401b03811115611467575f5ffd5b8201601f81018413611477575f5ffd5b805161148a61148582611420565b611318565b8082825260208201915060208360051b8501019250868311156114ab575f5ffd5b6020840193505b828410156114d65783516114c581610fda565b8252602093840193909101906114b2565b9695505050505050565b5f602082840312156114f0575f5ffd5b81516001600160401b03811115611505575f5ffd5b8201601f81018413611515575f5ffd5b805161152361148582611420565b8082825260208201915060208360051b850101925086831115611544575f5ffd5b6020840193505b828410156114d657835161155e81610fda565b82526020938401939091019061154b565b634e487b7160e01b5f52601160045260245ffd5b808201808211156102575761025761156f565b6115a08186611272565b60a060408201525f6115b560a083018661110a565b8281036060840152845180825260208087019201905f5b818110156115f35783516001600160a01b03168352602093840193909201916001016115cc565b5050809250505063ffffffff8316608083015295945050505050565b5f6020828403121561161f575f5ffd5b81516001600160401b03811115611634575f5ffd5b8201601f81018413611644575f5ffd5b805161165261148582611420565b8082825260208201915060208360051b850101925086831115611673575f5ffd5b602084015b838110156117105780516001600160401b03811115611695575f5ffd5b8501603f810189136116a5575f5ffd5b60208101516116b661148582611420565b808282526020820191506020808460051b8601010192508b8311156116d9575f5ffd5b6040840193505b828410156116fb5783518252602093840193909101906116e0565b86525050602093840193919091019050611678565b509695505050505050565b5f6001820161172c5761172c61156f565b5060010190565b602081525f61104160208301846111b8565b80820281158282048414176102575761025761156f565b5f8261177657634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212207206da6ee6b3e3f50e0be8a9df432760c19400f5213de4f95ccadae49e425ada64736f6c634300081b0033", -} - -// BN254TableCalculatorABI is the input ABI used to generate the binding from. -// Deprecated: Use BN254TableCalculatorMetaData.ABI instead. -var BN254TableCalculatorABI = BN254TableCalculatorMetaData.ABI - -// BN254TableCalculatorBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use BN254TableCalculatorMetaData.Bin instead. -var BN254TableCalculatorBin = BN254TableCalculatorMetaData.Bin - -// DeployBN254TableCalculator deploys a new Ethereum contract, binding an instance of BN254TableCalculator to it. -func DeployBN254TableCalculator(auth *bind.TransactOpts, backend bind.ContractBackend, _keyRegistrar common.Address, _allocationManager common.Address, _LOOKAHEAD_BLOCKS *big.Int) (common.Address, *types.Transaction, *BN254TableCalculator, error) { - parsed, err := BN254TableCalculatorMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BN254TableCalculatorBin), backend, _keyRegistrar, _allocationManager, _LOOKAHEAD_BLOCKS) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &BN254TableCalculator{BN254TableCalculatorCaller: BN254TableCalculatorCaller{contract: contract}, BN254TableCalculatorTransactor: BN254TableCalculatorTransactor{contract: contract}, BN254TableCalculatorFilterer: BN254TableCalculatorFilterer{contract: contract}}, nil -} - -// BN254TableCalculator is an auto generated Go binding around an Ethereum contract. -type BN254TableCalculator struct { - BN254TableCalculatorCaller // Read-only binding to the contract - BN254TableCalculatorTransactor // Write-only binding to the contract - BN254TableCalculatorFilterer // Log filterer for contract events -} - -// BN254TableCalculatorCaller is an auto generated read-only Go binding around an Ethereum contract. -type BN254TableCalculatorCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BN254TableCalculatorTransactor is an auto generated write-only Go binding around an Ethereum contract. -type BN254TableCalculatorTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BN254TableCalculatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type BN254TableCalculatorFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BN254TableCalculatorSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type BN254TableCalculatorSession struct { - Contract *BN254TableCalculator // 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 -} - -// BN254TableCalculatorCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type BN254TableCalculatorCallerSession struct { - Contract *BN254TableCalculatorCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// BN254TableCalculatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type BN254TableCalculatorTransactorSession struct { - Contract *BN254TableCalculatorTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// BN254TableCalculatorRaw is an auto generated low-level Go binding around an Ethereum contract. -type BN254TableCalculatorRaw struct { - Contract *BN254TableCalculator // Generic contract binding to access the raw methods on -} - -// BN254TableCalculatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type BN254TableCalculatorCallerRaw struct { - Contract *BN254TableCalculatorCaller // Generic read-only contract binding to access the raw methods on -} - -// BN254TableCalculatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type BN254TableCalculatorTransactorRaw struct { - Contract *BN254TableCalculatorTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewBN254TableCalculator creates a new instance of BN254TableCalculator, bound to a specific deployed contract. -func NewBN254TableCalculator(address common.Address, backend bind.ContractBackend) (*BN254TableCalculator, error) { - contract, err := bindBN254TableCalculator(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &BN254TableCalculator{BN254TableCalculatorCaller: BN254TableCalculatorCaller{contract: contract}, BN254TableCalculatorTransactor: BN254TableCalculatorTransactor{contract: contract}, BN254TableCalculatorFilterer: BN254TableCalculatorFilterer{contract: contract}}, nil -} - -// NewBN254TableCalculatorCaller creates a new read-only instance of BN254TableCalculator, bound to a specific deployed contract. -func NewBN254TableCalculatorCaller(address common.Address, caller bind.ContractCaller) (*BN254TableCalculatorCaller, error) { - contract, err := bindBN254TableCalculator(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &BN254TableCalculatorCaller{contract: contract}, nil -} - -// NewBN254TableCalculatorTransactor creates a new write-only instance of BN254TableCalculator, bound to a specific deployed contract. -func NewBN254TableCalculatorTransactor(address common.Address, transactor bind.ContractTransactor) (*BN254TableCalculatorTransactor, error) { - contract, err := bindBN254TableCalculator(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &BN254TableCalculatorTransactor{contract: contract}, nil -} - -// NewBN254TableCalculatorFilterer creates a new log filterer instance of BN254TableCalculator, bound to a specific deployed contract. -func NewBN254TableCalculatorFilterer(address common.Address, filterer bind.ContractFilterer) (*BN254TableCalculatorFilterer, error) { - contract, err := bindBN254TableCalculator(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &BN254TableCalculatorFilterer{contract: contract}, nil -} - -// bindBN254TableCalculator binds a generic wrapper to an already deployed contract. -func bindBN254TableCalculator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := BN254TableCalculatorMetaData.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 (_BN254TableCalculator *BN254TableCalculatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BN254TableCalculator.Contract.BN254TableCalculatorCaller.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 (_BN254TableCalculator *BN254TableCalculatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BN254TableCalculator.Contract.BN254TableCalculatorTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BN254TableCalculator *BN254TableCalculatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BN254TableCalculator.Contract.BN254TableCalculatorTransactor.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 (_BN254TableCalculator *BN254TableCalculatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BN254TableCalculator.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 (_BN254TableCalculator *BN254TableCalculatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BN254TableCalculator.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BN254TableCalculator *BN254TableCalculatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BN254TableCalculator.Contract.contract.Transact(opts, method, params...) -} - -// LOOKAHEADBLOCKS is a free data retrieval call binding the contract method 0x5e120ffc. -// -// Solidity: function LOOKAHEAD_BLOCKS() view returns(uint256) -func (_BN254TableCalculator *BN254TableCalculatorCaller) LOOKAHEADBLOCKS(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BN254TableCalculator.contract.Call(opts, &out, "LOOKAHEAD_BLOCKS") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// LOOKAHEADBLOCKS is a free data retrieval call binding the contract method 0x5e120ffc. -// -// Solidity: function LOOKAHEAD_BLOCKS() view returns(uint256) -func (_BN254TableCalculator *BN254TableCalculatorSession) LOOKAHEADBLOCKS() (*big.Int, error) { - return _BN254TableCalculator.Contract.LOOKAHEADBLOCKS(&_BN254TableCalculator.CallOpts) -} - -// LOOKAHEADBLOCKS is a free data retrieval call binding the contract method 0x5e120ffc. -// -// Solidity: function LOOKAHEAD_BLOCKS() view returns(uint256) -func (_BN254TableCalculator *BN254TableCalculatorCallerSession) LOOKAHEADBLOCKS() (*big.Int, error) { - return _BN254TableCalculator.Contract.LOOKAHEADBLOCKS(&_BN254TableCalculator.CallOpts) -} - -// AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. -// -// Solidity: function allocationManager() view returns(address) -func (_BN254TableCalculator *BN254TableCalculatorCaller) AllocationManager(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BN254TableCalculator.contract.Call(opts, &out, "allocationManager") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. -// -// Solidity: function allocationManager() view returns(address) -func (_BN254TableCalculator *BN254TableCalculatorSession) AllocationManager() (common.Address, error) { - return _BN254TableCalculator.Contract.AllocationManager(&_BN254TableCalculator.CallOpts) -} - -// AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. -// -// Solidity: function allocationManager() view returns(address) -func (_BN254TableCalculator *BN254TableCalculatorCallerSession) AllocationManager() (common.Address, error) { - return _BN254TableCalculator.Contract.AllocationManager(&_BN254TableCalculator.CallOpts) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_BN254TableCalculator *BN254TableCalculatorCaller) CalculateOperatorTable(opts *bind.CallOpts, operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - var out []interface{} - err := _BN254TableCalculator.contract.Call(opts, &out, "calculateOperatorTable", operatorSet) - - if err != nil { - return *new(IBN254TableCalculatorTypesBN254OperatorSetInfo), err - } - - out0 := *abi.ConvertType(out[0], new(IBN254TableCalculatorTypesBN254OperatorSetInfo)).(*IBN254TableCalculatorTypesBN254OperatorSetInfo) - - return out0, err - -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_BN254TableCalculator *BN254TableCalculatorSession) CalculateOperatorTable(operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - return _BN254TableCalculator.Contract.CalculateOperatorTable(&_BN254TableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_BN254TableCalculator *BN254TableCalculatorCallerSession) CalculateOperatorTable(operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - return _BN254TableCalculator.Contract.CalculateOperatorTable(&_BN254TableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_BN254TableCalculator *BN254TableCalculatorCaller) CalculateOperatorTableBytes(opts *bind.CallOpts, operatorSet OperatorSet) ([]byte, error) { - var out []interface{} - err := _BN254TableCalculator.contract.Call(opts, &out, "calculateOperatorTableBytes", operatorSet) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_BN254TableCalculator *BN254TableCalculatorSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _BN254TableCalculator.Contract.CalculateOperatorTableBytes(&_BN254TableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_BN254TableCalculator *BN254TableCalculatorCallerSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _BN254TableCalculator.Contract.CalculateOperatorTableBytes(&_BN254TableCalculator.CallOpts, operatorSet) -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[]) -func (_BN254TableCalculator *BN254TableCalculatorCaller) GetOperatorInfos(opts *bind.CallOpts, operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - var out []interface{} - err := _BN254TableCalculator.contract.Call(opts, &out, "getOperatorInfos", operatorSet) - - if err != nil { - return *new([]IBN254TableCalculatorTypesBN254OperatorInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IBN254TableCalculatorTypesBN254OperatorInfo)).(*[]IBN254TableCalculatorTypesBN254OperatorInfo) - - return out0, err - -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[]) -func (_BN254TableCalculator *BN254TableCalculatorSession) GetOperatorInfos(operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - return _BN254TableCalculator.Contract.GetOperatorInfos(&_BN254TableCalculator.CallOpts, operatorSet) -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[]) -func (_BN254TableCalculator *BN254TableCalculatorCallerSession) GetOperatorInfos(operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - return _BN254TableCalculator.Contract.GetOperatorInfos(&_BN254TableCalculator.CallOpts, operatorSet) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_BN254TableCalculator *BN254TableCalculatorCaller) GetOperatorWeight(opts *bind.CallOpts, operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - var out []interface{} - err := _BN254TableCalculator.contract.Call(opts, &out, "getOperatorWeight", operatorSet, operator) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_BN254TableCalculator *BN254TableCalculatorSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _BN254TableCalculator.Contract.GetOperatorWeight(&_BN254TableCalculator.CallOpts, operatorSet, operator) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_BN254TableCalculator *BN254TableCalculatorCallerSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _BN254TableCalculator.Contract.GetOperatorWeight(&_BN254TableCalculator.CallOpts, operatorSet, operator) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_BN254TableCalculator *BN254TableCalculatorCaller) GetOperatorWeights(opts *bind.CallOpts, operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - var out []interface{} - err := _BN254TableCalculator.contract.Call(opts, &out, "getOperatorWeights", operatorSet) - - outstruct := new(struct { - Operators []common.Address - Weights [][]*big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Operators = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.Weights = *abi.ConvertType(out[1], new([][]*big.Int)).(*[][]*big.Int) - - return *outstruct, err - -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_BN254TableCalculator *BN254TableCalculatorSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _BN254TableCalculator.Contract.GetOperatorWeights(&_BN254TableCalculator.CallOpts, operatorSet) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_BN254TableCalculator *BN254TableCalculatorCallerSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _BN254TableCalculator.Contract.GetOperatorWeights(&_BN254TableCalculator.CallOpts, operatorSet) -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_BN254TableCalculator *BN254TableCalculatorCaller) KeyRegistrar(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BN254TableCalculator.contract.Call(opts, &out, "keyRegistrar") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_BN254TableCalculator *BN254TableCalculatorSession) KeyRegistrar() (common.Address, error) { - return _BN254TableCalculator.Contract.KeyRegistrar(&_BN254TableCalculator.CallOpts) -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_BN254TableCalculator *BN254TableCalculatorCallerSession) KeyRegistrar() (common.Address, error) { - return _BN254TableCalculator.Contract.KeyRegistrar(&_BN254TableCalculator.CallOpts) -} diff --git a/pkg/bindings/BN254TableCalculatorBase/binding.go b/pkg/bindings/BN254TableCalculatorBase/binding.go deleted file mode 100644 index 24719243bd..0000000000 --- a/pkg/bindings/BN254TableCalculatorBase/binding.go +++ /dev/null @@ -1,407 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package BN254TableCalculatorBase - -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 -} - -// IBN254TableCalculatorTypesBN254OperatorInfo is an auto generated low-level Go binding around an user-defined struct. -type IBN254TableCalculatorTypesBN254OperatorInfo struct { - Pubkey BN254G1Point - Weights []*big.Int -} - -// IBN254TableCalculatorTypesBN254OperatorSetInfo is an auto generated low-level Go binding around an user-defined struct. -type IBN254TableCalculatorTypesBN254OperatorSetInfo struct { - OperatorInfoTreeRoot [32]byte - NumOperators *big.Int - AggregatePubkey BN254G1Point - TotalWeights []*big.Int -} - -// OperatorSet is an auto generated low-level Go binding around an user-defined struct. -type OperatorSet struct { - Avs common.Address - Id uint32 -} - -// BN254TableCalculatorBaseMetaData contains all meta data concerning the BN254TableCalculatorBase contract. -var BN254TableCalculatorBaseMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"calculateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"internalType\":\"structIBN254TableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableBytes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254TableCalculatorTypes.BN254OperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeight\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeights\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"keyRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIKeyRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]}]", -} - -// BN254TableCalculatorBaseABI is the input ABI used to generate the binding from. -// Deprecated: Use BN254TableCalculatorBaseMetaData.ABI instead. -var BN254TableCalculatorBaseABI = BN254TableCalculatorBaseMetaData.ABI - -// BN254TableCalculatorBase is an auto generated Go binding around an Ethereum contract. -type BN254TableCalculatorBase struct { - BN254TableCalculatorBaseCaller // Read-only binding to the contract - BN254TableCalculatorBaseTransactor // Write-only binding to the contract - BN254TableCalculatorBaseFilterer // Log filterer for contract events -} - -// BN254TableCalculatorBaseCaller is an auto generated read-only Go binding around an Ethereum contract. -type BN254TableCalculatorBaseCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BN254TableCalculatorBaseTransactor is an auto generated write-only Go binding around an Ethereum contract. -type BN254TableCalculatorBaseTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BN254TableCalculatorBaseFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type BN254TableCalculatorBaseFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BN254TableCalculatorBaseSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type BN254TableCalculatorBaseSession struct { - Contract *BN254TableCalculatorBase // 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 -} - -// BN254TableCalculatorBaseCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type BN254TableCalculatorBaseCallerSession struct { - Contract *BN254TableCalculatorBaseCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// BN254TableCalculatorBaseTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type BN254TableCalculatorBaseTransactorSession struct { - Contract *BN254TableCalculatorBaseTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// BN254TableCalculatorBaseRaw is an auto generated low-level Go binding around an Ethereum contract. -type BN254TableCalculatorBaseRaw struct { - Contract *BN254TableCalculatorBase // Generic contract binding to access the raw methods on -} - -// BN254TableCalculatorBaseCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type BN254TableCalculatorBaseCallerRaw struct { - Contract *BN254TableCalculatorBaseCaller // Generic read-only contract binding to access the raw methods on -} - -// BN254TableCalculatorBaseTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type BN254TableCalculatorBaseTransactorRaw struct { - Contract *BN254TableCalculatorBaseTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewBN254TableCalculatorBase creates a new instance of BN254TableCalculatorBase, bound to a specific deployed contract. -func NewBN254TableCalculatorBase(address common.Address, backend bind.ContractBackend) (*BN254TableCalculatorBase, error) { - contract, err := bindBN254TableCalculatorBase(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &BN254TableCalculatorBase{BN254TableCalculatorBaseCaller: BN254TableCalculatorBaseCaller{contract: contract}, BN254TableCalculatorBaseTransactor: BN254TableCalculatorBaseTransactor{contract: contract}, BN254TableCalculatorBaseFilterer: BN254TableCalculatorBaseFilterer{contract: contract}}, nil -} - -// NewBN254TableCalculatorBaseCaller creates a new read-only instance of BN254TableCalculatorBase, bound to a specific deployed contract. -func NewBN254TableCalculatorBaseCaller(address common.Address, caller bind.ContractCaller) (*BN254TableCalculatorBaseCaller, error) { - contract, err := bindBN254TableCalculatorBase(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &BN254TableCalculatorBaseCaller{contract: contract}, nil -} - -// NewBN254TableCalculatorBaseTransactor creates a new write-only instance of BN254TableCalculatorBase, bound to a specific deployed contract. -func NewBN254TableCalculatorBaseTransactor(address common.Address, transactor bind.ContractTransactor) (*BN254TableCalculatorBaseTransactor, error) { - contract, err := bindBN254TableCalculatorBase(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &BN254TableCalculatorBaseTransactor{contract: contract}, nil -} - -// NewBN254TableCalculatorBaseFilterer creates a new log filterer instance of BN254TableCalculatorBase, bound to a specific deployed contract. -func NewBN254TableCalculatorBaseFilterer(address common.Address, filterer bind.ContractFilterer) (*BN254TableCalculatorBaseFilterer, error) { - contract, err := bindBN254TableCalculatorBase(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &BN254TableCalculatorBaseFilterer{contract: contract}, nil -} - -// bindBN254TableCalculatorBase binds a generic wrapper to an already deployed contract. -func bindBN254TableCalculatorBase(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := BN254TableCalculatorBaseMetaData.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 (_BN254TableCalculatorBase *BN254TableCalculatorBaseRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BN254TableCalculatorBase.Contract.BN254TableCalculatorBaseCaller.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 (_BN254TableCalculatorBase *BN254TableCalculatorBaseRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BN254TableCalculatorBase.Contract.BN254TableCalculatorBaseTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BN254TableCalculatorBase.Contract.BN254TableCalculatorBaseTransactor.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 (_BN254TableCalculatorBase *BN254TableCalculatorBaseCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BN254TableCalculatorBase.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 (_BN254TableCalculatorBase *BN254TableCalculatorBaseTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BN254TableCalculatorBase.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BN254TableCalculatorBase.Contract.contract.Transact(opts, method, params...) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCaller) CalculateOperatorTable(opts *bind.CallOpts, operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - var out []interface{} - err := _BN254TableCalculatorBase.contract.Call(opts, &out, "calculateOperatorTable", operatorSet) - - if err != nil { - return *new(IBN254TableCalculatorTypesBN254OperatorSetInfo), err - } - - out0 := *abi.ConvertType(out[0], new(IBN254TableCalculatorTypesBN254OperatorSetInfo)).(*IBN254TableCalculatorTypesBN254OperatorSetInfo) - - return out0, err - -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseSession) CalculateOperatorTable(operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - return _BN254TableCalculatorBase.Contract.CalculateOperatorTable(&_BN254TableCalculatorBase.CallOpts, operatorSet) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCallerSession) CalculateOperatorTable(operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - return _BN254TableCalculatorBase.Contract.CalculateOperatorTable(&_BN254TableCalculatorBase.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCaller) CalculateOperatorTableBytes(opts *bind.CallOpts, operatorSet OperatorSet) ([]byte, error) { - var out []interface{} - err := _BN254TableCalculatorBase.contract.Call(opts, &out, "calculateOperatorTableBytes", operatorSet) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _BN254TableCalculatorBase.Contract.CalculateOperatorTableBytes(&_BN254TableCalculatorBase.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCallerSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _BN254TableCalculatorBase.Contract.CalculateOperatorTableBytes(&_BN254TableCalculatorBase.CallOpts, operatorSet) -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[]) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCaller) GetOperatorInfos(opts *bind.CallOpts, operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - var out []interface{} - err := _BN254TableCalculatorBase.contract.Call(opts, &out, "getOperatorInfos", operatorSet) - - if err != nil { - return *new([]IBN254TableCalculatorTypesBN254OperatorInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IBN254TableCalculatorTypesBN254OperatorInfo)).(*[]IBN254TableCalculatorTypesBN254OperatorInfo) - - return out0, err - -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[]) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseSession) GetOperatorInfos(operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - return _BN254TableCalculatorBase.Contract.GetOperatorInfos(&_BN254TableCalculatorBase.CallOpts, operatorSet) -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[]) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCallerSession) GetOperatorInfos(operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - return _BN254TableCalculatorBase.Contract.GetOperatorInfos(&_BN254TableCalculatorBase.CallOpts, operatorSet) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCaller) GetOperatorWeight(opts *bind.CallOpts, operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - var out []interface{} - err := _BN254TableCalculatorBase.contract.Call(opts, &out, "getOperatorWeight", operatorSet, operator) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _BN254TableCalculatorBase.Contract.GetOperatorWeight(&_BN254TableCalculatorBase.CallOpts, operatorSet, operator) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCallerSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _BN254TableCalculatorBase.Contract.GetOperatorWeight(&_BN254TableCalculatorBase.CallOpts, operatorSet, operator) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCaller) GetOperatorWeights(opts *bind.CallOpts, operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - var out []interface{} - err := _BN254TableCalculatorBase.contract.Call(opts, &out, "getOperatorWeights", operatorSet) - - outstruct := new(struct { - Operators []common.Address - Weights [][]*big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Operators = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.Weights = *abi.ConvertType(out[1], new([][]*big.Int)).(*[][]*big.Int) - - return *outstruct, err - -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _BN254TableCalculatorBase.Contract.GetOperatorWeights(&_BN254TableCalculatorBase.CallOpts, operatorSet) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCallerSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _BN254TableCalculatorBase.Contract.GetOperatorWeights(&_BN254TableCalculatorBase.CallOpts, operatorSet) -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCaller) KeyRegistrar(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BN254TableCalculatorBase.contract.Call(opts, &out, "keyRegistrar") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseSession) KeyRegistrar() (common.Address, error) { - return _BN254TableCalculatorBase.Contract.KeyRegistrar(&_BN254TableCalculatorBase.CallOpts) -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_BN254TableCalculatorBase *BN254TableCalculatorBaseCallerSession) KeyRegistrar() (common.Address, error) { - return _BN254TableCalculatorBase.Contract.KeyRegistrar(&_BN254TableCalculatorBase.CallOpts) -} diff --git a/pkg/bindings/ECDSATableCalculator/binding.go b/pkg/bindings/ECDSATableCalculator/binding.go deleted file mode 100644 index ce0ede4995..0000000000 --- a/pkg/bindings/ECDSATableCalculator/binding.go +++ /dev/null @@ -1,580 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ECDSATableCalculator - -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 -) - -// IECDSATableCalculatorTypesECDSAOperatorInfo is an auto generated low-level Go binding around an user-defined struct. -type IECDSATableCalculatorTypesECDSAOperatorInfo struct { - Pubkey common.Address - Weights []*big.Int -} - -// OperatorSet is an auto generated low-level Go binding around an user-defined struct. -type OperatorSet struct { - Avs common.Address - Id uint32 -} - -// ECDSATableCalculatorMetaData contains all meta data concerning the ECDSATableCalculator contract. -var ECDSATableCalculatorMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_keyRegistrar\",\"type\":\"address\",\"internalType\":\"contractIKeyRegistrar\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_LOOKAHEAD_BLOCKS\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"LOOKAHEAD_BLOCKS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableBytes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeight\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeights\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"keyRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIKeyRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"LookaheadBlocksSet\",\"inputs\":[{\"name\":\"lookaheadBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"LookaheadBlocksTooHigh\",\"inputs\":[]}]", - Bin: "0x60e060405234801561000f575f5ffd5b5060405161108938038061108983398101604081905261002e91610060565b6001600160a01b03928316608052911660a05260c0526100a0565b6001600160a01b038116811461005d575f5ffd5b50565b5f5f5f60608486031215610072575f5ffd5b835161007d81610049565b602085015190935061008e81610049565b80925050604084015190509250925092565b60805160a05160c051610f966100f35f395f818161012801526103de01525f8181610170015281816102890152818161031901526103b101525f818160c90152818161070e01526107ba0152610f965ff3fe608060405234801561000f575f5ffd5b506004361061007a575f3560e01c806341ee6d0e1161005857806341ee6d0e146101035780635e120ffc1461012357806371ca71d91461014a578063ca8aa7c71461016b575f5ffd5b80631088794a1461007e578063124c87e0146100a45780633ec45c7e146100c4575b5f5ffd5b61009161008c366004610951565b610192565b6040519081526020015b60405180910390f35b6100b76100b2366004610987565b610232565b60405161009b91906109e2565b6100eb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161009b565b610116610111366004610987565b61023d565b60405161009b9190610a65565b6100917f000000000000000000000000000000000000000000000000000000000000000081565b61015d610158366004610987565b61026e565b60405161009b929190610ad3565b6100eb7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f5f61019e85610283565b90925090505f5b825181101561022557846001600160a01b03168382815181106101ca576101ca610b48565b60200260200101516001600160a01b03160361021d578181815181106101f2576101f2610b48565b60200260200101515f8151811061020b5761020b610b48565b6020026020010151935050505061022c565b6001016101a5565b505f925050505b92915050565b606061022c82610640565b606061024882610640565b60405160200161025891906109e2565b6040516020818303038152906040529050919050565b60608061027a83610283565b91509150915091565b6060805f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e875dba856040518263ffffffff1660e01b81526004016102d39190610b95565b5f60405180830381865afa1580156102ed573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103149190810190610c0b565b90505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634177a87c866040518263ffffffff1660e01b81526004016103639190610b95565b5f60405180830381865afa15801561037d573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103a49190810190610caa565b90505f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016632bab2c4a8785856104037f000000000000000000000000000000000000000000000000000000000000000043610d4e565b6040518563ffffffff1660e01b81526004016104229493929190610d61565b5f60405180830381865afa15801561043c573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526104639190810190610dda565b9050825167ffffffffffffffff81111561047f5761047f610ba3565b6040519080825280602002602001820160405280156104a8578160200160208202803683370190505b509450825167ffffffffffffffff8111156104c5576104c5610ba3565b6040519080825280602002602001820160405280156104f857816020015b60608152602001906001900390816104e35790505b5093505f805b8451811015610630575f805b855181101561055b5784838151811061052557610525610b48565b6020026020010151818151811061053e5761053e610b48565b6020026020010151826105519190610d4e565b915060010161050a565b5080156106275760408051600180825281830190925290602080830190803683370190505087848151811061059257610592610b48565b6020026020010181905250808784815181106105b0576105b0610b48565b60200260200101515f815181106105c9576105c9610b48565b6020026020010181815250508582815181106105e7576105e7610b48565b602002602001015188848151811061060157610601610b48565b6001600160a01b03909216602092830291909101909101528261062381610ee8565b9350505b506001016104fe565b5080865280855250505050915091565b60605f5f61064d84610283565b9150915080515f0361069e57604080515f8082526020820190925290610695565b604080518082019091525f81526060602082015281526020019060019003908161066e5790505b50949350505050565b815167ffffffffffffffff8111156106b8576106b8610ba3565b6040519080825280602002602001820160405280156106fd57816020015b604080518082019091525f8152606060208201528152602001906001900390816106d65790505b5092505f805b83518110156108cc577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bd30a0b98786848151811061074e5761074e610b48565b60200260200101516040518363ffffffff1660e01b8152600401610773929190610f00565b602060405180830381865afa15801561078e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b29190610f26565b156108c4575f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633b32a7bd888785815181106107fa576107fa610b48565b60200260200101516040518363ffffffff1660e01b815260040161081f929190610f00565b602060405180830381865afa15801561083a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061085e9190610f45565b90506040518060400160405280826001600160a01b0316815260200185848151811061088c5761088c610b48565b60200260200101518152508684815181106108a9576108a9610b48565b602002602001018190525082806108bf90610ee8565b935050505b600101610703565b50805f0361091a57604080515f8082526020820190925290610910565b604080518082019091525f8152606060208201528152602001906001900390816108e95790505b5095945050505050565b8352509092915050565b5f60408284031215610934575f5ffd5b50919050565b6001600160a01b038116811461094e575f5ffd5b50565b5f5f60608385031215610962575f5ffd5b61096c8484610924565b9150604083013561097c8161093a565b809150509250929050565b5f60408284031215610997575f5ffd5b6109a18383610924565b9392505050565b5f8151808452602084019350602083015f5b828110156109d85781518652602095860195909101906001016109ba565b5093949350505050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015610a5957868503603f19018452815180516001600160a01b03168652602090810151604091870182905290610a43908701826109a8565b9550506020938401939190910190600101610a08565b50929695505050505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f8151808452602084019350602083015f5b828110156109d85781516001600160a01b0316865260209586019590910190600101610aac565b604081525f610ae56040830185610a9a565b828103602084015280845180835260208301915060208160051b840101602087015f5b83811015610b3a57601f19868403018552610b248383516109a8565b6020958601959093509190910190600101610b08565b509098975050505050505050565b634e487b7160e01b5f52603260045260245ffd5b8035610b678161093a565b6001600160a01b03168252602081013563ffffffff8116808214610b89575f5ffd5b80602085015250505050565b6040810161022c8284610b5c565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610be057610be0610ba3565b604052919050565b5f67ffffffffffffffff821115610c0157610c01610ba3565b5060051b60200190565b5f60208284031215610c1b575f5ffd5b815167ffffffffffffffff811115610c31575f5ffd5b8201601f81018413610c41575f5ffd5b8051610c54610c4f82610be8565b610bb7565b8082825260208201915060208360051b850101925086831115610c75575f5ffd5b6020840193505b82841015610ca0578351610c8f8161093a565b825260209384019390910190610c7c565b9695505050505050565b5f60208284031215610cba575f5ffd5b815167ffffffffffffffff811115610cd0575f5ffd5b8201601f81018413610ce0575f5ffd5b8051610cee610c4f82610be8565b8082825260208201915060208360051b850101925086831115610d0f575f5ffd5b6020840193505b82841015610ca0578351610d298161093a565b825260209384019390910190610d16565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561022c5761022c610d3a565b610d6b8186610b5c565b60a060408201525f610d8060a0830186610a9a565b8281036060840152845180825260208087019201905f5b81811015610dbe5783516001600160a01b0316835260209384019390920191600101610d97565b5050809250505063ffffffff8316608083015295945050505050565b5f60208284031215610dea575f5ffd5b815167ffffffffffffffff811115610e00575f5ffd5b8201601f81018413610e10575f5ffd5b8051610e1e610c4f82610be8565b8082825260208201915060208360051b850101925086831115610e3f575f5ffd5b602084015b83811015610edd57805167ffffffffffffffff811115610e62575f5ffd5b8501603f81018913610e72575f5ffd5b6020810151610e83610c4f82610be8565b808282526020820191506020808460051b8601010192508b831115610ea6575f5ffd5b6040840193505b82841015610ec8578351825260209384019390910190610ead565b86525050602093840193919091019050610e44565b509695505050505050565b5f60018201610ef957610ef9610d3a565b5060010190565b60608101610f0e8285610b5c565b6001600160a01b039290921660409190910152919050565b5f60208284031215610f36575f5ffd5b815180151581146109a1575f5ffd5b5f60208284031215610f55575f5ffd5b81516109a18161093a56fea2646970667358221220a9a8b7ab79fd27d5486e0911871c7fe599d64614b9fd39a4a1e0d82b473e5bea64736f6c634300081b0033", -} - -// ECDSATableCalculatorABI is the input ABI used to generate the binding from. -// Deprecated: Use ECDSATableCalculatorMetaData.ABI instead. -var ECDSATableCalculatorABI = ECDSATableCalculatorMetaData.ABI - -// ECDSATableCalculatorBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use ECDSATableCalculatorMetaData.Bin instead. -var ECDSATableCalculatorBin = ECDSATableCalculatorMetaData.Bin - -// DeployECDSATableCalculator deploys a new Ethereum contract, binding an instance of ECDSATableCalculator to it. -func DeployECDSATableCalculator(auth *bind.TransactOpts, backend bind.ContractBackend, _keyRegistrar common.Address, _allocationManager common.Address, _LOOKAHEAD_BLOCKS *big.Int) (common.Address, *types.Transaction, *ECDSATableCalculator, error) { - parsed, err := ECDSATableCalculatorMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ECDSATableCalculatorBin), backend, _keyRegistrar, _allocationManager, _LOOKAHEAD_BLOCKS) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ECDSATableCalculator{ECDSATableCalculatorCaller: ECDSATableCalculatorCaller{contract: contract}, ECDSATableCalculatorTransactor: ECDSATableCalculatorTransactor{contract: contract}, ECDSATableCalculatorFilterer: ECDSATableCalculatorFilterer{contract: contract}}, nil -} - -// ECDSATableCalculator is an auto generated Go binding around an Ethereum contract. -type ECDSATableCalculator struct { - ECDSATableCalculatorCaller // Read-only binding to the contract - ECDSATableCalculatorTransactor // Write-only binding to the contract - ECDSATableCalculatorFilterer // Log filterer for contract events -} - -// ECDSATableCalculatorCaller is an auto generated read-only Go binding around an Ethereum contract. -type ECDSATableCalculatorCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATableCalculatorTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ECDSATableCalculatorTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATableCalculatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ECDSATableCalculatorFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATableCalculatorSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ECDSATableCalculatorSession struct { - Contract *ECDSATableCalculator // 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 -} - -// ECDSATableCalculatorCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ECDSATableCalculatorCallerSession struct { - Contract *ECDSATableCalculatorCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ECDSATableCalculatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ECDSATableCalculatorTransactorSession struct { - Contract *ECDSATableCalculatorTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECDSATableCalculatorRaw is an auto generated low-level Go binding around an Ethereum contract. -type ECDSATableCalculatorRaw struct { - Contract *ECDSATableCalculator // Generic contract binding to access the raw methods on -} - -// ECDSATableCalculatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ECDSATableCalculatorCallerRaw struct { - Contract *ECDSATableCalculatorCaller // Generic read-only contract binding to access the raw methods on -} - -// ECDSATableCalculatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ECDSATableCalculatorTransactorRaw struct { - Contract *ECDSATableCalculatorTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewECDSATableCalculator creates a new instance of ECDSATableCalculator, bound to a specific deployed contract. -func NewECDSATableCalculator(address common.Address, backend bind.ContractBackend) (*ECDSATableCalculator, error) { - contract, err := bindECDSATableCalculator(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ECDSATableCalculator{ECDSATableCalculatorCaller: ECDSATableCalculatorCaller{contract: contract}, ECDSATableCalculatorTransactor: ECDSATableCalculatorTransactor{contract: contract}, ECDSATableCalculatorFilterer: ECDSATableCalculatorFilterer{contract: contract}}, nil -} - -// NewECDSATableCalculatorCaller creates a new read-only instance of ECDSATableCalculator, bound to a specific deployed contract. -func NewECDSATableCalculatorCaller(address common.Address, caller bind.ContractCaller) (*ECDSATableCalculatorCaller, error) { - contract, err := bindECDSATableCalculator(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ECDSATableCalculatorCaller{contract: contract}, nil -} - -// NewECDSATableCalculatorTransactor creates a new write-only instance of ECDSATableCalculator, bound to a specific deployed contract. -func NewECDSATableCalculatorTransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATableCalculatorTransactor, error) { - contract, err := bindECDSATableCalculator(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ECDSATableCalculatorTransactor{contract: contract}, nil -} - -// NewECDSATableCalculatorFilterer creates a new log filterer instance of ECDSATableCalculator, bound to a specific deployed contract. -func NewECDSATableCalculatorFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSATableCalculatorFilterer, error) { - contract, err := bindECDSATableCalculator(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ECDSATableCalculatorFilterer{contract: contract}, nil -} - -// bindECDSATableCalculator binds a generic wrapper to an already deployed contract. -func bindECDSATableCalculator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ECDSATableCalculatorMetaData.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 (_ECDSATableCalculator *ECDSATableCalculatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSATableCalculator.Contract.ECDSATableCalculatorCaller.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 (_ECDSATableCalculator *ECDSATableCalculatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSATableCalculator.Contract.ECDSATableCalculatorTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSATableCalculator *ECDSATableCalculatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSATableCalculator.Contract.ECDSATableCalculatorTransactor.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 (_ECDSATableCalculator *ECDSATableCalculatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSATableCalculator.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 (_ECDSATableCalculator *ECDSATableCalculatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSATableCalculator.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSATableCalculator *ECDSATableCalculatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSATableCalculator.Contract.contract.Transact(opts, method, params...) -} - -// LOOKAHEADBLOCKS is a free data retrieval call binding the contract method 0x5e120ffc. -// -// Solidity: function LOOKAHEAD_BLOCKS() view returns(uint256) -func (_ECDSATableCalculator *ECDSATableCalculatorCaller) LOOKAHEADBLOCKS(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _ECDSATableCalculator.contract.Call(opts, &out, "LOOKAHEAD_BLOCKS") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// LOOKAHEADBLOCKS is a free data retrieval call binding the contract method 0x5e120ffc. -// -// Solidity: function LOOKAHEAD_BLOCKS() view returns(uint256) -func (_ECDSATableCalculator *ECDSATableCalculatorSession) LOOKAHEADBLOCKS() (*big.Int, error) { - return _ECDSATableCalculator.Contract.LOOKAHEADBLOCKS(&_ECDSATableCalculator.CallOpts) -} - -// LOOKAHEADBLOCKS is a free data retrieval call binding the contract method 0x5e120ffc. -// -// Solidity: function LOOKAHEAD_BLOCKS() view returns(uint256) -func (_ECDSATableCalculator *ECDSATableCalculatorCallerSession) LOOKAHEADBLOCKS() (*big.Int, error) { - return _ECDSATableCalculator.Contract.LOOKAHEADBLOCKS(&_ECDSATableCalculator.CallOpts) -} - -// AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. -// -// Solidity: function allocationManager() view returns(address) -func (_ECDSATableCalculator *ECDSATableCalculatorCaller) AllocationManager(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _ECDSATableCalculator.contract.Call(opts, &out, "allocationManager") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. -// -// Solidity: function allocationManager() view returns(address) -func (_ECDSATableCalculator *ECDSATableCalculatorSession) AllocationManager() (common.Address, error) { - return _ECDSATableCalculator.Contract.AllocationManager(&_ECDSATableCalculator.CallOpts) -} - -// AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. -// -// Solidity: function allocationManager() view returns(address) -func (_ECDSATableCalculator *ECDSATableCalculatorCallerSession) AllocationManager() (common.Address, error) { - return _ECDSATableCalculator.Contract.AllocationManager(&_ECDSATableCalculator.CallOpts) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_ECDSATableCalculator *ECDSATableCalculatorCaller) CalculateOperatorTable(opts *bind.CallOpts, operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - var out []interface{} - err := _ECDSATableCalculator.contract.Call(opts, &out, "calculateOperatorTable", operatorSet) - - if err != nil { - return *new([]IECDSATableCalculatorTypesECDSAOperatorInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IECDSATableCalculatorTypesECDSAOperatorInfo)).(*[]IECDSATableCalculatorTypesECDSAOperatorInfo) - - return out0, err - -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_ECDSATableCalculator *ECDSATableCalculatorSession) CalculateOperatorTable(operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - return _ECDSATableCalculator.Contract.CalculateOperatorTable(&_ECDSATableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_ECDSATableCalculator *ECDSATableCalculatorCallerSession) CalculateOperatorTable(operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - return _ECDSATableCalculator.Contract.CalculateOperatorTable(&_ECDSATableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_ECDSATableCalculator *ECDSATableCalculatorCaller) CalculateOperatorTableBytes(opts *bind.CallOpts, operatorSet OperatorSet) ([]byte, error) { - var out []interface{} - err := _ECDSATableCalculator.contract.Call(opts, &out, "calculateOperatorTableBytes", operatorSet) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_ECDSATableCalculator *ECDSATableCalculatorSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _ECDSATableCalculator.Contract.CalculateOperatorTableBytes(&_ECDSATableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_ECDSATableCalculator *ECDSATableCalculatorCallerSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _ECDSATableCalculator.Contract.CalculateOperatorTableBytes(&_ECDSATableCalculator.CallOpts, operatorSet) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_ECDSATableCalculator *ECDSATableCalculatorCaller) GetOperatorWeight(opts *bind.CallOpts, operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - var out []interface{} - err := _ECDSATableCalculator.contract.Call(opts, &out, "getOperatorWeight", operatorSet, operator) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_ECDSATableCalculator *ECDSATableCalculatorSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _ECDSATableCalculator.Contract.GetOperatorWeight(&_ECDSATableCalculator.CallOpts, operatorSet, operator) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_ECDSATableCalculator *ECDSATableCalculatorCallerSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _ECDSATableCalculator.Contract.GetOperatorWeight(&_ECDSATableCalculator.CallOpts, operatorSet, operator) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_ECDSATableCalculator *ECDSATableCalculatorCaller) GetOperatorWeights(opts *bind.CallOpts, operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - var out []interface{} - err := _ECDSATableCalculator.contract.Call(opts, &out, "getOperatorWeights", operatorSet) - - outstruct := new(struct { - Operators []common.Address - Weights [][]*big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Operators = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.Weights = *abi.ConvertType(out[1], new([][]*big.Int)).(*[][]*big.Int) - - return *outstruct, err - -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_ECDSATableCalculator *ECDSATableCalculatorSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _ECDSATableCalculator.Contract.GetOperatorWeights(&_ECDSATableCalculator.CallOpts, operatorSet) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_ECDSATableCalculator *ECDSATableCalculatorCallerSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _ECDSATableCalculator.Contract.GetOperatorWeights(&_ECDSATableCalculator.CallOpts, operatorSet) -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_ECDSATableCalculator *ECDSATableCalculatorCaller) KeyRegistrar(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _ECDSATableCalculator.contract.Call(opts, &out, "keyRegistrar") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_ECDSATableCalculator *ECDSATableCalculatorSession) KeyRegistrar() (common.Address, error) { - return _ECDSATableCalculator.Contract.KeyRegistrar(&_ECDSATableCalculator.CallOpts) -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_ECDSATableCalculator *ECDSATableCalculatorCallerSession) KeyRegistrar() (common.Address, error) { - return _ECDSATableCalculator.Contract.KeyRegistrar(&_ECDSATableCalculator.CallOpts) -} - -// ECDSATableCalculatorLookaheadBlocksSetIterator is returned from FilterLookaheadBlocksSet and is used to iterate over the raw logs and unpacked data for LookaheadBlocksSet events raised by the ECDSATableCalculator contract. -type ECDSATableCalculatorLookaheadBlocksSetIterator struct { - Event *ECDSATableCalculatorLookaheadBlocksSet // 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 *ECDSATableCalculatorLookaheadBlocksSetIterator) 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(ECDSATableCalculatorLookaheadBlocksSet) - 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(ECDSATableCalculatorLookaheadBlocksSet) - 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 *ECDSATableCalculatorLookaheadBlocksSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ECDSATableCalculatorLookaheadBlocksSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ECDSATableCalculatorLookaheadBlocksSet represents a LookaheadBlocksSet event raised by the ECDSATableCalculator contract. -type ECDSATableCalculatorLookaheadBlocksSet struct { - LookaheadBlocks *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterLookaheadBlocksSet is a free log retrieval operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_ECDSATableCalculator *ECDSATableCalculatorFilterer) FilterLookaheadBlocksSet(opts *bind.FilterOpts) (*ECDSATableCalculatorLookaheadBlocksSetIterator, error) { - - logs, sub, err := _ECDSATableCalculator.contract.FilterLogs(opts, "LookaheadBlocksSet") - if err != nil { - return nil, err - } - return &ECDSATableCalculatorLookaheadBlocksSetIterator{contract: _ECDSATableCalculator.contract, event: "LookaheadBlocksSet", logs: logs, sub: sub}, nil -} - -// WatchLookaheadBlocksSet is a free log subscription operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_ECDSATableCalculator *ECDSATableCalculatorFilterer) WatchLookaheadBlocksSet(opts *bind.WatchOpts, sink chan<- *ECDSATableCalculatorLookaheadBlocksSet) (event.Subscription, error) { - - logs, sub, err := _ECDSATableCalculator.contract.WatchLogs(opts, "LookaheadBlocksSet") - 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(ECDSATableCalculatorLookaheadBlocksSet) - if err := _ECDSATableCalculator.contract.UnpackLog(event, "LookaheadBlocksSet", 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 -} - -// ParseLookaheadBlocksSet is a log parse operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_ECDSATableCalculator *ECDSATableCalculatorFilterer) ParseLookaheadBlocksSet(log types.Log) (*ECDSATableCalculatorLookaheadBlocksSet, error) { - event := new(ECDSATableCalculatorLookaheadBlocksSet) - if err := _ECDSATableCalculator.contract.UnpackLog(event, "LookaheadBlocksSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/pkg/bindings/ECDSATableCalculatorBase/binding.go b/pkg/bindings/ECDSATableCalculatorBase/binding.go deleted file mode 100644 index be3ec7757c..0000000000 --- a/pkg/bindings/ECDSATableCalculatorBase/binding.go +++ /dev/null @@ -1,496 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ECDSATableCalculatorBase - -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 -) - -// IECDSATableCalculatorTypesECDSAOperatorInfo is an auto generated low-level Go binding around an user-defined struct. -type IECDSATableCalculatorTypesECDSAOperatorInfo struct { - Pubkey common.Address - Weights []*big.Int -} - -// OperatorSet is an auto generated low-level Go binding around an user-defined struct. -type OperatorSet struct { - Avs common.Address - Id uint32 -} - -// ECDSATableCalculatorBaseMetaData contains all meta data concerning the ECDSATableCalculatorBase contract. -var ECDSATableCalculatorBaseMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"calculateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableBytes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeight\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeights\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"keyRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIKeyRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"LookaheadBlocksSet\",\"inputs\":[{\"name\":\"lookaheadBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"LookaheadBlocksTooHigh\",\"inputs\":[]}]", -} - -// ECDSATableCalculatorBaseABI is the input ABI used to generate the binding from. -// Deprecated: Use ECDSATableCalculatorBaseMetaData.ABI instead. -var ECDSATableCalculatorBaseABI = ECDSATableCalculatorBaseMetaData.ABI - -// ECDSATableCalculatorBase is an auto generated Go binding around an Ethereum contract. -type ECDSATableCalculatorBase struct { - ECDSATableCalculatorBaseCaller // Read-only binding to the contract - ECDSATableCalculatorBaseTransactor // Write-only binding to the contract - ECDSATableCalculatorBaseFilterer // Log filterer for contract events -} - -// ECDSATableCalculatorBaseCaller is an auto generated read-only Go binding around an Ethereum contract. -type ECDSATableCalculatorBaseCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATableCalculatorBaseTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ECDSATableCalculatorBaseTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATableCalculatorBaseFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ECDSATableCalculatorBaseFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATableCalculatorBaseSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ECDSATableCalculatorBaseSession struct { - Contract *ECDSATableCalculatorBase // 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 -} - -// ECDSATableCalculatorBaseCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ECDSATableCalculatorBaseCallerSession struct { - Contract *ECDSATableCalculatorBaseCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ECDSATableCalculatorBaseTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ECDSATableCalculatorBaseTransactorSession struct { - Contract *ECDSATableCalculatorBaseTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECDSATableCalculatorBaseRaw is an auto generated low-level Go binding around an Ethereum contract. -type ECDSATableCalculatorBaseRaw struct { - Contract *ECDSATableCalculatorBase // Generic contract binding to access the raw methods on -} - -// ECDSATableCalculatorBaseCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ECDSATableCalculatorBaseCallerRaw struct { - Contract *ECDSATableCalculatorBaseCaller // Generic read-only contract binding to access the raw methods on -} - -// ECDSATableCalculatorBaseTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ECDSATableCalculatorBaseTransactorRaw struct { - Contract *ECDSATableCalculatorBaseTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewECDSATableCalculatorBase creates a new instance of ECDSATableCalculatorBase, bound to a specific deployed contract. -func NewECDSATableCalculatorBase(address common.Address, backend bind.ContractBackend) (*ECDSATableCalculatorBase, error) { - contract, err := bindECDSATableCalculatorBase(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ECDSATableCalculatorBase{ECDSATableCalculatorBaseCaller: ECDSATableCalculatorBaseCaller{contract: contract}, ECDSATableCalculatorBaseTransactor: ECDSATableCalculatorBaseTransactor{contract: contract}, ECDSATableCalculatorBaseFilterer: ECDSATableCalculatorBaseFilterer{contract: contract}}, nil -} - -// NewECDSATableCalculatorBaseCaller creates a new read-only instance of ECDSATableCalculatorBase, bound to a specific deployed contract. -func NewECDSATableCalculatorBaseCaller(address common.Address, caller bind.ContractCaller) (*ECDSATableCalculatorBaseCaller, error) { - contract, err := bindECDSATableCalculatorBase(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ECDSATableCalculatorBaseCaller{contract: contract}, nil -} - -// NewECDSATableCalculatorBaseTransactor creates a new write-only instance of ECDSATableCalculatorBase, bound to a specific deployed contract. -func NewECDSATableCalculatorBaseTransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATableCalculatorBaseTransactor, error) { - contract, err := bindECDSATableCalculatorBase(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ECDSATableCalculatorBaseTransactor{contract: contract}, nil -} - -// NewECDSATableCalculatorBaseFilterer creates a new log filterer instance of ECDSATableCalculatorBase, bound to a specific deployed contract. -func NewECDSATableCalculatorBaseFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSATableCalculatorBaseFilterer, error) { - contract, err := bindECDSATableCalculatorBase(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ECDSATableCalculatorBaseFilterer{contract: contract}, nil -} - -// bindECDSATableCalculatorBase binds a generic wrapper to an already deployed contract. -func bindECDSATableCalculatorBase(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ECDSATableCalculatorBaseMetaData.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 (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSATableCalculatorBase.Contract.ECDSATableCalculatorBaseCaller.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 (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSATableCalculatorBase.Contract.ECDSATableCalculatorBaseTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSATableCalculatorBase.Contract.ECDSATableCalculatorBaseTransactor.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 (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSATableCalculatorBase.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 (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSATableCalculatorBase.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSATableCalculatorBase.Contract.contract.Transact(opts, method, params...) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCaller) CalculateOperatorTable(opts *bind.CallOpts, operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - var out []interface{} - err := _ECDSATableCalculatorBase.contract.Call(opts, &out, "calculateOperatorTable", operatorSet) - - if err != nil { - return *new([]IECDSATableCalculatorTypesECDSAOperatorInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IECDSATableCalculatorTypesECDSAOperatorInfo)).(*[]IECDSATableCalculatorTypesECDSAOperatorInfo) - - return out0, err - -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseSession) CalculateOperatorTable(operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - return _ECDSATableCalculatorBase.Contract.CalculateOperatorTable(&_ECDSATableCalculatorBase.CallOpts, operatorSet) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCallerSession) CalculateOperatorTable(operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - return _ECDSATableCalculatorBase.Contract.CalculateOperatorTable(&_ECDSATableCalculatorBase.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCaller) CalculateOperatorTableBytes(opts *bind.CallOpts, operatorSet OperatorSet) ([]byte, error) { - var out []interface{} - err := _ECDSATableCalculatorBase.contract.Call(opts, &out, "calculateOperatorTableBytes", operatorSet) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _ECDSATableCalculatorBase.Contract.CalculateOperatorTableBytes(&_ECDSATableCalculatorBase.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCallerSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _ECDSATableCalculatorBase.Contract.CalculateOperatorTableBytes(&_ECDSATableCalculatorBase.CallOpts, operatorSet) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCaller) GetOperatorWeight(opts *bind.CallOpts, operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - var out []interface{} - err := _ECDSATableCalculatorBase.contract.Call(opts, &out, "getOperatorWeight", operatorSet, operator) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _ECDSATableCalculatorBase.Contract.GetOperatorWeight(&_ECDSATableCalculatorBase.CallOpts, operatorSet, operator) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCallerSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _ECDSATableCalculatorBase.Contract.GetOperatorWeight(&_ECDSATableCalculatorBase.CallOpts, operatorSet, operator) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCaller) GetOperatorWeights(opts *bind.CallOpts, operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - var out []interface{} - err := _ECDSATableCalculatorBase.contract.Call(opts, &out, "getOperatorWeights", operatorSet) - - outstruct := new(struct { - Operators []common.Address - Weights [][]*big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Operators = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.Weights = *abi.ConvertType(out[1], new([][]*big.Int)).(*[][]*big.Int) - - return *outstruct, err - -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _ECDSATableCalculatorBase.Contract.GetOperatorWeights(&_ECDSATableCalculatorBase.CallOpts, operatorSet) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCallerSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _ECDSATableCalculatorBase.Contract.GetOperatorWeights(&_ECDSATableCalculatorBase.CallOpts, operatorSet) -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCaller) KeyRegistrar(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _ECDSATableCalculatorBase.contract.Call(opts, &out, "keyRegistrar") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseSession) KeyRegistrar() (common.Address, error) { - return _ECDSATableCalculatorBase.Contract.KeyRegistrar(&_ECDSATableCalculatorBase.CallOpts) -} - -// KeyRegistrar is a free data retrieval call binding the contract method 0x3ec45c7e. -// -// Solidity: function keyRegistrar() view returns(address) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseCallerSession) KeyRegistrar() (common.Address, error) { - return _ECDSATableCalculatorBase.Contract.KeyRegistrar(&_ECDSATableCalculatorBase.CallOpts) -} - -// ECDSATableCalculatorBaseLookaheadBlocksSetIterator is returned from FilterLookaheadBlocksSet and is used to iterate over the raw logs and unpacked data for LookaheadBlocksSet events raised by the ECDSATableCalculatorBase contract. -type ECDSATableCalculatorBaseLookaheadBlocksSetIterator struct { - Event *ECDSATableCalculatorBaseLookaheadBlocksSet // 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 *ECDSATableCalculatorBaseLookaheadBlocksSetIterator) 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(ECDSATableCalculatorBaseLookaheadBlocksSet) - 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(ECDSATableCalculatorBaseLookaheadBlocksSet) - 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 *ECDSATableCalculatorBaseLookaheadBlocksSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ECDSATableCalculatorBaseLookaheadBlocksSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ECDSATableCalculatorBaseLookaheadBlocksSet represents a LookaheadBlocksSet event raised by the ECDSATableCalculatorBase contract. -type ECDSATableCalculatorBaseLookaheadBlocksSet struct { - LookaheadBlocks *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterLookaheadBlocksSet is a free log retrieval operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseFilterer) FilterLookaheadBlocksSet(opts *bind.FilterOpts) (*ECDSATableCalculatorBaseLookaheadBlocksSetIterator, error) { - - logs, sub, err := _ECDSATableCalculatorBase.contract.FilterLogs(opts, "LookaheadBlocksSet") - if err != nil { - return nil, err - } - return &ECDSATableCalculatorBaseLookaheadBlocksSetIterator{contract: _ECDSATableCalculatorBase.contract, event: "LookaheadBlocksSet", logs: logs, sub: sub}, nil -} - -// WatchLookaheadBlocksSet is a free log subscription operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseFilterer) WatchLookaheadBlocksSet(opts *bind.WatchOpts, sink chan<- *ECDSATableCalculatorBaseLookaheadBlocksSet) (event.Subscription, error) { - - logs, sub, err := _ECDSATableCalculatorBase.contract.WatchLogs(opts, "LookaheadBlocksSet") - 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(ECDSATableCalculatorBaseLookaheadBlocksSet) - if err := _ECDSATableCalculatorBase.contract.UnpackLog(event, "LookaheadBlocksSet", 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 -} - -// ParseLookaheadBlocksSet is a log parse operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_ECDSATableCalculatorBase *ECDSATableCalculatorBaseFilterer) ParseLookaheadBlocksSet(log types.Log) (*ECDSATableCalculatorBaseLookaheadBlocksSet, error) { - event := new(ECDSATableCalculatorBaseLookaheadBlocksSet) - if err := _ECDSATableCalculatorBase.contract.UnpackLog(event, "LookaheadBlocksSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/pkg/bindings/IBN254TableCalculator/binding.go b/pkg/bindings/IBN254TableCalculator/binding.go deleted file mode 100644 index 9635ffbd55..0000000000 --- a/pkg/bindings/IBN254TableCalculator/binding.go +++ /dev/null @@ -1,376 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package IBN254TableCalculator - -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 -} - -// IBN254TableCalculatorTypesBN254OperatorInfo is an auto generated low-level Go binding around an user-defined struct. -type IBN254TableCalculatorTypesBN254OperatorInfo struct { - Pubkey BN254G1Point - Weights []*big.Int -} - -// IBN254TableCalculatorTypesBN254OperatorSetInfo is an auto generated low-level Go binding around an user-defined struct. -type IBN254TableCalculatorTypesBN254OperatorSetInfo struct { - OperatorInfoTreeRoot [32]byte - NumOperators *big.Int - AggregatePubkey BN254G1Point - TotalWeights []*big.Int -} - -// OperatorSet is an auto generated low-level Go binding around an user-defined struct. -type OperatorSet struct { - Avs common.Address - Id uint32 -} - -// IBN254TableCalculatorMetaData contains all meta data concerning the IBN254TableCalculator contract. -var IBN254TableCalculatorMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"calculateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"internalType\":\"structIBN254TableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableBytes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254TableCalculatorTypes.BN254OperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeight\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeights\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"}]", -} - -// IBN254TableCalculatorABI is the input ABI used to generate the binding from. -// Deprecated: Use IBN254TableCalculatorMetaData.ABI instead. -var IBN254TableCalculatorABI = IBN254TableCalculatorMetaData.ABI - -// IBN254TableCalculator is an auto generated Go binding around an Ethereum contract. -type IBN254TableCalculator struct { - IBN254TableCalculatorCaller // Read-only binding to the contract - IBN254TableCalculatorTransactor // Write-only binding to the contract - IBN254TableCalculatorFilterer // Log filterer for contract events -} - -// IBN254TableCalculatorCaller is an auto generated read-only Go binding around an Ethereum contract. -type IBN254TableCalculatorCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IBN254TableCalculatorTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IBN254TableCalculatorTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IBN254TableCalculatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IBN254TableCalculatorFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IBN254TableCalculatorSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IBN254TableCalculatorSession struct { - Contract *IBN254TableCalculator // 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 -} - -// IBN254TableCalculatorCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IBN254TableCalculatorCallerSession struct { - Contract *IBN254TableCalculatorCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IBN254TableCalculatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IBN254TableCalculatorTransactorSession struct { - Contract *IBN254TableCalculatorTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IBN254TableCalculatorRaw is an auto generated low-level Go binding around an Ethereum contract. -type IBN254TableCalculatorRaw struct { - Contract *IBN254TableCalculator // Generic contract binding to access the raw methods on -} - -// IBN254TableCalculatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IBN254TableCalculatorCallerRaw struct { - Contract *IBN254TableCalculatorCaller // Generic read-only contract binding to access the raw methods on -} - -// IBN254TableCalculatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IBN254TableCalculatorTransactorRaw struct { - Contract *IBN254TableCalculatorTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIBN254TableCalculator creates a new instance of IBN254TableCalculator, bound to a specific deployed contract. -func NewIBN254TableCalculator(address common.Address, backend bind.ContractBackend) (*IBN254TableCalculator, error) { - contract, err := bindIBN254TableCalculator(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IBN254TableCalculator{IBN254TableCalculatorCaller: IBN254TableCalculatorCaller{contract: contract}, IBN254TableCalculatorTransactor: IBN254TableCalculatorTransactor{contract: contract}, IBN254TableCalculatorFilterer: IBN254TableCalculatorFilterer{contract: contract}}, nil -} - -// NewIBN254TableCalculatorCaller creates a new read-only instance of IBN254TableCalculator, bound to a specific deployed contract. -func NewIBN254TableCalculatorCaller(address common.Address, caller bind.ContractCaller) (*IBN254TableCalculatorCaller, error) { - contract, err := bindIBN254TableCalculator(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IBN254TableCalculatorCaller{contract: contract}, nil -} - -// NewIBN254TableCalculatorTransactor creates a new write-only instance of IBN254TableCalculator, bound to a specific deployed contract. -func NewIBN254TableCalculatorTransactor(address common.Address, transactor bind.ContractTransactor) (*IBN254TableCalculatorTransactor, error) { - contract, err := bindIBN254TableCalculator(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IBN254TableCalculatorTransactor{contract: contract}, nil -} - -// NewIBN254TableCalculatorFilterer creates a new log filterer instance of IBN254TableCalculator, bound to a specific deployed contract. -func NewIBN254TableCalculatorFilterer(address common.Address, filterer bind.ContractFilterer) (*IBN254TableCalculatorFilterer, error) { - contract, err := bindIBN254TableCalculator(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IBN254TableCalculatorFilterer{contract: contract}, nil -} - -// bindIBN254TableCalculator binds a generic wrapper to an already deployed contract. -func bindIBN254TableCalculator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := IBN254TableCalculatorMetaData.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 (_IBN254TableCalculator *IBN254TableCalculatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IBN254TableCalculator.Contract.IBN254TableCalculatorCaller.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 (_IBN254TableCalculator *IBN254TableCalculatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IBN254TableCalculator.Contract.IBN254TableCalculatorTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IBN254TableCalculator *IBN254TableCalculatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IBN254TableCalculator.Contract.IBN254TableCalculatorTransactor.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 (_IBN254TableCalculator *IBN254TableCalculatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IBN254TableCalculator.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 (_IBN254TableCalculator *IBN254TableCalculatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IBN254TableCalculator.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IBN254TableCalculator *IBN254TableCalculatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IBN254TableCalculator.Contract.contract.Transact(opts, method, params...) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_IBN254TableCalculator *IBN254TableCalculatorCaller) CalculateOperatorTable(opts *bind.CallOpts, operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - var out []interface{} - err := _IBN254TableCalculator.contract.Call(opts, &out, "calculateOperatorTable", operatorSet) - - if err != nil { - return *new(IBN254TableCalculatorTypesBN254OperatorSetInfo), err - } - - out0 := *abi.ConvertType(out[0], new(IBN254TableCalculatorTypesBN254OperatorSetInfo)).(*IBN254TableCalculatorTypesBN254OperatorSetInfo) - - return out0, err - -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_IBN254TableCalculator *IBN254TableCalculatorSession) CalculateOperatorTable(operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - return _IBN254TableCalculator.Contract.CalculateOperatorTable(&_IBN254TableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo) -func (_IBN254TableCalculator *IBN254TableCalculatorCallerSession) CalculateOperatorTable(operatorSet OperatorSet) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { - return _IBN254TableCalculator.Contract.CalculateOperatorTable(&_IBN254TableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_IBN254TableCalculator *IBN254TableCalculatorCaller) CalculateOperatorTableBytes(opts *bind.CallOpts, operatorSet OperatorSet) ([]byte, error) { - var out []interface{} - err := _IBN254TableCalculator.contract.Call(opts, &out, "calculateOperatorTableBytes", operatorSet) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_IBN254TableCalculator *IBN254TableCalculatorSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _IBN254TableCalculator.Contract.CalculateOperatorTableBytes(&_IBN254TableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_IBN254TableCalculator *IBN254TableCalculatorCallerSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _IBN254TableCalculator.Contract.CalculateOperatorTableBytes(&_IBN254TableCalculator.CallOpts, operatorSet) -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[] operatorInfos) -func (_IBN254TableCalculator *IBN254TableCalculatorCaller) GetOperatorInfos(opts *bind.CallOpts, operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - var out []interface{} - err := _IBN254TableCalculator.contract.Call(opts, &out, "getOperatorInfos", operatorSet) - - if err != nil { - return *new([]IBN254TableCalculatorTypesBN254OperatorInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IBN254TableCalculatorTypesBN254OperatorInfo)).(*[]IBN254TableCalculatorTypesBN254OperatorInfo) - - return out0, err - -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[] operatorInfos) -func (_IBN254TableCalculator *IBN254TableCalculatorSession) GetOperatorInfos(operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - return _IBN254TableCalculator.Contract.GetOperatorInfos(&_IBN254TableCalculator.CallOpts, operatorSet) -} - -// GetOperatorInfos is a free data retrieval call binding the contract method 0xcf2d90ef. -// -// Solidity: function getOperatorInfos((address,uint32) operatorSet) view returns(((uint256,uint256),uint256[])[] operatorInfos) -func (_IBN254TableCalculator *IBN254TableCalculatorCallerSession) GetOperatorInfos(operatorSet OperatorSet) ([]IBN254TableCalculatorTypesBN254OperatorInfo, error) { - return _IBN254TableCalculator.Contract.GetOperatorInfos(&_IBN254TableCalculator.CallOpts, operatorSet) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_IBN254TableCalculator *IBN254TableCalculatorCaller) GetOperatorWeight(opts *bind.CallOpts, operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - var out []interface{} - err := _IBN254TableCalculator.contract.Call(opts, &out, "getOperatorWeight", operatorSet, operator) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_IBN254TableCalculator *IBN254TableCalculatorSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _IBN254TableCalculator.Contract.GetOperatorWeight(&_IBN254TableCalculator.CallOpts, operatorSet, operator) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_IBN254TableCalculator *IBN254TableCalculatorCallerSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _IBN254TableCalculator.Contract.GetOperatorWeight(&_IBN254TableCalculator.CallOpts, operatorSet, operator) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_IBN254TableCalculator *IBN254TableCalculatorCaller) GetOperatorWeights(opts *bind.CallOpts, operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - var out []interface{} - err := _IBN254TableCalculator.contract.Call(opts, &out, "getOperatorWeights", operatorSet) - - outstruct := new(struct { - Operators []common.Address - Weights [][]*big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Operators = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.Weights = *abi.ConvertType(out[1], new([][]*big.Int)).(*[][]*big.Int) - - return *outstruct, err - -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_IBN254TableCalculator *IBN254TableCalculatorSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _IBN254TableCalculator.Contract.GetOperatorWeights(&_IBN254TableCalculator.CallOpts, operatorSet) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_IBN254TableCalculator *IBN254TableCalculatorCallerSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _IBN254TableCalculator.Contract.GetOperatorWeights(&_IBN254TableCalculator.CallOpts, operatorSet) -} diff --git a/pkg/bindings/IECDSATableCalculator/binding.go b/pkg/bindings/IECDSATableCalculator/binding.go deleted file mode 100644 index 511b132ed9..0000000000 --- a/pkg/bindings/IECDSATableCalculator/binding.go +++ /dev/null @@ -1,465 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package IECDSATableCalculator - -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 -) - -// IECDSATableCalculatorTypesECDSAOperatorInfo is an auto generated low-level Go binding around an user-defined struct. -type IECDSATableCalculatorTypesECDSAOperatorInfo struct { - Pubkey common.Address - Weights []*big.Int -} - -// OperatorSet is an auto generated low-level Go binding around an user-defined struct. -type OperatorSet struct { - Avs common.Address - Id uint32 -} - -// IECDSATableCalculatorMetaData contains all meta data concerning the IECDSATableCalculator contract. -var IECDSATableCalculatorMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"calculateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateOperatorTableBytes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeight\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"weight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorWeights\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"operators\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"weights\",\"type\":\"uint256[][]\",\"internalType\":\"uint256[][]\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"LookaheadBlocksSet\",\"inputs\":[{\"name\":\"lookaheadBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"LookaheadBlocksTooHigh\",\"inputs\":[]}]", -} - -// IECDSATableCalculatorABI is the input ABI used to generate the binding from. -// Deprecated: Use IECDSATableCalculatorMetaData.ABI instead. -var IECDSATableCalculatorABI = IECDSATableCalculatorMetaData.ABI - -// IECDSATableCalculator is an auto generated Go binding around an Ethereum contract. -type IECDSATableCalculator struct { - IECDSATableCalculatorCaller // Read-only binding to the contract - IECDSATableCalculatorTransactor // Write-only binding to the contract - IECDSATableCalculatorFilterer // Log filterer for contract events -} - -// IECDSATableCalculatorCaller is an auto generated read-only Go binding around an Ethereum contract. -type IECDSATableCalculatorCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IECDSATableCalculatorTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IECDSATableCalculatorTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IECDSATableCalculatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IECDSATableCalculatorFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IECDSATableCalculatorSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IECDSATableCalculatorSession struct { - Contract *IECDSATableCalculator // 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 -} - -// IECDSATableCalculatorCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IECDSATableCalculatorCallerSession struct { - Contract *IECDSATableCalculatorCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IECDSATableCalculatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IECDSATableCalculatorTransactorSession struct { - Contract *IECDSATableCalculatorTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IECDSATableCalculatorRaw is an auto generated low-level Go binding around an Ethereum contract. -type IECDSATableCalculatorRaw struct { - Contract *IECDSATableCalculator // Generic contract binding to access the raw methods on -} - -// IECDSATableCalculatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IECDSATableCalculatorCallerRaw struct { - Contract *IECDSATableCalculatorCaller // Generic read-only contract binding to access the raw methods on -} - -// IECDSATableCalculatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IECDSATableCalculatorTransactorRaw struct { - Contract *IECDSATableCalculatorTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIECDSATableCalculator creates a new instance of IECDSATableCalculator, bound to a specific deployed contract. -func NewIECDSATableCalculator(address common.Address, backend bind.ContractBackend) (*IECDSATableCalculator, error) { - contract, err := bindIECDSATableCalculator(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IECDSATableCalculator{IECDSATableCalculatorCaller: IECDSATableCalculatorCaller{contract: contract}, IECDSATableCalculatorTransactor: IECDSATableCalculatorTransactor{contract: contract}, IECDSATableCalculatorFilterer: IECDSATableCalculatorFilterer{contract: contract}}, nil -} - -// NewIECDSATableCalculatorCaller creates a new read-only instance of IECDSATableCalculator, bound to a specific deployed contract. -func NewIECDSATableCalculatorCaller(address common.Address, caller bind.ContractCaller) (*IECDSATableCalculatorCaller, error) { - contract, err := bindIECDSATableCalculator(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IECDSATableCalculatorCaller{contract: contract}, nil -} - -// NewIECDSATableCalculatorTransactor creates a new write-only instance of IECDSATableCalculator, bound to a specific deployed contract. -func NewIECDSATableCalculatorTransactor(address common.Address, transactor bind.ContractTransactor) (*IECDSATableCalculatorTransactor, error) { - contract, err := bindIECDSATableCalculator(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IECDSATableCalculatorTransactor{contract: contract}, nil -} - -// NewIECDSATableCalculatorFilterer creates a new log filterer instance of IECDSATableCalculator, bound to a specific deployed contract. -func NewIECDSATableCalculatorFilterer(address common.Address, filterer bind.ContractFilterer) (*IECDSATableCalculatorFilterer, error) { - contract, err := bindIECDSATableCalculator(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IECDSATableCalculatorFilterer{contract: contract}, nil -} - -// bindIECDSATableCalculator binds a generic wrapper to an already deployed contract. -func bindIECDSATableCalculator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := IECDSATableCalculatorMetaData.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 (_IECDSATableCalculator *IECDSATableCalculatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IECDSATableCalculator.Contract.IECDSATableCalculatorCaller.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 (_IECDSATableCalculator *IECDSATableCalculatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IECDSATableCalculator.Contract.IECDSATableCalculatorTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IECDSATableCalculator *IECDSATableCalculatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IECDSATableCalculator.Contract.IECDSATableCalculatorTransactor.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 (_IECDSATableCalculator *IECDSATableCalculatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IECDSATableCalculator.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 (_IECDSATableCalculator *IECDSATableCalculatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IECDSATableCalculator.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IECDSATableCalculator *IECDSATableCalculatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IECDSATableCalculator.Contract.contract.Transact(opts, method, params...) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_IECDSATableCalculator *IECDSATableCalculatorCaller) CalculateOperatorTable(opts *bind.CallOpts, operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - var out []interface{} - err := _IECDSATableCalculator.contract.Call(opts, &out, "calculateOperatorTable", operatorSet) - - if err != nil { - return *new([]IECDSATableCalculatorTypesECDSAOperatorInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IECDSATableCalculatorTypesECDSAOperatorInfo)).(*[]IECDSATableCalculatorTypesECDSAOperatorInfo) - - return out0, err - -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_IECDSATableCalculator *IECDSATableCalculatorSession) CalculateOperatorTable(operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - return _IECDSATableCalculator.Contract.CalculateOperatorTable(&_IECDSATableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTable is a free data retrieval call binding the contract method 0x124c87e0. -// -// Solidity: function calculateOperatorTable((address,uint32) operatorSet) view returns((address,uint256[])[] operatorInfos) -func (_IECDSATableCalculator *IECDSATableCalculatorCallerSession) CalculateOperatorTable(operatorSet OperatorSet) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { - return _IECDSATableCalculator.Contract.CalculateOperatorTable(&_IECDSATableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_IECDSATableCalculator *IECDSATableCalculatorCaller) CalculateOperatorTableBytes(opts *bind.CallOpts, operatorSet OperatorSet) ([]byte, error) { - var out []interface{} - err := _IECDSATableCalculator.contract.Call(opts, &out, "calculateOperatorTableBytes", operatorSet) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_IECDSATableCalculator *IECDSATableCalculatorSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _IECDSATableCalculator.Contract.CalculateOperatorTableBytes(&_IECDSATableCalculator.CallOpts, operatorSet) -} - -// CalculateOperatorTableBytes is a free data retrieval call binding the contract method 0x41ee6d0e. -// -// Solidity: function calculateOperatorTableBytes((address,uint32) operatorSet) view returns(bytes operatorTableBytes) -func (_IECDSATableCalculator *IECDSATableCalculatorCallerSession) CalculateOperatorTableBytes(operatorSet OperatorSet) ([]byte, error) { - return _IECDSATableCalculator.Contract.CalculateOperatorTableBytes(&_IECDSATableCalculator.CallOpts, operatorSet) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_IECDSATableCalculator *IECDSATableCalculatorCaller) GetOperatorWeight(opts *bind.CallOpts, operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - var out []interface{} - err := _IECDSATableCalculator.contract.Call(opts, &out, "getOperatorWeight", operatorSet, operator) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_IECDSATableCalculator *IECDSATableCalculatorSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _IECDSATableCalculator.Contract.GetOperatorWeight(&_IECDSATableCalculator.CallOpts, operatorSet, operator) -} - -// GetOperatorWeight is a free data retrieval call binding the contract method 0x1088794a. -// -// Solidity: function getOperatorWeight((address,uint32) operatorSet, address operator) view returns(uint256 weight) -func (_IECDSATableCalculator *IECDSATableCalculatorCallerSession) GetOperatorWeight(operatorSet OperatorSet, operator common.Address) (*big.Int, error) { - return _IECDSATableCalculator.Contract.GetOperatorWeight(&_IECDSATableCalculator.CallOpts, operatorSet, operator) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_IECDSATableCalculator *IECDSATableCalculatorCaller) GetOperatorWeights(opts *bind.CallOpts, operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - var out []interface{} - err := _IECDSATableCalculator.contract.Call(opts, &out, "getOperatorWeights", operatorSet) - - outstruct := new(struct { - Operators []common.Address - Weights [][]*big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Operators = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.Weights = *abi.ConvertType(out[1], new([][]*big.Int)).(*[][]*big.Int) - - return *outstruct, err - -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_IECDSATableCalculator *IECDSATableCalculatorSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _IECDSATableCalculator.Contract.GetOperatorWeights(&_IECDSATableCalculator.CallOpts, operatorSet) -} - -// GetOperatorWeights is a free data retrieval call binding the contract method 0x71ca71d9. -// -// Solidity: function getOperatorWeights((address,uint32) operatorSet) view returns(address[] operators, uint256[][] weights) -func (_IECDSATableCalculator *IECDSATableCalculatorCallerSession) GetOperatorWeights(operatorSet OperatorSet) (struct { - Operators []common.Address - Weights [][]*big.Int -}, error) { - return _IECDSATableCalculator.Contract.GetOperatorWeights(&_IECDSATableCalculator.CallOpts, operatorSet) -} - -// IECDSATableCalculatorLookaheadBlocksSetIterator is returned from FilterLookaheadBlocksSet and is used to iterate over the raw logs and unpacked data for LookaheadBlocksSet events raised by the IECDSATableCalculator contract. -type IECDSATableCalculatorLookaheadBlocksSetIterator struct { - Event *IECDSATableCalculatorLookaheadBlocksSet // 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 *IECDSATableCalculatorLookaheadBlocksSetIterator) 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(IECDSATableCalculatorLookaheadBlocksSet) - 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(IECDSATableCalculatorLookaheadBlocksSet) - 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 *IECDSATableCalculatorLookaheadBlocksSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IECDSATableCalculatorLookaheadBlocksSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IECDSATableCalculatorLookaheadBlocksSet represents a LookaheadBlocksSet event raised by the IECDSATableCalculator contract. -type IECDSATableCalculatorLookaheadBlocksSet struct { - LookaheadBlocks *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterLookaheadBlocksSet is a free log retrieval operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_IECDSATableCalculator *IECDSATableCalculatorFilterer) FilterLookaheadBlocksSet(opts *bind.FilterOpts) (*IECDSATableCalculatorLookaheadBlocksSetIterator, error) { - - logs, sub, err := _IECDSATableCalculator.contract.FilterLogs(opts, "LookaheadBlocksSet") - if err != nil { - return nil, err - } - return &IECDSATableCalculatorLookaheadBlocksSetIterator{contract: _IECDSATableCalculator.contract, event: "LookaheadBlocksSet", logs: logs, sub: sub}, nil -} - -// WatchLookaheadBlocksSet is a free log subscription operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_IECDSATableCalculator *IECDSATableCalculatorFilterer) WatchLookaheadBlocksSet(opts *bind.WatchOpts, sink chan<- *IECDSATableCalculatorLookaheadBlocksSet) (event.Subscription, error) { - - logs, sub, err := _IECDSATableCalculator.contract.WatchLogs(opts, "LookaheadBlocksSet") - 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(IECDSATableCalculatorLookaheadBlocksSet) - if err := _IECDSATableCalculator.contract.UnpackLog(event, "LookaheadBlocksSet", 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 -} - -// ParseLookaheadBlocksSet is a log parse operation binding the contract event 0xa41e64dd47db91b61b43ccea8b57d75abfa496f23efc708c22753c4bc9d68842. -// -// Solidity: event LookaheadBlocksSet(uint256 lookaheadBlocks) -func (_IECDSATableCalculator *IECDSATableCalculatorFilterer) ParseLookaheadBlocksSet(log types.Log) (*IECDSATableCalculatorLookaheadBlocksSet, error) { - event := new(IECDSATableCalculatorLookaheadBlocksSet) - if err := _IECDSATableCalculator.contract.UnpackLog(event, "LookaheadBlocksSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/src/contracts/interfaces/IBN254TableCalculator.sol b/src/contracts/interfaces/IBN254TableCalculator.sol deleted file mode 100644 index 6741351b7c..0000000000 --- a/src/contracts/interfaces/IBN254TableCalculator.sol +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity >=0.5.0; - -import "../libraries/BN254.sol"; -import "../libraries/OperatorSetLib.sol"; -import "./IOperatorTableCalculator.sol"; - -interface IBN254TableCalculatorTypes { - /** - * @notice A struct that contains information about a single operator - * @param pubkey The G1 public key of the operator. - * @param weights The weights of the operator for a single operatorSet. - * @dev The `weights` array can be defined as a list of arbitrary groupings. For example, - * it can be [slashable_stake, delegated_stake, strategy_i_stake, ...] - */ - struct BN254OperatorInfo { - BN254.G1Point pubkey; - uint256[] weights; - } - - /** - * @notice A struct that contains information about all operators for a given operatorSet - * @param operatorInfoTreeRoot The root of the operatorInfo tree. Each leaf is a `BN254OperatorInfo` struct - * @param numOperators The number of operators in the operatorSet. - * @param aggregatePubkey The aggregate G1 public key of the operators in the operatorSet. - * @param totalWeights The total weights of the operators in the operatorSet. - * - * @dev The operatorInfoTreeRoot is the root of a merkle tree that contains the operatorInfos for each operator in the operatorSet. - * It is calculated in this function and used by the `IBN254CertificateVerifier` to verify stakes against the non-signing operators - * - * @dev Retrieval of the `aggregatePubKey` depends on maintaining a key registry contract or using the core `KeyRegistrar` contract. - * See `BN254TableCalculatorBase` in the middleware repo for an example implementation. - * - * @dev The `totalWeights` array should be the same length as each individual `weights` array in `operatorInfos`. - */ - struct BN254OperatorSetInfo { - bytes32 operatorInfoTreeRoot; - uint256 numOperators; - BN254.G1Point aggregatePubkey; - uint256[] totalWeights; - } -} - -interface IBN254TableCalculator is IOperatorTableCalculator, IBN254TableCalculatorTypes { - /** - * @notice calculates the operatorInfos for a given operatorSet - * @param operatorSet the operatorSet to calculate the operator table for - * @return operatorSetInfo the operatorSetInfo for the given operatorSet - * @dev The output of this function is converted to bytes via the `calculateOperatorTableBytes` function - */ - function calculateOperatorTable( - OperatorSet calldata operatorSet - ) external view returns (BN254OperatorSetInfo memory operatorSetInfo); - - /** - * @notice Get the operatorInfos for a given operatorSet - * @param operatorSet the operatorSet to get the operatorInfos for - * @return operatorInfos the operatorInfos for the given operatorSet - */ - function getOperatorInfos( - OperatorSet calldata operatorSet - ) external view returns (BN254OperatorInfo[] memory operatorInfos); -} diff --git a/src/contracts/interfaces/IECDSATableCalculator.sol b/src/contracts/interfaces/IECDSATableCalculator.sol deleted file mode 100644 index f233a8fa12..0000000000 --- a/src/contracts/interfaces/IECDSATableCalculator.sol +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity >=0.5.0; - -import "../libraries/OperatorSetLib.sol"; -import "./IOperatorTableCalculator.sol"; - -interface IECDSATableCalculatorTypes { - /** - * @notice A struct that contains information about a single operator - * @param pubkey The address of the signing ECDSA key of the operator and not the operator address itself. - * This is read from the KeyRegistrar contract. - * @param weights The weights of the operator for a single operatorSet - * @dev The `weights` array can be defined as a list of arbitrary groupings. For example, - * it can be [slashable_stake, delegated_stake, strategy_i_stake, ...] - * @dev The `weights` array should be the same length for each operator in the operatorSet. - */ - struct ECDSAOperatorInfo { - address pubkey; - uint256[] weights; - } -} - -interface IECDSATableCalculatorEvents { - /// @notice Emitted when the lookahead blocks are set - event LookaheadBlocksSet(uint256 lookaheadBlocks); -} - -interface IECDSATableCalculatorErrors { - /// @notice Emitted when the lookahead blocks are too high - error LookaheadBlocksTooHigh(); -} - -interface IECDSATableCalculator is - IOperatorTableCalculator, - IECDSATableCalculatorTypes, - IECDSATableCalculatorEvents, - IECDSATableCalculatorErrors -{ - /** - * @notice calculates the operatorInfos for a given operatorSet - * @param operatorSet the operatorSet to calculate the operator table for - * @return operatorInfos the list of operatorInfos for the given operatorSet - * @dev The output of this function is converted to bytes via the `calculateOperatorTableBytes` function - */ - function calculateOperatorTable( - OperatorSet calldata operatorSet - ) external view returns (ECDSAOperatorInfo[] memory operatorInfos); -}