diff --git a/pkg/bindings/BN254CertificateVerifier/binding.go b/pkg/bindings/BN254CertificateVerifier/binding.go index 495f9bd162..3f5767de31 100644 --- a/pkg/bindings/BN254CertificateVerifier/binding.go +++ b/pkg/bindings/BN254CertificateVerifier/binding.go @@ -85,8 +85,8 @@ type OperatorSet struct { // BN254CertificateVerifierMetaData contains all meta data concerning the BN254CertificateVerifier contract. var BN254CertificateVerifierMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_operatorTableUpdater\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"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\":\"getOperatorSetInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"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\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setMaxStalenessPeriod\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"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[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"indexed\":false,\"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[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECMulFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECPairingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpModFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", - Bin: "0x60a060405234801561000f575f5ffd5b506040516125c63803806125c683398101604081905261002e91610105565b6001600160a01b038116608052610043610049565b50610132565b5f54610100900460ff16156100b45760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614610103575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f60208284031215610115575f5ffd5b81516001600160a01b038116811461012b575f5ffd5b9392505050565b6080516124756101515f395f818161015a015261042b01526124755ff3fe608060405234801561000f575f5ffd5b50600436106100a6575f3560e01c80636738c40b1161006e5780636738c40b1461014257806368d6e081146101555780638481892014610194578063dd2ae1b9146101a7578063e49613fc146101ba578063eb39e68f146101da575f5ffd5b8063017d7974146100aa578063080b7150146100d25780632a610b75146100f25780635ddb9b5b146101075780636141879e1461012f575b5f5ffd5b6100bd6100b8366004611ecc565b6101fa565b60405190151581526020015b60405180910390f35b6100e56100e0366004611fa7565b61038b565b6040516100c99190611ff2565b610105610100366004612029565b6103a0565b005b61011a61011536600461205b565b6103d4565b60405163ffffffff90911681526020016100c9565b61011a61013d36600461205b565b6103fa565b61010561015036600461208b565b610420565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c9565b61017c6101a236600461205b565b6105ed565b6100bd6101b536600461214f565b610616565b6101cd6101c83660046121c2565b6106a9565b6040516100c99190612237565b6101ed6101e8366004612029565b610761565b6040516100c991906122b1565b5f5f6102068585610826565b90505f610212866109e6565b5f8181526004602081815260408084208a5163ffffffff1685528252808420815160808101835281548152600182015481850152825180840184526002830154815260038301548186015281840152938101805483518186028101860190945280845296975094959394909360608601938301828280156102b057602002820191905f5260205f20905b81548152602001906001019080831161029c575b50505050508152505090505f8160600151905085518451146102e55760405163512509d360e11b815260040160405180910390fd5b5f5b845181101561037a575f612710888381518110610306576103066122c3565b602002602001015161ffff16848481518110610324576103246122c3565b602002602001015161033691906122eb565b6103409190612316565b905080868381518110610355576103556122c3565b60200260200101511015610371575f9650505050505050610384565b506001016102e7565b5060019450505050505b9392505050565b60606103978383610826565b90505b92915050565b5f6103aa836109e6565b5f908152600260205260409020805463ffffffff191663ffffffff93909316929092179091555050565b5f5f6103df836109e6565b5f9081526003602052604090205463ffffffff169392505050565b5f5f610405836109e6565b5f9081526002602052604090205463ffffffff169392505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104695760405163030c1b6b60e11b815260040160405180910390fd5b5f61048161047c3687900387018761205b565b6109e6565b5f8181526003602052604090205490915063ffffffff908116908516116104bb57604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020818152604080842063ffffffff8916855282529283902086518155818701516001820155928601518051600285015581015160038401556060860151805187949361051393908501920190611862565b5050505f818152600360209081526040909120805463ffffffff191663ffffffff871617905561054590830183612329565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b03949094169390931790925561058491908401908401612342565b5f8281526002602052604090819020805463ffffffff191663ffffffff9390931692909217909155517f93e6bea1c9b5dce4a5c07b00261e956df2a4a253d9ab6ca070ca2037d72ada9e906105de9087908790879061235b565b60405180910390a15050505050565b5f5f6105f8836109e6565b5f908152600160205260409020546001600160a01b03169392505050565b5f5f6106228585610826565b905082518151146106465760405163512509d360e11b815260040160405180910390fd5b5f5b815181101561069d57838181518110610663576106636122c3565b602002602001015182828151811061067d5761067d6122c3565b60200260200101511015610695575f92505050610384565b600101610648565b50600195945050505050565b6106b16118ab565b5f6106bb856109e6565b5f81815260056020908152604080832063ffffffff89168452825280832087845282529182902082516080810184528154818501908152600183015460608301528152600282018054855181860281018601909652808652959650909491938584019390929083018282801561074e57602002820191905f5260205f20905b81548152602001906001019080831161073a575b5050505050815250509150509392505050565b6107696118d5565b5f610773846109e6565b5f81815260046020818152604080842063ffffffff891685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652959650929490936060860193909290919083018282801561081457602002820191905f5260205f20905b815481526020019060010190808311610800575b50505050508152505091505092915050565b6060610830611907565b610839846109e6565b80825283516108489190610a49565b80515f908152600460208181526040808420875163ffffffff16855282529283902083516080810185528154815260018201548184015284518086018652600283015481526003830154818501528186015292810180548551818502810185019096528086529394919360608601938301828280156108e457602002820191905f5260205f20905b8154815260200190600101908083116108d0575b50505091909252505050602082018190525161091357604051630cad17b760e31b815260040160405180910390fd5b806020015160600151516001600160401b0381111561093457610934611a35565b60405190808252806020026020018201604052801561095d578160200160208202803683370190505b5060408201525f5b816020015160600151518110156109c1578160200151606001518181518110610990576109906122c3565b6020026020010151826040015182815181106109ae576109ae6122c3565b6020908102919091010152600101610965565b506109cc8184610a9b565b60608201526109db8184610bc5565b604001519392505050565b5f815f0151826020015163ffffffff16604051602001610a3192919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261039a906123a7565b5f8281526002602052604090205463ffffffff16801580610a795750610a6f81836123ca565b63ffffffff164211155b610a965760405163640fcd6b60e11b815260040160405180910390fd5b505050565b6040805180820182525f808252602091820181905282518084019093528083529082018190525b826080015151811015610bbe575f83608001518281518110610ae657610ae66122c3565b60200260200101519050846020015160200151815f015163ffffffff1610610b21576040516301fa53c760e11b815260040160405180910390fd5b845184515f91610b319184610c33565b8051909150610b41908590610da8565b93505f5b816020015151811015610bb357866040015151811015610bab5781602001518181518110610b7557610b756122c3565b602002602001015187604001518281518110610b9357610b936122c3565b60200260200101818151610ba791906123e6565b9052505b600101610b45565b505050600101610ac2565b5092915050565b5f610be5610bd68460600151610e24565b60208501516040015190610da8565b90505f5f610c0184602001518486606001518760400151610eba565b91509150818015610c0f5750805b610c2c5760405163439cc0cd60e01b815260040160405180910390fd5b5050505050565b610c3b6118ab565b5f84815260056020908152604080832063ffffffff80881685529083528184208651909116845290915281208054909190151580610c7c5750600182015415155b905080610d25575f610c9c8787875f015188604001518960200151610edb565b905080610cbc5760405163439cc0cd60e01b815260040160405180910390fd5b6040808601515f8981526005602090815283822063ffffffff808c1684529082528483208a5190911683528152929020815180518255830151600182015582820151805192939192610d149260028501920190611862565b509050508460400151935050610d9f565b6040805160808101825283548183019081526001850154606083015281526002840180548351602082810282018101909552818152929386938186019390929091830182828015610d9357602002820191905f5260205f20905b815481526020019060010190808311610d7f575b50505050508152505092505b50509392505050565b604080518082019091525f8082526020820152610dc361194c565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa90508080610dfd57fe5b5080610e1c5760405163d4b68fd760e01b815260040160405180910390fd5b505092915050565b604080518082019091525f80825260208201528151158015610e4857506020820151155b15610e65575050604080518082019091525f808252602082015290565b6040518060400160405280835f015181526020015f5160206124205f395f51905f528460200151610e9691906123f9565b610ead905f5160206124205f395f51905f526123e6565b905292915050565b919050565b5f5f610ece86848787600162061a80610f46565b9150915094509492505050565b5f5f83604051602001610eee9190612237565b60408051601f1981840301815291815281516020928301205f8a81526004845282812063ffffffff808c1683529452919091205490925090610f3a908590839085908a81169061100e16565b98975050505050505050565b5f5f5f610f5289611025565b90505f610f618a89898c6110af565b90505f610f78610f718a84611163565b8b90610da8565b90505f610fba610fb384610fad6040805180820182525f80825260209182015281518083019092526001825260029082015290565b90611163565b8590610da8565b90508715610fdf57610fd682610fce6111cb565b838c8b61128b565b96509450610fff565b610ff282610feb6111cb565b838c61149f565b95508515610fff57600194505b50505050965096945050505050565b5f8361101b8685856116d6565b1495945050505050565b604080518082019091525f80825260208201525f80806110525f5160206124205f395f51905f52866123f9565b90505b61105e8161176d565b90935091505f5160206124205f395f51905f528283098303611096576040805180820190915290815260208101919091529392505050565b5f5160206124205f395f51905f52600182089050611055565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c61115a91906123f9565b95945050505050565b604080518082019091525f808252602082015261117e61196a565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa905080806111ac57fe5b5080610e1c57604051632319df1960e11b815260040160405180910390fd5b6111d3611988565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f918291906112bc6119a8565b5f5b6002811015611473575f6112d38260066122eb565b90508482600281106112e7576112e76122c3565b602002015151836112f8835f61240c565b600c8110611308576113086122c3565b602002015284826002811061131f5761131f6122c3565b60200201516020015183826001611336919061240c565b600c8110611346576113466122c3565b602002015283826002811061135d5761135d6122c3565b602002015151518361137083600261240c565b600c8110611380576113806122c3565b6020020152838260028110611397576113976122c3565b60200201515160016020020151836113b083600361240c565b600c81106113c0576113c06122c3565b60200201528382600281106113d7576113d76122c3565b6020020151602001515f600281106113f1576113f16122c3565b60200201518361140283600461240c565b600c8110611412576114126122c3565b6020020152838260028110611429576114296122c3565b602002015160200151600160028110611444576114446122c3565b60200201518361145583600561240c565b600c8110611465576114656122c3565b6020020152506001016112be565b5061147c6119c7565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f916114cd6119a8565b5f5b6002811015611684575f6114e48260066122eb565b90508482600281106114f8576114f86122c3565b60200201515183611509835f61240c565b600c8110611519576115196122c3565b6020020152848260028110611530576115306122c3565b60200201516020015183826001611547919061240c565b600c8110611557576115576122c3565b602002015283826002811061156e5761156e6122c3565b602002015151518361158183600261240c565b600c8110611591576115916122c3565b60200201528382600281106115a8576115a86122c3565b60200201515160016020020151836115c183600361240c565b600c81106115d1576115d16122c3565b60200201528382600281106115e8576115e86122c3565b6020020151602001515f60028110611602576116026122c3565b60200201518361161383600461240c565b600c8110611623576116236122c3565b602002015283826002811061163a5761163a6122c3565b602002015160200151600160028110611655576116556122c3565b60200201518361166683600561240c565b600c8110611676576116766122c3565b6020020152506001016114cf565b5061168d6119c7565b5f6020826101808560086107d05a03fa905080806116a757fe5b50806116c6576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b5f602084516116e591906123f9565b15611703576040516313717da960e21b815260040160405180910390fd5b8260205b855181116117645761171a6002856123f9565b5f0361173b57815f528086015160205260405f209150600284049350611752565b808601515f528160205260405f2091506002840493505b61175d60208261240c565b9050611707565b50949350505050565b5f80805f5160206124205f395f51905f5260035f5160206124205f395f51905f52865f5160206124205f395f51905f52888909090890505f6117dd827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f5160206124205f395f51905f526117e9565b91959194509092505050565b5f5f6117f36119c7565b6117fb6119e5565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa9250828061183857fe5b50826118575760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b828054828255905f5260205f2090810192821561189b579160200282015b8281111561189b578251825591602001919060010190611880565b506118a7929150611a03565b5090565b604080516080810182525f91810182815260608201929092529081905b8152602001606081525090565b60405180608001604052805f81526020015f81526020016118c860405180604001604052805f81526020015f81525090565b60405180608001604052805f81526020016119206118d5565b81526020016060815260200161194760405180604001604052805f81526020015f81525090565b905290565b60405180608001604052806004906020820280368337509192915050565b60405180606001604052806003906020820280368337509192915050565b604051806040016040528061199b611a17565b8152602001611947611a17565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b808211156118a7575f8155600101611a04565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611a6b57611a6b611a35565b60405290565b604051606081016001600160401b0381118282101715611a6b57611a6b611a35565b60405160a081016001600160401b0381118282101715611a6b57611a6b611a35565b604051608081016001600160401b0381118282101715611a6b57611a6b611a35565b604051601f8201601f191681016001600160401b0381118282101715611aff57611aff611a35565b604052919050565b80356001600160a01b0381168114610eb5575f5ffd5b803563ffffffff81168114610eb5575f5ffd5b5f60408284031215611b40575f5ffd5b611b48611a49565b9050611b5382611b07565b8152611b6160208301611b1d565b602082015292915050565b5f60408284031215611b7c575f5ffd5b611b84611a49565b823581526020928301359281019290925250919050565b5f82601f830112611baa575f5ffd5b611bb2611a49565b806040840185811115611bc3575f5ffd5b845b81811015611bdd578035845260209384019301611bc5565b509095945050505050565b5f6001600160401b03821115611c0057611c00611a35565b5060051b60200190565b5f82601f830112611c19575f5ffd5b8135611c2c611c2782611be8565b611ad7565b8082825260208201915060208360051b860101925085831115611c4d575f5ffd5b602085015b83811015611c6a578035835260209283019201611c52565b5095945050505050565b5f60608284031215611c84575f5ffd5b611c8c611a49565b9050611c988383611b6c565b815260408201356001600160401b03811115611cb2575f5ffd5b611cbe84828501611c0a565b60208301525092915050565b5f82601f830112611cd9575f5ffd5b8135611ce7611c2782611be8565b8082825260208201915060208360051b860101925085831115611d08575f5ffd5b602085015b83811015611c6a5780356001600160401b03811115611d2a575f5ffd5b86016060818903601f19011215611d3f575f5ffd5b611d47611a71565b611d5360208301611b1d565b815260408201356001600160401b03811115611d6d575f5ffd5b82016020810190603f018a13611d81575f5ffd5b80356001600160401b03811115611d9a57611d9a611a35565b611dad601f8201601f1916602001611ad7565b8181528b6020838501011115611dc1575f5ffd5b816020840160208301375f6020838301015280602085015250505060608201356001600160401b03811115611df4575f5ffd5b611e038a602083860101611c74565b60408301525084525060209283019201611d0d565b5f818303610120811215611e2a575f5ffd5b611e32611a93565b9150611e3d83611b1d565b825260208381013590830152611e568460408501611b6c565b60408301526080607f1982011215611e6c575f5ffd5b50611e75611a49565b611e828460808501611b9b565b8152611e918460c08501611b9b565b602082015260608201526101008201356001600160401b03811115611eb4575f5ffd5b611ec084828501611cca565b60808301525092915050565b5f5f5f60808486031215611ede575f5ffd5b611ee88585611b30565b925060408401356001600160401b03811115611f02575f5ffd5b611f0e86828701611e18565b92505060608401356001600160401b03811115611f29575f5ffd5b8401601f81018613611f39575f5ffd5b8035611f47611c2782611be8565b8082825260208201915060208360051b850101925088831115611f68575f5ffd5b6020840193505b82841015611f9957833561ffff81168114611f88575f5ffd5b825260209384019390910190611f6f565b809450505050509250925092565b5f5f60608385031215611fb8575f5ffd5b611fc28484611b30565b915060408301356001600160401b03811115611fdc575f5ffd5b611fe885828601611e18565b9150509250929050565b602080825282518282018190525f918401906040840190835b81811015611bdd57835183526020938401939092019160010161200b565b5f5f6060838503121561203a575f5ffd5b6120448484611b30565b915061205260408401611b1d565b90509250929050565b5f6040828403121561206b575f5ffd5b6103978383611b30565b5f60408284031215612085575f5ffd5b50919050565b5f5f5f5f60c0858703121561209e575f5ffd5b6120a88686612075565b93506120b660408601611b1d565b925060608501356001600160401b038111156120d0575f5ffd5b850160a081880312156120e1575f5ffd5b6120e9611ab5565b81358152602080830135908201526121048860408401611b6c565b604082015260808201356001600160401b03811115612121575f5ffd5b61212d89828501611c0a565b606083015250925061214490508660808701612075565b905092959194509250565b5f5f5f60808486031215612161575f5ffd5b61216b8585611b30565b925060408401356001600160401b03811115612185575f5ffd5b61219186828701611e18565b92505060608401356001600160401b038111156121ac575f5ffd5b6121b886828701611c0a565b9150509250925092565b5f5f5f608084860312156121d4575f5ffd5b6121de8585611b30565b92506121ec60408501611b1d565b929592945050506060919091013590565b5f8151808452602084019350602083015f5b8281101561222d57815186526020958601959091019060010161220f565b5093949350505050565b60208082528251805183830152015160408201525f602083015160608084015261226460808401826121fd565b949350505050565b80518252602081015160208301525f6040820151612297604085018280518252602090810151910152565b50606082015160a0608085015261226460a08501826121fd565b602081525f610397602083018461226c565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761039a5761039a6122d7565b634e487b7160e01b5f52601260045260245ffd5b5f8261232457612324612302565b500490565b5f60208284031215612339575f5ffd5b61039782611b07565b5f60208284031215612352575f5ffd5b61039782611b1d565b6001600160a01b0361236c85611b07565b16815263ffffffff61238060208601611b1d565b16602082015263ffffffff83166040820152608060608201525f61115a608083018461226c565b80516020808301519190811015612085575f1960209190910360031b1b16919050565b63ffffffff818116838216019081111561039a5761039a6122d7565b8181038181111561039a5761039a6122d7565b5f8261240757612407612302565b500690565b8082018082111561039a5761039a6122d756fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a2646970667358221220ddad88839ff42d19084cef812ed56bfe44fbc206dd39914e1aa5f039e8744a0b64736f6c634300081b0033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_operatorTableUpdater\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getNonsignerOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"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\":\"getOperatorSetInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"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\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isNonsignerCached\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"trySignatureVerification\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"aggPubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apkG2\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"pairingSuccessful\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signatureValid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"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[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"indexed\":false,\"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[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECMulFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECPairingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpModFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", + Bin: "0x60c060405234801561000f575f5ffd5b5060405161293738038061293783398101604081905261002e9161016a565b6001600160a01b0382166080528061004581610058565b60a0525061005161009e565b5050610294565b5f5f829050601f8151111561008b578260405163305a27a960e01b81526004016100829190610239565b60405180910390fd5b80516100968261026e565b179392505050565b5f54610100900460ff16156101055760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610082565b5f5460ff90811614610154575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017b575f5ffd5b82516001600160a01b0381168114610191575f5ffd5b60208401519092506001600160401b038111156101ac575f5ffd5b8301601f810185136101bc575f5ffd5b80516001600160401b038111156101d5576101d5610156565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020357610203610156565b60405281815282820160200187101561021a575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561028e575f198160200360031b1b821691505b50919050565b60805160a05161267b6102bc5f395f6104e401525f81816101de015261062f015261267b5ff3fe608060405234801561000f575f5ffd5b50600436106100cb575f3560e01c80635ddb9b5b1161008857806368d6e0811161006357806368d6e081146101d95780638481892014610218578063dd2ae1b91461022b578063eb39e68f1461023e575f5ffd5b80635ddb9b5b146101895780636141879e146101b15780636738c40b146101c4575f5ffd5b8063017d7974146100cf578063080b7150146100f75780631a18746c1461011757806326af6a3c1461014157806354fd4d50146101615780635be8727414610176575b5f5ffd5b6100e26100dd36600461205a565b61025e565b60405190151581526020015b60405180910390f35b61010a610105366004612135565b6103ef565b6040516100ee9190612180565b61012a6101253660046121b7565b610404565b6040805192151583529015156020830152016100ee565b61015461014f366004612205565b610425565b6040516100ee919061227a565b6101696104dd565b6040516100ee91906122af565b6100e2610184366004612205565b61050d565b61019c6101973660046122e4565b6105d8565b60405163ffffffff90911681526020016100ee565b61019c6101bf3660046122e4565b6105fe565b6101d76101d2366004612314565b610624565b005b6102007f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100ee565b6102006102263660046122e4565b6107f1565b6100e26102393660046123cd565b61081a565b61025161024c366004612440565b6108ad565b6040516100ee91906124b7565b5f5f61026a8585610972565b90505f61027686610b32565b5f8181526004602081815260408084208a5163ffffffff16855282528084208151608081018352815481526001820154818501528251808401845260028301548152600383015481860152818401529381018054835181860281018601909452808452969750949593949093606086019383018282801561031457602002820191905f5260205f20905b815481526020019060010190808311610300575b50505050508152505090505f8160600151905085518451146103495760405163512509d360e11b815260040160405180910390fd5b5f5b84518110156103de575f61271088838151811061036a5761036a6124c9565b602002602001015161ffff16848481518110610388576103886124c9565b602002602001015161039a91906124f1565b6103a4919061251c565b9050808683815181106103b9576103b96124c9565b602002602001015110156103d5575f96505050505050506103e8565b5060010161034b565b5060019450505050505b9392505050565b60606103fb8383610972565b90505b92915050565b5f5f61041886848787600162061a80610b95565b9150915094509492505050565b61042d6119f3565b5f61043785610b32565b5f81815260056020908152604080832063ffffffff8916845282528083208784528252918290208251608081018452815481850190815260018301546060830152815260028201805485518186028101860190965280865295965090949193858401939092908301828280156104ca57602002820191905f5260205f20905b8154815260200190600101908083116104b6575b5050505050815250509150509392505050565b60606105087f0000000000000000000000000000000000000000000000000000000000000000610c5d565b905090565b5f5f61051885610b32565b5f81815260056020908152604080832063ffffffff891684528252808320878452825280832081516080810183528154818401908152600183015460608301528152600282018054845181870281018701909552808552969750949590949193858101939291908301828280156105ac57602002820191905f5260205f20905b815481526020019060010190808311610598575b50505091909252505081515191925050158015906105ce575080516020015115155b9695505050505050565b5f5f6105e383610b32565b5f9081526003602052604090205463ffffffff169392505050565b5f5f61060983610b32565b5f9081526002602052604090205463ffffffff169392505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461066d5760405163030c1b6b60e11b815260040160405180910390fd5b5f610685610680368790038701876122e4565b610b32565b5f8181526003602052604090205490915063ffffffff908116908516116106bf57604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020818152604080842063ffffffff8916855282529283902086518155818701516001820155928601518051600285015581015160038401556060860151805187949361071793908501920190611a1d565b5050505f818152600360209081526040909120805463ffffffff191663ffffffff87161790556107499083018361252f565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b03949094169390931790925561078891908401908401612548565b5f8281526002602052604090819020805463ffffffff191663ffffffff9390931692909217909155517f93e6bea1c9b5dce4a5c07b00261e956df2a4a253d9ab6ca070ca2037d72ada9e906107e290879087908790612561565b60405180910390a15050505050565b5f5f6107fc83610b32565b5f908152600160205260409020546001600160a01b03169392505050565b5f5f6108268585610972565b9050825181511461084a5760405163512509d360e11b815260040160405180910390fd5b5f5b81518110156108a157838181518110610867576108676124c9565b6020026020010151828281518110610881576108816124c9565b60200260200101511015610899575f925050506103e8565b60010161084c565b50600195945050505050565b6108b5611a66565b5f6108bf84610b32565b5f81815260046020818152604080842063ffffffff891685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652959650929490936060860193909290919083018282801561096057602002820191905f5260205f20905b81548152602001906001019080831161094c575b50505050508152505091505092915050565b606061097c611a98565b61098584610b32565b80825283516109949190610c9a565b80515f908152600460208181526040808420875163ffffffff1685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652939491936060860193830182828015610a3057602002820191905f5260205f20905b815481526020019060010190808311610a1c575b505050919092525050506020820181905251610a5f57604051630cad17b760e31b815260040160405180910390fd5b806020015160600151516001600160401b03811115610a8057610a80611bc6565b604051908082528060200260200182016040528015610aa9578160200160208202803683370190505b5060408201525f5b81602001516060015151811015610b0d578160200151606001518181518110610adc57610adc6124c9565b602002602001015182604001518281518110610afa57610afa6124c9565b6020908102919091010152600101610ab1565b50610b188184610cec565b6060820152610b278184610e16565b604001519392505050565b5f815f0151826020015163ffffffff16604051602001610b7d92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526103fe906125ad565b5f5f5f610ba189610e84565b90505f610bb08a89898c610f0e565b90505f610bc7610bc08a84610fc2565b8b90611032565b90505f610c09610c0284610bfc6040805180820182525f80825260209182015281518083019092526001825260029082015290565b90610fc2565b8590611032565b90508715610c2e57610c2582610c1d6110a6565b838c8b611166565b96509450610c4e565b610c4182610c3a6110a6565b838c61137a565b95508515610c4e57600194505b50505050965096945050505050565b60605f610c69836115b1565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f8281526002602052604090205463ffffffff16801580610cca5750610cc081836125d0565b63ffffffff164211155b610ce75760405163640fcd6b60e11b815260040160405180910390fd5b505050565b6040805180820182525f808252602091820181905282518084019093528083529082018190525b826080015151811015610e0f575f83608001518281518110610d3757610d376124c9565b60200260200101519050846020015160200151815f015163ffffffff1610610d72576040516301fa53c760e11b815260040160405180910390fd5b845184515f91610d8291846115d8565b8051909150610d92908590611032565b93505f5b816020015151811015610e0457866040015151811015610dfc5781602001518181518110610dc657610dc66124c9565b602002602001015187604001518281518110610de457610de46124c9565b60200260200101818151610df891906125ec565b9052505b600101610d96565b505050600101610d13565b5092915050565b5f610e36610e27846060015161174f565b60208501516040015190611032565b90505f5f610e5284602001518486606001518760400151610404565b91509150818015610e605750805b610e7d5760405163439cc0cd60e01b815260040160405180910390fd5b5050505050565b604080518082019091525f80825260208201525f8080610eb15f5160206126265f395f51905f52866125ff565b90505b610ebd816117e5565b90935091505f5160206126265f395f51905f528283098303610ef5576040805180820190915290815260208101919091529392505050565b5f5160206126265f395f51905f52600182089050610eb4565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c610fb991906125ff565b95945050505050565b604080518082019091525f8082526020820152610fdd611add565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa9050808061100b57fe5b508061102a57604051632319df1960e11b815260040160405180910390fd5b505092915050565b604080518082019091525f808252602082015261104d611afb565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa9050808061108757fe5b508061102a5760405163d4b68fd760e01b815260040160405180910390fd5b6110ae611b19565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f91829190611197611b39565b5f5b600281101561134e575f6111ae8260066124f1565b90508482600281106111c2576111c26124c9565b602002015151836111d3835f612612565b600c81106111e3576111e36124c9565b60200201528482600281106111fa576111fa6124c9565b602002015160200151838260016112119190612612565b600c8110611221576112216124c9565b6020020152838260028110611238576112386124c9565b602002015151518361124b836002612612565b600c811061125b5761125b6124c9565b6020020152838260028110611272576112726124c9565b602002015151600160200201518361128b836003612612565b600c811061129b5761129b6124c9565b60200201528382600281106112b2576112b26124c9565b6020020151602001515f600281106112cc576112cc6124c9565b6020020151836112dd836004612612565b600c81106112ed576112ed6124c9565b6020020152838260028110611304576113046124c9565b60200201516020015160016002811061131f5761131f6124c9565b602002015183611330836005612612565b600c8110611340576113406124c9565b602002015250600101611199565b50611357611b58565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f916113a8611b39565b5f5b600281101561155f575f6113bf8260066124f1565b90508482600281106113d3576113d36124c9565b602002015151836113e4835f612612565b600c81106113f4576113f46124c9565b602002015284826002811061140b5761140b6124c9565b602002015160200151838260016114229190612612565b600c8110611432576114326124c9565b6020020152838260028110611449576114496124c9565b602002015151518361145c836002612612565b600c811061146c5761146c6124c9565b6020020152838260028110611483576114836124c9565b602002015151600160200201518361149c836003612612565b600c81106114ac576114ac6124c9565b60200201528382600281106114c3576114c36124c9565b6020020151602001515f600281106114dd576114dd6124c9565b6020020151836114ee836004612612565b600c81106114fe576114fe6124c9565b6020020152838260028110611515576115156124c9565b602002015160200151600160028110611530576115306124c9565b602002015183611541836005612612565b600c8110611551576115516124c9565b6020020152506001016113aa565b50611568611b58565b5f6020826101808560086107d05a03fa9050808061158257fe5b50806115a1576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b5f60ff8216601f8111156103fe57604051632cd44ac360e21b815260040160405180910390fd5b6115e06119f3565b5f84815260056020908152604080832063ffffffff808816855290835281842086519091168452825280832081516080810183528154818401908152600183015460608301528152600282018054845181870281018701909552808552919492938584019390929083018282801561167557602002820191905f5260205f20905b815481526020019060010190808311611661575b5050509190925250508151519192505f911515905080611699575081516020015115155b905080611742575f6116b98787875f015188604001518960200151611861565b9050806116d95760405163439cc0cd60e01b815260040160405180910390fd5b6040808601515f8981526005602090815283822063ffffffff808c1684529082528483208a51909116835281529290208151805182558301516001820155828201518051929391926117319260028501920190611a1d565b509050508460400151935050611746565b8192505b50509392505050565b604080518082019091525f8082526020820152815115801561177357506020820151155b15611790575050604080518082019091525f808252602082015290565b6040518060400160405280835f015181526020015f5160206126265f395f51905f5284602001516117c191906125ff565b6117d8905f5160206126265f395f51905f526125ec565b905292915050565b919050565b5f80805f5160206126265f395f51905f5260035f5160206126265f395f51905f52865f5160206126265f395f51905f52888909090890505f611855827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f5160206126265f395f51905f526118cc565b91959194509092505050565b5f5f83604051602001611874919061227a565b60408051601f1981840301815291815281516020928301205f8a81526004845282812063ffffffff808c16835294529190912054909250906118c0908590839085908a81169061194516565b98975050505050505050565b5f5f6118d6611b58565b6118de611b76565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa9250828061191b57fe5b508261193a5760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b5f8361195286858561195c565b1495945050505050565b5f6020845161196b91906125ff565b15611989576040516313717da960e21b815260040160405180910390fd5b8260205b855181116119ea576119a06002856125ff565b5f036119c157815f528086015160205260405f2091506002840493506119d8565b808601515f528160205260405f2091506002840493505b6119e3602082612612565b905061198d565b50949350505050565b604080516080810182525f91810182815260608201929092529081905b8152602001606081525090565b828054828255905f5260205f20908101928215611a56579160200282015b82811115611a56578251825591602001919060010190611a3b565b50611a62929150611b94565b5090565b60405180608001604052805f81526020015f8152602001611a1060405180604001604052805f81526020015f81525090565b60405180608001604052805f8152602001611ab1611a66565b815260200160608152602001611ad860405180604001604052805f81526020015f81525090565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b6040518060400160405280611b2c611ba8565b8152602001611ad8611ba8565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b80821115611a62575f8155600101611b95565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611bfc57611bfc611bc6565b60405290565b60405160a081016001600160401b0381118282101715611bfc57611bfc611bc6565b604051606081016001600160401b0381118282101715611bfc57611bfc611bc6565b604051608081016001600160401b0381118282101715611bfc57611bfc611bc6565b604051601f8201601f191681016001600160401b0381118282101715611c9057611c90611bc6565b604052919050565b80356001600160a01b03811681146117e0575f5ffd5b803563ffffffff811681146117e0575f5ffd5b5f60408284031215611cd1575f5ffd5b611cd9611bda565b9050611ce482611c98565b8152611cf260208301611cae565b602082015292915050565b5f60408284031215611d0d575f5ffd5b611d15611bda565b823581526020928301359281019290925250919050565b5f82601f830112611d3b575f5ffd5b611d43611bda565b806040840185811115611d54575f5ffd5b845b81811015611d6e578035845260209384019301611d56565b509095945050505050565b5f60808284031215611d89575f5ffd5b611d91611bda565b9050611d9d8383611d2c565b8152611cf28360408401611d2c565b5f6001600160401b03821115611dc457611dc4611bc6565b5060051b60200190565b5f82601f830112611ddd575f5ffd5b8135611df0611deb82611dac565b611c68565b8082825260208201915060208360051b860101925085831115611e11575f5ffd5b602085015b83811015611e2e578035835260209283019201611e16565b5095945050505050565b5f60608284031215611e48575f5ffd5b611e50611bda565b9050611e5c8383611cfd565b815260408201356001600160401b03811115611e76575f5ffd5b611e8284828501611dce565b60208301525092915050565b5f6101208284031215611e9f575f5ffd5b611ea7611c02565b9050611eb282611cae565b815260208281013590820152611ecb8360408401611cfd565b6040820152611edd8360808401611d79565b60608201526101008201356001600160401b03811115611efb575f5ffd5b8201601f81018413611f0b575f5ffd5b8035611f19611deb82611dac565b8082825260208201915060208360051b850101925086831115611f3a575f5ffd5b602084015b8381101561204a5780356001600160401b03811115611f5c575f5ffd5b85016060818a03601f19011215611f71575f5ffd5b611f79611c24565b611f8560208301611cae565b815260408201356001600160401b03811115611f9f575f5ffd5b82016020810190603f018b13611fb3575f5ffd5b80356001600160401b03811115611fcc57611fcc611bc6565b611fdf601f8201601f1916602001611c68565b8181528c6020838501011115611ff3575f5ffd5b816020840160208301375f6020838301015280602085015250505060608201356001600160401b03811115612026575f5ffd5b6120358b602083860101611e38565b60408301525084525060209283019201611f3f565b5060808501525091949350505050565b5f5f5f6080848603121561206c575f5ffd5b6120768585611cc1565b925060408401356001600160401b03811115612090575f5ffd5b61209c86828701611e8e565b92505060608401356001600160401b038111156120b7575f5ffd5b8401601f810186136120c7575f5ffd5b80356120d5611deb82611dac565b8082825260208201915060208360051b8501019250888311156120f6575f5ffd5b6020840193505b8284101561212757833561ffff81168114612116575f5ffd5b8252602093840193909101906120fd565b809450505050509250925092565b5f5f60608385031215612146575f5ffd5b6121508484611cc1565b915060408301356001600160401b0381111561216a575f5ffd5b61217685828601611e8e565b9150509250929050565b602080825282518282018190525f918401906040840190835b81811015611d6e578351835260209384019390920191600101612199565b5f5f5f5f61012085870312156121cb575f5ffd5b843593506121dc8660208701611cfd565b92506121eb8660608701611d79565b91506121fa8660e08701611cfd565b905092959194509250565b5f5f5f60808486031215612217575f5ffd5b6122218585611cc1565b925061222f60408501611cae565b929592945050506060919091013590565b5f8151808452602084019350602083015f5b82811015612270578151865260209586019590910190600101612252565b5093949350505050565b60208082528251805183830152015160408201525f60208301516060808401526122a76080840182612240565b949350505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f604082840312156122f4575f5ffd5b6103fb8383611cc1565b5f6040828403121561230e575f5ffd5b50919050565b5f5f5f5f60c08587031215612327575f5ffd5b61233186866122fe565b935061233f60408601611cae565b925060608501356001600160401b03811115612359575f5ffd5b850160a0818803121561236a575f5ffd5b612372611c46565b813581526020808301359082015261238d8860408401611cfd565b604082015260808201356001600160401b038111156123aa575f5ffd5b6123b689828501611dce565b60608301525092506121fa905086608087016122fe565b5f5f5f608084860312156123df575f5ffd5b6123e98585611cc1565b925060408401356001600160401b03811115612403575f5ffd5b61240f86828701611e8e565b92505060608401356001600160401b0381111561242a575f5ffd5b61243686828701611dce565b9150509250925092565b5f5f60608385031215612451575f5ffd5b61245b8484611cc1565b915061246960408401611cae565b90509250929050565b80518252602081015160208301525f604082015161249d604085018280518252602090810151910152565b50606082015160a060808501526122a760a0850182612240565b602081525f6103fb6020830184612472565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176103fe576103fe6124dd565b634e487b7160e01b5f52601260045260245ffd5b5f8261252a5761252a612508565b500490565b5f6020828403121561253f575f5ffd5b6103fb82611c98565b5f60208284031215612558575f5ffd5b6103fb82611cae565b6001600160a01b0361257285611c98565b16815263ffffffff61258660208601611cae565b16602082015263ffffffff83166040820152608060608201525f610fb96080830184612472565b8051602080830151919081101561230e575f1960209190910360031b1b16919050565b63ffffffff81811683821601908111156103fe576103fe6124dd565b818103818111156103fe576103fe6124dd565b5f8261260d5761260d612508565b500690565b808201808211156103fe576103fe6124dd56fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a2646970667358221220fd2799f8dd695e6668941ff1120d0e40682a75a7d8d30177a7d644d9a340b44264736f6c634300081b0033", } // BN254CertificateVerifierABI is the input ABI used to generate the binding from. @@ -98,7 +98,7 @@ var BN254CertificateVerifierABI = BN254CertificateVerifierMetaData.ABI var BN254CertificateVerifierBin = BN254CertificateVerifierMetaData.Bin // DeployBN254CertificateVerifier deploys a new Ethereum contract, binding an instance of BN254CertificateVerifier to it. -func DeployBN254CertificateVerifier(auth *bind.TransactOpts, backend bind.ContractBackend, _operatorTableUpdater common.Address) (common.Address, *types.Transaction, *BN254CertificateVerifier, error) { +func DeployBN254CertificateVerifier(auth *bind.TransactOpts, backend bind.ContractBackend, _operatorTableUpdater common.Address, _version string) (common.Address, *types.Transaction, *BN254CertificateVerifier, error) { parsed, err := BN254CertificateVerifierMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -107,7 +107,7 @@ func DeployBN254CertificateVerifier(auth *bind.TransactOpts, backend bind.Contra return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BN254CertificateVerifierBin), backend, _operatorTableUpdater) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BN254CertificateVerifierBin), backend, _operatorTableUpdater, _version) if err != nil { return common.Address{}, nil, nil, err } @@ -256,12 +256,12 @@ func (_BN254CertificateVerifier *BN254CertificateVerifierTransactorRaw) Transact return _BN254CertificateVerifier.Contract.contract.Transact(opts, method, params...) } -// GetOperatorInfo is a free data retrieval call binding the contract method 0xe49613fc. +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. // -// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) -func (_BN254CertificateVerifier *BN254CertificateVerifierCaller) GetOperatorInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_BN254CertificateVerifier *BN254CertificateVerifierCaller) GetNonsignerOperatorInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { var out []interface{} - err := _BN254CertificateVerifier.contract.Call(opts, &out, "getOperatorInfo", operatorSet, referenceTimestamp, operatorIndex) + err := _BN254CertificateVerifier.contract.Call(opts, &out, "getNonsignerOperatorInfo", operatorSet, referenceTimestamp, operatorIndex) if err != nil { return *new(IBN254TableCalculatorTypesBN254OperatorInfo), err @@ -273,18 +273,18 @@ func (_BN254CertificateVerifier *BN254CertificateVerifierCaller) GetOperatorInfo } -// GetOperatorInfo is a free data retrieval call binding the contract method 0xe49613fc. +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. // -// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) -func (_BN254CertificateVerifier *BN254CertificateVerifierSession) GetOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { - return _BN254CertificateVerifier.Contract.GetOperatorInfo(&_BN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_BN254CertificateVerifier *BN254CertificateVerifierSession) GetNonsignerOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { + return _BN254CertificateVerifier.Contract.GetNonsignerOperatorInfo(&_BN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) } -// GetOperatorInfo is a free data retrieval call binding the contract method 0xe49613fc. +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. // -// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) -func (_BN254CertificateVerifier *BN254CertificateVerifierCallerSession) GetOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { - return _BN254CertificateVerifier.Contract.GetOperatorInfo(&_BN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_BN254CertificateVerifier *BN254CertificateVerifierCallerSession) GetNonsignerOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { + return _BN254CertificateVerifier.Contract.GetNonsignerOperatorInfo(&_BN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) } // GetOperatorSetInfo is a free data retrieval call binding the contract method 0xeb39e68f. @@ -349,6 +349,37 @@ func (_BN254CertificateVerifier *BN254CertificateVerifierCallerSession) GetOpera return _BN254CertificateVerifier.Contract.GetOperatorSetOwner(&_BN254CertificateVerifier.CallOpts, operatorSet) } +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_BN254CertificateVerifier *BN254CertificateVerifierCaller) IsNonsignerCached(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + var out []interface{} + err := _BN254CertificateVerifier.contract.Call(opts, &out, "isNonsignerCached", operatorSet, referenceTimestamp, operatorIndex) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_BN254CertificateVerifier *BN254CertificateVerifierSession) IsNonsignerCached(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + return _BN254CertificateVerifier.Contract.IsNonsignerCached(&_BN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_BN254CertificateVerifier *BN254CertificateVerifierCallerSession) IsNonsignerCached(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + return _BN254CertificateVerifier.Contract.IsNonsignerCached(&_BN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + // LatestReferenceTimestamp is a free data retrieval call binding the contract method 0x5ddb9b5b. // // Solidity: function latestReferenceTimestamp((address,uint32) operatorSet) view returns(uint32) @@ -442,25 +473,80 @@ func (_BN254CertificateVerifier *BN254CertificateVerifierCallerSession) Operator return _BN254CertificateVerifier.Contract.OperatorTableUpdater(&_BN254CertificateVerifier.CallOpts) } -// SetMaxStalenessPeriod is a paid mutator transaction binding the contract method 0x2a610b75. +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. // -// Solidity: function setMaxStalenessPeriod((address,uint32) operatorSet, uint32 maxStalenessPeriod) returns() -func (_BN254CertificateVerifier *BN254CertificateVerifierTransactor) SetMaxStalenessPeriod(opts *bind.TransactOpts, operatorSet OperatorSet, maxStalenessPeriod uint32) (*types.Transaction, error) { - return _BN254CertificateVerifier.contract.Transact(opts, "setMaxStalenessPeriod", operatorSet, maxStalenessPeriod) +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_BN254CertificateVerifier *BN254CertificateVerifierCaller) TrySignatureVerification(opts *bind.CallOpts, msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + var out []interface{} + err := _BN254CertificateVerifier.contract.Call(opts, &out, "trySignatureVerification", msgHash, aggPubkey, apkG2, signature) + + outstruct := new(struct { + PairingSuccessful bool + SignatureValid bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.PairingSuccessful = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.SignatureValid = *abi.ConvertType(out[1], new(bool)).(*bool) + + return *outstruct, err + +} + +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. +// +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_BN254CertificateVerifier *BN254CertificateVerifierSession) TrySignatureVerification(msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + return _BN254CertificateVerifier.Contract.TrySignatureVerification(&_BN254CertificateVerifier.CallOpts, msgHash, aggPubkey, apkG2, signature) +} + +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. +// +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_BN254CertificateVerifier *BN254CertificateVerifierCallerSession) TrySignatureVerification(msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + return _BN254CertificateVerifier.Contract.TrySignatureVerification(&_BN254CertificateVerifier.CallOpts, msgHash, aggPubkey, apkG2, signature) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_BN254CertificateVerifier *BN254CertificateVerifierCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _BN254CertificateVerifier.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + } -// SetMaxStalenessPeriod is a paid mutator transaction binding the contract method 0x2a610b75. +// Version is a free data retrieval call binding the contract method 0x54fd4d50. // -// Solidity: function setMaxStalenessPeriod((address,uint32) operatorSet, uint32 maxStalenessPeriod) returns() -func (_BN254CertificateVerifier *BN254CertificateVerifierSession) SetMaxStalenessPeriod(operatorSet OperatorSet, maxStalenessPeriod uint32) (*types.Transaction, error) { - return _BN254CertificateVerifier.Contract.SetMaxStalenessPeriod(&_BN254CertificateVerifier.TransactOpts, operatorSet, maxStalenessPeriod) +// Solidity: function version() view returns(string) +func (_BN254CertificateVerifier *BN254CertificateVerifierSession) Version() (string, error) { + return _BN254CertificateVerifier.Contract.Version(&_BN254CertificateVerifier.CallOpts) } -// SetMaxStalenessPeriod is a paid mutator transaction binding the contract method 0x2a610b75. +// Version is a free data retrieval call binding the contract method 0x54fd4d50. // -// Solidity: function setMaxStalenessPeriod((address,uint32) operatorSet, uint32 maxStalenessPeriod) returns() -func (_BN254CertificateVerifier *BN254CertificateVerifierTransactorSession) SetMaxStalenessPeriod(operatorSet OperatorSet, maxStalenessPeriod uint32) (*types.Transaction, error) { - return _BN254CertificateVerifier.Contract.SetMaxStalenessPeriod(&_BN254CertificateVerifier.TransactOpts, operatorSet, maxStalenessPeriod) +// Solidity: function version() view returns(string) +func (_BN254CertificateVerifier *BN254CertificateVerifierCallerSession) Version() (string, error) { + return _BN254CertificateVerifier.Contract.Version(&_BN254CertificateVerifier.CallOpts) } // UpdateOperatorTable is a paid mutator transaction binding the contract method 0x6738c40b. diff --git a/pkg/bindings/BN254CertificateVerifierStorage/binding.go b/pkg/bindings/BN254CertificateVerifierStorage/binding.go index 4b640b77fd..2af4467fcd 100644 --- a/pkg/bindings/BN254CertificateVerifierStorage/binding.go +++ b/pkg/bindings/BN254CertificateVerifierStorage/binding.go @@ -85,7 +85,7 @@ type OperatorSet struct { // BN254CertificateVerifierStorageMetaData contains all meta data concerning the BN254CertificateVerifierStorage contract. var BN254CertificateVerifierStorageMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"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[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"indexed\":false,\"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[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", + ABI: "[{\"type\":\"function\",\"name\":\"getNonsignerOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"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\":\"getOperatorSetInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"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\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isNonsignerCached\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"trySignatureVerification\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"aggPubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apkG2\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"pairingSuccessful\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signatureValid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"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[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"indexed\":false,\"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[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", } // BN254CertificateVerifierStorageABI is the input ABI used to generate the binding from. @@ -234,6 +234,68 @@ func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageTransacto return _BN254CertificateVerifierStorage.Contract.contract.Transact(opts, method, params...) } +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. +// +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCaller) GetNonsignerOperatorInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { + var out []interface{} + err := _BN254CertificateVerifierStorage.contract.Call(opts, &out, "getNonsignerOperatorInfo", operatorSet, referenceTimestamp, operatorIndex) + + if err != nil { + return *new(IBN254TableCalculatorTypesBN254OperatorInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IBN254TableCalculatorTypesBN254OperatorInfo)).(*IBN254TableCalculatorTypesBN254OperatorInfo) + + return out0, err + +} + +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. +// +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageSession) GetNonsignerOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { + return _BN254CertificateVerifierStorage.Contract.GetNonsignerOperatorInfo(&_BN254CertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. +// +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCallerSession) GetNonsignerOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { + return _BN254CertificateVerifierStorage.Contract.GetNonsignerOperatorInfo(&_BN254CertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetOperatorSetInfo is a free data retrieval call binding the contract method 0xeb39e68f. +// +// Solidity: function getOperatorSetInfo((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((bytes32,uint256,(uint256,uint256),uint256[])) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCaller) GetOperatorSetInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { + var out []interface{} + err := _BN254CertificateVerifierStorage.contract.Call(opts, &out, "getOperatorSetInfo", operatorSet, referenceTimestamp) + + if err != nil { + return *new(IBN254TableCalculatorTypesBN254OperatorSetInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IBN254TableCalculatorTypesBN254OperatorSetInfo)).(*IBN254TableCalculatorTypesBN254OperatorSetInfo) + + return out0, err + +} + +// GetOperatorSetInfo is a free data retrieval call binding the contract method 0xeb39e68f. +// +// Solidity: function getOperatorSetInfo((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((bytes32,uint256,(uint256,uint256),uint256[])) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageSession) GetOperatorSetInfo(operatorSet OperatorSet, referenceTimestamp uint32) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { + return _BN254CertificateVerifierStorage.Contract.GetOperatorSetInfo(&_BN254CertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorSetInfo is a free data retrieval call binding the contract method 0xeb39e68f. +// +// Solidity: function getOperatorSetInfo((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((bytes32,uint256,(uint256,uint256),uint256[])) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCallerSession) GetOperatorSetInfo(operatorSet OperatorSet, referenceTimestamp uint32) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { + return _BN254CertificateVerifierStorage.Contract.GetOperatorSetInfo(&_BN254CertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp) +} + // GetOperatorSetOwner is a free data retrieval call binding the contract method 0x84818920. // // Solidity: function getOperatorSetOwner((address,uint32) operatorSet) view returns(address) @@ -265,6 +327,37 @@ func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCallerSes return _BN254CertificateVerifierStorage.Contract.GetOperatorSetOwner(&_BN254CertificateVerifierStorage.CallOpts, operatorSet) } +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCaller) IsNonsignerCached(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + var out []interface{} + err := _BN254CertificateVerifierStorage.contract.Call(opts, &out, "isNonsignerCached", operatorSet, referenceTimestamp, operatorIndex) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageSession) IsNonsignerCached(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + return _BN254CertificateVerifierStorage.Contract.IsNonsignerCached(&_BN254CertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCallerSession) IsNonsignerCached(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + return _BN254CertificateVerifierStorage.Contract.IsNonsignerCached(&_BN254CertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + // LatestReferenceTimestamp is a free data retrieval call binding the contract method 0x5ddb9b5b. // // Solidity: function latestReferenceTimestamp((address,uint32) operatorSet) view returns(uint32) @@ -358,6 +451,51 @@ func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCallerSes return _BN254CertificateVerifierStorage.Contract.OperatorTableUpdater(&_BN254CertificateVerifierStorage.CallOpts) } +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. +// +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCaller) TrySignatureVerification(opts *bind.CallOpts, msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + var out []interface{} + err := _BN254CertificateVerifierStorage.contract.Call(opts, &out, "trySignatureVerification", msgHash, aggPubkey, apkG2, signature) + + outstruct := new(struct { + PairingSuccessful bool + SignatureValid bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.PairingSuccessful = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.SignatureValid = *abi.ConvertType(out[1], new(bool)).(*bool) + + return *outstruct, err + +} + +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. +// +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageSession) TrySignatureVerification(msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + return _BN254CertificateVerifierStorage.Contract.TrySignatureVerification(&_BN254CertificateVerifierStorage.CallOpts, msgHash, aggPubkey, apkG2, signature) +} + +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. +// +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_BN254CertificateVerifierStorage *BN254CertificateVerifierStorageCallerSession) TrySignatureVerification(msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + return _BN254CertificateVerifierStorage.Contract.TrySignatureVerification(&_BN254CertificateVerifierStorage.CallOpts, msgHash, aggPubkey, apkG2, signature) +} + // UpdateOperatorTable is a paid mutator transaction binding the contract method 0x6738c40b. // // Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo, (address,uint32) operatorSetConfig) returns() diff --git a/pkg/bindings/ECDSACertificateVerifier/binding.go b/pkg/bindings/ECDSACertificateVerifier/binding.go index 3950da722d..a95fc5d31d 100644 --- a/pkg/bindings/ECDSACertificateVerifier/binding.go +++ b/pkg/bindings/ECDSACertificateVerifier/binding.go @@ -56,8 +56,8 @@ type OperatorSet struct { // ECDSACertificateVerifierMetaData contains all meta data concerning the ECDSACertificateVerifier contract. var ECDSACertificateVerifierMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_operatorTableUpdater\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"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\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b5060405161210238038061210283398101604081905261002e9161016d565b6001600160a01b03821660805280806100468161005b565b60a0525061005490506100a1565b5050610297565b5f5f829050601f8151111561008e578260405163305a27a960e01b8152600401610085919061023c565b60405180910390fd5b805161009982610271565b179392505050565b5f54610100900460ff16156101085760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610085565b5f5460ff90811614610157575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017e575f5ffd5b82516001600160a01b0381168114610194575f5ffd5b60208401519092506001600160401b038111156101af575f5ffd5b8301601f810185136101bf575f5ffd5b80516001600160401b038111156101d8576101d8610159565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020657610206610159565b60405281815282820160200187101561021d575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610291575f198160200360031b1b821691505b50919050565b60805160a051611e3c6102c65f395f81816102880152610f9f01525f818161014501526102bc0152611e3c5ff3fe608060405234801561000f575f5ffd5b50600436106100b1575f3560e01c80637c85ac4c1161006e5780637c85ac4c1461017f57806380c7d3f31461019f57806384818920146101bf578063be86e0b2146101d2578063c0da2420146101f5578063f698da2514610208575f5ffd5b806318467434146100b557806354fd4d50146100db57806356d482f5146100f05780635ddb9b5b146101055780636141879e1461012d57806368d6e08114610140575b5f5ffd5b6100c86100c33660046114f5565b610210565b6040519081526020015b60405180910390f35b6100e3610281565b6040516100d2919061154b565b6101036100fe3660046115b3565b6102b1565b005b6101186101133660046116dd565b6104b3565b60405163ffffffff90911681526020016100d2565b61011861013b3660046116dd565b6104d9565b6101677f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d2565b61019261018d3660046116f7565b6104ff565b6040516100d29190611729565b6101b26101ad3660046117e7565b61066d565b6040516100d29190611832565b6101676101cd3660046116dd565b610680565b6101e56101e0366004611874565b6106a9565b60405190151581526020016100d2565b6101e5610203366004611956565b61073c565b6100c8610835565b604080517fda346acb3ce99e7c5132bf8cafb159ad8085970ebfdba78007ef0fe163063d14602082015263ffffffff841691810191909152606081018290525f908190608001604051602081830303815290604052805190602001209050610277816108f5565b9150505b92915050565b60606102ac7f000000000000000000000000000000000000000000000000000000000000000061093b565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102fa5760405163030c1b6b60e11b815260040160405180910390fd5b5f61031261030d368890038801886116dd565b610978565b5f8181526003602052604090205490915063ffffffff9081169086161161034c57604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff8916845290915281208490555b838110156103d857848482818110610388576103886119cc565b905060200281019061039a91906119e0565b5f83815260056020908152604080832063ffffffff808c168552908352818420908616845290915290206103ce8282611a29565b505060010161036e565b505f818152600360209081526040909120805463ffffffff191663ffffffff881617905561040890830183611b2c565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b03949094169390931790925561044791908401908401611b47565b5f8281526002602052604090819020805463ffffffff191663ffffffff9390931692909217909155517f4f588da9ec57976194a79b5594f8f8782923d93013df2b9ed12fe125805011ef906104a3908890889088908890611b60565b60405180910390a1505050505050565b5f5f6104be83610978565b5f9081526003602052604090205463ffffffff169392505050565b5f5f6104e483610978565b5f9081526002602052604090205463ffffffff169392505050565b60605f61050b84610978565b5f81815260046020908152604080832063ffffffff8089168552925282205492935082166001600160401b0381111561054657610546611625565b60405190808252806020026020018201604052801561058b57816020015b604080518082019091525f8152606060208201528152602001906001900390816105645790505b5090505f5b8263ffffffff168163ffffffff161015610663575f84815260056020908152604080832063ffffffff808b16855290835281842090851684528252918290208251808401845281546001600160a01b031681526001820180548551818602810186019096528086529194929385810193929083018282801561062f57602002820191905f5260205f20905b81548152602001906001019080831161061b575b505050505081525050828263ffffffff1681518110610650576106506119cc565b6020908102919091010152600101610590565b5095945050505050565b606061067983836109db565b9392505050565b5f5f61068b83610978565b5f908152600160205260409020546001600160a01b03169392505050565b5f5f6106b585856109db565b905082518151146106d95760405163512509d360e11b815260040160405180910390fd5b5f5b8151811015610730578381815181106106f6576106f66119cc565b6020026020010151828281518110610710576107106119cc565b60200260200101511015610728575f92505050610679565b6001016106db565b50600195945050505050565b5f5f61074886866109db565b90505f6107618761075c6020890189611b47565b610d9c565b825190915084146107855760405163512509d360e11b815260040160405180910390fd5b5f5b8251811015610825575f6127108787848181106107a6576107a66119cc565b90506020020160208101906107bb9190611c93565b61ffff168484815181106107d1576107d16119cc565b60200260200101516107e39190611a12565b6107ed9190611cc8565b905080848381518110610802576108026119cc565b6020026020010151101561081c575f94505050505061082d565b50600101610787565b506001925050505b949350505050565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f91ab3d17e3a50a9d89e63fd30b92be7f5336b03b287bb946787a83a9d62a27667f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea6108a2610f97565b80516020918201206040516108da949392309101938452602084019290925260408301526001600160a01b0316606082015260800190565b60405160208183030381529060405280519060200120905090565b5f6108fe610835565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b60605f6109478361100c565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f815f0151826020015163ffffffff166040516020016109c392919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261027b90611cdb565b60605f6109f061030d368690038601866116dd565b5f8181526002602090815260409091205491925063ffffffff90911690610a1990850185611b47565b610a239190611cfe565b63ffffffff16421115610a495760405163640fcd6b60e11b815260040160405180910390fd5b610a566020840184611b47565b5f8281526003602052604090205463ffffffff908116911614610a8c57604051630cad17b760e31b815260040160405180910390fd5b5f610a9e8561075c6020870187611b47565b90505f81516001600160401b03811115610aba57610aba611625565b604051908082528060200260200182016040528015610ae3578160200160208202803683370190505b5090505f610b01610af76020880188611b47565b8760200135610210565b90505f80610b4f83610b1660408b018b611d1a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061103392505050565b9150915080610b715760405163439cc0cd60e01b815260040160405180910390fd5b5f5b8251811015610d8e575f838281518110610b8f57610b8f6119cc565b602002602001015190505f5f9050610bc260405180604001604052805f6001600160a01b03168152602001606081525090565b5f5b60045f8c81526020019081526020015f205f8e5f016020810190610be89190611b47565b63ffffffff1663ffffffff1681526020019081526020015f2054811015610ced5760055f8c81526020019081526020015f205f8e5f016020810190610c2d9190611b47565b63ffffffff908116825260208083019390935260409182015f90812091851681529083528190208151808301835281546001600160a01b031681526001820180548451818702810187019095528085529194929385840193909290830182828015610cb557602002820191905f5260205f20905b815481526020019060010190808311610ca1575b5050505050815250509150836001600160a01b0316825f01516001600160a01b031603610ce55760019250610ced565b600101610bc4565b5081610d0c5760405163439cc0cd60e01b815260040160405180910390fd5b60208101515f5b815181108015610d235750895181105b15610d7d57818181518110610d3a57610d3a6119cc565b60200260200101518a8281518110610d5457610d546119cc565b60200260200101818151610d689190611d5c565b90525080610d7581611d6f565b915050610d13565b505060019093019250610b73915050565b509298975050505050505050565b60605f610db161030d368690038601866116dd565b5f8181526003602052604090205490915063ffffffff848116911614610dea57604051630cad17b760e31b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff8716845290915290205480610e2757604051630cad17b760e31b815260040160405180910390fd5b5f82815260056020908152604080832063ffffffff881684528252808320838052909152902060010154806001600160401b03811115610e6957610e69611625565b604051908082528060200260200182016040528015610e92578160200160208202803683370190505b5093505f5b82811015610f8d575f84815260056020908152604080832063ffffffff808b1685529083528184209085168452825280832060010180548251818502810185019093528083529192909190830182828015610f0f57602002820191905f5260205f20905b815481526020019060010190808311610efb575b509394505f93505050505b815181108015610f2957508381105b15610f8357818181518110610f4057610f406119cc565b6020026020010151878281518110610f5a57610f5a6119cc565b60200260200101818151610f6e9190611d5c565b90525080610f7b81611d6f565b915050610f1a565b5050600101610e97565b5050505092915050565b60605f610fc37f000000000000000000000000000000000000000000000000000000000000000061093b565b9050805f81518110610fd757610fd76119cc565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f60ff8216601f81111561027b57604051632cd44ac360e21b815260040160405180910390fd5b60605f604183516110449190611d87565b1561106257604051634be6321b60e01b815260040160405180910390fd5b5f604184516110719190611cc8565b9050806001600160401b0381111561108b5761108b611625565b6040519080825280602002602001820160405280156110b4578160200160208202803683370190505b5092505f5b8181101561123657604080516041808252608082019092525f916020820181803683370190505090505f5b604181101561114f5786816110fa856041611a12565b6111049190611d5c565b81518110611114576111146119cc565b602001015160f81c60f81b828281518110611131576111316119cc565b60200101906001600160f81b03191690815f1a9053506001016110e4565b505f5f61115c8984611244565b90925090505f81600481111561117457611174611d9a565b14158061118857506001600160a01b038216155b1561119b57505f945061123d9350505050565b5f841180156111df5750866111b1600186611dae565b815181106111c1576111c16119cc565b60200260200101516001600160a01b0316826001600160a01b031611155b156111f257505f945061123d9350505050565b6111ff828a855f19611283565b81878581518110611212576112126119cc565b6001600160a01b0392909216602092830291909101909101525050506001016110b9565b5060019150505b9250929050565b5f5f8251604103611278576020830151604084015160608501515f1a61126c878285856112db565b9450945050505061123d565b505f9050600261123d565b428110156112a457604051630819bdcd60e01b815260040160405180910390fd5b6112b86001600160a01b0385168484611398565b6112d557604051638baa579f60e01b815260040160405180910390fd5b50505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561131057505f9050600361138f565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611361573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116611389575f6001925092505061138f565b91505f90505b94509492505050565b5f5f5f6113a58585611244565b90925090505f8160048111156113bd576113bd611d9a565b1480156113db5750856001600160a01b0316826001600160a01b0316145b806113ec57506113ec8686866113f6565b9695505050505050565b5f5f5f856001600160a01b0316631626ba7e60e01b868660405160240161141e929190611dc1565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161145c9190611dd9565b5f60405180830381855afa9150503d805f8114611494576040519150601f19603f3d011682016040523d82523d5f602084013e611499565b606091505b50915091508180156114ad57506020815110155b80156113ec57508051630b135d3f60e11b906114d29083016020908101908401611def565b149695505050505050565b803563ffffffff811681146114f0575f5ffd5b919050565b5f5f60408385031215611506575f5ffd5b61150f836114dd565b946020939093013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610679602083018461151d565b5f6040828403121561156d575f5ffd5b50919050565b5f5f83601f840112611583575f5ffd5b5081356001600160401b03811115611599575f5ffd5b6020830191508360208260051b850101111561123d575f5ffd5b5f5f5f5f5f60c086880312156115c7575f5ffd5b6115d1878761155d565b94506115df604087016114dd565b935060608601356001600160401b038111156115f9575f5ffd5b61160588828901611573565b90945092506116199050876080880161155d565b90509295509295909350565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561166157611661611625565b604052919050565b6001600160a01b038116811461167d575f5ffd5b50565b5f60408284031215611690575f5ffd5b604080519081016001600160401b03811182821017156116b2576116b2611625565b60405290508082356116c381611669565b81526116d1602084016114dd565b60208201525092915050565b5f604082840312156116ed575f5ffd5b6106798383611680565b5f5f60608385031215611708575f5ffd5b6117128484611680565b9150611720604084016114dd565b90509250929050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b828110156117cb57868503603f19018452815180516001600160a01b03168652602090810151604082880181905281519088018190529101905f9060608801905b808310156117b35783518252602082019150602084019350600183019250611790565b5096505050602093840193919091019060010161174f565b50929695505050505050565b5f6060828403121561156d575f5ffd5b5f5f606083850312156117f8575f5ffd5b611802848461155d565b915060408301356001600160401b0381111561181c575f5ffd5b611828858286016117d7565b9150509250929050565b602080825282518282018190525f918401906040840190835b8181101561186957835183526020938401939092019160010161184b565b509095945050505050565b5f5f5f60808486031215611886575f5ffd5b611890858561155d565b925060408401356001600160401b038111156118aa575f5ffd5b6118b6868287016117d7565b92505060608401356001600160401b038111156118d1575f5ffd5b8401601f810186136118e1575f5ffd5b80356001600160401b038111156118fa576118fa611625565b8060051b61190a60208201611639565b91825260208184018101929081019089841115611925575f5ffd5b6020850194505b8385101561194757843582526020948501949091019061192c565b80955050505050509250925092565b5f5f5f5f60808587031215611969575f5ffd5b611973868661155d565b935060408501356001600160401b0381111561198d575f5ffd5b611999878288016117d7565b93505060608501356001600160401b038111156119b4575f5ffd5b6119c087828801611573565b95989497509550505050565b634e487b7160e01b5f52603260045260245ffd5b5f8235603e198336030181126119f4575f5ffd5b9190910192915050565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761027b5761027b6119fe565b8135611a3481611669565b81546001600160a01b0319166001600160a01b0391909116178155602082013536839003601e19018112611a66575f5ffd5b820180356001600160401b03811115611a7d575f5ffd5b6020820191508060051b3603821315611a94575f5ffd5b600183016001600160401b03821115611aaf57611aaf611625565b68010000000000000000821115611ac857611ac8611625565b805482825580831015611afd575f828152602090208381019082015b80821015611afa575f8255600182019150611ae4565b50505b505f90815260208120905b82811015611b2457833582820155602090930192600101611b08565b505050505050565b5f60208284031215611b3c575f5ffd5b813561067981611669565b5f60208284031215611b57575f5ffd5b610679826114dd565b5f608082018635611b7081611669565b6001600160a01b0316835263ffffffff611b8c602089016114dd565b16602084015263ffffffff861660408401526080606084015283905260a0600584901b83018101908301855f603e1936839003015b87821015611c8457868503609f190184528235818112611bdf575f5ffd5b89018035611bec81611669565b6001600160a01b03168652602081013536829003601e19018112611c0e575f5ffd5b016020810190356001600160401b03811115611c28575f5ffd5b8060051b803603831315611c3a575f5ffd5b60406020890181905288018290526001600160fb1b03821115611c5b575f5ffd5b808360608a01376060818901019750505050602083019250602084019350600182019150611bc1565b50929998505050505050505050565b5f60208284031215611ca3575f5ffd5b813561ffff81168114610679575f5ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82611cd657611cd6611cb4565b500490565b8051602080830151919081101561156d575f1960209190910360031b1b16919050565b63ffffffff818116838216019081111561027b5761027b6119fe565b5f5f8335601e19843603018112611d2f575f5ffd5b8301803591506001600160401b03821115611d48575f5ffd5b60200191503681900382131561123d575f5ffd5b8082018082111561027b5761027b6119fe565b5f60018201611d8057611d806119fe565b5060010190565b5f82611d9557611d95611cb4565b500690565b634e487b7160e01b5f52602160045260245ffd5b8181038181111561027b5761027b6119fe565b828152604060208201525f61082d604083018461151d565b5f82518060208501845e5f920191825250919050565b5f60208284031215611dff575f5ffd5b505191905056fea2646970667358221220af476213d2afa9d15f0a3d127240d1a16633f95a1f6d9b2d146c321e8327642864736f6c634300081b0033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_operatorTableUpdater\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"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\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", + Bin: "0x60c060405234801561000f575f5ffd5b5060405161235d38038061235d83398101604081905261002e9161016d565b6001600160a01b03821660805280806100468161005b565b60a0525061005490506100a1565b5050610297565b5f5f829050601f8151111561008e578260405163305a27a960e01b8152600401610085919061023c565b60405180910390fd5b805161009982610271565b179392505050565b5f54610100900460ff16156101085760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610085565b5f5460ff90811614610157575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017e575f5ffd5b82516001600160a01b0381168114610194575f5ffd5b60208401519092506001600160401b038111156101af575f5ffd5b8301601f810185136101bf575f5ffd5b80516001600160401b038111156101d8576101d8610159565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020657610206610159565b60405281815282820160200187101561021d575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610291575f198160200360031b1b821691505b50919050565b60805160a0516120976102c65f395f8181610679015261118201525f81816101db01526106ad01526120975ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80636141879e1161009357806384818920116100635780638481892014610248578063be86e0b21461025b578063c0da24201461027e578063f698da2514610291575f5ffd5b80636141879e146101c357806368d6e081146101d65780637c85ac4c1461021557806380c7d3f314610235575f5ffd5b806323c2a3cb116100ce57806323c2a3cb1461015e57806354fd4d501461018657806356d482f51461019b5780635ddb9b5b146101b0575f5ffd5b806304cdbae4146100f4578063082ef73d1461011d578063184674341461013d575b5f5ffd5b6101076101023660046116ee565b610299565b6040516101149190611720565b60405180910390f35b61013061012b36600461181a565b61049d565b60405161011491906118b0565b61015061014b3660046118c2565b6105d0565b604051908152602001610114565b61017161016c3660046118ea565b61063f565b60405163ffffffff9091168152602001610114565b61018e610672565b6040516101149190611933565b6101ae6101a9366004611985565b6106a2565b005b6101716101be3660046119f7565b61089f565b6101716101d13660046119f7565b6108c5565b6101fd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610114565b6102286102233660046118ea565b6108eb565b6040516101149190611a11565b610107610243366004611a84565b610a59565b6101fd6102563660046119f7565b610a65565b61026e610269366004611acf565b610a8e565b6040519015158152602001610114565b61026e61028c366004611bb1565b610b21565b610150610c13565b60605f6102b36102ae368690038601866119f7565b610cd3565b5f8181526003602052604090205490915063ffffffff8481169116146102ec57604051630cad17b760e31b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff871684529091529020548061032957604051630cad17b760e31b815260040160405180910390fd5b5f82815260056020908152604080832063ffffffff88168452825280832083805290915281206001015490816001600160401b0381111561036c5761036c611762565b604051908082528060200260200182016040528015610395578160200160208202803683370190505b5090505f5b83811015610490575f85815260056020908152604080832063ffffffff808c168552908352818420908516845282528083206001018054825181850281018501909352808352919290919083018282801561041257602002820191905f5260205f20905b8154815260200190600101908083116103fe575b509394505f93505050505b81518110801561042c57508481105b156104865781818151811061044357610443611c27565b602002602001015184828151811061045d5761045d611c27565b602002602001018181516104719190611c4f565b9052508061047e81611c62565b91505061041d565b505060010161039a565b5093505050505b92915050565b604080518082019091525f8152606060208201525f6104bb85610cd3565b5f81815260046020908152604080832063ffffffff808a1685529252909120549192508416106105315760405162461bcd60e51b815260206004820152601c60248201527f4f70657261746f7220696e646578206f7574206f6620626f756e647300000000604482015260640160405180910390fd5b5f81815260056020908152604080832063ffffffff808916855290835281842090871684528252918290208251808401845281546001600160a01b03168152600182018054855181860281018601909652808652919492938581019392908301828280156105bc57602002820191905f5260205f20905b8154815260200190600101908083116105a8575b5050505050815250509150505b9392505050565b604080517fda346acb3ce99e7c5132bf8cafb159ad8085970ebfdba78007ef0fe163063d14602082015263ffffffff841691810191909152606081018290525f90819060800160405160208183030381529060405280519060200120905061063781610d36565b949350505050565b5f5f61064a84610cd3565b5f90815260046020908152604080832063ffffffff8716845290915290205491505092915050565b606061069d7f0000000000000000000000000000000000000000000000000000000000000000610d7c565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106eb5760405163030c1b6b60e11b815260040160405180910390fd5b5f6106fe6102ae368890038801886119f7565b5f8181526003602052604090205490915063ffffffff9081169086161161073857604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff8916845290915281208490555b838110156107c45784848281811061077457610774611c27565b90506020028101906107869190611c7a565b5f83815260056020908152604080832063ffffffff808c168552908352818420908616845290915290206107ba8282611caf565b505060010161075a565b505f818152600360209081526040909120805463ffffffff191663ffffffff88161790556107f490830183611db2565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b03949094169390931790925561083391908401908401611dcd565b5f8281526002602052604090819020805463ffffffff191663ffffffff9390931692909217909155517f4f588da9ec57976194a79b5594f8f8782923d93013df2b9ed12fe125805011ef9061088f908890889088908890611de6565b60405180910390a1505050505050565b5f5f6108aa83610cd3565b5f9081526003602052604090205463ffffffff169392505050565b5f5f6108d083610cd3565b5f9081526002602052604090205463ffffffff169392505050565b60605f6108f784610cd3565b5f81815260046020908152604080832063ffffffff8089168552925282205492935082166001600160401b0381111561093257610932611762565b60405190808252806020026020018201604052801561097757816020015b604080518082019091525f8152606060208201528152602001906001900390816109505790505b5090505f5b8263ffffffff168163ffffffff161015610a4f575f84815260056020908152604080832063ffffffff808b16855290835281842090851684528252918290208251808401845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015610a1b57602002820191905f5260205f20905b815481526020019060010190808311610a07575b505050505081525050828263ffffffff1681518110610a3c57610a3c611c27565b602090810291909101015260010161097c565b5095945050505050565b60606105c98383610db9565b5f5f610a7083610cd3565b5f908152600160205260409020546001600160a01b03169392505050565b5f5f610a9a8585610db9565b90508251815114610abe5760405163512509d360e11b815260040160405180910390fd5b5f5b8151811015610b1557838181518110610adb57610adb611c27565b6020026020010151828281518110610af557610af5611c27565b60200260200101511015610b0d575f925050506105c9565b600101610ac0565b50600195945050505050565b5f5f610b2d8686610db9565b90505f610b41876101026020890189611dcd565b82519091508414610b655760405163512509d360e11b815260040160405180910390fd5b5f5b8251811015610c05575f612710878784818110610b8657610b86611c27565b9050602002016020810190610b9b9190611f19565b61ffff16848481518110610bb157610bb1611c27565b6020026020010151610bc39190611c98565b610bcd9190611f4e565b905080848381518110610be257610be2611c27565b60200260200101511015610bfc575f945050505050610637565b50600101610b67565b506001979650505050505050565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f91ab3d17e3a50a9d89e63fd30b92be7f5336b03b287bb946787a83a9d62a27667f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea610c8061117a565b8051602091820120604051610cb8949392309101938452602084019290925260408301526001600160a01b0316606082015260800190565b60405160208183030381529060405280519060200120905090565b5f815f0151826020015163ffffffff16604051602001610d1e92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261049790611f61565b5f610d3f610c13565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b60605f610d88836111ef565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b60605f610dce6102ae368690038601866119f7565b5f8181526002602090815260409091205491925063ffffffff90911690610df790850185611dcd565b610e019190611f84565b63ffffffff16421115610e275760405163640fcd6b60e11b815260040160405180910390fd5b610e346020840184611dcd565b5f8281526003602052604090205463ffffffff908116911614610e6a57604051630cad17b760e31b815260040160405180910390fd5b5f610e7c856101026020870187611dcd565b90505f81516001600160401b03811115610e9857610e98611762565b604051908082528060200260200182016040528015610ec1578160200160208202803683370190505b5090505f610edf610ed56020880188611dcd565b87602001356105d0565b90505f80610f2d83610ef460408b018b611fa0565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061121692505050565b9150915080610f4f5760405163439cc0cd60e01b815260040160405180910390fd5b5f5b825181101561116c575f838281518110610f6d57610f6d611c27565b602002602001015190505f5f9050610fa060405180604001604052805f6001600160a01b03168152602001606081525090565b5f5b60045f8c81526020019081526020015f205f8e5f016020810190610fc69190611dcd565b63ffffffff1663ffffffff1681526020019081526020015f20548110156110cb5760055f8c81526020019081526020015f205f8e5f01602081019061100b9190611dcd565b63ffffffff908116825260208083019390935260409182015f90812091851681529083528190208151808301835281546001600160a01b03168152600182018054845181870281018701909552808552919492938584019390929083018282801561109357602002820191905f5260205f20905b81548152602001906001019080831161107f575b5050505050815250509150836001600160a01b0316825f01516001600160a01b0316036110c357600192506110cb565b600101610fa2565b50816110ea5760405163439cc0cd60e01b815260040160405180910390fd5b60208101515f5b8151811080156111015750895181105b1561115b5781818151811061111857611118611c27565b60200260200101518a828151811061113257611132611c27565b602002602001018181516111469190611c4f565b9052508061115381611c62565b9150506110f1565b505060019093019250610f51915050565b509298975050505050505050565b60605f6111a67f0000000000000000000000000000000000000000000000000000000000000000610d7c565b9050805f815181106111ba576111ba611c27565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f60ff8216601f81111561049757604051632cd44ac360e21b815260040160405180910390fd5b60605f604183516112279190611fe2565b1561124557604051634be6321b60e01b815260040160405180910390fd5b5f604184516112549190611f4e565b9050806001600160401b0381111561126e5761126e611762565b604051908082528060200260200182016040528015611297578160200160208202803683370190505b5092505f5b8181101561141957604080516041808252608082019092525f916020820181803683370190505090505f5b60418110156113325786816112dd856041611c98565b6112e79190611c4f565b815181106112f7576112f7611c27565b602001015160f81c60f81b82828151811061131457611314611c27565b60200101906001600160f81b03191690815f1a9053506001016112c7565b505f5f61133f8984611427565b90925090505f81600481111561135757611357611ff5565b14158061136b57506001600160a01b038216155b1561137e57505f94506114209350505050565b5f841180156113c2575086611394600186612009565b815181106113a4576113a4611c27565b60200260200101516001600160a01b0316826001600160a01b031611155b156113d557505f94506114209350505050565b6113e2828a855f19611466565b818785815181106113f5576113f5611c27565b6001600160a01b03929092166020928302919091019091015250505060010161129c565b5060019150505b9250929050565b5f5f825160410361145b576020830151604084015160608501515f1a61144f878285856114be565b94509450505050611420565b505f90506002611420565b4281101561148757604051630819bdcd60e01b815260040160405180910390fd5b61149b6001600160a01b038516848461157b565b6114b857604051638baa579f60e01b815260040160405180910390fd5b50505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156114f357505f90506003611572565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611544573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661156c575f60019250925050611572565b91505f90505b94509492505050565b5f5f5f6115888585611427565b90925090505f8160048111156115a0576115a0611ff5565b1480156115be5750856001600160a01b0316826001600160a01b0316145b806115cf57506115cf8686866115d9565b9695505050505050565b5f5f5f856001600160a01b0316631626ba7e60e01b868660405160240161160192919061201c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161163f9190612034565b5f60405180830381855afa9150503d805f8114611677576040519150601f19603f3d011682016040523d82523d5f602084013e61167c565b606091505b509150915081801561169057506020815110155b80156115cf57508051630b135d3f60e11b906116b5908301602090810190840161204a565b149695505050505050565b5f604082840312156116d0575f5ffd5b50919050565b803563ffffffff811681146116e9575f5ffd5b919050565b5f5f606083850312156116ff575f5ffd5b61170984846116c0565b9150611717604084016116d6565b90509250929050565b602080825282518282018190525f918401906040840190835b81811015611757578351835260209384019390920191600101611739565b509095945050505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561179e5761179e611762565b604052919050565b6001600160a01b03811681146117ba575f5ffd5b50565b5f604082840312156117cd575f5ffd5b604080519081016001600160401b03811182821017156117ef576117ef611762565b6040529050808235611800816117a6565b815261180e602084016116d6565b60208201525092915050565b5f5f5f6080848603121561182c575f5ffd5b61183685856117bd565b9250611844604085016116d6565b9150611852606085016116d6565b90509250925092565b80516001600160a01b03168252602080820151604082850181905281519085018190525f929190910190829060608601905b80831015610a4f578351825260208201915060208401935060018301925061188d565b602081525f6105c9602083018461185b565b5f5f604083850312156118d3575f5ffd5b6118dc836116d6565b946020939093013593505050565b5f5f606083850312156118fb575f5ffd5b61170984846117bd565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105c96020830184611905565b5f5f83601f840112611955575f5ffd5b5081356001600160401b0381111561196b575f5ffd5b6020830191508360208260051b8501011115611420575f5ffd5b5f5f5f5f5f60c08688031215611999575f5ffd5b6119a387876116c0565b94506119b1604087016116d6565b935060608601356001600160401b038111156119cb575f5ffd5b6119d788828901611945565b90945092506119eb905087608088016116c0565b90509295509295909350565b5f60408284031215611a07575f5ffd5b6105c983836117bd565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015611a6857603f19878603018452611a5385835161185b565b94506020938401939190910190600101611a37565b50929695505050505050565b5f606082840312156116d0575f5ffd5b5f5f60608385031215611a95575f5ffd5b611a9f84846116c0565b915060408301356001600160401b03811115611ab9575f5ffd5b611ac585828601611a74565b9150509250929050565b5f5f5f60808486031215611ae1575f5ffd5b611aeb85856116c0565b925060408401356001600160401b03811115611b05575f5ffd5b611b1186828701611a74565b92505060608401356001600160401b03811115611b2c575f5ffd5b8401601f81018613611b3c575f5ffd5b80356001600160401b03811115611b5557611b55611762565b8060051b611b6560208201611776565b91825260208184018101929081019089841115611b80575f5ffd5b6020850194505b83851015611ba2578435825260209485019490910190611b87565b80955050505050509250925092565b5f5f5f5f60808587031215611bc4575f5ffd5b611bce86866116c0565b935060408501356001600160401b03811115611be8575f5ffd5b611bf487828801611a74565b93505060608501356001600160401b03811115611c0f575f5ffd5b611c1b87828801611945565b95989497509550505050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082018082111561049757610497611c3b565b5f60018201611c7357611c73611c3b565b5060010190565b5f8235603e19833603018112611c8e575f5ffd5b9190910192915050565b808202811582820484141761049757610497611c3b565b8135611cba816117a6565b81546001600160a01b0319166001600160a01b0391909116178155602082013536839003601e19018112611cec575f5ffd5b820180356001600160401b03811115611d03575f5ffd5b6020820191508060051b3603821315611d1a575f5ffd5b600183016001600160401b03821115611d3557611d35611762565b68010000000000000000821115611d4e57611d4e611762565b805482825580831015611d83575f828152602090208381019082015b80821015611d80575f8255600182019150611d6a565b50505b505f90815260208120905b82811015611daa57833582820155602090930192600101611d8e565b505050505050565b5f60208284031215611dc2575f5ffd5b81356105c9816117a6565b5f60208284031215611ddd575f5ffd5b6105c9826116d6565b5f608082018635611df6816117a6565b6001600160a01b0316835263ffffffff611e12602089016116d6565b16602084015263ffffffff861660408401526080606084015283905260a0600584901b83018101908301855f603e1936839003015b87821015611f0a57868503609f190184528235818112611e65575f5ffd5b89018035611e72816117a6565b6001600160a01b03168652602081013536829003601e19018112611e94575f5ffd5b016020810190356001600160401b03811115611eae575f5ffd5b8060051b803603831315611ec0575f5ffd5b60406020890181905288018290526001600160fb1b03821115611ee1575f5ffd5b808360608a01376060818901019750505050602083019250602084019350600182019150611e47565b50929998505050505050505050565b5f60208284031215611f29575f5ffd5b813561ffff811681146105c9575f5ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82611f5c57611f5c611f3a565b500490565b805160208083015191908110156116d0575f1960209190910360031b1b16919050565b63ffffffff818116838216019081111561049757610497611c3b565b5f5f8335601e19843603018112611fb5575f5ffd5b8301803591506001600160401b03821115611fce575f5ffd5b602001915036819003821315611420575f5ffd5b5f82611ff057611ff0611f3a565b500690565b634e487b7160e01b5f52602160045260245ffd5b8181038181111561049757610497611c3b565b828152604060208201525f6106376040830184611905565b5f82518060208501845e5f920191825250919050565b5f6020828403121561205a575f5ffd5b505191905056fea26469706673582212204ab2e5a3db3ef47b225060aabe7ae55676a783476d90d9285e6e11dad82d421f64736f6c634300081b0033", } // ECDSACertificateVerifierABI is the input ABI used to generate the binding from. @@ -289,6 +289,68 @@ func (_ECDSACertificateVerifier *ECDSACertificateVerifierCallerSession) DomainSe return _ECDSACertificateVerifier.Contract.DomainSeparator(&_ECDSACertificateVerifier.CallOpts) } +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierCaller) GetOperatorCount(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + var out []interface{} + err := _ECDSACertificateVerifier.contract.Call(opts, &out, "getOperatorCount", operatorSet, referenceTimestamp) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierSession) GetOperatorCount(operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + return _ECDSACertificateVerifier.Contract.GetOperatorCount(&_ECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierCallerSession) GetOperatorCount(operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + return _ECDSACertificateVerifier.Contract.GetOperatorCount(&_ECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierCaller) GetOperatorInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + var out []interface{} + err := _ECDSACertificateVerifier.contract.Call(opts, &out, "getOperatorInfo", operatorSet, referenceTimestamp, operatorIndex) + + if err != nil { + return *new(IECDSATableCalculatorTypesECDSAOperatorInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IECDSATableCalculatorTypesECDSAOperatorInfo)).(*IECDSATableCalculatorTypesECDSAOperatorInfo) + + return out0, err + +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierSession) GetOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _ECDSACertificateVerifier.Contract.GetOperatorInfo(&_ECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierCallerSession) GetOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _ECDSACertificateVerifier.Contract.GetOperatorInfo(&_ECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + // GetOperatorInfos is a free data retrieval call binding the contract method 0x7c85ac4c. // // Solidity: function getOperatorInfos((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((address,uint256[])[]) @@ -351,6 +413,37 @@ func (_ECDSACertificateVerifier *ECDSACertificateVerifierCallerSession) GetOpera return _ECDSACertificateVerifier.Contract.GetOperatorSetOwner(&_ECDSACertificateVerifier.CallOpts, operatorSet) } +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierCaller) GetTotalStakes(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + var out []interface{} + err := _ECDSACertificateVerifier.contract.Call(opts, &out, "getTotalStakes", operatorSet, referenceTimestamp) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierSession) GetTotalStakes(operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + return _ECDSACertificateVerifier.Contract.GetTotalStakes(&_ECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_ECDSACertificateVerifier *ECDSACertificateVerifierCallerSession) GetTotalStakes(operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + return _ECDSACertificateVerifier.Contract.GetTotalStakes(&_ECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + // LatestReferenceTimestamp is a free data retrieval call binding the contract method 0x5ddb9b5b. // // Solidity: function latestReferenceTimestamp((address,uint32) operatorSet) view returns(uint32) diff --git a/pkg/bindings/ECDSACertificateVerifierStorage/binding.go b/pkg/bindings/ECDSACertificateVerifierStorage/binding.go index decb703e87..be151953a0 100644 --- a/pkg/bindings/ECDSACertificateVerifierStorage/binding.go +++ b/pkg/bindings/ECDSACertificateVerifierStorage/binding.go @@ -56,7 +56,7 @@ type OperatorSet struct { // ECDSACertificateVerifierStorageMetaData contains all meta data concerning the ECDSACertificateVerifierStorage contract. var ECDSACertificateVerifierStorageMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", + ABI: "[{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"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\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", } // ECDSACertificateVerifierStorageABI is the input ABI used to generate the binding from. @@ -205,6 +205,99 @@ func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransacto return _ECDSACertificateVerifierStorage.Contract.contract.Transact(opts, method, params...) } +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCaller) GetOperatorCount(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + var out []interface{} + err := _ECDSACertificateVerifierStorage.contract.Call(opts, &out, "getOperatorCount", operatorSet, referenceTimestamp) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) GetOperatorCount(operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + return _ECDSACertificateVerifierStorage.Contract.GetOperatorCount(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSession) GetOperatorCount(operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + return _ECDSACertificateVerifierStorage.Contract.GetOperatorCount(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCaller) GetOperatorInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + var out []interface{} + err := _ECDSACertificateVerifierStorage.contract.Call(opts, &out, "getOperatorInfo", operatorSet, referenceTimestamp, operatorIndex) + + if err != nil { + return *new(IECDSATableCalculatorTypesECDSAOperatorInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IECDSATableCalculatorTypesECDSAOperatorInfo)).(*IECDSATableCalculatorTypesECDSAOperatorInfo) + + return out0, err + +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) GetOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _ECDSACertificateVerifierStorage.Contract.GetOperatorInfo(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSession) GetOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _ECDSACertificateVerifierStorage.Contract.GetOperatorInfo(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetOperatorInfos is a free data retrieval call binding the contract method 0x7c85ac4c. +// +// Solidity: function getOperatorInfos((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((address,uint256[])[]) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCaller) GetOperatorInfos(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + var out []interface{} + err := _ECDSACertificateVerifierStorage.contract.Call(opts, &out, "getOperatorInfos", operatorSet, referenceTimestamp) + + if err != nil { + return *new([]IECDSATableCalculatorTypesECDSAOperatorInfo), err + } + + out0 := *abi.ConvertType(out[0], new([]IECDSATableCalculatorTypesECDSAOperatorInfo)).(*[]IECDSATableCalculatorTypesECDSAOperatorInfo) + + return out0, err + +} + +// GetOperatorInfos is a free data retrieval call binding the contract method 0x7c85ac4c. +// +// Solidity: function getOperatorInfos((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((address,uint256[])[]) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) GetOperatorInfos(operatorSet OperatorSet, referenceTimestamp uint32) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _ECDSACertificateVerifierStorage.Contract.GetOperatorInfos(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorInfos is a free data retrieval call binding the contract method 0x7c85ac4c. +// +// Solidity: function getOperatorInfos((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((address,uint256[])[]) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSession) GetOperatorInfos(operatorSet OperatorSet, referenceTimestamp uint32) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _ECDSACertificateVerifierStorage.Contract.GetOperatorInfos(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp) +} + // GetOperatorSetOwner is a free data retrieval call binding the contract method 0x84818920. // // Solidity: function getOperatorSetOwner((address,uint32) operatorSet) view returns(address) @@ -236,6 +329,37 @@ func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSes return _ECDSACertificateVerifierStorage.Contract.GetOperatorSetOwner(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet) } +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCaller) GetTotalStakes(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + var out []interface{} + err := _ECDSACertificateVerifierStorage.contract.Call(opts, &out, "getTotalStakes", operatorSet, referenceTimestamp) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) GetTotalStakes(operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + return _ECDSACertificateVerifierStorage.Contract.GetTotalStakes(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp) +} + +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSession) GetTotalStakes(operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + return _ECDSACertificateVerifierStorage.Contract.GetTotalStakes(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, referenceTimestamp) +} + // LatestReferenceTimestamp is a free data retrieval call binding the contract method 0x5ddb9b5b. // // Solidity: function latestReferenceTimestamp((address,uint32) operatorSet) view returns(uint32) diff --git a/pkg/bindings/ECDSATableCalculator/binding.go b/pkg/bindings/ECDSATableCalculator/binding.go new file mode 100644 index 0000000000..7c6ae8d058 --- /dev/null +++ b/pkg/bindings/ECDSATableCalculator/binding.go @@ -0,0 +1,580 @@ +// 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: "0x60e060405234801561000f575f5ffd5b5060405161108938038061108983398101604081905261002e91610060565b6001600160a01b03928316608052911660a05260c0526100a0565b6001600160a01b038116811461005d575f5ffd5b50565b5f5f5f60608486031215610072575f5ffd5b835161007d81610049565b602085015190935061008e81610049565b80925050604084015190509250925092565b60805160a05160c051610f966100f35f395f818161012801526103de01525f8181610170015281816102890152818161031901526103b101525f818160c90152818161070e01526107ba0152610f965ff3fe608060405234801561000f575f5ffd5b506004361061007a575f3560e01c806341ee6d0e1161005857806341ee6d0e146101035780635e120ffc1461012357806371ca71d91461014a578063ca8aa7c71461016b575f5ffd5b80631088794a1461007e578063124c87e0146100a45780633ec45c7e146100c4575b5f5ffd5b61009161008c366004610951565b610192565b6040519081526020015b60405180910390f35b6100b76100b2366004610987565b610232565b60405161009b91906109e2565b6100eb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161009b565b610116610111366004610987565b61023d565b60405161009b9190610a65565b6100917f000000000000000000000000000000000000000000000000000000000000000081565b61015d610158366004610987565b61026e565b60405161009b929190610ad3565b6100eb7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f5f61019e85610283565b90925090505f5b825181101561022557846001600160a01b03168382815181106101ca576101ca610b48565b60200260200101516001600160a01b03160361021d578181815181106101f2576101f2610b48565b60200260200101515f8151811061020b5761020b610b48565b6020026020010151935050505061022c565b6001016101a5565b505f925050505b92915050565b606061022c82610640565b606061024882610640565b60405160200161025891906109e2565b6040516020818303038152906040529050919050565b60608061027a83610283565b91509150915091565b6060805f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e875dba856040518263ffffffff1660e01b81526004016102d39190610b95565b5f60405180830381865afa1580156102ed573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103149190810190610c0b565b90505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634177a87c866040518263ffffffff1660e01b81526004016103639190610b95565b5f60405180830381865afa15801561037d573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103a49190810190610caa565b90505f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016632bab2c4a8785856104037f000000000000000000000000000000000000000000000000000000000000000043610d4e565b6040518563ffffffff1660e01b81526004016104229493929190610d61565b5f60405180830381865afa15801561043c573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526104639190810190610dda565b9050825167ffffffffffffffff81111561047f5761047f610ba3565b6040519080825280602002602001820160405280156104a8578160200160208202803683370190505b509450825167ffffffffffffffff8111156104c5576104c5610ba3565b6040519080825280602002602001820160405280156104f857816020015b60608152602001906001900390816104e35790505b5093505f805b8451811015610630575f805b855181101561055b5784838151811061052557610525610b48565b6020026020010151818151811061053e5761053e610b48565b6020026020010151826105519190610d4e565b915060010161050a565b5080156106275760408051600180825281830190925290602080830190803683370190505087848151811061059257610592610b48565b6020026020010181905250808784815181106105b0576105b0610b48565b60200260200101515f815181106105c9576105c9610b48565b6020026020010181815250508582815181106105e7576105e7610b48565b602002602001015188848151811061060157610601610b48565b6001600160a01b03909216602092830291909101909101528261062381610ee8565b9350505b506001016104fe565b5080865280855250505050915091565b60605f5f61064d84610283565b9150915080515f0361069e57604080515f8082526020820190925290610695565b604080518082019091525f81526060602082015281526020019060019003908161066e5790505b50949350505050565b815167ffffffffffffffff8111156106b8576106b8610ba3565b6040519080825280602002602001820160405280156106fd57816020015b604080518082019091525f8152606060208201528152602001906001900390816106d65790505b5092505f805b83518110156108cc577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bd30a0b98786848151811061074e5761074e610b48565b60200260200101516040518363ffffffff1660e01b8152600401610773929190610f00565b602060405180830381865afa15801561078e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b29190610f26565b156108c4575f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633b32a7bd888785815181106107fa576107fa610b48565b60200260200101516040518363ffffffff1660e01b815260040161081f929190610f00565b602060405180830381865afa15801561083a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061085e9190610f45565b90506040518060400160405280826001600160a01b0316815260200185848151811061088c5761088c610b48565b60200260200101518152508684815181106108a9576108a9610b48565b602002602001018190525082806108bf90610ee8565b935050505b600101610703565b50805f0361091a57604080515f8082526020820190925290610910565b604080518082019091525f8152606060208201528152602001906001900390816108e95790505b5095945050505050565b8352509092915050565b5f60408284031215610934575f5ffd5b50919050565b6001600160a01b038116811461094e575f5ffd5b50565b5f5f60608385031215610962575f5ffd5b61096c8484610924565b9150604083013561097c8161093a565b809150509250929050565b5f60408284031215610997575f5ffd5b6109a18383610924565b9392505050565b5f8151808452602084019350602083015f5b828110156109d85781518652602095860195909101906001016109ba565b5093949350505050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015610a5957868503603f19018452815180516001600160a01b03168652602090810151604091870182905290610a43908701826109a8565b9550506020938401939190910190600101610a08565b50929695505050505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f8151808452602084019350602083015f5b828110156109d85781516001600160a01b0316865260209586019590910190600101610aac565b604081525f610ae56040830185610a9a565b828103602084015280845180835260208301915060208160051b840101602087015f5b83811015610b3a57601f19868403018552610b248383516109a8565b6020958601959093509190910190600101610b08565b509098975050505050505050565b634e487b7160e01b5f52603260045260245ffd5b8035610b678161093a565b6001600160a01b03168252602081013563ffffffff8116808214610b89575f5ffd5b80602085015250505050565b6040810161022c8284610b5c565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610be057610be0610ba3565b604052919050565b5f67ffffffffffffffff821115610c0157610c01610ba3565b5060051b60200190565b5f60208284031215610c1b575f5ffd5b815167ffffffffffffffff811115610c31575f5ffd5b8201601f81018413610c41575f5ffd5b8051610c54610c4f82610be8565b610bb7565b8082825260208201915060208360051b850101925086831115610c75575f5ffd5b6020840193505b82841015610ca0578351610c8f8161093a565b825260209384019390910190610c7c565b9695505050505050565b5f60208284031215610cba575f5ffd5b815167ffffffffffffffff811115610cd0575f5ffd5b8201601f81018413610ce0575f5ffd5b8051610cee610c4f82610be8565b8082825260208201915060208360051b850101925086831115610d0f575f5ffd5b6020840193505b82841015610ca0578351610d298161093a565b825260209384019390910190610d16565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561022c5761022c610d3a565b610d6b8186610b5c565b60a060408201525f610d8060a0830186610a9a565b8281036060840152845180825260208087019201905f5b81811015610dbe5783516001600160a01b0316835260209384019390920191600101610d97565b5050809250505063ffffffff8316608083015295945050505050565b5f60208284031215610dea575f5ffd5b815167ffffffffffffffff811115610e00575f5ffd5b8201601f81018413610e10575f5ffd5b8051610e1e610c4f82610be8565b8082825260208201915060208360051b850101925086831115610e3f575f5ffd5b602084015b83811015610edd57805167ffffffffffffffff811115610e62575f5ffd5b8501603f81018913610e72575f5ffd5b6020810151610e83610c4f82610be8565b808282526020820191506020808460051b8601010192508b831115610ea6575f5ffd5b6040840193505b82841015610ec8578351825260209384019390910190610ead565b86525050602093840193919091019050610e44565b509695505050505050565b5f60018201610ef957610ef9610d3a565b5060010190565b60608101610f0e8285610b5c565b6001600160a01b039290921660409190910152919050565b5f60208284031215610f36575f5ffd5b815180151581146109a1575f5ffd5b5f60208284031215610f55575f5ffd5b81516109a18161093a56fea26469706673582212203aec094ed9de31c58d908015da3aedc709df22b015137b1e1841a2a3c95041e464736f6c634300081b0033", +} + +// 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 new file mode 100644 index 0000000000..be3ec7757c --- /dev/null +++ b/pkg/bindings/ECDSATableCalculatorBase/binding.go @@ -0,0 +1,496 @@ +// 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/IBN254CertificateVerifier/binding.go b/pkg/bindings/IBN254CertificateVerifier/binding.go index 12c8293a68..ce83735460 100644 --- a/pkg/bindings/IBN254CertificateVerifier/binding.go +++ b/pkg/bindings/IBN254CertificateVerifier/binding.go @@ -85,7 +85,7 @@ type OperatorSet struct { // IBN254CertificateVerifierMetaData contains all meta data concerning the IBN254CertificateVerifier contract. var IBN254CertificateVerifierMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"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[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"indexed\":false,\"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[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", + ABI: "[{\"type\":\"function\",\"name\":\"getNonsignerOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"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\":\"getOperatorSetInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"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\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isNonsignerCached\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"trySignatureVerification\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"aggPubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apkG2\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"pairingSuccessful\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signatureValid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"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[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"indexed\":false,\"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[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", } // IBN254CertificateVerifierABI is the input ABI used to generate the binding from. @@ -234,6 +234,68 @@ func (_IBN254CertificateVerifier *IBN254CertificateVerifierTransactorRaw) Transa return _IBN254CertificateVerifier.Contract.contract.Transact(opts, method, params...) } +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. +// +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierCaller) GetNonsignerOperatorInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { + var out []interface{} + err := _IBN254CertificateVerifier.contract.Call(opts, &out, "getNonsignerOperatorInfo", operatorSet, referenceTimestamp, operatorIndex) + + if err != nil { + return *new(IBN254TableCalculatorTypesBN254OperatorInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IBN254TableCalculatorTypesBN254OperatorInfo)).(*IBN254TableCalculatorTypesBN254OperatorInfo) + + return out0, err + +} + +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. +// +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierSession) GetNonsignerOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { + return _IBN254CertificateVerifier.Contract.GetNonsignerOperatorInfo(&_IBN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetNonsignerOperatorInfo is a free data retrieval call binding the contract method 0x26af6a3c. +// +// Solidity: function getNonsignerOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(((uint256,uint256),uint256[])) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierCallerSession) GetNonsignerOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (IBN254TableCalculatorTypesBN254OperatorInfo, error) { + return _IBN254CertificateVerifier.Contract.GetNonsignerOperatorInfo(&_IBN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetOperatorSetInfo is a free data retrieval call binding the contract method 0xeb39e68f. +// +// Solidity: function getOperatorSetInfo((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((bytes32,uint256,(uint256,uint256),uint256[])) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierCaller) GetOperatorSetInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { + var out []interface{} + err := _IBN254CertificateVerifier.contract.Call(opts, &out, "getOperatorSetInfo", operatorSet, referenceTimestamp) + + if err != nil { + return *new(IBN254TableCalculatorTypesBN254OperatorSetInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IBN254TableCalculatorTypesBN254OperatorSetInfo)).(*IBN254TableCalculatorTypesBN254OperatorSetInfo) + + return out0, err + +} + +// GetOperatorSetInfo is a free data retrieval call binding the contract method 0xeb39e68f. +// +// Solidity: function getOperatorSetInfo((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((bytes32,uint256,(uint256,uint256),uint256[])) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierSession) GetOperatorSetInfo(operatorSet OperatorSet, referenceTimestamp uint32) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { + return _IBN254CertificateVerifier.Contract.GetOperatorSetInfo(&_IBN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorSetInfo is a free data retrieval call binding the contract method 0xeb39e68f. +// +// Solidity: function getOperatorSetInfo((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((bytes32,uint256,(uint256,uint256),uint256[])) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierCallerSession) GetOperatorSetInfo(operatorSet OperatorSet, referenceTimestamp uint32) (IBN254TableCalculatorTypesBN254OperatorSetInfo, error) { + return _IBN254CertificateVerifier.Contract.GetOperatorSetInfo(&_IBN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + // GetOperatorSetOwner is a free data retrieval call binding the contract method 0x84818920. // // Solidity: function getOperatorSetOwner((address,uint32) operatorSet) view returns(address) @@ -265,6 +327,37 @@ func (_IBN254CertificateVerifier *IBN254CertificateVerifierCallerSession) GetOpe return _IBN254CertificateVerifier.Contract.GetOperatorSetOwner(&_IBN254CertificateVerifier.CallOpts, operatorSet) } +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierCaller) IsNonsignerCached(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + var out []interface{} + err := _IBN254CertificateVerifier.contract.Call(opts, &out, "isNonsignerCached", operatorSet, referenceTimestamp, operatorIndex) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierSession) IsNonsignerCached(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + return _IBN254CertificateVerifier.Contract.IsNonsignerCached(&_IBN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// IsNonsignerCached is a free data retrieval call binding the contract method 0x5be87274. +// +// Solidity: function isNonsignerCached((address,uint32) operatorSet, uint32 referenceTimestamp, uint256 operatorIndex) view returns(bool) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierCallerSession) IsNonsignerCached(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex *big.Int) (bool, error) { + return _IBN254CertificateVerifier.Contract.IsNonsignerCached(&_IBN254CertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + // LatestReferenceTimestamp is a free data retrieval call binding the contract method 0x5ddb9b5b. // // Solidity: function latestReferenceTimestamp((address,uint32) operatorSet) view returns(uint32) @@ -327,6 +420,51 @@ func (_IBN254CertificateVerifier *IBN254CertificateVerifierCallerSession) MaxOpe return _IBN254CertificateVerifier.Contract.MaxOperatorTableStaleness(&_IBN254CertificateVerifier.CallOpts, operatorSet) } +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. +// +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierCaller) TrySignatureVerification(opts *bind.CallOpts, msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + var out []interface{} + err := _IBN254CertificateVerifier.contract.Call(opts, &out, "trySignatureVerification", msgHash, aggPubkey, apkG2, signature) + + outstruct := new(struct { + PairingSuccessful bool + SignatureValid bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.PairingSuccessful = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.SignatureValid = *abi.ConvertType(out[1], new(bool)).(*bool) + + return *outstruct, err + +} + +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. +// +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierSession) TrySignatureVerification(msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + return _IBN254CertificateVerifier.Contract.TrySignatureVerification(&_IBN254CertificateVerifier.CallOpts, msgHash, aggPubkey, apkG2, signature) +} + +// TrySignatureVerification is a free data retrieval call binding the contract method 0x1a18746c. +// +// Solidity: function trySignatureVerification(bytes32 msgHash, (uint256,uint256) aggPubkey, (uint256[2],uint256[2]) apkG2, (uint256,uint256) signature) view returns(bool pairingSuccessful, bool signatureValid) +func (_IBN254CertificateVerifier *IBN254CertificateVerifierCallerSession) TrySignatureVerification(msgHash [32]byte, aggPubkey BN254G1Point, apkG2 BN254G2Point, signature BN254G1Point) (struct { + PairingSuccessful bool + SignatureValid bool +}, error) { + return _IBN254CertificateVerifier.Contract.TrySignatureVerification(&_IBN254CertificateVerifier.CallOpts, msgHash, aggPubkey, apkG2, signature) +} + // UpdateOperatorTable is a paid mutator transaction binding the contract method 0x6738c40b. // // Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (bytes32,uint256,(uint256,uint256),uint256[]) operatorSetInfo, (address,uint32) operatorSetConfig) returns() diff --git a/pkg/bindings/IECDSACertificateVerifier/binding.go b/pkg/bindings/IECDSACertificateVerifier/binding.go index a3dccd972f..89be00b4fc 100644 --- a/pkg/bindings/IECDSACertificateVerifier/binding.go +++ b/pkg/bindings/IECDSACertificateVerifier/binding.go @@ -56,7 +56,7 @@ type OperatorSet struct { // IECDSACertificateVerifierMetaData contains all meta data concerning the IECDSACertificateVerifier contract. var IECDSACertificateVerifierMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", + ABI: "[{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"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\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIECDSATableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", } // IECDSACertificateVerifierABI is the input ABI used to generate the binding from. @@ -205,6 +205,99 @@ func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactorRaw) Transa return _IECDSACertificateVerifier.Contract.contract.Transact(opts, method, params...) } +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCaller) GetOperatorCount(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + var out []interface{} + err := _IECDSACertificateVerifier.contract.Call(opts, &out, "getOperatorCount", operatorSet, referenceTimestamp) + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) GetOperatorCount(operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + return _IECDSACertificateVerifier.Contract.GetOperatorCount(&_IECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorCount is a free data retrieval call binding the contract method 0x23c2a3cb. +// +// Solidity: function getOperatorCount((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint32) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) GetOperatorCount(operatorSet OperatorSet, referenceTimestamp uint32) (uint32, error) { + return _IECDSACertificateVerifier.Contract.GetOperatorCount(&_IECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCaller) GetOperatorInfo(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + var out []interface{} + err := _IECDSACertificateVerifier.contract.Call(opts, &out, "getOperatorInfo", operatorSet, referenceTimestamp, operatorIndex) + + if err != nil { + return *new(IECDSATableCalculatorTypesECDSAOperatorInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IECDSATableCalculatorTypesECDSAOperatorInfo)).(*IECDSATableCalculatorTypesECDSAOperatorInfo) + + return out0, err + +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) GetOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _IECDSACertificateVerifier.Contract.GetOperatorInfo(&_IECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x082ef73d. +// +// Solidity: function getOperatorInfo((address,uint32) operatorSet, uint32 referenceTimestamp, uint32 operatorIndex) view returns((address,uint256[])) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) GetOperatorInfo(operatorSet OperatorSet, referenceTimestamp uint32, operatorIndex uint32) (IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _IECDSACertificateVerifier.Contract.GetOperatorInfo(&_IECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp, operatorIndex) +} + +// GetOperatorInfos is a free data retrieval call binding the contract method 0x7c85ac4c. +// +// Solidity: function getOperatorInfos((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((address,uint256[])[]) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCaller) GetOperatorInfos(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + var out []interface{} + err := _IECDSACertificateVerifier.contract.Call(opts, &out, "getOperatorInfos", operatorSet, referenceTimestamp) + + if err != nil { + return *new([]IECDSATableCalculatorTypesECDSAOperatorInfo), err + } + + out0 := *abi.ConvertType(out[0], new([]IECDSATableCalculatorTypesECDSAOperatorInfo)).(*[]IECDSATableCalculatorTypesECDSAOperatorInfo) + + return out0, err + +} + +// GetOperatorInfos is a free data retrieval call binding the contract method 0x7c85ac4c. +// +// Solidity: function getOperatorInfos((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((address,uint256[])[]) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) GetOperatorInfos(operatorSet OperatorSet, referenceTimestamp uint32) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _IECDSACertificateVerifier.Contract.GetOperatorInfos(&_IECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + +// GetOperatorInfos is a free data retrieval call binding the contract method 0x7c85ac4c. +// +// Solidity: function getOperatorInfos((address,uint32) operatorSet, uint32 referenceTimestamp) view returns((address,uint256[])[]) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) GetOperatorInfos(operatorSet OperatorSet, referenceTimestamp uint32) ([]IECDSATableCalculatorTypesECDSAOperatorInfo, error) { + return _IECDSACertificateVerifier.Contract.GetOperatorInfos(&_IECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + // GetOperatorSetOwner is a free data retrieval call binding the contract method 0x84818920. // // Solidity: function getOperatorSetOwner((address,uint32) operatorSet) view returns(address) @@ -236,6 +329,37 @@ func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) GetOpe return _IECDSACertificateVerifier.Contract.GetOperatorSetOwner(&_IECDSACertificateVerifier.CallOpts, operatorSet) } +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCaller) GetTotalStakes(opts *bind.CallOpts, operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + var out []interface{} + err := _IECDSACertificateVerifier.contract.Call(opts, &out, "getTotalStakes", operatorSet, referenceTimestamp) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) GetTotalStakes(operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + return _IECDSACertificateVerifier.Contract.GetTotalStakes(&_IECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + +// GetTotalStakes is a free data retrieval call binding the contract method 0x04cdbae4. +// +// Solidity: function getTotalStakes((address,uint32) operatorSet, uint32 referenceTimestamp) view returns(uint256[]) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) GetTotalStakes(operatorSet OperatorSet, referenceTimestamp uint32) ([]*big.Int, error) { + return _IECDSACertificateVerifier.Contract.GetTotalStakes(&_IECDSACertificateVerifier.CallOpts, operatorSet, referenceTimestamp) +} + // LatestReferenceTimestamp is a free data retrieval call binding the contract method 0x5ddb9b5b. // // Solidity: function latestReferenceTimestamp((address,uint32) operatorSet) view returns(uint32) diff --git a/pkg/bindings/OperatorTableUpdater/binding.go b/pkg/bindings/OperatorTableUpdater/binding.go index 0ff23d8f3d..86879c632f 100644 --- a/pkg/bindings/OperatorTableUpdater/binding.go +++ b/pkg/bindings/OperatorTableUpdater/binding.go @@ -86,7 +86,7 @@ type OperatorSet struct { // OperatorTableUpdaterMetaData contains all meta data concerning the OperatorTableUpdater contract. var OperatorTableUpdaterMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_bn254CertificateVerifier\",\"type\":\"address\",\"internalType\":\"contractIBN254CertificateVerifier\"},{\"name\":\"_ecdsaCertificateVerifier\",\"type\":\"address\",\"internalType\":\"contractIECDSACertificateVerifier\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"GLOBAL_TABLE_ROOT_CERT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_BPS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bn254CertificateVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBN254CertificateVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"confirmGlobalTableRoot\",\"inputs\":[{\"name\":\"globalTableRootCert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"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[]\"}]}]}]},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ecdsaCertificateVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIECDSACertificateVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCertificateVerifier\",\"inputs\":[{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentGlobalTableRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalConfirmerSetReferenceTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalRootConfirmerSet\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalTableRootByTimestamp\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalTableUpdateMessageHash\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getLatestReferenceBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLatestReferenceTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getReferenceBlockNumberByTimestamp\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getReferenceTimestampByBlockNumber\",\"inputs\":[{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalRootConfirmationThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_globalRootConfirmerSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"_globalRootConfirmationThreshold\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"globalRootConfirmerSetInfo\",\"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[]\"}]},{\"name\":\"globalRootConfirmerSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalRootConfirmationThreshold\",\"inputs\":[{\"name\":\"bps\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalRootConfirmerSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"operatorSetIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"GlobalRootConfirmationThresholdUpdated\",\"inputs\":[{\"name\":\"bps\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalRootConfirmerSetUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewGlobalTableRoot\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CertificateInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GlobalTableRootInFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GlobalTableRootStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConfirmationThreshold\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidGlobalTableRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidMessageHash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSetProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TableUpdateForPastTimestamp\",\"inputs\":[]}]", - Bin: "0x60e060405234801561000f575f5ffd5b506040516120af3803806120af83398101604081905261002e91610188565b6001600160a01b03808416608052821660a0528061004b8161005f565b60c052506100576100a5565b5050506102b9565b5f5f829050601f81511115610092578260405163305a27a960e01b8152600401610089919061025e565b60405180910390fd5b805161009d82610293565b179392505050565b5f54610100900460ff161561010c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610089565b5f5460ff9081161461015b575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610171575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f6060848603121561019a575f5ffd5b83516101a58161015d565b60208501519093506101b68161015d565b60408501519092506001600160401b038111156101d1575f5ffd5b8401601f810186136101e1575f5ffd5b80516001600160401b038111156101fa576101fa610174565b604051601f8201601f19908116603f011681016001600160401b038111828210171561022857610228610174565b60405281815282820160200188101561023f575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102b3575f198160200360031b1b821691505b50919050565b60805160a05160c051611d9b6103145f395f61069d01525f81816103490152818161071e015261090c01525f81816103700152818161050c0152818161060b015281816106de015281816108670152610ac60152611d9b5ff3fe608060405234801561000f575f5ffd5b5060043610610153575f3560e01c80636f728c50116100bf578063c252aa2211610079578063c252aa2214610392578063c3be1e33146103b3578063c5916a39146103c6578063eaaed9d5146103eb578063f2fde38b146103fe578063fd967f4714610411575f5ffd5b80636f728c50146102ed578063715018a6146103185780638da5cb5b146103205780639ea9477814610331578063ad0f958214610344578063b8c143061461036b575f5ffd5b806328522d791161011057806328522d791461020457806331a599d2146102305780633ef6cd7a146102555780634624e6a31461027c578063462828891461029057806354fd4d50146102d8575f5ffd5b8063021ab442146101575780630371406e1461016c5780630f3f8edd1461017f578063193b79f3146101a15780632370356c146101c957806323b7b5b2146101dc575b5f5ffd5b61016a610165366004611085565b61041a565b005b61016a61017a366004611119565b6105de565b6101876105f2565b60405163ffffffff90911681526020015b60405180910390f35b6101876101af36600461113a565b63ffffffff9081165f908152606960205260409020541690565b61016a6101d7366004611155565b610685565b6101876101ea36600461113a565b63ffffffff9081165f908152606860205260409020541690565b60655462010000900463ffffffff165f908152606760205260409020545b604051908152602001610198565b60655462010000900463ffffffff9081165f9081526068602052604090205416610187565b6102227fdbbb55ba0f5fdd66c1f17f44359cb4c67628f9dca440a4c104e61189ad4424b981565b60655462010000900463ffffffff16610187565b6040805180820182525f80825260209182015281518083019092526066546001600160a01b0381168352600160a01b900463ffffffff1690820152604051610198919061118c565b6102e0610696565b604051610198919061119a565b6103006102fb3660046111dd565b6106c1565b6040516001600160a01b039091168152602001610198565b61016a610760565b6033546001600160a01b0316610300565b61016a61033f36600461123a565b610773565b6103007f000000000000000000000000000000000000000000000000000000000000000081565b6103007f000000000000000000000000000000000000000000000000000000000000000081565b6065546103a09061ffff1681565b60405161ffff9091168152602001610198565b6102226103c13660046112d5565b610971565b6102226103d436600461113a565b63ffffffff165f9081526067602052604090205490565b61016a6103f9366004611314565b6109d9565b61016a61040c366004611380565b610bf6565b6103a061271081565b5f54610100900460ff161580801561043857505f54600160ff909116105b806104515750303b15801561045157505f5460ff166001145b6104b95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff1916600117905580156104da575f805461ff0019166101001790555b6104e387610c68565b6104ec86610cb9565b6104f585610d03565b604051636738c40b60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636738c40b90610547908990889088908890600401611444565b5f604051808303815f87803b15801561055e575f5ffd5b505af1158015610570573d5f5f3e3d5ffd5b50506065805465ffffffff000019166201000063ffffffff891602179055505080156105d5575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6105e6610d6e565b6105ef81610cb9565b50565b604051635ddb9b5b60e01b81525f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635ddb9b5b90610641906066906004016114cd565b602060405180830381865afa15801561065c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061068091906114f4565b905090565b61068d610d6e565b6105ef81610d03565b60606106807f0000000000000000000000000000000000000000000000000000000000000000610dc8565b5f60028260028111156106d6576106d661150f565b0361070257507f0000000000000000000000000000000000000000000000000000000000000000919050565b60018260028111156107165761071661150f565b0361074257507f0000000000000000000000000000000000000000000000000000000000000000919050565b60405163fdea7c0960e01b815260040160405180910390fd5b919050565b610768610d6e565b6107715f610c68565b565b5f5f5f5f6107818686610e05565b9350935093509350610792836106c1565b6001600160a01b0316635ddb9b5b856040518263ffffffff1660e01b81526004016107bd919061118c565b602060405180830381865afa1580156107d8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107fc91906114f4565b63ffffffff168b63ffffffff16116108275760405163207617df60e01b815260040160405180910390fd5b61084c8b8b8b8b8b8b8b60405161083f929190611523565b6040518091039020610e4c565b60028360028111156108605761086061150f565b036108f1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636738c40b858d61089f85610eed565b866040518563ffffffff1660e01b81526004016108bf949392919061156c565b5f604051808303815f87803b1580156108d6575f5ffd5b505af11580156108e8573d5f5f3e3d5ffd5b50505050610964565b60018360028111156109055761090561150f565b03610742577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166356d482f5858d61094485610f0f565b866040518563ffffffff1660e01b81526004016108bf94939291906115df565b5050505050505050505050565b604080517fdbbb55ba0f5fdd66c1f17f44359cb4c67628f9dca440a4c104e61189ad4424b9602082015290810184905263ffffffff8084166060830152821660808201525f9060a0016040516020818303038152906040528051906020012090509392505050565b428263ffffffff161115610a0057604051635a119db560e11b815260040160405180910390fd5b60655463ffffffff62010000909104811690831611610a325760405163037fa86b60e31b815260040160405180910390fd5b610a3d838383610971565b846020013514610a6057604051638b56642d60e01b815260040160405180910390fd5b6040805160018082528183019092525f91602080830190803683375050606554825192935061ffff16918391505f90610a9b57610a9b611698565b61ffff90921660209283029190910190910152604051625f5e5d60e21b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d797490610b00906066908a908790600401611756565b6020604051808303815f875af1158015610b1c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b4091906118e3565b905080610b6057604051633042041f60e21b815260040160405180910390fd5b6065805463ffffffff80871662010000810265ffffffff000019909316929092179092555f818152606860209081526040808320805495891663ffffffff1996871681179091558352606982528083208054909516841790945582825260679052828120889055915187927f010dcbe0d1e019c93357711f7bb6287d543b7ff7de74f29df3fb5ecceec8d36991a3505050505050565b610bfe610d6e565b6001600160a01b038116610c635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104b0565b6105ef815b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b806066610cc68282611902565b9050507f20100394950e66014c25009b45d12b675210a6e7a002044a0e3de6544e3c4b3781604051610cf8919061195e565b60405180910390a150565b61271061ffff82161115610d2a576040516307336f0360e11b815260040160405180910390fd5b6065805461ffff191661ffff83169081179091556040519081527ff5d1836df8fcd7c1e54047e94ac8773d2855395603e2ef9ba5f5f16905f2259290602001610cf8565b6033546001600160a01b031633146107715760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104b0565b60605f610dd483610f25565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b604080518082019091525f8082526020820152604080518082019091525f80825260208201819052906060610e3c85870187611a26565b9299919850965090945092505050565b63ffffffff86165f908152606760205260409020548514610e805760405163639d09b560e11b815260040160405180910390fd5b610ec883838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508992508591505063ffffffff8816610f4c565b610ee55760405163afa42ca760e01b815260040160405180910390fd5b505050505050565b610ef5610ffa565b81806020019051810190610f099190611b77565b92915050565b606081806020019051810190610f099190611c26565b5f60ff8216601f811115610f0957604051632cd44ac360e21b815260040160405180910390fd5b5f83610f59868585610f63565b1495945050505050565b5f60208451610f729190611d27565b15610f90576040516313717da960e21b815260040160405180910390fd5b8260205b85518111610ff157610fa7600285611d27565b5f03610fc857815f528086015160205260405f209150600284049350610fdf565b808601515f528160205260405f2091506002840493505b610fea602082611d46565b9050610f94565b50949350505050565b60405180608001604052805f81526020015f815260200161102c60405180604001604052805f81526020015f81525090565b8152602001606081525090565b6001600160a01b03811681146105ef575f5ffd5b5f6040828403121561105d575f5ffd5b50919050565b803561ffff8116811461075b575f5ffd5b63ffffffff811681146105ef575f5ffd5b5f5f5f5f5f5f610100878903121561109b575f5ffd5b86356110a681611039565b95506110b5886020890161104d565b94506110c360608801611063565b935060808701356110d381611074565b925060a08701356001600160401b038111156110ed575f5ffd5b870160a0818a0312156110fe575f5ffd5b915061110d8860c0890161104d565b90509295509295509295565b5f60408284031215611129575f5ffd5b611133838361104d565b9392505050565b5f6020828403121561114a575f5ffd5b813561113381611074565b5f60208284031215611165575f5ffd5b61113382611063565b80516001600160a01b0316825260209081015163ffffffff16910152565b60408101610f09828461116e565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356003811061075b575f5ffd5b5f602082840312156111ed575f5ffd5b611133826111cf565b5f5f83601f840112611206575f5ffd5b5081356001600160401b0381111561121c575f5ffd5b602083019150836020828501011115611233575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215611250575f5ffd5b873561125b81611074565b965060208801359550604088013561127281611074565b945060608801356001600160401b0381111561128c575f5ffd5b6112988a828b016111f6565b90955093505060808801356001600160401b038111156112b6575f5ffd5b6112c28a828b016111f6565b989b979a50959850939692959293505050565b5f5f5f606084860312156112e7575f5ffd5b8335925060208401356112f981611074565b9150604084013561130981611074565b809150509250925092565b5f5f5f5f60808587031215611327575f5ffd5b84356001600160401b0381111561133c575f5ffd5b8501610120818803121561134e575f5ffd5b935060208501359250604085013561136581611074565b9150606085013561137581611074565b939692955090935050565b5f60208284031215611390575f5ffd5b813561113381611039565b80356113a681611039565b6001600160a01b0316825260208101356113bf81611074565b63ffffffff81166020840152505050565b5f5f8335601e198436030181126113e5575f5ffd5b83016020810192503590506001600160401b03811115611403575f5ffd5b8060051b3603821315611233575f5ffd5b8183525f6001600160fb1b0383111561142b575f5ffd5b8260051b80836020870137939093016020019392505050565b61144e818661139b565b63ffffffff841660408281019190915260c06060808401829052853591840191909152602085013560e0840152908401356101008301528301356101208201525f61149c60808501856113d0565b60a06101408501526114b361016085018284611414565b925050506114c4608083018461139b565b95945050505050565b60408101610f098284546001600160a01b038116825260a01c63ffffffff16602090910152565b5f60208284031215611504575f5ffd5b815161113381611074565b634e487b7160e01b5f52602160045260245ffd5b818382375f9101908152919050565b5f8151808452602084019350602083015f5b82811015611562578151865260209586019590910190600101611544565b5093949350505050565b611576818661116e565b63ffffffff8416604082015260c06060820152825160c0820152602083015160e08201525f60408401518051610100840152602081015161012084015250606084015160a06101408401526115cf610160840182611532565b9150506114c4608083018461116e565b5f60c082016115ee838861116e565b63ffffffff8616604084015260c0606084015280855180835260e08501915060e08160051b8601019250602087015f5b8281101561166f5786850360df19018452815180516001600160a01b0316865260209081015160409187018290529061165990870182611532565b955050602093840193919091019060010161161e565b50505050809150506114c4608083018461116e565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235605e198336030181126116e8575f5ffd5b90910192915050565b80358252602080820135908301525f61170d60408301836113d0565b606060408601526114c4606086018284611414565b5f8151808452602084019350602083015f5b8281101561156257815161ffff16865260209586019590910190600101611734565b6117798185546001600160a01b038116825260a01c63ffffffff16602090910152565b608060408201525f6101a08201843561179181611074565b63ffffffff166080840152602085013560a0840152604085013560c0840152606085013560e0840152604060808601610100850137604060c086016101408501376117e06101008601866113d0565b610120610180860152828184526101c0860190506101c08260051b8701019350825f5b838110156118c2578786036101bf1901835261181f82866116d4565b803561182a81611074565b63ffffffff168752602081013536829003601e19018112611849575f5ffd5b81016020810190356001600160401b03811115611864575f5ffd5b803603821315611872575f5ffd5b606060208a015261188760608a0182846116ac565b91505061189760408301836116d4565b915087810360408901526118ab81836116f1565b975050506020928301929190910190600101611803565b505050505082810360608401526118d98185611722565b9695505050505050565b5f602082840312156118f3575f5ffd5b81518015158114611133575f5ffd5b813561190d81611039565b81546001600160a01b031981166001600160a01b03929092169182178355602084013561193981611074565b6001600160c01b03199190911690911760a09190911b63ffffffff60a01b1617905550565b60408101610f09828461139b565b604080519081016001600160401b038111828210171561198e5761198e611684565b60405290565b604051608081016001600160401b038111828210171561198e5761198e611684565b604051601f8201601f191681016001600160401b03811182821017156119de576119de611684565b604052919050565b5f604082840312156119f6575f5ffd5b6119fe61196c565b90508135611a0b81611039565b81526020820135611a1b81611074565b602082015292915050565b5f5f5f5f60c08587031215611a39575f5ffd5b611a4386866119e6565b9350611a51604086016111cf565b9250611a6086606087016119e6565b915060a08501356001600160401b03811115611a7a575f5ffd5b8501601f81018713611a8a575f5ffd5b80356001600160401b03811115611aa357611aa3611684565b611ab6601f8201601f19166020016119b6565b818152886020838501011115611aca575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b5f6001600160401b03821115611b0357611b03611684565b5060051b60200190565b5f82601f830112611b1c575f5ffd5b8151611b2f611b2a82611aeb565b6119b6565b8082825260208201915060208360051b860101925085831115611b50575f5ffd5b602085015b83811015611b6d578051835260209283019201611b55565b5095945050505050565b5f60208284031215611b87575f5ffd5b81516001600160401b03811115611b9c575f5ffd5b820180840360a0811215611bae575f5ffd5b611bb6611994565b82518152602080840151908201526040603f1983011215611bd5575f5ffd5b611bdd61196c565b604084810151825260608501516020830152820152608083015191506001600160401b03821115611c0c575f5ffd5b611c1886838501611b0d565b606082015295945050505050565b5f60208284031215611c36575f5ffd5b81516001600160401b03811115611c4b575f5ffd5b8201601f81018413611c5b575f5ffd5b8051611c69611b2a82611aeb565b8082825260208201915060208360051b850101925086831115611c8a575f5ffd5b602084015b83811015611d1c5780516001600160401b03811115611cac575f5ffd5b85016040818a03601f19011215611cc1575f5ffd5b611cc961196c565b6020820151611cd781611039565b815260408201516001600160401b03811115611cf1575f5ffd5b611d008b602083860101611b0d565b6020830152508085525050602083019250602081019050611c8f565b509695505050505050565b5f82611d4157634e487b7160e01b5f52601260045260245ffd5b500690565b80820180821115610f0957634e487b7160e01b5f52601160045260245ffdfea26469706673582212204de089825a5ccf28555be0f796345be432ea66f8e35ce3eef43743053061406864736f6c634300081b0033", + Bin: "0x60e060405234801561000f575f5ffd5b506040516120af3803806120af83398101604081905261002e91610188565b6001600160a01b03808416608052821660a0528061004b8161005f565b60c052506100576100a5565b5050506102b9565b5f5f829050601f81511115610092578260405163305a27a960e01b8152600401610089919061025e565b60405180910390fd5b805161009d82610293565b179392505050565b5f54610100900460ff161561010c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610089565b5f5460ff9081161461015b575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114610171575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f6060848603121561019a575f5ffd5b83516101a58161015d565b60208501519093506101b68161015d565b60408501519092506001600160401b038111156101d1575f5ffd5b8401601f810186136101e1575f5ffd5b80516001600160401b038111156101fa576101fa610174565b604051601f8201601f19908116603f011681016001600160401b038111828210171561022857610228610174565b60405281815282820160200188101561023f575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102b3575f198160200360031b1b821691505b50919050565b60805160a05160c051611d9b6103145f395f61069d01525f81816103490152818161071e015261090c01525f81816103700152818161050c0152818161060b015281816106de015281816108670152610ac60152611d9b5ff3fe608060405234801561000f575f5ffd5b5060043610610153575f3560e01c80636f728c50116100bf578063c252aa2211610079578063c252aa2214610392578063c3be1e33146103b3578063c5916a39146103c6578063eaaed9d5146103eb578063f2fde38b146103fe578063fd967f4714610411575f5ffd5b80636f728c50146102ed578063715018a6146103185780638da5cb5b146103205780639ea9477814610331578063ad0f958214610344578063b8c143061461036b575f5ffd5b806328522d791161011057806328522d791461020457806331a599d2146102305780633ef6cd7a146102555780634624e6a31461027c578063462828891461029057806354fd4d50146102d8575f5ffd5b8063021ab442146101575780630371406e1461016c5780630f3f8edd1461017f578063193b79f3146101a15780632370356c146101c957806323b7b5b2146101dc575b5f5ffd5b61016a610165366004611085565b61041a565b005b61016a61017a366004611119565b6105de565b6101876105f2565b60405163ffffffff90911681526020015b60405180910390f35b6101876101af36600461113a565b63ffffffff9081165f908152606960205260409020541690565b61016a6101d7366004611155565b610685565b6101876101ea36600461113a565b63ffffffff9081165f908152606860205260409020541690565b60655462010000900463ffffffff165f908152606760205260409020545b604051908152602001610198565b60655462010000900463ffffffff9081165f9081526068602052604090205416610187565b6102227fdbbb55ba0f5fdd66c1f17f44359cb4c67628f9dca440a4c104e61189ad4424b981565b60655462010000900463ffffffff16610187565b6040805180820182525f80825260209182015281518083019092526066546001600160a01b0381168352600160a01b900463ffffffff1690820152604051610198919061118c565b6102e0610696565b604051610198919061119a565b6103006102fb3660046111dd565b6106c1565b6040516001600160a01b039091168152602001610198565b61016a610760565b6033546001600160a01b0316610300565b61016a61033f36600461123a565b610773565b6103007f000000000000000000000000000000000000000000000000000000000000000081565b6103007f000000000000000000000000000000000000000000000000000000000000000081565b6065546103a09061ffff1681565b60405161ffff9091168152602001610198565b6102226103c13660046112d5565b610971565b6102226103d436600461113a565b63ffffffff165f9081526067602052604090205490565b61016a6103f9366004611314565b6109d9565b61016a61040c366004611380565b610bf6565b6103a061271081565b5f54610100900460ff161580801561043857505f54600160ff909116105b806104515750303b15801561045157505f5460ff166001145b6104b95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff1916600117905580156104da575f805461ff0019166101001790555b6104e387610c68565b6104ec86610cb9565b6104f585610d03565b604051636738c40b60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636738c40b90610547908990889088908890600401611444565b5f604051808303815f87803b15801561055e575f5ffd5b505af1158015610570573d5f5f3e3d5ffd5b50506065805465ffffffff000019166201000063ffffffff891602179055505080156105d5575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6105e6610d6e565b6105ef81610cb9565b50565b604051635ddb9b5b60e01b81525f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635ddb9b5b90610641906066906004016114cd565b602060405180830381865afa15801561065c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061068091906114f4565b905090565b61068d610d6e565b6105ef81610d03565b60606106807f0000000000000000000000000000000000000000000000000000000000000000610dc8565b5f60028260028111156106d6576106d661150f565b0361070257507f0000000000000000000000000000000000000000000000000000000000000000919050565b60018260028111156107165761071661150f565b0361074257507f0000000000000000000000000000000000000000000000000000000000000000919050565b60405163fdea7c0960e01b815260040160405180910390fd5b919050565b610768610d6e565b6107715f610c68565b565b5f5f5f5f6107818686610e05565b9350935093509350610792836106c1565b6001600160a01b0316635ddb9b5b856040518263ffffffff1660e01b81526004016107bd919061118c565b602060405180830381865afa1580156107d8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107fc91906114f4565b63ffffffff168b63ffffffff16116108275760405163207617df60e01b815260040160405180910390fd5b61084c8b8b8b8b8b8b8b60405161083f929190611523565b6040518091039020610e4c565b60028360028111156108605761086061150f565b036108f1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636738c40b858d61089f85610eed565b866040518563ffffffff1660e01b81526004016108bf949392919061156c565b5f604051808303815f87803b1580156108d6575f5ffd5b505af11580156108e8573d5f5f3e3d5ffd5b50505050610964565b60018360028111156109055761090561150f565b03610742577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166356d482f5858d61094485610f0f565b866040518563ffffffff1660e01b81526004016108bf94939291906115df565b5050505050505050505050565b604080517fdbbb55ba0f5fdd66c1f17f44359cb4c67628f9dca440a4c104e61189ad4424b9602082015290810184905263ffffffff8084166060830152821660808201525f9060a0016040516020818303038152906040528051906020012090509392505050565b428263ffffffff161115610a0057604051635a119db560e11b815260040160405180910390fd5b60655463ffffffff62010000909104811690831611610a325760405163037fa86b60e31b815260040160405180910390fd5b610a3d838383610971565b846020013514610a6057604051638b56642d60e01b815260040160405180910390fd5b6040805160018082528183019092525f91602080830190803683375050606554825192935061ffff16918391505f90610a9b57610a9b611698565b61ffff90921660209283029190910190910152604051625f5e5d60e21b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d797490610b00906066908a908790600401611756565b6020604051808303815f875af1158015610b1c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b4091906118e3565b905080610b6057604051633042041f60e21b815260040160405180910390fd5b6065805463ffffffff80871662010000810265ffffffff000019909316929092179092555f818152606860209081526040808320805495891663ffffffff1996871681179091558352606982528083208054909516841790945582825260679052828120889055915187927f010dcbe0d1e019c93357711f7bb6287d543b7ff7de74f29df3fb5ecceec8d36991a3505050505050565b610bfe610d6e565b6001600160a01b038116610c635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104b0565b6105ef815b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b806066610cc68282611902565b9050507f20100394950e66014c25009b45d12b675210a6e7a002044a0e3de6544e3c4b3781604051610cf8919061195e565b60405180910390a150565b61271061ffff82161115610d2a576040516307336f0360e11b815260040160405180910390fd5b6065805461ffff191661ffff83169081179091556040519081527ff5d1836df8fcd7c1e54047e94ac8773d2855395603e2ef9ba5f5f16905f2259290602001610cf8565b6033546001600160a01b031633146107715760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104b0565b60605f610dd483610f25565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b604080518082019091525f8082526020820152604080518082019091525f80825260208201819052906060610e3c85870187611a26565b9299919850965090945092505050565b63ffffffff86165f908152606760205260409020548514610e805760405163639d09b560e11b815260040160405180910390fd5b610ec883838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508992508591505063ffffffff8816610f4c565b610ee55760405163afa42ca760e01b815260040160405180910390fd5b505050505050565b610ef5610ffa565b81806020019051810190610f099190611b77565b92915050565b606081806020019051810190610f099190611c26565b5f60ff8216601f811115610f0957604051632cd44ac360e21b815260040160405180910390fd5b5f83610f59868585610f63565b1495945050505050565b5f60208451610f729190611d27565b15610f90576040516313717da960e21b815260040160405180910390fd5b8260205b85518111610ff157610fa7600285611d27565b5f03610fc857815f528086015160205260405f209150600284049350610fdf565b808601515f528160205260405f2091506002840493505b610fea602082611d46565b9050610f94565b50949350505050565b60405180608001604052805f81526020015f815260200161102c60405180604001604052805f81526020015f81525090565b8152602001606081525090565b6001600160a01b03811681146105ef575f5ffd5b5f6040828403121561105d575f5ffd5b50919050565b803561ffff8116811461075b575f5ffd5b63ffffffff811681146105ef575f5ffd5b5f5f5f5f5f5f610100878903121561109b575f5ffd5b86356110a681611039565b95506110b5886020890161104d565b94506110c360608801611063565b935060808701356110d381611074565b925060a08701356001600160401b038111156110ed575f5ffd5b870160a0818a0312156110fe575f5ffd5b915061110d8860c0890161104d565b90509295509295509295565b5f60408284031215611129575f5ffd5b611133838361104d565b9392505050565b5f6020828403121561114a575f5ffd5b813561113381611074565b5f60208284031215611165575f5ffd5b61113382611063565b80516001600160a01b0316825260209081015163ffffffff16910152565b60408101610f09828461116e565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356003811061075b575f5ffd5b5f602082840312156111ed575f5ffd5b611133826111cf565b5f5f83601f840112611206575f5ffd5b5081356001600160401b0381111561121c575f5ffd5b602083019150836020828501011115611233575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215611250575f5ffd5b873561125b81611074565b965060208801359550604088013561127281611074565b945060608801356001600160401b0381111561128c575f5ffd5b6112988a828b016111f6565b90955093505060808801356001600160401b038111156112b6575f5ffd5b6112c28a828b016111f6565b989b979a50959850939692959293505050565b5f5f5f606084860312156112e7575f5ffd5b8335925060208401356112f981611074565b9150604084013561130981611074565b809150509250925092565b5f5f5f5f60808587031215611327575f5ffd5b84356001600160401b0381111561133c575f5ffd5b8501610120818803121561134e575f5ffd5b935060208501359250604085013561136581611074565b9150606085013561137581611074565b939692955090935050565b5f60208284031215611390575f5ffd5b813561113381611039565b80356113a681611039565b6001600160a01b0316825260208101356113bf81611074565b63ffffffff81166020840152505050565b5f5f8335601e198436030181126113e5575f5ffd5b83016020810192503590506001600160401b03811115611403575f5ffd5b8060051b3603821315611233575f5ffd5b8183525f6001600160fb1b0383111561142b575f5ffd5b8260051b80836020870137939093016020019392505050565b61144e818661139b565b63ffffffff841660408281019190915260c06060808401829052853591840191909152602085013560e0840152908401356101008301528301356101208201525f61149c60808501856113d0565b60a06101408501526114b361016085018284611414565b925050506114c4608083018461139b565b95945050505050565b60408101610f098284546001600160a01b038116825260a01c63ffffffff16602090910152565b5f60208284031215611504575f5ffd5b815161113381611074565b634e487b7160e01b5f52602160045260245ffd5b818382375f9101908152919050565b5f8151808452602084019350602083015f5b82811015611562578151865260209586019590910190600101611544565b5093949350505050565b611576818661116e565b63ffffffff8416604082015260c06060820152825160c0820152602083015160e08201525f60408401518051610100840152602081015161012084015250606084015160a06101408401526115cf610160840182611532565b9150506114c4608083018461116e565b5f60c082016115ee838861116e565b63ffffffff8616604084015260c0606084015280855180835260e08501915060e08160051b8601019250602087015f5b8281101561166f5786850360df19018452815180516001600160a01b0316865260209081015160409187018290529061165990870182611532565b955050602093840193919091019060010161161e565b50505050809150506114c4608083018461116e565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235605e198336030181126116e8575f5ffd5b90910192915050565b80358252602080820135908301525f61170d60408301836113d0565b606060408601526114c4606086018284611414565b5f8151808452602084019350602083015f5b8281101561156257815161ffff16865260209586019590910190600101611734565b6117798185546001600160a01b038116825260a01c63ffffffff16602090910152565b608060408201525f6101a08201843561179181611074565b63ffffffff166080840152602085013560a0840152604085013560c0840152606085013560e0840152604060808601610100850137604060c086016101408501376117e06101008601866113d0565b610120610180860152828184526101c0860190506101c08260051b8701019350825f5b838110156118c2578786036101bf1901835261181f82866116d4565b803561182a81611074565b63ffffffff168752602081013536829003601e19018112611849575f5ffd5b81016020810190356001600160401b03811115611864575f5ffd5b803603821315611872575f5ffd5b606060208a015261188760608a0182846116ac565b91505061189760408301836116d4565b915087810360408901526118ab81836116f1565b975050506020928301929190910190600101611803565b505050505082810360608401526118d98185611722565b9695505050505050565b5f602082840312156118f3575f5ffd5b81518015158114611133575f5ffd5b813561190d81611039565b81546001600160a01b031981166001600160a01b03929092169182178355602084013561193981611074565b6001600160c01b03199190911690911760a09190911b63ffffffff60a01b1617905550565b60408101610f09828461139b565b604080519081016001600160401b038111828210171561198e5761198e611684565b60405290565b604051608081016001600160401b038111828210171561198e5761198e611684565b604051601f8201601f191681016001600160401b03811182821017156119de576119de611684565b604052919050565b5f604082840312156119f6575f5ffd5b6119fe61196c565b90508135611a0b81611039565b81526020820135611a1b81611074565b602082015292915050565b5f5f5f5f60c08587031215611a39575f5ffd5b611a4386866119e6565b9350611a51604086016111cf565b9250611a6086606087016119e6565b915060a08501356001600160401b03811115611a7a575f5ffd5b8501601f81018713611a8a575f5ffd5b80356001600160401b03811115611aa357611aa3611684565b611ab6601f8201601f19166020016119b6565b818152886020838501011115611aca575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b5f6001600160401b03821115611b0357611b03611684565b5060051b60200190565b5f82601f830112611b1c575f5ffd5b8151611b2f611b2a82611aeb565b6119b6565b8082825260208201915060208360051b860101925085831115611b50575f5ffd5b602085015b83811015611b6d578051835260209283019201611b55565b5095945050505050565b5f60208284031215611b87575f5ffd5b81516001600160401b03811115611b9c575f5ffd5b820180840360a0811215611bae575f5ffd5b611bb6611994565b82518152602080840151908201526040603f1983011215611bd5575f5ffd5b611bdd61196c565b604084810151825260608501516020830152820152608083015191506001600160401b03821115611c0c575f5ffd5b611c1886838501611b0d565b606082015295945050505050565b5f60208284031215611c36575f5ffd5b81516001600160401b03811115611c4b575f5ffd5b8201601f81018413611c5b575f5ffd5b8051611c69611b2a82611aeb565b8082825260208201915060208360051b850101925086831115611c8a575f5ffd5b602084015b83811015611d1c5780516001600160401b03811115611cac575f5ffd5b85016040818a03601f19011215611cc1575f5ffd5b611cc961196c565b6020820151611cd781611039565b815260408201516001600160401b03811115611cf1575f5ffd5b611d008b602083860101611b0d565b6020830152508085525050602083019250602081019050611c8f565b509695505050505050565b5f82611d4157634e487b7160e01b5f52601260045260245ffd5b500690565b80820180821115610f0957634e487b7160e01b5f52601160045260245ffdfea26469706673582212209ef8b0f0c9ea1483bf6298537a98d0d43a7142e8f94e3142b0017168a9ac5f0264736f6c634300081b0033", } // OperatorTableUpdaterABI is the input ABI used to generate the binding from. diff --git a/script/deploy/devnet/mutlichain/deploy_multichain_l2.s.sol b/script/deploy/devnet/mutlichain/deploy_multichain_l2.s.sol index 9dd0bcbf5a..3fda4bbd71 100644 --- a/script/deploy/devnet/mutlichain/deploy_multichain_l2.s.sol +++ b/script/deploy/devnet/mutlichain/deploy_multichain_l2.s.sol @@ -62,7 +62,7 @@ contract DeployMultichain_L2 is Script, Test { operatorTableUpdaterImplementation = new OperatorTableUpdater( bn254CertificateVerifier, IECDSACertificateVerifier(address(emptyContract)), "0.0.1" ); - bn254CertificateVerifierImplementation = new BN254CertificateVerifier(operatorTableUpdater); + bn254CertificateVerifierImplementation = new BN254CertificateVerifier(operatorTableUpdater, "1.0.0"); // Third, upgrade the proxies to point to the new implementations proxyAdmin.upgrade( diff --git a/src/contracts/interfaces/IBN254CertificateVerifier.sol b/src/contracts/interfaces/IBN254CertificateVerifier.sol index a261d5fb03..9d415d554f 100644 --- a/src/contracts/interfaces/IBN254CertificateVerifier.sol +++ b/src/contracts/interfaces/IBN254CertificateVerifier.sol @@ -11,7 +11,7 @@ interface IBN254CertificateVerifierTypes is IBN254TableCalculatorTypes { * @notice A witness for an operator * @param operatorIndex the index of the nonsigner in the `BN254OperatorInfo` tree * @param operatorInfoProofs merkle proofs of the nonsigner at the index. Empty if operator is in cache. - * @param operatorInfo the `BN254OperatorInfo` for the operator + * @param operatorInfo the `BN254OperatorInfo` for the operator. Empty if operator is in cache */ struct BN254OperatorInfoWitness { uint32 operatorIndex; @@ -110,4 +110,58 @@ interface IBN254CertificateVerifier is BN254Certificate memory cert, uint256[] memory totalStakeNominalThresholds ) external returns (bool); + + /** + * @notice Attempts signature verification with gas limit for safety + * @param msgHash The message hash that was signed + * @param aggPubkey The aggregate public key of signers + * @param apkG2 The G2 point representation of the aggregate public key + * @param signature The BLS signature to verify + * @return pairingSuccessful Whether the pairing operation completed successfully + * @return signatureValid Whether the signature is valid + */ + function trySignatureVerification( + bytes32 msgHash, + BN254.G1Point memory aggPubkey, + BN254.G2Point memory apkG2, + BN254.G1Point memory signature + ) external view returns (bool pairingSuccessful, bool signatureValid); + + /** + * @notice Get cached nonsigner operator info + * @param operatorSet The operator set + * @param referenceTimestamp The reference timestamp + * @param operatorIndex The operator index + * @return The cached operator info + * @dev If the operator is not in the cache, the operator info will be empty + */ + function getNonsignerOperatorInfo( + OperatorSet memory operatorSet, + uint32 referenceTimestamp, + uint256 operatorIndex + ) external view returns (BN254OperatorInfo memory); + + /** + * @notice Check if a nonsigner is cached + * @param operatorSet The operator set + * @param referenceTimestamp The reference timestamp + * @param operatorIndex The operator index + * @return Whether the operator is cached + */ + function isNonsignerCached( + OperatorSet memory operatorSet, + uint32 referenceTimestamp, + uint256 operatorIndex + ) external view returns (bool); + + /** + * @notice Get operator set info for a timestamp + * @param operatorSet The operator set + * @param referenceTimestamp The reference timestamp + * @return The operator set info + */ + function getOperatorSetInfo( + OperatorSet memory operatorSet, + uint32 referenceTimestamp + ) external view returns (BN254OperatorSetInfo memory); } diff --git a/src/contracts/multichain/BN254CertificateVerifier.sol b/src/contracts/multichain/BN254CertificateVerifier.sol index fa74803d60..919e800b4c 100644 --- a/src/contracts/multichain/BN254CertificateVerifier.sol +++ b/src/contracts/multichain/BN254CertificateVerifier.sol @@ -3,11 +3,11 @@ pragma solidity ^0.8.27; import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; -import {BN254} from "../libraries/BN254.sol"; -import {BN254SignatureVerifier} from "../libraries/BN254SignatureVerifier.sol"; -import {Merkle} from "../libraries/Merkle.sol"; -import {OperatorSet} from "../libraries/OperatorSetLib.sol"; - +import "../libraries/BN254.sol"; +import "../libraries/BN254SignatureVerifier.sol"; +import "../libraries/Merkle.sol"; +import "../libraries/OperatorSetLib.sol"; +import "../mixins/SemVerMixin.sol"; import "./BN254CertificateVerifierStorage.sol"; /** @@ -16,7 +16,7 @@ import "./BN254CertificateVerifierStorage.sol"; * @dev This contract uses BN254 curves for signature verification and * caches operator information for efficient verification */ -contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStorage { +contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStorage, SemVerMixin { using Merkle for bytes; using BN254 for BN254.G1Point; @@ -42,36 +42,20 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor * @notice Constructor for the certificate verifier * @dev Disables initializers to prevent implementation initialization * @param _operatorTableUpdater Address authorized to update operator tables + * @param _version The semantic version of the contract */ constructor( - IOperatorTableUpdater _operatorTableUpdater - ) BN254CertificateVerifierStorage(_operatorTableUpdater) { + IOperatorTableUpdater _operatorTableUpdater, + string memory _version + ) BN254CertificateVerifierStorage(_operatorTableUpdater) SemVerMixin(_version) { _disableInitializers(); } - ///@inheritdoc IBaseCertificateVerifier - function getOperatorSetOwner( - OperatorSet memory operatorSet - ) external view returns (address) { - bytes32 operatorSetKey = operatorSet.key(); - return _operatorSetOwners[operatorSetKey]; - } - - ///@inheritdoc IBaseCertificateVerifier - function maxOperatorTableStaleness( - OperatorSet memory operatorSet - ) external view returns (uint32) { - bytes32 operatorSetKey = operatorSet.key(); - return _maxStalenessPeriods[operatorSetKey]; - } - - ///@inheritdoc IBaseCertificateVerifier - function latestReferenceTimestamp( - OperatorSet memory operatorSet - ) external view returns (uint32) { - bytes32 operatorSetKey = operatorSet.key(); - return _latestReferenceTimestamps[operatorSetKey]; - } + /** + * + * EXTERNAL FUNCTIONS + * + */ ///@inheritdoc IBN254CertificateVerifier function updateOperatorTable( @@ -148,21 +132,13 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor return true; } - /** - * @notice Attempts signature verification with gas limit for safety - * @param msgHash The message hash that was signed - * @param aggPubkey The aggregate public key of signers - * @param apkG2 The G2 point representation of the aggregate public key - * @param signature The BLS signature to verify - * @return pairingSuccessful Whether the pairing operation completed successfully - * @return signatureValid Whether the signature is valid - */ + ///@inheritdoc IBN254CertificateVerifier function trySignatureVerification( bytes32 msgHash, BN254.G1Point memory aggPubkey, BN254.G2Point memory apkG2, BN254.G1Point memory signature - ) internal view returns (bool pairingSuccessful, bool signatureValid) { + ) public view returns (bool pairingSuccessful, bool signatureValid) { return BN254SignatureVerifier.verifySignature( msgHash, signature, @@ -173,6 +149,12 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor ); } + /** + * + * INTERNAL FUNCTIONS + * + */ + /** * @notice Internal function to verify a certificate * @param operatorSet The operator set the certificate is for @@ -232,7 +214,7 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor require(witness.operatorIndex < ctx.operatorSetInfo.numOperators, InvalidOperatorIndex()); BN254OperatorInfo memory operatorInfo = - _getOrCacheOperatorInfo(ctx.operatorSetKey, cert.referenceTimestamp, witness); + _getOrCacheNonsignerOperatorInfo(ctx.operatorSetKey, cert.referenceTimestamp, witness); nonSignerApk = nonSignerApk.plus(operatorInfo.pubkey); @@ -252,12 +234,12 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor * @param witness The operator info witness containing proof data * @return operatorInfo The verified operator information */ - function _getOrCacheOperatorInfo( + function _getOrCacheNonsignerOperatorInfo( bytes32 operatorSetKey, uint32 referenceTimestamp, BN254OperatorInfoWitness memory witness ) internal returns (BN254OperatorInfo memory operatorInfo) { - BN254OperatorInfo storage cachedInfo = _operatorInfos[operatorSetKey][referenceTimestamp][witness.operatorIndex]; + BN254OperatorInfo memory cachedInfo = _operatorInfos[operatorSetKey][referenceTimestamp][witness.operatorIndex]; // Check if operator info is cached using pubkey existence (weights can be 0) bool isInfoCached = (cachedInfo.pubkey.X != 0 || cachedInfo.pubkey.Y != 0); @@ -317,13 +299,13 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor } /** - * @notice Get cached operator info - * @param operatorSet The operator set - * @param referenceTimestamp The reference timestamp - * @param operatorIndex The operator index - * @return The cached operator info + * + * VIEW FUNCTIONS + * */ - function getOperatorInfo( + + ///@inheritdoc IBN254CertificateVerifier + function getNonsignerOperatorInfo( OperatorSet memory operatorSet, uint32 referenceTimestamp, uint256 operatorIndex @@ -332,12 +314,19 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor return _operatorInfos[operatorSetKey][referenceTimestamp][operatorIndex]; } - /** - * @notice Get operator set info for a timestamp - * @param operatorSet The operator set - * @param referenceTimestamp The reference timestamp - * @return The operator set info - */ + ///@inheritdoc IBN254CertificateVerifier + function isNonsignerCached( + OperatorSet memory operatorSet, + uint32 referenceTimestamp, + uint256 operatorIndex + ) external view returns (bool) { + bytes32 operatorSetKey = operatorSet.key(); + BN254OperatorInfo memory operatorInfo = _operatorInfos[operatorSetKey][referenceTimestamp][operatorIndex]; + // Check if operator info is cached using pubkey existence (weights can be 0) + return operatorInfo.pubkey.X != 0 && operatorInfo.pubkey.Y != 0; + } + + ///@inheritdoc IBN254CertificateVerifier function getOperatorSetInfo( OperatorSet memory operatorSet, uint32 referenceTimestamp @@ -346,9 +335,27 @@ contract BN254CertificateVerifier is Initializable, BN254CertificateVerifierStor return _operatorSetInfos[operatorSetKey][referenceTimestamp]; } - /// @dev Only used in a test environment - function setMaxStalenessPeriod(OperatorSet memory operatorSet, uint32 maxStalenessPeriod) external { + ///@inheritdoc IBaseCertificateVerifier + function getOperatorSetOwner( + OperatorSet memory operatorSet + ) external view returns (address) { + bytes32 operatorSetKey = operatorSet.key(); + return _operatorSetOwners[operatorSetKey]; + } + + ///@inheritdoc IBaseCertificateVerifier + function maxOperatorTableStaleness( + OperatorSet memory operatorSet + ) external view returns (uint32) { bytes32 operatorSetKey = operatorSet.key(); - _maxStalenessPeriods[operatorSetKey] = maxStalenessPeriod; + return _maxStalenessPeriods[operatorSetKey]; + } + + ///@inheritdoc IBaseCertificateVerifier + function latestReferenceTimestamp( + OperatorSet memory operatorSet + ) external view returns (uint32) { + bytes32 operatorSetKey = operatorSet.key(); + return _latestReferenceTimestamps[operatorSetKey]; } } diff --git a/src/test/mocks/CrossChainRegistryMock.sol b/src/test/mocks/CrossChainRegistryMock.sol new file mode 100644 index 0000000000..6e71c16738 --- /dev/null +++ b/src/test/mocks/CrossChainRegistryMock.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import "forge-std/Test.sol"; + +import "src/contracts/multichain/CrossChainRegistry.sol"; + +contract CrossChainRegistryMock is Test, ICrossChainRegistryTypes { + using OperatorSetLib for OperatorSet; + + receive() external payable {} + fallback() external payable {} +} diff --git a/src/test/mocks/OperatorTableUpdaterMock.sol b/src/test/mocks/OperatorTableUpdaterMock.sol new file mode 100644 index 0000000000..b250d19bfb --- /dev/null +++ b/src/test/mocks/OperatorTableUpdaterMock.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import "forge-std/Test.sol"; +import "src/contracts/interfaces/IOperatorTableUpdater.sol"; + +contract OperatorTableUpdaterMock is Test { + receive() external payable {} + fallback() external payable {} +} diff --git a/src/test/tree/BN254CertificateVerifier.tree b/src/test/tree/BN254CertificateVerifier.tree new file mode 100644 index 0000000000..69f2d9079b --- /dev/null +++ b/src/test/tree/BN254CertificateVerifier.tree @@ -0,0 +1,56 @@ +. +└── BN254CertificateVerifier (**** denotes that integration tests are needed to fully validate path) + ├── when updateOperatorTable is called + │ ├── given that the caller is not the table updater + │ │ └── it should revert + │ ├── given that the reference timestamp is not greater than the latest + │ │ └── it should revert + │ └── given that all parameters are valid + │ └── it should update operator set info, timestamp, owner, and staleness period & emit event + ├── when verifyCertificate is called + │ ├── given that the reference timestamp does not exist + │ │ └── it should revert + │ ├── given that the certificate is stale + │ │ └── it should revert + │ ├── given that a non-signer witness has invalid operator index + │ │ └── it should revert + │ ├── given that a non-signer witness has invalid merkle proof + │ │ └── it should revert + │ ├── given that the signature is invalid + │ │ └── it should revert + │ ├── given that all operators are signers + │ │ └── it should return full stake amounts + │ ├── given that some operators are non-signers + │ │ └── it should deduct non-signer stakes from total + │ └── given that operator info is not cached + │ └── it should cache operator info after verification + ├── when verifyCertificateProportion is called + │ ├── given that array lengths mismatch + │ │ └── it should revert + │ ├── given that the certificate meets thresholds + │ │ └── it should return true + │ └── given that the certificate does not meet thresholds + │ └── it should return false + ├── when verifyCertificateNominal is called + │ ├── given that array lengths mismatch + │ │ └── it should revert + │ ├── given that the certificate meets thresholds + │ │ └── it should return true + │ └── given that the certificate does not meet thresholds + │ └── it should return false + ├── when trySignatureVerification is called + │ ├── given a valid signature + │ │ └── it should return pairing successful and signature valid + │ └── given an invalid signature + │ └── it should return pairing successful and signature invalid + └── when view functions are called + ├── getOperatorSetOwner + │ └── it should return the correct owner address + ├── maxOperatorTableStaleness + │ └── it should return the correct staleness period + ├── latestReferenceTimestamp + │ └── it should return the latest timestamp + ├── getOperatorSetInfo + │ └── it should return the correct operator set info + └── getOperatorInfo + └── it should return the cached operator info \ No newline at end of file diff --git a/src/test/unit/BN254CertificateVerifierUnit.t.sol b/src/test/unit/BN254CertificateVerifierUnit.t.sol index 7a704febd8..b3580c08fa 100644 --- a/src/test/unit/BN254CertificateVerifierUnit.t.sol +++ b/src/test/unit/BN254CertificateVerifierUnit.t.sol @@ -4,60 +4,68 @@ pragma solidity ^0.8.27; import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import "forge-std/Test.sol"; +import "src/test/utils/EigenLayerMultichainUnitTestSetup.sol"; import "src/contracts/libraries/BN254.sol"; import "src/contracts/libraries/Merkle.sol"; import "src/contracts/libraries/OperatorSetLib.sol"; import "src/contracts/multichain/BN254CertificateVerifier.sol"; import "src/contracts/interfaces/IOperatorTableUpdater.sol"; +import "src/contracts/interfaces/IBaseCertificateVerifier.sol"; import "src/contracts/interfaces/IBN254CertificateVerifier.sol"; import "src/contracts/interfaces/IBN254TableCalculator.sol"; import "src/contracts/interfaces/ICrossChainRegistry.sol"; -contract BN254CertificateVerifierTest is Test { +/** + * @title BN254CertificateVerifierUnitTests + * @notice Base contract for all BN254CertificateVerifier unit tests + */ +contract BN254CertificateVerifierUnitTests is + EigenLayerMultichainUnitTestSetup, + IBaseCertificateVerifierErrors, + IBN254CertificateVerifierTypes, + IBN254CertificateVerifierErrors, + ICrossChainRegistryTypes +{ using BN254 for BN254.G1Point; + using Merkle for bytes; + using OperatorSetLib for OperatorSet; - // Contract being tested + // Constants + uint16 constant BPS_DENOMINATOR = 10_000; + + // Contracts + BN254CertificateVerifier bn254CertificateVerifierImplementation; BN254CertificateVerifier verifier; // Test accounts address owner = address(0x1); - address tableUpdater = address(0x2); - address nonOwner = address(0x3); address operatorSetOwner = address(0x4); - // Test data + // Defaults uint32 numOperators = 4; - uint32 maxStaleness = 3600; // 1 hour max staleness - - // Create an OperatorSet for testing - OperatorSet testOperatorSet; + uint32 defaultMaxStaleness = 3600; // 1 hour max staleness + OperatorSet defaultOperatorSet; + OperatorSetConfig defaultOperatorSetConfig; // BLS signature specific fields - bytes32 msgHash; + bytes32 defaultMsgHash = keccak256(abi.encodePacked("test message")); uint aggSignerPrivKey = 69; BN254.G2Point aggSignerApkG2; // G2 public key corresponding to aggSignerPrivKey - // Events - event TableUpdated( - OperatorSet indexed operatorSet, uint32 referenceTimestamp, IBN254TableCalculatorTypes.BN254OperatorSetInfo operatorSetInfo - ); - - function setUp() public virtual { - vm.warp(1_000_000); // Set block timestamp - - testOperatorSet.avs = address(0x5); - testOperatorSet.id = 1; - - // Deploy implementation - BN254CertificateVerifier implementation = new BN254CertificateVerifier(IOperatorTableUpdater(tableUpdater)); + function setUp() public virtual override { + // Setup Mocks + super.setUp(); - // Deploy proxy and initialize - ERC1967Proxy proxy = new ERC1967Proxy(address(implementation), ""); + defaultOperatorSet = OperatorSet({avs: address(0x5), id: 0}); - verifier = BN254CertificateVerifier(address(proxy)); + defaultOperatorSetConfig = OperatorSetConfig({owner: operatorSetOwner, maxStalenessPeriod: defaultMaxStaleness}); - // Set standard test message hash - msgHash = keccak256(abi.encodePacked("test message")); + // Deploy Contracts + bn254CertificateVerifierImplementation = + new BN254CertificateVerifier(IOperatorTableUpdater(address(operatorTableUpdaterMock)), "1.0.0"); + verifier = BN254CertificateVerifier( + address(new TransparentUpgradeableProxy(address(bn254CertificateVerifierImplementation), address(eigenLayerProxyAdmin), "")) + ); // Set up the aggregate public key in G2 aggSignerApkG2.X[1] = 19_101_821_850_089_705_274_637_533_855_249_918_363_070_101_489_527_618_151_493_230_256_975_900_223_847; @@ -66,13 +74,13 @@ contract BN254CertificateVerifierTest is Test { aggSignerApkG2.Y[0] = 4_185_483_097_059_047_421_902_184_823_581_361_466_320_657_066_600_218_863_748_375_739_772_335_928_910; } - // Generate signer and non-signer private keys - function generateSignerAndNonSignerPrivateKeys(uint pseudoRandomNumber, uint numSigners, uint numNonSigners) + // Helper functions + function _generateSignerAndNonSignerPrivateKeys(uint pseudoRandomNumber, uint numSigners, uint numNonSigners) internal view - returns (uint[] memory, uint[] memory) + returns (uint[] memory signerPrivKeys, uint[] memory nonSignerPrivKeys) { - uint[] memory signerPrivKeys = new uint[](numSigners); + signerPrivKeys = new uint[](numSigners); uint sum = 0; // Generate numSigners-1 random keys @@ -85,7 +93,7 @@ contract BN254CertificateVerifierTest is Test { signerPrivKeys[numSigners - 1] = addmod(aggSignerPrivKey, BN254.FR_MODULUS - sum % BN254.FR_MODULUS, BN254.FR_MODULUS); // Generate non-signer keys - uint[] memory nonSignerPrivKeys = new uint[](numNonSigners); + nonSignerPrivKeys = new uint[](numNonSigners); for (uint i = 0; i < numNonSigners; i++) { nonSignerPrivKeys[i] = uint(keccak256(abi.encodePacked("nonSignerPrivateKey", pseudoRandomNumber, i))) % BN254.FR_MODULUS; } @@ -93,69 +101,61 @@ contract BN254CertificateVerifierTest is Test { // Sort nonSignerPrivateKeys in order of ascending pubkeyHash for (uint i = 1; i < nonSignerPrivKeys.length; i++) { uint privateKey = nonSignerPrivKeys[i]; - bytes32 pubkeyHash = toPubkeyHash(privateKey); + bytes32 pubkeyHash = _toPubkeyHash(privateKey); uint j = i; - // Move elements that are greater than the current key ahead - while (j > 0 && toPubkeyHash(nonSignerPrivKeys[j - 1]) > pubkeyHash) { + while (j > 0 && _toPubkeyHash(nonSignerPrivKeys[j - 1]) > pubkeyHash) { nonSignerPrivKeys[j] = nonSignerPrivKeys[j - 1]; j--; } nonSignerPrivKeys[j] = privateKey; } - - return (signerPrivKeys, nonSignerPrivKeys); } - // Helper to hash a public key - function toPubkeyHash(uint privKey) internal view returns (bytes32) { + function _toPubkeyHash(uint privKey) internal view returns (bytes32) { return BN254.generatorG1().scalar_mul(privKey).hashG1Point(); } - // Create operators with split keys - function createOperatorsWithSplitKeys(uint pseudoRandomNumber, uint numSigners, uint numNonSigners) + function _createOperatorsWithSplitKeys(uint pseudoRandomNumber, uint numSigners, uint numNonSigners) internal view - returns (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory, uint32[] memory, BN254.G1Point memory) + returns (BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) { require(numSigners + numNonSigners == numOperators, "Total operators mismatch"); // Generate private keys (uint[] memory signerPrivKeys, uint[] memory nonSignerPrivKeys) = - generateSignerAndNonSignerPrivateKeys(pseudoRandomNumber, numSigners, numNonSigners); + _generateSignerAndNonSignerPrivateKeys(pseudoRandomNumber, numSigners, numNonSigners); // Create all operators - IBN254TableCalculatorTypes.BN254OperatorInfo[] memory ops = new IBN254TableCalculatorTypes.BN254OperatorInfo[](numOperators); + operators = new BN254OperatorInfo[](numOperators); // Track indices of non-signers - uint32[] memory nonSignerIndices = new uint32[](numNonSigners); + nonSignerIndices = new uint32[](numNonSigners); // Create signers first for (uint32 i = 0; i < numSigners; i++) { - ops[i].pubkey = BN254.generatorG1().scalar_mul(signerPrivKeys[i]); - ops[i].weights = new uint[](2); - ops[i].weights[0] = uint(100 + i * 10); - ops[i].weights[1] = uint(200 + i * 20); + operators[i].pubkey = BN254.generatorG1().scalar_mul(signerPrivKeys[i]); + operators[i].weights = new uint[](2); + operators[i].weights[0] = uint(100 + i * 10); + operators[i].weights[1] = uint(200 + i * 20); } // Create non-signers for (uint32 i = 0; i < numNonSigners; i++) { uint32 idx = uint32(numSigners + i); - ops[idx].pubkey = BN254.generatorG1().scalar_mul(nonSignerPrivKeys[i]); - ops[idx].weights = new uint[](2); - ops[idx].weights[0] = uint(100 + idx * 10); - ops[idx].weights[1] = uint(200 + idx * 20); + operators[idx].pubkey = BN254.generatorG1().scalar_mul(nonSignerPrivKeys[i]); + operators[idx].weights = new uint[](2); + operators[idx].weights[0] = uint(100 + idx * 10); + operators[idx].weights[1] = uint(200 + idx * 20); nonSignerIndices[i] = idx; } // Calculate aggregate signature for the signers - BN254.G1Point memory signature = BN254.hashToG1(msgHash).scalar_mul(aggSignerPrivKey); - - return (ops, nonSignerIndices, signature); + signature = BN254.hashToG1(defaultMsgHash).scalar_mul(aggSignerPrivKey); } - // Build a complete and correct merkle tree from operator infos - function getMerkleRoot(IBN254TableCalculatorTypes.BN254OperatorInfo[] memory ops) internal returns (bytes32 root) { + function _getMerkleRoot(BN254OperatorInfo[] memory ops) internal pure returns (bytes32 root) { bytes32[] memory leaves = new bytes32[](ops.length); for (uint i = 0; i < ops.length; i++) { leaves[i] = keccak256(abi.encode(ops[i])); @@ -163,10 +163,7 @@ contract BN254CertificateVerifierTest is Test { root = Merkle.merkleizeKeccak(leaves); } - function getMerkleProof(IBN254TableCalculatorTypes.BN254OperatorInfo[] memory ops, uint32 operatorIndex) - internal - returns (bytes memory proof) - { + function _getMerkleProof(BN254OperatorInfo[] memory ops, uint32 operatorIndex) internal pure returns (bytes memory proof) { bytes32[] memory leaves = new bytes32[](ops.length); for (uint i = 0; i < ops.length; i++) { leaves[i] = keccak256(abi.encode(ops[i])); @@ -174,32 +171,24 @@ contract BN254CertificateVerifierTest is Test { proof = Merkle.getProofKeccak(leaves, operatorIndex); } - // Create operator set info - function createOperatorSetInfo(IBN254TableCalculatorTypes.BN254OperatorInfo[] memory ops) - internal - returns (IBN254TableCalculatorTypes.BN254OperatorSetInfo memory) - { + function _createOperatorSetInfo(BN254OperatorInfo[] memory ops) internal view returns (BN254OperatorSetInfo memory) { uint32 _numOperators = uint32(ops.length); - bytes32 operatorInfoTreeRoot = getMerkleRoot(ops); + bytes32 operatorInfoTreeRoot = _getMerkleRoot(ops); - // Create aggregate public key (sum of all operator pubkeys) + // Create aggregate public key BN254.G1Point memory aggregatePubkey = BN254.G1Point(0, 0); - // Create total weights (sum of all operator weights) + // Create total weights uint[] memory _totalWeights = new uint[](2); for (uint32 i = 0; i < _numOperators; i++) { - // Add pubkey to aggregate aggregatePubkey = aggregatePubkey.plus(ops[i].pubkey); - - // Add weights to total for (uint j = 0; j < 2; j++) { _totalWeights[j] += ops[i].weights[j]; } } - // Create the operator set info - return IBN254TableCalculatorTypes.BN254OperatorSetInfo({ + return BN254OperatorSetInfo({ numOperators: _numOperators, aggregatePubkey: aggregatePubkey, totalWeights: _totalWeights, @@ -207,30 +196,25 @@ contract BN254CertificateVerifierTest is Test { }); } - // Helper to create a certificate with real BLS signature - function createCertificate( + function _createCertificate( uint32 referenceTimestamp, bytes32 messageHash, uint32[] memory nonSignerIndices, - IBN254TableCalculatorTypes.BN254OperatorInfo[] memory ops, + BN254OperatorInfo[] memory ops, BN254.G1Point memory signature - ) internal returns (IBN254CertificateVerifierTypes.BN254Certificate memory) { + ) internal view returns (BN254Certificate memory) { // Create witnesses for non-signers - IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[] memory witnesses = - new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](nonSignerIndices.length); + BN254OperatorInfoWitness[] memory witnesses = new BN254OperatorInfoWitness[](nonSignerIndices.length); for (uint i = 0; i < nonSignerIndices.length; i++) { uint32 nonSignerIndex = nonSignerIndices[i]; - bytes memory proof = getMerkleProof(ops, nonSignerIndex); + bytes memory proof = _getMerkleProof(ops, nonSignerIndex); - witnesses[i] = IBN254CertificateVerifierTypes.BN254OperatorInfoWitness({ - operatorIndex: nonSignerIndex, - operatorInfoProof: proof, - operatorInfo: ops[nonSignerIndex] - }); + witnesses[i] = + BN254OperatorInfoWitness({operatorIndex: nonSignerIndex, operatorInfoProof: proof, operatorInfo: ops[nonSignerIndex]}); } - return IBN254CertificateVerifierTypes.BN254Certificate({ + return BN254Certificate({ referenceTimestamp: referenceTimestamp, messageHash: messageHash, signature: signature, @@ -239,122 +223,307 @@ contract BN254CertificateVerifierTest is Test { }); } - // Helper to create operator set config - function createOperatorSetConfig() internal view returns (ICrossChainRegistryTypes.OperatorSetConfig memory) { - return ICrossChainRegistryTypes.OperatorSetConfig({owner: operatorSetOwner, maxStalenessPeriod: maxStaleness}); + function _updateOperatorTable(Randomness r, uint numSigners, uint numNonsigners) + internal + returns ( + BN254OperatorInfo[] memory operatorInfos, + BN254OperatorSetInfo memory operatorSetInfo, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) + { + // Generate seed and reference timestamp + uint seed = r.Uint256(); + referenceTimestamp = r.Uint32(uint32(block.timestamp + 1), uint32(block.timestamp + 1000)); + + // Create operators + (operatorInfos, nonSignerIndices, signature) = _createOperatorsWithSplitKeys(seed, numSigners, numNonsigners); + operatorSetInfo = _createOperatorSetInfo(operatorInfos); + + // Update operator table + vm.prank(address(operatorTableUpdaterMock)); + verifier.updateOperatorTable(defaultOperatorSet, referenceTimestamp, operatorSetInfo, defaultOperatorSetConfig); + } + + function _initializeOperatorTableBase() internal returns (uint32 referenceTimestamp) { + (BN254OperatorInfo[] memory operatorInfos, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) = + _createOperatorsWithSplitKeys(123, numOperators, 0); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operatorInfos); + vm.prank(address(operatorTableUpdaterMock)); + verifier.updateOperatorTable(defaultOperatorSet, uint32(block.timestamp), operatorSetInfo, defaultOperatorSetConfig); } +} - // Test updating the operator table - function testUpdateOperatorTable() public { +/** + * @title BN254CertificateVerifierUnitTests_updateOperatorTable + * @notice Unit tests for BN254CertificateVerifier.updateOperatorTable + */ +contract BN254CertificateVerifierUnitTests_updateOperatorTable is BN254CertificateVerifierUnitTests, IBN254CertificateVerifierEvents { + function test_revert_notTableUpdater() public { uint32 referenceTimestamp = uint32(block.timestamp); + (BN254OperatorInfo[] memory operators,,) = _createOperatorsWithSplitKeys(123, 3, 1); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operators); - // Create operators with split keys - 3 signers, 1 non-signer - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators,,) = createOperatorsWithSplitKeys(123, 3, 1); + vm.prank(address(0x100)); + vm.expectRevert(OnlyTableUpdater.selector); + verifier.updateOperatorTable(defaultOperatorSet, referenceTimestamp, operatorSetInfo, defaultOperatorSetConfig); + } - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); + function test_revert_staleTimestamp() public { + vm.warp(1000); + uint32 firstTimestamp = uint32(block.timestamp); + uint32 staleTimestamp = firstTimestamp - 100; + + (BN254OperatorInfo[] memory operators,,) = _createOperatorsWithSplitKeys(123, 3, 1); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operators); - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); + vm.startPrank(address(operatorTableUpdaterMock)); - vm.startPrank(tableUpdater); + // First update should succeed + verifier.updateOperatorTable(defaultOperatorSet, firstTimestamp, operatorSetInfo, defaultOperatorSetConfig); - // Update the operator table - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + // Second update with earlier timestamp should fail + vm.expectRevert(TableUpdateStale.selector); + verifier.updateOperatorTable(defaultOperatorSet, staleTimestamp, operatorSetInfo, defaultOperatorSetConfig); vm.stopPrank(); + } + + function testFuzz_updateOperatorTable_correctness(Randomness r) public rand(r) { + uint seed = r.Uint256(); + uint numSigners = r.Uint256(1, numOperators); + uint nonSigners = numOperators - numSigners; + (BN254OperatorInfo[] memory operators,,) = _createOperatorsWithSplitKeys(seed, numSigners, nonSigners); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operators); + + // Expect event + uint32 referenceTimestamp = uint32(block.timestamp); + vm.expectEmit(true, true, true, true, address(verifier)); + emit TableUpdated(defaultOperatorSet, referenceTimestamp, operatorSetInfo); + + vm.prank(address(operatorTableUpdaterMock)); + verifier.updateOperatorTable(defaultOperatorSet, referenceTimestamp, operatorSetInfo, defaultOperatorSetConfig); // Verify storage updates - assertEq(verifier.latestReferenceTimestamp(testOperatorSet), referenceTimestamp, "Reference timestamp not updated correctly"); - assertEq(verifier.getOperatorSetOwner(testOperatorSet), operatorSetOwner, "Operator set owner not stored correctly"); - assertEq(verifier.maxOperatorTableStaleness(testOperatorSet), maxStaleness, "Max staleness not stored correctly"); + assertEq(verifier.latestReferenceTimestamp(defaultOperatorSet), referenceTimestamp, "Reference timestamp mismatch"); + assertEq(verifier.getOperatorSetOwner(defaultOperatorSet), operatorSetOwner, "Operator set owner mismatch"); + assertEq(verifier.maxOperatorTableStaleness(defaultOperatorSet), defaultMaxStaleness, "Max staleness mismatch"); // Verify operator set info was stored correctly - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory storedOperatorSetInfo = - verifier.getOperatorSetInfo(testOperatorSet, referenceTimestamp); + BN254OperatorSetInfo memory storedOperatorSetInfo = verifier.getOperatorSetInfo(defaultOperatorSet, referenceTimestamp); - assertEq(storedOperatorSetInfo.numOperators, operatorSetInfo.numOperators, "Num operators not stored correctly"); - assertEq(storedOperatorSetInfo.aggregatePubkey.X, operatorSetInfo.aggregatePubkey.X, "Aggregate pubkey X not stored correctly"); - assertEq(storedOperatorSetInfo.aggregatePubkey.Y, operatorSetInfo.aggregatePubkey.Y, "Aggregate pubkey Y not stored correctly"); - assertEq(storedOperatorSetInfo.operatorInfoTreeRoot, operatorSetInfo.operatorInfoTreeRoot, "Tree root not stored correctly"); + assertEq(storedOperatorSetInfo.numOperators, operatorSetInfo.numOperators, "Num operators mismatch"); + assertEq(storedOperatorSetInfo.aggregatePubkey.X, operatorSetInfo.aggregatePubkey.X, "Aggregate pubkey X mismatch"); + assertEq(storedOperatorSetInfo.aggregatePubkey.Y, operatorSetInfo.aggregatePubkey.Y, "Aggregate pubkey Y mismatch"); + assertEq(storedOperatorSetInfo.operatorInfoTreeRoot, operatorSetInfo.operatorInfoTreeRoot, "Tree root mismatch"); } - // Test verifyCertificate with actual BLS signature validation and multiple signers - function testVerifyCertificate() public { + function test_multiple() public { + // Create two different operator sets + OperatorSet memory operatorSet1 = OperatorSet({avs: address(0x10), id: 1}); + OperatorSet memory operatorSet2 = OperatorSet({avs: address(0x20), id: 2}); + uint32 referenceTimestamp = uint32(block.timestamp); - // Create operators with split keys - 3 signers, 1 non-signer - uint pseudoRandomNumber = 123; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 3, 1); + // Create operators for each set + (BN254OperatorInfo[] memory operators1,,) = _createOperatorsWithSplitKeys(111, 3, 1); + (BN254OperatorInfo[] memory operators2,,) = _createOperatorsWithSplitKeys(222, 2, 2); - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); + // Create operator set infos + BN254OperatorSetInfo memory operatorSetInfo1 = _createOperatorSetInfo(operators1); + BN254OperatorSetInfo memory operatorSetInfo2 = _createOperatorSetInfo(operators2); - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); + // Create operator set configs with different owners + OperatorSetConfig memory config1 = OperatorSetConfig({ + owner: address(0x100), + maxStalenessPeriod: 1800 // 30 minutes + }); + OperatorSetConfig memory config2 = OperatorSetConfig({ + owner: address(0x200), + maxStalenessPeriod: 7200 // 2 hours + }); - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + vm.startPrank(address(operatorTableUpdaterMock)); - // Create certificate with real BLS signature - IBN254CertificateVerifierTypes.BN254Certificate memory cert = - createCertificate(referenceTimestamp, msgHash, nonSignerIndices, operators, signature); + // Update both operator tables + verifier.updateOperatorTable(operatorSet1, referenceTimestamp, operatorSetInfo1, config1); + verifier.updateOperatorTable(operatorSet2, referenceTimestamp, operatorSetInfo2, config2); - uint[] memory signedStakes = verifier.verifyCertificate(testOperatorSet, cert); + vm.stopPrank(); - // Check that the signed stakes are correct - assertEq(signedStakes.length, 2, "Wrong number of stake types"); + // Verify that both operator sets are stored correctly and independently + assertEq(verifier.getOperatorSetOwner(operatorSet1), address(0x100), "OperatorSet1 owner incorrect"); + assertEq(verifier.getOperatorSetOwner(operatorSet2), address(0x200), "OperatorSet2 owner incorrect"); - // Calculate expected signed stakes - uint[] memory expectedSignedStakes = new uint[](2); + assertEq(verifier.maxOperatorTableStaleness(operatorSet1), 1800, "OperatorSet1 staleness incorrect"); + assertEq(verifier.maxOperatorTableStaleness(operatorSet2), 7200, "OperatorSet2 staleness incorrect"); - // Start with total stakes - expectedSignedStakes[0] = operatorSetInfo.totalWeights[0]; - expectedSignedStakes[1] = operatorSetInfo.totalWeights[1]; + assertEq(verifier.latestReferenceTimestamp(operatorSet1), referenceTimestamp, "OperatorSet1 timestamp incorrect"); + assertEq(verifier.latestReferenceTimestamp(operatorSet2), referenceTimestamp, "OperatorSet2 timestamp incorrect"); - // Subtract non-signer stakes - for (uint i = 0; i < nonSignerIndices.length; i++) { - uint32 nonSignerIndex = nonSignerIndices[i]; - expectedSignedStakes[0] -= operators[nonSignerIndex].weights[0]; - expectedSignedStakes[1] -= operators[nonSignerIndex].weights[1]; - } + // Verify operator set infos are stored independently + BN254OperatorSetInfo memory storedInfo1 = verifier.getOperatorSetInfo(operatorSet1, referenceTimestamp); + BN254OperatorSetInfo memory storedInfo2 = verifier.getOperatorSetInfo(operatorSet2, referenceTimestamp); - assertEq(signedStakes[0], expectedSignedStakes[0], "Wrong signed stake for type 0"); - assertEq(signedStakes[1], expectedSignedStakes[1], "Wrong signed stake for type 1"); + assertEq(storedInfo1.numOperators, 4, "OperatorSet1 should have 4 operators"); + assertEq(storedInfo2.numOperators, 4, "OperatorSet2 should have 4 operators"); + + // Verify they have different tree roots (since operators are different) + assertTrue(storedInfo1.operatorInfoTreeRoot != storedInfo2.operatorInfoTreeRoot, "Tree roots should be different"); } +} - // Test verifyCertificate with a different distribution of signers/non-signers - function testVerifyCertificateDifferentSplit() public { - uint32 referenceTimestamp = uint32(block.timestamp); +/** + * @title BN254CertificateVerifierUnitTests_verifyCertificate + * @notice Unit tests for BN254CertificateVerifier.verifyCertificate + */ +contract BN254CertificateVerifierUnitTests_verifyCertificate is BN254CertificateVerifierUnitTests { + function test_revert_certificateStale() public { + uint32 referenceTimestamp = _initializeOperatorTableBase(); + BN254Certificate memory cert; + cert.referenceTimestamp = referenceTimestamp; + + // Jump forward in time beyond the max staleness + vm.warp(block.timestamp + defaultMaxStaleness + 1); + + vm.expectRevert(CertificateStale.selector); + verifier.verifyCertificate(defaultOperatorSet, cert); + } + + function test_revert_referenceTimestampDoesNotExist() public { + uint32 referenceTimestamp = _initializeOperatorTableBase(); + uint32 nonExistentTimestamp = referenceTimestamp + 1000; + + BN254Certificate memory cert; + cert.referenceTimestamp = nonExistentTimestamp; + + vm.expectRevert(ReferenceTimestampDoesNotExist.selector); + verifier.verifyCertificate(defaultOperatorSet, cert); + } + + function test_revert_invalidOperatorIndex() public { + // Update operator table + (BN254OperatorInfo[] memory operatorInfos, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) = + _createOperatorsWithSplitKeys(123, numOperators, 0); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operatorInfos); + vm.prank(address(operatorTableUpdaterMock)); + verifier.updateOperatorTable(defaultOperatorSet, uint32(block.timestamp), operatorSetInfo, defaultOperatorSetConfig); + + // Create certificate with invalid operator index + BN254OperatorInfoWitness[] memory witnesses = new BN254OperatorInfoWitness[](1); + witnesses[0] = BN254OperatorInfoWitness({ + operatorIndex: uint32(operatorSetInfo.numOperators), // Out of bounds, since we only have 1 nonsigner + operatorInfoProof: new bytes(32), + operatorInfo: operatorInfos[0] + }); - // Create operators with split keys - 2 signers, 2 non-signers - uint pseudoRandomNumber = 456; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 2, 2); + BN254Certificate memory cert = BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: defaultMsgHash, + signature: signature, + apk: aggSignerApkG2, + nonSignerWitnesses: witnesses + }); - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); + vm.expectRevert(InvalidOperatorIndex.selector); + verifier.verifyCertificate(defaultOperatorSet, cert); + } - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); + function test_revert_invalidMerkleProof() public { + // Update operator table + (BN254OperatorInfo[] memory operatorInfos, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) = + _createOperatorsWithSplitKeys(123, 3, 1); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operatorInfos); + vm.prank(address(operatorTableUpdaterMock)); + verifier.updateOperatorTable(defaultOperatorSet, uint32(block.timestamp), operatorSetInfo, defaultOperatorSetConfig); + + // Create certificate with invalid merkle proof + BN254OperatorInfoWitness[] memory witnesses = new BN254OperatorInfoWitness[](1); + witnesses[0] = BN254OperatorInfoWitness({ + operatorIndex: nonSignerIndices[0], + operatorInfoProof: new bytes(32), // Invalid proof + operatorInfo: operatorInfos[nonSignerIndices[0]] + }); - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + BN254Certificate memory cert = BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: defaultMsgHash, + signature: signature, + apk: aggSignerApkG2, + nonSignerWitnesses: witnesses + }); + + vm.expectRevert(VerificationFailed.selector); + verifier.verifyCertificate(defaultOperatorSet, cert); + } + + function test_revert_invalidSignature() public { + // Update operator table + (BN254OperatorInfo[] memory operatorInfos, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) = + _createOperatorsWithSplitKeys(123, numOperators, 0); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operatorInfos); + vm.prank(address(operatorTableUpdaterMock)); + verifier.updateOperatorTable(defaultOperatorSet, uint32(block.timestamp), operatorSetInfo, defaultOperatorSetConfig); - // Create certificate with real BLS signature - IBN254CertificateVerifierTypes.BN254Certificate memory cert = - createCertificate(referenceTimestamp, msgHash, nonSignerIndices, operators, signature); + // Create certificate with wrong message hash + bytes32 wrongHash = keccak256("wrong message"); - // No mocking needed - verify certificate with real verification - uint[] memory signedStakes = verifier.verifyCertificate(testOperatorSet, cert); + BN254Certificate memory cert = _createCertificate( + uint32(block.timestamp), + wrongHash, // Wrong hash + nonSignerIndices, + operatorInfos, + signature // Signature is for original defaultMsgHash + ); + + vm.expectRevert(VerificationFailed.selector); + verifier.verifyCertificate(defaultOperatorSet, cert); + } + + function testFuzz_verifyCertificate_allSigners(Randomness r) public rand(r) { + (, BN254OperatorSetInfo memory allSignerOpSetInfo, uint32 referenceTimestamp,, BN254.G1Point memory signature) = + _updateOperatorTable(r, numOperators, 0); + + // Create certificate with no non-signers + BN254Certificate memory cert = BN254Certificate({ + referenceTimestamp: referenceTimestamp, + messageHash: defaultMsgHash, + signature: signature, + apk: aggSignerApkG2, + nonSignerWitnesses: new BN254OperatorInfoWitness[](0) + }); + + uint[] memory signedStakes = verifier.verifyCertificate(defaultOperatorSet, cert); + + // All stakes should be signed + assertEq(signedStakes[0], allSignerOpSetInfo.totalWeights[0], "All stake should be signed for type 0"); + assertEq(signedStakes[1], allSignerOpSetInfo.totalWeights[1], "All stake should be signed for type 1"); + } + + function testFuzz_verifyCertificate_someNonSigners(Randomness r) public rand(r) { + // Create operators and update operator table + uint numSigners = r.Uint256(1, numOperators - 1); + uint nonSigners = numOperators - numSigners; + ( + BN254OperatorInfo[] memory operators, + BN254OperatorSetInfo memory newOperatorSetInfo, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, nonSigners); + + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); + + uint[] memory signedStakes = verifier.verifyCertificate(defaultOperatorSet, cert); + + // Check that the signed stakes are correct + assertEq(signedStakes.length, 2, "Wrong number of stake types"); // Calculate expected signed stakes uint[] memory expectedSignedStakes = new uint[](2); - - // Start with total stakes - expectedSignedStakes[0] = operatorSetInfo.totalWeights[0]; - expectedSignedStakes[1] = operatorSetInfo.totalWeights[1]; + expectedSignedStakes[0] = newOperatorSetInfo.totalWeights[0]; + expectedSignedStakes[1] = newOperatorSetInfo.totalWeights[1]; // Subtract non-signer stakes for (uint i = 0; i < nonSignerIndices.length; i++) { @@ -367,47 +536,108 @@ contract BN254CertificateVerifierTest is Test { assertEq(signedStakes[1], expectedSignedStakes[1], "Wrong signed stake for type 1"); } - // Test verifyCertificateProportion - function testVerifyCertificateProportion() public { - uint32 referenceTimestamp = uint32(block.timestamp); + function test_verifyCertificate_cachesOperatorInfo(Randomness r) public rand(r) { + // Create operators + uint numSigners = r.Uint256(1, numOperators - 1); + uint nonSigners = numOperators - numSigners; + (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) + = _updateOperatorTable(r, numSigners, nonSigners); + + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); + + // First verification should cache the operator infos + verifier.verifyCertificate(defaultOperatorSet, cert); + + // Check that operator infos are now cached + for (uint i = 0; i < nonSignerIndices.length; i++) { + uint32 nonSignerIndex = nonSignerIndices[i]; + BN254OperatorInfo memory cachedInfo = verifier.getNonsignerOperatorInfo(defaultOperatorSet, referenceTimestamp, nonSignerIndex); + + // Cached info should match original + assertEq(cachedInfo.pubkey.X, operators[nonSignerIndex].pubkey.X, "Cached pubkey X mismatch"); + assertEq(cachedInfo.pubkey.Y, operators[nonSignerIndex].pubkey.Y, "Cached pubkey Y mismatch"); + assertEq(cachedInfo.weights[0], operators[nonSignerIndex].weights[0], "Cached weight 0 mismatch"); + assertEq(cachedInfo.weights[1], operators[nonSignerIndex].weights[1], "Cached weight 1 mismatch"); + assertTrue(verifier.isNonsignerCached(defaultOperatorSet, referenceTimestamp, nonSignerIndex), "Operator should be cached"); + } - // Create operators with split keys - 3 signers, 1 non-signer - uint pseudoRandomNumber = 789; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 3, 1); + // Second verification should use cached data. We don't have to provide an operatorInfoProof for the non-signers + // since they are in the cache. + BN254OperatorInfo memory emptyOperatorInfo; + for (uint i = 0; i < nonSignerIndices.length; i++) { + cert.nonSignerWitnesses[i].operatorInfoProof = new bytes(0); + cert.nonSignerWitnesses[i].operatorInfo = emptyOperatorInfo; + } + verifier.verifyCertificate(defaultOperatorSet, cert); + } +} + +/** + * @title BN254CertificateVerifierUnitTests_verifyCertificateProportion + * @notice Unit tests for BN254CertificateVerifier.verifyCertificateProportion + */ +contract BN254CertificateVerifierUnitTests_verifyCertificateProportion is BN254CertificateVerifierUnitTests { + function testFuzz_revert_arrayLengthMismatch(Randomness r) public rand(r) { + // Update operator table + (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) + = _updateOperatorTable(r, numOperators, 0); // 0 nonsigners - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); + uint16[] memory wrongLengthThresholds = new uint16[](1); // Should be 2 + wrongLengthThresholds[0] = 6000; + + vm.expectRevert(ArrayLengthMismatch.selector); + verifier.verifyCertificateProportion(defaultOperatorSet, cert, wrongLengthThresholds); + } - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + function testFuzz_verifyCertificateProportion_meetsThresholds(Randomness r) public rand(r) { + // Update operator table + uint numSigners = r.Uint256(1, numOperators - 1); + uint numNonsigners = numOperators - numSigners; + (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) + = _updateOperatorTable(r, numSigners, numNonsigners); - // Create certificate with real BLS signature - IBN254CertificateVerifierTypes.BN254Certificate memory cert = - createCertificate(referenceTimestamp, msgHash, nonSignerIndices, operators, signature); + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); // Set thresholds at 60% of total stake for each type uint16[] memory thresholds = new uint16[](2); thresholds[0] = 6000; // 60% thresholds[1] = 6000; // 60% - // Verify certificate meets thresholds - no mocking needed - bool meetsThresholds = verifier.verifyCertificateProportion(testOperatorSet, cert, thresholds); + bool meetsThresholds = verifier.verifyCertificateProportion(defaultOperatorSet, cert, thresholds); - // With 3 signers out of 4, should meet 60% threshold - assertTrue(meetsThresholds, "Certificate should meet thresholds"); + // Calculate expected result based on the number of signers + // With numSigners out of numOperators, check if it meets 60% threshold + uint signedPercentage = (numSigners * 10_000) / numOperators; + bool expectedResult = signedPercentage >= 6000; + + assertEq(meetsThresholds, expectedResult, "Certificate threshold check incorrect"); + } + + function testFuzz_verifyCertificateProportion_doesNotMeetThresholds(Randomness r) public rand(r) { + // Update operator table with a specific split to ensure some thresholds won't be met + uint numSigners = r.Uint256(1, numOperators / 2); // At most half signers + uint numNonsigners = numOperators - numSigners; + ( + BN254OperatorInfo[] memory operators, + BN254OperatorSetInfo memory operatorSetInfo, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, numNonsigners); + + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); // Try with higher threshold that shouldn't be met + uint16[] memory thresholds = new uint16[](2); thresholds[0] = 9000; // 90% thresholds[1] = 9000; // 90% - meetsThresholds = verifier.verifyCertificateProportion(testOperatorSet, cert, thresholds); + bool meetsThresholds = verifier.verifyCertificateProportion(defaultOperatorSet, cert, thresholds); // Calculate percentage of signed stakes to determine if it should meet threshold - uint[] memory signedStakes = verifier.verifyCertificate(testOperatorSet, cert); + uint[] memory signedStakes = verifier.verifyCertificate(defaultOperatorSet, cert); uint signedPercentage0 = (signedStakes[0] * 10_000) / operatorSetInfo.totalWeights[0]; uint signedPercentage1 = (signedStakes[1] * 10_000) / operatorSetInfo.totalWeights[1]; @@ -415,344 +645,285 @@ contract BN254CertificateVerifierTest is Test { assertEq(meetsThresholds, shouldMeetThreshold, "Certificate threshold check incorrect"); } - // Test with invalid signature (wrong message hash) - function testVerifyCertificateInvalidSignature() public { - uint32 referenceTimestamp = uint32(block.timestamp); - - // Create operators with split keys - 3 signers, 1 non-signer - uint pseudoRandomNumber = 123; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 3, 1); - - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); + /// @notice Fuzz against random thresholds + function testFuzz_verifyCertificateProportion_thresholds(Randomness r, uint16 threshold0, uint16 threshold1) public rand(r) { + // Update operator table with random split + uint numSigners = r.Uint256(1, numOperators); + uint numNonsigners = numOperators - numSigners; + ( + BN254OperatorInfo[] memory operators, + BN254OperatorSetInfo memory operatorSetInfo, + uint32 referenceTimestamp, + uint32[] memory nonSignerIndices, + BN254.G1Point memory signature + ) = _updateOperatorTable(r, numSigners, numNonsigners); - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + threshold0 = uint16(bound(threshold0, 0, 10_000)); // 0% to 100% + threshold1 = uint16(bound(threshold1, 0, 10_000)); // 0% to 100% - // Create certificate with real BLS signature but WRONG message hash - bytes32 wrongHash = keccak256("wrong message"); - - IBN254CertificateVerifierTypes.BN254Certificate memory cert = createCertificate( - referenceTimestamp, - wrongHash, // Use wrong hash here - nonSignerIndices, - operators, - signature // Signature is for original msgHash, not wrongHash - ); + uint16[] memory thresholds = new uint16[](2); + thresholds[0] = threshold0; + thresholds[1] = threshold1; + + bool meetsThresholds = verifier.verifyCertificateProportion(defaultOperatorSet, cert, thresholds); + + // Calculate expected result + uint[] memory signedStakes = verifier.verifyCertificate(defaultOperatorSet, cert); + bool expectedResult = true; + for (uint i = 0; i < 2; i++) { + uint threshold = (operatorSetInfo.totalWeights[i] * thresholds[i]) / 10_000; + if (signedStakes[i] < threshold) { + expectedResult = false; + break; + } + } - // Verification should fail without mocking - vm.expectRevert(abi.encodeWithSignature("VerificationFailed()")); - verifier.verifyCertificate(testOperatorSet, cert); + assertEq(meetsThresholds, expectedResult, "Threshold calculation mismatch"); } +} - // Test certificate with stale timestamp (should fail) - function testVerifyCertificateStaleTimestamp() public { - uint32 referenceTimestamp = uint32(block.timestamp); - - // Create operators with split keys - 3 signers, 1 non-signer - uint pseudoRandomNumber = 123; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 3, 1); - - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); - - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); - - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); - - // Create certificate with real BLS signature - IBN254CertificateVerifierTypes.BN254Certificate memory cert = - createCertificate(referenceTimestamp, msgHash, nonSignerIndices, operators, signature); - - // Jump forward in time beyond the max staleness - vm.warp(block.timestamp + maxStaleness + 1); - - // Verification should fail due to staleness - vm.expectRevert(abi.encodeWithSignature("CertificateStale()")); - verifier.verifyCertificate(testOperatorSet, cert); +/** + * @title BN254CertificateVerifierUnitTests_verifyCertificateNominal + * @notice Unit tests for BN254CertificateVerifier.verifyCertificateNominal + */ +contract BN254CertificateVerifierUnitTests_verifyCertificateNominal is BN254CertificateVerifierUnitTests { + function testFuzz_revert_arrayLengthMismatch(Randomness r) public rand(r) { + // Update operator table + uint numSigners = r.Uint256(1, numOperators - 1); + uint numNonsigners = numOperators - numSigners; + (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) + = _updateOperatorTable(r, numSigners, numNonsigners); + + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); + + uint[] memory wrongLengthThresholds = new uint[](1); // Should be 2 + wrongLengthThresholds[0] = 100; + + vm.expectRevert(ArrayLengthMismatch.selector); + verifier.verifyCertificateNominal(defaultOperatorSet, cert, wrongLengthThresholds); } - // Test verifyCertificateNominal functionality - function testVerifyCertificateNominal() public { - uint32 referenceTimestamp = uint32(block.timestamp); - - // Create operators with split keys - 3 signers, 1 non-signer - uint pseudoRandomNumber = 567; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 3, 1); - - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); - - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); - - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + function testFuzz_verifyCertificateNominal_meetsThresholds(Randomness r) public rand(r) { + // Update operator table + uint numSigners = r.Uint256(1, numOperators); + uint numNonsigners = numOperators - numSigners; + (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) + = _updateOperatorTable(r, numSigners, numNonsigners); - // Create certificate with real BLS signature - IBN254CertificateVerifierTypes.BN254Certificate memory cert = - createCertificate(referenceTimestamp, msgHash, nonSignerIndices, operators, signature); + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); - // Get the signed stakes first - uint[] memory signedStakes = verifier.verifyCertificate(testOperatorSet, cert); + // Get the signed stakes for reference + uint[] memory signedStakes = verifier.verifyCertificate(defaultOperatorSet, cert); // Test with thresholds lower than signed stakes (should pass) uint[] memory passThresholds = new uint[](2); - passThresholds[0] = signedStakes[0] - 10; - passThresholds[1] = signedStakes[1] - 10; + passThresholds[0] = signedStakes[0] > 10 ? signedStakes[0] - 10 : 0; + passThresholds[1] = signedStakes[1] > 10 ? signedStakes[1] - 10 : 0; - bool meetsThresholds = verifier.verifyCertificateNominal(testOperatorSet, cert, passThresholds); + bool meetsThresholds = verifier.verifyCertificateNominal(defaultOperatorSet, cert, passThresholds); assertTrue(meetsThresholds, "Certificate should meet nominal thresholds"); + } + + function testFuzz_verifyCertificateNominal_doesNotMeetThresholds(Randomness r) public rand(r) { + // Update operator table + uint numSigners = r.Uint256(1, numOperators - 1); // Ensure at least one non-signer + uint numNonsigners = numOperators - numSigners; + (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) + = _updateOperatorTable(r, numSigners, numNonsigners); + + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); + + // Get the signed stakes for reference + uint[] memory signedStakes = verifier.verifyCertificate(defaultOperatorSet, cert); // Test with thresholds higher than signed stakes (should fail) uint[] memory failThresholds = new uint[](2); failThresholds[0] = signedStakes[0] + 10; failThresholds[1] = signedStakes[1] + 10; - meetsThresholds = verifier.verifyCertificateNominal(testOperatorSet, cert, failThresholds); + bool meetsThresholds = verifier.verifyCertificateNominal(defaultOperatorSet, cert, failThresholds); assertFalse(meetsThresholds, "Certificate should not meet impossible nominal thresholds"); } - // Test with no non-signers (all operators sign) - function testVerifyCertificateAllSigners() public { - uint32 referenceTimestamp = uint32(block.timestamp); + /// @notice Fuzz against random thresholds + function testFuzz_verifyCertificateNominal_thresholds(Randomness r, uint threshold0, uint threshold1) public rand(r) { + // Update operator table + uint numSigners = r.Uint256(1, numOperators); + uint numNonsigners = numOperators - numSigners; + (BN254OperatorInfo[] memory operators,, uint32 referenceTimestamp, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) + = _updateOperatorTable(r, numSigners, numNonsigners); - // Create operators with all signers - uint pseudoRandomNumber = 999; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators,, BN254.G1Point memory signature) = - createOperatorsWithSplitKeys(pseudoRandomNumber, numOperators, 0); + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); + // Get the signed stakes for reference + uint[] memory signedStakes = verifier.verifyCertificate(defaultOperatorSet, cert); - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); + // Bound thresholds to reasonable values + threshold0 = bound(threshold0, 0, signedStakes[0] * 2); + threshold1 = bound(threshold1, 0, signedStakes[1] * 2); - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + uint[] memory thresholds = new uint[](2); + thresholds[0] = threshold0; + thresholds[1] = threshold1; - // Create certificate with no non-signers - IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ - referenceTimestamp: referenceTimestamp, - messageHash: msgHash, - signature: signature, - apk: aggSignerApkG2, - nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) - }); + bool meetsThresholds = verifier.verifyCertificateNominal(defaultOperatorSet, cert, thresholds); - // Verify certificate - uint[] memory signedStakes = verifier.verifyCertificate(testOperatorSet, cert); + // Expected result + bool expectedResult = (signedStakes[0] >= threshold0) && (signedStakes[1] >= threshold1); - // All stakes should be signed - assertEq(signedStakes[0], operatorSetInfo.totalWeights[0], "All stake should be signed for type 0"); - assertEq(signedStakes[1], operatorSetInfo.totalWeights[1], "All stake should be signed for type 1"); + assertEq(meetsThresholds, expectedResult, "Nominal threshold check mismatch"); } +} - // Test with invalid operator tree root - function testVerifyCertificateInvalidOperatorTreeRoot() public { - uint32 referenceTimestamp = uint32(block.timestamp); - - // Create operators with split keys - 3 signers, 1 non-signer - uint pseudoRandomNumber = 123; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 3, 1); - - // Create operator set info with CORRECT tree root - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); - - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); - - // Modify the tree root to be invalid AFTER creating the info - operatorSetInfo.operatorInfoTreeRoot = keccak256("invalid root"); +/** + * @title BN254CertificateVerifierUnitTests_ViewFunctions + * @notice Unit tests for BN254CertificateVerifier view functions + */ +contract BN254CertificateVerifierUnitTests_ViewFunctions is BN254CertificateVerifierUnitTests { + uint32 referenceTimestamp; + BN254OperatorSetInfo operatorSetInfo; + OperatorSetConfig operatorSetConfig; - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + function setUp() public override { + super.setUp(); + referenceTimestamp = uint32(block.timestamp); - // Create certificate with real BLS signature but proofs won't match the invalid root - IBN254CertificateVerifierTypes.BN254Certificate memory cert = - createCertificate(referenceTimestamp, msgHash, nonSignerIndices, operators, signature); + (BN254OperatorInfo[] memory operators,,) = _createOperatorsWithSplitKeys(123, 3, 1); + operatorSetInfo = _createOperatorSetInfo(operators); - // Verification should fail due to invalid merkle proofs - vm.expectRevert(abi.encodeWithSignature("VerificationFailed()")); - verifier.verifyCertificate(testOperatorSet, cert); + vm.prank(address(operatorTableUpdaterMock)); + verifier.updateOperatorTable(defaultOperatorSet, referenceTimestamp, operatorSetInfo, defaultOperatorSetConfig); } - // Test with invalid reference timestamp - function testInvalidReferenceTimestamp() public { - uint32 existingReferenceTimestamp = uint32(block.timestamp); - uint32 nonExistentTimestamp = existingReferenceTimestamp + 1000; - - // Create operators with split keys - 3 signers, 1 non-signer - uint pseudoRandomNumber = 123; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 3, 1); - - // Create operator set info - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); - - // Create operator set config - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); - - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, existingReferenceTimestamp, operatorSetInfo, operatorSetConfig); - - // Create certificate using a non-existent timestamp - IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ - referenceTimestamp: nonExistentTimestamp, - messageHash: msgHash, - signature: signature, - apk: aggSignerApkG2, - nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) - }); - - // Verification should fail due to timestamp not existing - vm.expectRevert(abi.encodeWithSignature("ReferenceTimestampDoesNotExist()")); - verifier.verifyCertificate(testOperatorSet, cert); + function test_getOperatorSetOwner() public view { + address owner = verifier.getOperatorSetOwner(defaultOperatorSet); + assertEq(owner, operatorSetOwner, "Operator set owner mismatch"); } - // Test multiple operator sets - function testMultipleOperatorSets() public { - // Create two different operator sets - OperatorSet memory operatorSet1 = OperatorSet({avs: address(0x10), id: 1}); - OperatorSet memory operatorSet2 = OperatorSet({avs: address(0x20), id: 2}); - - uint32 referenceTimestamp = uint32(block.timestamp); - - // Create operators for each set - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators1,,) = createOperatorsWithSplitKeys(111, 3, 1); - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators2,,) = createOperatorsWithSplitKeys(222, 2, 2); - - // Create operator set infos - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo1 = createOperatorSetInfo(operators1); - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo2 = createOperatorSetInfo(operators2); - - // Create operator set configs with different owners - ICrossChainRegistryTypes.OperatorSetConfig memory config1 = ICrossChainRegistryTypes.OperatorSetConfig({ - owner: address(0x100), - maxStalenessPeriod: 1800 // 30 minutes - }); - ICrossChainRegistryTypes.OperatorSetConfig memory config2 = ICrossChainRegistryTypes.OperatorSetConfig({ - owner: address(0x200), - maxStalenessPeriod: 7200 // 2 hours - }); - - vm.startPrank(tableUpdater); - - // Update both operator tables - verifier.updateOperatorTable(operatorSet1, referenceTimestamp, operatorSetInfo1, config1); - verifier.updateOperatorTable(operatorSet2, referenceTimestamp, operatorSetInfo2, config2); - - vm.stopPrank(); - - // Verify that both operator sets are stored correctly and independently - assertEq(verifier.getOperatorSetOwner(operatorSet1), address(0x100), "OperatorSet1 owner incorrect"); - assertEq(verifier.getOperatorSetOwner(operatorSet2), address(0x200), "OperatorSet2 owner incorrect"); - - assertEq(verifier.maxOperatorTableStaleness(operatorSet1), 1800, "OperatorSet1 staleness incorrect"); - assertEq(verifier.maxOperatorTableStaleness(operatorSet2), 7200, "OperatorSet2 staleness incorrect"); + function test_maxOperatorTableStaleness() public view { + uint32 staleness = verifier.maxOperatorTableStaleness(defaultOperatorSet); + assertEq(staleness, defaultMaxStaleness, "Max staleness mismatch"); + } - assertEq(verifier.latestReferenceTimestamp(operatorSet1), referenceTimestamp, "OperatorSet1 timestamp incorrect"); - assertEq(verifier.latestReferenceTimestamp(operatorSet2), referenceTimestamp, "OperatorSet2 timestamp incorrect"); + function test_latestReferenceTimestamp() public view { + uint32 timestamp = verifier.latestReferenceTimestamp(defaultOperatorSet); + assertEq(timestamp, referenceTimestamp, "Latest reference timestamp mismatch"); + } - // Verify operator set infos are stored independently - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory storedInfo1 = verifier.getOperatorSetInfo(operatorSet1, referenceTimestamp); - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory storedInfo2 = verifier.getOperatorSetInfo(operatorSet2, referenceTimestamp); + function test_getOperatorSetInfo() public view { + BN254OperatorSetInfo memory retrievedInfo = verifier.getOperatorSetInfo(defaultOperatorSet, referenceTimestamp); - assertEq(storedInfo1.numOperators, 4, "OperatorSet1 should have 4 operators"); - assertEq(storedInfo2.numOperators, 4, "OperatorSet2 should have 4 operators"); - - // Verify they have different tree roots (since operators are different) - assertTrue(storedInfo1.operatorInfoTreeRoot != storedInfo2.operatorInfoTreeRoot, "Tree roots should be different"); + assertEq(retrievedInfo.numOperators, operatorSetInfo.numOperators, "Num operators mismatch"); + assertEq(retrievedInfo.aggregatePubkey.X, operatorSetInfo.aggregatePubkey.X, "Aggregate pubkey X mismatch"); + assertEq(retrievedInfo.aggregatePubkey.Y, operatorSetInfo.aggregatePubkey.Y, "Aggregate pubkey Y mismatch"); + assertEq(retrievedInfo.operatorInfoTreeRoot, operatorSetInfo.operatorInfoTreeRoot, "Tree root mismatch"); + assertEq(retrievedInfo.totalWeights.length, operatorSetInfo.totalWeights.length, "Total weights length mismatch"); + for (uint i = 0; i < retrievedInfo.totalWeights.length; i++) { + assertEq(retrievedInfo.totalWeights[i], operatorSetInfo.totalWeights[i], "Total weight mismatch"); + } } - // Test access control for operator table updates - function testOperatorTableUpdateAccessControl() public { - uint32 referenceTimestamp = uint32(block.timestamp); + function test_getNonsignerOperatorInfo() public { + // First cache some operator info + (BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) = + _createOperatorsWithSplitKeys(123, 3, 1); - // Create operators - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators,,) = createOperatorsWithSplitKeys(123, 3, 1); + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); + // Verify certificate to cache operator info + verifier.verifyCertificate(defaultOperatorSet, cert); - // Try to update with non-authorized account - vm.prank(nonOwner); - vm.expectRevert(abi.encodeWithSignature("OnlyTableUpdater()")); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + // Get cached operator info + uint32 operatorIndex = nonSignerIndices[0]; + BN254OperatorInfo memory cachedInfo = verifier.getNonsignerOperatorInfo(defaultOperatorSet, referenceTimestamp, operatorIndex); - // Should succeed with authorized account - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + assertEq(cachedInfo.pubkey.X, operators[operatorIndex].pubkey.X, "Cached pubkey X mismatch"); + assertEq(cachedInfo.pubkey.Y, operators[operatorIndex].pubkey.Y, "Cached pubkey Y mismatch"); + assertEq(cachedInfo.weights[0], operators[operatorIndex].weights[0], "Cached weight 0 mismatch"); + assertEq(cachedInfo.weights[1], operators[operatorIndex].weights[1], "Cached weight 1 mismatch"); } - // Test stale table update (timestamp not increasing) - function testStaleTableUpdate() public { - uint32 firstTimestamp = uint32(block.timestamp); - uint32 staleTimestamp = firstTimestamp - 100; // Earlier timestamp + function test_isNonsignerCached() public { + // First cache some operator info + (BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) = + _createOperatorsWithSplitKeys(123, 3, 1); - // Create operators - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators,,) = createOperatorsWithSplitKeys(123, 3, 1); + BN254Certificate memory cert = _createCertificate(referenceTimestamp, defaultMsgHash, nonSignerIndices, operators, signature); - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); - - vm.startPrank(tableUpdater); + // Non-signer index should be not cached prior to verification + assertFalse( + verifier.isNonsignerCached(defaultOperatorSet, referenceTimestamp, nonSignerIndices[0]), + "Nonsigner operator info should not be cached" + ); - // First update should succeed - verifier.updateOperatorTable(testOperatorSet, firstTimestamp, operatorSetInfo, operatorSetConfig); + // Verify certificate to cache operator info + verifier.verifyCertificate(defaultOperatorSet, cert); - // Second update with earlier timestamp should fail - vm.expectRevert(abi.encodeWithSignature("TableUpdateStale()")); - verifier.updateOperatorTable(testOperatorSet, staleTimestamp, operatorSetInfo, operatorSetConfig); + // Check that the non-signer operator info is cached + assertTrue( + verifier.isNonsignerCached(defaultOperatorSet, referenceTimestamp, nonSignerIndices[0]), + "Nonsigner operator info should be cached" + ); - vm.stopPrank(); + // Assert that the signers are NOT cached + for (uint i = 0; i < operators.length; i++) { + if (i != nonSignerIndices[0]) { + assertFalse( + verifier.isNonsignerCached(defaultOperatorSet, referenceTimestamp, i), "Signer operator info should not be cached" + ); + } + } } +} - // Test operator info caching - function testOperatorInfoCaching() public { - uint32 referenceTimestamp = uint32(block.timestamp); - - // Create operators with split keys - 2 signers, 2 non-signers - uint pseudoRandomNumber = 456; - (IBN254TableCalculatorTypes.BN254OperatorInfo[] memory operators, uint32[] memory nonSignerIndices, BN254.G1Point memory signature) - = createOperatorsWithSplitKeys(pseudoRandomNumber, 2, 2); - - IBN254TableCalculatorTypes.BN254OperatorSetInfo memory operatorSetInfo = createOperatorSetInfo(operators); - ICrossChainRegistryTypes.OperatorSetConfig memory operatorSetConfig = createOperatorSetConfig(); +/** + * @title BN254CertificateVerifierUnitTests_trySignatureVerification + * @notice Unit tests for BN254CertificateVerifier.trySignatureVerification + */ +contract BN254CertificateVerifierUnitTests_trySignatureVerification is BN254CertificateVerifierUnitTests { + function testFuzz_trySignatureVerification_validSignature(Randomness r) public rand(r) { + // Create all operators as signers + (BN254OperatorInfo[] memory operators,, BN254.G1Point memory validSignature) = + _createOperatorsWithSplitKeys(r.Uint256(), numOperators, 0); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operators); + + // Verify signature + (bool pairingSuccessful, bool signatureValid) = + verifier.trySignatureVerification(defaultMsgHash, operatorSetInfo.aggregatePubkey, aggSignerApkG2, validSignature); + + assertTrue(pairingSuccessful, "Pairing should be successful"); + assertTrue(signatureValid, "Signature should be valid"); + } - vm.prank(tableUpdater); - verifier.updateOperatorTable(testOperatorSet, referenceTimestamp, operatorSetInfo, operatorSetConfig); + function testFuzz_trySignatureVerification_invalidPairing(Randomness r) public rand(r) { + // Create valid signature with one set of operators + (BN254OperatorInfo[] memory operators,, BN254.G1Point memory validSignature) = + _createOperatorsWithSplitKeys(r.Uint256(), numOperators, 0); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operators); - // Create certificate with real BLS signature - IBN254CertificateVerifierTypes.BN254Certificate memory cert = - createCertificate(referenceTimestamp, msgHash, nonSignerIndices, operators, signature); + // Try to verify signature with invalid message hash + bytes32 invalidMsgHash = bytes32(uint(1)); + (bool pairingSuccessful, bool signatureValid) = + verifier.trySignatureVerification(invalidMsgHash, operatorSetInfo.aggregatePubkey, aggSignerApkG2, validSignature); - // First verification should cache the operator infos - verifier.verifyCertificate(testOperatorSet, cert); + assertFalse(pairingSuccessful, "Pairing should be unsuccessful"); + assertTrue(signatureValid, "Signature should be valid"); + } - // Check that operator infos are now cached - for (uint i = 0; i < nonSignerIndices.length; i++) { - uint32 nonSignerIndex = nonSignerIndices[i]; - IBN254TableCalculatorTypes.BN254OperatorInfo memory cachedInfo = - verifier.getOperatorInfo(testOperatorSet, referenceTimestamp, nonSignerIndex); + function testFuzz_trySignatureVerification_invalidSigAndPairing(Randomness r) public rand(r) { + // Create valid signature with one set of operators + (BN254OperatorInfo[] memory operators,, BN254.G1Point memory validSignature) = + _createOperatorsWithSplitKeys(r.Uint256(), numOperators, 0); + BN254OperatorSetInfo memory operatorSetInfo = _createOperatorSetInfo(operators); - // Cached info should match original - assertEq(cachedInfo.pubkey.X, operators[nonSignerIndex].pubkey.X, "Cached pubkey X mismatch"); - assertEq(cachedInfo.pubkey.Y, operators[nonSignerIndex].pubkey.Y, "Cached pubkey Y mismatch"); - assertEq(cachedInfo.weights[0], operators[nonSignerIndex].weights[0], "Cached weight 0 mismatch"); - assertEq(cachedInfo.weights[1], operators[nonSignerIndex].weights[1], "Cached weight 1 mismatch"); - } + // Try to verify signature with invalid apk + aggSignerApkG2.X[0] += 1; // Invalid apk + (bool pairingSuccessful, bool signatureValid) = + verifier.trySignatureVerification(defaultMsgHash, operatorSetInfo.aggregatePubkey, aggSignerApkG2, validSignature); - // Second verification should use cached data (should still work) - verifier.verifyCertificate(testOperatorSet, cert); + assertFalse(pairingSuccessful, "Pairing should be unsuccessful"); + assertFalse(signatureValid, "Signature should be invalid"); } } diff --git a/src/test/unit/CrossChainRegistryUnit.t.sol b/src/test/unit/CrossChainRegistryUnit.t.sol index 2bf145aef7..63c8c81b6c 100644 --- a/src/test/unit/CrossChainRegistryUnit.t.sol +++ b/src/test/unit/CrossChainRegistryUnit.t.sol @@ -26,6 +26,8 @@ contract CrossChainRegistryUnitTests is uint8 constant PAUSED_CHAIN_WHITELIST = 4; // Test state variables + CrossChainRegistry crossChainRegistry; + CrossChainRegistry crossChainRegistryImplementation; address defaultAVS; address notPermissioned = address(0xDEAD); OperatorSet defaultOperatorSet; @@ -39,6 +41,30 @@ contract CrossChainRegistryUnitTests is function setUp() public virtual override { EigenLayerMultichainUnitTestSetup.setUp(); + // Deploy CrossChainRegistry implementation + crossChainRegistryImplementation = new CrossChainRegistry( + IAllocationManager(address(allocationManagerMock)), + IKeyRegistrar(address(keyRegistrar)), + IPermissionController(address(permissionController)), + pauserRegistry, + "1.0.0" + ); + + // Deploy CrossChainRegistry proxy + crossChainRegistry = CrossChainRegistry( + address( + new TransparentUpgradeableProxy( + address(crossChainRegistryImplementation), + address(eigenLayerProxyAdmin), + abi.encodeWithSelector( + CrossChainRegistry.initialize.selector, + address(this), // initial owner + 0 // initial paused status + ) + ) + ) + ); + // Set up default test values defaultAVS = cheats.randomAddress(); defaultOperatorSet = OperatorSet({avs: defaultAVS, id: 1}); diff --git a/src/test/utils/EigenLayerMultichainUnitTestSetup.sol b/src/test/utils/EigenLayerMultichainUnitTestSetup.sol index c10ee0a724..5fff0cc1fc 100644 --- a/src/test/utils/EigenLayerMultichainUnitTestSetup.sol +++ b/src/test/utils/EigenLayerMultichainUnitTestSetup.sol @@ -5,6 +5,8 @@ import "src/test/utils/EigenLayerUnitTestSetup.sol"; import "src/contracts/permissions/KeyRegistrar.sol"; import "src/test/mocks/BN254CertificateVerifierMock.sol"; import "src/test/mocks/ECDSACertificateVerifierMock.sol"; +import "src/test/mocks/CrossChainRegistryMock.sol"; +import "src/test/mocks/OperatorTableUpdaterMock.sol"; import "src/contracts/multichain/CrossChainRegistry.sol"; abstract contract EigenLayerMultichainUnitTestSetup is EigenLayerUnitTestSetup { @@ -18,8 +20,8 @@ abstract contract EigenLayerMultichainUnitTestSetup is EigenLayerUnitTestSetup { /// @dev Mocks BN254CertificateVerifierMock bn254CertificateVerifierMock; ECDSACertificateVerifierMock ecdsaCertificateVerifierMock; - CrossChainRegistry crossChainRegistry; - CrossChainRegistry crossChainRegistryImplementation; + CrossChainRegistryMock crossChainRegistryMock; + OperatorTableUpdaterMock operatorTableUpdaterMock; function setUp() public virtual override { // Setup Core Mocks @@ -33,34 +35,13 @@ abstract contract EigenLayerMultichainUnitTestSetup is EigenLayerUnitTestSetup { // Deploy mocks bn254CertificateVerifierMock = new BN254CertificateVerifierMock(); ecdsaCertificateVerifierMock = new ECDSACertificateVerifierMock(); - - // Deploy CrossChainRegistry implementation - crossChainRegistryImplementation = new CrossChainRegistry( - IAllocationManager(address(allocationManagerMock)), - IKeyRegistrar(address(keyRegistrar)), - IPermissionController(address(permissionController)), - pauserRegistry, - "1.0.0" - ); - - // Deploy CrossChainRegistry proxy - crossChainRegistry = CrossChainRegistry( - address( - new TransparentUpgradeableProxy( - address(crossChainRegistryImplementation), - address(eigenLayerProxyAdmin), - abi.encodeWithSelector( - CrossChainRegistry.initialize.selector, - address(this), // initial owner - 0 // initial paused status - ) - ) - ) - ); + crossChainRegistryMock = new CrossChainRegistryMock(); + operatorTableUpdaterMock = new OperatorTableUpdaterMock(); // Filter out mocks isExcludedFuzzAddress[address(bn254CertificateVerifierMock)] = true; isExcludedFuzzAddress[address(ecdsaCertificateVerifierMock)] = true; - isExcludedFuzzAddress[address(crossChainRegistry)] = true; + isExcludedFuzzAddress[address(crossChainRegistryMock)] = true; + isExcludedFuzzAddress[address(operatorTableUpdaterMock)] = true; } }