From 4d5ad0ca4d8966b262ae6273a1c78511367f0da4 Mon Sep 17 00:00:00 2001 From: Gautham Anant Date: Tue, 11 Nov 2025 16:21:33 -0800 Subject: [PATCH 1/8] feat: cloud report --- .gitmodules | 3 + Makefile | 24 - bin/compile-bindings.sh | 1 + foundry.lock | 17 + foundry.toml | 1 + lib/eigenda | 1 + .../v1/CloudReportCompendium/binding.go | 1534 +++++++++++++++++ .../v2/CloudReportCompendium/binding.go | 1351 +++++++++++++++ src/CloudReportCompendium.sol | 195 +++ src/interfaces/ICloudReportCompendium.sol | 139 ++ src/storage/CloudReportCompendiumStorage.sol | 101 ++ 11 files changed, 3343 insertions(+), 24 deletions(-) create mode 100644 foundry.lock create mode 160000 lib/eigenda create mode 100644 pkg/bindings/v1/CloudReportCompendium/binding.go create mode 100644 pkg/bindings/v2/CloudReportCompendium/binding.go create mode 100644 src/CloudReportCompendium.sol create mode 100644 src/interfaces/ICloudReportCompendium.sol create mode 100644 src/storage/CloudReportCompendiumStorage.sol diff --git a/.gitmodules b/.gitmodules index 839be48..0f9f43f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "lib/eigenlayer-middleware"] path = lib/eigenlayer-middleware url = https://github.com/Layr-Labs/eigenlayer-middleware +[submodule "lib/eigenda"] + path = lib/eigenda + url = https://github.com/Layr-Labs/eigenda diff --git a/Makefile b/Makefile index db3a3a8..06ddc02 100644 --- a/Makefile +++ b/Makefile @@ -11,30 +11,6 @@ build: test: forge test -vvv -# Deploy main contracts from using config/deploy.json as input -.PHONY: deploy -deploy: - forge script script/Deploy.s.sol \ - --rpc-url $(RPC_URL) \ - --broadcast \ - --private-key $(PRIVATE_KEY) \ - $(if $(VERIFY),--verify --verifier etherscan --etherscan-api-key $(ETHERSCAN_API_KEY)) \ - $(if $(RESUME),--resume) \ - --slow \ - -vvvv \ - --sig "run(string)" -- $(ENVIRONMENT) - -# Create AVS instance -.PHONY: create-app -create-app: - forge script script/CreateApp.s.sol \ - --rpc-url $(RPC_URL) \ - --broadcast \ - --sig "run(string)" $(ENVIRONMENT) \ - --private-key $(PRIVATE_KEY) \ - --slow \ - -vvvv - .PHONY: bindings bindings: ./bin/compile-bindings.sh diff --git a/bin/compile-bindings.sh b/bin/compile-bindings.sh index 1e6e550..bbacfa5 100755 --- a/bin/compile-bindings.sh +++ b/bin/compile-bindings.sh @@ -52,6 +52,7 @@ contracts=( "AppController" "ComputeAVSRegistrar" "ComputeOperator" + "CloudReportCompendium" "IReleaseManager" "IPermissionController" ) diff --git a/foundry.lock b/foundry.lock new file mode 100644 index 0000000..1b5bce1 --- /dev/null +++ b/foundry.lock @@ -0,0 +1,17 @@ +{ + "lib/eigenda": { + "tag": { + "name": "v2.4.1", + "rev": "9c0c5621b5424560d7c640e28785ef56345178d4" + } + }, + "lib/eigenlayer-middleware": { + "rev": "dbccc2119e1e63ffdfc5bacda7c60f6c1574c347" + }, + "lib/forge-std": { + "rev": "8bbcf6e3f8f62f419e5429a0bd89331c85c37824" + }, + "lib/zeus-templates": { + "rev": "b4c42abc64bb7cc414819deb177fa2f924a761a7" + } +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 37482dc..099f0b3 100644 --- a/foundry.toml +++ b/foundry.toml @@ -10,6 +10,7 @@ remappings = [ "@eigenlayer-contracts/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/", "@openzeppelin/=lib/eigenlayer-middleware/lib/openzeppelin-contracts/", "@openzeppelin-upgrades/=lib/eigenlayer-middleware/lib/openzeppelin-contracts-upgradeable/", + "@eigenda-contracts/=lib/eigenda/contracts" ] fs_permissions = [{ access = "read-write", path = "./" }] diff --git a/lib/eigenda b/lib/eigenda new file mode 160000 index 0000000..9c0c562 --- /dev/null +++ b/lib/eigenda @@ -0,0 +1 @@ +Subproject commit 9c0c5621b5424560d7c640e28785ef56345178d4 diff --git a/pkg/bindings/v1/CloudReportCompendium/binding.go b/pkg/bindings/v1/CloudReportCompendium/binding.go new file mode 100644 index 0000000..1f7beb7 --- /dev/null +++ b/pkg/bindings/v1/CloudReportCompendium/binding.go @@ -0,0 +1,1534 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package CloudReportCompendium + +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 +) + +// CloudReportCompendiumStorageConstructorParams is an auto generated low-level Go binding around an user-defined struct. +type CloudReportCompendiumStorageConstructorParams struct { + DelegationManager common.Address + AllocationManager common.Address + CertVerifierRouter common.Address + ComputeAVSRegistrar common.Address + ComputeOperator common.Address + ReportAttester common.Address + OperatorSetId uint32 + ReferenceProjectId string + StrategyToSlash common.Address +} + +// ICloudReportCompendiumCloudReport is an auto generated low-level Go binding around an user-defined struct. +type ICloudReportCompendiumCloudReport struct { + ProjectId string + FromTimestamp uint32 + ToTimestamp uint32 + EigendaCert []byte +} + +// ICloudReportCompendiumCloudReportSubmission is an auto generated low-level Go binding around an user-defined struct. +type ICloudReportCompendiumCloudReportSubmission struct { + SubmissionTimestamp uint32 + FromTimestamp uint32 + ToTimestamp uint32 + EigendaCertHash [20]byte +} + +// CloudReportCompendiumMetaData contains all meta data concerning the CloudReportCompendium contract. +var CloudReportCompendiumMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structCloudReportCompendiumStorage.ConstructorParams\",\"components\":[{\"name\":\"delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"certVerifierRouter\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"},{\"name\":\"computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"},{\"name\":\"computeOperator\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"},{\"name\":\"reportAttester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceProjectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"strategyToSlash\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOUD_REPORT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateReportDigestHash\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"certVerifierRouter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"latestReportSubmission\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReportSubmission\",\"components\":[{\"name\":\"submissionTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCertHash\",\"type\":\"bytes20\",\"internalType\":\"bytes20\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorSetId\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"referenceProjectIdHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportAttester\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportFreshnessThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setReportFreshnessThreshold\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashAmountTokens\",\"inputs\":[{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashAmountTokens\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyToSlash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitReport\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"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\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"reason\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"slashId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportFreshnessThresholdSet\",\"inputs\":[{\"name\":\"reportFreshnessThreshold\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportSubmitted\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashAmountTokensSet\",\"inputs\":[{\"name\":\"slashAmountTokens\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InsufficientAllocation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCertificate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProjectId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReportTimestamps\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoSlashRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportChainTimestampMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportFromFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportTooStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", +} + +// CloudReportCompendiumABI is the input ABI used to generate the binding from. +// Deprecated: Use CloudReportCompendiumMetaData.ABI instead. +var CloudReportCompendiumABI = CloudReportCompendiumMetaData.ABI + +// CloudReportCompendium is an auto generated Go binding around an Ethereum contract. +type CloudReportCompendium struct { + CloudReportCompendiumCaller // Read-only binding to the contract + CloudReportCompendiumTransactor // Write-only binding to the contract + CloudReportCompendiumFilterer // Log filterer for contract events +} + +// CloudReportCompendiumCaller is an auto generated read-only Go binding around an Ethereum contract. +type CloudReportCompendiumCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CloudReportCompendiumTransactor is an auto generated write-only Go binding around an Ethereum contract. +type CloudReportCompendiumTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CloudReportCompendiumFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type CloudReportCompendiumFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CloudReportCompendiumSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type CloudReportCompendiumSession struct { + Contract *CloudReportCompendium // 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 +} + +// CloudReportCompendiumCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type CloudReportCompendiumCallerSession struct { + Contract *CloudReportCompendiumCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// CloudReportCompendiumTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type CloudReportCompendiumTransactorSession struct { + Contract *CloudReportCompendiumTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CloudReportCompendiumRaw is an auto generated low-level Go binding around an Ethereum contract. +type CloudReportCompendiumRaw struct { + Contract *CloudReportCompendium // Generic contract binding to access the raw methods on +} + +// CloudReportCompendiumCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type CloudReportCompendiumCallerRaw struct { + Contract *CloudReportCompendiumCaller // Generic read-only contract binding to access the raw methods on +} + +// CloudReportCompendiumTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type CloudReportCompendiumTransactorRaw struct { + Contract *CloudReportCompendiumTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewCloudReportCompendium creates a new instance of CloudReportCompendium, bound to a specific deployed contract. +func NewCloudReportCompendium(address common.Address, backend bind.ContractBackend) (*CloudReportCompendium, error) { + contract, err := bindCloudReportCompendium(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CloudReportCompendium{CloudReportCompendiumCaller: CloudReportCompendiumCaller{contract: contract}, CloudReportCompendiumTransactor: CloudReportCompendiumTransactor{contract: contract}, CloudReportCompendiumFilterer: CloudReportCompendiumFilterer{contract: contract}}, nil +} + +// NewCloudReportCompendiumCaller creates a new read-only instance of CloudReportCompendium, bound to a specific deployed contract. +func NewCloudReportCompendiumCaller(address common.Address, caller bind.ContractCaller) (*CloudReportCompendiumCaller, error) { + contract, err := bindCloudReportCompendium(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CloudReportCompendiumCaller{contract: contract}, nil +} + +// NewCloudReportCompendiumTransactor creates a new write-only instance of CloudReportCompendium, bound to a specific deployed contract. +func NewCloudReportCompendiumTransactor(address common.Address, transactor bind.ContractTransactor) (*CloudReportCompendiumTransactor, error) { + contract, err := bindCloudReportCompendium(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CloudReportCompendiumTransactor{contract: contract}, nil +} + +// NewCloudReportCompendiumFilterer creates a new log filterer instance of CloudReportCompendium, bound to a specific deployed contract. +func NewCloudReportCompendiumFilterer(address common.Address, filterer bind.ContractFilterer) (*CloudReportCompendiumFilterer, error) { + contract, err := bindCloudReportCompendium(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CloudReportCompendiumFilterer{contract: contract}, nil +} + +// bindCloudReportCompendium binds a generic wrapper to an already deployed contract. +func bindCloudReportCompendium(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CloudReportCompendiumMetaData.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 (_CloudReportCompendium *CloudReportCompendiumRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CloudReportCompendium.Contract.CloudReportCompendiumCaller.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 (_CloudReportCompendium *CloudReportCompendiumRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.CloudReportCompendiumTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CloudReportCompendium *CloudReportCompendiumRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.CloudReportCompendiumTransactor.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 (_CloudReportCompendium *CloudReportCompendiumCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CloudReportCompendium.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 (_CloudReportCompendium *CloudReportCompendiumTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CloudReportCompendium *CloudReportCompendiumTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.contract.Transact(opts, method, params...) +} + +// CLOUDREPORTTYPEHASH is a free data retrieval call binding the contract method 0x593ea37d. +// +// Solidity: function CLOUD_REPORT_TYPEHASH() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) CLOUDREPORTTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "CLOUD_REPORT_TYPEHASH") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// CLOUDREPORTTYPEHASH is a free data retrieval call binding the contract method 0x593ea37d. +// +// Solidity: function CLOUD_REPORT_TYPEHASH() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumSession) CLOUDREPORTTYPEHASH() ([32]byte, error) { + return _CloudReportCompendium.Contract.CLOUDREPORTTYPEHASH(&_CloudReportCompendium.CallOpts) +} + +// CLOUDREPORTTYPEHASH is a free data retrieval call binding the contract method 0x593ea37d. +// +// Solidity: function CLOUD_REPORT_TYPEHASH() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) CLOUDREPORTTYPEHASH() ([32]byte, error) { + return _CloudReportCompendium.Contract.CLOUDREPORTTYPEHASH(&_CloudReportCompendium.CallOpts) +} + +// AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. +// +// Solidity: function allocationManager() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCaller) AllocationManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CloudReportCompendium.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 (_CloudReportCompendium *CloudReportCompendiumSession) AllocationManager() (common.Address, error) { + return _CloudReportCompendium.Contract.AllocationManager(&_CloudReportCompendium.CallOpts) +} + +// AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. +// +// Solidity: function allocationManager() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) AllocationManager() (common.Address, error) { + return _CloudReportCompendium.Contract.AllocationManager(&_CloudReportCompendium.CallOpts) +} + +// CalculateReportDigestHash is a free data retrieval call binding the contract method 0xee1d5079. +// +// Solidity: function calculateReportDigestHash((string,uint32,uint32,bytes) report) view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) CalculateReportDigestHash(opts *bind.CallOpts, report ICloudReportCompendiumCloudReport) ([32]byte, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "calculateReportDigestHash", report) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// CalculateReportDigestHash is a free data retrieval call binding the contract method 0xee1d5079. +// +// Solidity: function calculateReportDigestHash((string,uint32,uint32,bytes) report) view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumSession) CalculateReportDigestHash(report ICloudReportCompendiumCloudReport) ([32]byte, error) { + return _CloudReportCompendium.Contract.CalculateReportDigestHash(&_CloudReportCompendium.CallOpts, report) +} + +// CalculateReportDigestHash is a free data retrieval call binding the contract method 0xee1d5079. +// +// Solidity: function calculateReportDigestHash((string,uint32,uint32,bytes) report) view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) CalculateReportDigestHash(report ICloudReportCompendiumCloudReport) ([32]byte, error) { + return _CloudReportCompendium.Contract.CalculateReportDigestHash(&_CloudReportCompendium.CallOpts, report) +} + +// CertVerifierRouter is a free data retrieval call binding the contract method 0x10d36975. +// +// Solidity: function certVerifierRouter() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCaller) CertVerifierRouter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "certVerifierRouter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// CertVerifierRouter is a free data retrieval call binding the contract method 0x10d36975. +// +// Solidity: function certVerifierRouter() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumSession) CertVerifierRouter() (common.Address, error) { + return _CloudReportCompendium.Contract.CertVerifierRouter(&_CloudReportCompendium.CallOpts) +} + +// CertVerifierRouter is a free data retrieval call binding the contract method 0x10d36975. +// +// Solidity: function certVerifierRouter() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) CertVerifierRouter() (common.Address, error) { + return _CloudReportCompendium.Contract.CertVerifierRouter(&_CloudReportCompendium.CallOpts) +} + +// ComputeAVSRegistrar is a free data retrieval call binding the contract method 0xef6d92c6. +// +// Solidity: function computeAVSRegistrar() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCaller) ComputeAVSRegistrar(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "computeAVSRegistrar") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ComputeAVSRegistrar is a free data retrieval call binding the contract method 0xef6d92c6. +// +// Solidity: function computeAVSRegistrar() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumSession) ComputeAVSRegistrar() (common.Address, error) { + return _CloudReportCompendium.Contract.ComputeAVSRegistrar(&_CloudReportCompendium.CallOpts) +} + +// ComputeAVSRegistrar is a free data retrieval call binding the contract method 0xef6d92c6. +// +// Solidity: function computeAVSRegistrar() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) ComputeAVSRegistrar() (common.Address, error) { + return _CloudReportCompendium.Contract.ComputeAVSRegistrar(&_CloudReportCompendium.CallOpts) +} + +// ComputeOperator is a free data retrieval call binding the contract method 0x3fc4cbfd. +// +// Solidity: function computeOperator() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCaller) ComputeOperator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "computeOperator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ComputeOperator is a free data retrieval call binding the contract method 0x3fc4cbfd. +// +// Solidity: function computeOperator() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumSession) ComputeOperator() (common.Address, error) { + return _CloudReportCompendium.Contract.ComputeOperator(&_CloudReportCompendium.CallOpts) +} + +// ComputeOperator is a free data retrieval call binding the contract method 0x3fc4cbfd. +// +// Solidity: function computeOperator() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) ComputeOperator() (common.Address, error) { + return _CloudReportCompendium.Contract.ComputeOperator(&_CloudReportCompendium.CallOpts) +} + +// DelegationManager is a free data retrieval call binding the contract method 0xea4d3c9b. +// +// Solidity: function delegationManager() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCaller) DelegationManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "delegationManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DelegationManager is a free data retrieval call binding the contract method 0xea4d3c9b. +// +// Solidity: function delegationManager() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumSession) DelegationManager() (common.Address, error) { + return _CloudReportCompendium.Contract.DelegationManager(&_CloudReportCompendium.CallOpts) +} + +// DelegationManager is a free data retrieval call binding the contract method 0xea4d3c9b. +// +// Solidity: function delegationManager() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) DelegationManager() (common.Address, error) { + return _CloudReportCompendium.Contract.DelegationManager(&_CloudReportCompendium.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) DomainSeparator(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "domainSeparator") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumSession) DomainSeparator() ([32]byte, error) { + return _CloudReportCompendium.Contract.DomainSeparator(&_CloudReportCompendium.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) DomainSeparator() ([32]byte, error) { + return _CloudReportCompendium.Contract.DomainSeparator(&_CloudReportCompendium.CallOpts) +} + +// LatestReportSubmission is a free data retrieval call binding the contract method 0x371517a4. +// +// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +func (_CloudReportCompendium *CloudReportCompendiumCaller) LatestReportSubmission(opts *bind.CallOpts) (ICloudReportCompendiumCloudReportSubmission, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "latestReportSubmission") + + if err != nil { + return *new(ICloudReportCompendiumCloudReportSubmission), err + } + + out0 := *abi.ConvertType(out[0], new(ICloudReportCompendiumCloudReportSubmission)).(*ICloudReportCompendiumCloudReportSubmission) + + return out0, err + +} + +// LatestReportSubmission is a free data retrieval call binding the contract method 0x371517a4. +// +// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +func (_CloudReportCompendium *CloudReportCompendiumSession) LatestReportSubmission() (ICloudReportCompendiumCloudReportSubmission, error) { + return _CloudReportCompendium.Contract.LatestReportSubmission(&_CloudReportCompendium.CallOpts) +} + +// LatestReportSubmission is a free data retrieval call binding the contract method 0x371517a4. +// +// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) LatestReportSubmission() (ICloudReportCompendiumCloudReportSubmission, error) { + return _CloudReportCompendium.Contract.LatestReportSubmission(&_CloudReportCompendium.CallOpts) +} + +// OperatorSetId is a free data retrieval call binding the contract method 0xe1ebfc37. +// +// Solidity: function operatorSetId() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) OperatorSetId(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "operatorSetId") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// OperatorSetId is a free data retrieval call binding the contract method 0xe1ebfc37. +// +// Solidity: function operatorSetId() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumSession) OperatorSetId() (uint32, error) { + return _CloudReportCompendium.Contract.OperatorSetId(&_CloudReportCompendium.CallOpts) +} + +// OperatorSetId is a free data retrieval call binding the contract method 0xe1ebfc37. +// +// Solidity: function operatorSetId() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) OperatorSetId() (uint32, error) { + return _CloudReportCompendium.Contract.OperatorSetId(&_CloudReportCompendium.CallOpts) +} + +// PermissionController is a free data retrieval call binding the contract method 0x4657e26a. +// +// Solidity: function permissionController() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCaller) PermissionController(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "permissionController") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PermissionController is a free data retrieval call binding the contract method 0x4657e26a. +// +// Solidity: function permissionController() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumSession) PermissionController() (common.Address, error) { + return _CloudReportCompendium.Contract.PermissionController(&_CloudReportCompendium.CallOpts) +} + +// PermissionController is a free data retrieval call binding the contract method 0x4657e26a. +// +// Solidity: function permissionController() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) PermissionController() (common.Address, error) { + return _CloudReportCompendium.Contract.PermissionController(&_CloudReportCompendium.CallOpts) +} + +// ReferenceProjectIdHash is a free data retrieval call binding the contract method 0xf2e9ef5d. +// +// Solidity: function referenceProjectIdHash() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) ReferenceProjectIdHash(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "referenceProjectIdHash") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ReferenceProjectIdHash is a free data retrieval call binding the contract method 0xf2e9ef5d. +// +// Solidity: function referenceProjectIdHash() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumSession) ReferenceProjectIdHash() ([32]byte, error) { + return _CloudReportCompendium.Contract.ReferenceProjectIdHash(&_CloudReportCompendium.CallOpts) +} + +// ReferenceProjectIdHash is a free data retrieval call binding the contract method 0xf2e9ef5d. +// +// Solidity: function referenceProjectIdHash() view returns(bytes32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) ReferenceProjectIdHash() ([32]byte, error) { + return _CloudReportCompendium.Contract.ReferenceProjectIdHash(&_CloudReportCompendium.CallOpts) +} + +// ReportAttester is a free data retrieval call binding the contract method 0x285c6e4f. +// +// Solidity: function reportAttester() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCaller) ReportAttester(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "reportAttester") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ReportAttester is a free data retrieval call binding the contract method 0x285c6e4f. +// +// Solidity: function reportAttester() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumSession) ReportAttester() (common.Address, error) { + return _CloudReportCompendium.Contract.ReportAttester(&_CloudReportCompendium.CallOpts) +} + +// ReportAttester is a free data retrieval call binding the contract method 0x285c6e4f. +// +// Solidity: function reportAttester() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) ReportAttester() (common.Address, error) { + return _CloudReportCompendium.Contract.ReportAttester(&_CloudReportCompendium.CallOpts) +} + +// ReportFreshnessThreshold is a free data retrieval call binding the contract method 0x5bc35ef6. +// +// Solidity: function reportFreshnessThreshold() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) ReportFreshnessThreshold(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "reportFreshnessThreshold") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// ReportFreshnessThreshold is a free data retrieval call binding the contract method 0x5bc35ef6. +// +// Solidity: function reportFreshnessThreshold() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumSession) ReportFreshnessThreshold() (uint32, error) { + return _CloudReportCompendium.Contract.ReportFreshnessThreshold(&_CloudReportCompendium.CallOpts) +} + +// ReportFreshnessThreshold is a free data retrieval call binding the contract method 0x5bc35ef6. +// +// Solidity: function reportFreshnessThreshold() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) ReportFreshnessThreshold() (uint32, error) { + return _CloudReportCompendium.Contract.ReportFreshnessThreshold(&_CloudReportCompendium.CallOpts) +} + +// SlashAmountTokens is a free data retrieval call binding the contract method 0x7d3ceb34. +// +// Solidity: function slashAmountTokens() view returns(uint256) +func (_CloudReportCompendium *CloudReportCompendiumCaller) SlashAmountTokens(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "slashAmountTokens") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SlashAmountTokens is a free data retrieval call binding the contract method 0x7d3ceb34. +// +// Solidity: function slashAmountTokens() view returns(uint256) +func (_CloudReportCompendium *CloudReportCompendiumSession) SlashAmountTokens() (*big.Int, error) { + return _CloudReportCompendium.Contract.SlashAmountTokens(&_CloudReportCompendium.CallOpts) +} + +// SlashAmountTokens is a free data retrieval call binding the contract method 0x7d3ceb34. +// +// Solidity: function slashAmountTokens() view returns(uint256) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) SlashAmountTokens() (*big.Int, error) { + return _CloudReportCompendium.Contract.SlashAmountTokens(&_CloudReportCompendium.CallOpts) +} + +// StrategyToSlash is a free data retrieval call binding the contract method 0x5ac080f1. +// +// Solidity: function strategyToSlash() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCaller) StrategyToSlash(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "strategyToSlash") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// StrategyToSlash is a free data retrieval call binding the contract method 0x5ac080f1. +// +// Solidity: function strategyToSlash() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumSession) StrategyToSlash() (common.Address, error) { + return _CloudReportCompendium.Contract.StrategyToSlash(&_CloudReportCompendium.CallOpts) +} + +// StrategyToSlash is a free data retrieval call binding the contract method 0x5ac080f1. +// +// Solidity: function strategyToSlash() view returns(address) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) StrategyToSlash() (common.Address, error) { + return _CloudReportCompendium.Contract.StrategyToSlash(&_CloudReportCompendium.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_CloudReportCompendium *CloudReportCompendiumCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_CloudReportCompendium *CloudReportCompendiumSession) Version() (string, error) { + return _CloudReportCompendium.Contract.Version(&_CloudReportCompendium.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) Version() (string, error) { + return _CloudReportCompendium.Contract.Version(&_CloudReportCompendium.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x282558d9. +// +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactor) Initialize(opts *bind.TransactOpts, _reportFreshnessThreshold uint32, _slashAmountTokens *big.Int) (*types.Transaction, error) { + return _CloudReportCompendium.contract.Transact(opts, "initialize", _reportFreshnessThreshold, _slashAmountTokens) +} + +// Initialize is a paid mutator transaction binding the contract method 0x282558d9. +// +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() +func (_CloudReportCompendium *CloudReportCompendiumSession) Initialize(_reportFreshnessThreshold uint32, _slashAmountTokens *big.Int) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.Initialize(&_CloudReportCompendium.TransactOpts, _reportFreshnessThreshold, _slashAmountTokens) +} + +// Initialize is a paid mutator transaction binding the contract method 0x282558d9. +// +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactorSession) Initialize(_reportFreshnessThreshold uint32, _slashAmountTokens *big.Int) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.Initialize(&_CloudReportCompendium.TransactOpts, _reportFreshnessThreshold, _slashAmountTokens) +} + +// SetReportFreshnessThreshold is a paid mutator transaction binding the contract method 0xe32c101d. +// +// Solidity: function setReportFreshnessThreshold(uint32 _reportFreshnessThreshold) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactor) SetReportFreshnessThreshold(opts *bind.TransactOpts, _reportFreshnessThreshold uint32) (*types.Transaction, error) { + return _CloudReportCompendium.contract.Transact(opts, "setReportFreshnessThreshold", _reportFreshnessThreshold) +} + +// SetReportFreshnessThreshold is a paid mutator transaction binding the contract method 0xe32c101d. +// +// Solidity: function setReportFreshnessThreshold(uint32 _reportFreshnessThreshold) returns() +func (_CloudReportCompendium *CloudReportCompendiumSession) SetReportFreshnessThreshold(_reportFreshnessThreshold uint32) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.SetReportFreshnessThreshold(&_CloudReportCompendium.TransactOpts, _reportFreshnessThreshold) +} + +// SetReportFreshnessThreshold is a paid mutator transaction binding the contract method 0xe32c101d. +// +// Solidity: function setReportFreshnessThreshold(uint32 _reportFreshnessThreshold) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactorSession) SetReportFreshnessThreshold(_reportFreshnessThreshold uint32) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.SetReportFreshnessThreshold(&_CloudReportCompendium.TransactOpts, _reportFreshnessThreshold) +} + +// SetSlashAmountTokens is a paid mutator transaction binding the contract method 0x2bef26c9. +// +// Solidity: function setSlashAmountTokens(uint256 _slashAmountTokens) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactor) SetSlashAmountTokens(opts *bind.TransactOpts, _slashAmountTokens *big.Int) (*types.Transaction, error) { + return _CloudReportCompendium.contract.Transact(opts, "setSlashAmountTokens", _slashAmountTokens) +} + +// SetSlashAmountTokens is a paid mutator transaction binding the contract method 0x2bef26c9. +// +// Solidity: function setSlashAmountTokens(uint256 _slashAmountTokens) returns() +func (_CloudReportCompendium *CloudReportCompendiumSession) SetSlashAmountTokens(_slashAmountTokens *big.Int) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.SetSlashAmountTokens(&_CloudReportCompendium.TransactOpts, _slashAmountTokens) +} + +// SetSlashAmountTokens is a paid mutator transaction binding the contract method 0x2bef26c9. +// +// Solidity: function setSlashAmountTokens(uint256 _slashAmountTokens) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactorSession) SetSlashAmountTokens(_slashAmountTokens *big.Int) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.SetSlashAmountTokens(&_CloudReportCompendium.TransactOpts, _slashAmountTokens) +} + +// Slash is a paid mutator transaction binding the contract method 0x5e47655f. +// +// Solidity: function slash(bytes eigendaCert) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactor) Slash(opts *bind.TransactOpts, eigendaCert []byte) (*types.Transaction, error) { + return _CloudReportCompendium.contract.Transact(opts, "slash", eigendaCert) +} + +// Slash is a paid mutator transaction binding the contract method 0x5e47655f. +// +// Solidity: function slash(bytes eigendaCert) returns() +func (_CloudReportCompendium *CloudReportCompendiumSession) Slash(eigendaCert []byte) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.Slash(&_CloudReportCompendium.TransactOpts, eigendaCert) +} + +// Slash is a paid mutator transaction binding the contract method 0x5e47655f. +// +// Solidity: function slash(bytes eigendaCert) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactorSession) Slash(eigendaCert []byte) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.Slash(&_CloudReportCompendium.TransactOpts, eigendaCert) +} + +// SubmitReport is a paid mutator transaction binding the contract method 0x35ce650d. +// +// Solidity: function submitReport((string,uint32,uint32,bytes) report, bytes signature) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactor) SubmitReport(opts *bind.TransactOpts, report ICloudReportCompendiumCloudReport, signature []byte) (*types.Transaction, error) { + return _CloudReportCompendium.contract.Transact(opts, "submitReport", report, signature) +} + +// SubmitReport is a paid mutator transaction binding the contract method 0x35ce650d. +// +// Solidity: function submitReport((string,uint32,uint32,bytes) report, bytes signature) returns() +func (_CloudReportCompendium *CloudReportCompendiumSession) SubmitReport(report ICloudReportCompendiumCloudReport, signature []byte) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.SubmitReport(&_CloudReportCompendium.TransactOpts, report, signature) +} + +// SubmitReport is a paid mutator transaction binding the contract method 0x35ce650d. +// +// Solidity: function submitReport((string,uint32,uint32,bytes) report, bytes signature) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactorSession) SubmitReport(report ICloudReportCompendiumCloudReport, signature []byte) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.SubmitReport(&_CloudReportCompendium.TransactOpts, report, signature) +} + +// CloudReportCompendiumInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the CloudReportCompendium contract. +type CloudReportCompendiumInitializedIterator struct { + Event *CloudReportCompendiumInitialized // 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 *CloudReportCompendiumInitializedIterator) 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(CloudReportCompendiumInitialized) + 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(CloudReportCompendiumInitialized) + 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 *CloudReportCompendiumInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CloudReportCompendiumInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CloudReportCompendiumInitialized represents a Initialized event raised by the CloudReportCompendium contract. +type CloudReportCompendiumInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) FilterInitialized(opts *bind.FilterOpts) (*CloudReportCompendiumInitializedIterator, error) { + + logs, sub, err := _CloudReportCompendium.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &CloudReportCompendiumInitializedIterator{contract: _CloudReportCompendium.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *CloudReportCompendiumInitialized) (event.Subscription, error) { + + logs, sub, err := _CloudReportCompendium.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CloudReportCompendiumInitialized) + if err := _CloudReportCompendium.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) ParseInitialized(log types.Log) (*CloudReportCompendiumInitialized, error) { + event := new(CloudReportCompendiumInitialized) + if err := _CloudReportCompendium.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CloudReportCompendiumOperatorSlashedIterator is returned from FilterOperatorSlashed and is used to iterate over the raw logs and unpacked data for OperatorSlashed events raised by the CloudReportCompendium contract. +type CloudReportCompendiumOperatorSlashedIterator struct { + Event *CloudReportCompendiumOperatorSlashed // 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 *CloudReportCompendiumOperatorSlashedIterator) 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(CloudReportCompendiumOperatorSlashed) + 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(CloudReportCompendiumOperatorSlashed) + 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 *CloudReportCompendiumOperatorSlashedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CloudReportCompendiumOperatorSlashedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CloudReportCompendiumOperatorSlashed represents a OperatorSlashed event raised by the CloudReportCompendium contract. +type CloudReportCompendiumOperatorSlashed struct { + Operator common.Address + OperatorSetId uint32 + Reason string + SlashId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorSlashed is a free log retrieval operation binding the contract event 0xb192994ade0c76d20097267fa71ca8d1e9848cf6cd9c10c961dc607280c698ea. +// +// Solidity: event OperatorSlashed(address indexed operator, uint32 indexed operatorSetId, string reason, uint256 slashId) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) FilterOperatorSlashed(opts *bind.FilterOpts, operator []common.Address, operatorSetId []uint32) (*CloudReportCompendiumOperatorSlashedIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + var operatorSetIdRule []interface{} + for _, operatorSetIdItem := range operatorSetId { + operatorSetIdRule = append(operatorSetIdRule, operatorSetIdItem) + } + + logs, sub, err := _CloudReportCompendium.contract.FilterLogs(opts, "OperatorSlashed", operatorRule, operatorSetIdRule) + if err != nil { + return nil, err + } + return &CloudReportCompendiumOperatorSlashedIterator{contract: _CloudReportCompendium.contract, event: "OperatorSlashed", logs: logs, sub: sub}, nil +} + +// WatchOperatorSlashed is a free log subscription operation binding the contract event 0xb192994ade0c76d20097267fa71ca8d1e9848cf6cd9c10c961dc607280c698ea. +// +// Solidity: event OperatorSlashed(address indexed operator, uint32 indexed operatorSetId, string reason, uint256 slashId) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) WatchOperatorSlashed(opts *bind.WatchOpts, sink chan<- *CloudReportCompendiumOperatorSlashed, operator []common.Address, operatorSetId []uint32) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + var operatorSetIdRule []interface{} + for _, operatorSetIdItem := range operatorSetId { + operatorSetIdRule = append(operatorSetIdRule, operatorSetIdItem) + } + + logs, sub, err := _CloudReportCompendium.contract.WatchLogs(opts, "OperatorSlashed", operatorRule, operatorSetIdRule) + 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(CloudReportCompendiumOperatorSlashed) + if err := _CloudReportCompendium.contract.UnpackLog(event, "OperatorSlashed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOperatorSlashed is a log parse operation binding the contract event 0xb192994ade0c76d20097267fa71ca8d1e9848cf6cd9c10c961dc607280c698ea. +// +// Solidity: event OperatorSlashed(address indexed operator, uint32 indexed operatorSetId, string reason, uint256 slashId) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) ParseOperatorSlashed(log types.Log) (*CloudReportCompendiumOperatorSlashed, error) { + event := new(CloudReportCompendiumOperatorSlashed) + if err := _CloudReportCompendium.contract.UnpackLog(event, "OperatorSlashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CloudReportCompendiumReportFreshnessThresholdSetIterator is returned from FilterReportFreshnessThresholdSet and is used to iterate over the raw logs and unpacked data for ReportFreshnessThresholdSet events raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportFreshnessThresholdSetIterator struct { + Event *CloudReportCompendiumReportFreshnessThresholdSet // 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 *CloudReportCompendiumReportFreshnessThresholdSetIterator) 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(CloudReportCompendiumReportFreshnessThresholdSet) + 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(CloudReportCompendiumReportFreshnessThresholdSet) + 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 *CloudReportCompendiumReportFreshnessThresholdSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CloudReportCompendiumReportFreshnessThresholdSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CloudReportCompendiumReportFreshnessThresholdSet represents a ReportFreshnessThresholdSet event raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportFreshnessThresholdSet struct { + ReportFreshnessThreshold uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReportFreshnessThresholdSet is a free log retrieval operation binding the contract event 0xc18f06def690706eb30b65d846e570ddc356ce32f27daa0b926c7f36e0917947. +// +// Solidity: event ReportFreshnessThresholdSet(uint32 reportFreshnessThreshold) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) FilterReportFreshnessThresholdSet(opts *bind.FilterOpts) (*CloudReportCompendiumReportFreshnessThresholdSetIterator, error) { + + logs, sub, err := _CloudReportCompendium.contract.FilterLogs(opts, "ReportFreshnessThresholdSet") + if err != nil { + return nil, err + } + return &CloudReportCompendiumReportFreshnessThresholdSetIterator{contract: _CloudReportCompendium.contract, event: "ReportFreshnessThresholdSet", logs: logs, sub: sub}, nil +} + +// WatchReportFreshnessThresholdSet is a free log subscription operation binding the contract event 0xc18f06def690706eb30b65d846e570ddc356ce32f27daa0b926c7f36e0917947. +// +// Solidity: event ReportFreshnessThresholdSet(uint32 reportFreshnessThreshold) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) WatchReportFreshnessThresholdSet(opts *bind.WatchOpts, sink chan<- *CloudReportCompendiumReportFreshnessThresholdSet) (event.Subscription, error) { + + logs, sub, err := _CloudReportCompendium.contract.WatchLogs(opts, "ReportFreshnessThresholdSet") + 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(CloudReportCompendiumReportFreshnessThresholdSet) + if err := _CloudReportCompendium.contract.UnpackLog(event, "ReportFreshnessThresholdSet", 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 +} + +// ParseReportFreshnessThresholdSet is a log parse operation binding the contract event 0xc18f06def690706eb30b65d846e570ddc356ce32f27daa0b926c7f36e0917947. +// +// Solidity: event ReportFreshnessThresholdSet(uint32 reportFreshnessThreshold) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) ParseReportFreshnessThresholdSet(log types.Log) (*CloudReportCompendiumReportFreshnessThresholdSet, error) { + event := new(CloudReportCompendiumReportFreshnessThresholdSet) + if err := _CloudReportCompendium.contract.UnpackLog(event, "ReportFreshnessThresholdSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CloudReportCompendiumReportSubmittedIterator is returned from FilterReportSubmitted and is used to iterate over the raw logs and unpacked data for ReportSubmitted events raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportSubmittedIterator struct { + Event *CloudReportCompendiumReportSubmitted // 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 *CloudReportCompendiumReportSubmittedIterator) 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(CloudReportCompendiumReportSubmitted) + 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(CloudReportCompendiumReportSubmitted) + 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 *CloudReportCompendiumReportSubmittedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CloudReportCompendiumReportSubmittedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CloudReportCompendiumReportSubmitted represents a ReportSubmitted event raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportSubmitted struct { + Report ICloudReportCompendiumCloudReport + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReportSubmitted is a free log retrieval operation binding the contract event 0x120822bef9c8cbefdd48190a56b37379ededb9577ec38b15de29f5a89253167c. +// +// Solidity: event ReportSubmitted((string,uint32,uint32,bytes) report, uint256 timestamp) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) FilterReportSubmitted(opts *bind.FilterOpts) (*CloudReportCompendiumReportSubmittedIterator, error) { + + logs, sub, err := _CloudReportCompendium.contract.FilterLogs(opts, "ReportSubmitted") + if err != nil { + return nil, err + } + return &CloudReportCompendiumReportSubmittedIterator{contract: _CloudReportCompendium.contract, event: "ReportSubmitted", logs: logs, sub: sub}, nil +} + +// WatchReportSubmitted is a free log subscription operation binding the contract event 0x120822bef9c8cbefdd48190a56b37379ededb9577ec38b15de29f5a89253167c. +// +// Solidity: event ReportSubmitted((string,uint32,uint32,bytes) report, uint256 timestamp) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) WatchReportSubmitted(opts *bind.WatchOpts, sink chan<- *CloudReportCompendiumReportSubmitted) (event.Subscription, error) { + + logs, sub, err := _CloudReportCompendium.contract.WatchLogs(opts, "ReportSubmitted") + 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(CloudReportCompendiumReportSubmitted) + if err := _CloudReportCompendium.contract.UnpackLog(event, "ReportSubmitted", 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 +} + +// ParseReportSubmitted is a log parse operation binding the contract event 0x120822bef9c8cbefdd48190a56b37379ededb9577ec38b15de29f5a89253167c. +// +// Solidity: event ReportSubmitted((string,uint32,uint32,bytes) report, uint256 timestamp) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) ParseReportSubmitted(log types.Log) (*CloudReportCompendiumReportSubmitted, error) { + event := new(CloudReportCompendiumReportSubmitted) + if err := _CloudReportCompendium.contract.UnpackLog(event, "ReportSubmitted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// CloudReportCompendiumSlashAmountTokensSetIterator is returned from FilterSlashAmountTokensSet and is used to iterate over the raw logs and unpacked data for SlashAmountTokensSet events raised by the CloudReportCompendium contract. +type CloudReportCompendiumSlashAmountTokensSetIterator struct { + Event *CloudReportCompendiumSlashAmountTokensSet // 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 *CloudReportCompendiumSlashAmountTokensSetIterator) 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(CloudReportCompendiumSlashAmountTokensSet) + 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(CloudReportCompendiumSlashAmountTokensSet) + 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 *CloudReportCompendiumSlashAmountTokensSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CloudReportCompendiumSlashAmountTokensSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CloudReportCompendiumSlashAmountTokensSet represents a SlashAmountTokensSet event raised by the CloudReportCompendium contract. +type CloudReportCompendiumSlashAmountTokensSet struct { + SlashAmountTokens *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSlashAmountTokensSet is a free log retrieval operation binding the contract event 0xbc4559d0d67e98a959def403cabda2f31d878c322d0233e4280a910698b20a93. +// +// Solidity: event SlashAmountTokensSet(uint256 slashAmountTokens) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) FilterSlashAmountTokensSet(opts *bind.FilterOpts) (*CloudReportCompendiumSlashAmountTokensSetIterator, error) { + + logs, sub, err := _CloudReportCompendium.contract.FilterLogs(opts, "SlashAmountTokensSet") + if err != nil { + return nil, err + } + return &CloudReportCompendiumSlashAmountTokensSetIterator{contract: _CloudReportCompendium.contract, event: "SlashAmountTokensSet", logs: logs, sub: sub}, nil +} + +// WatchSlashAmountTokensSet is a free log subscription operation binding the contract event 0xbc4559d0d67e98a959def403cabda2f31d878c322d0233e4280a910698b20a93. +// +// Solidity: event SlashAmountTokensSet(uint256 slashAmountTokens) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) WatchSlashAmountTokensSet(opts *bind.WatchOpts, sink chan<- *CloudReportCompendiumSlashAmountTokensSet) (event.Subscription, error) { + + logs, sub, err := _CloudReportCompendium.contract.WatchLogs(opts, "SlashAmountTokensSet") + 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(CloudReportCompendiumSlashAmountTokensSet) + if err := _CloudReportCompendium.contract.UnpackLog(event, "SlashAmountTokensSet", 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 +} + +// ParseSlashAmountTokensSet is a log parse operation binding the contract event 0xbc4559d0d67e98a959def403cabda2f31d878c322d0233e4280a910698b20a93. +// +// Solidity: event SlashAmountTokensSet(uint256 slashAmountTokens) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) ParseSlashAmountTokensSet(log types.Log) (*CloudReportCompendiumSlashAmountTokensSet, error) { + event := new(CloudReportCompendiumSlashAmountTokensSet) + if err := _CloudReportCompendium.contract.UnpackLog(event, "SlashAmountTokensSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/bindings/v2/CloudReportCompendium/binding.go b/pkg/bindings/v2/CloudReportCompendium/binding.go new file mode 100644 index 0000000..f13d848 --- /dev/null +++ b/pkg/bindings/v2/CloudReportCompendium/binding.go @@ -0,0 +1,1351 @@ +// Code generated via abigen V2 - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package CloudReportCompendium + +import ( + "bytes" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = bytes.Equal + _ = errors.New + _ = big.NewInt + _ = common.Big1 + _ = types.BloomLookup + _ = abi.ConvertType +) + +// CloudReportCompendiumStorageConstructorParams is an auto generated low-level Go binding around an user-defined struct. +type CloudReportCompendiumStorageConstructorParams struct { + DelegationManager common.Address + AllocationManager common.Address + CertVerifierRouter common.Address + ComputeAVSRegistrar common.Address + ComputeOperator common.Address + ReportAttester common.Address + OperatorSetId uint32 + ReferenceProjectId string + StrategyToSlash common.Address +} + +// ICloudReportCompendiumCloudReport is an auto generated low-level Go binding around an user-defined struct. +type ICloudReportCompendiumCloudReport struct { + ProjectId string + FromTimestamp uint32 + ToTimestamp uint32 + EigendaCert []byte +} + +// ICloudReportCompendiumCloudReportSubmission is an auto generated low-level Go binding around an user-defined struct. +type ICloudReportCompendiumCloudReportSubmission struct { + SubmissionTimestamp uint32 + FromTimestamp uint32 + ToTimestamp uint32 + EigendaCertHash [20]byte +} + +// CloudReportCompendiumMetaData contains all meta data concerning the CloudReportCompendium contract. +var CloudReportCompendiumMetaData = bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structCloudReportCompendiumStorage.ConstructorParams\",\"components\":[{\"name\":\"delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"certVerifierRouter\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"},{\"name\":\"computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"},{\"name\":\"computeOperator\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"},{\"name\":\"reportAttester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceProjectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"strategyToSlash\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOUD_REPORT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateReportDigestHash\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"certVerifierRouter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"latestReportSubmission\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReportSubmission\",\"components\":[{\"name\":\"submissionTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCertHash\",\"type\":\"bytes20\",\"internalType\":\"bytes20\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorSetId\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"referenceProjectIdHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportAttester\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportFreshnessThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setReportFreshnessThreshold\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashAmountTokens\",\"inputs\":[{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashAmountTokens\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyToSlash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitReport\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"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\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"reason\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"slashId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportFreshnessThresholdSet\",\"inputs\":[{\"name\":\"reportFreshnessThreshold\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportSubmitted\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashAmountTokensSet\",\"inputs\":[{\"name\":\"slashAmountTokens\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InsufficientAllocation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCertificate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProjectId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReportTimestamps\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoSlashRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportChainTimestampMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportFromFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportTooStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", + ID: "CloudReportCompendium", +} + +// CloudReportCompendium is an auto generated Go binding around an Ethereum contract. +type CloudReportCompendium struct { + abi abi.ABI +} + +// NewCloudReportCompendium creates a new instance of CloudReportCompendium. +func NewCloudReportCompendium() *CloudReportCompendium { + parsed, err := CloudReportCompendiumMetaData.ParseABI() + if err != nil { + panic(errors.New("invalid ABI: " + err.Error())) + } + return &CloudReportCompendium{abi: *parsed} +} + +// Instance creates a wrapper for a deployed contract instance at the given address. +// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. +func (c *CloudReportCompendium) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { + return bind.NewBoundContract(addr, c.abi, backend, backend, backend) +} + +// PackConstructor is the Go binding used to pack the parameters required for +// contract deployment. +// +// Solidity: constructor(string _version, address _permissionController, (address,address,address,address,address,address,uint32,string,address) params) returns() +func (cloudReportCompendium *CloudReportCompendium) PackConstructor(_version string, _permissionController common.Address, params CloudReportCompendiumStorageConstructorParams) []byte { + enc, err := cloudReportCompendium.abi.Pack("", _version, _permissionController, params) + if err != nil { + panic(err) + } + return enc +} + +// PackCLOUDREPORTTYPEHASH is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x593ea37d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function CLOUD_REPORT_TYPEHASH() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) PackCLOUDREPORTTYPEHASH() []byte { + enc, err := cloudReportCompendium.abi.Pack("CLOUD_REPORT_TYPEHASH") + if err != nil { + panic(err) + } + return enc +} + +// TryPackCLOUDREPORTTYPEHASH is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x593ea37d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function CLOUD_REPORT_TYPEHASH() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) TryPackCLOUDREPORTTYPEHASH() ([]byte, error) { + return cloudReportCompendium.abi.Pack("CLOUD_REPORT_TYPEHASH") +} + +// UnpackCLOUDREPORTTYPEHASH is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x593ea37d. +// +// Solidity: function CLOUD_REPORT_TYPEHASH() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) UnpackCLOUDREPORTTYPEHASH(data []byte) ([32]byte, error) { + out, err := cloudReportCompendium.abi.Unpack("CLOUD_REPORT_TYPEHASH", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackAllocationManager is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xca8aa7c7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function allocationManager() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) PackAllocationManager() []byte { + enc, err := cloudReportCompendium.abi.Pack("allocationManager") + if err != nil { + panic(err) + } + return enc +} + +// TryPackAllocationManager is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xca8aa7c7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function allocationManager() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) TryPackAllocationManager() ([]byte, error) { + return cloudReportCompendium.abi.Pack("allocationManager") +} + +// UnpackAllocationManager is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xca8aa7c7. +// +// Solidity: function allocationManager() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) UnpackAllocationManager(data []byte) (common.Address, error) { + out, err := cloudReportCompendium.abi.Unpack("allocationManager", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackCalculateReportDigestHash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xee1d5079. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function calculateReportDigestHash((string,uint32,uint32,bytes) report) view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) PackCalculateReportDigestHash(report ICloudReportCompendiumCloudReport) []byte { + enc, err := cloudReportCompendium.abi.Pack("calculateReportDigestHash", report) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCalculateReportDigestHash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xee1d5079. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function calculateReportDigestHash((string,uint32,uint32,bytes) report) view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) TryPackCalculateReportDigestHash(report ICloudReportCompendiumCloudReport) ([]byte, error) { + return cloudReportCompendium.abi.Pack("calculateReportDigestHash", report) +} + +// UnpackCalculateReportDigestHash is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xee1d5079. +// +// Solidity: function calculateReportDigestHash((string,uint32,uint32,bytes) report) view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) UnpackCalculateReportDigestHash(data []byte) ([32]byte, error) { + out, err := cloudReportCompendium.abi.Unpack("calculateReportDigestHash", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackCertVerifierRouter is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x10d36975. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function certVerifierRouter() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) PackCertVerifierRouter() []byte { + enc, err := cloudReportCompendium.abi.Pack("certVerifierRouter") + if err != nil { + panic(err) + } + return enc +} + +// TryPackCertVerifierRouter is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x10d36975. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function certVerifierRouter() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) TryPackCertVerifierRouter() ([]byte, error) { + return cloudReportCompendium.abi.Pack("certVerifierRouter") +} + +// UnpackCertVerifierRouter is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x10d36975. +// +// Solidity: function certVerifierRouter() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) UnpackCertVerifierRouter(data []byte) (common.Address, error) { + out, err := cloudReportCompendium.abi.Unpack("certVerifierRouter", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackComputeAVSRegistrar is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xef6d92c6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function computeAVSRegistrar() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) PackComputeAVSRegistrar() []byte { + enc, err := cloudReportCompendium.abi.Pack("computeAVSRegistrar") + if err != nil { + panic(err) + } + return enc +} + +// TryPackComputeAVSRegistrar is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xef6d92c6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function computeAVSRegistrar() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) TryPackComputeAVSRegistrar() ([]byte, error) { + return cloudReportCompendium.abi.Pack("computeAVSRegistrar") +} + +// UnpackComputeAVSRegistrar is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xef6d92c6. +// +// Solidity: function computeAVSRegistrar() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) UnpackComputeAVSRegistrar(data []byte) (common.Address, error) { + out, err := cloudReportCompendium.abi.Unpack("computeAVSRegistrar", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackComputeOperator is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3fc4cbfd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function computeOperator() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) PackComputeOperator() []byte { + enc, err := cloudReportCompendium.abi.Pack("computeOperator") + if err != nil { + panic(err) + } + return enc +} + +// TryPackComputeOperator is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3fc4cbfd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function computeOperator() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) TryPackComputeOperator() ([]byte, error) { + return cloudReportCompendium.abi.Pack("computeOperator") +} + +// UnpackComputeOperator is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x3fc4cbfd. +// +// Solidity: function computeOperator() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) UnpackComputeOperator(data []byte) (common.Address, error) { + out, err := cloudReportCompendium.abi.Unpack("computeOperator", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackDelegationManager is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xea4d3c9b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function delegationManager() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) PackDelegationManager() []byte { + enc, err := cloudReportCompendium.abi.Pack("delegationManager") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDelegationManager is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xea4d3c9b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function delegationManager() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) TryPackDelegationManager() ([]byte, error) { + return cloudReportCompendium.abi.Pack("delegationManager") +} + +// UnpackDelegationManager is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xea4d3c9b. +// +// Solidity: function delegationManager() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) UnpackDelegationManager(data []byte) (common.Address, error) { + out, err := cloudReportCompendium.abi.Unpack("delegationManager", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackDomainSeparator is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf698da25. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) PackDomainSeparator() []byte { + enc, err := cloudReportCompendium.abi.Pack("domainSeparator") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDomainSeparator is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf698da25. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) TryPackDomainSeparator() ([]byte, error) { + return cloudReportCompendium.abi.Pack("domainSeparator") +} + +// UnpackDomainSeparator is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) UnpackDomainSeparator(data []byte) ([32]byte, error) { + out, err := cloudReportCompendium.abi.Unpack("domainSeparator", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282558d9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() +func (cloudReportCompendium *CloudReportCompendium) PackInitialize(reportFreshnessThreshold uint32, slashAmountTokens *big.Int) []byte { + enc, err := cloudReportCompendium.abi.Pack("initialize", reportFreshnessThreshold, slashAmountTokens) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282558d9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() +func (cloudReportCompendium *CloudReportCompendium) TryPackInitialize(reportFreshnessThreshold uint32, slashAmountTokens *big.Int) ([]byte, error) { + return cloudReportCompendium.abi.Pack("initialize", reportFreshnessThreshold, slashAmountTokens) +} + +// PackLatestReportSubmission is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x371517a4. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +func (cloudReportCompendium *CloudReportCompendium) PackLatestReportSubmission() []byte { + enc, err := cloudReportCompendium.abi.Pack("latestReportSubmission") + if err != nil { + panic(err) + } + return enc +} + +// TryPackLatestReportSubmission is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x371517a4. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +func (cloudReportCompendium *CloudReportCompendium) TryPackLatestReportSubmission() ([]byte, error) { + return cloudReportCompendium.abi.Pack("latestReportSubmission") +} + +// UnpackLatestReportSubmission is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x371517a4. +// +// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +func (cloudReportCompendium *CloudReportCompendium) UnpackLatestReportSubmission(data []byte) (ICloudReportCompendiumCloudReportSubmission, error) { + out, err := cloudReportCompendium.abi.Unpack("latestReportSubmission", data) + if err != nil { + return *new(ICloudReportCompendiumCloudReportSubmission), err + } + out0 := *abi.ConvertType(out[0], new(ICloudReportCompendiumCloudReportSubmission)).(*ICloudReportCompendiumCloudReportSubmission) + return out0, nil +} + +// PackOperatorSetId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe1ebfc37. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function operatorSetId() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) PackOperatorSetId() []byte { + enc, err := cloudReportCompendium.abi.Pack("operatorSetId") + if err != nil { + panic(err) + } + return enc +} + +// TryPackOperatorSetId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe1ebfc37. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function operatorSetId() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) TryPackOperatorSetId() ([]byte, error) { + return cloudReportCompendium.abi.Pack("operatorSetId") +} + +// UnpackOperatorSetId is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe1ebfc37. +// +// Solidity: function operatorSetId() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) UnpackOperatorSetId(data []byte) (uint32, error) { + out, err := cloudReportCompendium.abi.Unpack("operatorSetId", data) + if err != nil { + return *new(uint32), err + } + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + return out0, nil +} + +// PackPermissionController is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4657e26a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function permissionController() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) PackPermissionController() []byte { + enc, err := cloudReportCompendium.abi.Pack("permissionController") + if err != nil { + panic(err) + } + return enc +} + +// TryPackPermissionController is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4657e26a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function permissionController() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) TryPackPermissionController() ([]byte, error) { + return cloudReportCompendium.abi.Pack("permissionController") +} + +// UnpackPermissionController is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x4657e26a. +// +// Solidity: function permissionController() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) UnpackPermissionController(data []byte) (common.Address, error) { + out, err := cloudReportCompendium.abi.Unpack("permissionController", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackReferenceProjectIdHash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf2e9ef5d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function referenceProjectIdHash() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) PackReferenceProjectIdHash() []byte { + enc, err := cloudReportCompendium.abi.Pack("referenceProjectIdHash") + if err != nil { + panic(err) + } + return enc +} + +// TryPackReferenceProjectIdHash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf2e9ef5d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function referenceProjectIdHash() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) TryPackReferenceProjectIdHash() ([]byte, error) { + return cloudReportCompendium.abi.Pack("referenceProjectIdHash") +} + +// UnpackReferenceProjectIdHash is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf2e9ef5d. +// +// Solidity: function referenceProjectIdHash() view returns(bytes32) +func (cloudReportCompendium *CloudReportCompendium) UnpackReferenceProjectIdHash(data []byte) ([32]byte, error) { + out, err := cloudReportCompendium.abi.Unpack("referenceProjectIdHash", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackReportAttester is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x285c6e4f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function reportAttester() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) PackReportAttester() []byte { + enc, err := cloudReportCompendium.abi.Pack("reportAttester") + if err != nil { + panic(err) + } + return enc +} + +// TryPackReportAttester is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x285c6e4f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function reportAttester() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) TryPackReportAttester() ([]byte, error) { + return cloudReportCompendium.abi.Pack("reportAttester") +} + +// UnpackReportAttester is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x285c6e4f. +// +// Solidity: function reportAttester() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) UnpackReportAttester(data []byte) (common.Address, error) { + out, err := cloudReportCompendium.abi.Unpack("reportAttester", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackReportFreshnessThreshold is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5bc35ef6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function reportFreshnessThreshold() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) PackReportFreshnessThreshold() []byte { + enc, err := cloudReportCompendium.abi.Pack("reportFreshnessThreshold") + if err != nil { + panic(err) + } + return enc +} + +// TryPackReportFreshnessThreshold is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5bc35ef6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function reportFreshnessThreshold() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) TryPackReportFreshnessThreshold() ([]byte, error) { + return cloudReportCompendium.abi.Pack("reportFreshnessThreshold") +} + +// UnpackReportFreshnessThreshold is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x5bc35ef6. +// +// Solidity: function reportFreshnessThreshold() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) UnpackReportFreshnessThreshold(data []byte) (uint32, error) { + out, err := cloudReportCompendium.abi.Unpack("reportFreshnessThreshold", data) + if err != nil { + return *new(uint32), err + } + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + return out0, nil +} + +// PackSetReportFreshnessThreshold is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe32c101d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setReportFreshnessThreshold(uint32 _reportFreshnessThreshold) returns() +func (cloudReportCompendium *CloudReportCompendium) PackSetReportFreshnessThreshold(reportFreshnessThreshold uint32) []byte { + enc, err := cloudReportCompendium.abi.Pack("setReportFreshnessThreshold", reportFreshnessThreshold) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetReportFreshnessThreshold is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe32c101d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setReportFreshnessThreshold(uint32 _reportFreshnessThreshold) returns() +func (cloudReportCompendium *CloudReportCompendium) TryPackSetReportFreshnessThreshold(reportFreshnessThreshold uint32) ([]byte, error) { + return cloudReportCompendium.abi.Pack("setReportFreshnessThreshold", reportFreshnessThreshold) +} + +// PackSetSlashAmountTokens is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2bef26c9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setSlashAmountTokens(uint256 _slashAmountTokens) returns() +func (cloudReportCompendium *CloudReportCompendium) PackSetSlashAmountTokens(slashAmountTokens *big.Int) []byte { + enc, err := cloudReportCompendium.abi.Pack("setSlashAmountTokens", slashAmountTokens) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetSlashAmountTokens is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2bef26c9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setSlashAmountTokens(uint256 _slashAmountTokens) returns() +func (cloudReportCompendium *CloudReportCompendium) TryPackSetSlashAmountTokens(slashAmountTokens *big.Int) ([]byte, error) { + return cloudReportCompendium.abi.Pack("setSlashAmountTokens", slashAmountTokens) +} + +// PackSlash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5e47655f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function slash(bytes eigendaCert) returns() +func (cloudReportCompendium *CloudReportCompendium) PackSlash(eigendaCert []byte) []byte { + enc, err := cloudReportCompendium.abi.Pack("slash", eigendaCert) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSlash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5e47655f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function slash(bytes eigendaCert) returns() +func (cloudReportCompendium *CloudReportCompendium) TryPackSlash(eigendaCert []byte) ([]byte, error) { + return cloudReportCompendium.abi.Pack("slash", eigendaCert) +} + +// PackSlashAmountTokens is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7d3ceb34. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function slashAmountTokens() view returns(uint256) +func (cloudReportCompendium *CloudReportCompendium) PackSlashAmountTokens() []byte { + enc, err := cloudReportCompendium.abi.Pack("slashAmountTokens") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSlashAmountTokens is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7d3ceb34. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function slashAmountTokens() view returns(uint256) +func (cloudReportCompendium *CloudReportCompendium) TryPackSlashAmountTokens() ([]byte, error) { + return cloudReportCompendium.abi.Pack("slashAmountTokens") +} + +// UnpackSlashAmountTokens is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x7d3ceb34. +// +// Solidity: function slashAmountTokens() view returns(uint256) +func (cloudReportCompendium *CloudReportCompendium) UnpackSlashAmountTokens(data []byte) (*big.Int, error) { + out, err := cloudReportCompendium.abi.Unpack("slashAmountTokens", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackStrategyToSlash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5ac080f1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function strategyToSlash() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) PackStrategyToSlash() []byte { + enc, err := cloudReportCompendium.abi.Pack("strategyToSlash") + if err != nil { + panic(err) + } + return enc +} + +// TryPackStrategyToSlash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5ac080f1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function strategyToSlash() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) TryPackStrategyToSlash() ([]byte, error) { + return cloudReportCompendium.abi.Pack("strategyToSlash") +} + +// UnpackStrategyToSlash is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x5ac080f1. +// +// Solidity: function strategyToSlash() view returns(address) +func (cloudReportCompendium *CloudReportCompendium) UnpackStrategyToSlash(data []byte) (common.Address, error) { + out, err := cloudReportCompendium.abi.Unpack("strategyToSlash", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackSubmitReport is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x35ce650d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function submitReport((string,uint32,uint32,bytes) report, bytes signature) returns() +func (cloudReportCompendium *CloudReportCompendium) PackSubmitReport(report ICloudReportCompendiumCloudReport, signature []byte) []byte { + enc, err := cloudReportCompendium.abi.Pack("submitReport", report, signature) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSubmitReport is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x35ce650d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function submitReport((string,uint32,uint32,bytes) report, bytes signature) returns() +func (cloudReportCompendium *CloudReportCompendium) TryPackSubmitReport(report ICloudReportCompendiumCloudReport, signature []byte) ([]byte, error) { + return cloudReportCompendium.abi.Pack("submitReport", report, signature) +} + +// PackVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54fd4d50. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function version() view returns(string) +func (cloudReportCompendium *CloudReportCompendium) PackVersion() []byte { + enc, err := cloudReportCompendium.abi.Pack("version") + if err != nil { + panic(err) + } + return enc +} + +// TryPackVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54fd4d50. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function version() view returns(string) +func (cloudReportCompendium *CloudReportCompendium) TryPackVersion() ([]byte, error) { + return cloudReportCompendium.abi.Pack("version") +} + +// UnpackVersion is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (cloudReportCompendium *CloudReportCompendium) UnpackVersion(data []byte) (string, error) { + out, err := cloudReportCompendium.abi.Unpack("version", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// CloudReportCompendiumInitialized represents a Initialized event raised by the CloudReportCompendium contract. +type CloudReportCompendiumInitialized struct { + Version uint8 + Raw *types.Log // Blockchain specific contextual infos +} + +const CloudReportCompendiumInitializedEventName = "Initialized" + +// ContractEventName returns the user-defined event name. +func (CloudReportCompendiumInitialized) ContractEventName() string { + return CloudReportCompendiumInitializedEventName +} + +// UnpackInitializedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Initialized(uint8 version) +func (cloudReportCompendium *CloudReportCompendium) UnpackInitializedEvent(log *types.Log) (*CloudReportCompendiumInitialized, error) { + event := "Initialized" + if len(log.Topics) == 0 || log.Topics[0] != cloudReportCompendium.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(CloudReportCompendiumInitialized) + if len(log.Data) > 0 { + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range cloudReportCompendium.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// CloudReportCompendiumOperatorSlashed represents a OperatorSlashed event raised by the CloudReportCompendium contract. +type CloudReportCompendiumOperatorSlashed struct { + Operator common.Address + OperatorSetId uint32 + Reason string + SlashId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const CloudReportCompendiumOperatorSlashedEventName = "OperatorSlashed" + +// ContractEventName returns the user-defined event name. +func (CloudReportCompendiumOperatorSlashed) ContractEventName() string { + return CloudReportCompendiumOperatorSlashedEventName +} + +// UnpackOperatorSlashedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event OperatorSlashed(address indexed operator, uint32 indexed operatorSetId, string reason, uint256 slashId) +func (cloudReportCompendium *CloudReportCompendium) UnpackOperatorSlashedEvent(log *types.Log) (*CloudReportCompendiumOperatorSlashed, error) { + event := "OperatorSlashed" + if len(log.Topics) == 0 || log.Topics[0] != cloudReportCompendium.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(CloudReportCompendiumOperatorSlashed) + if len(log.Data) > 0 { + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range cloudReportCompendium.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// CloudReportCompendiumReportFreshnessThresholdSet represents a ReportFreshnessThresholdSet event raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportFreshnessThresholdSet struct { + ReportFreshnessThreshold uint32 + Raw *types.Log // Blockchain specific contextual infos +} + +const CloudReportCompendiumReportFreshnessThresholdSetEventName = "ReportFreshnessThresholdSet" + +// ContractEventName returns the user-defined event name. +func (CloudReportCompendiumReportFreshnessThresholdSet) ContractEventName() string { + return CloudReportCompendiumReportFreshnessThresholdSetEventName +} + +// UnpackReportFreshnessThresholdSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ReportFreshnessThresholdSet(uint32 reportFreshnessThreshold) +func (cloudReportCompendium *CloudReportCompendium) UnpackReportFreshnessThresholdSetEvent(log *types.Log) (*CloudReportCompendiumReportFreshnessThresholdSet, error) { + event := "ReportFreshnessThresholdSet" + if len(log.Topics) == 0 || log.Topics[0] != cloudReportCompendium.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(CloudReportCompendiumReportFreshnessThresholdSet) + if len(log.Data) > 0 { + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range cloudReportCompendium.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// CloudReportCompendiumReportSubmitted represents a ReportSubmitted event raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportSubmitted struct { + Report ICloudReportCompendiumCloudReport + Timestamp *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const CloudReportCompendiumReportSubmittedEventName = "ReportSubmitted" + +// ContractEventName returns the user-defined event name. +func (CloudReportCompendiumReportSubmitted) ContractEventName() string { + return CloudReportCompendiumReportSubmittedEventName +} + +// UnpackReportSubmittedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ReportSubmitted((string,uint32,uint32,bytes) report, uint256 timestamp) +func (cloudReportCompendium *CloudReportCompendium) UnpackReportSubmittedEvent(log *types.Log) (*CloudReportCompendiumReportSubmitted, error) { + event := "ReportSubmitted" + if len(log.Topics) == 0 || log.Topics[0] != cloudReportCompendium.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(CloudReportCompendiumReportSubmitted) + if len(log.Data) > 0 { + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range cloudReportCompendium.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// CloudReportCompendiumSlashAmountTokensSet represents a SlashAmountTokensSet event raised by the CloudReportCompendium contract. +type CloudReportCompendiumSlashAmountTokensSet struct { + SlashAmountTokens *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const CloudReportCompendiumSlashAmountTokensSetEventName = "SlashAmountTokensSet" + +// ContractEventName returns the user-defined event name. +func (CloudReportCompendiumSlashAmountTokensSet) ContractEventName() string { + return CloudReportCompendiumSlashAmountTokensSetEventName +} + +// UnpackSlashAmountTokensSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event SlashAmountTokensSet(uint256 slashAmountTokens) +func (cloudReportCompendium *CloudReportCompendium) UnpackSlashAmountTokensSetEvent(log *types.Log) (*CloudReportCompendiumSlashAmountTokensSet, error) { + event := "SlashAmountTokensSet" + if len(log.Topics) == 0 || log.Topics[0] != cloudReportCompendium.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(CloudReportCompendiumSlashAmountTokensSet) + if len(log.Data) > 0 { + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range cloudReportCompendium.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// UnpackError attempts to decode the provided error data using user-defined +// error definitions. +func (cloudReportCompendium *CloudReportCompendium) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["InsufficientAllocation"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackInsufficientAllocationError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["InvalidCertificate"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackInvalidCertificateError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["InvalidPermissions"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackInvalidPermissionsError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["InvalidProjectId"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackInvalidProjectIdError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["InvalidReportTimestamps"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackInvalidReportTimestampsError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["InvalidShortString"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackInvalidShortStringError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["InvalidSignature"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackInvalidSignatureError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["NoSlashRequired"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackNoSlashRequiredError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["ReportChainTimestampMismatch"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackReportChainTimestampMismatchError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["ReportFromFuture"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackReportFromFutureError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["ReportTooStale"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackReportTooStaleError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["SignatureExpired"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackSignatureExpiredError(raw[4:]) + } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["StringTooLong"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackStringTooLongError(raw[4:]) + } + return nil, errors.New("Unknown error") +} + +// CloudReportCompendiumInsufficientAllocation represents a InsufficientAllocation error raised by the CloudReportCompendium contract. +type CloudReportCompendiumInsufficientAllocation struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InsufficientAllocation() +func CloudReportCompendiumInsufficientAllocationErrorID() common.Hash { + return common.HexToHash("0xdf2d4774c7cfdf4b27ad6553bec24b489a3b3201e3a9418e8f4926fe00431ffd") +} + +// UnpackInsufficientAllocationError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InsufficientAllocation() +func (cloudReportCompendium *CloudReportCompendium) UnpackInsufficientAllocationError(raw []byte) (*CloudReportCompendiumInsufficientAllocation, error) { + out := new(CloudReportCompendiumInsufficientAllocation) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "InsufficientAllocation", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumInvalidCertificate represents a InvalidCertificate error raised by the CloudReportCompendium contract. +type CloudReportCompendiumInvalidCertificate struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidCertificate() +func CloudReportCompendiumInvalidCertificateErrorID() common.Hash { + return common.HexToHash("0x1d39f94682eb2e7a1e48043ed42e27dcfea3c7e8a7c7f80ec1c2f7dae3a1c97a") +} + +// UnpackInvalidCertificateError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidCertificate() +func (cloudReportCompendium *CloudReportCompendium) UnpackInvalidCertificateError(raw []byte) (*CloudReportCompendiumInvalidCertificate, error) { + out := new(CloudReportCompendiumInvalidCertificate) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "InvalidCertificate", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumInvalidPermissions represents a InvalidPermissions error raised by the CloudReportCompendium contract. +type CloudReportCompendiumInvalidPermissions struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidPermissions() +func CloudReportCompendiumInvalidPermissionsErrorID() common.Hash { + return common.HexToHash("0x932d94f726428388537b641940dd88f9f37f70be827ee507792b87e4d26875f9") +} + +// UnpackInvalidPermissionsError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidPermissions() +func (cloudReportCompendium *CloudReportCompendium) UnpackInvalidPermissionsError(raw []byte) (*CloudReportCompendiumInvalidPermissions, error) { + out := new(CloudReportCompendiumInvalidPermissions) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "InvalidPermissions", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumInvalidProjectId represents a InvalidProjectId error raised by the CloudReportCompendium contract. +type CloudReportCompendiumInvalidProjectId struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidProjectId() +func CloudReportCompendiumInvalidProjectIdErrorID() common.Hash { + return common.HexToHash("0xabcd0b5c8ca7446a866b21429aaa322a60b28a925757755a9452b3da8b152cc1") +} + +// UnpackInvalidProjectIdError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidProjectId() +func (cloudReportCompendium *CloudReportCompendium) UnpackInvalidProjectIdError(raw []byte) (*CloudReportCompendiumInvalidProjectId, error) { + out := new(CloudReportCompendiumInvalidProjectId) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "InvalidProjectId", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumInvalidReportTimestamps represents a InvalidReportTimestamps error raised by the CloudReportCompendium contract. +type CloudReportCompendiumInvalidReportTimestamps struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidReportTimestamps() +func CloudReportCompendiumInvalidReportTimestampsErrorID() common.Hash { + return common.HexToHash("0x4f6dc836c400201281f1a7561a36f0aa5a0a999af82692bfb6601ed86a660d3e") +} + +// UnpackInvalidReportTimestampsError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidReportTimestamps() +func (cloudReportCompendium *CloudReportCompendium) UnpackInvalidReportTimestampsError(raw []byte) (*CloudReportCompendiumInvalidReportTimestamps, error) { + out := new(CloudReportCompendiumInvalidReportTimestamps) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "InvalidReportTimestamps", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumInvalidShortString represents a InvalidShortString error raised by the CloudReportCompendium contract. +type CloudReportCompendiumInvalidShortString struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidShortString() +func CloudReportCompendiumInvalidShortStringErrorID() common.Hash { + return common.HexToHash("0xb3512b0c6163e5f0bafab72bb631b9d58cd7a731b082f910338aa21c83d5c274") +} + +// UnpackInvalidShortStringError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidShortString() +func (cloudReportCompendium *CloudReportCompendium) UnpackInvalidShortStringError(raw []byte) (*CloudReportCompendiumInvalidShortString, error) { + out := new(CloudReportCompendiumInvalidShortString) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "InvalidShortString", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumInvalidSignature represents a InvalidSignature error raised by the CloudReportCompendium contract. +type CloudReportCompendiumInvalidSignature struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidSignature() +func CloudReportCompendiumInvalidSignatureErrorID() common.Hash { + return common.HexToHash("0x8baa579fce362245063d36f11747a89dd489c54795634fc673cc0e0db51fedc5") +} + +// UnpackInvalidSignatureError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidSignature() +func (cloudReportCompendium *CloudReportCompendium) UnpackInvalidSignatureError(raw []byte) (*CloudReportCompendiumInvalidSignature, error) { + out := new(CloudReportCompendiumInvalidSignature) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "InvalidSignature", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumNoSlashRequired represents a NoSlashRequired error raised by the CloudReportCompendium contract. +type CloudReportCompendiumNoSlashRequired struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error NoSlashRequired() +func CloudReportCompendiumNoSlashRequiredErrorID() common.Hash { + return common.HexToHash("0xb4f5fa5a011726121c0d298940aea06d451fc4a04cbbcf01e77b128ada7b8a87") +} + +// UnpackNoSlashRequiredError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error NoSlashRequired() +func (cloudReportCompendium *CloudReportCompendium) UnpackNoSlashRequiredError(raw []byte) (*CloudReportCompendiumNoSlashRequired, error) { + out := new(CloudReportCompendiumNoSlashRequired) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "NoSlashRequired", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumReportChainTimestampMismatch represents a ReportChainTimestampMismatch error raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportChainTimestampMismatch struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ReportChainTimestampMismatch() +func CloudReportCompendiumReportChainTimestampMismatchErrorID() common.Hash { + return common.HexToHash("0xb19f39e95dd1674ddd44f1d3550568ccc4cc4b2275a8ef5f8f33eaf9e49f5b9b") +} + +// UnpackReportChainTimestampMismatchError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ReportChainTimestampMismatch() +func (cloudReportCompendium *CloudReportCompendium) UnpackReportChainTimestampMismatchError(raw []byte) (*CloudReportCompendiumReportChainTimestampMismatch, error) { + out := new(CloudReportCompendiumReportChainTimestampMismatch) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "ReportChainTimestampMismatch", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumReportFromFuture represents a ReportFromFuture error raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportFromFuture struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ReportFromFuture() +func CloudReportCompendiumReportFromFutureErrorID() common.Hash { + return common.HexToHash("0xc1208954973cfa6377fe7ddc754262a69c9c624ae1f4fd2cfd2e5050c939ee15") +} + +// UnpackReportFromFutureError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ReportFromFuture() +func (cloudReportCompendium *CloudReportCompendium) UnpackReportFromFutureError(raw []byte) (*CloudReportCompendiumReportFromFuture, error) { + out := new(CloudReportCompendiumReportFromFuture) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "ReportFromFuture", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumReportTooStale represents a ReportTooStale error raised by the CloudReportCompendium contract. +type CloudReportCompendiumReportTooStale struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ReportTooStale() +func CloudReportCompendiumReportTooStaleErrorID() common.Hash { + return common.HexToHash("0xc262d324b1569da9488224a8c2d9e0cf753ee43616a13e7b2bf9baea921906c1") +} + +// UnpackReportTooStaleError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ReportTooStale() +func (cloudReportCompendium *CloudReportCompendium) UnpackReportTooStaleError(raw []byte) (*CloudReportCompendiumReportTooStale, error) { + out := new(CloudReportCompendiumReportTooStale) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "ReportTooStale", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumSignatureExpired represents a SignatureExpired error raised by the CloudReportCompendium contract. +type CloudReportCompendiumSignatureExpired struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error SignatureExpired() +func CloudReportCompendiumSignatureExpiredErrorID() common.Hash { + return common.HexToHash("0x0819bdcd8da3b255f8b8bf8497982cf672847d37ad445f8f2edca874c1fcb6a3") +} + +// UnpackSignatureExpiredError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error SignatureExpired() +func (cloudReportCompendium *CloudReportCompendium) UnpackSignatureExpiredError(raw []byte) (*CloudReportCompendiumSignatureExpired, error) { + out := new(CloudReportCompendiumSignatureExpired) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "SignatureExpired", raw); err != nil { + return nil, err + } + return out, nil +} + +// CloudReportCompendiumStringTooLong represents a StringTooLong error raised by the CloudReportCompendium contract. +type CloudReportCompendiumStringTooLong struct { + Str string +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error StringTooLong(string str) +func CloudReportCompendiumStringTooLongErrorID() common.Hash { + return common.HexToHash("0x305a27a93f8e33b7392df0a0f91d6fc63847395853c45991eec52dbf24d72381") +} + +// UnpackStringTooLongError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error StringTooLong(string str) +func (cloudReportCompendium *CloudReportCompendium) UnpackStringTooLongError(raw []byte) (*CloudReportCompendiumStringTooLong, error) { + out := new(CloudReportCompendiumStringTooLong) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "StringTooLong", raw); err != nil { + return nil, err + } + return out, nil +} diff --git a/src/CloudReportCompendium.sol b/src/CloudReportCompendium.sol new file mode 100644 index 0000000..a4f288b --- /dev/null +++ b/src/CloudReportCompendium.sol @@ -0,0 +1,195 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {Initializable} from "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; +import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import {IPermissionController} from "@eigenlayer-contracts/src/contracts/interfaces/IPermissionController.sol"; +import {PermissionControllerMixin} from "@eigenlayer-contracts/src/contracts/mixins/PermissionControllerMixin.sol"; +import {SignatureUtilsMixin} from "@eigenlayer-contracts/src/contracts/mixins/SignatureUtilsMixin.sol"; +import { + IAllocationManager, + IAllocationManagerTypes +} from "@eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; +import {IDelegationManager} from "@eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; +import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; +import {OperatorSet} from "@eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; +import { + IEigenDACertVerifierRouter +} from "@eigenda-contracts/src/integrations/cert/interfaces/IEigenDACertVerifierRouter.sol"; +import {IComputeAVSRegistrar} from "./interfaces/IComputeAVSRegistrar.sol"; +import {IComputeOperator} from "./interfaces/IComputeOperator.sol"; +import {CloudReportCompendiumStorage} from "./storage/CloudReportCompendiumStorage.sol"; +import {ICloudReportCompendium} from "./interfaces/ICloudReportCompendium.sol"; + +contract CloudReportCompendium is + Initializable, + SignatureUtilsMixin, + PermissionControllerMixin, + CloudReportCompendiumStorage +{ + using ECDSA for bytes32; + + /** + * @param _version The version string to use for this contract's domain separator + * @param _permissionController The PermissionController contract address + * @param params The constructor parameters struct + */ + constructor( + string memory _version, + IPermissionController _permissionController, + CloudReportCompendiumStorage.ConstructorParams memory params + ) + SignatureUtilsMixin(_version) + PermissionControllerMixin(_permissionController) + CloudReportCompendiumStorage(params) + { + _disableInitializers(); + } + + /// @inheritdoc ICloudReportCompendium + function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) external initializer { + _setReportFreshnessThreshold(_reportFreshnessThreshold); + _setSlashAmountTokens(_slashAmountTokens); + } + + /// @inheritdoc ICloudReportCompendium + function setReportFreshnessThreshold(uint32 _reportFreshnessThreshold) external checkCanCall(address(this)) { + _setReportFreshnessThreshold(_reportFreshnessThreshold); + } + + /// @inheritdoc ICloudReportCompendium + function setSlashAmountTokens(uint256 _slashAmountTokens) external checkCanCall(address(this)) { + _setSlashAmountTokens(_slashAmountTokens); + } + + /// @inheritdoc ICloudReportCompendium + function submitReport(CloudReport calldata report, bytes calldata signature) external checkCanCall(address(this)) { + // Verify project ID matches + require(keccak256(abi.encodePacked(report.projectId)) == referenceProjectIdHash, InvalidProjectId()); + // Verify timestamps + require(report.fromTimestamp == _latestReportSubmission.toTimestamp, ReportChainTimestampMismatch()); + require(report.fromTimestamp < report.toTimestamp, InvalidReportTimestamps()); + require(report.toTimestamp <= block.timestamp, ReportFromFuture()); + + // Verify signature + bytes32 reportHash = _hashCloudReport(report); + bytes32 digest = _calculateSignableDigest(reportHash); + address signer = digest.recover(signature); + require(signer == reportAttester, InvalidSignature()); + + // Store the report + _latestReportSubmission = CloudReportSubmission({ + submissionTimestamp: uint32(block.timestamp), + fromTimestamp: report.fromTimestamp, + toTimestamp: report.toTimestamp, + eigendaCertHash: bytes20(keccak256(report.eigendaCert)) + }); + + emit ReportSubmitted(report, block.timestamp); + } + + /// @inheritdoc ICloudReportCompendium + function slash(bytes calldata eigendaCert) external { + // Check eigenDaCert consistency + require(bytes20(keccak256(eigendaCert)) == _latestReportSubmission.eigendaCertHash, InvalidCertificate()); + + bool shouldSlash = false; + string memory reason; + + // Check 1: Report freshness + if (block.timestamp - _latestReportSubmission.submissionTimestamp >= reportFreshnessThreshold) { + reason = "Report too stale"; + } else if (certVerifierRouter.checkDACert(eigendaCert) != EIGENDA_CERT_SUCCESS) { + reason = "Invalid EigenDA certificate"; + } else { + revert NoSlashRequired(); + } + + // Perform slashing + _performSlash(reason); + } + + /// INTERNAL FUNCTIONS + + function _setReportFreshnessThreshold(uint32 _reportFreshnessThreshold) internal { + reportFreshnessThreshold = _reportFreshnessThreshold; + emit ReportFreshnessThresholdSet(_reportFreshnessThreshold); + } + + function _setSlashAmountTokens(uint256 _slashAmountTokens) internal { + slashAmountTokens = _slashAmountTokens; + emit SlashAmountTokensSet(_slashAmountTokens); + } + + /** + * @notice Performs the slashing operation with calculated proportions + * @param reason The reason for slashing + */ + function _performSlash(string memory reason) internal { + address operator = address(computeOperator); + + // Calculate the proportion to slash + uint256 wadToSlash = _calculateSlashProportion(operator); + + // Create single-element arrays + IStrategy[] memory strategies = new IStrategy[](1); + strategies[0] = strategyToSlash; + + uint256[] memory wadsToSlash = new uint256[](1); + wadsToSlash[0] = wadToSlash; + + // Execute slash + (uint256 slashId,) = allocationManager.slashOperator( + address(computeAVSRegistrar), + IAllocationManagerTypes.SlashingParams({ + operator: operator, + operatorSetId: operatorSetId, + strategies: strategies, + wadsToSlash: wadsToSlash, + description: reason + }) + ); + + emit OperatorSlashed(operator, operatorSetId, reason, slashId); + } + + /** + * @notice Calculates the proportion to slash based on allocated shares + * @param operator The operator address + * @return The proportion to slash (in WAD, capped at 1e18) + */ + function _calculateSlashProportion(address operator) internal view returns (uint256) { + // TODO: Implement proportion calculation + // Should convert slashAmountTokens to proportion of allocated stake + return 0; + } + + /** + * @notice Hashes a CloudReport struct using EIP-712 + * @param report The cloud report to hash + * @return The hash of the cloud report + */ + function _hashCloudReport(CloudReport calldata report) internal pure returns (bytes32) { + return keccak256( + abi.encode( + CLOUD_REPORT_TYPEHASH, + keccak256(abi.encodePacked(report.projectId)), + report.fromTimestamp, + report.toTimestamp, + keccak256(report.eigendaCert) + ) + ); + } + + /// VIEW FUNCTIONS + + /// @inheritdoc ICloudReportCompendium + function latestReportSubmission() external view returns (CloudReportSubmission memory) { + return _latestReportSubmission; + } + + /// @inheritdoc ICloudReportCompendium + function calculateReportDigestHash(CloudReport calldata report) external view returns (bytes32) { + return _calculateSignableDigest(_hashCloudReport(report)); + } +} diff --git a/src/interfaces/ICloudReportCompendium.sol b/src/interfaces/ICloudReportCompendium.sol new file mode 100644 index 0000000..98a5f76 --- /dev/null +++ b/src/interfaces/ICloudReportCompendium.sol @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.27; + +import { + IEigenDACertVerifierRouter +} from "@eigenda-contracts/src/integrations/cert/interfaces/IEigenDACertVerifierRouter.sol"; +import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; + +interface ICloudReportCompendium { + /// ERRORS + /// @notice Thrown when the report's project ID does not match the reference project ID + error InvalidProjectId(); + + /// @notice Thrown when the report is too old (exceeds freshness threshold) + error ReportTooStale(); + + /// @notice Thrown when the EigenDA certificate is invalid or hash does not match + error InvalidCertificate(); + + /// @notice Thrown when checks pass and no slash is required + error NoSlashRequired(); + + /// @notice Thrown when there is insufficient allocation to slash + error InsufficientAllocation(); + + /// @notice Thrown when report's fromTimestamp doesn't match previous report's toTimestamp + error ReportChainTimestampMismatch(); + + /// @notice Thrown when report timestamps are invalid (fromTimestamp >= toTimestamp) + error InvalidReportTimestamps(); + + /// @notice Thrown when report toTimestamp is in the future + error ReportFromFuture(); + + /// EVENTS + + /// @notice Emitted when a cloud report is submitted + event ReportSubmitted(CloudReport report, uint256 timestamp); + + /// @notice Emitted when an operator is slashed + event OperatorSlashed(address indexed operator, uint32 indexed operatorSetId, string reason, uint256 slashId); + + /// @notice Emitted when the report freshness threshold is updated + event ReportFreshnessThresholdSet(uint32 reportFreshnessThreshold); + + /// @notice Emitted when the slash amount in tokens is updated + event SlashAmountTokensSet(uint256 slashAmountTokens); + + /// STRUCTS + + struct CloudReportSubmission { + uint32 submissionTimestamp; + uint32 fromTimestamp; + uint32 toTimestamp; + bytes20 eigendaCertHash; // using bytes20 for packing + } + + struct CloudReport { + string projectId; + uint32 fromTimestamp; + uint32 toTimestamp; + bytes eigendaCert; + } + + /// VIEW FUNCTIONS + + /// @notice The EIP-712 typehash for the CloudReport struct. + function CLOUD_REPORT_TYPEHASH() external view returns (bytes32); + + /// @notice The address of the EigenDA Cert Verifier Router contract. + function certVerifierRouter() external view returns (IEigenDACertVerifierRouter); + + /// @notice The address that must sign cloud reports. + function reportAttester() external view returns (address); + + /// @notice The operator set ID this compendium is tracking. + function operatorSetId() external view returns (uint32); + + /// @notice Hash of the reference project ID that reports must match. + function referenceProjectIdHash() external view returns (bytes32); + + /// @notice The strategy to slash when an operator fails checks. + function strategyToSlash() external view returns (IStrategy); + + /// @notice The number of seconds within which a report must be submitted. + function reportFreshnessThreshold() external view returns (uint32); + + /// @notice The absolute amount in tokens to slash. + function slashAmountTokens() external view returns (uint256); + + /// @notice The latest cloud report submission. + function latestReportSubmission() external view returns (CloudReportSubmission memory); + + /** + * @notice Calculates the digest hash for a cloud report. + * @param report The cloud report. + * @return The digest hash. + */ + function calculateReportDigestHash(CloudReport calldata report) external view returns (bytes32); + + /** + * @notice Initializes the CloudReportCompendium contract + * @param _reportFreshnessThreshold The number of blocks within which a report must be submitted + * @param _slashAmountTokens The absolute amount in tokens to slash + */ + function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) external; + + /** + * @notice Sets the report freshness threshold. + * @param _reportFreshnessThreshold The new threshold in seconds. + * @dev Caller must be UAM permissioned + */ + function setReportFreshnessThreshold(uint32 _reportFreshnessThreshold) external; + + /** + * @notice Sets the slash amount in tokens. + * @param _slashAmountTokens The new slash amount. + * @dev Caller must be UAM permissioned + */ + function setSlashAmountTokens(uint256 _slashAmountTokens) external; + + /** + * @notice Submits a cloud report. + * @param report The cloud report to submit. + * @param signature The signature of the report by the report attester. + * @dev Caller must be UAM permissioned + */ + function submitReport(CloudReport calldata report, bytes calldata signature) external; + + /** + * @notice Slashes the operator for the operatorSet by running the requisite checks and seeing if they fail. + * The checks are: + * 1. Check that the latest report is fresh enough (within REPORT_FRESHNESS_THRESHOLD of the current timestamp) + * 2. Check that the EigenDA cert is valid + * If either of these checks fail, the operator is slashed for SLASH_AMOUNT of their stake. + * @param eigendaCert The EigenDA certificate to verify (preimage of stored hash). + */ + function slash(bytes calldata eigendaCert) external; +} diff --git a/src/storage/CloudReportCompendiumStorage.sol b/src/storage/CloudReportCompendiumStorage.sol new file mode 100644 index 0000000..4162ba6 --- /dev/null +++ b/src/storage/CloudReportCompendiumStorage.sol @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {IPermissionController} from "@eigenlayer-contracts/src/contracts/interfaces/IPermissionController.sol"; +import {IDelegationManager} from "@eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; +import { + IAllocationManager, + IAllocationManagerTypes +} from "@eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; +import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; +import { + IEigenDACertVerifierRouter +} from "@eigenda-contracts/src/integrations/cert/interfaces/IEigenDACertVerifierRouter.sol"; +import {IComputeAVSRegistrar} from "../interfaces/IComputeAVSRegistrar.sol"; +import {IComputeOperator} from "../interfaces/IComputeOperator.sol"; +import {ICloudReportCompendium} from "../interfaces/ICloudReportCompendium.sol"; + +abstract contract CloudReportCompendiumStorage is ICloudReportCompendium { + /// STRUCTS + struct ConstructorParams { + IDelegationManager delegationManager; + IAllocationManager allocationManager; + IEigenDACertVerifierRouter certVerifierRouter; + IComputeAVSRegistrar computeAVSRegistrar; + IComputeOperator computeOperator; + address reportAttester; + uint32 operatorSetId; + string referenceProjectId; + IStrategy strategyToSlash; + } + + /// CONSTANTS + /// @notice The EIP-712 typehash for the CloudReport struct + bytes32 public constant CLOUD_REPORT_TYPEHASH = + keccak256("CloudReport(string projectId,uint32 fromTimestamp,uint32 toTimestamp,bytes eigendaCert)"); + + /// @notice EigenDA cert verification success status code + uint8 internal constant EIGENDA_CERT_SUCCESS = 1; + + /// @notice Basis point constant for percentage calculations (100%) + uint256 internal constant WAD = 1e18; + + /// IMMUTABLES + + /// @notice The EigenLayer DelegationManager contract + IDelegationManager public immutable delegationManager; + + /// @notice The EigenLayer AllocationManager contract + IAllocationManager public immutable allocationManager; + + /// @inheritdoc ICloudReportCompendium + IEigenDACertVerifierRouter public immutable certVerifierRouter; + + /// @notice The ComputeAVSRegistrar contract + IComputeAVSRegistrar public immutable computeAVSRegistrar; + + /// @notice The ComputeOperator contract + IComputeOperator public immutable computeOperator; + + /// @inheritdoc ICloudReportCompendium + address public immutable reportAttester; + + /// @notice The operator set ID this compendium is tracking + uint32 public immutable operatorSetId; + + /// @notice Hash of the reference project ID that reports must match + bytes32 public immutable referenceProjectIdHash; + + /// @notice The strategy to slash when an operator fails checks + IStrategy public immutable strategyToSlash; + + /// STORAGE + + /// @notice The number of blocks within which a report must be submitted + uint32 public reportFreshnessThreshold; + + /// @notice The absolute amount in tokens to slash + uint256 public slashAmountTokens; + + /// @notice The latest cloud report submission + CloudReportSubmission internal _latestReportSubmission; + + constructor(ConstructorParams memory params) { + delegationManager = params.delegationManager; + allocationManager = params.allocationManager; + certVerifierRouter = params.certVerifierRouter; + computeAVSRegistrar = params.computeAVSRegistrar; + computeOperator = params.computeOperator; + reportAttester = params.reportAttester; + operatorSetId = params.operatorSetId; + referenceProjectIdHash = keccak256(abi.encodePacked(params.referenceProjectId)); + strategyToSlash = params.strategyToSlash; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[44] private __gap; +} From 4af31edfbb274e95f68cd90c377ef3122b499c1a Mon Sep 17 00:00:00 2001 From: Gautham Anant Date: Tue, 11 Nov 2025 16:23:45 -0800 Subject: [PATCH 2/8] fix: cleanup slash func --- src/CloudReportCompendium.sol | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/CloudReportCompendium.sol b/src/CloudReportCompendium.sol index a4f288b..0a7fc04 100644 --- a/src/CloudReportCompendium.sol +++ b/src/CloudReportCompendium.sol @@ -93,13 +93,12 @@ contract CloudReportCompendium is // Check eigenDaCert consistency require(bytes20(keccak256(eigendaCert)) == _latestReportSubmission.eigendaCertHash, InvalidCertificate()); - bool shouldSlash = false; string memory reason; - - // Check 1: Report freshness if (block.timestamp - _latestReportSubmission.submissionTimestamp >= reportFreshnessThreshold) { + // check report freshness reason = "Report too stale"; } else if (certVerifierRouter.checkDACert(eigendaCert) != EIGENDA_CERT_SUCCESS) { + // check eigenda cert verification reason = "Invalid EigenDA certificate"; } else { revert NoSlashRequired(); From 3c9c2704e50d23dc8b2f22bf50189608d13e5216 Mon Sep 17 00:00:00 2001 From: Gautham Anant Date: Tue, 11 Nov 2025 17:53:32 -0800 Subject: [PATCH 3/8] fix: init _latestReportSubmission --- src/CloudReportCompendium.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CloudReportCompendium.sol b/src/CloudReportCompendium.sol index 0a7fc04..1ffa8ed 100644 --- a/src/CloudReportCompendium.sol +++ b/src/CloudReportCompendium.sol @@ -67,7 +67,7 @@ contract CloudReportCompendium is // Verify project ID matches require(keccak256(abi.encodePacked(report.projectId)) == referenceProjectIdHash, InvalidProjectId()); // Verify timestamps - require(report.fromTimestamp == _latestReportSubmission.toTimestamp, ReportChainTimestampMismatch()); + require(_latestReportSubmission.toTimestamp == 0 || report.fromTimestamp == _latestReportSubmission.toTimestamp, ReportChainTimestampMismatch()); require(report.fromTimestamp < report.toTimestamp, InvalidReportTimestamps()); require(report.toTimestamp <= block.timestamp, ReportFromFuture()); From 4460d7551a150cba8d8041097288ad5ac61b9898 Mon Sep 17 00:00:00 2001 From: Gautham Anant Date: Tue, 11 Nov 2025 18:05:23 -0800 Subject: [PATCH 4/8] chore: fmt --- src/CloudReportCompendium.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CloudReportCompendium.sol b/src/CloudReportCompendium.sol index 1ffa8ed..a358239 100644 --- a/src/CloudReportCompendium.sol +++ b/src/CloudReportCompendium.sol @@ -67,7 +67,10 @@ contract CloudReportCompendium is // Verify project ID matches require(keccak256(abi.encodePacked(report.projectId)) == referenceProjectIdHash, InvalidProjectId()); // Verify timestamps - require(_latestReportSubmission.toTimestamp == 0 || report.fromTimestamp == _latestReportSubmission.toTimestamp, ReportChainTimestampMismatch()); + require( + _latestReportSubmission.toTimestamp == 0 || report.fromTimestamp == _latestReportSubmission.toTimestamp, + ReportChainTimestampMismatch() + ); require(report.fromTimestamp < report.toTimestamp, InvalidReportTimestamps()); require(report.toTimestamp <= block.timestamp, ReportFromFuture()); From 8dab70998c6f41e9a14835a2f3265b821e078005 Mon Sep 17 00:00:00 2001 From: Gautham Anant Date: Wed, 12 Nov 2025 10:51:27 -0800 Subject: [PATCH 5/8] feat: _calculateSlashProportion --- src/CloudReportCompendium.sol | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/CloudReportCompendium.sol b/src/CloudReportCompendium.sol index a358239..e9072b5 100644 --- a/src/CloudReportCompendium.sol +++ b/src/CloudReportCompendium.sol @@ -13,9 +13,14 @@ import { import {IDelegationManager} from "@eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; import {OperatorSet} from "@eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; + +import {SlashingLib} from "@eigenlayer-contracts/src/contracts/libraries/SlashingLib.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; + import { IEigenDACertVerifierRouter } from "@eigenda-contracts/src/integrations/cert/interfaces/IEigenDACertVerifierRouter.sol"; + import {IComputeAVSRegistrar} from "./interfaces/IComputeAVSRegistrar.sol"; import {IComputeOperator} from "./interfaces/IComputeOperator.sol"; import {CloudReportCompendiumStorage} from "./storage/CloudReportCompendiumStorage.sol"; @@ -28,6 +33,8 @@ contract CloudReportCompendium is CloudReportCompendiumStorage { using ECDSA for bytes32; + using SlashingLib for uint256; + using Math for uint256; /** * @param _version The version string to use for this contract's domain separator @@ -131,7 +138,7 @@ contract CloudReportCompendium is address operator = address(computeOperator); // Calculate the proportion to slash - uint256 wadToSlash = _calculateSlashProportion(operator); + uint256 wadToSlash = _calculateSlashProportion(); // Create single-element arrays IStrategy[] memory strategies = new IStrategy[](1); @@ -157,13 +164,27 @@ contract CloudReportCompendium is /** * @notice Calculates the proportion to slash based on allocated shares - * @param operator The operator address * @return The proportion to slash (in WAD, capped at 1e18) */ - function _calculateSlashProportion(address operator) internal view returns (uint256) { - // TODO: Implement proportion calculation - // Should convert slashAmountTokens to proportion of allocated stake - return 0; + function _calculateSlashProportion() internal view returns (uint256) { + // Fetch total shares by summing active and withdrawal queue shares + IStrategy[] memory strategies = new IStrategy[](1); + strategies[0] = strategyToSlash; + uint256[] memory totalSharesActiveArr = + delegationManager.getOperatorShares(address(computeOperator), strategies); + uint256 totalShares = totalSharesActiveArr[0] + + delegationManager.getSlashableSharesInQueue(address(computeOperator), strategyToSlash); + + // Calculate slashable shares by multiplying by the magnitude + IAllocationManager.Allocation memory allocation = allocationManager.getAllocation( + address(computeOperator), + OperatorSet({avs: address(computeAVSRegistrar), id: operatorSetId}), + strategyToSlash + ); + uint256 slashableShares = totalShares.mulDiv(allocation.currentMagnitude, WAD); + // wadsToSlash = slashAmountTokens / slashableShares * WAD + uint256 wadsToSlash = slashAmountTokens.mulDiv(WAD, slashableShares); + return wadsToSlash; } /** From 9c41a6ba10e4349b9bc977919df5411bc3419346 Mon Sep 17 00:00:00 2001 From: Gautham Anant Date: Wed, 12 Nov 2025 12:38:19 -0800 Subject: [PATCH 6/8] feat: max slash per interval and natspec cleanup --- src/CloudReportCompendium.sol | 29 ++++++++++++--- src/interfaces/ICloudReportCompendium.sol | 39 +++++++++++++++++++- src/storage/CloudReportCompendiumStorage.sol | 31 +++++++++------- 3 files changed, 77 insertions(+), 22 deletions(-) diff --git a/src/CloudReportCompendium.sol b/src/CloudReportCompendium.sol index e9072b5..d89b019 100644 --- a/src/CloudReportCompendium.sol +++ b/src/CloudReportCompendium.sol @@ -14,7 +14,7 @@ import {IDelegationManager} from "@eigenlayer-contracts/src/contracts/interfaces import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; import {OperatorSet} from "@eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; -import {SlashingLib} from "@eigenlayer-contracts/src/contracts/libraries/SlashingLib.sol"; +import {SlashingLib, WAD} from "@eigenlayer-contracts/src/contracts/libraries/SlashingLib.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import { @@ -54,9 +54,13 @@ contract CloudReportCompendium is } /// @inheritdoc ICloudReportCompendium - function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) external initializer { + function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens, uint32 _minSlashInterval) + external + initializer + { _setReportFreshnessThreshold(_reportFreshnessThreshold); _setSlashAmountTokens(_slashAmountTokens); + _setMinSlashInterval(_minSlashInterval); } /// @inheritdoc ICloudReportCompendium @@ -69,6 +73,11 @@ contract CloudReportCompendium is _setSlashAmountTokens(_slashAmountTokens); } + /// @inheritdoc ICloudReportCompendium + function setMinSlashInterval(uint32 _minSlashInterval) external checkCanCall(address(this)) { + _setMinSlashInterval(_minSlashInterval); + } + /// @inheritdoc ICloudReportCompendium function submitReport(CloudReport calldata report, bytes calldata signature) external checkCanCall(address(this)) { // Verify project ID matches @@ -90,7 +99,6 @@ contract CloudReportCompendium is // Store the report _latestReportSubmission = CloudReportSubmission({ submissionTimestamp: uint32(block.timestamp), - fromTimestamp: report.fromTimestamp, toTimestamp: report.toTimestamp, eigendaCertHash: bytes20(keccak256(report.eigendaCert)) }); @@ -100,6 +108,9 @@ contract CloudReportCompendium is /// @inheritdoc ICloudReportCompendium function slash(bytes calldata eigendaCert) external { + // Check that enough time has passed since last slash + require(lastSlashTimestamp == 0 || block.timestamp - lastSlashTimestamp >= minSlashInterval, SlashTooSoon()); + // Check eigenDaCert consistency require(bytes20(keccak256(eigendaCert)) == _latestReportSubmission.eigendaCertHash, InvalidCertificate()); @@ -130,12 +141,18 @@ contract CloudReportCompendium is emit SlashAmountTokensSet(_slashAmountTokens); } + function _setMinSlashInterval(uint32 _minSlashInterval) internal { + minSlashInterval = _minSlashInterval; + emit MinSlashIntervalSet(_minSlashInterval); + } + /** * @notice Performs the slashing operation with calculated proportions * @param reason The reason for slashing */ function _performSlash(string memory reason) internal { - address operator = address(computeOperator); + // Update last slash timestamp + lastSlashTimestamp = uint32(block.timestamp); // Calculate the proportion to slash uint256 wadToSlash = _calculateSlashProportion(); @@ -151,7 +168,7 @@ contract CloudReportCompendium is (uint256 slashId,) = allocationManager.slashOperator( address(computeAVSRegistrar), IAllocationManagerTypes.SlashingParams({ - operator: operator, + operator: address(computeOperator), operatorSetId: operatorSetId, strategies: strategies, wadsToSlash: wadsToSlash, @@ -159,7 +176,7 @@ contract CloudReportCompendium is }) ); - emit OperatorSlashed(operator, operatorSetId, reason, slashId); + emit OperatorSlashed(address(computeOperator), operatorSetId, reason, slashId); } /** diff --git a/src/interfaces/ICloudReportCompendium.sol b/src/interfaces/ICloudReportCompendium.sol index 98a5f76..f2294e0 100644 --- a/src/interfaces/ICloudReportCompendium.sol +++ b/src/interfaces/ICloudReportCompendium.sol @@ -1,10 +1,14 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.27; +import {IDelegationManager} from "@eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; +import {IAllocationManager} from "@eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import { IEigenDACertVerifierRouter } from "@eigenda-contracts/src/integrations/cert/interfaces/IEigenDACertVerifierRouter.sol"; import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; +import {IComputeAVSRegistrar} from "./IComputeAVSRegistrar.sol"; +import {IComputeOperator} from "./IComputeOperator.sol"; interface ICloudReportCompendium { /// ERRORS @@ -32,6 +36,9 @@ interface ICloudReportCompendium { /// @notice Thrown when report toTimestamp is in the future error ReportFromFuture(); + /// @notice Thrown when trying to slash before the minimum slash interval has passed + error SlashTooSoon(); + /// EVENTS /// @notice Emitted when a cloud report is submitted @@ -46,11 +53,13 @@ interface ICloudReportCompendium { /// @notice Emitted when the slash amount in tokens is updated event SlashAmountTokensSet(uint256 slashAmountTokens); + /// @notice Emitted when the minimum slash interval is updated + event MinSlashIntervalSet(uint32 minSlashInterval); + /// STRUCTS struct CloudReportSubmission { uint32 submissionTimestamp; - uint32 fromTimestamp; uint32 toTimestamp; bytes20 eigendaCertHash; // using bytes20 for packing } @@ -67,9 +76,21 @@ interface ICloudReportCompendium { /// @notice The EIP-712 typehash for the CloudReport struct. function CLOUD_REPORT_TYPEHASH() external view returns (bytes32); + /// @notice The EigenLayer DelegationManager contract. + function delegationManager() external view returns (IDelegationManager); + + /// @notice The EigenLayer AllocationManager contract. + function allocationManager() external view returns (IAllocationManager); + /// @notice The address of the EigenDA Cert Verifier Router contract. function certVerifierRouter() external view returns (IEigenDACertVerifierRouter); + /// @notice The ComputeAVSRegistrar contract. + function computeAVSRegistrar() external view returns (IComputeAVSRegistrar); + + /// @notice The ComputeOperator contract. + function computeOperator() external view returns (IComputeOperator); + /// @notice The address that must sign cloud reports. function reportAttester() external view returns (address); @@ -88,6 +109,12 @@ interface ICloudReportCompendium { /// @notice The absolute amount in tokens to slash. function slashAmountTokens() external view returns (uint256); + /// @notice The minimum time interval between slashes (in seconds). + function minSlashInterval() external view returns (uint32); + + /// @notice The timestamp when the last slash occurred. + function lastSlashTimestamp() external view returns (uint32); + /// @notice The latest cloud report submission. function latestReportSubmission() external view returns (CloudReportSubmission memory); @@ -102,8 +129,9 @@ interface ICloudReportCompendium { * @notice Initializes the CloudReportCompendium contract * @param _reportFreshnessThreshold The number of blocks within which a report must be submitted * @param _slashAmountTokens The absolute amount in tokens to slash + * @param _minSlashInterval The minimum time interval between slashes (in seconds) */ - function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) external; + function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens, uint32 _minSlashInterval) external; /** * @notice Sets the report freshness threshold. @@ -119,6 +147,13 @@ interface ICloudReportCompendium { */ function setSlashAmountTokens(uint256 _slashAmountTokens) external; + /** + * @notice Sets the minimum slash interval. + * @param _minSlashInterval The new minimum interval in seconds. + * @dev Caller must be UAM permissioned + */ + function setMinSlashInterval(uint32 _minSlashInterval) external; + /** * @notice Submits a cloud report. * @param report The cloud report to submit. diff --git a/src/storage/CloudReportCompendiumStorage.sol b/src/storage/CloudReportCompendiumStorage.sol index 4162ba6..73ab6d9 100644 --- a/src/storage/CloudReportCompendiumStorage.sol +++ b/src/storage/CloudReportCompendiumStorage.sol @@ -30,53 +30,56 @@ abstract contract CloudReportCompendiumStorage is ICloudReportCompendium { } /// CONSTANTS - /// @notice The EIP-712 typehash for the CloudReport struct + /// @inheritdoc ICloudReportCompendium bytes32 public constant CLOUD_REPORT_TYPEHASH = keccak256("CloudReport(string projectId,uint32 fromTimestamp,uint32 toTimestamp,bytes eigendaCert)"); /// @notice EigenDA cert verification success status code uint8 internal constant EIGENDA_CERT_SUCCESS = 1; - /// @notice Basis point constant for percentage calculations (100%) - uint256 internal constant WAD = 1e18; - /// IMMUTABLES - /// @notice The EigenLayer DelegationManager contract + /// @inheritdoc ICloudReportCompendium IDelegationManager public immutable delegationManager; - /// @notice The EigenLayer AllocationManager contract + /// @inheritdoc ICloudReportCompendium IAllocationManager public immutable allocationManager; /// @inheritdoc ICloudReportCompendium IEigenDACertVerifierRouter public immutable certVerifierRouter; - /// @notice The ComputeAVSRegistrar contract + /// @inheritdoc ICloudReportCompendium IComputeAVSRegistrar public immutable computeAVSRegistrar; - /// @notice The ComputeOperator contract + /// @inheritdoc ICloudReportCompendium IComputeOperator public immutable computeOperator; /// @inheritdoc ICloudReportCompendium address public immutable reportAttester; - /// @notice The operator set ID this compendium is tracking + /// @inheritdoc ICloudReportCompendium uint32 public immutable operatorSetId; - /// @notice Hash of the reference project ID that reports must match + /// @inheritdoc ICloudReportCompendium bytes32 public immutable referenceProjectIdHash; - /// @notice The strategy to slash when an operator fails checks + /// @inheritdoc ICloudReportCompendium IStrategy public immutable strategyToSlash; /// STORAGE - /// @notice The number of blocks within which a report must be submitted + /// @inheritdoc ICloudReportCompendium uint32 public reportFreshnessThreshold; - /// @notice The absolute amount in tokens to slash + /// @inheritdoc ICloudReportCompendium uint256 public slashAmountTokens; + /// @inheritdoc ICloudReportCompendium + uint32 public minSlashInterval; + + /// @inheritdoc ICloudReportCompendium + uint32 public lastSlashTimestamp; + /// @notice The latest cloud report submission CloudReportSubmission internal _latestReportSubmission; @@ -97,5 +100,5 @@ abstract contract CloudReportCompendiumStorage is ICloudReportCompendium { * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ - uint256[44] private __gap; + uint256[43] private __gap; } From f8d66e9bf82483b7cc8f026b6e23036d199c642f Mon Sep 17 00:00:00 2001 From: Gautham Anant Date: Wed, 12 Nov 2025 14:06:03 -0800 Subject: [PATCH 7/8] feat: one time allocation --- script/Deploy.s.sol | 4 +- .../v1.0.4-init/1-deployContracts.s.sol | 4 +- src/CloudReportCompendium.sol | 6 +-- src/ComputeOperator.sol | 41 ++++++++++++++++++- src/interfaces/ICloudReportCompendium.sol | 3 -- src/interfaces/IComputeOperator.sol | 12 ++++++ src/storage/CloudReportCompendiumStorage.sol | 8 ++-- src/storage/ComputeOperatorStorage.sol | 16 +++++++- 8 files changed, 77 insertions(+), 17 deletions(-) diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 8261062..7d6db06 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -13,6 +13,7 @@ import {IAllocationManager} from "@eigenlayer-contracts/src/contracts/interfaces import {IKeyRegistrar} from "@eigenlayer-contracts/src/contracts/interfaces/IKeyRegistrar.sol"; import {IPermissionController} from "@eigenlayer-contracts/src/contracts/interfaces/IPermissionController.sol"; import {IReleaseManager} from "@eigenlayer-contracts/src/contracts/interfaces/IReleaseManager.sol"; +import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; import {EmptyContract} from "@eigenlayer-contracts/src/test/mocks/EmptyContract.sol"; import {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; import {App} from "../src/App.sol"; @@ -80,7 +81,8 @@ contract Deploy is Parser { _allocationManager: params.allocationManager, _permissionController: params.permissionController, _appController: address(appControllerProxy), - _computeAVSRegistrar: address(computeAVSRegistrarProxy) + _computeAVSRegistrar: address(computeAVSRegistrarProxy), + _strategyToSlash: IStrategy(address(emptyContract)) }); AppController appControllerImpl = new AppController({ _version: params.version, diff --git a/script/releases/v1.0.4-init/1-deployContracts.s.sol b/script/releases/v1.0.4-init/1-deployContracts.s.sol index 88ac49e..82be673 100644 --- a/script/releases/v1.0.4-init/1-deployContracts.s.sol +++ b/script/releases/v1.0.4-init/1-deployContracts.s.sol @@ -13,6 +13,7 @@ import {IAllocationManager} from "@eigenlayer-contracts/src/contracts/interfaces import {IKeyRegistrar} from "@eigenlayer-contracts/src/contracts/interfaces/IKeyRegistrar.sol"; import {IPermissionController} from "@eigenlayer-contracts/src/contracts/interfaces/IPermissionController.sol"; import {IReleaseManager} from "@eigenlayer-contracts/src/contracts/interfaces/IReleaseManager.sol"; +import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; import {EmptyContract} from "@eigenlayer-contracts/src/test/mocks/EmptyContract.sol"; import {App} from "../../../src/App.sol"; @@ -73,7 +74,8 @@ contract Deploy is EOADeployer { _allocationManager: Env.allocationManager(), _permissionController: Env.permissionController(), _appController: address(appControllerProxy), - _computeAVSRegistrar: address(computeAVSRegistrarProxy) + _computeAVSRegistrar: address(computeAVSRegistrarProxy), + _strategyToSlash: IStrategy(address(emptyContract)) }); AppController appControllerImpl = new AppController({ diff --git a/src/CloudReportCompendium.sol b/src/CloudReportCompendium.sol index d89b019..42c1f00 100644 --- a/src/CloudReportCompendium.sol +++ b/src/CloudReportCompendium.sol @@ -169,14 +169,14 @@ contract CloudReportCompendium is address(computeAVSRegistrar), IAllocationManagerTypes.SlashingParams({ operator: address(computeOperator), - operatorSetId: operatorSetId, + operatorSetId: SLASHING_OPERATORSET_ID, strategies: strategies, wadsToSlash: wadsToSlash, description: reason }) ); - emit OperatorSlashed(address(computeOperator), operatorSetId, reason, slashId); + emit OperatorSlashed(address(computeOperator), SLASHING_OPERATORSET_ID, reason, slashId); } /** @@ -195,7 +195,7 @@ contract CloudReportCompendium is // Calculate slashable shares by multiplying by the magnitude IAllocationManager.Allocation memory allocation = allocationManager.getAllocation( address(computeOperator), - OperatorSet({avs: address(computeAVSRegistrar), id: operatorSetId}), + OperatorSet({avs: address(computeAVSRegistrar), id: SLASHING_OPERATORSET_ID}), strategyToSlash ); uint256 slashableShares = totalShares.mulDiv(allocation.currentMagnitude, WAD); diff --git a/src/ComputeOperator.sol b/src/ComputeOperator.sol index 91a0ba0..85d3aff 100644 --- a/src/ComputeOperator.sol +++ b/src/ComputeOperator.sol @@ -6,6 +6,8 @@ import { IAllocationManager, IAllocationManagerTypes } from "@eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; +import {OperatorSet} from "@eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; +import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; import {IPermissionController} from "@eigenlayer-contracts/src/contracts/interfaces/IPermissionController.sol"; import {Initializable} from "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; import {SemVerMixin} from "@eigenlayer-contracts/src/contracts/mixins/SemVerMixin.sol"; @@ -26,6 +28,7 @@ contract ComputeOperator is Initializable, SemVerMixin, ComputeOperatorStorage { * @param _permissionController The PermissionController contract from EigenLayer * @param _appController The AppController contract * @param _computeAVSRegistrar The ComputeAVSRegistrar contract + * @param _strategyToSlash The strategy to allocate and potentially slash */ constructor( string memory _version, @@ -33,11 +36,17 @@ contract ComputeOperator is Initializable, SemVerMixin, ComputeOperatorStorage { IAllocationManager _allocationManager, IPermissionController _permissionController, address _appController, - address _computeAVSRegistrar + address _computeAVSRegistrar, + IStrategy _strategyToSlash ) SemVerMixin(_version) ComputeOperatorStorage( - _delegationManager, _allocationManager, _permissionController, _appController, _computeAVSRegistrar + _delegationManager, + _allocationManager, + _permissionController, + _appController, + _computeAVSRegistrar, + _strategyToSlash ) { _disableInitializers(); @@ -62,4 +71,32 @@ contract ComputeOperator is Initializable, SemVerMixin, ComputeOperatorStorage { allocationManager.registerForOperatorSets(address(this), params); } + + /// @inheritdoc IComputeOperator + function performInitialAllocation() external { + // Check if allocation already exists + IAllocationManager.Allocation memory allocation = allocationManager.getAllocation( + address(this), OperatorSet({avs: computeAVSRegistrar, id: SLASHING_OPERATORSET_ID}), strategyToSlash + ); + require(allocation.currentMagnitude == 0, InitialAllocationAlreadyComplete()); + + // Create allocation params for operator set 0 + // 10% = 1e17 in WAD format (where 1e18 = 100%) + uint64 tenPercentMagnitude = 1e17; + + IStrategy[] memory strategies = new IStrategy[](1); + strategies[0] = strategyToSlash; + + uint64[] memory magnitudes = new uint64[](1); + magnitudes[0] = tenPercentMagnitude; + + IAllocationManagerTypes.AllocateParams[] memory allocateParams = new IAllocationManagerTypes.AllocateParams[](1); + allocateParams[0] = IAllocationManagerTypes.AllocateParams({ + operatorSet: OperatorSet({avs: computeAVSRegistrar, id: SLASHING_OPERATORSET_ID}), + strategies: strategies, + newMagnitudes: magnitudes + }); + + allocationManager.modifyAllocations(address(this), allocateParams); + } } diff --git a/src/interfaces/ICloudReportCompendium.sol b/src/interfaces/ICloudReportCompendium.sol index f2294e0..63bcde2 100644 --- a/src/interfaces/ICloudReportCompendium.sol +++ b/src/interfaces/ICloudReportCompendium.sol @@ -94,9 +94,6 @@ interface ICloudReportCompendium { /// @notice The address that must sign cloud reports. function reportAttester() external view returns (address); - /// @notice The operator set ID this compendium is tracking. - function operatorSetId() external view returns (uint32); - /// @notice Hash of the reference project ID that reports must match. function referenceProjectIdHash() external view returns (bytes32); diff --git a/src/interfaces/IComputeOperator.sol b/src/interfaces/IComputeOperator.sol index fbdf6ea..ad162ef 100644 --- a/src/interfaces/IComputeOperator.sol +++ b/src/interfaces/IComputeOperator.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.27; +import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; + interface IComputeOperator { /// @notice Thrown when the caller is not the ComputeAVS error NotComputeAVS(); @@ -8,6 +10,9 @@ interface IComputeOperator { /// @notice Thrown when the caller is not the AppController error NotAppController(); + /// @notice Thrown when the initial allocation has already been performed + error InitialAllocationAlreadyComplete(); + /** * @notice Initializes the ComputeOperator * @param operatorMetadataURI The metadata URI for the operator @@ -20,4 +25,11 @@ interface IComputeOperator { * @dev This function can only be called by the AppController */ function registerForOperatorSet(uint32 operatorSetId) external; + + /** + * @notice Performs a one-time allocation of 10% of stake to operator set 0 + * @dev This function can only be called when the initial allocation has not yet been performed + * @dev Allocates 10% (1e17 in WAD format) of the configured strategyToSlash to operator set 0 + */ + function performInitialAllocation() external; } diff --git a/src/storage/CloudReportCompendiumStorage.sol b/src/storage/CloudReportCompendiumStorage.sol index 73ab6d9..22f298d 100644 --- a/src/storage/CloudReportCompendiumStorage.sol +++ b/src/storage/CloudReportCompendiumStorage.sol @@ -24,12 +24,14 @@ abstract contract CloudReportCompendiumStorage is ICloudReportCompendium { IComputeAVSRegistrar computeAVSRegistrar; IComputeOperator computeOperator; address reportAttester; - uint32 operatorSetId; string referenceProjectId; IStrategy strategyToSlash; } /// CONSTANTS + /// @notice The operator set ID used for slashing + uint32 public constant SLASHING_OPERATORSET_ID = 0; + /// @inheritdoc ICloudReportCompendium bytes32 public constant CLOUD_REPORT_TYPEHASH = keccak256("CloudReport(string projectId,uint32 fromTimestamp,uint32 toTimestamp,bytes eigendaCert)"); @@ -57,9 +59,6 @@ abstract contract CloudReportCompendiumStorage is ICloudReportCompendium { /// @inheritdoc ICloudReportCompendium address public immutable reportAttester; - /// @inheritdoc ICloudReportCompendium - uint32 public immutable operatorSetId; - /// @inheritdoc ICloudReportCompendium bytes32 public immutable referenceProjectIdHash; @@ -90,7 +89,6 @@ abstract contract CloudReportCompendiumStorage is ICloudReportCompendium { computeAVSRegistrar = params.computeAVSRegistrar; computeOperator = params.computeOperator; reportAttester = params.reportAttester; - operatorSetId = params.operatorSetId; referenceProjectIdHash = keccak256(abi.encodePacked(params.referenceProjectId)); strategyToSlash = params.strategyToSlash; } diff --git a/src/storage/ComputeOperatorStorage.sol b/src/storage/ComputeOperatorStorage.sol index 1a72b2d..c87e5b5 100644 --- a/src/storage/ComputeOperatorStorage.sol +++ b/src/storage/ComputeOperatorStorage.sol @@ -4,10 +4,15 @@ pragma solidity ^0.8.27; import {IDelegationManager} from "@eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; import {IAllocationManager} from "@eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {IPermissionController} from "@eigenlayer-contracts/src/contracts/interfaces/IPermissionController.sol"; +import {IStrategy} from "@eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; import {IComputeOperator} from "../interfaces/IComputeOperator.sol"; abstract contract ComputeOperatorStorage is IComputeOperator { - /// CONSTANTS & IMMUTABLES + /// CONSTANTS + /// @notice The operator set ID used for slashing + uint32 public constant SLASHING_OPERATORSET_ID = 0; + + /// IMMUTABLES /// @notice The EigenLayer DelegationManager contract IDelegationManager public immutable delegationManager; @@ -23,18 +28,25 @@ abstract contract ComputeOperatorStorage is IComputeOperator { /// @notice The ComputeAVSRegistrar contract address public immutable computeAVSRegistrar; + /// @notice The strategy to slash when operator fails to meet requirements + IStrategy public immutable strategyToSlash; + + /// STORAGE + constructor( IDelegationManager _delegationManager, IAllocationManager _allocationManager, IPermissionController _permissionController, address _appController, - address _computeAVSRegistrar + address _computeAVSRegistrar, + IStrategy _strategyToSlash ) { delegationManager = _delegationManager; allocationManager = _allocationManager; permissionController = _permissionController; appController = _appController; computeAVSRegistrar = _computeAVSRegistrar; + strategyToSlash = _strategyToSlash; } /** From f0353b72bfe2136cef4e4d7e4456cca2b5dfd189 Mon Sep 17 00:00:00 2001 From: Gautham Anant Date: Thu, 13 Nov 2025 11:00:15 -0800 Subject: [PATCH 8/8] chore: update bindings --- .../v1/CloudReportCompendium/binding.go | 275 ++++++++++++++++-- pkg/bindings/v1/ComputeOperator/binding.go | 85 +++++- .../v2/CloudReportCompendium/binding.go | 217 ++++++++++++-- pkg/bindings/v2/ComputeOperator/binding.go | 126 +++++++- 4 files changed, 638 insertions(+), 65 deletions(-) diff --git a/pkg/bindings/v1/CloudReportCompendium/binding.go b/pkg/bindings/v1/CloudReportCompendium/binding.go index 1f7beb7..47cbc58 100644 --- a/pkg/bindings/v1/CloudReportCompendium/binding.go +++ b/pkg/bindings/v1/CloudReportCompendium/binding.go @@ -37,7 +37,6 @@ type CloudReportCompendiumStorageConstructorParams struct { ComputeAVSRegistrar common.Address ComputeOperator common.Address ReportAttester common.Address - OperatorSetId uint32 ReferenceProjectId string StrategyToSlash common.Address } @@ -53,14 +52,13 @@ type ICloudReportCompendiumCloudReport struct { // ICloudReportCompendiumCloudReportSubmission is an auto generated low-level Go binding around an user-defined struct. type ICloudReportCompendiumCloudReportSubmission struct { SubmissionTimestamp uint32 - FromTimestamp uint32 ToTimestamp uint32 EigendaCertHash [20]byte } // CloudReportCompendiumMetaData contains all meta data concerning the CloudReportCompendium contract. var CloudReportCompendiumMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structCloudReportCompendiumStorage.ConstructorParams\",\"components\":[{\"name\":\"delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"certVerifierRouter\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"},{\"name\":\"computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"},{\"name\":\"computeOperator\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"},{\"name\":\"reportAttester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceProjectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"strategyToSlash\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOUD_REPORT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateReportDigestHash\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"certVerifierRouter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"latestReportSubmission\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReportSubmission\",\"components\":[{\"name\":\"submissionTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCertHash\",\"type\":\"bytes20\",\"internalType\":\"bytes20\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorSetId\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"referenceProjectIdHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportAttester\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportFreshnessThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setReportFreshnessThreshold\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashAmountTokens\",\"inputs\":[{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashAmountTokens\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyToSlash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitReport\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"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\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"reason\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"slashId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportFreshnessThresholdSet\",\"inputs\":[{\"name\":\"reportFreshnessThreshold\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportSubmitted\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashAmountTokensSet\",\"inputs\":[{\"name\":\"slashAmountTokens\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InsufficientAllocation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCertificate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProjectId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReportTimestamps\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoSlashRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportChainTimestampMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportFromFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportTooStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structCloudReportCompendiumStorage.ConstructorParams\",\"components\":[{\"name\":\"delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"certVerifierRouter\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"},{\"name\":\"computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"},{\"name\":\"computeOperator\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"},{\"name\":\"reportAttester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"referenceProjectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"strategyToSlash\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOUD_REPORT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SLASHING_OPERATORSET_ID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateReportDigestHash\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"certVerifierRouter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minSlashInterval\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lastSlashTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReportSubmission\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReportSubmission\",\"components\":[{\"name\":\"submissionTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCertHash\",\"type\":\"bytes20\",\"internalType\":\"bytes20\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minSlashInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"referenceProjectIdHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportAttester\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportFreshnessThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setMinSlashInterval\",\"inputs\":[{\"name\":\"_minSlashInterval\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setReportFreshnessThreshold\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashAmountTokens\",\"inputs\":[{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashAmountTokens\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyToSlash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitReport\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"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\":\"MinSlashIntervalSet\",\"inputs\":[{\"name\":\"minSlashInterval\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"reason\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"slashId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportFreshnessThresholdSet\",\"inputs\":[{\"name\":\"reportFreshnessThreshold\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportSubmitted\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashAmountTokensSet\",\"inputs\":[{\"name\":\"slashAmountTokens\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InsufficientAllocation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCertificate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProjectId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReportTimestamps\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoSlashRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportChainTimestampMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportFromFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportTooStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashTooSoon\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", } // CloudReportCompendiumABI is the input ABI used to generate the binding from. @@ -240,6 +238,37 @@ func (_CloudReportCompendium *CloudReportCompendiumCallerSession) CLOUDREPORTTYP return _CloudReportCompendium.Contract.CLOUDREPORTTYPEHASH(&_CloudReportCompendium.CallOpts) } +// SLASHINGOPERATORSETID is a free data retrieval call binding the contract method 0x96b313c8. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) SLASHINGOPERATORSETID(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "SLASHING_OPERATORSET_ID") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// SLASHINGOPERATORSETID is a free data retrieval call binding the contract method 0x96b313c8. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumSession) SLASHINGOPERATORSETID() (uint32, error) { + return _CloudReportCompendium.Contract.SLASHINGOPERATORSETID(&_CloudReportCompendium.CallOpts) +} + +// SLASHINGOPERATORSETID is a free data retrieval call binding the contract method 0x96b313c8. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) SLASHINGOPERATORSETID() (uint32, error) { + return _CloudReportCompendium.Contract.SLASHINGOPERATORSETID(&_CloudReportCompendium.CallOpts) +} + // AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. // // Solidity: function allocationManager() view returns(address) @@ -457,9 +486,40 @@ func (_CloudReportCompendium *CloudReportCompendiumCallerSession) DomainSeparato return _CloudReportCompendium.Contract.DomainSeparator(&_CloudReportCompendium.CallOpts) } +// LastSlashTimestamp is a free data retrieval call binding the contract method 0xc77f5062. +// +// Solidity: function lastSlashTimestamp() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) LastSlashTimestamp(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _CloudReportCompendium.contract.Call(opts, &out, "lastSlashTimestamp") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// LastSlashTimestamp is a free data retrieval call binding the contract method 0xc77f5062. +// +// Solidity: function lastSlashTimestamp() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumSession) LastSlashTimestamp() (uint32, error) { + return _CloudReportCompendium.Contract.LastSlashTimestamp(&_CloudReportCompendium.CallOpts) +} + +// LastSlashTimestamp is a free data retrieval call binding the contract method 0xc77f5062. +// +// Solidity: function lastSlashTimestamp() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) LastSlashTimestamp() (uint32, error) { + return _CloudReportCompendium.Contract.LastSlashTimestamp(&_CloudReportCompendium.CallOpts) +} + // LatestReportSubmission is a free data retrieval call binding the contract method 0x371517a4. // -// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +// Solidity: function latestReportSubmission() view returns((uint32,uint32,bytes20)) func (_CloudReportCompendium *CloudReportCompendiumCaller) LatestReportSubmission(opts *bind.CallOpts) (ICloudReportCompendiumCloudReportSubmission, error) { var out []interface{} err := _CloudReportCompendium.contract.Call(opts, &out, "latestReportSubmission") @@ -476,24 +536,24 @@ func (_CloudReportCompendium *CloudReportCompendiumCaller) LatestReportSubmissio // LatestReportSubmission is a free data retrieval call binding the contract method 0x371517a4. // -// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +// Solidity: function latestReportSubmission() view returns((uint32,uint32,bytes20)) func (_CloudReportCompendium *CloudReportCompendiumSession) LatestReportSubmission() (ICloudReportCompendiumCloudReportSubmission, error) { return _CloudReportCompendium.Contract.LatestReportSubmission(&_CloudReportCompendium.CallOpts) } // LatestReportSubmission is a free data retrieval call binding the contract method 0x371517a4. // -// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +// Solidity: function latestReportSubmission() view returns((uint32,uint32,bytes20)) func (_CloudReportCompendium *CloudReportCompendiumCallerSession) LatestReportSubmission() (ICloudReportCompendiumCloudReportSubmission, error) { return _CloudReportCompendium.Contract.LatestReportSubmission(&_CloudReportCompendium.CallOpts) } -// OperatorSetId is a free data retrieval call binding the contract method 0xe1ebfc37. +// MinSlashInterval is a free data retrieval call binding the contract method 0x18e38c93. // -// Solidity: function operatorSetId() view returns(uint32) -func (_CloudReportCompendium *CloudReportCompendiumCaller) OperatorSetId(opts *bind.CallOpts) (uint32, error) { +// Solidity: function minSlashInterval() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCaller) MinSlashInterval(opts *bind.CallOpts) (uint32, error) { var out []interface{} - err := _CloudReportCompendium.contract.Call(opts, &out, "operatorSetId") + err := _CloudReportCompendium.contract.Call(opts, &out, "minSlashInterval") if err != nil { return *new(uint32), err @@ -505,18 +565,18 @@ func (_CloudReportCompendium *CloudReportCompendiumCaller) OperatorSetId(opts *b } -// OperatorSetId is a free data retrieval call binding the contract method 0xe1ebfc37. +// MinSlashInterval is a free data retrieval call binding the contract method 0x18e38c93. // -// Solidity: function operatorSetId() view returns(uint32) -func (_CloudReportCompendium *CloudReportCompendiumSession) OperatorSetId() (uint32, error) { - return _CloudReportCompendium.Contract.OperatorSetId(&_CloudReportCompendium.CallOpts) +// Solidity: function minSlashInterval() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumSession) MinSlashInterval() (uint32, error) { + return _CloudReportCompendium.Contract.MinSlashInterval(&_CloudReportCompendium.CallOpts) } -// OperatorSetId is a free data retrieval call binding the contract method 0xe1ebfc37. +// MinSlashInterval is a free data retrieval call binding the contract method 0x18e38c93. // -// Solidity: function operatorSetId() view returns(uint32) -func (_CloudReportCompendium *CloudReportCompendiumCallerSession) OperatorSetId() (uint32, error) { - return _CloudReportCompendium.Contract.OperatorSetId(&_CloudReportCompendium.CallOpts) +// Solidity: function minSlashInterval() view returns(uint32) +func (_CloudReportCompendium *CloudReportCompendiumCallerSession) MinSlashInterval() (uint32, error) { + return _CloudReportCompendium.Contract.MinSlashInterval(&_CloudReportCompendium.CallOpts) } // PermissionController is a free data retrieval call binding the contract method 0x4657e26a. @@ -736,25 +796,46 @@ func (_CloudReportCompendium *CloudReportCompendiumCallerSession) Version() (str return _CloudReportCompendium.Contract.Version(&_CloudReportCompendium.CallOpts) } -// Initialize is a paid mutator transaction binding the contract method 0x282558d9. +// Initialize is a paid mutator transaction binding the contract method 0x0d302011. // -// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() -func (_CloudReportCompendium *CloudReportCompendiumTransactor) Initialize(opts *bind.TransactOpts, _reportFreshnessThreshold uint32, _slashAmountTokens *big.Int) (*types.Transaction, error) { - return _CloudReportCompendium.contract.Transact(opts, "initialize", _reportFreshnessThreshold, _slashAmountTokens) +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens, uint32 _minSlashInterval) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactor) Initialize(opts *bind.TransactOpts, _reportFreshnessThreshold uint32, _slashAmountTokens *big.Int, _minSlashInterval uint32) (*types.Transaction, error) { + return _CloudReportCompendium.contract.Transact(opts, "initialize", _reportFreshnessThreshold, _slashAmountTokens, _minSlashInterval) } -// Initialize is a paid mutator transaction binding the contract method 0x282558d9. +// Initialize is a paid mutator transaction binding the contract method 0x0d302011. // -// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() -func (_CloudReportCompendium *CloudReportCompendiumSession) Initialize(_reportFreshnessThreshold uint32, _slashAmountTokens *big.Int) (*types.Transaction, error) { - return _CloudReportCompendium.Contract.Initialize(&_CloudReportCompendium.TransactOpts, _reportFreshnessThreshold, _slashAmountTokens) +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens, uint32 _minSlashInterval) returns() +func (_CloudReportCompendium *CloudReportCompendiumSession) Initialize(_reportFreshnessThreshold uint32, _slashAmountTokens *big.Int, _minSlashInterval uint32) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.Initialize(&_CloudReportCompendium.TransactOpts, _reportFreshnessThreshold, _slashAmountTokens, _minSlashInterval) } -// Initialize is a paid mutator transaction binding the contract method 0x282558d9. +// Initialize is a paid mutator transaction binding the contract method 0x0d302011. // -// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() -func (_CloudReportCompendium *CloudReportCompendiumTransactorSession) Initialize(_reportFreshnessThreshold uint32, _slashAmountTokens *big.Int) (*types.Transaction, error) { - return _CloudReportCompendium.Contract.Initialize(&_CloudReportCompendium.TransactOpts, _reportFreshnessThreshold, _slashAmountTokens) +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens, uint32 _minSlashInterval) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactorSession) Initialize(_reportFreshnessThreshold uint32, _slashAmountTokens *big.Int, _minSlashInterval uint32) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.Initialize(&_CloudReportCompendium.TransactOpts, _reportFreshnessThreshold, _slashAmountTokens, _minSlashInterval) +} + +// SetMinSlashInterval is a paid mutator transaction binding the contract method 0xe7a6e55a. +// +// Solidity: function setMinSlashInterval(uint32 _minSlashInterval) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactor) SetMinSlashInterval(opts *bind.TransactOpts, _minSlashInterval uint32) (*types.Transaction, error) { + return _CloudReportCompendium.contract.Transact(opts, "setMinSlashInterval", _minSlashInterval) +} + +// SetMinSlashInterval is a paid mutator transaction binding the contract method 0xe7a6e55a. +// +// Solidity: function setMinSlashInterval(uint32 _minSlashInterval) returns() +func (_CloudReportCompendium *CloudReportCompendiumSession) SetMinSlashInterval(_minSlashInterval uint32) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.SetMinSlashInterval(&_CloudReportCompendium.TransactOpts, _minSlashInterval) +} + +// SetMinSlashInterval is a paid mutator transaction binding the contract method 0xe7a6e55a. +// +// Solidity: function setMinSlashInterval(uint32 _minSlashInterval) returns() +func (_CloudReportCompendium *CloudReportCompendiumTransactorSession) SetMinSlashInterval(_minSlashInterval uint32) (*types.Transaction, error) { + return _CloudReportCompendium.Contract.SetMinSlashInterval(&_CloudReportCompendium.TransactOpts, _minSlashInterval) } // SetReportFreshnessThreshold is a paid mutator transaction binding the contract method 0xe32c101d. @@ -975,6 +1056,140 @@ func (_CloudReportCompendium *CloudReportCompendiumFilterer) ParseInitialized(lo return event, nil } +// CloudReportCompendiumMinSlashIntervalSetIterator is returned from FilterMinSlashIntervalSet and is used to iterate over the raw logs and unpacked data for MinSlashIntervalSet events raised by the CloudReportCompendium contract. +type CloudReportCompendiumMinSlashIntervalSetIterator struct { + Event *CloudReportCompendiumMinSlashIntervalSet // 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 *CloudReportCompendiumMinSlashIntervalSetIterator) 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(CloudReportCompendiumMinSlashIntervalSet) + 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(CloudReportCompendiumMinSlashIntervalSet) + 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 *CloudReportCompendiumMinSlashIntervalSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CloudReportCompendiumMinSlashIntervalSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CloudReportCompendiumMinSlashIntervalSet represents a MinSlashIntervalSet event raised by the CloudReportCompendium contract. +type CloudReportCompendiumMinSlashIntervalSet struct { + MinSlashInterval uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinSlashIntervalSet is a free log retrieval operation binding the contract event 0xfe8b1886127fe004b6763d8d4bc454238f70a4bbbdb1afe92d527cb1dd7adf02. +// +// Solidity: event MinSlashIntervalSet(uint32 minSlashInterval) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) FilterMinSlashIntervalSet(opts *bind.FilterOpts) (*CloudReportCompendiumMinSlashIntervalSetIterator, error) { + + logs, sub, err := _CloudReportCompendium.contract.FilterLogs(opts, "MinSlashIntervalSet") + if err != nil { + return nil, err + } + return &CloudReportCompendiumMinSlashIntervalSetIterator{contract: _CloudReportCompendium.contract, event: "MinSlashIntervalSet", logs: logs, sub: sub}, nil +} + +// WatchMinSlashIntervalSet is a free log subscription operation binding the contract event 0xfe8b1886127fe004b6763d8d4bc454238f70a4bbbdb1afe92d527cb1dd7adf02. +// +// Solidity: event MinSlashIntervalSet(uint32 minSlashInterval) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) WatchMinSlashIntervalSet(opts *bind.WatchOpts, sink chan<- *CloudReportCompendiumMinSlashIntervalSet) (event.Subscription, error) { + + logs, sub, err := _CloudReportCompendium.contract.WatchLogs(opts, "MinSlashIntervalSet") + 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(CloudReportCompendiumMinSlashIntervalSet) + if err := _CloudReportCompendium.contract.UnpackLog(event, "MinSlashIntervalSet", 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 +} + +// ParseMinSlashIntervalSet is a log parse operation binding the contract event 0xfe8b1886127fe004b6763d8d4bc454238f70a4bbbdb1afe92d527cb1dd7adf02. +// +// Solidity: event MinSlashIntervalSet(uint32 minSlashInterval) +func (_CloudReportCompendium *CloudReportCompendiumFilterer) ParseMinSlashIntervalSet(log types.Log) (*CloudReportCompendiumMinSlashIntervalSet, error) { + event := new(CloudReportCompendiumMinSlashIntervalSet) + if err := _CloudReportCompendium.contract.UnpackLog(event, "MinSlashIntervalSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // CloudReportCompendiumOperatorSlashedIterator is returned from FilterOperatorSlashed and is used to iterate over the raw logs and unpacked data for OperatorSlashed events raised by the CloudReportCompendium contract. type CloudReportCompendiumOperatorSlashedIterator struct { Event *CloudReportCompendiumOperatorSlashed // Event containing the contract specifics and raw log diff --git a/pkg/bindings/v1/ComputeOperator/binding.go b/pkg/bindings/v1/ComputeOperator/binding.go index 437f43a..ac89c4c 100644 --- a/pkg/bindings/v1/ComputeOperator/binding.go +++ b/pkg/bindings/v1/ComputeOperator/binding.go @@ -31,7 +31,7 @@ var ( // ComputeOperatorMetaData contains all meta data concerning the ComputeOperator contract. var ComputeOperatorMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_appController\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"appController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"operatorMetadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerForOperatorSet\",\"inputs\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"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\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotAppController\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotComputeAVS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_appController\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_strategyToSlash\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"SLASHING_OPERATORSET_ID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"appController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"operatorMetadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"performInitialAllocation\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerForOperatorSet\",\"inputs\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyToSlash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"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\":\"error\",\"name\":\"InitialAllocationAlreadyComplete\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotAppController\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotComputeAVS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", } // ComputeOperatorABI is the input ABI used to generate the binding from. @@ -180,6 +180,37 @@ func (_ComputeOperator *ComputeOperatorTransactorRaw) Transact(opts *bind.Transa return _ComputeOperator.Contract.contract.Transact(opts, method, params...) } +// SLASHINGOPERATORSETID is a free data retrieval call binding the contract method 0x96b313c8. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (_ComputeOperator *ComputeOperatorCaller) SLASHINGOPERATORSETID(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _ComputeOperator.contract.Call(opts, &out, "SLASHING_OPERATORSET_ID") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// SLASHINGOPERATORSETID is a free data retrieval call binding the contract method 0x96b313c8. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (_ComputeOperator *ComputeOperatorSession) SLASHINGOPERATORSETID() (uint32, error) { + return _ComputeOperator.Contract.SLASHINGOPERATORSETID(&_ComputeOperator.CallOpts) +} + +// SLASHINGOPERATORSETID is a free data retrieval call binding the contract method 0x96b313c8. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (_ComputeOperator *ComputeOperatorCallerSession) SLASHINGOPERATORSETID() (uint32, error) { + return _ComputeOperator.Contract.SLASHINGOPERATORSETID(&_ComputeOperator.CallOpts) +} + // AllocationManager is a free data retrieval call binding the contract method 0xca8aa7c7. // // Solidity: function allocationManager() view returns(address) @@ -335,6 +366,37 @@ func (_ComputeOperator *ComputeOperatorCallerSession) PermissionController() (co return _ComputeOperator.Contract.PermissionController(&_ComputeOperator.CallOpts) } +// StrategyToSlash is a free data retrieval call binding the contract method 0x5ac080f1. +// +// Solidity: function strategyToSlash() view returns(address) +func (_ComputeOperator *ComputeOperatorCaller) StrategyToSlash(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ComputeOperator.contract.Call(opts, &out, "strategyToSlash") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// StrategyToSlash is a free data retrieval call binding the contract method 0x5ac080f1. +// +// Solidity: function strategyToSlash() view returns(address) +func (_ComputeOperator *ComputeOperatorSession) StrategyToSlash() (common.Address, error) { + return _ComputeOperator.Contract.StrategyToSlash(&_ComputeOperator.CallOpts) +} + +// StrategyToSlash is a free data retrieval call binding the contract method 0x5ac080f1. +// +// Solidity: function strategyToSlash() view returns(address) +func (_ComputeOperator *ComputeOperatorCallerSession) StrategyToSlash() (common.Address, error) { + return _ComputeOperator.Contract.StrategyToSlash(&_ComputeOperator.CallOpts) +} + // Version is a free data retrieval call binding the contract method 0x54fd4d50. // // Solidity: function version() view returns(string) @@ -387,6 +449,27 @@ func (_ComputeOperator *ComputeOperatorTransactorSession) Initialize(operatorMet return _ComputeOperator.Contract.Initialize(&_ComputeOperator.TransactOpts, operatorMetadataURI) } +// PerformInitialAllocation is a paid mutator transaction binding the contract method 0x33cd0d13. +// +// Solidity: function performInitialAllocation() returns() +func (_ComputeOperator *ComputeOperatorTransactor) PerformInitialAllocation(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ComputeOperator.contract.Transact(opts, "performInitialAllocation") +} + +// PerformInitialAllocation is a paid mutator transaction binding the contract method 0x33cd0d13. +// +// Solidity: function performInitialAllocation() returns() +func (_ComputeOperator *ComputeOperatorSession) PerformInitialAllocation() (*types.Transaction, error) { + return _ComputeOperator.Contract.PerformInitialAllocation(&_ComputeOperator.TransactOpts) +} + +// PerformInitialAllocation is a paid mutator transaction binding the contract method 0x33cd0d13. +// +// Solidity: function performInitialAllocation() returns() +func (_ComputeOperator *ComputeOperatorTransactorSession) PerformInitialAllocation() (*types.Transaction, error) { + return _ComputeOperator.Contract.PerformInitialAllocation(&_ComputeOperator.TransactOpts) +} + // RegisterForOperatorSet is a paid mutator transaction binding the contract method 0x4ca62978. // // Solidity: function registerForOperatorSet(uint32 operatorSetId) returns() diff --git a/pkg/bindings/v2/CloudReportCompendium/binding.go b/pkg/bindings/v2/CloudReportCompendium/binding.go index f13d848..219d924 100644 --- a/pkg/bindings/v2/CloudReportCompendium/binding.go +++ b/pkg/bindings/v2/CloudReportCompendium/binding.go @@ -32,7 +32,6 @@ type CloudReportCompendiumStorageConstructorParams struct { ComputeAVSRegistrar common.Address ComputeOperator common.Address ReportAttester common.Address - OperatorSetId uint32 ReferenceProjectId string StrategyToSlash common.Address } @@ -48,14 +47,13 @@ type ICloudReportCompendiumCloudReport struct { // ICloudReportCompendiumCloudReportSubmission is an auto generated low-level Go binding around an user-defined struct. type ICloudReportCompendiumCloudReportSubmission struct { SubmissionTimestamp uint32 - FromTimestamp uint32 ToTimestamp uint32 EigendaCertHash [20]byte } // CloudReportCompendiumMetaData contains all meta data concerning the CloudReportCompendium contract. var CloudReportCompendiumMetaData = bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structCloudReportCompendiumStorage.ConstructorParams\",\"components\":[{\"name\":\"delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"certVerifierRouter\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"},{\"name\":\"computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"},{\"name\":\"computeOperator\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"},{\"name\":\"reportAttester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceProjectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"strategyToSlash\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOUD_REPORT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateReportDigestHash\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"certVerifierRouter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"latestReportSubmission\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReportSubmission\",\"components\":[{\"name\":\"submissionTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCertHash\",\"type\":\"bytes20\",\"internalType\":\"bytes20\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorSetId\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"referenceProjectIdHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportAttester\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportFreshnessThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setReportFreshnessThreshold\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashAmountTokens\",\"inputs\":[{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashAmountTokens\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyToSlash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitReport\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"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\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"reason\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"slashId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportFreshnessThresholdSet\",\"inputs\":[{\"name\":\"reportFreshnessThreshold\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportSubmitted\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashAmountTokensSet\",\"inputs\":[{\"name\":\"slashAmountTokens\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InsufficientAllocation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCertificate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProjectId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReportTimestamps\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoSlashRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportChainTimestampMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportFromFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportTooStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structCloudReportCompendiumStorage.ConstructorParams\",\"components\":[{\"name\":\"delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"certVerifierRouter\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"},{\"name\":\"computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"},{\"name\":\"computeOperator\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"},{\"name\":\"reportAttester\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"referenceProjectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"strategyToSlash\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CLOUD_REPORT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SLASHING_OPERATORSET_ID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"calculateReportDigestHash\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"certVerifierRouter\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEigenDACertVerifierRouter\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeAVSRegistrar\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeOperator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIComputeOperator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minSlashInterval\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lastSlashTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReportSubmission\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReportSubmission\",\"components\":[{\"name\":\"submissionTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCertHash\",\"type\":\"bytes20\",\"internalType\":\"bytes20\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minSlashInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"referenceProjectIdHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportAttester\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reportFreshnessThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setMinSlashInterval\",\"inputs\":[{\"name\":\"_minSlashInterval\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setReportFreshnessThreshold\",\"inputs\":[{\"name\":\"_reportFreshnessThreshold\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setSlashAmountTokens\",\"inputs\":[{\"name\":\"_slashAmountTokens\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slashAmountTokens\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"strategyToSlash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submitReport\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"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\":\"MinSlashIntervalSet\",\"inputs\":[{\"name\":\"minSlashInterval\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSlashed\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"reason\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"slashId\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportFreshnessThresholdSet\",\"inputs\":[{\"name\":\"reportFreshnessThreshold\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ReportSubmitted\",\"inputs\":[{\"name\":\"report\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structICloudReportCompendium.CloudReport\",\"components\":[{\"name\":\"projectId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"fromTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"toTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"eigendaCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SlashAmountTokensSet\",\"inputs\":[{\"name\":\"slashAmountTokens\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InsufficientAllocation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCertificate\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProjectId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReportTimestamps\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoSlashRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportChainTimestampMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportFromFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReportTooStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SlashTooSoon\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", ID: "CloudReportCompendium", } @@ -82,7 +80,7 @@ func (c *CloudReportCompendium) Instance(backend bind.ContractBackend, addr comm // PackConstructor is the Go binding used to pack the parameters required for // contract deployment. // -// Solidity: constructor(string _version, address _permissionController, (address,address,address,address,address,address,uint32,string,address) params) returns() +// Solidity: constructor(string _version, address _permissionController, (address,address,address,address,address,address,string,address) params) returns() func (cloudReportCompendium *CloudReportCompendium) PackConstructor(_version string, _permissionController common.Address, params CloudReportCompendiumStorageConstructorParams) []byte { enc, err := cloudReportCompendium.abi.Pack("", _version, _permissionController, params) if err != nil { @@ -126,6 +124,41 @@ func (cloudReportCompendium *CloudReportCompendium) UnpackCLOUDREPORTTYPEHASH(da return out0, nil } +// PackSLASHINGOPERATORSETID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x96b313c8. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) PackSLASHINGOPERATORSETID() []byte { + enc, err := cloudReportCompendium.abi.Pack("SLASHING_OPERATORSET_ID") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSLASHINGOPERATORSETID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x96b313c8. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) TryPackSLASHINGOPERATORSETID() ([]byte, error) { + return cloudReportCompendium.abi.Pack("SLASHING_OPERATORSET_ID") +} + +// UnpackSLASHINGOPERATORSETID is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x96b313c8. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) UnpackSLASHINGOPERATORSETID(data []byte) (uint32, error) { + out, err := cloudReportCompendium.abi.Unpack("SLASHING_OPERATORSET_ID", data) + if err != nil { + return *new(uint32), err + } + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + return out0, nil +} + // PackAllocationManager is the Go binding used to pack the parameters required for calling // the contract method with ID 0xca8aa7c7. This method will panic if any // invalid/nil inputs are passed. @@ -372,12 +405,12 @@ func (cloudReportCompendium *CloudReportCompendium) UnpackDomainSeparator(data [ } // PackInitialize is the Go binding used to pack the parameters required for calling -// the contract method with ID 0x282558d9. This method will panic if any +// the contract method with ID 0x0d302011. This method will panic if any // invalid/nil inputs are passed. // -// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() -func (cloudReportCompendium *CloudReportCompendium) PackInitialize(reportFreshnessThreshold uint32, slashAmountTokens *big.Int) []byte { - enc, err := cloudReportCompendium.abi.Pack("initialize", reportFreshnessThreshold, slashAmountTokens) +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens, uint32 _minSlashInterval) returns() +func (cloudReportCompendium *CloudReportCompendium) PackInitialize(reportFreshnessThreshold uint32, slashAmountTokens *big.Int, minSlashInterval uint32) []byte { + enc, err := cloudReportCompendium.abi.Pack("initialize", reportFreshnessThreshold, slashAmountTokens, minSlashInterval) if err != nil { panic(err) } @@ -385,19 +418,54 @@ func (cloudReportCompendium *CloudReportCompendium) PackInitialize(reportFreshne } // TryPackInitialize is the Go binding used to pack the parameters required for calling -// the contract method with ID 0x282558d9. This method will return an error +// the contract method with ID 0x0d302011. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens, uint32 _minSlashInterval) returns() +func (cloudReportCompendium *CloudReportCompendium) TryPackInitialize(reportFreshnessThreshold uint32, slashAmountTokens *big.Int, minSlashInterval uint32) ([]byte, error) { + return cloudReportCompendium.abi.Pack("initialize", reportFreshnessThreshold, slashAmountTokens, minSlashInterval) +} + +// PackLastSlashTimestamp is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc77f5062. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function lastSlashTimestamp() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) PackLastSlashTimestamp() []byte { + enc, err := cloudReportCompendium.abi.Pack("lastSlashTimestamp") + if err != nil { + panic(err) + } + return enc +} + +// TryPackLastSlashTimestamp is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc77f5062. This method will return an error // if any inputs are invalid/nil. // -// Solidity: function initialize(uint32 _reportFreshnessThreshold, uint256 _slashAmountTokens) returns() -func (cloudReportCompendium *CloudReportCompendium) TryPackInitialize(reportFreshnessThreshold uint32, slashAmountTokens *big.Int) ([]byte, error) { - return cloudReportCompendium.abi.Pack("initialize", reportFreshnessThreshold, slashAmountTokens) +// Solidity: function lastSlashTimestamp() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) TryPackLastSlashTimestamp() ([]byte, error) { + return cloudReportCompendium.abi.Pack("lastSlashTimestamp") +} + +// UnpackLastSlashTimestamp is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xc77f5062. +// +// Solidity: function lastSlashTimestamp() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) UnpackLastSlashTimestamp(data []byte) (uint32, error) { + out, err := cloudReportCompendium.abi.Unpack("lastSlashTimestamp", data) + if err != nil { + return *new(uint32), err + } + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + return out0, nil } // PackLatestReportSubmission is the Go binding used to pack the parameters required for calling // the contract method with ID 0x371517a4. This method will panic if any // invalid/nil inputs are passed. // -// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +// Solidity: function latestReportSubmission() view returns((uint32,uint32,bytes20)) func (cloudReportCompendium *CloudReportCompendium) PackLatestReportSubmission() []byte { enc, err := cloudReportCompendium.abi.Pack("latestReportSubmission") if err != nil { @@ -410,7 +478,7 @@ func (cloudReportCompendium *CloudReportCompendium) PackLatestReportSubmission() // the contract method with ID 0x371517a4. This method will return an error // if any inputs are invalid/nil. // -// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +// Solidity: function latestReportSubmission() view returns((uint32,uint32,bytes20)) func (cloudReportCompendium *CloudReportCompendium) TryPackLatestReportSubmission() ([]byte, error) { return cloudReportCompendium.abi.Pack("latestReportSubmission") } @@ -418,7 +486,7 @@ func (cloudReportCompendium *CloudReportCompendium) TryPackLatestReportSubmissio // UnpackLatestReportSubmission is the Go binding that unpacks the parameters returned // from invoking the contract method with ID 0x371517a4. // -// Solidity: function latestReportSubmission() view returns((uint32,uint32,uint32,bytes20)) +// Solidity: function latestReportSubmission() view returns((uint32,uint32,bytes20)) func (cloudReportCompendium *CloudReportCompendium) UnpackLatestReportSubmission(data []byte) (ICloudReportCompendiumCloudReportSubmission, error) { out, err := cloudReportCompendium.abi.Unpack("latestReportSubmission", data) if err != nil { @@ -428,34 +496,34 @@ func (cloudReportCompendium *CloudReportCompendium) UnpackLatestReportSubmission return out0, nil } -// PackOperatorSetId is the Go binding used to pack the parameters required for calling -// the contract method with ID 0xe1ebfc37. This method will panic if any +// PackMinSlashInterval is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x18e38c93. This method will panic if any // invalid/nil inputs are passed. // -// Solidity: function operatorSetId() view returns(uint32) -func (cloudReportCompendium *CloudReportCompendium) PackOperatorSetId() []byte { - enc, err := cloudReportCompendium.abi.Pack("operatorSetId") +// Solidity: function minSlashInterval() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) PackMinSlashInterval() []byte { + enc, err := cloudReportCompendium.abi.Pack("minSlashInterval") if err != nil { panic(err) } return enc } -// TryPackOperatorSetId is the Go binding used to pack the parameters required for calling -// the contract method with ID 0xe1ebfc37. This method will return an error +// TryPackMinSlashInterval is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x18e38c93. This method will return an error // if any inputs are invalid/nil. // -// Solidity: function operatorSetId() view returns(uint32) -func (cloudReportCompendium *CloudReportCompendium) TryPackOperatorSetId() ([]byte, error) { - return cloudReportCompendium.abi.Pack("operatorSetId") +// Solidity: function minSlashInterval() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) TryPackMinSlashInterval() ([]byte, error) { + return cloudReportCompendium.abi.Pack("minSlashInterval") } -// UnpackOperatorSetId is the Go binding that unpacks the parameters returned -// from invoking the contract method with ID 0xe1ebfc37. +// UnpackMinSlashInterval is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x18e38c93. // -// Solidity: function operatorSetId() view returns(uint32) -func (cloudReportCompendium *CloudReportCompendium) UnpackOperatorSetId(data []byte) (uint32, error) { - out, err := cloudReportCompendium.abi.Unpack("operatorSetId", data) +// Solidity: function minSlashInterval() view returns(uint32) +func (cloudReportCompendium *CloudReportCompendium) UnpackMinSlashInterval(data []byte) (uint32, error) { + out, err := cloudReportCompendium.abi.Unpack("minSlashInterval", data) if err != nil { return *new(uint32), err } @@ -603,6 +671,28 @@ func (cloudReportCompendium *CloudReportCompendium) UnpackReportFreshnessThresho return out0, nil } +// PackSetMinSlashInterval is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe7a6e55a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setMinSlashInterval(uint32 _minSlashInterval) returns() +func (cloudReportCompendium *CloudReportCompendium) PackSetMinSlashInterval(minSlashInterval uint32) []byte { + enc, err := cloudReportCompendium.abi.Pack("setMinSlashInterval", minSlashInterval) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetMinSlashInterval is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe7a6e55a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setMinSlashInterval(uint32 _minSlashInterval) returns() +func (cloudReportCompendium *CloudReportCompendium) TryPackSetMinSlashInterval(minSlashInterval uint32) ([]byte, error) { + return cloudReportCompendium.abi.Pack("setMinSlashInterval", minSlashInterval) +} + // PackSetReportFreshnessThreshold is the Go binding used to pack the parameters required for calling // the contract method with ID 0xe32c101d. This method will panic if any // invalid/nil inputs are passed. @@ -837,6 +927,47 @@ func (cloudReportCompendium *CloudReportCompendium) UnpackInitializedEvent(log * return out, nil } +// CloudReportCompendiumMinSlashIntervalSet represents a MinSlashIntervalSet event raised by the CloudReportCompendium contract. +type CloudReportCompendiumMinSlashIntervalSet struct { + MinSlashInterval uint32 + Raw *types.Log // Blockchain specific contextual infos +} + +const CloudReportCompendiumMinSlashIntervalSetEventName = "MinSlashIntervalSet" + +// ContractEventName returns the user-defined event name. +func (CloudReportCompendiumMinSlashIntervalSet) ContractEventName() string { + return CloudReportCompendiumMinSlashIntervalSetEventName +} + +// UnpackMinSlashIntervalSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event MinSlashIntervalSet(uint32 minSlashInterval) +func (cloudReportCompendium *CloudReportCompendium) UnpackMinSlashIntervalSetEvent(log *types.Log) (*CloudReportCompendiumMinSlashIntervalSet, error) { + event := "MinSlashIntervalSet" + if len(log.Topics) == 0 || log.Topics[0] != cloudReportCompendium.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(CloudReportCompendiumMinSlashIntervalSet) + if len(log.Data) > 0 { + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range cloudReportCompendium.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + // CloudReportCompendiumOperatorSlashed represents a OperatorSlashed event raised by the CloudReportCompendium contract. type CloudReportCompendiumOperatorSlashed struct { Operator common.Address @@ -1044,6 +1175,9 @@ func (cloudReportCompendium *CloudReportCompendium) UnpackError(raw []byte) (any if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["SignatureExpired"].ID.Bytes()[:4]) { return cloudReportCompendium.UnpackSignatureExpiredError(raw[4:]) } + if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["SlashTooSoon"].ID.Bytes()[:4]) { + return cloudReportCompendium.UnpackSlashTooSoonError(raw[4:]) + } if bytes.Equal(raw[:4], cloudReportCompendium.abi.Errors["StringTooLong"].ID.Bytes()[:4]) { return cloudReportCompendium.UnpackStringTooLongError(raw[4:]) } @@ -1326,6 +1460,29 @@ func (cloudReportCompendium *CloudReportCompendium) UnpackSignatureExpiredError( return out, nil } +// CloudReportCompendiumSlashTooSoon represents a SlashTooSoon error raised by the CloudReportCompendium contract. +type CloudReportCompendiumSlashTooSoon struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error SlashTooSoon() +func CloudReportCompendiumSlashTooSoonErrorID() common.Hash { + return common.HexToHash("0x1324fda8e4694b9452a4008939c7bdbcbaf964827ea803eea9f6fe1c1f3f76bc") +} + +// UnpackSlashTooSoonError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error SlashTooSoon() +func (cloudReportCompendium *CloudReportCompendium) UnpackSlashTooSoonError(raw []byte) (*CloudReportCompendiumSlashTooSoon, error) { + out := new(CloudReportCompendiumSlashTooSoon) + if err := cloudReportCompendium.abi.UnpackIntoInterface(out, "SlashTooSoon", raw); err != nil { + return nil, err + } + return out, nil +} + // CloudReportCompendiumStringTooLong represents a StringTooLong error raised by the CloudReportCompendium contract. type CloudReportCompendiumStringTooLong struct { Str string diff --git a/pkg/bindings/v2/ComputeOperator/binding.go b/pkg/bindings/v2/ComputeOperator/binding.go index 6133eb5..91d8769 100644 --- a/pkg/bindings/v2/ComputeOperator/binding.go +++ b/pkg/bindings/v2/ComputeOperator/binding.go @@ -26,7 +26,7 @@ var ( // ComputeOperatorMetaData contains all meta data concerning the ComputeOperator contract. var ComputeOperatorMetaData = bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_appController\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"appController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"operatorMetadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerForOperatorSet\",\"inputs\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"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\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotAppController\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotComputeAVS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"_delegationManager\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_appController\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_computeAVSRegistrar\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_strategyToSlash\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"SLASHING_OPERATORSET_ID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allocationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"appController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"computeAVSRegistrar\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegationManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIDelegationManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"operatorMetadataURI\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"performInitialAllocation\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerForOperatorSet\",\"inputs\":[{\"name\":\"operatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"strategyToSlash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIStrategy\"}],\"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\":\"error\",\"name\":\"InitialAllocationAlreadyComplete\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotAppController\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotComputeAVS\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]}]", ID: "ComputeOperator", } @@ -53,15 +53,50 @@ func (c *ComputeOperator) Instance(backend bind.ContractBackend, addr common.Add // PackConstructor is the Go binding used to pack the parameters required for // contract deployment. // -// Solidity: constructor(string _version, address _delegationManager, address _allocationManager, address _permissionController, address _appController, address _computeAVSRegistrar) returns() -func (computeOperator *ComputeOperator) PackConstructor(_version string, _delegationManager common.Address, _allocationManager common.Address, _permissionController common.Address, _appController common.Address, _computeAVSRegistrar common.Address) []byte { - enc, err := computeOperator.abi.Pack("", _version, _delegationManager, _allocationManager, _permissionController, _appController, _computeAVSRegistrar) +// Solidity: constructor(string _version, address _delegationManager, address _allocationManager, address _permissionController, address _appController, address _computeAVSRegistrar, address _strategyToSlash) returns() +func (computeOperator *ComputeOperator) PackConstructor(_version string, _delegationManager common.Address, _allocationManager common.Address, _permissionController common.Address, _appController common.Address, _computeAVSRegistrar common.Address, _strategyToSlash common.Address) []byte { + enc, err := computeOperator.abi.Pack("", _version, _delegationManager, _allocationManager, _permissionController, _appController, _computeAVSRegistrar, _strategyToSlash) if err != nil { panic(err) } return enc } +// PackSLASHINGOPERATORSETID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x96b313c8. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (computeOperator *ComputeOperator) PackSLASHINGOPERATORSETID() []byte { + enc, err := computeOperator.abi.Pack("SLASHING_OPERATORSET_ID") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSLASHINGOPERATORSETID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x96b313c8. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (computeOperator *ComputeOperator) TryPackSLASHINGOPERATORSETID() ([]byte, error) { + return computeOperator.abi.Pack("SLASHING_OPERATORSET_ID") +} + +// UnpackSLASHINGOPERATORSETID is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x96b313c8. +// +// Solidity: function SLASHING_OPERATORSET_ID() view returns(uint32) +func (computeOperator *ComputeOperator) UnpackSLASHINGOPERATORSETID(data []byte) (uint32, error) { + out, err := computeOperator.abi.Unpack("SLASHING_OPERATORSET_ID", data) + if err != nil { + return *new(uint32), err + } + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + return out0, nil +} + // PackAllocationManager is the Go binding used to pack the parameters required for calling // the contract method with ID 0xca8aa7c7. This method will panic if any // invalid/nil inputs are passed. @@ -224,6 +259,28 @@ func (computeOperator *ComputeOperator) TryPackInitialize(operatorMetadataURI st return computeOperator.abi.Pack("initialize", operatorMetadataURI) } +// PackPerformInitialAllocation is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x33cd0d13. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function performInitialAllocation() returns() +func (computeOperator *ComputeOperator) PackPerformInitialAllocation() []byte { + enc, err := computeOperator.abi.Pack("performInitialAllocation") + if err != nil { + panic(err) + } + return enc +} + +// TryPackPerformInitialAllocation is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x33cd0d13. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function performInitialAllocation() returns() +func (computeOperator *ComputeOperator) TryPackPerformInitialAllocation() ([]byte, error) { + return computeOperator.abi.Pack("performInitialAllocation") +} + // PackPermissionController is the Go binding used to pack the parameters required for calling // the contract method with ID 0x4657e26a. This method will panic if any // invalid/nil inputs are passed. @@ -281,6 +338,41 @@ func (computeOperator *ComputeOperator) TryPackRegisterForOperatorSet(operatorSe return computeOperator.abi.Pack("registerForOperatorSet", operatorSetId) } +// PackStrategyToSlash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5ac080f1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function strategyToSlash() view returns(address) +func (computeOperator *ComputeOperator) PackStrategyToSlash() []byte { + enc, err := computeOperator.abi.Pack("strategyToSlash") + if err != nil { + panic(err) + } + return enc +} + +// TryPackStrategyToSlash is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5ac080f1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function strategyToSlash() view returns(address) +func (computeOperator *ComputeOperator) TryPackStrategyToSlash() ([]byte, error) { + return computeOperator.abi.Pack("strategyToSlash") +} + +// UnpackStrategyToSlash is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x5ac080f1. +// +// Solidity: function strategyToSlash() view returns(address) +func (computeOperator *ComputeOperator) UnpackStrategyToSlash(data []byte) (common.Address, error) { + out, err := computeOperator.abi.Unpack("strategyToSlash", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + // PackVersion is the Go binding used to pack the parameters required for calling // the contract method with ID 0x54fd4d50. This method will panic if any // invalid/nil inputs are passed. @@ -360,6 +452,9 @@ func (computeOperator *ComputeOperator) UnpackInitializedEvent(log *types.Log) ( // UnpackError attempts to decode the provided error data using user-defined // error definitions. func (computeOperator *ComputeOperator) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], computeOperator.abi.Errors["InitialAllocationAlreadyComplete"].ID.Bytes()[:4]) { + return computeOperator.UnpackInitialAllocationAlreadyCompleteError(raw[4:]) + } if bytes.Equal(raw[:4], computeOperator.abi.Errors["InvalidShortString"].ID.Bytes()[:4]) { return computeOperator.UnpackInvalidShortStringError(raw[4:]) } @@ -375,6 +470,29 @@ func (computeOperator *ComputeOperator) UnpackError(raw []byte) (any, error) { return nil, errors.New("Unknown error") } +// ComputeOperatorInitialAllocationAlreadyComplete represents a InitialAllocationAlreadyComplete error raised by the ComputeOperator contract. +type ComputeOperatorInitialAllocationAlreadyComplete struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InitialAllocationAlreadyComplete() +func ComputeOperatorInitialAllocationAlreadyCompleteErrorID() common.Hash { + return common.HexToHash("0xecda00a561411299445aa34e692dae071871089b3338c0cc1b27fb64e7804d94") +} + +// UnpackInitialAllocationAlreadyCompleteError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InitialAllocationAlreadyComplete() +func (computeOperator *ComputeOperator) UnpackInitialAllocationAlreadyCompleteError(raw []byte) (*ComputeOperatorInitialAllocationAlreadyComplete, error) { + out := new(ComputeOperatorInitialAllocationAlreadyComplete) + if err := computeOperator.abi.UnpackIntoInterface(out, "InitialAllocationAlreadyComplete", raw); err != nil { + return nil, err + } + return out, nil +} + // ComputeOperatorInvalidShortString represents a InvalidShortString error raised by the ComputeOperator contract. type ComputeOperatorInvalidShortString struct { }