diff --git a/docs/avs/task/TaskMailbox.md b/docs/avs/task/TaskMailbox.md new file mode 100644 index 0000000000..116836c265 --- /dev/null +++ b/docs/avs/task/TaskMailbox.md @@ -0,0 +1,416 @@ +# TaskMailbox + +| File | Type | Proxy | +| -------- | -------- | -------- | +| [`TaskMailbox.sol`](../../../src/contracts/avs/task/TaskMailbox.sol) | Singleton | Transparent proxy | +| [`TaskMailboxStorage.sol`](../../../src/contracts/avs/task/TaskMailboxStorage.sol) | Storage | - | +| [`ITaskMailbox.sol`](../../../src/contracts/interfaces/ITaskMailbox.sol) | Interface | - | + +Libraries and Mixins: + +| File | Notes | +| -------- | -------- | +| [`SemVerMixin.sol`](../../../src/contracts/mixins/SemVerMixin.sol) | semantic versioning | +| [`OwnableUpgradeable`](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v4.9.0/contracts/access/OwnableUpgradeable.sol) | ownership management | +| [`ReentrancyGuardUpgradeable`](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v4.9.0/contracts/security/ReentrancyGuardUpgradeable.sol) | reentrancy protection | +| [`Initializable`](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v4.9.0/contracts/proxy/utils/Initializable.sol) | upgradeable initialization | +| [`SafeERC20`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/utils/SafeERC20.sol) | safe token transfers | +| [`SafeCast`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/utils/math/SafeCast.sol) | safe type casting | +| [`OperatorSetLib.sol`](../../../src/contracts/libraries/OperatorSetLib.sol) | operator set encoding/decoding | + +## Prior Reading + +* [Hourglass Framework](https://github.com/Layr-Labs/hourglass-monorepo/blob/master/README.md) - for understanding the task-based AVS execution model +* [AllocationManager](../../core/AllocationManager.md) - for understanding operator sets +* [KeyRegistrar](../../permissions/KeyRegistrar.md) - for understanding operator key management +* [CertificateVerifier](../../multichain/destination/CertificateVerifier.md) - for understanding certificate verification + +## Overview + +The `TaskMailbox` is a core infrastructure contract that enables task-based AVS (Actively Validated Service) execution models. It provides a standardized way for AVSs to create tasks, have operators execute them, and submit verified results on-chain. The contract acts as a mailbox system where task creators post tasks with fees, and operators compete to execute and submit results with proper consensus verification. + +The `TaskMailbox`'s responsibilities are broken down into the following concepts: + +* [Task Creation and Lifecycle](#task-creation-and-lifecycle) +* [Executor Operator Sets](#executor-operator-sets) +* [Result Submission and Verification](#result-submission-and-verification) +* [Fee Management](#fee-management) +* [Task Hooks and AVS Integration](#task-hooks-and-avs-integration) + +## Parameterization + +The `TaskMailbox` uses the following key parameters: + +* **Fee Split**: Configurable percentage (0-10000 basis points) that determines how task fees are split between the protocol fee collector and the AVS fee collector +* **Task SLA**: Service Level Agreement duration (in seconds) set per executor operator set, defining how long operators have to complete a task +* **Consensus Thresholds**: Configurable per operator set, defining the required stake proportion for result verification + +--- + +## Task Creation and Lifecycle + +Tasks in the TaskMailbox system follow a well-defined lifecycle with specific states and transitions. Each task is uniquely identified by a hash computed from the task parameters, block context, and a global counter. + +**State Variables:** +* `_globalTaskCount`: Counter ensuring unique task hashes +* `_tasks`: Mapping from task hash to task details + +**Methods:** +* [`createTask`](#createtask) +* [`getTaskInfo`](#gettaskinfo) +* [`getTaskStatus`](#gettaskstatus) + +### Task Status Flow + +Tasks can be in one of the following states: +1. **NONE**: Task does not exist +2. **CREATED**: Task has been created and is waiting for execution +3. **EXPIRED**: Task SLA has passed without result submission +4. **VERIFIED**: Task result has been submitted and verified + +#### `createTask` + +```solidity +/** + * @notice Creates a new task for execution by operators + * @param taskParams The parameters for the task including refund collector, executor operator set, and payload + * @return taskHash The unique identifier for the created task + */ +function createTask(TaskParams memory taskParams) external nonReentrant returns (bytes32 taskHash) +``` + +Creates a new task in the system. The method performs several validations and operations: + +1. Validates that the executor operator set is registered and has a valid configuration +2. Calls the AVS task hook for pre-creation validation +3. Calculates the task fee using the AVS task hook +4. Generates a unique task hash +5. Transfers the fee from the caller to the TaskMailbox +6. Stores the task with its current configuration snapshot +7. Calls the AVS task hook for post-creation handling + +*Effects*: +* Increments `_globalTaskCount` +* Stores task in `_tasks` mapping +* Transfers fee tokens from caller +* Emits `TaskCreated` event +* Calls [`IAVSTaskHook.validatePreTaskCreation`](../../../src/contracts/interfaces/IAVSTaskHook.sol) and [`IAVSTaskHook.handlePostTaskCreation`](../../../src/contracts/interfaces/IAVSTaskHook.sol) + +*Requirements*: +* Executor operator set must be registered +* Executor operator set must have valid task configuration +* Task payload must not be empty +* Fee transfer must succeed +* AVS validation must pass + +#### `getTaskInfo` + +```solidity +/** + * @notice Retrieves the complete information for a task + * @param taskHash The unique identifier of the task + * @return Task struct containing all task details + */ +function getTaskInfo(bytes32 taskHash) external view returns (Task memory) +``` + +Returns the complete task information including its current status. The status is computed dynamically based on the current block timestamp and task state. + +#### `getTaskStatus` + +```solidity +/** + * @notice Gets the current status of a task + * @param taskHash The unique identifier of the task + * @return TaskStatus enum value + */ +function getTaskStatus(bytes32 taskHash) external view returns (TaskStatus) +``` + +Returns only the current status of a task, useful for lightweight status checks. + +--- + +## Executor Operator Sets + +Executor operator sets define which operators are eligible to execute tasks and under what conditions. Each operator set must be configured before it can be used for task execution. + +**State Variables:** +* `_executorOperatorSetTaskConfigs`: Mapping from operator set to its task configuration +* `_isExecutorOperatorSetRegistered`: Tracks registered operator sets + +**Methods:** +* [`setExecutorOperatorSetTaskConfig`](#setexecutoroperatorsettaskconfig) +* [`registerExecutorOperatorSet`](#registerexecutoroperatorset) +* [`getExecutorOperatorSetTaskConfig`](#getexecutoroperatorsettaskconfig) + +#### `setExecutorOperatorSetTaskConfig` + +```solidity +/** + * @notice Sets the task configuration for an executor operator set + * @param executorOperatorSet The operator set to configure + * @param config The configuration including task hook, SLA, fee token, etc. + */ +function setExecutorOperatorSetTaskConfig( + OperatorSet memory executorOperatorSet, + ExecutorOperatorSetTaskConfig memory config +) external +``` + +Configures how tasks should be executed by a specific operator set. The configuration includes: +- **Task Hook**: AVS-specific contract for custom validation and handling +- **Task SLA**: Time limit for task completion +- **Fee Token**: Token used for task fees (can be zero address for no fees) +- **Fee Collector**: Address to receive AVS portion of fees +- **Curve Type**: Cryptographic curve used by operators (BN254 or ECDSA) +- **Consensus**: Type and threshold for result verification +- **Task Metadata**: AVS-specific metadata + +*Effects*: +* Stores configuration in `_executorOperatorSetTaskConfigs` +* Sets `_isExecutorOperatorSetRegistered` to true if not already registered +* Emits `ExecutorOperatorSetTaskConfigSet` event + +*Requirements*: +* Caller must be the operator set owner (verified via certificate verifier) +* Task hook must not be zero address +* Task SLA must be greater than zero +* Consensus type and curve type must be valid +* Consensus value must be properly formatted + +#### `registerExecutorOperatorSet` + +```solidity +/** + * @notice Registers or unregisters an executor operator set + * @param executorOperatorSet The operator set to register/unregister + * @param isRegistered Whether to register (true) or unregister (false) + */ +function registerExecutorOperatorSet( + OperatorSet memory executorOperatorSet, + bool isRegistered +) external +``` + +Allows operator set owners to explicitly register or unregister their operator sets for task execution. + +*Effects*: +* Updates `_isExecutorOperatorSetRegistered` +* Emits `ExecutorOperatorSetRegistered` event + +*Requirements*: +* Caller must be the operator set owner +* Operator set must have a valid configuration if registering + +--- + +## Result Submission and Verification + +Task results are submitted along with cryptographic certificates that prove consensus among the operator set. The verification process depends on the curve type configured for the operator set. + +**Methods:** +* [`submitResult`](#submitresult) +* [`getTaskResult`](#gettaskresult) + +#### `submitResult` + +```solidity +/** + * @notice Submits the result of a task execution with consensus proof + * @param taskHash The unique identifier of the task + * @param executorCert Certificate proving operator consensus + * @param result The execution result data + */ +function submitResult( + bytes32 taskHash, + bytes memory executorCert, + bytes memory result +) external nonReentrant +``` + +Submits the result of task execution along with proof of consensus. The method: + +1. Validates the task exists and hasn't expired or been verified +2. Calls AVS hook for pre-submission validation +3. Verifies the certificate based on the configured curve type: + - **BN254**: Verifies aggregated BLS signature + - **ECDSA**: Verifies individual ECDSA signatures meet threshold +4. Distributes fees according to fee split configuration +5. Stores the result and marks task as verified +6. Calls AVS hook for post-submission handling + +*Effects*: +* Updates task status to VERIFIED +* Stores executor certificate and result +* Transfers fees to collectors +* Emits `TaskVerified` event +* Calls [`IAVSTaskHook.validatePreTaskResultSubmission`](../../../src/contracts/interfaces/IAVSTaskHook.sol) and [`IAVSTaskHook.handlePostTaskResultSubmission`](../../../src/contracts/interfaces/IAVSTaskHook.sol) + +*Requirements*: +* Task must exist and be in CREATED status +* Current timestamp must be after task creation time +* Certificate must have valid signature(s) +* Certificate verification must pass consensus threshold +* AVS validation must pass + +#### `getTaskResult` + +```solidity +/** + * @notice Retrieves the result of a verified task + * @param taskHash The unique identifier of the task + * @return result The task execution result data + */ +function getTaskResult(bytes32 taskHash) external view returns (bytes memory result) +``` + +Returns the result data for tasks that have been successfully verified. + +*Requirements*: +* Task must be in VERIFIED status + +--- + +## Fee Management + +The TaskMailbox implements a flexible fee system that supports fee splitting between the protocol and AVS, as well as refunds for expired tasks. + +**State Variables:** +* `feeSplit`: Global fee split percentage (basis points) +* `feeSplitCollector`: Address receiving protocol portion of fees + +**Methods:** +* [`setFeeSplit`](#setfeesplit) +* [`setFeeSplitCollector`](#setfeesplitcollector) +* [`refundFee`](#refundfee) + +#### `setFeeSplit` + +```solidity +/** + * @notice Sets the global fee split percentage + * @param _feeSplit The fee split in basis points (0-10000) + */ +function setFeeSplit(uint16 _feeSplit) external onlyOwner +``` + +Configures what percentage of task fees goes to the protocol fee collector versus the AVS fee collector. + +*Effects*: +* Updates `feeSplit` state variable +* Emits `FeeSplitSet` event + +*Requirements*: +* Caller must be contract owner +* Fee split must not exceed 10000 (100%) + +#### `setFeeSplitCollector` + +```solidity +/** + * @notice Sets the protocol fee collector address + * @param _feeSplitCollector The address to receive protocol fees + */ +function setFeeSplitCollector(address _feeSplitCollector) external onlyOwner +``` + +Sets the address that receives the protocol portion of task fees. + +*Effects*: +* Updates `feeSplitCollector` state variable +* Emits `FeeSplitCollectorSet` event + +*Requirements*: +* Caller must be contract owner +* Address must not be zero + +#### `refundFee` + +```solidity +/** + * @notice Refunds the fee for an expired task + * @param taskHash The unique identifier of the task + */ +function refundFee(bytes32 taskHash) external nonReentrant +``` + +Allows the designated refund collector to reclaim fees from expired tasks that were never executed. + +*Effects*: +* Marks task fee as refunded +* Transfers full fee amount to refund collector +* Emits `FeeRefunded` event + +*Requirements*: +* Task must be in EXPIRED status +* Caller must be the task's refund collector +* Fee must not have been previously refunded +* Task must have a fee token configured + +--- + +## Task Hooks and AVS Integration + +Task hooks provide AVSs with customization points throughout the task lifecycle. This allows AVSs to implement custom validation logic, fee calculations, and side effects. + +**Integration Points:** + +### IAVSTaskHook Interface + +AVSs implement the [`IAVSTaskHook`](../../../src/contracts/interfaces/IAVSTaskHook.sol) interface to customize task behavior: + +```solidity +interface IAVSTaskHook { + // Called before task creation to validate the caller and parameters + function validatePreTaskCreation( + address caller, + TaskParams memory taskParams + ) external view; + + // Called after task creation for any side effects + function handlePostTaskCreation(bytes32 taskHash) external; + + // Called before result submission to validate the submitter and data + function validatePreTaskResultSubmission( + address caller, + bytes32 taskHash, + bytes memory cert, + bytes memory result + ) external view; + + // Called after successful result submission for any side effects + function handlePostTaskResultSubmission(bytes32 taskHash) external; + + // Calculates the fee for a task based on its parameters + function calculateTaskFee( + TaskParams memory taskParams + ) external view returns (uint96); +} +``` + +### Integration Flow + +1. **Task Creation**: + - AVS validates caller permissions and task parameters + - AVS calculates appropriate fee based on task complexity + - AVS performs any initialization after task creation + +2. **Result Submission**: + - AVS validates submitter permissions + - AVS can validate result format and content + - AVS processes verified results for their application logic + +This hook system enables AVSs to build sophisticated task-based systems while leveraging the TaskMailbox's core infrastructure for consensus verification and fee management. + +--- + +## Security Considerations + +The TaskMailbox implements several security measures: + +1. **Reentrancy Protection**: All state-changing functions use OpenZeppelin's `ReentrancyGuardUpgradeable` +2. **Certificate Verification**: Results must include valid consensus proofs verified by the appropriate certificate verifier +3. **Fee Safety**: Uses OpenZeppelin's `SafeERC20` for all token transfers +4. **Access Control**: Operator set owners control their configurations; contract owner controls global parameters +5. **Timestamp Validation**: Tasks cannot be verified at their creation timestamp to prevent same-block manipulation \ No newline at end of file diff --git a/pkg/bindings/BN254CertificateVerifier/binding.go b/pkg/bindings/BN254CertificateVerifier/binding.go index 264e049a3a..f0a086f46d 100644 --- a/pkg/bindings/BN254CertificateVerifier/binding.go +++ b/pkg/bindings/BN254CertificateVerifier/binding.go @@ -86,7 +86,7 @@ type OperatorSet struct { // BN254CertificateVerifierMetaData contains all meta data concerning the BN254CertificateVerifier contract. var BN254CertificateVerifierMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_operatorTableUpdater\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getNonsignerOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isNonsignerCached\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"trySignatureVerification\",\"inputs\":[{\"name\":\"msgHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"aggPubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apkG2\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"pairingSuccessful\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signatureValid\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorSetInfo\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECMulFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECPairingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpModFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorIndex\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b50604051612a06380380612a0683398101604081905261002e9161016a565b6001600160a01b0382166080528061004581610058565b60a0525061005161009e565b5050610294565b5f5f829050601f8151111561008b578260405163305a27a960e01b81526004016100829190610239565b60405180910390fd5b80516100968261026e565b179392505050565b5f54610100900460ff16156101055760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610082565b5f5460ff90811614610154575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017b575f5ffd5b82516001600160a01b0381168114610191575f5ffd5b60208401519092506001600160401b038111156101ac575f5ffd5b8301601f810185136101bc575f5ffd5b80516001600160401b038111156101d5576101d5610156565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020357610203610156565b60405281815282820160200187101561021a575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561028e575f198160200360031b1b821691505b50919050565b60805160a0516127436102c35f395f6104e401525f81816101de0152818161062f0152610d0201526127435ff3fe608060405234801561000f575f5ffd5b50600436106100cb575f3560e01c80635ddb9b5b1161008857806368d6e0811161006357806368d6e081146101d95780638481892014610218578063dd2ae1b91461022b578063eb39e68f1461023e575f5ffd5b80635ddb9b5b146101895780636141879e146101b15780636738c40b146101c4575f5ffd5b8063017d7974146100cf578063080b7150146100f75780631a18746c1461011757806326af6a3c1461014157806354fd4d50146101615780635be8727414610176575b5f5ffd5b6100e26100dd366004612103565b61025e565b60405190151581526020015b60405180910390f35b61010a6101053660046121de565b6103ef565b6040516100ee9190612229565b61012a610125366004612260565b610404565b6040805192151583529015156020830152016100ee565b61015461014f3660046122ae565b610425565b6040516100ee9190612323565b6101696104dd565b6040516100ee9190612358565b6100e26101843660046122ae565b61050d565b61019c61019736600461238d565b6105d8565b60405163ffffffff90911681526020016100ee565b61019c6101bf36600461238d565b6105fe565b6101d76101d23660046123bd565b610624565b005b6102007f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100ee565b61020061022636600461238d565b6107f1565b6100e2610239366004612476565b61081a565b61025161024c3660046124e9565b6108ad565b6040516100ee9190612560565b5f5f61026a8585610972565b90505f61027686610b32565b5f8181526004602081815260408084208a5163ffffffff16855282528084208151608081018352815481526001820154818501528251808401845260028301548152600383015481860152818401529381018054835181860281018601909452808452969750949593949093606086019383018282801561031457602002820191905f5260205f20905b815481526020019060010190808311610300575b50505050508152505090505f8160600151905085518451146103495760405163512509d360e11b815260040160405180910390fd5b5f5b84518110156103de575f61271088838151811061036a5761036a612572565b602002602001015161ffff1684848151811061038857610388612572565b602002602001015161039a919061259a565b6103a491906125c5565b9050808683815181106103b9576103b9612572565b602002602001015110156103d5575f96505050505050506103e8565b5060010161034b565b5060019450505050505b9392505050565b60606103fb8383610972565b90505b92915050565b5f5f61041886848787600162061a80610b95565b9150915094509492505050565b61042d611a9c565b5f61043785610b32565b5f81815260056020908152604080832063ffffffff8916845282528083208784528252918290208251608081018452815481850190815260018301546060830152815260028201805485518186028101860190965280865295965090949193858401939092908301828280156104ca57602002820191905f5260205f20905b8154815260200190600101908083116104b6575b5050505050815250509150509392505050565b60606105087f0000000000000000000000000000000000000000000000000000000000000000610c5d565b905090565b5f5f61051885610b32565b5f81815260056020908152604080832063ffffffff891684528252808320878452825280832081516080810183528154818401908152600183015460608301528152600282018054845181870281018701909552808552969750949590949193858101939291908301828280156105ac57602002820191905f5260205f20905b815481526020019060010190808311610598575b50505091909252505081515191925050158015906105ce575080516020015115155b9695505050505050565b5f5f6105e383610b32565b5f9081526003602052604090205463ffffffff169392505050565b5f5f61060983610b32565b5f9081526002602052604090205463ffffffff169392505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461066d5760405163030c1b6b60e11b815260040160405180910390fd5b5f6106856106803687900387018761238d565b610b32565b5f8181526003602052604090205490915063ffffffff908116908516116106bf57604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020818152604080842063ffffffff8916855282529283902086518155818701516001820155928601518051600285015581015160038401556060860151805187949361071793908501920190611ac6565b5050505f818152600360209081526040909120805463ffffffff191663ffffffff8716179055610749908301836125d8565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b039490941693909317909255610788919084019084016125f1565b5f8281526002602052604090819020805463ffffffff191663ffffffff9390931692909217909155517f93e6bea1c9b5dce4a5c07b00261e956df2a4a253d9ab6ca070ca2037d72ada9e906107e29087908790879061260a565b60405180910390a15050505050565b5f5f6107fc83610b32565b5f908152600160205260409020546001600160a01b03169392505050565b5f5f6108268585610972565b9050825181511461084a5760405163512509d360e11b815260040160405180910390fd5b5f5b81518110156108a15783818151811061086757610867612572565b602002602001015182828151811061088157610881612572565b60200260200101511015610899575f925050506103e8565b60010161084c565b50600195945050505050565b6108b5611b0f565b5f6108bf84610b32565b5f81815260046020818152604080842063ffffffff891685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652959650929490936060860193909290919083018282801561096057602002820191905f5260205f20905b81548152602001906001019080831161094c575b50505050508152505091505092915050565b606061097c611b41565b61098584610b32565b80825283516109949190610c9a565b80515f908152600460208181526040808420875163ffffffff1685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652939491936060860193830182828015610a3057602002820191905f5260205f20905b815481526020019060010190808311610a1c575b505050919092525050506020820181905251610a5f57604051630cad17b760e31b815260040160405180910390fd5b806020015160600151516001600160401b03811115610a8057610a80611c6f565b604051908082528060200260200182016040528015610aa9578160200160208202803683370190505b5060408201525f5b81602001516060015151811015610b0d578160200151606001518181518110610adc57610adc612572565b602002602001015182604001518281518110610afa57610afa612572565b6020908102919091010152600101610ab1565b50610b188184610d95565b6060820152610b278184610ebf565b604001519392505050565b5f815f0151826020015163ffffffff16604051602001610b7d92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526103fe90612656565b5f5f5f610ba189610f2d565b90505f610bb08a89898c610fb7565b90505f610bc7610bc08a8461106b565b8b906110db565b90505f610c09610c0284610bfc6040805180820182525f80825260209182015281518083019092526001825260029082015290565b9061106b565b85906110db565b90508715610c2e57610c2582610c1d61114f565b838c8b61120f565b96509450610c4e565b610c4182610c3a61114f565b838c611423565b95508515610c4e57600194505b50505050965096945050505050565b60605f610c698361165a565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f8281526002602052604090205463ffffffff16801580610cca5750610cc08183612679565b63ffffffff164211155b610ce75760405163640fcd6b60e11b815260040160405180910390fd5b60405163193877e160e21b815263ffffffff831660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906364e1df8490602401602060405180830381865afa158015610d4f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d739190612695565b610d9057604051631b14174b60e01b815260040160405180910390fd5b505050565b6040805180820182525f808252602091820181905282518084019093528083529082018190525b826080015151811015610eb8575f83608001518281518110610de057610de0612572565b60200260200101519050846020015160200151815f015163ffffffff1610610e1b576040516301fa53c760e11b815260040160405180910390fd5b845184515f91610e2b9184611681565b8051909150610e3b9085906110db565b93505f5b816020015151811015610ead57866040015151811015610ea55781602001518181518110610e6f57610e6f612572565b602002602001015187604001518281518110610e8d57610e8d612572565b60200260200101818151610ea191906126b4565b9052505b600101610e3f565b505050600101610dbc565b5092915050565b5f610edf610ed084606001516117f8565b602085015160400151906110db565b90505f5f610efb84602001518486606001518760400151610404565b91509150818015610f095750805b610f265760405163439cc0cd60e01b815260040160405180910390fd5b5050505050565b604080518082019091525f80825260208201525f8080610f5a5f5160206126ee5f395f51905f52866126c7565b90505b610f668161188e565b90935091505f5160206126ee5f395f51905f528283098303610f9e576040805180820190915290815260208101919091529392505050565b5f5160206126ee5f395f51905f52600182089050610f5d565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c61106291906126c7565b95945050505050565b604080518082019091525f8082526020820152611086611b86565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa905080806110b457fe5b50806110d357604051632319df1960e11b815260040160405180910390fd5b505092915050565b604080518082019091525f80825260208201526110f6611ba4565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa9050808061113057fe5b50806110d35760405163d4b68fd760e01b815260040160405180910390fd5b611157611bc2565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f91829190611240611be2565b5f5b60028110156113f7575f61125782600661259a565b905084826002811061126b5761126b612572565b6020020151518361127c835f6126da565b600c811061128c5761128c612572565b60200201528482600281106112a3576112a3612572565b602002015160200151838260016112ba91906126da565b600c81106112ca576112ca612572565b60200201528382600281106112e1576112e1612572565b60200201515151836112f48360026126da565b600c811061130457611304612572565b602002015283826002811061131b5761131b612572565b60200201515160016020020151836113348360036126da565b600c811061134457611344612572565b602002015283826002811061135b5761135b612572565b6020020151602001515f6002811061137557611375612572565b6020020151836113868360046126da565b600c811061139657611396612572565b60200201528382600281106113ad576113ad612572565b6020020151602001516001600281106113c8576113c8612572565b6020020151836113d98360056126da565b600c81106113e9576113e9612572565b602002015250600101611242565b50611400611c01565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f91611451611be2565b5f5b6002811015611608575f61146882600661259a565b905084826002811061147c5761147c612572565b6020020151518361148d835f6126da565b600c811061149d5761149d612572565b60200201528482600281106114b4576114b4612572565b602002015160200151838260016114cb91906126da565b600c81106114db576114db612572565b60200201528382600281106114f2576114f2612572565b60200201515151836115058360026126da565b600c811061151557611515612572565b602002015283826002811061152c5761152c612572565b60200201515160016020020151836115458360036126da565b600c811061155557611555612572565b602002015283826002811061156c5761156c612572565b6020020151602001515f6002811061158657611586612572565b6020020151836115978360046126da565b600c81106115a7576115a7612572565b60200201528382600281106115be576115be612572565b6020020151602001516001600281106115d9576115d9612572565b6020020151836115ea8360056126da565b600c81106115fa576115fa612572565b602002015250600101611453565b50611611611c01565b5f6020826101808560086107d05a03fa9050808061162b57fe5b508061164a576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b5f60ff8216601f8111156103fe57604051632cd44ac360e21b815260040160405180910390fd5b611689611a9c565b5f84815260056020908152604080832063ffffffff808816855290835281842086519091168452825280832081516080810183528154818401908152600183015460608301528152600282018054845181870281018701909552808552919492938584019390929083018282801561171e57602002820191905f5260205f20905b81548152602001906001019080831161170a575b5050509190925250508151519192505f911515905080611742575081516020015115155b9050806117eb575f6117628787875f01518860400151896020015161190a565b9050806117825760405163439cc0cd60e01b815260040160405180910390fd5b6040808601515f8981526005602090815283822063ffffffff808c1684529082528483208a51909116835281529290208151805182558301516001820155828201518051929391926117da9260028501920190611ac6565b5090505084604001519350506117ef565b8192505b50509392505050565b604080518082019091525f8082526020820152815115801561181c57506020820151155b15611839575050604080518082019091525f808252602082015290565b6040518060400160405280835f015181526020015f5160206126ee5f395f51905f52846020015161186a91906126c7565b611881905f5160206126ee5f395f51905f526126b4565b905292915050565b919050565b5f80805f5160206126ee5f395f51905f5260035f5160206126ee5f395f51905f52865f5160206126ee5f395f51905f52888909090890505f6118fe827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f5160206126ee5f395f51905f52611975565b91959194509092505050565b5f5f8360405160200161191d9190612323565b60408051601f1981840301815291815281516020928301205f8a81526004845282812063ffffffff808c1683529452919091205490925090611969908590839085908a8116906119ee16565b98975050505050505050565b5f5f61197f611c01565b611987611c1f565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa925082806119c457fe5b50826119e35760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b5f836119fb868585611a05565b1495945050505050565b5f60208451611a1491906126c7565b15611a32576040516313717da960e21b815260040160405180910390fd5b8260205b85518111611a9357611a496002856126c7565b5f03611a6a57815f528086015160205260405f209150600284049350611a81565b808601515f528160205260405f2091506002840493505b611a8c6020826126da565b9050611a36565b50949350505050565b604080516080810182525f91810182815260608201929092529081905b8152602001606081525090565b828054828255905f5260205f20908101928215611aff579160200282015b82811115611aff578251825591602001919060010190611ae4565b50611b0b929150611c3d565b5090565b60405180608001604052805f81526020015f8152602001611ab960405180604001604052805f81526020015f81525090565b60405180608001604052805f8152602001611b5a611b0f565b815260200160608152602001611b8160405180604001604052805f81526020015f81525090565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b6040518060400160405280611bd5611c51565b8152602001611b81611c51565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b80821115611b0b575f8155600101611c3e565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611ca557611ca5611c6f565b60405290565b60405160a081016001600160401b0381118282101715611ca557611ca5611c6f565b604051606081016001600160401b0381118282101715611ca557611ca5611c6f565b604051608081016001600160401b0381118282101715611ca557611ca5611c6f565b604051601f8201601f191681016001600160401b0381118282101715611d3957611d39611c6f565b604052919050565b80356001600160a01b0381168114611889575f5ffd5b803563ffffffff81168114611889575f5ffd5b5f60408284031215611d7a575f5ffd5b611d82611c83565b9050611d8d82611d41565b8152611d9b60208301611d57565b602082015292915050565b5f60408284031215611db6575f5ffd5b611dbe611c83565b823581526020928301359281019290925250919050565b5f82601f830112611de4575f5ffd5b611dec611c83565b806040840185811115611dfd575f5ffd5b845b81811015611e17578035845260209384019301611dff565b509095945050505050565b5f60808284031215611e32575f5ffd5b611e3a611c83565b9050611e468383611dd5565b8152611d9b8360408401611dd5565b5f6001600160401b03821115611e6d57611e6d611c6f565b5060051b60200190565b5f82601f830112611e86575f5ffd5b8135611e99611e9482611e55565b611d11565b8082825260208201915060208360051b860101925085831115611eba575f5ffd5b602085015b83811015611ed7578035835260209283019201611ebf565b5095945050505050565b5f60608284031215611ef1575f5ffd5b611ef9611c83565b9050611f058383611da6565b815260408201356001600160401b03811115611f1f575f5ffd5b611f2b84828501611e77565b60208301525092915050565b5f6101208284031215611f48575f5ffd5b611f50611cab565b9050611f5b82611d57565b815260208281013590820152611f748360408401611da6565b6040820152611f868360808401611e22565b60608201526101008201356001600160401b03811115611fa4575f5ffd5b8201601f81018413611fb4575f5ffd5b8035611fc2611e9482611e55565b8082825260208201915060208360051b850101925086831115611fe3575f5ffd5b602084015b838110156120f35780356001600160401b03811115612005575f5ffd5b85016060818a03601f1901121561201a575f5ffd5b612022611ccd565b61202e60208301611d57565b815260408201356001600160401b03811115612048575f5ffd5b82016020810190603f018b1361205c575f5ffd5b80356001600160401b0381111561207557612075611c6f565b612088601f8201601f1916602001611d11565b8181528c602083850101111561209c575f5ffd5b816020840160208301375f6020838301015280602085015250505060608201356001600160401b038111156120cf575f5ffd5b6120de8b602083860101611ee1565b60408301525084525060209283019201611fe8565b5060808501525091949350505050565b5f5f5f60808486031215612115575f5ffd5b61211f8585611d6a565b925060408401356001600160401b03811115612139575f5ffd5b61214586828701611f37565b92505060608401356001600160401b03811115612160575f5ffd5b8401601f81018613612170575f5ffd5b803561217e611e9482611e55565b8082825260208201915060208360051b85010192508883111561219f575f5ffd5b6020840193505b828410156121d057833561ffff811681146121bf575f5ffd5b8252602093840193909101906121a6565b809450505050509250925092565b5f5f606083850312156121ef575f5ffd5b6121f98484611d6a565b915060408301356001600160401b03811115612213575f5ffd5b61221f85828601611f37565b9150509250929050565b602080825282518282018190525f918401906040840190835b81811015611e17578351835260209384019390920191600101612242565b5f5f5f5f6101208587031215612274575f5ffd5b843593506122858660208701611da6565b92506122948660608701611e22565b91506122a38660e08701611da6565b905092959194509250565b5f5f5f608084860312156122c0575f5ffd5b6122ca8585611d6a565b92506122d860408501611d57565b929592945050506060919091013590565b5f8151808452602084019350602083015f5b828110156123195781518652602095860195909101906001016122fb565b5093949350505050565b60208082528251805183830152015160408201525f602083015160608084015261235060808401826122e9565b949350505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f6040828403121561239d575f5ffd5b6103fb8383611d6a565b5f604082840312156123b7575f5ffd5b50919050565b5f5f5f5f60c085870312156123d0575f5ffd5b6123da86866123a7565b93506123e860408601611d57565b925060608501356001600160401b03811115612402575f5ffd5b850160a08188031215612413575f5ffd5b61241b611cef565b81358152602080830135908201526124368860408401611da6565b604082015260808201356001600160401b03811115612453575f5ffd5b61245f89828501611e77565b60608301525092506122a3905086608087016123a7565b5f5f5f60808486031215612488575f5ffd5b6124928585611d6a565b925060408401356001600160401b038111156124ac575f5ffd5b6124b886828701611f37565b92505060608401356001600160401b038111156124d3575f5ffd5b6124df86828701611e77565b9150509250925092565b5f5f606083850312156124fa575f5ffd5b6125048484611d6a565b915061251260408401611d57565b90509250929050565b80518252602081015160208301525f6040820151612546604085018280518252602090810151910152565b50606082015160a0608085015261235060a08501826122e9565b602081525f6103fb602083018461251b565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176103fe576103fe612586565b634e487b7160e01b5f52601260045260245ffd5b5f826125d3576125d36125b1565b500490565b5f602082840312156125e8575f5ffd5b6103fb82611d41565b5f60208284031215612601575f5ffd5b6103fb82611d57565b6001600160a01b0361261b85611d41565b16815263ffffffff61262f60208601611d57565b16602082015263ffffffff83166040820152608060608201525f611062608083018461251b565b805160208083015191908110156123b7575f1960209190910360031b1b16919050565b63ffffffff81811683821601908111156103fe576103fe612586565b5f602082840312156126a5575f5ffd5b815180151581146103e8575f5ffd5b818103818111156103fe576103fe612586565b5f826126d5576126d56125b1565b500690565b808201808211156103fe576103fe61258656fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a26469706673582212209e6b87a66e7c14116b2064c67708034b3065a8f110d9fd1f5f8a667c8334c17664736f6c634300081b0033", + Bin: "0x60c060405234801561000f575f5ffd5b50604051612a06380380612a0683398101604081905261002e9161016a565b6001600160a01b0382166080528061004581610058565b60a0525061005161009e565b5050610294565b5f5f829050601f8151111561008b578260405163305a27a960e01b81526004016100829190610239565b60405180910390fd5b80516100968261026e565b179392505050565b5f54610100900460ff16156101055760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610082565b5f5460ff90811614610154575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017b575f5ffd5b82516001600160a01b0381168114610191575f5ffd5b60208401519092506001600160401b038111156101ac575f5ffd5b8301601f810185136101bc575f5ffd5b80516001600160401b038111156101d5576101d5610156565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020357610203610156565b60405281815282820160200187101561021a575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561028e575f198160200360031b1b821691505b50919050565b60805160a0516127436102c35f395f6104e401525f81816101de0152818161062f0152610d0201526127435ff3fe608060405234801561000f575f5ffd5b50600436106100cb575f3560e01c80635ddb9b5b1161008857806368d6e0811161006357806368d6e081146101d95780638481892014610218578063dd2ae1b91461022b578063eb39e68f1461023e575f5ffd5b80635ddb9b5b146101895780636141879e146101b15780636738c40b146101c4575f5ffd5b8063017d7974146100cf578063080b7150146100f75780631a18746c1461011757806326af6a3c1461014157806354fd4d50146101615780635be8727414610176575b5f5ffd5b6100e26100dd366004612103565b61025e565b60405190151581526020015b60405180910390f35b61010a6101053660046121de565b6103ef565b6040516100ee9190612229565b61012a610125366004612260565b610404565b6040805192151583529015156020830152016100ee565b61015461014f3660046122ae565b610425565b6040516100ee9190612323565b6101696104dd565b6040516100ee9190612358565b6100e26101843660046122ae565b61050d565b61019c61019736600461238d565b6105d8565b60405163ffffffff90911681526020016100ee565b61019c6101bf36600461238d565b6105fe565b6101d76101d23660046123bd565b610624565b005b6102007f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100ee565b61020061022636600461238d565b6107f1565b6100e2610239366004612476565b61081a565b61025161024c3660046124e9565b6108ad565b6040516100ee9190612560565b5f5f61026a8585610972565b90505f61027686610b32565b5f8181526004602081815260408084208a5163ffffffff16855282528084208151608081018352815481526001820154818501528251808401845260028301548152600383015481860152818401529381018054835181860281018601909452808452969750949593949093606086019383018282801561031457602002820191905f5260205f20905b815481526020019060010190808311610300575b50505050508152505090505f8160600151905085518451146103495760405163512509d360e11b815260040160405180910390fd5b5f5b84518110156103de575f61271088838151811061036a5761036a612572565b602002602001015161ffff1684848151811061038857610388612572565b602002602001015161039a919061259a565b6103a491906125c5565b9050808683815181106103b9576103b9612572565b602002602001015110156103d5575f96505050505050506103e8565b5060010161034b565b5060019450505050505b9392505050565b60606103fb8383610972565b90505b92915050565b5f5f61041886848787600162061a80610b95565b9150915094509492505050565b61042d611a9c565b5f61043785610b32565b5f81815260056020908152604080832063ffffffff8916845282528083208784528252918290208251608081018452815481850190815260018301546060830152815260028201805485518186028101860190965280865295965090949193858401939092908301828280156104ca57602002820191905f5260205f20905b8154815260200190600101908083116104b6575b5050505050815250509150509392505050565b60606105087f0000000000000000000000000000000000000000000000000000000000000000610c5d565b905090565b5f5f61051885610b32565b5f81815260056020908152604080832063ffffffff891684528252808320878452825280832081516080810183528154818401908152600183015460608301528152600282018054845181870281018701909552808552969750949590949193858101939291908301828280156105ac57602002820191905f5260205f20905b815481526020019060010190808311610598575b50505091909252505081515191925050158015906105ce575080516020015115155b9695505050505050565b5f5f6105e383610b32565b5f9081526003602052604090205463ffffffff169392505050565b5f5f61060983610b32565b5f9081526002602052604090205463ffffffff169392505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461066d5760405163030c1b6b60e11b815260040160405180910390fd5b5f6106856106803687900387018761238d565b610b32565b5f8181526003602052604090205490915063ffffffff908116908516116106bf57604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020818152604080842063ffffffff8916855282529283902086518155818701516001820155928601518051600285015581015160038401556060860151805187949361071793908501920190611ac6565b5050505f818152600360209081526040909120805463ffffffff191663ffffffff8716179055610749908301836125d8565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b039490941693909317909255610788919084019084016125f1565b5f8281526002602052604090819020805463ffffffff191663ffffffff9390931692909217909155517f93e6bea1c9b5dce4a5c07b00261e956df2a4a253d9ab6ca070ca2037d72ada9e906107e29087908790879061260a565b60405180910390a15050505050565b5f5f6107fc83610b32565b5f908152600160205260409020546001600160a01b03169392505050565b5f5f6108268585610972565b9050825181511461084a5760405163512509d360e11b815260040160405180910390fd5b5f5b81518110156108a15783818151811061086757610867612572565b602002602001015182828151811061088157610881612572565b60200260200101511015610899575f925050506103e8565b60010161084c565b50600195945050505050565b6108b5611b0f565b5f6108bf84610b32565b5f81815260046020818152604080842063ffffffff891685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652959650929490936060860193909290919083018282801561096057602002820191905f5260205f20905b81548152602001906001019080831161094c575b50505050508152505091505092915050565b606061097c611b41565b61098584610b32565b80825283516109949190610c9a565b80515f908152600460208181526040808420875163ffffffff1685528252928390208351608081018552815481526001820154818401528451808601865260028301548152600383015481850152818601529281018054855181850281018501909652808652939491936060860193830182828015610a3057602002820191905f5260205f20905b815481526020019060010190808311610a1c575b505050919092525050506020820181905251610a5f57604051630cad17b760e31b815260040160405180910390fd5b806020015160600151516001600160401b03811115610a8057610a80611c6f565b604051908082528060200260200182016040528015610aa9578160200160208202803683370190505b5060408201525f5b81602001516060015151811015610b0d578160200151606001518181518110610adc57610adc612572565b602002602001015182604001518281518110610afa57610afa612572565b6020908102919091010152600101610ab1565b50610b188184610d95565b6060820152610b278184610ebf565b604001519392505050565b5f815f0151826020015163ffffffff16604051602001610b7d92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b6040516020818303038152906040526103fe90612656565b5f5f5f610ba189610f2d565b90505f610bb08a89898c610fb7565b90505f610bc7610bc08a8461106b565b8b906110db565b90505f610c09610c0284610bfc6040805180820182525f80825260209182015281518083019092526001825260029082015290565b9061106b565b85906110db565b90508715610c2e57610c2582610c1d61114f565b838c8b61120f565b96509450610c4e565b610c4182610c3a61114f565b838c611423565b95508515610c4e57600194505b50505050965096945050505050565b60605f610c698361165a565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f8281526002602052604090205463ffffffff16801580610cca5750610cc08183612679565b63ffffffff164211155b610ce75760405163640fcd6b60e11b815260040160405180910390fd5b60405163193877e160e21b815263ffffffff831660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906364e1df8490602401602060405180830381865afa158015610d4f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d739190612695565b610d9057604051631b14174b60e01b815260040160405180910390fd5b505050565b6040805180820182525f808252602091820181905282518084019093528083529082018190525b826080015151811015610eb8575f83608001518281518110610de057610de0612572565b60200260200101519050846020015160200151815f015163ffffffff1610610e1b576040516301fa53c760e11b815260040160405180910390fd5b845184515f91610e2b9184611681565b8051909150610e3b9085906110db565b93505f5b816020015151811015610ead57866040015151811015610ea55781602001518181518110610e6f57610e6f612572565b602002602001015187604001518281518110610e8d57610e8d612572565b60200260200101818151610ea191906126b4565b9052505b600101610e3f565b505050600101610dbc565b5092915050565b5f610edf610ed084606001516117f8565b602085015160400151906110db565b90505f5f610efb84602001518486606001518760400151610404565b91509150818015610f095750805b610f265760405163439cc0cd60e01b815260040160405180910390fd5b5050505050565b604080518082019091525f80825260208201525f8080610f5a5f5160206126ee5f395f51905f52866126c7565b90505b610f668161188e565b90935091505f5160206126ee5f395f51905f528283098303610f9e576040805180820190915290815260208101919091529392505050565b5f5160206126ee5f395f51905f52600182089050610f5d565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c61106291906126c7565b95945050505050565b604080518082019091525f8082526020820152611086611b86565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa905080806110b457fe5b50806110d357604051632319df1960e11b815260040160405180910390fd5b505092915050565b604080518082019091525f80825260208201526110f6611ba4565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa9050808061113057fe5b50806110d35760405163d4b68fd760e01b815260040160405180910390fd5b611157611bc2565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f91829190611240611be2565b5f5b60028110156113f7575f61125782600661259a565b905084826002811061126b5761126b612572565b6020020151518361127c835f6126da565b600c811061128c5761128c612572565b60200201528482600281106112a3576112a3612572565b602002015160200151838260016112ba91906126da565b600c81106112ca576112ca612572565b60200201528382600281106112e1576112e1612572565b60200201515151836112f48360026126da565b600c811061130457611304612572565b602002015283826002811061131b5761131b612572565b60200201515160016020020151836113348360036126da565b600c811061134457611344612572565b602002015283826002811061135b5761135b612572565b6020020151602001515f6002811061137557611375612572565b6020020151836113868360046126da565b600c811061139657611396612572565b60200201528382600281106113ad576113ad612572565b6020020151602001516001600281106113c8576113c8612572565b6020020151836113d98360056126da565b600c81106113e9576113e9612572565b602002015250600101611242565b50611400611c01565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f91611451611be2565b5f5b6002811015611608575f61146882600661259a565b905084826002811061147c5761147c612572565b6020020151518361148d835f6126da565b600c811061149d5761149d612572565b60200201528482600281106114b4576114b4612572565b602002015160200151838260016114cb91906126da565b600c81106114db576114db612572565b60200201528382600281106114f2576114f2612572565b60200201515151836115058360026126da565b600c811061151557611515612572565b602002015283826002811061152c5761152c612572565b60200201515160016020020151836115458360036126da565b600c811061155557611555612572565b602002015283826002811061156c5761156c612572565b6020020151602001515f6002811061158657611586612572565b6020020151836115978360046126da565b600c81106115a7576115a7612572565b60200201528382600281106115be576115be612572565b6020020151602001516001600281106115d9576115d9612572565b6020020151836115ea8360056126da565b600c81106115fa576115fa612572565b602002015250600101611453565b50611611611c01565b5f6020826101808560086107d05a03fa9050808061162b57fe5b508061164a576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b5f60ff8216601f8111156103fe57604051632cd44ac360e21b815260040160405180910390fd5b611689611a9c565b5f84815260056020908152604080832063ffffffff808816855290835281842086519091168452825280832081516080810183528154818401908152600183015460608301528152600282018054845181870281018701909552808552919492938584019390929083018282801561171e57602002820191905f5260205f20905b81548152602001906001019080831161170a575b5050509190925250508151519192505f911515905080611742575081516020015115155b9050806117eb575f6117628787875f01518860400151896020015161190a565b9050806117825760405163439cc0cd60e01b815260040160405180910390fd5b6040808601515f8981526005602090815283822063ffffffff808c1684529082528483208a51909116835281529290208151805182558301516001820155828201518051929391926117da9260028501920190611ac6565b5090505084604001519350506117ef565b8192505b50509392505050565b604080518082019091525f8082526020820152815115801561181c57506020820151155b15611839575050604080518082019091525f808252602082015290565b6040518060400160405280835f015181526020015f5160206126ee5f395f51905f52846020015161186a91906126c7565b611881905f5160206126ee5f395f51905f526126b4565b905292915050565b919050565b5f80805f5160206126ee5f395f51905f5260035f5160206126ee5f395f51905f52865f5160206126ee5f395f51905f52888909090890505f6118fe827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f5160206126ee5f395f51905f52611975565b91959194509092505050565b5f5f8360405160200161191d9190612323565b60408051601f1981840301815291815281516020928301205f8a81526004845282812063ffffffff808c1683529452919091205490925090611969908590839085908a8116906119ee16565b98975050505050505050565b5f5f61197f611c01565b611987611c1f565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa925082806119c457fe5b50826119e35760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b5f836119fb868585611a05565b1495945050505050565b5f60208451611a1491906126c7565b15611a32576040516313717da960e21b815260040160405180910390fd5b8260205b85518111611a9357611a496002856126c7565b5f03611a6a57815f528086015160205260405f209150600284049350611a81565b808601515f528160205260405f2091506002840493505b611a8c6020826126da565b9050611a36565b50949350505050565b604080516080810182525f91810182815260608201929092529081905b8152602001606081525090565b828054828255905f5260205f20908101928215611aff579160200282015b82811115611aff578251825591602001919060010190611ae4565b50611b0b929150611c3d565b5090565b60405180608001604052805f81526020015f8152602001611ab960405180604001604052805f81526020015f81525090565b60405180608001604052805f8152602001611b5a611b0f565b815260200160608152602001611b8160405180604001604052805f81526020015f81525090565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b6040518060400160405280611bd5611c51565b8152602001611b81611c51565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b80821115611b0b575f8155600101611c3e565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611ca557611ca5611c6f565b60405290565b60405160a081016001600160401b0381118282101715611ca557611ca5611c6f565b604051606081016001600160401b0381118282101715611ca557611ca5611c6f565b604051608081016001600160401b0381118282101715611ca557611ca5611c6f565b604051601f8201601f191681016001600160401b0381118282101715611d3957611d39611c6f565b604052919050565b80356001600160a01b0381168114611889575f5ffd5b803563ffffffff81168114611889575f5ffd5b5f60408284031215611d7a575f5ffd5b611d82611c83565b9050611d8d82611d41565b8152611d9b60208301611d57565b602082015292915050565b5f60408284031215611db6575f5ffd5b611dbe611c83565b823581526020928301359281019290925250919050565b5f82601f830112611de4575f5ffd5b611dec611c83565b806040840185811115611dfd575f5ffd5b845b81811015611e17578035845260209384019301611dff565b509095945050505050565b5f60808284031215611e32575f5ffd5b611e3a611c83565b9050611e468383611dd5565b8152611d9b8360408401611dd5565b5f6001600160401b03821115611e6d57611e6d611c6f565b5060051b60200190565b5f82601f830112611e86575f5ffd5b8135611e99611e9482611e55565b611d11565b8082825260208201915060208360051b860101925085831115611eba575f5ffd5b602085015b83811015611ed7578035835260209283019201611ebf565b5095945050505050565b5f60608284031215611ef1575f5ffd5b611ef9611c83565b9050611f058383611da6565b815260408201356001600160401b03811115611f1f575f5ffd5b611f2b84828501611e77565b60208301525092915050565b5f6101208284031215611f48575f5ffd5b611f50611cab565b9050611f5b82611d57565b815260208281013590820152611f748360408401611da6565b6040820152611f868360808401611e22565b60608201526101008201356001600160401b03811115611fa4575f5ffd5b8201601f81018413611fb4575f5ffd5b8035611fc2611e9482611e55565b8082825260208201915060208360051b850101925086831115611fe3575f5ffd5b602084015b838110156120f35780356001600160401b03811115612005575f5ffd5b85016060818a03601f1901121561201a575f5ffd5b612022611ccd565b61202e60208301611d57565b815260408201356001600160401b03811115612048575f5ffd5b82016020810190603f018b1361205c575f5ffd5b80356001600160401b0381111561207557612075611c6f565b612088601f8201601f1916602001611d11565b8181528c602083850101111561209c575f5ffd5b816020840160208301375f6020838301015280602085015250505060608201356001600160401b038111156120cf575f5ffd5b6120de8b602083860101611ee1565b60408301525084525060209283019201611fe8565b5060808501525091949350505050565b5f5f5f60808486031215612115575f5ffd5b61211f8585611d6a565b925060408401356001600160401b03811115612139575f5ffd5b61214586828701611f37565b92505060608401356001600160401b03811115612160575f5ffd5b8401601f81018613612170575f5ffd5b803561217e611e9482611e55565b8082825260208201915060208360051b85010192508883111561219f575f5ffd5b6020840193505b828410156121d057833561ffff811681146121bf575f5ffd5b8252602093840193909101906121a6565b809450505050509250925092565b5f5f606083850312156121ef575f5ffd5b6121f98484611d6a565b915060408301356001600160401b03811115612213575f5ffd5b61221f85828601611f37565b9150509250929050565b602080825282518282018190525f918401906040840190835b81811015611e17578351835260209384019390920191600101612242565b5f5f5f5f6101208587031215612274575f5ffd5b843593506122858660208701611da6565b92506122948660608701611e22565b91506122a38660e08701611da6565b905092959194509250565b5f5f5f608084860312156122c0575f5ffd5b6122ca8585611d6a565b92506122d860408501611d57565b929592945050506060919091013590565b5f8151808452602084019350602083015f5b828110156123195781518652602095860195909101906001016122fb565b5093949350505050565b60208082528251805183830152015160408201525f602083015160608084015261235060808401826122e9565b949350505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f6040828403121561239d575f5ffd5b6103fb8383611d6a565b5f604082840312156123b7575f5ffd5b50919050565b5f5f5f5f60c085870312156123d0575f5ffd5b6123da86866123a7565b93506123e860408601611d57565b925060608501356001600160401b03811115612402575f5ffd5b850160a08188031215612413575f5ffd5b61241b611cef565b81358152602080830135908201526124368860408401611da6565b604082015260808201356001600160401b03811115612453575f5ffd5b61245f89828501611e77565b60608301525092506122a3905086608087016123a7565b5f5f5f60808486031215612488575f5ffd5b6124928585611d6a565b925060408401356001600160401b038111156124ac575f5ffd5b6124b886828701611f37565b92505060608401356001600160401b038111156124d3575f5ffd5b6124df86828701611e77565b9150509250925092565b5f5f606083850312156124fa575f5ffd5b6125048484611d6a565b915061251260408401611d57565b90509250929050565b80518252602081015160208301525f6040820151612546604085018280518252602090810151910152565b50606082015160a0608085015261235060a08501826122e9565b602081525f6103fb602083018461251b565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176103fe576103fe612586565b634e487b7160e01b5f52601260045260245ffd5b5f826125d3576125d36125b1565b500490565b5f602082840312156125e8575f5ffd5b6103fb82611d41565b5f60208284031215612601575f5ffd5b6103fb82611d57565b6001600160a01b0361261b85611d41565b16815263ffffffff61262f60208601611d57565b16602082015263ffffffff83166040820152608060608201525f611062608083018461251b565b805160208083015191908110156123b7575f1960209190910360031b1b16919050565b63ffffffff81811683821601908111156103fe576103fe612586565b5f602082840312156126a5575f5ffd5b815180151581146103e8575f5ffd5b818103818111156103fe576103fe612586565b5f826126d5576126d56125b1565b500690565b808201808211156103fe576103fe61258656fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a264697066735822122030cf4634462953a5f322deca9ccc7da9df627808ec8fc13aecae8fe13035c76f64736f6c634300081b0033", } // BN254CertificateVerifierABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/ECDSACertificateVerifier/binding.go b/pkg/bindings/ECDSACertificateVerifier/binding.go index 24bf91dce6..f6084d24eb 100644 --- a/pkg/bindings/ECDSACertificateVerifier/binding.go +++ b/pkg/bindings/ECDSACertificateVerifier/binding.go @@ -57,7 +57,7 @@ type OperatorSet struct { // ECDSACertificateVerifierMetaData contains all meta data concerning the ECDSACertificateVerifier contract. var ECDSACertificateVerifierMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_operatorTableUpdater\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignersNotOrdered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", - Bin: "0x60c060405234801561000f575f5ffd5b506040516122ce3803806122ce83398101604081905261002e9161016d565b6001600160a01b03821660805280806100468161005b565b60a0525061005490506100a1565b5050610297565b5f5f829050601f8151111561008e578260405163305a27a960e01b8152600401610085919061023c565b60405180910390fd5b805161009982610271565b179392505050565b5f54610100900460ff16156101085760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610085565b5f5460ff90811614610157575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017e575f5ffd5b82516001600160a01b0381168114610194575f5ffd5b60208401519092506001600160401b038111156101af575f5ffd5b8301601f810185136101bf575f5ffd5b80516001600160401b038111156101d8576101d8610159565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020657610206610159565b60405281815282820160200187101561021d575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610291575f198160200360031b1b821691505b50919050565b60805160a0516120016102cd5f395f818161054e015261123801525f81816101bb015281816105820152610e9101526120015ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c806368d6e08111610093578063be86e0b211610063578063be86e0b214610249578063c0da24201461026a578063e49613fc1461027d578063f698da251461029d575f5ffd5b806368d6e081146101b65780637c85ac4c146101f557806380c7d3f3146102155780638481892014610236575f5ffd5b806354fd4d50116100ce57806354fd4d501461016657806356d482f51461017b5780635ddb9b5b146101905780636141879e146101a3575f5ffd5b806304cdbae4146100f4578063184674341461011d57806323c2a3cb1461013e575b5f5ffd5b6101076101023660046115fa565b6102a5565b6040516101149190611666565b60405180910390f35b61013061012b36600461167f565b6104a5565b604051908152602001610114565b61015161014c36600461175f565b610514565b60405163ffffffff9091168152602001610114565b61016e610547565b604051610114919061177a565b61018e6101893660046117ef565b610577565b005b61015161019e366004611861565b610770565b6101516101b1366004611861565b610796565b6101dd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610114565b61020861020336600461175f565b6107bc565b60405161011491906118d0565b610228610223366004611943565b61091a565b6040516101149291906119c7565b6101dd610244366004611861565b610938565b61025c6102573660046119f4565b610961565b604051610114929190611ada565b61025c610278366004611af4565b610a01565b61029061028b366004611b6a565b610b03565b6040516101149190611ba5565b610130610c2f565b60605f6102bf6102ba36869003860186611861565b610cef565b5f8181526003602052604090205490915063ffffffff8481169116146102f857604051630cad17b760e31b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff871684529091529020548061033557604051630cad17b760e31b815260040160405180910390fd5b5f82815260056020908152604080832063ffffffff88168452825280832083805290915281206001015490816001600160401b03811115610378576103786116a7565b6040519080825280602002602001820160405280156103a1578160200160208202803683370190505b5090505f5b83811015610498575f85815260056020908152604080832063ffffffff8b168452825280832084845282528083206001018054825181850281018501909352808352919290919083018282801561041a57602002820191905f5260205f20905b815481526020019060010190808311610406575b509394505f93505050505b81518110801561043457508481105b1561048e5781818151811061044b5761044b611bb7565b602002602001015184828151811061046557610465611bb7565b602002602001018181516104799190611bdf565b9052508061048681611bf2565b915050610425565b50506001016103a6565b5093505050505b92915050565b604080517fda346acb3ce99e7c5132bf8cafb159ad8085970ebfdba78007ef0fe163063d14602082015263ffffffff841691810191909152606081018290525f90819060800160405160208183030381529060405280519060200120905061050c81610d52565b949350505050565b5f5f61051f84610cef565b5f90815260046020908152604080832063ffffffff8716845290915290205491505092915050565b60606105727f0000000000000000000000000000000000000000000000000000000000000000610d98565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105c05760405163030c1b6b60e11b815260040160405180910390fd5b5f6105d36102ba36889003880188611861565b5f8181526003602052604090205490915063ffffffff9081169086161161060d57604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff8916845290915281208490555b838110156106955784848281811061064957610649611bb7565b905060200281019061065b9190611c0a565b5f83815260056020908152604080832063ffffffff8b1684528252808320858452909152902061068b8282611c3f565b505060010161062f565b505f818152600360209081526040909120805463ffffffff191663ffffffff88161790556106c590830183611d42565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b03949094169390931790925561070491908401908401611d5d565b5f8281526002602052604090819020805463ffffffff191663ffffffff9390931692909217909155517f4f588da9ec57976194a79b5594f8f8782923d93013df2b9ed12fe125805011ef90610760908890889088908890611d76565b60405180910390a1505050505050565b5f5f61077b83610cef565b5f9081526003602052604090205463ffffffff169392505050565b5f5f6107a183610cef565b5f9081526002602052604090205463ffffffff169392505050565b60605f6107c884610cef565b5f81815260046020908152604080832063ffffffff8089168552925282205492935082166001600160401b03811115610803576108036116a7565b60405190808252806020026020018201604052801561084857816020015b604080518082019091525f8152606060208201528152602001906001900390816108215790505b5090505f5b8263ffffffff16811015610910575f84815260056020908152604080832063ffffffff8a16845282528083208484528252918290208251808401845281546001600160a01b03168152600182018054855181860281018601909652808652919492938581019392908301828280156108e257602002820191905f5260205f20905b8154815260200190600101908083116108ce575b5050505050815250508282815181106108fd576108fd611bb7565b602090810291909101015260010161084d565b5095945050505050565b6060805f5f6109298686610dd5565b909450925050505b9250929050565b5f5f61094383610cef565b5f908152600160205260409020546001600160a01b03169392505050565b5f60605f5f6109708787610dd5565b9150915084518251146109965760405163512509d360e11b815260040160405180910390fd5b5f5b82518110156109f0578581815181106109b3576109b3611bb7565b60200260200101518382815181106109cd576109cd611bb7565b602002602001015110156109e857505f935091506109f99050565b600101610998565b50600193509150505b935093915050565b5f60605f5f610a108888610dd5565b90925090505f610a278961010260208b018b611d5d565b83519091508614610a4b5760405163512509d360e11b815260040160405180910390fd5b5f5b8351811015610aef575f612710898984818110610a6c57610a6c611bb7565b9050602002016020810190610a819190611ea9565b61ffff16848481518110610a9757610a97611bb7565b6020026020010151610aa99190611c28565b610ab39190611ede565b905080858381518110610ac857610ac8611bb7565b60200260200101511015610ae6575f84965096505050505050610afa565b50600101610a4d565b506001945090925050505b94509492505050565b604080518082019091525f8152606060208201525f610b2185610cef565b5f81815260046020908152604080832063ffffffff891684529091529020549091508310610b955760405162461bcd60e51b815260206004820152601c60248201527f4f70657261746f7220696e646578206f7574206f6620626f756e647300000000604482015260640160405180910390fd5b5f81815260056020908152604080832063ffffffff8816845282528083208684528252918290208251808401845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015610c1c57602002820191905f5260205f20905b815481526020019060010190808311610c08575b5050505050815250509150509392505050565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f91ab3d17e3a50a9d89e63fd30b92be7f5336b03b287bb946787a83a9d62a27667f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea610c9c611230565b8051602091820120604051610cd4949392309101938452602084019290925260408301526001600160a01b0316606082015260800190565b60405160208183030381529060405280519060200120905090565b5f815f0151826020015163ffffffff16604051602001610d3a92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261049f90611ef1565b5f610d5b610c2f565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b60605f610da4836112a5565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6060805f610deb6102ba36879003870187611861565b5f8181526002602090815260409091205491925063ffffffff90911690610e1490860186611d5d565b610e1e9190611f14565b63ffffffff16421115610e445760405163640fcd6b60e11b815260040160405180910390fd5b610e516020850185611d5d565b5f8281526003602052604090205463ffffffff908116911614610e8757604051630cad17b760e31b815260040160405180910390fd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166364e1df84610ec36020870187611d5d565b6040516001600160e01b031960e084901b16815263ffffffff919091166004820152602401602060405180830381865afa158015610f03573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f279190611f30565b610f4457604051631b14174b60e01b815260040160405180910390fd5b5f610f56866101026020880188611d5d565b90505f81516001600160401b03811115610f7257610f726116a7565b604051908082528060200260200182016040528015610f9b578160200160208202803683370190505b5090505f610fb9610faf6020890189611d5d565b88602001356104a5565b90505f61100682610fcd60408b018b611f4f565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506112cc92505050565b90505f5b8151811015611220575f82828151811061102657611026611bb7565b602002602001015190505f5f905061105960405180604001604052805f6001600160a01b03168152602001606081525090565b5f5b60045f8b81526020019081526020015f205f8e5f01602081019061107f9190611d5d565b63ffffffff1663ffffffff1681526020019081526020015f205481101561117f5760055f8b81526020019081526020015f205f8e5f0160208101906110c49190611d5d565b63ffffffff16815260208082019290925260409081015f90812084825283528190208151808301835281546001600160a01b03168152600182018054845181870281018701909552808552919492938584019390929083018282801561114757602002820191905f5260205f20905b815481526020019060010190808311611133575b5050505050815250509150836001600160a01b0316825f01516001600160a01b031603611177576001925061117f565b60010161105b565b508161119e5760405163439cc0cd60e01b815260040160405180910390fd5b60208101515f5b8151811080156111b55750885181105b1561120f578181815181106111cc576111cc611bb7565b60200260200101518982815181106111e6576111e6611bb7565b602002602001018181516111fa9190611bdf565b9052508061120781611bf2565b9150506111a5565b50506001909301925061100a915050565b5091989197509095505050505050565b60605f61125c7f0000000000000000000000000000000000000000000000000000000000000000610d98565b9050805f8151811061127057611270611bb7565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f60ff8216601f81111561049f57604051632cd44ac360e21b815260040160405180910390fd5b60605f82511180156112e95750604182516112e79190611f91565b155b61130657604051634be6321b60e01b815260040160405180910390fd5b5f604183516113159190611ede565b9050806001600160401b0381111561132f5761132f6116a7565b604051908082528060200260200182016040528015611358578160200160208202803683370190505b5091505f5b818110156114cb57604080516041808252608082019092525f916020820181803683370190505090505f5b60418110156113f357858161139e856041611c28565b6113a89190611bdf565b815181106113b8576113b8611bb7565b602001015160f81c60f81b8282815181106113d5576113d5611bb7565b60200101906001600160f81b03191690815f1a905350600101611388565b505f5f61140088846114d3565b90925090505f81600481111561141857611418611fa4565b1461143657604051638baa579f60e01b815260040160405180910390fd5b83158061147757508561144a600186611fb8565b8151811061145a5761145a611bb7565b60200260200101516001600160a01b0316826001600160a01b0316115b61149457604051630b550c5760e41b815260040160405180910390fd5b818685815181106114a7576114a7611bb7565b6001600160a01b03929092166020928302919091019091015250505060010161135d565b505092915050565b5f5f8251604103611507576020830151604084015160608501515f1a6114fb87828585611512565b94509450505050610931565b505f90506002610931565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561154757505f90506003610afa565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611598573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166115c0575f60019250925050610afa565b965f9650945050505050565b5f604082840312156115dc575f5ffd5b50919050565b803563ffffffff811681146115f5575f5ffd5b919050565b5f5f6060838503121561160b575f5ffd5b61161584846115cc565b9150611623604084016115e2565b90509250929050565b5f8151808452602084019350602083015f5b8281101561165c57815186526020958601959091019060010161163e565b5093949350505050565b602081525f611678602083018461162c565b9392505050565b5f5f60408385031215611690575f5ffd5b611699836115e2565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156116e3576116e36116a7565b604052919050565b6001600160a01b03811681146116ff575f5ffd5b50565b5f60408284031215611712575f5ffd5b604080519081016001600160401b0381118282101715611734576117346116a7565b6040529050808235611745816116eb565b8152611753602084016115e2565b60208201525092915050565b5f5f60608385031215611770575f5ffd5b6116158484611702565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f83601f8401126117bf575f5ffd5b5081356001600160401b038111156117d5575f5ffd5b6020830191508360208260051b8501011115610931575f5ffd5b5f5f5f5f5f60c08688031215611803575f5ffd5b61180d87876115cc565b945061181b604087016115e2565b935060608601356001600160401b03811115611835575f5ffd5b611841888289016117af565b9094509250611855905087608088016115cc565b90509295509295909350565b5f60408284031215611871575f5ffd5b6116788383611702565b80516001600160a01b03168252602080820151604082850181905281519085018190525f929190910190829060608601905b8083101561091057835182526020820191506020840193506001830192506118ad565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561192757603f1987860301845261191285835161187b565b945060209384019391909101906001016118f6565b50929695505050505050565b5f606082840312156115dc575f5ffd5b5f5f60608385031215611954575f5ffd5b61195e84846115cc565b915060408301356001600160401b03811115611978575f5ffd5b61198485828601611933565b9150509250929050565b5f8151808452602084019350602083015f5b8281101561165c5781516001600160a01b03168652602095860195909101906001016119a0565b604081525f6119d9604083018561162c565b82810360208401526119eb818561198e565b95945050505050565b5f5f5f60808486031215611a06575f5ffd5b611a1085856115cc565b925060408401356001600160401b03811115611a2a575f5ffd5b611a3686828701611933565b92505060608401356001600160401b03811115611a51575f5ffd5b8401601f81018613611a61575f5ffd5b80356001600160401b03811115611a7a57611a7a6116a7565b8060051b611a8a602082016116bb565b91825260208184018101929081019089841115611aa5575f5ffd5b6020850194505b83851015611acb57843580835260209586019590935090910190611aac565b80955050505050509250925092565b8215158152604060208201525f61050c604083018461198e565b5f5f5f5f60808587031215611b07575f5ffd5b611b1186866115cc565b935060408501356001600160401b03811115611b2b575f5ffd5b611b3787828801611933565b93505060608501356001600160401b03811115611b52575f5ffd5b611b5e878288016117af565b95989497509550505050565b5f5f5f60808486031215611b7c575f5ffd5b611b868585611702565b9250611b94604085016115e2565b929592945050506060919091013590565b602081525f611678602083018461187b565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082018082111561049f5761049f611bcb565b5f60018201611c0357611c03611bcb565b5060010190565b5f8235603e19833603018112611c1e575f5ffd5b9190910192915050565b808202811582820484141761049f5761049f611bcb565b8135611c4a816116eb565b81546001600160a01b0319166001600160a01b0391909116178155602082013536839003601e19018112611c7c575f5ffd5b820180356001600160401b03811115611c93575f5ffd5b6020820191508060051b3603821315611caa575f5ffd5b600183016001600160401b03821115611cc557611cc56116a7565b68010000000000000000821115611cde57611cde6116a7565b805482825580831015611d13575f828152602090208381019082015b80821015611d10575f8255600182019150611cfa565b50505b505f90815260208120905b82811015611d3a57833582820155602090930192600101611d1e565b505050505050565b5f60208284031215611d52575f5ffd5b8135611678816116eb565b5f60208284031215611d6d575f5ffd5b611678826115e2565b5f608082018635611d86816116eb565b6001600160a01b0316835263ffffffff611da2602089016115e2565b16602084015263ffffffff861660408401526080606084015283905260a0600584901b83018101908301855f603e1936839003015b87821015611e9a57868503609f190184528235818112611df5575f5ffd5b89018035611e02816116eb565b6001600160a01b03168652602081013536829003601e19018112611e24575f5ffd5b016020810190356001600160401b03811115611e3e575f5ffd5b8060051b803603831315611e50575f5ffd5b60406020890181905288018290526001600160fb1b03821115611e71575f5ffd5b808360608a01376060818901019750505050602083019250602084019350600182019150611dd7565b50929998505050505050505050565b5f60208284031215611eb9575f5ffd5b813561ffff81168114611678575f5ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82611eec57611eec611eca565b500490565b805160208083015191908110156115dc575f1960209190910360031b1b16919050565b63ffffffff818116838216019081111561049f5761049f611bcb565b5f60208284031215611f40575f5ffd5b81518015158114611678575f5ffd5b5f5f8335601e19843603018112611f64575f5ffd5b8301803591506001600160401b03821115611f7d575f5ffd5b602001915036819003821315610931575f5ffd5b5f82611f9f57611f9f611eca565b500690565b634e487b7160e01b5f52602160045260245ffd5b8181038181111561049f5761049f611bcb56fea2646970667358221220f75c79887adc88462bd952997bf884e39246bab87cfa122a8d9db93fdc348b0364736f6c634300081b0033", + Bin: "0x60c060405234801561000f575f5ffd5b506040516122b33803806122b383398101604081905261002e9161016d565b6001600160a01b03821660805280806100468161005b565b60a0525061005490506100a1565b5050610297565b5f5f829050601f8151111561008e578260405163305a27a960e01b8152600401610085919061023c565b60405180910390fd5b805161009982610271565b179392505050565b5f54610100900460ff16156101085760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610085565b5f5460ff90811614610157575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561017e575f5ffd5b82516001600160a01b0381168114610194575f5ffd5b60208401519092506001600160401b038111156101af575f5ffd5b8301601f810185136101bf575f5ffd5b80516001600160401b038111156101d8576101d8610159565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020657610206610159565b60405281815282820160200187101561021d575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610291575f198160200360031b1b821691505b50919050565b60805160a051611fe66102cd5f395f818161054e0152610ff301525f81816101bb015281816105820152610e910152611fe65ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c806368d6e08111610093578063be86e0b211610063578063be86e0b214610249578063c0da24201461026a578063e49613fc1461027d578063f698da251461029d575f5ffd5b806368d6e081146101b65780637c85ac4c146101f557806380c7d3f3146102155780638481892014610236575f5ffd5b806354fd4d50116100ce57806354fd4d501461016657806356d482f51461017b5780635ddb9b5b146101905780636141879e146101a3575f5ffd5b806304cdbae4146100f4578063184674341461011d57806323c2a3cb1461013e575b5f5ffd5b6101076101023660046115df565b6102a5565b604051610114919061164b565b60405180910390f35b61013061012b366004611664565b6104a5565b604051908152602001610114565b61015161014c366004611744565b610514565b60405163ffffffff9091168152602001610114565b61016e610547565b604051610114919061175f565b61018e6101893660046117d4565b610577565b005b61015161019e366004611846565b610770565b6101516101b1366004611846565b610796565b6101dd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610114565b610208610203366004611744565b6107bc565b60405161011491906118b5565b610228610223366004611928565b61091a565b6040516101149291906119ac565b6101dd610244366004611846565b610938565b61025c6102573660046119d9565b610961565b604051610114929190611abf565b61025c610278366004611ad9565b610a01565b61029061028b366004611b4f565b610b03565b6040516101149190611b8a565b610130610c2f565b60605f6102bf6102ba36869003860186611846565b610cef565b5f8181526003602052604090205490915063ffffffff8481169116146102f857604051630cad17b760e31b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff871684529091529020548061033557604051630cad17b760e31b815260040160405180910390fd5b5f82815260056020908152604080832063ffffffff88168452825280832083805290915281206001015490816001600160401b038111156103785761037861168c565b6040519080825280602002602001820160405280156103a1578160200160208202803683370190505b5090505f5b83811015610498575f85815260056020908152604080832063ffffffff8b168452825280832084845282528083206001018054825181850281018501909352808352919290919083018282801561041a57602002820191905f5260205f20905b815481526020019060010190808311610406575b509394505f93505050505b81518110801561043457508481105b1561048e5781818151811061044b5761044b611b9c565b602002602001015184828151811061046557610465611b9c565b602002602001018181516104799190611bc4565b9052508061048681611bd7565b915050610425565b50506001016103a6565b5093505050505b92915050565b604080517fda346acb3ce99e7c5132bf8cafb159ad8085970ebfdba78007ef0fe163063d14602082015263ffffffff841691810191909152606081018290525f90819060800160405160208183030381529060405280519060200120905061050c81610d52565b949350505050565b5f5f61051f84610cef565b5f90815260046020908152604080832063ffffffff8716845290915290205491505092915050565b60606105727f0000000000000000000000000000000000000000000000000000000000000000610d98565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105c05760405163030c1b6b60e11b815260040160405180910390fd5b5f6105d36102ba36889003880188611846565b5f8181526003602052604090205490915063ffffffff9081169086161161060d57604051632f20889f60e01b815260040160405180910390fd5b5f81815260046020908152604080832063ffffffff8916845290915281208490555b838110156106955784848281811061064957610649611b9c565b905060200281019061065b9190611bef565b5f83815260056020908152604080832063ffffffff8b1684528252808320858452909152902061068b8282611c24565b505060010161062f565b505f818152600360209081526040909120805463ffffffff191663ffffffff88161790556106c590830183611d27565b5f8281526001602090815260409182902080546001600160a01b0319166001600160a01b03949094169390931790925561070491908401908401611d42565b5f8281526002602052604090819020805463ffffffff191663ffffffff9390931692909217909155517f4f588da9ec57976194a79b5594f8f8782923d93013df2b9ed12fe125805011ef90610760908890889088908890611d5b565b60405180910390a1505050505050565b5f5f61077b83610cef565b5f9081526003602052604090205463ffffffff169392505050565b5f5f6107a183610cef565b5f9081526002602052604090205463ffffffff169392505050565b60605f6107c884610cef565b5f81815260046020908152604080832063ffffffff8089168552925282205492935082166001600160401b038111156108035761080361168c565b60405190808252806020026020018201604052801561084857816020015b604080518082019091525f8152606060208201528152602001906001900390816108215790505b5090505f5b8263ffffffff16811015610910575f84815260056020908152604080832063ffffffff8a16845282528083208484528252918290208251808401845281546001600160a01b03168152600182018054855181860281018601909652808652919492938581019392908301828280156108e257602002820191905f5260205f20905b8154815260200190600101908083116108ce575b5050505050815250508282815181106108fd576108fd611b9c565b602090810291909101015260010161084d565b5095945050505050565b6060805f5f6109298686610dd5565b909450925050505b9250929050565b5f5f61094383610cef565b5f908152600160205260409020546001600160a01b03169392505050565b5f60605f5f6109708787610dd5565b9150915084518251146109965760405163512509d360e11b815260040160405180910390fd5b5f5b82518110156109f0578581815181106109b3576109b3611b9c565b60200260200101518382815181106109cd576109cd611b9c565b602002602001015110156109e857505f935091506109f99050565b600101610998565b50600193509150505b935093915050565b5f60605f5f610a108888610dd5565b90925090505f610a278961010260208b018b611d42565b83519091508614610a4b5760405163512509d360e11b815260040160405180910390fd5b5f5b8351811015610aef575f612710898984818110610a6c57610a6c611b9c565b9050602002016020810190610a819190611e8e565b61ffff16848481518110610a9757610a97611b9c565b6020026020010151610aa99190611c0d565b610ab39190611ec3565b905080858381518110610ac857610ac8611b9c565b60200260200101511015610ae6575f84965096505050505050610afa565b50600101610a4d565b506001945090925050505b94509492505050565b604080518082019091525f8152606060208201525f610b2185610cef565b5f81815260046020908152604080832063ffffffff891684529091529020549091508310610b955760405162461bcd60e51b815260206004820152601c60248201527f4f70657261746f7220696e646578206f7574206f6620626f756e647300000000604482015260640160405180910390fd5b5f81815260056020908152604080832063ffffffff8816845282528083208684528252918290208251808401845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015610c1c57602002820191905f5260205f20905b815481526020019060010190808311610c08575b5050505050815250509150509392505050565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f91ab3d17e3a50a9d89e63fd30b92be7f5336b03b287bb946787a83a9d62a27667f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea610c9c610feb565b8051602091820120604051610cd4949392309101938452602084019290925260408301526001600160a01b0316606082015260800190565b60405160208183030381529060405280519060200120905090565b5f815f0151826020015163ffffffff16604051602001610d3a92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261049f90611ed6565b5f610d5b610c2f565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b60605f610da483611060565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6060805f610deb6102ba36879003870187611846565b5f8181526002602090815260409091205491925063ffffffff90911690610e1490860186611d42565b610e1e9190611ef9565b63ffffffff16421115610e445760405163640fcd6b60e11b815260040160405180910390fd5b610e516020850185611d42565b5f8281526003602052604090205463ffffffff908116911614610e8757604051630cad17b760e31b815260040160405180910390fd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166364e1df84610ec36020870187611d42565b6040516001600160e01b031960e084901b16815263ffffffff919091166004820152602401602060405180830381865afa158015610f03573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f279190611f15565b610f4457604051631b14174b60e01b815260040160405180910390fd5b5f610f5f610f556020870187611d42565b86602001356104a5565b90505f610fac82610f736040890189611f34565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061108792505050565b90505f610fc08861010260208a018a611d42565b5190505f610fdc85610fd560208b018b611d42565b858561128e565b99929850919650505050505050565b60605f6110177f0000000000000000000000000000000000000000000000000000000000000000610d98565b9050805f8151811061102b5761102b611b9c565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f60ff8216601f81111561049f57604051632cd44ac360e21b815260040160405180910390fd5b60605f82511180156110a45750604182516110a29190611f76565b155b6110c157604051634be6321b60e01b815260040160405180910390fd5b5f604183516110d09190611ec3565b9050806001600160401b038111156110ea576110ea61168c565b604051908082528060200260200182016040528015611113578160200160208202803683370190505b5091505f5b8181101561128657604080516041808252608082019092525f916020820181803683370190505090505f5b60418110156111ae578581611159856041611c0d565b6111639190611bc4565b8151811061117357611173611b9c565b602001015160f81c60f81b82828151811061119057611190611b9c565b60200101906001600160f81b03191690815f1a905350600101611143565b505f5f6111bb88846114b8565b90925090505f8160048111156111d3576111d3611f89565b146111f157604051638baa579f60e01b815260040160405180910390fd5b831580611232575085611205600186611f9d565b8151811061121557611215611b9c565b60200260200101516001600160a01b0316826001600160a01b0316115b61124f57604051630b550c5760e41b815260040160405180910390fd5b8186858151811061126257611262611b9c565b6001600160a01b039290921660209283029190910190910152505050600101611118565b505092915050565b5f84815260046020908152604080832063ffffffff87168452909152902054606090826001600160401b038111156112c8576112c861168c565b6040519080825280602002602001820160405280156112f1578160200160208202803683370190505b5091505f5b84518110156114ae575f85828151811061131257611312611b9c565b602002602001015190505f5f905061134560405180604001604052805f6001600160a01b03168152602001606081525090565b5f5b8581101561140e575f8b815260056020908152604080832063ffffffff8e16845282528083208484528252918290208251808401845281546001600160a01b03168152600182018054855181860281018601909652808652919492938581019392908301828280156113d657602002820191905f5260205f20905b8154815260200190600101908083116113c2575b5050505050815250509150836001600160a01b0316825f01516001600160a01b031603611406576001925061140e565b600101611347565b508161142d5760405163439cc0cd60e01b815260040160405180910390fd5b60208101515f5b81518110801561144357508881105b1561149d5781818151811061145a5761145a611b9c565b602002602001015188828151811061147457611474611b9c565b602002602001018181516114889190611bc4565b9052508061149581611bd7565b915050611434565b5050600190930192506112f6915050565b5050949350505050565b5f5f82516041036114ec576020830151604084015160608501515f1a6114e0878285856114f7565b94509450505050610931565b505f90506002610931565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561152c57505f90506003610afa565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561157d573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b0381166115a5575f60019250925050610afa565b965f9650945050505050565b5f604082840312156115c1575f5ffd5b50919050565b803563ffffffff811681146115da575f5ffd5b919050565b5f5f606083850312156115f0575f5ffd5b6115fa84846115b1565b9150611608604084016115c7565b90509250929050565b5f8151808452602084019350602083015f5b82811015611641578151865260209586019590910190600101611623565b5093949350505050565b602081525f61165d6020830184611611565b9392505050565b5f5f60408385031215611675575f5ffd5b61167e836115c7565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156116c8576116c861168c565b604052919050565b6001600160a01b03811681146116e4575f5ffd5b50565b5f604082840312156116f7575f5ffd5b604080519081016001600160401b03811182821017156117195761171961168c565b604052905080823561172a816116d0565b8152611738602084016115c7565b60208201525092915050565b5f5f60608385031215611755575f5ffd5b6115fa84846116e7565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f83601f8401126117a4575f5ffd5b5081356001600160401b038111156117ba575f5ffd5b6020830191508360208260051b8501011115610931575f5ffd5b5f5f5f5f5f60c086880312156117e8575f5ffd5b6117f287876115b1565b9450611800604087016115c7565b935060608601356001600160401b0381111561181a575f5ffd5b61182688828901611794565b909450925061183a905087608088016115b1565b90509295509295909350565b5f60408284031215611856575f5ffd5b61165d83836116e7565b80516001600160a01b03168252602080820151604082850181905281519085018190525f929190910190829060608601905b808310156109105783518252602082019150602084019350600183019250611892565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561190c57603f198786030184526118f7858351611860565b945060209384019391909101906001016118db565b50929695505050505050565b5f606082840312156115c1575f5ffd5b5f5f60608385031215611939575f5ffd5b61194384846115b1565b915060408301356001600160401b0381111561195d575f5ffd5b61196985828601611918565b9150509250929050565b5f8151808452602084019350602083015f5b828110156116415781516001600160a01b0316865260209586019590910190600101611985565b604081525f6119be6040830185611611565b82810360208401526119d08185611973565b95945050505050565b5f5f5f608084860312156119eb575f5ffd5b6119f585856115b1565b925060408401356001600160401b03811115611a0f575f5ffd5b611a1b86828701611918565b92505060608401356001600160401b03811115611a36575f5ffd5b8401601f81018613611a46575f5ffd5b80356001600160401b03811115611a5f57611a5f61168c565b8060051b611a6f602082016116a0565b91825260208184018101929081019089841115611a8a575f5ffd5b6020850194505b83851015611ab057843580835260209586019590935090910190611a91565b80955050505050509250925092565b8215158152604060208201525f61050c6040830184611973565b5f5f5f5f60808587031215611aec575f5ffd5b611af686866115b1565b935060408501356001600160401b03811115611b10575f5ffd5b611b1c87828801611918565b93505060608501356001600160401b03811115611b37575f5ffd5b611b4387828801611794565b95989497509550505050565b5f5f5f60808486031215611b61575f5ffd5b611b6b85856116e7565b9250611b79604085016115c7565b929592945050506060919091013590565b602081525f61165d6020830184611860565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082018082111561049f5761049f611bb0565b5f60018201611be857611be8611bb0565b5060010190565b5f8235603e19833603018112611c03575f5ffd5b9190910192915050565b808202811582820484141761049f5761049f611bb0565b8135611c2f816116d0565b81546001600160a01b0319166001600160a01b0391909116178155602082013536839003601e19018112611c61575f5ffd5b820180356001600160401b03811115611c78575f5ffd5b6020820191508060051b3603821315611c8f575f5ffd5b600183016001600160401b03821115611caa57611caa61168c565b68010000000000000000821115611cc357611cc361168c565b805482825580831015611cf8575f828152602090208381019082015b80821015611cf5575f8255600182019150611cdf565b50505b505f90815260208120905b82811015611d1f57833582820155602090930192600101611d03565b505050505050565b5f60208284031215611d37575f5ffd5b813561165d816116d0565b5f60208284031215611d52575f5ffd5b61165d826115c7565b5f608082018635611d6b816116d0565b6001600160a01b0316835263ffffffff611d87602089016115c7565b16602084015263ffffffff861660408401526080606084015283905260a0600584901b83018101908301855f603e1936839003015b87821015611e7f57868503609f190184528235818112611dda575f5ffd5b89018035611de7816116d0565b6001600160a01b03168652602081013536829003601e19018112611e09575f5ffd5b016020810190356001600160401b03811115611e23575f5ffd5b8060051b803603831315611e35575f5ffd5b60406020890181905288018290526001600160fb1b03821115611e56575f5ffd5b808360608a01376060818901019750505050602083019250602084019350600182019150611dbc565b50929998505050505050505050565b5f60208284031215611e9e575f5ffd5b813561ffff8116811461165d575f5ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82611ed157611ed1611eaf565b500490565b805160208083015191908110156115c1575f1960209190910360031b1b16919050565b63ffffffff818116838216019081111561049f5761049f611bb0565b5f60208284031215611f25575f5ffd5b8151801515811461165d575f5ffd5b5f5f8335601e19843603018112611f49575f5ffd5b8301803591506001600160401b03821115611f62575f5ffd5b602001915036819003821315610931575f5ffd5b5f82611f8457611f84611eaf565b500690565b634e487b7160e01b5f52602160045260245ffd5b8181038181111561049f5761049f611bb056fea2646970667358221220d50b0a6d6d13b6b6bd302140bdcbcf91dcdd50256106f71f0f31b8330d6843a364736f6c634300081b0033", } // ECDSACertificateVerifierABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/ECDSACertificateVerifierStorage/binding.go b/pkg/bindings/ECDSACertificateVerifierStorage/binding.go index d48db27396..fe4af39ca4 100644 --- a/pkg/bindings/ECDSACertificateVerifierStorage/binding.go +++ b/pkg/bindings/ECDSACertificateVerifierStorage/binding.go @@ -56,7 +56,7 @@ type OperatorSet struct { // ECDSACertificateVerifierStorageMetaData contains all meta data concerning the ECDSACertificateVerifierStorage contract. var ECDSACertificateVerifierStorageMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignersNotOrdered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", + ABI: "[{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"operatorTableUpdater\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOperatorTableUpdater\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignersNotOrdered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", } // ECDSACertificateVerifierStorageABI is the input ABI used to generate the binding from. @@ -515,88 +515,134 @@ func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSes return _ECDSACertificateVerifierStorage.Contract.OperatorTableUpdater(&_ECDSACertificateVerifierStorage.CallOpts) } -// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. +// VerifyCertificate is a free data retrieval call binding the contract method 0x80c7d3f3. // -// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactor) UpdateOperatorTable(opts *bind.TransactOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.contract.Transact(opts, "updateOperatorTable", operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) +// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) view returns(uint256[] signedStakes, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCaller) VerifyCertificate(opts *bind.CallOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (struct { + SignedStakes []*big.Int + Signers []common.Address +}, error) { + var out []interface{} + err := _ECDSACertificateVerifierStorage.contract.Call(opts, &out, "verifyCertificate", operatorSet, cert) + + outstruct := new(struct { + SignedStakes []*big.Int + Signers []common.Address + }) + if err != nil { + return *outstruct, err + } + + outstruct.SignedStakes = *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + outstruct.Signers = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) + + return *outstruct, err + } -// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. +// VerifyCertificate is a free data retrieval call binding the contract method 0x80c7d3f3. // -// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) UpdateOperatorTable(operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.Contract.UpdateOperatorTable(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) +// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) view returns(uint256[] signedStakes, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) VerifyCertificate(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (struct { + SignedStakes []*big.Int + Signers []common.Address +}, error) { + return _ECDSACertificateVerifierStorage.Contract.VerifyCertificate(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, cert) } -// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. +// VerifyCertificate is a free data retrieval call binding the contract method 0x80c7d3f3. // -// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactorSession) UpdateOperatorTable(operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.Contract.UpdateOperatorTable(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) +// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) view returns(uint256[] signedStakes, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSession) VerifyCertificate(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (struct { + SignedStakes []*big.Int + Signers []common.Address +}, error) { + return _ECDSACertificateVerifierStorage.Contract.VerifyCertificate(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, cert) } -// VerifyCertificate is a paid mutator transaction binding the contract method 0x80c7d3f3. +// VerifyCertificateNominal is a free data retrieval call binding the contract method 0xbe86e0b2. // -// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) returns(uint256[] signedStakes, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactor) VerifyCertificate(opts *bind.TransactOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.contract.Transact(opts, "verifyCertificate", operatorSet, cert) +// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) view returns(bool, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCaller) VerifyCertificateNominal(opts *bind.CallOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (bool, []common.Address, error) { + var out []interface{} + err := _ECDSACertificateVerifierStorage.contract.Call(opts, &out, "verifyCertificateNominal", operatorSet, cert, totalStakeNominalThresholds) + + if err != nil { + return *new(bool), *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) + + return out0, out1, err + } -// VerifyCertificate is a paid mutator transaction binding the contract method 0x80c7d3f3. +// VerifyCertificateNominal is a free data retrieval call binding the contract method 0xbe86e0b2. // -// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) returns(uint256[] signedStakes, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) VerifyCertificate(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.Contract.VerifyCertificate(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, cert) +// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) view returns(bool, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) VerifyCertificateNominal(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (bool, []common.Address, error) { + return _ECDSACertificateVerifierStorage.Contract.VerifyCertificateNominal(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, cert, totalStakeNominalThresholds) } -// VerifyCertificate is a paid mutator transaction binding the contract method 0x80c7d3f3. +// VerifyCertificateNominal is a free data retrieval call binding the contract method 0xbe86e0b2. // -// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) returns(uint256[] signedStakes, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactorSession) VerifyCertificate(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.Contract.VerifyCertificate(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, cert) +// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) view returns(bool, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSession) VerifyCertificateNominal(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (bool, []common.Address, error) { + return _ECDSACertificateVerifierStorage.Contract.VerifyCertificateNominal(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, cert, totalStakeNominalThresholds) } -// VerifyCertificateNominal is a paid mutator transaction binding the contract method 0xbe86e0b2. +// VerifyCertificateProportion is a free data retrieval call binding the contract method 0xc0da2420. // -// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) returns(bool, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactor) VerifyCertificateNominal(opts *bind.TransactOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.contract.Transact(opts, "verifyCertificateNominal", operatorSet, cert, totalStakeNominalThresholds) +// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) view returns(bool, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCaller) VerifyCertificateProportion(opts *bind.CallOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (bool, []common.Address, error) { + var out []interface{} + err := _ECDSACertificateVerifierStorage.contract.Call(opts, &out, "verifyCertificateProportion", operatorSet, cert, totalStakeProportionThresholds) + + if err != nil { + return *new(bool), *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) + + return out0, out1, err + } -// VerifyCertificateNominal is a paid mutator transaction binding the contract method 0xbe86e0b2. +// VerifyCertificateProportion is a free data retrieval call binding the contract method 0xc0da2420. // -// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) returns(bool, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) VerifyCertificateNominal(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.Contract.VerifyCertificateNominal(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, cert, totalStakeNominalThresholds) +// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) view returns(bool, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) VerifyCertificateProportion(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (bool, []common.Address, error) { + return _ECDSACertificateVerifierStorage.Contract.VerifyCertificateProportion(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, cert, totalStakeProportionThresholds) } -// VerifyCertificateNominal is a paid mutator transaction binding the contract method 0xbe86e0b2. +// VerifyCertificateProportion is a free data retrieval call binding the contract method 0xc0da2420. // -// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) returns(bool, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactorSession) VerifyCertificateNominal(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.Contract.VerifyCertificateNominal(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, cert, totalStakeNominalThresholds) +// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) view returns(bool, address[] signers) +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageCallerSession) VerifyCertificateProportion(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (bool, []common.Address, error) { + return _ECDSACertificateVerifierStorage.Contract.VerifyCertificateProportion(&_ECDSACertificateVerifierStorage.CallOpts, operatorSet, cert, totalStakeProportionThresholds) } -// VerifyCertificateProportion is a paid mutator transaction binding the contract method 0xc0da2420. +// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. // -// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) returns(bool, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactor) VerifyCertificateProportion(opts *bind.TransactOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.contract.Transact(opts, "verifyCertificateProportion", operatorSet, cert, totalStakeProportionThresholds) +// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactor) UpdateOperatorTable(opts *bind.TransactOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { + return _ECDSACertificateVerifierStorage.contract.Transact(opts, "updateOperatorTable", operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) } -// VerifyCertificateProportion is a paid mutator transaction binding the contract method 0xc0da2420. +// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. // -// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) returns(bool, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) VerifyCertificateProportion(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.Contract.VerifyCertificateProportion(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, cert, totalStakeProportionThresholds) +// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageSession) UpdateOperatorTable(operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { + return _ECDSACertificateVerifierStorage.Contract.UpdateOperatorTable(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) } -// VerifyCertificateProportion is a paid mutator transaction binding the contract method 0xc0da2420. +// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. // -// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) returns(bool, address[] signers) -func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactorSession) VerifyCertificateProportion(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (*types.Transaction, error) { - return _ECDSACertificateVerifierStorage.Contract.VerifyCertificateProportion(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, cert, totalStakeProportionThresholds) +// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() +func (_ECDSACertificateVerifierStorage *ECDSACertificateVerifierStorageTransactorSession) UpdateOperatorTable(operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { + return _ECDSACertificateVerifierStorage.Contract.UpdateOperatorTable(&_ECDSACertificateVerifierStorage.TransactOpts, operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) } // ECDSACertificateVerifierStorageMaxStalenessPeriodUpdatedIterator is returned from FilterMaxStalenessPeriodUpdated and is used to iterate over the raw logs and unpacked data for MaxStalenessPeriodUpdated events raised by the ECDSACertificateVerifierStorage contract. diff --git a/pkg/bindings/IAVSTaskHook/binding.go b/pkg/bindings/IAVSTaskHook/binding.go new file mode 100644 index 0000000000..73af84050b --- /dev/null +++ b/pkg/bindings/IAVSTaskHook/binding.go @@ -0,0 +1,325 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package IAVSTaskHook + +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 +) + +// ITaskMailboxTypesTaskParams is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesTaskParams struct { + RefundCollector common.Address + ExecutorOperatorSet OperatorSet + Payload []byte +} + +// OperatorSet is an auto generated low-level Go binding around an user-defined struct. +type OperatorSet struct { + Avs common.Address + Id uint32 +} + +// IAVSTaskHookMetaData contains all meta data concerning the IAVSTaskHook contract. +var IAVSTaskHookMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"calculateTaskFee\",\"inputs\":[{\"name\":\"taskParams\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.TaskParams\",\"components\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint96\",\"internalType\":\"uint96\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"handlePostTaskCreation\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"handlePostTaskResultSubmission\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"validatePreTaskCreation\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"taskParams\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.TaskParams\",\"components\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validatePreTaskResultSubmission\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"cert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"view\"}]", +} + +// IAVSTaskHookABI is the input ABI used to generate the binding from. +// Deprecated: Use IAVSTaskHookMetaData.ABI instead. +var IAVSTaskHookABI = IAVSTaskHookMetaData.ABI + +// IAVSTaskHook is an auto generated Go binding around an Ethereum contract. +type IAVSTaskHook struct { + IAVSTaskHookCaller // Read-only binding to the contract + IAVSTaskHookTransactor // Write-only binding to the contract + IAVSTaskHookFilterer // Log filterer for contract events +} + +// IAVSTaskHookCaller is an auto generated read-only Go binding around an Ethereum contract. +type IAVSTaskHookCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAVSTaskHookTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IAVSTaskHookTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAVSTaskHookFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IAVSTaskHookFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAVSTaskHookSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IAVSTaskHookSession struct { + Contract *IAVSTaskHook // 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 +} + +// IAVSTaskHookCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IAVSTaskHookCallerSession struct { + Contract *IAVSTaskHookCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IAVSTaskHookTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IAVSTaskHookTransactorSession struct { + Contract *IAVSTaskHookTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IAVSTaskHookRaw is an auto generated low-level Go binding around an Ethereum contract. +type IAVSTaskHookRaw struct { + Contract *IAVSTaskHook // Generic contract binding to access the raw methods on +} + +// IAVSTaskHookCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IAVSTaskHookCallerRaw struct { + Contract *IAVSTaskHookCaller // Generic read-only contract binding to access the raw methods on +} + +// IAVSTaskHookTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IAVSTaskHookTransactorRaw struct { + Contract *IAVSTaskHookTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIAVSTaskHook creates a new instance of IAVSTaskHook, bound to a specific deployed contract. +func NewIAVSTaskHook(address common.Address, backend bind.ContractBackend) (*IAVSTaskHook, error) { + contract, err := bindIAVSTaskHook(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IAVSTaskHook{IAVSTaskHookCaller: IAVSTaskHookCaller{contract: contract}, IAVSTaskHookTransactor: IAVSTaskHookTransactor{contract: contract}, IAVSTaskHookFilterer: IAVSTaskHookFilterer{contract: contract}}, nil +} + +// NewIAVSTaskHookCaller creates a new read-only instance of IAVSTaskHook, bound to a specific deployed contract. +func NewIAVSTaskHookCaller(address common.Address, caller bind.ContractCaller) (*IAVSTaskHookCaller, error) { + contract, err := bindIAVSTaskHook(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IAVSTaskHookCaller{contract: contract}, nil +} + +// NewIAVSTaskHookTransactor creates a new write-only instance of IAVSTaskHook, bound to a specific deployed contract. +func NewIAVSTaskHookTransactor(address common.Address, transactor bind.ContractTransactor) (*IAVSTaskHookTransactor, error) { + contract, err := bindIAVSTaskHook(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IAVSTaskHookTransactor{contract: contract}, nil +} + +// NewIAVSTaskHookFilterer creates a new log filterer instance of IAVSTaskHook, bound to a specific deployed contract. +func NewIAVSTaskHookFilterer(address common.Address, filterer bind.ContractFilterer) (*IAVSTaskHookFilterer, error) { + contract, err := bindIAVSTaskHook(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IAVSTaskHookFilterer{contract: contract}, nil +} + +// bindIAVSTaskHook binds a generic wrapper to an already deployed contract. +func bindIAVSTaskHook(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IAVSTaskHookMetaData.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 (_IAVSTaskHook *IAVSTaskHookRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAVSTaskHook.Contract.IAVSTaskHookCaller.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 (_IAVSTaskHook *IAVSTaskHookRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAVSTaskHook.Contract.IAVSTaskHookTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IAVSTaskHook *IAVSTaskHookRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAVSTaskHook.Contract.IAVSTaskHookTransactor.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 (_IAVSTaskHook *IAVSTaskHookCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAVSTaskHook.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 (_IAVSTaskHook *IAVSTaskHookTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAVSTaskHook.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IAVSTaskHook *IAVSTaskHookTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAVSTaskHook.Contract.contract.Transact(opts, method, params...) +} + +// CalculateTaskFee is a free data retrieval call binding the contract method 0xe06cd27e. +// +// Solidity: function calculateTaskFee((address,(address,uint32),bytes) taskParams) view returns(uint96) +func (_IAVSTaskHook *IAVSTaskHookCaller) CalculateTaskFee(opts *bind.CallOpts, taskParams ITaskMailboxTypesTaskParams) (*big.Int, error) { + var out []interface{} + err := _IAVSTaskHook.contract.Call(opts, &out, "calculateTaskFee", taskParams) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateTaskFee is a free data retrieval call binding the contract method 0xe06cd27e. +// +// Solidity: function calculateTaskFee((address,(address,uint32),bytes) taskParams) view returns(uint96) +func (_IAVSTaskHook *IAVSTaskHookSession) CalculateTaskFee(taskParams ITaskMailboxTypesTaskParams) (*big.Int, error) { + return _IAVSTaskHook.Contract.CalculateTaskFee(&_IAVSTaskHook.CallOpts, taskParams) +} + +// CalculateTaskFee is a free data retrieval call binding the contract method 0xe06cd27e. +// +// Solidity: function calculateTaskFee((address,(address,uint32),bytes) taskParams) view returns(uint96) +func (_IAVSTaskHook *IAVSTaskHookCallerSession) CalculateTaskFee(taskParams ITaskMailboxTypesTaskParams) (*big.Int, error) { + return _IAVSTaskHook.Contract.CalculateTaskFee(&_IAVSTaskHook.CallOpts, taskParams) +} + +// ValidatePreTaskCreation is a free data retrieval call binding the contract method 0x51fe3098. +// +// Solidity: function validatePreTaskCreation(address caller, (address,(address,uint32),bytes) taskParams) view returns() +func (_IAVSTaskHook *IAVSTaskHookCaller) ValidatePreTaskCreation(opts *bind.CallOpts, caller common.Address, taskParams ITaskMailboxTypesTaskParams) error { + var out []interface{} + err := _IAVSTaskHook.contract.Call(opts, &out, "validatePreTaskCreation", caller, taskParams) + + if err != nil { + return err + } + + return err + +} + +// ValidatePreTaskCreation is a free data retrieval call binding the contract method 0x51fe3098. +// +// Solidity: function validatePreTaskCreation(address caller, (address,(address,uint32),bytes) taskParams) view returns() +func (_IAVSTaskHook *IAVSTaskHookSession) ValidatePreTaskCreation(caller common.Address, taskParams ITaskMailboxTypesTaskParams) error { + return _IAVSTaskHook.Contract.ValidatePreTaskCreation(&_IAVSTaskHook.CallOpts, caller, taskParams) +} + +// ValidatePreTaskCreation is a free data retrieval call binding the contract method 0x51fe3098. +// +// Solidity: function validatePreTaskCreation(address caller, (address,(address,uint32),bytes) taskParams) view returns() +func (_IAVSTaskHook *IAVSTaskHookCallerSession) ValidatePreTaskCreation(caller common.Address, taskParams ITaskMailboxTypesTaskParams) error { + return _IAVSTaskHook.Contract.ValidatePreTaskCreation(&_IAVSTaskHook.CallOpts, caller, taskParams) +} + +// ValidatePreTaskResultSubmission is a free data retrieval call binding the contract method 0xba33565d. +// +// Solidity: function validatePreTaskResultSubmission(address caller, bytes32 taskHash, bytes cert, bytes result) view returns() +func (_IAVSTaskHook *IAVSTaskHookCaller) ValidatePreTaskResultSubmission(opts *bind.CallOpts, caller common.Address, taskHash [32]byte, cert []byte, result []byte) error { + var out []interface{} + err := _IAVSTaskHook.contract.Call(opts, &out, "validatePreTaskResultSubmission", caller, taskHash, cert, result) + + if err != nil { + return err + } + + return err + +} + +// ValidatePreTaskResultSubmission is a free data retrieval call binding the contract method 0xba33565d. +// +// Solidity: function validatePreTaskResultSubmission(address caller, bytes32 taskHash, bytes cert, bytes result) view returns() +func (_IAVSTaskHook *IAVSTaskHookSession) ValidatePreTaskResultSubmission(caller common.Address, taskHash [32]byte, cert []byte, result []byte) error { + return _IAVSTaskHook.Contract.ValidatePreTaskResultSubmission(&_IAVSTaskHook.CallOpts, caller, taskHash, cert, result) +} + +// ValidatePreTaskResultSubmission is a free data retrieval call binding the contract method 0xba33565d. +// +// Solidity: function validatePreTaskResultSubmission(address caller, bytes32 taskHash, bytes cert, bytes result) view returns() +func (_IAVSTaskHook *IAVSTaskHookCallerSession) ValidatePreTaskResultSubmission(caller common.Address, taskHash [32]byte, cert []byte, result []byte) error { + return _IAVSTaskHook.Contract.ValidatePreTaskResultSubmission(&_IAVSTaskHook.CallOpts, caller, taskHash, cert, result) +} + +// HandlePostTaskCreation is a paid mutator transaction binding the contract method 0x09c5c450. +// +// Solidity: function handlePostTaskCreation(bytes32 taskHash) returns() +func (_IAVSTaskHook *IAVSTaskHookTransactor) HandlePostTaskCreation(opts *bind.TransactOpts, taskHash [32]byte) (*types.Transaction, error) { + return _IAVSTaskHook.contract.Transact(opts, "handlePostTaskCreation", taskHash) +} + +// HandlePostTaskCreation is a paid mutator transaction binding the contract method 0x09c5c450. +// +// Solidity: function handlePostTaskCreation(bytes32 taskHash) returns() +func (_IAVSTaskHook *IAVSTaskHookSession) HandlePostTaskCreation(taskHash [32]byte) (*types.Transaction, error) { + return _IAVSTaskHook.Contract.HandlePostTaskCreation(&_IAVSTaskHook.TransactOpts, taskHash) +} + +// HandlePostTaskCreation is a paid mutator transaction binding the contract method 0x09c5c450. +// +// Solidity: function handlePostTaskCreation(bytes32 taskHash) returns() +func (_IAVSTaskHook *IAVSTaskHookTransactorSession) HandlePostTaskCreation(taskHash [32]byte) (*types.Transaction, error) { + return _IAVSTaskHook.Contract.HandlePostTaskCreation(&_IAVSTaskHook.TransactOpts, taskHash) +} + +// HandlePostTaskResultSubmission is a paid mutator transaction binding the contract method 0xdb6ecf67. +// +// Solidity: function handlePostTaskResultSubmission(bytes32 taskHash) returns() +func (_IAVSTaskHook *IAVSTaskHookTransactor) HandlePostTaskResultSubmission(opts *bind.TransactOpts, taskHash [32]byte) (*types.Transaction, error) { + return _IAVSTaskHook.contract.Transact(opts, "handlePostTaskResultSubmission", taskHash) +} + +// HandlePostTaskResultSubmission is a paid mutator transaction binding the contract method 0xdb6ecf67. +// +// Solidity: function handlePostTaskResultSubmission(bytes32 taskHash) returns() +func (_IAVSTaskHook *IAVSTaskHookSession) HandlePostTaskResultSubmission(taskHash [32]byte) (*types.Transaction, error) { + return _IAVSTaskHook.Contract.HandlePostTaskResultSubmission(&_IAVSTaskHook.TransactOpts, taskHash) +} + +// HandlePostTaskResultSubmission is a paid mutator transaction binding the contract method 0xdb6ecf67. +// +// Solidity: function handlePostTaskResultSubmission(bytes32 taskHash) returns() +func (_IAVSTaskHook *IAVSTaskHookTransactorSession) HandlePostTaskResultSubmission(taskHash [32]byte) (*types.Transaction, error) { + return _IAVSTaskHook.Contract.HandlePostTaskResultSubmission(&_IAVSTaskHook.TransactOpts, taskHash) +} diff --git a/pkg/bindings/IECDSACertificateVerifier/binding.go b/pkg/bindings/IECDSACertificateVerifier/binding.go index 0aa0f9a55f..62d8f30675 100644 --- a/pkg/bindings/IECDSACertificateVerifier/binding.go +++ b/pkg/bindings/IECDSACertificateVerifier/binding.go @@ -56,7 +56,7 @@ type OperatorSet struct { // IECDSACertificateVerifierMetaData contains all meta data concerning the IECDSACertificateVerifier contract. var IECDSACertificateVerifierMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignersNotOrdered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", + ABI: "[{\"type\":\"function\",\"name\":\"calculateCertificateDigest\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorCount\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfo\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorInfos\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetOwner\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStakes\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestReferenceTimestamp\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxOperatorTableStaleness\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"operatorSetConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyCertificate\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"signedStakes\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateNominal\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeNominalThresholds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCertificateProportion\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"totalStakeProportionThresholds\",\"type\":\"uint16[]\",\"internalType\":\"uint16[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"signers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"MaxStalenessPeriodUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetOwnerUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"owner\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TableUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"operatorInfos\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structIOperatorTableCalculatorTypes.ECDSAOperatorInfo[]\",\"components\":[{\"name\":\"pubkey\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ArrayLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CertificateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTableUpdater\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReferenceTimestampDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootDisabled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignersNotOrdered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TableUpdateStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"VerificationFailed\",\"inputs\":[]}]", } // IECDSACertificateVerifierABI is the input ABI used to generate the binding from. @@ -484,88 +484,134 @@ func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) MaxOpe return _IECDSACertificateVerifier.Contract.MaxOperatorTableStaleness(&_IECDSACertificateVerifier.CallOpts, operatorSet) } -// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. +// VerifyCertificate is a free data retrieval call binding the contract method 0x80c7d3f3. // -// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() -func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactor) UpdateOperatorTable(opts *bind.TransactOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { - return _IECDSACertificateVerifier.contract.Transact(opts, "updateOperatorTable", operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) +// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) view returns(uint256[] signedStakes, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCaller) VerifyCertificate(opts *bind.CallOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (struct { + SignedStakes []*big.Int + Signers []common.Address +}, error) { + var out []interface{} + err := _IECDSACertificateVerifier.contract.Call(opts, &out, "verifyCertificate", operatorSet, cert) + + outstruct := new(struct { + SignedStakes []*big.Int + Signers []common.Address + }) + if err != nil { + return *outstruct, err + } + + outstruct.SignedStakes = *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + outstruct.Signers = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) + + return *outstruct, err + } -// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. +// VerifyCertificate is a free data retrieval call binding the contract method 0x80c7d3f3. // -// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() -func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) UpdateOperatorTable(operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { - return _IECDSACertificateVerifier.Contract.UpdateOperatorTable(&_IECDSACertificateVerifier.TransactOpts, operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) +// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) view returns(uint256[] signedStakes, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) VerifyCertificate(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (struct { + SignedStakes []*big.Int + Signers []common.Address +}, error) { + return _IECDSACertificateVerifier.Contract.VerifyCertificate(&_IECDSACertificateVerifier.CallOpts, operatorSet, cert) } -// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. +// VerifyCertificate is a free data retrieval call binding the contract method 0x80c7d3f3. // -// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() -func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactorSession) UpdateOperatorTable(operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { - return _IECDSACertificateVerifier.Contract.UpdateOperatorTable(&_IECDSACertificateVerifier.TransactOpts, operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) +// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) view returns(uint256[] signedStakes, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) VerifyCertificate(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (struct { + SignedStakes []*big.Int + Signers []common.Address +}, error) { + return _IECDSACertificateVerifier.Contract.VerifyCertificate(&_IECDSACertificateVerifier.CallOpts, operatorSet, cert) } -// VerifyCertificate is a paid mutator transaction binding the contract method 0x80c7d3f3. +// VerifyCertificateNominal is a free data retrieval call binding the contract method 0xbe86e0b2. // -// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) returns(uint256[] signedStakes, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactor) VerifyCertificate(opts *bind.TransactOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (*types.Transaction, error) { - return _IECDSACertificateVerifier.contract.Transact(opts, "verifyCertificate", operatorSet, cert) +// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) view returns(bool, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCaller) VerifyCertificateNominal(opts *bind.CallOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (bool, []common.Address, error) { + var out []interface{} + err := _IECDSACertificateVerifier.contract.Call(opts, &out, "verifyCertificateNominal", operatorSet, cert, totalStakeNominalThresholds) + + if err != nil { + return *new(bool), *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) + + return out0, out1, err + } -// VerifyCertificate is a paid mutator transaction binding the contract method 0x80c7d3f3. +// VerifyCertificateNominal is a free data retrieval call binding the contract method 0xbe86e0b2. // -// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) returns(uint256[] signedStakes, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) VerifyCertificate(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (*types.Transaction, error) { - return _IECDSACertificateVerifier.Contract.VerifyCertificate(&_IECDSACertificateVerifier.TransactOpts, operatorSet, cert) +// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) view returns(bool, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) VerifyCertificateNominal(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (bool, []common.Address, error) { + return _IECDSACertificateVerifier.Contract.VerifyCertificateNominal(&_IECDSACertificateVerifier.CallOpts, operatorSet, cert, totalStakeNominalThresholds) } -// VerifyCertificate is a paid mutator transaction binding the contract method 0x80c7d3f3. +// VerifyCertificateNominal is a free data retrieval call binding the contract method 0xbe86e0b2. // -// Solidity: function verifyCertificate((address,uint32) operatorSet, (uint32,bytes32,bytes) cert) returns(uint256[] signedStakes, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactorSession) VerifyCertificate(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate) (*types.Transaction, error) { - return _IECDSACertificateVerifier.Contract.VerifyCertificate(&_IECDSACertificateVerifier.TransactOpts, operatorSet, cert) +// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) view returns(bool, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) VerifyCertificateNominal(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (bool, []common.Address, error) { + return _IECDSACertificateVerifier.Contract.VerifyCertificateNominal(&_IECDSACertificateVerifier.CallOpts, operatorSet, cert, totalStakeNominalThresholds) } -// VerifyCertificateNominal is a paid mutator transaction binding the contract method 0xbe86e0b2. +// VerifyCertificateProportion is a free data retrieval call binding the contract method 0xc0da2420. // -// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) returns(bool, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactor) VerifyCertificateNominal(opts *bind.TransactOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (*types.Transaction, error) { - return _IECDSACertificateVerifier.contract.Transact(opts, "verifyCertificateNominal", operatorSet, cert, totalStakeNominalThresholds) +// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) view returns(bool, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCaller) VerifyCertificateProportion(opts *bind.CallOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (bool, []common.Address, error) { + var out []interface{} + err := _IECDSACertificateVerifier.contract.Call(opts, &out, "verifyCertificateProportion", operatorSet, cert, totalStakeProportionThresholds) + + if err != nil { + return *new(bool), *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) + + return out0, out1, err + } -// VerifyCertificateNominal is a paid mutator transaction binding the contract method 0xbe86e0b2. +// VerifyCertificateProportion is a free data retrieval call binding the contract method 0xc0da2420. // -// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) returns(bool, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) VerifyCertificateNominal(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (*types.Transaction, error) { - return _IECDSACertificateVerifier.Contract.VerifyCertificateNominal(&_IECDSACertificateVerifier.TransactOpts, operatorSet, cert, totalStakeNominalThresholds) +// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) view returns(bool, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) VerifyCertificateProportion(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (bool, []common.Address, error) { + return _IECDSACertificateVerifier.Contract.VerifyCertificateProportion(&_IECDSACertificateVerifier.CallOpts, operatorSet, cert, totalStakeProportionThresholds) } -// VerifyCertificateNominal is a paid mutator transaction binding the contract method 0xbe86e0b2. +// VerifyCertificateProportion is a free data retrieval call binding the contract method 0xc0da2420. // -// Solidity: function verifyCertificateNominal((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint256[] totalStakeNominalThresholds) returns(bool, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactorSession) VerifyCertificateNominal(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeNominalThresholds []*big.Int) (*types.Transaction, error) { - return _IECDSACertificateVerifier.Contract.VerifyCertificateNominal(&_IECDSACertificateVerifier.TransactOpts, operatorSet, cert, totalStakeNominalThresholds) +// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) view returns(bool, address[] signers) +func (_IECDSACertificateVerifier *IECDSACertificateVerifierCallerSession) VerifyCertificateProportion(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (bool, []common.Address, error) { + return _IECDSACertificateVerifier.Contract.VerifyCertificateProportion(&_IECDSACertificateVerifier.CallOpts, operatorSet, cert, totalStakeProportionThresholds) } -// VerifyCertificateProportion is a paid mutator transaction binding the contract method 0xc0da2420. +// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. // -// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) returns(bool, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactor) VerifyCertificateProportion(opts *bind.TransactOpts, operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (*types.Transaction, error) { - return _IECDSACertificateVerifier.contract.Transact(opts, "verifyCertificateProportion", operatorSet, cert, totalStakeProportionThresholds) +// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() +func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactor) UpdateOperatorTable(opts *bind.TransactOpts, operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { + return _IECDSACertificateVerifier.contract.Transact(opts, "updateOperatorTable", operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) } -// VerifyCertificateProportion is a paid mutator transaction binding the contract method 0xc0da2420. +// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. // -// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) returns(bool, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) VerifyCertificateProportion(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (*types.Transaction, error) { - return _IECDSACertificateVerifier.Contract.VerifyCertificateProportion(&_IECDSACertificateVerifier.TransactOpts, operatorSet, cert, totalStakeProportionThresholds) +// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() +func (_IECDSACertificateVerifier *IECDSACertificateVerifierSession) UpdateOperatorTable(operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { + return _IECDSACertificateVerifier.Contract.UpdateOperatorTable(&_IECDSACertificateVerifier.TransactOpts, operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) } -// VerifyCertificateProportion is a paid mutator transaction binding the contract method 0xc0da2420. +// UpdateOperatorTable is a paid mutator transaction binding the contract method 0x56d482f5. // -// Solidity: function verifyCertificateProportion((address,uint32) operatorSet, (uint32,bytes32,bytes) cert, uint16[] totalStakeProportionThresholds) returns(bool, address[] signers) -func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactorSession) VerifyCertificateProportion(operatorSet OperatorSet, cert IECDSACertificateVerifierTypesECDSACertificate, totalStakeProportionThresholds []uint16) (*types.Transaction, error) { - return _IECDSACertificateVerifier.Contract.VerifyCertificateProportion(&_IECDSACertificateVerifier.TransactOpts, operatorSet, cert, totalStakeProportionThresholds) +// Solidity: function updateOperatorTable((address,uint32) operatorSet, uint32 referenceTimestamp, (address,uint256[])[] operatorInfos, (address,uint32) operatorSetConfig) returns() +func (_IECDSACertificateVerifier *IECDSACertificateVerifierTransactorSession) UpdateOperatorTable(operatorSet OperatorSet, referenceTimestamp uint32, operatorInfos []IOperatorTableCalculatorTypesECDSAOperatorInfo, operatorSetConfig ICrossChainRegistryTypesOperatorSetConfig) (*types.Transaction, error) { + return _IECDSACertificateVerifier.Contract.UpdateOperatorTable(&_IECDSACertificateVerifier.TransactOpts, operatorSet, referenceTimestamp, operatorInfos, operatorSetConfig) } // IECDSACertificateVerifierMaxStalenessPeriodUpdatedIterator is returned from FilterMaxStalenessPeriodUpdated and is used to iterate over the raw logs and unpacked data for MaxStalenessPeriodUpdated events raised by the IECDSACertificateVerifier contract. diff --git a/pkg/bindings/ITaskMailbox/binding.go b/pkg/bindings/ITaskMailbox/binding.go new file mode 100644 index 0000000000..72e8b837c0 --- /dev/null +++ b/pkg/bindings/ITaskMailbox/binding.go @@ -0,0 +1,1785 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ITaskMailbox + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// BN254G1Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G1Point struct { + X *big.Int + Y *big.Int +} + +// BN254G2Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G2Point struct { + X [2]*big.Int + Y [2]*big.Int +} + +// IBN254CertificateVerifierTypesBN254Certificate is an auto generated low-level Go binding around an user-defined struct. +type IBN254CertificateVerifierTypesBN254Certificate struct { + ReferenceTimestamp uint32 + MessageHash [32]byte + Signature BN254G1Point + Apk BN254G2Point + NonSignerWitnesses []IBN254CertificateVerifierTypesBN254OperatorInfoWitness +} + +// IBN254CertificateVerifierTypesBN254OperatorInfoWitness is an auto generated low-level Go binding around an user-defined struct. +type IBN254CertificateVerifierTypesBN254OperatorInfoWitness struct { + OperatorIndex uint32 + OperatorInfoProof []byte + OperatorInfo IOperatorTableCalculatorTypesBN254OperatorInfo +} + +// IECDSACertificateVerifierTypesECDSACertificate is an auto generated low-level Go binding around an user-defined struct. +type IECDSACertificateVerifierTypesECDSACertificate struct { + ReferenceTimestamp uint32 + MessageHash [32]byte + Sig []byte +} + +// IOperatorTableCalculatorTypesBN254OperatorInfo is an auto generated low-level Go binding around an user-defined struct. +type IOperatorTableCalculatorTypesBN254OperatorInfo struct { + Pubkey BN254G1Point + Weights []*big.Int +} + +// ITaskMailboxTypesConsensus is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesConsensus struct { + ConsensusType uint8 + Value []byte +} + +// ITaskMailboxTypesExecutorOperatorSetTaskConfig is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesExecutorOperatorSetTaskConfig struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +} + +// ITaskMailboxTypesTask is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesTask struct { + Creator common.Address + CreationTime *big.Int + Avs common.Address + AvsFee *big.Int + RefundCollector common.Address + ExecutorOperatorSetId uint32 + FeeSplit uint16 + Status uint8 + IsFeeRefunded bool + ExecutorOperatorSetTaskConfig ITaskMailboxTypesExecutorOperatorSetTaskConfig + Payload []byte + ExecutorCert []byte + Result []byte +} + +// ITaskMailboxTypesTaskParams is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesTaskParams struct { + RefundCollector common.Address + ExecutorOperatorSet OperatorSet + Payload []byte +} + +// OperatorSet is an auto generated low-level Go binding around an user-defined struct. +type OperatorSet struct { + Avs common.Address + Id uint32 +} + +// ITaskMailboxMetaData contains all meta data concerning the ITaskMailbox contract. +var ITaskMailboxMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"createTask\",\"inputs\":[{\"name\":\"taskParams\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.TaskParams\",\"components\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getBN254CertificateBytes\",\"inputs\":[{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getECDSACertificateBytes\",\"inputs\":[{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getExecutorOperatorSetTaskConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFeeSplit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFeeSplitCollector\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskInfo\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Task\",\"components\":[{\"name\":\"creator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"creationTime\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"},{\"name\":\"isFeeRefunded\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"executorOperatorSetTaskConfig\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskResult\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskStatus\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isExecutorOperatorSetRegistered\",\"inputs\":[{\"name\":\"operatorSetKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"refundFee\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerExecutorOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"isRegistered\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExecutorOperatorSetTaskConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"config\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeeSplit\",\"inputs\":[{\"name\":\"_feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeeSplitCollector\",\"inputs\":[{\"name\":\"_feeSplitCollector\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"submitResult\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExecutorOperatorSetRegistered\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"isRegistered\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ExecutorOperatorSetTaskConfigSet\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"config\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeRefunded\",\"inputs\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeSplitCollectorSet\",\"inputs\":[{\"name\":\"feeSplitCollector\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeSplitSet\",\"inputs\":[{\"name\":\"feeSplit\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TaskCreated\",\"inputs\":[{\"name\":\"creator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"refundCollector\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"taskDeadline\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"payload\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TaskVerified\",\"inputs\":[{\"name\":\"aggregator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CertificateVerificationFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyCertificateSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExecutorOperatorSetNotRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExecutorOperatorSetTaskConfigNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeAlreadyRefunded\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConsensusType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConsensusValue\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFeeReceiver\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFeeSplit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSetOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTaskCreator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTaskStatus\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"},{\"name\":\"actual\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"}]},{\"type\":\"error\",\"name\":\"OnlyRefundCollector\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PayloadIsEmpty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TaskSLAIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TimestampAtCreation\",\"inputs\":[]}]", +} + +// ITaskMailboxABI is the input ABI used to generate the binding from. +// Deprecated: Use ITaskMailboxMetaData.ABI instead. +var ITaskMailboxABI = ITaskMailboxMetaData.ABI + +// ITaskMailbox is an auto generated Go binding around an Ethereum contract. +type ITaskMailbox struct { + ITaskMailboxCaller // Read-only binding to the contract + ITaskMailboxTransactor // Write-only binding to the contract + ITaskMailboxFilterer // Log filterer for contract events +} + +// ITaskMailboxCaller is an auto generated read-only Go binding around an Ethereum contract. +type ITaskMailboxCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ITaskMailboxTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ITaskMailboxTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ITaskMailboxFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ITaskMailboxFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ITaskMailboxSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ITaskMailboxSession struct { + Contract *ITaskMailbox // 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 +} + +// ITaskMailboxCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ITaskMailboxCallerSession struct { + Contract *ITaskMailboxCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ITaskMailboxTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ITaskMailboxTransactorSession struct { + Contract *ITaskMailboxTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ITaskMailboxRaw is an auto generated low-level Go binding around an Ethereum contract. +type ITaskMailboxRaw struct { + Contract *ITaskMailbox // Generic contract binding to access the raw methods on +} + +// ITaskMailboxCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ITaskMailboxCallerRaw struct { + Contract *ITaskMailboxCaller // Generic read-only contract binding to access the raw methods on +} + +// ITaskMailboxTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ITaskMailboxTransactorRaw struct { + Contract *ITaskMailboxTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewITaskMailbox creates a new instance of ITaskMailbox, bound to a specific deployed contract. +func NewITaskMailbox(address common.Address, backend bind.ContractBackend) (*ITaskMailbox, error) { + contract, err := bindITaskMailbox(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ITaskMailbox{ITaskMailboxCaller: ITaskMailboxCaller{contract: contract}, ITaskMailboxTransactor: ITaskMailboxTransactor{contract: contract}, ITaskMailboxFilterer: ITaskMailboxFilterer{contract: contract}}, nil +} + +// NewITaskMailboxCaller creates a new read-only instance of ITaskMailbox, bound to a specific deployed contract. +func NewITaskMailboxCaller(address common.Address, caller bind.ContractCaller) (*ITaskMailboxCaller, error) { + contract, err := bindITaskMailbox(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ITaskMailboxCaller{contract: contract}, nil +} + +// NewITaskMailboxTransactor creates a new write-only instance of ITaskMailbox, bound to a specific deployed contract. +func NewITaskMailboxTransactor(address common.Address, transactor bind.ContractTransactor) (*ITaskMailboxTransactor, error) { + contract, err := bindITaskMailbox(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ITaskMailboxTransactor{contract: contract}, nil +} + +// NewITaskMailboxFilterer creates a new log filterer instance of ITaskMailbox, bound to a specific deployed contract. +func NewITaskMailboxFilterer(address common.Address, filterer bind.ContractFilterer) (*ITaskMailboxFilterer, error) { + contract, err := bindITaskMailbox(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ITaskMailboxFilterer{contract: contract}, nil +} + +// bindITaskMailbox binds a generic wrapper to an already deployed contract. +func bindITaskMailbox(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ITaskMailboxMetaData.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 (_ITaskMailbox *ITaskMailboxRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ITaskMailbox.Contract.ITaskMailboxCaller.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 (_ITaskMailbox *ITaskMailboxRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ITaskMailbox.Contract.ITaskMailboxTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ITaskMailbox *ITaskMailboxRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ITaskMailbox.Contract.ITaskMailboxTransactor.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 (_ITaskMailbox *ITaskMailboxCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ITaskMailbox.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 (_ITaskMailbox *ITaskMailboxTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ITaskMailbox.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ITaskMailbox *ITaskMailboxTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ITaskMailbox.Contract.contract.Transact(opts, method, params...) +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_ITaskMailbox *ITaskMailboxCaller) GetBN254CertificateBytes(opts *bind.CallOpts, cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "getBN254CertificateBytes", cert) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_ITaskMailbox *ITaskMailboxSession) GetBN254CertificateBytes(cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + return _ITaskMailbox.Contract.GetBN254CertificateBytes(&_ITaskMailbox.CallOpts, cert) +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_ITaskMailbox *ITaskMailboxCallerSession) GetBN254CertificateBytes(cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + return _ITaskMailbox.Contract.GetBN254CertificateBytes(&_ITaskMailbox.CallOpts, cert) +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_ITaskMailbox *ITaskMailboxCaller) GetECDSACertificateBytes(opts *bind.CallOpts, cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "getECDSACertificateBytes", cert) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_ITaskMailbox *ITaskMailboxSession) GetECDSACertificateBytes(cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + return _ITaskMailbox.Contract.GetECDSACertificateBytes(&_ITaskMailbox.CallOpts, cert) +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_ITaskMailbox *ITaskMailboxCallerSession) GetECDSACertificateBytes(cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + return _ITaskMailbox.Contract.GetECDSACertificateBytes(&_ITaskMailbox.CallOpts, cert) +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_ITaskMailbox *ITaskMailboxCaller) GetExecutorOperatorSetTaskConfig(opts *bind.CallOpts, operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "getExecutorOperatorSetTaskConfig", operatorSet) + + if err != nil { + return *new(ITaskMailboxTypesExecutorOperatorSetTaskConfig), err + } + + out0 := *abi.ConvertType(out[0], new(ITaskMailboxTypesExecutorOperatorSetTaskConfig)).(*ITaskMailboxTypesExecutorOperatorSetTaskConfig) + + return out0, err + +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_ITaskMailbox *ITaskMailboxSession) GetExecutorOperatorSetTaskConfig(operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + return _ITaskMailbox.Contract.GetExecutorOperatorSetTaskConfig(&_ITaskMailbox.CallOpts, operatorSet) +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_ITaskMailbox *ITaskMailboxCallerSession) GetExecutorOperatorSetTaskConfig(operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + return _ITaskMailbox.Contract.GetExecutorOperatorSetTaskConfig(&_ITaskMailbox.CallOpts, operatorSet) +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_ITaskMailbox *ITaskMailboxCaller) GetFeeSplit(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "getFeeSplit") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_ITaskMailbox *ITaskMailboxSession) GetFeeSplit() (uint16, error) { + return _ITaskMailbox.Contract.GetFeeSplit(&_ITaskMailbox.CallOpts) +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_ITaskMailbox *ITaskMailboxCallerSession) GetFeeSplit() (uint16, error) { + return _ITaskMailbox.Contract.GetFeeSplit(&_ITaskMailbox.CallOpts) +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_ITaskMailbox *ITaskMailboxCaller) GetFeeSplitCollector(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "getFeeSplitCollector") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_ITaskMailbox *ITaskMailboxSession) GetFeeSplitCollector() (common.Address, error) { + return _ITaskMailbox.Contract.GetFeeSplitCollector(&_ITaskMailbox.CallOpts) +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_ITaskMailbox *ITaskMailboxCallerSession) GetFeeSplitCollector() (common.Address, error) { + return _ITaskMailbox.Contract.GetFeeSplitCollector(&_ITaskMailbox.CallOpts) +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_ITaskMailbox *ITaskMailboxCaller) GetTaskInfo(opts *bind.CallOpts, taskHash [32]byte) (ITaskMailboxTypesTask, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "getTaskInfo", taskHash) + + if err != nil { + return *new(ITaskMailboxTypesTask), err + } + + out0 := *abi.ConvertType(out[0], new(ITaskMailboxTypesTask)).(*ITaskMailboxTypesTask) + + return out0, err + +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_ITaskMailbox *ITaskMailboxSession) GetTaskInfo(taskHash [32]byte) (ITaskMailboxTypesTask, error) { + return _ITaskMailbox.Contract.GetTaskInfo(&_ITaskMailbox.CallOpts, taskHash) +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_ITaskMailbox *ITaskMailboxCallerSession) GetTaskInfo(taskHash [32]byte) (ITaskMailboxTypesTask, error) { + return _ITaskMailbox.Contract.GetTaskInfo(&_ITaskMailbox.CallOpts, taskHash) +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_ITaskMailbox *ITaskMailboxCaller) GetTaskResult(opts *bind.CallOpts, taskHash [32]byte) ([]byte, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "getTaskResult", taskHash) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_ITaskMailbox *ITaskMailboxSession) GetTaskResult(taskHash [32]byte) ([]byte, error) { + return _ITaskMailbox.Contract.GetTaskResult(&_ITaskMailbox.CallOpts, taskHash) +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_ITaskMailbox *ITaskMailboxCallerSession) GetTaskResult(taskHash [32]byte) ([]byte, error) { + return _ITaskMailbox.Contract.GetTaskResult(&_ITaskMailbox.CallOpts, taskHash) +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_ITaskMailbox *ITaskMailboxCaller) GetTaskStatus(opts *bind.CallOpts, taskHash [32]byte) (uint8, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "getTaskStatus", taskHash) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_ITaskMailbox *ITaskMailboxSession) GetTaskStatus(taskHash [32]byte) (uint8, error) { + return _ITaskMailbox.Contract.GetTaskStatus(&_ITaskMailbox.CallOpts, taskHash) +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_ITaskMailbox *ITaskMailboxCallerSession) GetTaskStatus(taskHash [32]byte) (uint8, error) { + return _ITaskMailbox.Contract.GetTaskStatus(&_ITaskMailbox.CallOpts, taskHash) +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool) +func (_ITaskMailbox *ITaskMailboxCaller) IsExecutorOperatorSetRegistered(opts *bind.CallOpts, operatorSetKey [32]byte) (bool, error) { + var out []interface{} + err := _ITaskMailbox.contract.Call(opts, &out, "isExecutorOperatorSetRegistered", operatorSetKey) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool) +func (_ITaskMailbox *ITaskMailboxSession) IsExecutorOperatorSetRegistered(operatorSetKey [32]byte) (bool, error) { + return _ITaskMailbox.Contract.IsExecutorOperatorSetRegistered(&_ITaskMailbox.CallOpts, operatorSetKey) +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool) +func (_ITaskMailbox *ITaskMailboxCallerSession) IsExecutorOperatorSetRegistered(operatorSetKey [32]byte) (bool, error) { + return _ITaskMailbox.Contract.IsExecutorOperatorSetRegistered(&_ITaskMailbox.CallOpts, operatorSetKey) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32 taskHash) +func (_ITaskMailbox *ITaskMailboxTransactor) CreateTask(opts *bind.TransactOpts, taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _ITaskMailbox.contract.Transact(opts, "createTask", taskParams) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32 taskHash) +func (_ITaskMailbox *ITaskMailboxSession) CreateTask(taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _ITaskMailbox.Contract.CreateTask(&_ITaskMailbox.TransactOpts, taskParams) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32 taskHash) +func (_ITaskMailbox *ITaskMailboxTransactorSession) CreateTask(taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _ITaskMailbox.Contract.CreateTask(&_ITaskMailbox.TransactOpts, taskParams) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_ITaskMailbox *ITaskMailboxTransactor) RefundFee(opts *bind.TransactOpts, taskHash [32]byte) (*types.Transaction, error) { + return _ITaskMailbox.contract.Transact(opts, "refundFee", taskHash) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_ITaskMailbox *ITaskMailboxSession) RefundFee(taskHash [32]byte) (*types.Transaction, error) { + return _ITaskMailbox.Contract.RefundFee(&_ITaskMailbox.TransactOpts, taskHash) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_ITaskMailbox *ITaskMailboxTransactorSession) RefundFee(taskHash [32]byte) (*types.Transaction, error) { + return _ITaskMailbox.Contract.RefundFee(&_ITaskMailbox.TransactOpts, taskHash) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_ITaskMailbox *ITaskMailboxTransactor) RegisterExecutorOperatorSet(opts *bind.TransactOpts, operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _ITaskMailbox.contract.Transact(opts, "registerExecutorOperatorSet", operatorSet, isRegistered) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_ITaskMailbox *ITaskMailboxSession) RegisterExecutorOperatorSet(operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _ITaskMailbox.Contract.RegisterExecutorOperatorSet(&_ITaskMailbox.TransactOpts, operatorSet, isRegistered) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_ITaskMailbox *ITaskMailboxTransactorSession) RegisterExecutorOperatorSet(operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _ITaskMailbox.Contract.RegisterExecutorOperatorSet(&_ITaskMailbox.TransactOpts, operatorSet, isRegistered) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_ITaskMailbox *ITaskMailboxTransactor) SetExecutorOperatorSetTaskConfig(opts *bind.TransactOpts, operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _ITaskMailbox.contract.Transact(opts, "setExecutorOperatorSetTaskConfig", operatorSet, config) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_ITaskMailbox *ITaskMailboxSession) SetExecutorOperatorSetTaskConfig(operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _ITaskMailbox.Contract.SetExecutorOperatorSetTaskConfig(&_ITaskMailbox.TransactOpts, operatorSet, config) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_ITaskMailbox *ITaskMailboxTransactorSession) SetExecutorOperatorSetTaskConfig(operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _ITaskMailbox.Contract.SetExecutorOperatorSetTaskConfig(&_ITaskMailbox.TransactOpts, operatorSet, config) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_ITaskMailbox *ITaskMailboxTransactor) SetFeeSplit(opts *bind.TransactOpts, _feeSplit uint16) (*types.Transaction, error) { + return _ITaskMailbox.contract.Transact(opts, "setFeeSplit", _feeSplit) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_ITaskMailbox *ITaskMailboxSession) SetFeeSplit(_feeSplit uint16) (*types.Transaction, error) { + return _ITaskMailbox.Contract.SetFeeSplit(&_ITaskMailbox.TransactOpts, _feeSplit) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_ITaskMailbox *ITaskMailboxTransactorSession) SetFeeSplit(_feeSplit uint16) (*types.Transaction, error) { + return _ITaskMailbox.Contract.SetFeeSplit(&_ITaskMailbox.TransactOpts, _feeSplit) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_ITaskMailbox *ITaskMailboxTransactor) SetFeeSplitCollector(opts *bind.TransactOpts, _feeSplitCollector common.Address) (*types.Transaction, error) { + return _ITaskMailbox.contract.Transact(opts, "setFeeSplitCollector", _feeSplitCollector) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_ITaskMailbox *ITaskMailboxSession) SetFeeSplitCollector(_feeSplitCollector common.Address) (*types.Transaction, error) { + return _ITaskMailbox.Contract.SetFeeSplitCollector(&_ITaskMailbox.TransactOpts, _feeSplitCollector) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_ITaskMailbox *ITaskMailboxTransactorSession) SetFeeSplitCollector(_feeSplitCollector common.Address) (*types.Transaction, error) { + return _ITaskMailbox.Contract.SetFeeSplitCollector(&_ITaskMailbox.TransactOpts, _feeSplitCollector) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_ITaskMailbox *ITaskMailboxTransactor) SubmitResult(opts *bind.TransactOpts, taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _ITaskMailbox.contract.Transact(opts, "submitResult", taskHash, executorCert, result) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_ITaskMailbox *ITaskMailboxSession) SubmitResult(taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _ITaskMailbox.Contract.SubmitResult(&_ITaskMailbox.TransactOpts, taskHash, executorCert, result) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_ITaskMailbox *ITaskMailboxTransactorSession) SubmitResult(taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _ITaskMailbox.Contract.SubmitResult(&_ITaskMailbox.TransactOpts, taskHash, executorCert, result) +} + +// ITaskMailboxExecutorOperatorSetRegisteredIterator is returned from FilterExecutorOperatorSetRegistered and is used to iterate over the raw logs and unpacked data for ExecutorOperatorSetRegistered events raised by the ITaskMailbox contract. +type ITaskMailboxExecutorOperatorSetRegisteredIterator struct { + Event *ITaskMailboxExecutorOperatorSetRegistered // 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 *ITaskMailboxExecutorOperatorSetRegisteredIterator) 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(ITaskMailboxExecutorOperatorSetRegistered) + 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(ITaskMailboxExecutorOperatorSetRegistered) + 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 *ITaskMailboxExecutorOperatorSetRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ITaskMailboxExecutorOperatorSetRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ITaskMailboxExecutorOperatorSetRegistered represents a ExecutorOperatorSetRegistered event raised by the ITaskMailbox contract. +type ITaskMailboxExecutorOperatorSetRegistered struct { + Caller common.Address + Avs common.Address + ExecutorOperatorSetId uint32 + IsRegistered bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutorOperatorSetRegistered is a free log retrieval operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_ITaskMailbox *ITaskMailboxFilterer) FilterExecutorOperatorSetRegistered(opts *bind.FilterOpts, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (*ITaskMailboxExecutorOperatorSetRegisteredIterator, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _ITaskMailbox.contract.FilterLogs(opts, "ExecutorOperatorSetRegistered", callerRule, avsRule, executorOperatorSetIdRule) + if err != nil { + return nil, err + } + return &ITaskMailboxExecutorOperatorSetRegisteredIterator{contract: _ITaskMailbox.contract, event: "ExecutorOperatorSetRegistered", logs: logs, sub: sub}, nil +} + +// WatchExecutorOperatorSetRegistered is a free log subscription operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_ITaskMailbox *ITaskMailboxFilterer) WatchExecutorOperatorSetRegistered(opts *bind.WatchOpts, sink chan<- *ITaskMailboxExecutorOperatorSetRegistered, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (event.Subscription, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _ITaskMailbox.contract.WatchLogs(opts, "ExecutorOperatorSetRegistered", callerRule, avsRule, executorOperatorSetIdRule) + 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(ITaskMailboxExecutorOperatorSetRegistered) + if err := _ITaskMailbox.contract.UnpackLog(event, "ExecutorOperatorSetRegistered", 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 +} + +// ParseExecutorOperatorSetRegistered is a log parse operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_ITaskMailbox *ITaskMailboxFilterer) ParseExecutorOperatorSetRegistered(log types.Log) (*ITaskMailboxExecutorOperatorSetRegistered, error) { + event := new(ITaskMailboxExecutorOperatorSetRegistered) + if err := _ITaskMailbox.contract.UnpackLog(event, "ExecutorOperatorSetRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ITaskMailboxExecutorOperatorSetTaskConfigSetIterator is returned from FilterExecutorOperatorSetTaskConfigSet and is used to iterate over the raw logs and unpacked data for ExecutorOperatorSetTaskConfigSet events raised by the ITaskMailbox contract. +type ITaskMailboxExecutorOperatorSetTaskConfigSetIterator struct { + Event *ITaskMailboxExecutorOperatorSetTaskConfigSet // 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 *ITaskMailboxExecutorOperatorSetTaskConfigSetIterator) 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(ITaskMailboxExecutorOperatorSetTaskConfigSet) + 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(ITaskMailboxExecutorOperatorSetTaskConfigSet) + 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 *ITaskMailboxExecutorOperatorSetTaskConfigSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ITaskMailboxExecutorOperatorSetTaskConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ITaskMailboxExecutorOperatorSetTaskConfigSet represents a ExecutorOperatorSetTaskConfigSet event raised by the ITaskMailbox contract. +type ITaskMailboxExecutorOperatorSetTaskConfigSet struct { + Caller common.Address + Avs common.Address + ExecutorOperatorSetId uint32 + Config ITaskMailboxTypesExecutorOperatorSetTaskConfig + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutorOperatorSetTaskConfigSet is a free log retrieval operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_ITaskMailbox *ITaskMailboxFilterer) FilterExecutorOperatorSetTaskConfigSet(opts *bind.FilterOpts, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (*ITaskMailboxExecutorOperatorSetTaskConfigSetIterator, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _ITaskMailbox.contract.FilterLogs(opts, "ExecutorOperatorSetTaskConfigSet", callerRule, avsRule, executorOperatorSetIdRule) + if err != nil { + return nil, err + } + return &ITaskMailboxExecutorOperatorSetTaskConfigSetIterator{contract: _ITaskMailbox.contract, event: "ExecutorOperatorSetTaskConfigSet", logs: logs, sub: sub}, nil +} + +// WatchExecutorOperatorSetTaskConfigSet is a free log subscription operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_ITaskMailbox *ITaskMailboxFilterer) WatchExecutorOperatorSetTaskConfigSet(opts *bind.WatchOpts, sink chan<- *ITaskMailboxExecutorOperatorSetTaskConfigSet, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (event.Subscription, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _ITaskMailbox.contract.WatchLogs(opts, "ExecutorOperatorSetTaskConfigSet", callerRule, avsRule, executorOperatorSetIdRule) + 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(ITaskMailboxExecutorOperatorSetTaskConfigSet) + if err := _ITaskMailbox.contract.UnpackLog(event, "ExecutorOperatorSetTaskConfigSet", 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 +} + +// ParseExecutorOperatorSetTaskConfigSet is a log parse operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_ITaskMailbox *ITaskMailboxFilterer) ParseExecutorOperatorSetTaskConfigSet(log types.Log) (*ITaskMailboxExecutorOperatorSetTaskConfigSet, error) { + event := new(ITaskMailboxExecutorOperatorSetTaskConfigSet) + if err := _ITaskMailbox.contract.UnpackLog(event, "ExecutorOperatorSetTaskConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ITaskMailboxFeeRefundedIterator is returned from FilterFeeRefunded and is used to iterate over the raw logs and unpacked data for FeeRefunded events raised by the ITaskMailbox contract. +type ITaskMailboxFeeRefundedIterator struct { + Event *ITaskMailboxFeeRefunded // 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 *ITaskMailboxFeeRefundedIterator) 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(ITaskMailboxFeeRefunded) + 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(ITaskMailboxFeeRefunded) + 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 *ITaskMailboxFeeRefundedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ITaskMailboxFeeRefundedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ITaskMailboxFeeRefunded represents a FeeRefunded event raised by the ITaskMailbox contract. +type ITaskMailboxFeeRefunded struct { + RefundCollector common.Address + TaskHash [32]byte + AvsFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeRefunded is a free log retrieval operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_ITaskMailbox *ITaskMailboxFilterer) FilterFeeRefunded(opts *bind.FilterOpts, refundCollector []common.Address, taskHash [][32]byte) (*ITaskMailboxFeeRefundedIterator, error) { + + var refundCollectorRule []interface{} + for _, refundCollectorItem := range refundCollector { + refundCollectorRule = append(refundCollectorRule, refundCollectorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + + logs, sub, err := _ITaskMailbox.contract.FilterLogs(opts, "FeeRefunded", refundCollectorRule, taskHashRule) + if err != nil { + return nil, err + } + return &ITaskMailboxFeeRefundedIterator{contract: _ITaskMailbox.contract, event: "FeeRefunded", logs: logs, sub: sub}, nil +} + +// WatchFeeRefunded is a free log subscription operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_ITaskMailbox *ITaskMailboxFilterer) WatchFeeRefunded(opts *bind.WatchOpts, sink chan<- *ITaskMailboxFeeRefunded, refundCollector []common.Address, taskHash [][32]byte) (event.Subscription, error) { + + var refundCollectorRule []interface{} + for _, refundCollectorItem := range refundCollector { + refundCollectorRule = append(refundCollectorRule, refundCollectorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + + logs, sub, err := _ITaskMailbox.contract.WatchLogs(opts, "FeeRefunded", refundCollectorRule, taskHashRule) + 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(ITaskMailboxFeeRefunded) + if err := _ITaskMailbox.contract.UnpackLog(event, "FeeRefunded", 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 +} + +// ParseFeeRefunded is a log parse operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_ITaskMailbox *ITaskMailboxFilterer) ParseFeeRefunded(log types.Log) (*ITaskMailboxFeeRefunded, error) { + event := new(ITaskMailboxFeeRefunded) + if err := _ITaskMailbox.contract.UnpackLog(event, "FeeRefunded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ITaskMailboxFeeSplitCollectorSetIterator is returned from FilterFeeSplitCollectorSet and is used to iterate over the raw logs and unpacked data for FeeSplitCollectorSet events raised by the ITaskMailbox contract. +type ITaskMailboxFeeSplitCollectorSetIterator struct { + Event *ITaskMailboxFeeSplitCollectorSet // 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 *ITaskMailboxFeeSplitCollectorSetIterator) 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(ITaskMailboxFeeSplitCollectorSet) + 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(ITaskMailboxFeeSplitCollectorSet) + 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 *ITaskMailboxFeeSplitCollectorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ITaskMailboxFeeSplitCollectorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ITaskMailboxFeeSplitCollectorSet represents a FeeSplitCollectorSet event raised by the ITaskMailbox contract. +type ITaskMailboxFeeSplitCollectorSet struct { + FeeSplitCollector common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeSplitCollectorSet is a free log retrieval operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_ITaskMailbox *ITaskMailboxFilterer) FilterFeeSplitCollectorSet(opts *bind.FilterOpts, feeSplitCollector []common.Address) (*ITaskMailboxFeeSplitCollectorSetIterator, error) { + + var feeSplitCollectorRule []interface{} + for _, feeSplitCollectorItem := range feeSplitCollector { + feeSplitCollectorRule = append(feeSplitCollectorRule, feeSplitCollectorItem) + } + + logs, sub, err := _ITaskMailbox.contract.FilterLogs(opts, "FeeSplitCollectorSet", feeSplitCollectorRule) + if err != nil { + return nil, err + } + return &ITaskMailboxFeeSplitCollectorSetIterator{contract: _ITaskMailbox.contract, event: "FeeSplitCollectorSet", logs: logs, sub: sub}, nil +} + +// WatchFeeSplitCollectorSet is a free log subscription operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_ITaskMailbox *ITaskMailboxFilterer) WatchFeeSplitCollectorSet(opts *bind.WatchOpts, sink chan<- *ITaskMailboxFeeSplitCollectorSet, feeSplitCollector []common.Address) (event.Subscription, error) { + + var feeSplitCollectorRule []interface{} + for _, feeSplitCollectorItem := range feeSplitCollector { + feeSplitCollectorRule = append(feeSplitCollectorRule, feeSplitCollectorItem) + } + + logs, sub, err := _ITaskMailbox.contract.WatchLogs(opts, "FeeSplitCollectorSet", feeSplitCollectorRule) + 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(ITaskMailboxFeeSplitCollectorSet) + if err := _ITaskMailbox.contract.UnpackLog(event, "FeeSplitCollectorSet", 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 +} + +// ParseFeeSplitCollectorSet is a log parse operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_ITaskMailbox *ITaskMailboxFilterer) ParseFeeSplitCollectorSet(log types.Log) (*ITaskMailboxFeeSplitCollectorSet, error) { + event := new(ITaskMailboxFeeSplitCollectorSet) + if err := _ITaskMailbox.contract.UnpackLog(event, "FeeSplitCollectorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ITaskMailboxFeeSplitSetIterator is returned from FilterFeeSplitSet and is used to iterate over the raw logs and unpacked data for FeeSplitSet events raised by the ITaskMailbox contract. +type ITaskMailboxFeeSplitSetIterator struct { + Event *ITaskMailboxFeeSplitSet // 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 *ITaskMailboxFeeSplitSetIterator) 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(ITaskMailboxFeeSplitSet) + 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(ITaskMailboxFeeSplitSet) + 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 *ITaskMailboxFeeSplitSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ITaskMailboxFeeSplitSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ITaskMailboxFeeSplitSet represents a FeeSplitSet event raised by the ITaskMailbox contract. +type ITaskMailboxFeeSplitSet struct { + FeeSplit uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeSplitSet is a free log retrieval operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_ITaskMailbox *ITaskMailboxFilterer) FilterFeeSplitSet(opts *bind.FilterOpts) (*ITaskMailboxFeeSplitSetIterator, error) { + + logs, sub, err := _ITaskMailbox.contract.FilterLogs(opts, "FeeSplitSet") + if err != nil { + return nil, err + } + return &ITaskMailboxFeeSplitSetIterator{contract: _ITaskMailbox.contract, event: "FeeSplitSet", logs: logs, sub: sub}, nil +} + +// WatchFeeSplitSet is a free log subscription operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_ITaskMailbox *ITaskMailboxFilterer) WatchFeeSplitSet(opts *bind.WatchOpts, sink chan<- *ITaskMailboxFeeSplitSet) (event.Subscription, error) { + + logs, sub, err := _ITaskMailbox.contract.WatchLogs(opts, "FeeSplitSet") + 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(ITaskMailboxFeeSplitSet) + if err := _ITaskMailbox.contract.UnpackLog(event, "FeeSplitSet", 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 +} + +// ParseFeeSplitSet is a log parse operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_ITaskMailbox *ITaskMailboxFilterer) ParseFeeSplitSet(log types.Log) (*ITaskMailboxFeeSplitSet, error) { + event := new(ITaskMailboxFeeSplitSet) + if err := _ITaskMailbox.contract.UnpackLog(event, "FeeSplitSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ITaskMailboxTaskCreatedIterator is returned from FilterTaskCreated and is used to iterate over the raw logs and unpacked data for TaskCreated events raised by the ITaskMailbox contract. +type ITaskMailboxTaskCreatedIterator struct { + Event *ITaskMailboxTaskCreated // 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 *ITaskMailboxTaskCreatedIterator) 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(ITaskMailboxTaskCreated) + 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(ITaskMailboxTaskCreated) + 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 *ITaskMailboxTaskCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ITaskMailboxTaskCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ITaskMailboxTaskCreated represents a TaskCreated event raised by the ITaskMailbox contract. +type ITaskMailboxTaskCreated struct { + Creator common.Address + TaskHash [32]byte + Avs common.Address + ExecutorOperatorSetId uint32 + RefundCollector common.Address + AvsFee *big.Int + TaskDeadline *big.Int + Payload []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTaskCreated is a free log retrieval operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_ITaskMailbox *ITaskMailboxFilterer) FilterTaskCreated(opts *bind.FilterOpts, creator []common.Address, taskHash [][32]byte, avs []common.Address) (*ITaskMailboxTaskCreatedIterator, error) { + + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _ITaskMailbox.contract.FilterLogs(opts, "TaskCreated", creatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return &ITaskMailboxTaskCreatedIterator{contract: _ITaskMailbox.contract, event: "TaskCreated", logs: logs, sub: sub}, nil +} + +// WatchTaskCreated is a free log subscription operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_ITaskMailbox *ITaskMailboxFilterer) WatchTaskCreated(opts *bind.WatchOpts, sink chan<- *ITaskMailboxTaskCreated, creator []common.Address, taskHash [][32]byte, avs []common.Address) (event.Subscription, error) { + + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _ITaskMailbox.contract.WatchLogs(opts, "TaskCreated", creatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ITaskMailboxTaskCreated) + if err := _ITaskMailbox.contract.UnpackLog(event, "TaskCreated", 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 +} + +// ParseTaskCreated is a log parse operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_ITaskMailbox *ITaskMailboxFilterer) ParseTaskCreated(log types.Log) (*ITaskMailboxTaskCreated, error) { + event := new(ITaskMailboxTaskCreated) + if err := _ITaskMailbox.contract.UnpackLog(event, "TaskCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ITaskMailboxTaskVerifiedIterator is returned from FilterTaskVerified and is used to iterate over the raw logs and unpacked data for TaskVerified events raised by the ITaskMailbox contract. +type ITaskMailboxTaskVerifiedIterator struct { + Event *ITaskMailboxTaskVerified // 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 *ITaskMailboxTaskVerifiedIterator) 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(ITaskMailboxTaskVerified) + 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(ITaskMailboxTaskVerified) + 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 *ITaskMailboxTaskVerifiedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ITaskMailboxTaskVerifiedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ITaskMailboxTaskVerified represents a TaskVerified event raised by the ITaskMailbox contract. +type ITaskMailboxTaskVerified struct { + Aggregator common.Address + TaskHash [32]byte + Avs common.Address + ExecutorOperatorSetId uint32 + ExecutorCert []byte + Result []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTaskVerified is a free log retrieval operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_ITaskMailbox *ITaskMailboxFilterer) FilterTaskVerified(opts *bind.FilterOpts, aggregator []common.Address, taskHash [][32]byte, avs []common.Address) (*ITaskMailboxTaskVerifiedIterator, error) { + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _ITaskMailbox.contract.FilterLogs(opts, "TaskVerified", aggregatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return &ITaskMailboxTaskVerifiedIterator{contract: _ITaskMailbox.contract, event: "TaskVerified", logs: logs, sub: sub}, nil +} + +// WatchTaskVerified is a free log subscription operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_ITaskMailbox *ITaskMailboxFilterer) WatchTaskVerified(opts *bind.WatchOpts, sink chan<- *ITaskMailboxTaskVerified, aggregator []common.Address, taskHash [][32]byte, avs []common.Address) (event.Subscription, error) { + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _ITaskMailbox.contract.WatchLogs(opts, "TaskVerified", aggregatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ITaskMailboxTaskVerified) + if err := _ITaskMailbox.contract.UnpackLog(event, "TaskVerified", 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 +} + +// ParseTaskVerified is a log parse operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_ITaskMailbox *ITaskMailboxFilterer) ParseTaskVerified(log types.Log) (*ITaskMailboxTaskVerified, error) { + event := new(ITaskMailboxTaskVerified) + if err := _ITaskMailbox.contract.UnpackLog(event, "TaskVerified", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/bindings/KeyRegistrar/binding.go b/pkg/bindings/KeyRegistrar/binding.go index 00ed614d1d..4b6b0e05aa 100644 --- a/pkg/bindings/KeyRegistrar/binding.go +++ b/pkg/bindings/KeyRegistrar/binding.go @@ -50,7 +50,7 @@ type OperatorSet struct { // KeyRegistrarMetaData contains all meta data concerning the KeyRegistrar contract. var KeyRegistrarMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_permissionController\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"},{\"name\":\"_allocationManager\",\"type\":\"address\",\"internalType\":\"contractIAllocationManager\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BN254_KEY_REGISTRATION_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ECDSA_KEY_REGISTRATION_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\":\"checkKey\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"configureOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deregisterKey\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"domainSeparator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"encodeBN254KeyData\",\"inputs\":[{\"name\":\"g1Point\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"g2Point\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getBN254Key\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"g1Point\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"g2Point\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBN254KeyRegistrationMessageHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"keyData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getECDSAAddress\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getECDSAKey\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getECDSAKeyRegistrationMessageHash\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"keyAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getKeyHash\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorFromSigningKey\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"keyData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperatorSetCurveType\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isKeyGloballyRegistered\",\"inputs\":[{\"name\":\"keyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRegistered\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"permissionController\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPermissionController\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerKey\",\"inputs\":[{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"keyData\",\"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\":\"AggregateBN254KeyUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"newAggregateKey\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"KeyDeregistered\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"KeyRegistered\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"pubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OperatorSetConfigured\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"curveType\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ConfigurationAlreadySet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECAddFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECMulFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECPairingFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpModFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidKeyFormat\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidKeypair\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPermissions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"KeyAlreadyRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"KeyNotFound\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OperatorSetNotConfigured\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OperatorStillSlashable\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"SignatureExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ZeroPubkey\",\"inputs\":[]}]", - Bin: "0x60e060405234801561000f575f5ffd5b5060405161326038038061326083398101604081905261002e916100cb565b6001600160a01b03808316608052831660a052808061004c8161005a565b60c052506101fc9350505050565b5f5f829050601f8151111561008d578260405163305a27a960e01b815260040161008491906101a1565b60405180910390fd5b8051610098826101d6565b179392505050565b6001600160a01b03811681146100b4575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156100dd575f5ffd5b83516100e8816100a0565b60208501519093506100f9816100a0565b60408501519092506001600160401b03811115610114575f5ffd5b8401601f81018613610124575f5ffd5b80516001600160401b0381111561013d5761013d6100b7565b604051601f8201601f19908116603f011681016001600160401b038111828210171561016b5761016b6100b7565b604052818152828201602001881015610182575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156101f6575f198160200360031b1b821691505b50919050565b60805160a05160c05161302561023b5f395f8181610552015261180601525f81816101c301526113f701525f8181610359015261077501526130255ff3fe608060405234801561000f575f5ffd5b5060043610610132575f3560e01c80639a43e3fb116100b4578063d40cda1611610079578063d40cda161461037b578063d9f12db21461038e578063dab42d7e146103a1578063ea0d8149146103c3578063ea194e2e146103d6578063f698da25146103e9575f5ffd5b80639a43e3fb146102e6578063aa165c3014610307578063b05c8f6d1461031a578063bd30a0b914610341578063ca8aa7c714610354575f5ffd5b806354fd4d50116100fa57806354fd4d50146102645780637690e3951461026c5780637cffe48c1461027f5780638256909c1461029f57806387ab86f4146102d1575f5ffd5b80630a6ac26414610136578063166aa1271461015e5780633b32a7bd146101935780634657e26a146101be57806350435add146101e5575b5f5ffd5b6101496101443660046126b2565b6103f1565b60405190151581526020015b60405180910390f35b6101857f991b0a3376ce87f8ecc5d70962279ac09cdce934e8b5b9683e73c8ff087c7f8181565b604051908152602001610155565b6101a66101a13660046126b2565b61052d565b6040516001600160a01b039091168152602001610155565b6101a67f000000000000000000000000000000000000000000000000000000000000000081565b6102576101f3366004612733565b8151602080840151835180519083015185840151805190850151604080519687019790975295850193909352606084810192909252608084015260a083019190915260c082019290925260e001604051602081830303815290604052905092915050565b60405161015591906127de565b61025761054b565b61018561027a36600461282e565b61057b565b61029261028d36600461288c565b610623565b60405161015591906128da565b6102b26102ad3660046128e8565b610649565b604080516001600160a01b039093168352901515602083015201610155565b6102e46102df36600461298e565b610737565b005b6102f96102f43660046126b2565b610a48565b6040516101559291906129d9565b6102576103153660046126b2565b610c30565b6101857fda86e76deaed01641f80ff5f72c372a038fa5182697aeb967e8b1f9819d58d8181565b61014961034f3660046126b2565b610d6d565b6101a67f000000000000000000000000000000000000000000000000000000000000000081565b6102e4610389366004612a16565b610daa565b61018561039c366004612aa7565b610f1b565b6101496103af366004612ae8565b5f9081526002602052604090205460ff1690565b6102e46103d1366004612aff565b610fb4565b6101856103e43660046126b2565b6110f7565b61018561121f565b5f5f60015f6103ff866112d8565b815260208101919091526040015f9081205460ff169150816002811115610428576104286128a6565b0361044657604051635cd3106d60e11b815260040160405180910390fd5b5f5f5f610452876112d8565b815260208082019290925260409081015f9081206001600160a01b038816825283528190208151808301909252805460ff1615158252600181018054929391929184019161049f90612b38565b80601f01602080910402602001604051908101604052809291908181526020018280546104cb90612b38565b80156105165780601f106104ed57610100808354040283529160200191610516565b820191905f5260205f20905b8154815290600101906020018083116104f957829003601f168201915b505050919092525050905193505050505b92915050565b5f6105388383610c30565b61054190612b70565b60601c9392505050565b60606105767f0000000000000000000000000000000000000000000000000000000000000000611336565b905090565b5f5f7fda86e76deaed01641f80ff5f72c372a038fa5182697aeb967e8b1f9819d58d8186865f0151876020015187876040516105b8929190612bc8565b6040805191829003822060208301969096526001600160a01b039485169082015292909116606083015263ffffffff16608082015260a081019190915260c00160405160208183030381529060405280519060200120905061061981611373565b9695505050505050565b5f60015f610630846112d8565b815260208101919091526040015f205460ff1692915050565b5f5f5f60015f610658876112d8565b815260208101919091526040015f9081205460ff1691506001826002811115610683576106836128a6565b03610695575083516020850120610706565b60028260028111156106a9576106a96128a6565b036106ed575f5f868060200190518101906106c49190612bd7565b60408051808201825283815260209081019283525f938452915190915290209250610706915050565b60405163fdea7c0960e01b815260040160405180910390fd5b5f818152600360205260409020546001600160a01b0316806107288882610d6d565b945094505050505b9250929050565b81610741816113b9565b61075e5760405163932d94f760e01b815260040160405180910390fd5b6040516309a961f360e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631352c3e6906107ac9086908690600401612bf9565b602060405180830381865afa1580156107c7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107eb9190612c2f565b158284909161083857604051631070287960e01b815282516001600160a01b03908116600483015260209093015163ffffffff166024820152911660448201526064015b60405180910390fd5b50505f60015f610847856112d8565b815260208101919091526040015f9081205460ff169150816002811115610870576108706128a6565b0361088e57604051635cd3106d60e11b815260040160405180910390fd5b5f5f5f61089a866112d8565b815260208082019290925260409081015f9081206001600160a01b038916825283528190208151808301909252805460ff161515825260018101805492939192918401916108e790612b38565b80601f016020809104026020016040519081016040528092919081815260200182805461091390612b38565b801561095e5780601f106109355761010080835404028352916020019161095e565b820191905f5260205f20905b81548152906001019060200180831161094157829003601f168201915b5050505050815250509050805f0151848690916109b457604051632e40e18760e01b815282516001600160a01b03908116600483015260209093015163ffffffff1660248201529116604482015260640161082f565b50505f5f6109c1866112d8565b815260208082019290925260409081015f9081206001600160a01b03891682529092528120805460ff19168155906109fc60018301826124b7565b5050846001600160a01b03167f28d3c3cee49478ec6fd219cfd685cd15cd01d95cabf69b4b7b57f9eaa3eb64428584604051610a39929190612c4e565b60405180910390a25050505050565b604080518082019091525f8082526020820152610a636124f1565b5f60015f610a70876112d8565b815260208101919091526040015f205460ff1690506002816002811115610a9957610a996128a6565b14610ab75760405163fdea7c0960e01b815260040160405180910390fd5b5f5f5f610ac3886112d8565b815260208082019290925260409081015f9081206001600160a01b038916825283528190208151808301909252805460ff16151582526001810180549293919291840191610b1090612b38565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3c90612b38565b8015610b875780601f10610b5e57610100808354040283529160200191610b87565b820191905f5260205f20905b815481529060010190602001808311610b6a57829003601f168201915b5050505050815250509050805f0151610bdc5750506040805180820182525f80825260208083018290528351808501855282815280820192909252835180850190945282845283019190915292509050610730565b5f5f5f5f8460200151806020019051810190610bf89190612cc0565b604080518082018252948552602080860194909452805180820190915291825291810191909152909b909a5098505050505050505050565b60605f60015f610c3f866112d8565b815260208101919091526040015f205460ff1690506001816002811115610c6857610c686128a6565b14610c865760405163fdea7c0960e01b815260040160405180910390fd5b5f5f5f610c92876112d8565b815260208082019290925260409081015f9081206001600160a01b038816825283528190208151808301909252805460ff16151582526001810180549293919291840191610cdf90612b38565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0b90612b38565b8015610d565780601f10610d2d57610100808354040283529160200191610d56565b820191905f5260205f20905b815481529060010190602001808311610d3957829003601f168201915b505050919092525050506020015195945050505050565b5f5f5f610d79856112d8565b815260208082019290925260409081015f9081206001600160a01b038616825290925290205460ff16905092915050565b85610db4816113b9565b610dd15760405163932d94f760e01b815260040160405180910390fd5b5f60015f610dde896112d8565b815260208101919091526040015f9081205460ff169150816002811115610e0757610e076128a6565b03610e2557604051635cd3106d60e11b815260040160405180910390fd5b5f5f610e30896112d8565b815260208082019290925260409081015f9081206001600160a01b038c16825290925290205460ff1615610e7757604051630c7bc20160e11b815260040160405180910390fd5b6001816002811115610e8b57610e8b6128a6565b03610ea357610e9e878988888888611463565b610eca565b6002816002811115610eb757610eb76128a6565b036106ed57610e9e8789888888886115c4565b876001600160a01b03167f1201ce0c5e577111bce91e907fd99cb183da5edc1e3fb650ca40769e4e9176dd88838989604051610f099493929190612d06565b60405180910390a25050505050505050565b81516020808401516040515f938493610f88937f991b0a3376ce87f8ecc5d70962279ac09cdce934e8b5b9683e73c8ff087c7f81938a93928991019485526001600160a01b039384166020860152918316604085015263ffffffff16606084015216608082015260a00190565b604051602081830303815290604052805190602001209050610fa981611373565b9150505b9392505050565b8151610fbf816113b9565b610fdc5760405163932d94f760e01b815260040160405180910390fd5b6001826002811115610ff057610ff06128a6565b148061100d5750600282600281111561100b5761100b6128a6565b145b61102a5760405163fdea7c0960e01b815260040160405180910390fd5b5f60015f611037866112d8565b815260208101919091526040015f9081205460ff169150816002811115611060576110606128a6565b1461107d576040516281f09f60e01b815260040160405180910390fd5b8260015f61108a876112d8565b815260208101919091526040015f20805460ff191660018360028111156110b3576110b36128a6565b02179055507fb2266cb118e57095fcdbedb24dabd9fc9f5127e2dbedf62ce6ee71696fb8b6e784846040516110e9929190612c4e565b60405180910390a150505050565b5f5f5f5f611104866112d8565b815260208082019290925260409081015f9081206001600160a01b038716825283528190208151808301909252805460ff1615158252600181018054929391929184019161115190612b38565b80601f016020809104026020016040519081016040528092919081815260200182805461117d90612b38565b80156111c85780601f1061119f576101008083540402835291602001916111c8565b820191905f5260205f20905b8154815290600101906020018083116111ab57829003601f168201915b50505050508152505090505f60015f6111e0876112d8565b815260208101919091526040015f2054825160ff909116915061120857505f91506105279050565b61121682602001518261177d565b95945050505050565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea61128c6117fe565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f815f0151826020015163ffffffff1660405160200161131e92919060609290921b6001600160601b031916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261052790612d63565b60605f61134283611873565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f61137c61121f565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb8906084016020604051808303815f875af115801561143f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105279190612c2f565b601483146114845760405163d109118160e01b815260040160405180910390fd5b5f61148f8486612d86565b60601c9050806114b257604051634935505f60e01b815260040160405180910390fd5b5f6114f486868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506001925061177d915050565b5f8181526002602052604090205490915060ff161561152657604051630c7bc20160e11b815260040160405180910390fd5b5f611532888a85610f1b565b9050611577838287878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152505f19925061189a915050565b6115b9898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508892506118f2915050565b505050505050505050565b604080518082019091525f80825260208201526115df6124f1565b5f8080806115ef898b018b612dc4565b93509350935093506040518060400160405280858152602001848152509550835f14801561161b575082155b1561163957604051634935505f60e01b815260040160405180910390fd5b60408051808201909152918252602082015292505f915061165e9050888a898961057b565b90505f8061166e86880188612dfe565b604080518082019091528281526020810182905291935091505f61169685838989858061199f565b915050806116b757604051638baa579f60e01b815260040160405180910390fd5b5f6116f98c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506002925061177d915050565b5f8181526002602052604090205490915060ff161561172b57604051630c7bc20160e11b815260040160405180910390fd5b61176d8e8e8e8e8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508792506118f2915050565b5050505050505050505050505050565b5f6001826002811115611792576117926128a6565b036117a4575081516020830120610527565b60028260028111156117b8576117b86128a6565b036106ed575f5f848060200190518101906117d39190612cc0565b505060408051808201825283815260209081019283525f938452915190915290209250610527915050565b60605f61182a7f0000000000000000000000000000000000000000000000000000000000000000611336565b9050805f8151811061183e5761183e612bb4565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f60ff8216601f81111561052757604051632cd44ac360e21b815260040160405180910390fd5b428110156118bb57604051630819bdcd60e01b815260040160405180910390fd5b6118cf6001600160a01b0385168484611a67565b6118ec57604051638baa579f60e01b815260040160405180910390fd5b50505050565b6040805180820190915260018152602081018390525f80611912876112d8565b815260208082019290925260409081015f9081206001600160a01b03881682528352208251815460ff19169015151781559082015160018201906119569082612e6a565b5050505f908152600260209081526040808320805460ff191660011790556003909152902080546001600160a01b039093166001600160a01b0319909316929092179091555050565b5f5f5f6119ab89611abb565b90505f6119ba8a89898c611b45565b90505f6119d16119ca8a84611bf0565b8b90611c60565b90505f611a13611a0c84611a066040805180820182525f80825260209182015281518083019092526001825260029082015290565b90611bf0565b8590611c60565b90508715611a3857611a2f82611a27611cd4565b838c8b611d94565b96509450611a58565b611a4b82611a44611cd4565b838c611fa8565b95508515611a5857600194505b50505050965096945050505050565b5f5f5f611a7485856121df565b90925090505f816004811115611a8c57611a8c6128a6565b148015611aaa5750856001600160a01b0316826001600160a01b0316145b80610619575061061986868661221e565b604080518082019091525f80825260208201525f8080611ae85f516020612fd05f395f51905f5286612f25565b90505b611af481612305565b90935091505f516020612fd05f395f51905f528283098303611b2c576040805180820190915290815260208101919091529392505050565b5f516020612fd05f395f51905f52600182089050611aeb565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c6112169190612f25565b604080518082019091525f8082526020820152611c0b612516565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa90508080611c3957fe5b5080611c5857604051632319df1960e11b815260040160405180910390fd5b505092915050565b604080518082019091525f8082526020820152611c7b612534565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa90508080611cb557fe5b5080611c585760405163d4b68fd760e01b815260040160405180910390fd5b611cdc6124f1565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f91829190611dc5612552565b5f5b6002811015611f7c575f611ddc826006612f58565b9050848260028110611df057611df0612bb4565b60200201515183611e01835f612f6f565b600c8110611e1157611e11612bb4565b6020020152848260028110611e2857611e28612bb4565b60200201516020015183826001611e3f9190612f6f565b600c8110611e4f57611e4f612bb4565b6020020152838260028110611e6657611e66612bb4565b6020020151515183611e79836002612f6f565b600c8110611e8957611e89612bb4565b6020020152838260028110611ea057611ea0612bb4565b6020020151516001602002015183611eb9836003612f6f565b600c8110611ec957611ec9612bb4565b6020020152838260028110611ee057611ee0612bb4565b6020020151602001515f60028110611efa57611efa612bb4565b602002015183611f0b836004612f6f565b600c8110611f1b57611f1b612bb4565b6020020152838260028110611f3257611f32612bb4565b602002015160200151600160028110611f4d57611f4d612bb4565b602002015183611f5e836005612f6f565b600c8110611f6e57611f6e612bb4565b602002015250600101611dc7565b50611f85612571565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f91611fd6612552565b5f5b600281101561218d575f611fed826006612f58565b905084826002811061200157612001612bb4565b60200201515183612012835f612f6f565b600c811061202257612022612bb4565b602002015284826002811061203957612039612bb4565b602002015160200151838260016120509190612f6f565b600c811061206057612060612bb4565b602002015283826002811061207757612077612bb4565b602002015151518361208a836002612f6f565b600c811061209a5761209a612bb4565b60200201528382600281106120b1576120b1612bb4565b60200201515160016020020151836120ca836003612f6f565b600c81106120da576120da612bb4565b60200201528382600281106120f1576120f1612bb4565b6020020151602001515f6002811061210b5761210b612bb4565b60200201518361211c836004612f6f565b600c811061212c5761212c612bb4565b602002015283826002811061214357612143612bb4565b60200201516020015160016002811061215e5761215e612bb4565b60200201518361216f836005612f6f565b600c811061217f5761217f612bb4565b602002015250600101611fd8565b50612196612571565b5f6020826101808560086107d05a03fa905080806121b057fe5b50806121cf576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b5f5f8251604103612213576020830151604084015160608501515f1a61220787828585612381565b94509450505050610730565b505f90506002610730565b5f5f5f856001600160a01b0316631626ba7e60e01b8686604051602401612246929190612f82565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516122849190612fa2565b5f60405180830381855afa9150503d805f81146122bc576040519150601f19603f3d011682016040523d82523d5f602084013e6122c1565b606091505b50915091508180156122d557506020815110155b801561061957508051630b135d3f60e11b906122fa9083016020908101908401612fb8565b149695505050505050565b5f80805f516020612fd05f395f51905f5260035f516020612fd05f395f51905f52865f516020612fd05f395f51905f52888909090890505f612375827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f516020612fd05f395f51905f5261243e565b91959194509092505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123b657505f90506003612435565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612407573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661242f575f60019250925050612435565b91505f90505b94509492505050565b5f5f612448612571565b61245061258f565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa9250828061248d57fe5b50826124ac5760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b5080546124c390612b38565b5f825580601f106124d2575050565b601f0160209004905f5260205f20908101906124ee91906125ad565b50565b60405180604001604052806125046125c5565b81526020016125116125c5565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b808211156125c1575f81556001016125ae565b5090565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561261a5761261a6125e3565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612649576126496125e3565b604052919050565b80356001600160a01b0381168114612667575f5ffd5b919050565b5f6040828403121561267c575f5ffd5b6126846125f7565b905061268f82612651565b8152602082013563ffffffff811681146126a7575f5ffd5b602082015292915050565b5f5f606083850312156126c3575f5ffd5b6126cd848461266c565b91506126db60408401612651565b90509250929050565b5f82601f8301126126f3575f5ffd5b6126fd6040612620565b80604084018581111561270e575f5ffd5b845b81811015612728578035845260209384019301612710565b509095945050505050565b5f5f82840360c0811215612745575f5ffd5b6040811215612752575f5ffd5b61275a6125f7565b843581526020808601359082015292506080603f198201121561277b575f5ffd5b506127846125f7565b61279185604086016126e4565b81526127a085608086016126e4565b6020820152809150509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610fad60208301846127b0565b5f5f83601f840112612800575f5ffd5b50813567ffffffffffffffff811115612817575f5ffd5b602083019150836020828501011115610730575f5ffd5b5f5f5f5f60808587031215612841575f5ffd5b61284a85612651565b9350612859866020870161266c565b9250606085013567ffffffffffffffff811115612874575f5ffd5b612880878288016127f0565b95989497509550505050565b5f6040828403121561289c575f5ffd5b610fad838361266c565b634e487b7160e01b5f52602160045260245ffd5b600381106128d657634e487b7160e01b5f52602160045260245ffd5b9052565b6020810161052782846128ba565b5f5f606083850312156128f9575f5ffd5b612903848461266c565b9150604083013567ffffffffffffffff81111561291e575f5ffd5b8301601f8101851361292e575f5ffd5b803567ffffffffffffffff811115612948576129486125e3565b61295b601f8201601f1916602001612620565b81815286602083850101111561296f575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f5f6060838503121561299f575f5ffd5b6129a883612651565b91506126db846020850161266c565b805f5b60028110156118ec5781518452602093840193909101906001016129ba565b5f60c08201905083518252602084015160208301526129fc6040830184516129b7565b6020830151612a0e60808401826129b7565b509392505050565b5f5f5f5f5f5f60a08789031215612a2b575f5ffd5b612a3487612651565b9550612a43886020890161266c565b9450606087013567ffffffffffffffff811115612a5e575f5ffd5b612a6a89828a016127f0565b909550935050608087013567ffffffffffffffff811115612a89575f5ffd5b612a9589828a016127f0565b979a9699509497509295939492505050565b5f5f5f60808486031215612ab9575f5ffd5b612ac284612651565b9250612ad1856020860161266c565b9150612adf60608501612651565b90509250925092565b5f60208284031215612af8575f5ffd5b5035919050565b5f5f60608385031215612b10575f5ffd5b612b1a848461266c565b9150604083013560038110612b2d575f5ffd5b809150509250929050565b600181811c90821680612b4c57607f821691505b602082108103612b6a57634e487b7160e01b5f52602260045260245ffd5b50919050565b805160208201516001600160601b0319811691906014821015612bad576001600160601b03196001600160601b03198360140360031b1b82161692505b5050919050565b634e487b7160e01b5f52603260045260245ffd5b818382375f9101908152919050565b5f5f60408385031215612be8575f5ffd5b505080516020909101519092909150565b6001600160a01b038316815260608101610fad602083018480516001600160a01b0316825260209081015163ffffffff16910152565b5f60208284031215612c3f575f5ffd5b81518015158114610fad575f5ffd5b82516001600160a01b0316815260208084015163ffffffff169082015260608101610fad60408301846128ba565b5f82601f830112612c8b575f5ffd5b612c956040612620565b806040840185811115612ca6575f5ffd5b845b81811015612728578051845260209384019301612ca8565b5f5f5f5f60c08587031215612cd3575f5ffd5b845160208601519094509250612cec8660408701612c7c565b9150612cfb8660808701612c7c565b905092959194509250565b84516001600160a01b0316815260208086015163ffffffff1690820152612d3060408201856128ba565b60806060820152816080820152818360a08301375f81830160a090810191909152601f909201601f191601019392505050565b80516020808301519190811015612b6a575f1960209190910360031b1b16919050565b80356001600160601b03198116906014841015612dbd576001600160601b03196001600160601b03198560140360031b1b82161691505b5092915050565b5f5f5f5f60c08587031215612dd7575f5ffd5b8435935060208501359250612def86604087016126e4565b9150612cfb86608087016126e4565b5f5f60408385031215612e0f575f5ffd5b50508035926020909101359150565b601f821115612e6557805f5260205f20601f840160051c81016020851015612e435750805b601f840160051c820191505b81811015612e62575f8155600101612e4f565b50505b505050565b815167ffffffffffffffff811115612e8457612e846125e3565b612e9881612e928454612b38565b84612e1e565b6020601f821160018114612eca575f8315612eb35750848201515b5f19600385901b1c1916600184901b178455612e62565b5f84815260208120601f198516915b82811015612ef95787850151825560209485019460019092019101612ed9565b5084821015612f1657868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f82612f3f57634e487b7160e01b5f52601260045260245ffd5b500690565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761052757610527612f44565b8082018082111561052757610527612f44565b828152604060208201525f612f9a60408301846127b0565b949350505050565b5f82518060208501845e5f920191825250919050565b5f60208284031215612fc8575f5ffd5b505191905056fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a2646970667358221220e37e9dc76924ae1d3f60254adf4caff5ffad0063b0dfe9c7495bb75e3f8665b964736f6c634300081b0033", + Bin: "0x60e060405234801561000f575f5ffd5b5060405161326038038061326083398101604081905261002e916100cb565b6001600160a01b03808316608052831660a052808061004c8161005a565b60c052506101fc9350505050565b5f5f829050601f8151111561008d578260405163305a27a960e01b815260040161008491906101a1565b60405180910390fd5b8051610098826101d6565b179392505050565b6001600160a01b03811681146100b4575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156100dd575f5ffd5b83516100e8816100a0565b60208501519093506100f9816100a0565b60408501519092506001600160401b03811115610114575f5ffd5b8401601f81018613610124575f5ffd5b80516001600160401b0381111561013d5761013d6100b7565b604051601f8201601f19908116603f011681016001600160401b038111828210171561016b5761016b6100b7565b604052818152828201602001881015610182575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156101f6575f198160200360031b1b821691505b50919050565b60805160a05160c05161302561023b5f395f8181610552015261180601525f81816101c301526113f701525f8181610359015261077501526130255ff3fe608060405234801561000f575f5ffd5b5060043610610132575f3560e01c80639a43e3fb116100b4578063d40cda1611610079578063d40cda161461037b578063d9f12db21461038e578063dab42d7e146103a1578063ea0d8149146103c3578063ea194e2e146103d6578063f698da25146103e9575f5ffd5b80639a43e3fb146102e6578063aa165c3014610307578063b05c8f6d1461031a578063bd30a0b914610341578063ca8aa7c714610354575f5ffd5b806354fd4d50116100fa57806354fd4d50146102645780637690e3951461026c5780637cffe48c1461027f5780638256909c1461029f57806387ab86f4146102d1575f5ffd5b80630a6ac26414610136578063166aa1271461015e5780633b32a7bd146101935780634657e26a146101be57806350435add146101e5575b5f5ffd5b6101496101443660046126b2565b6103f1565b60405190151581526020015b60405180910390f35b6101857f991b0a3376ce87f8ecc5d70962279ac09cdce934e8b5b9683e73c8ff087c7f8181565b604051908152602001610155565b6101a66101a13660046126b2565b61052d565b6040516001600160a01b039091168152602001610155565b6101a67f000000000000000000000000000000000000000000000000000000000000000081565b6102576101f3366004612733565b8151602080840151835180519083015185840151805190850151604080519687019790975295850193909352606084810192909252608084015260a083019190915260c082019290925260e001604051602081830303815290604052905092915050565b60405161015591906127de565b61025761054b565b61018561027a36600461282e565b61057b565b61029261028d36600461288c565b610623565b60405161015591906128da565b6102b26102ad3660046128e8565b610649565b604080516001600160a01b039093168352901515602083015201610155565b6102e46102df36600461298e565b610737565b005b6102f96102f43660046126b2565b610a48565b6040516101559291906129d9565b6102576103153660046126b2565b610c30565b6101857fda86e76deaed01641f80ff5f72c372a038fa5182697aeb967e8b1f9819d58d8181565b61014961034f3660046126b2565b610d6d565b6101a67f000000000000000000000000000000000000000000000000000000000000000081565b6102e4610389366004612a16565b610daa565b61018561039c366004612aa7565b610f1b565b6101496103af366004612ae8565b5f9081526002602052604090205460ff1690565b6102e46103d1366004612aff565b610fb4565b6101856103e43660046126b2565b6110f7565b61018561121f565b5f5f60015f6103ff866112d8565b815260208101919091526040015f9081205460ff169150816002811115610428576104286128a6565b0361044657604051635cd3106d60e11b815260040160405180910390fd5b5f5f5f610452876112d8565b815260208082019290925260409081015f9081206001600160a01b038816825283528190208151808301909252805460ff1615158252600181018054929391929184019161049f90612b38565b80601f01602080910402602001604051908101604052809291908181526020018280546104cb90612b38565b80156105165780601f106104ed57610100808354040283529160200191610516565b820191905f5260205f20905b8154815290600101906020018083116104f957829003601f168201915b505050919092525050905193505050505b92915050565b5f6105388383610c30565b61054190612b70565b60601c9392505050565b60606105767f0000000000000000000000000000000000000000000000000000000000000000611336565b905090565b5f5f7fda86e76deaed01641f80ff5f72c372a038fa5182697aeb967e8b1f9819d58d8186865f0151876020015187876040516105b8929190612bc8565b6040805191829003822060208301969096526001600160a01b039485169082015292909116606083015263ffffffff16608082015260a081019190915260c00160405160208183030381529060405280519060200120905061061981611373565b9695505050505050565b5f60015f610630846112d8565b815260208101919091526040015f205460ff1692915050565b5f5f5f60015f610658876112d8565b815260208101919091526040015f9081205460ff1691506001826002811115610683576106836128a6565b03610695575083516020850120610706565b60028260028111156106a9576106a96128a6565b036106ed575f5f868060200190518101906106c49190612bd7565b60408051808201825283815260209081019283525f938452915190915290209250610706915050565b60405163fdea7c0960e01b815260040160405180910390fd5b5f818152600360205260409020546001600160a01b0316806107288882610d6d565b945094505050505b9250929050565b81610741816113b9565b61075e5760405163932d94f760e01b815260040160405180910390fd5b6040516309a961f360e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631352c3e6906107ac9086908690600401612bf9565b602060405180830381865afa1580156107c7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107eb9190612c2f565b158284909161083857604051631070287960e01b815282516001600160a01b03908116600483015260209093015163ffffffff166024820152911660448201526064015b60405180910390fd5b50505f60015f610847856112d8565b815260208101919091526040015f9081205460ff169150816002811115610870576108706128a6565b0361088e57604051635cd3106d60e11b815260040160405180910390fd5b5f5f5f61089a866112d8565b815260208082019290925260409081015f9081206001600160a01b038916825283528190208151808301909252805460ff161515825260018101805492939192918401916108e790612b38565b80601f016020809104026020016040519081016040528092919081815260200182805461091390612b38565b801561095e5780601f106109355761010080835404028352916020019161095e565b820191905f5260205f20905b81548152906001019060200180831161094157829003601f168201915b5050505050815250509050805f0151848690916109b457604051632e40e18760e01b815282516001600160a01b03908116600483015260209093015163ffffffff1660248201529116604482015260640161082f565b50505f5f6109c1866112d8565b815260208082019290925260409081015f9081206001600160a01b03891682529092528120805460ff19168155906109fc60018301826124b7565b5050846001600160a01b03167f28d3c3cee49478ec6fd219cfd685cd15cd01d95cabf69b4b7b57f9eaa3eb64428584604051610a39929190612c4e565b60405180910390a25050505050565b604080518082019091525f8082526020820152610a636124f1565b5f60015f610a70876112d8565b815260208101919091526040015f205460ff1690506002816002811115610a9957610a996128a6565b14610ab75760405163fdea7c0960e01b815260040160405180910390fd5b5f5f5f610ac3886112d8565b815260208082019290925260409081015f9081206001600160a01b038916825283528190208151808301909252805460ff16151582526001810180549293919291840191610b1090612b38565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3c90612b38565b8015610b875780601f10610b5e57610100808354040283529160200191610b87565b820191905f5260205f20905b815481529060010190602001808311610b6a57829003601f168201915b5050505050815250509050805f0151610bdc5750506040805180820182525f80825260208083018290528351808501855282815280820192909252835180850190945282845283019190915292509050610730565b5f5f5f5f8460200151806020019051810190610bf89190612cc0565b604080518082018252948552602080860194909452805180820190915291825291810191909152909b909a5098505050505050505050565b60605f60015f610c3f866112d8565b815260208101919091526040015f205460ff1690506001816002811115610c6857610c686128a6565b14610c865760405163fdea7c0960e01b815260040160405180910390fd5b5f5f5f610c92876112d8565b815260208082019290925260409081015f9081206001600160a01b038816825283528190208151808301909252805460ff16151582526001810180549293919291840191610cdf90612b38565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0b90612b38565b8015610d565780601f10610d2d57610100808354040283529160200191610d56565b820191905f5260205f20905b815481529060010190602001808311610d3957829003601f168201915b505050919092525050506020015195945050505050565b5f5f5f610d79856112d8565b815260208082019290925260409081015f9081206001600160a01b038616825290925290205460ff16905092915050565b85610db4816113b9565b610dd15760405163932d94f760e01b815260040160405180910390fd5b5f60015f610dde896112d8565b815260208101919091526040015f9081205460ff169150816002811115610e0757610e076128a6565b03610e2557604051635cd3106d60e11b815260040160405180910390fd5b5f5f610e30896112d8565b815260208082019290925260409081015f9081206001600160a01b038c16825290925290205460ff1615610e7757604051630c7bc20160e11b815260040160405180910390fd5b6001816002811115610e8b57610e8b6128a6565b03610ea357610e9e878988888888611463565b610eca565b6002816002811115610eb757610eb76128a6565b036106ed57610e9e8789888888886115c4565b876001600160a01b03167f1201ce0c5e577111bce91e907fd99cb183da5edc1e3fb650ca40769e4e9176dd88838989604051610f099493929190612d06565b60405180910390a25050505050505050565b81516020808401516040515f938493610f88937f991b0a3376ce87f8ecc5d70962279ac09cdce934e8b5b9683e73c8ff087c7f81938a93928991019485526001600160a01b039384166020860152918316604085015263ffffffff16606084015216608082015260a00190565b604051602081830303815290604052805190602001209050610fa981611373565b9150505b9392505050565b8151610fbf816113b9565b610fdc5760405163932d94f760e01b815260040160405180910390fd5b6001826002811115610ff057610ff06128a6565b148061100d5750600282600281111561100b5761100b6128a6565b145b61102a5760405163fdea7c0960e01b815260040160405180910390fd5b5f60015f611037866112d8565b815260208101919091526040015f9081205460ff169150816002811115611060576110606128a6565b1461107d576040516281f09f60e01b815260040160405180910390fd5b8260015f61108a876112d8565b815260208101919091526040015f20805460ff191660018360028111156110b3576110b36128a6565b02179055507fb2266cb118e57095fcdbedb24dabd9fc9f5127e2dbedf62ce6ee71696fb8b6e784846040516110e9929190612c4e565b60405180910390a150505050565b5f5f5f5f611104866112d8565b815260208082019290925260409081015f9081206001600160a01b038716825283528190208151808301909252805460ff1615158252600181018054929391929184019161115190612b38565b80601f016020809104026020016040519081016040528092919081815260200182805461117d90612b38565b80156111c85780601f1061119f576101008083540402835291602001916111c8565b820191905f5260205f20905b8154815290600101906020018083116111ab57829003601f168201915b50505050508152505090505f60015f6111e0876112d8565b815260208101919091526040015f2054825160ff909116915061120857505f91506105279050565b61121682602001518261177d565b95945050505050565b60408051808201909152600a81526922b4b3b2b72630bcb2b960b11b6020909101525f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f71b625cfad44bac63b13dba07f2e1d6084ee04b6f8752101ece6126d584ee6ea61128c6117fe565b805160209182012060408051928301949094529281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f815f0151826020015163ffffffff1660405160200161131e92919060609290921b6001600160601b031916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261052790612d63565b60605f61134283611873565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f61137c61121f565b60405161190160f01b6020820152602281019190915260428101839052606201604051602081830303815290604052805190602001209050919050565b604051631beb2b9760e31b81526001600160a01b0382811660048301523360248301523060448301525f80356001600160e01b0319166064840152917f00000000000000000000000000000000000000000000000000000000000000009091169063df595cb8906084016020604051808303815f875af115801561143f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105279190612c2f565b601483146114845760405163d109118160e01b815260040160405180910390fd5b5f61148f8486612d86565b60601c9050806114b257604051634935505f60e01b815260040160405180910390fd5b5f6114f486868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506001925061177d915050565b5f8181526002602052604090205490915060ff161561152657604051630c7bc20160e11b815260040160405180910390fd5b5f611532888a85610f1b565b9050611577838287878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152505f19925061189a915050565b6115b9898989898080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508892506118f2915050565b505050505050505050565b604080518082019091525f80825260208201526115df6124f1565b5f8080806115ef898b018b612dc4565b93509350935093506040518060400160405280858152602001848152509550835f14801561161b575082155b1561163957604051634935505f60e01b815260040160405180910390fd5b60408051808201909152918252602082015292505f915061165e9050888a898961057b565b90505f8061166e86880188612dfe565b604080518082019091528281526020810182905291935091505f61169685838989858061199f565b915050806116b757604051638baa579f60e01b815260040160405180910390fd5b5f6116f98c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506002925061177d915050565b5f8181526002602052604090205490915060ff161561172b57604051630c7bc20160e11b815260040160405180910390fd5b61176d8e8e8e8e8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508792506118f2915050565b5050505050505050505050505050565b5f6001826002811115611792576117926128a6565b036117a4575081516020830120610527565b60028260028111156117b8576117b86128a6565b036106ed575f5f848060200190518101906117d39190612cc0565b505060408051808201825283815260209081019283525f938452915190915290209250610527915050565b60605f61182a7f0000000000000000000000000000000000000000000000000000000000000000611336565b9050805f8151811061183e5761183e612bb4565b016020908101516040516001600160f81b03199091169181019190915260210160405160208183030381529060405291505090565b5f60ff8216601f81111561052757604051632cd44ac360e21b815260040160405180910390fd5b428110156118bb57604051630819bdcd60e01b815260040160405180910390fd5b6118cf6001600160a01b0385168484611a67565b6118ec57604051638baa579f60e01b815260040160405180910390fd5b50505050565b6040805180820190915260018152602081018390525f80611912876112d8565b815260208082019290925260409081015f9081206001600160a01b03881682528352208251815460ff19169015151781559082015160018201906119569082612e6a565b5050505f908152600260209081526040808320805460ff191660011790556003909152902080546001600160a01b039093166001600160a01b0319909316929092179091555050565b5f5f5f6119ab89611abb565b90505f6119ba8a89898c611b45565b90505f6119d16119ca8a84611bf0565b8b90611c60565b90505f611a13611a0c84611a066040805180820182525f80825260209182015281518083019092526001825260029082015290565b90611bf0565b8590611c60565b90508715611a3857611a2f82611a27611cd4565b838c8b611d94565b96509450611a58565b611a4b82611a44611cd4565b838c611fa8565b95508515611a5857600194505b50505050965096945050505050565b5f5f5f611a7485856121df565b90925090505f816004811115611a8c57611a8c6128a6565b148015611aaa5750856001600160a01b0316826001600160a01b0316145b80610619575061061986868661221e565b604080518082019091525f80825260208201525f8080611ae85f516020612fd05f395f51905f5286612f25565b90505b611af481612305565b90935091505f516020612fd05f395f51905f528283098303611b2c576040805180820190915290815260208101919091529392505050565b5f516020612fd05f395f51905f52600182089050611aeb565b8251602080850151845180519083015186840151805190850151875188870151604080519889018e90528801989098526060870195909552608086019390935260a085019190915260c084015260e08301526101008201526101208101919091525f907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061014001604051602081830303815290604052805190602001205f1c6112169190612f25565b604080518082019091525f8082526020820152611c0b612516565b835181526020808501519082015260408082018490525f908360608460076107d05a03fa90508080611c3957fe5b5080611c5857604051632319df1960e11b815260040160405180910390fd5b505092915050565b604080518082019091525f8082526020820152611c7b612534565b835181526020808501518183015283516040808401919091529084015160608301525f908360808460066107d05a03fa90508080611cb557fe5b5080611c585760405163d4b68fd760e01b815260040160405180910390fd5b611cdc6124f1565b50604080516080810182527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28183019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6060830152815281518083019092527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec82527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60208381019190915281019190915290565b6040805180820182528681526020808201869052825180840190935286835282018490525f91829190611dc5612552565b5f5b6002811015611f7c575f611ddc826006612f58565b9050848260028110611df057611df0612bb4565b60200201515183611e01835f612f6f565b600c8110611e1157611e11612bb4565b6020020152848260028110611e2857611e28612bb4565b60200201516020015183826001611e3f9190612f6f565b600c8110611e4f57611e4f612bb4565b6020020152838260028110611e6657611e66612bb4565b6020020151515183611e79836002612f6f565b600c8110611e8957611e89612bb4565b6020020152838260028110611ea057611ea0612bb4565b6020020151516001602002015183611eb9836003612f6f565b600c8110611ec957611ec9612bb4565b6020020152838260028110611ee057611ee0612bb4565b6020020151602001515f60028110611efa57611efa612bb4565b602002015183611f0b836004612f6f565b600c8110611f1b57611f1b612bb4565b6020020152838260028110611f3257611f32612bb4565b602002015160200151600160028110611f4d57611f4d612bb4565b602002015183611f5e836005612f6f565b600c8110611f6e57611f6e612bb4565b602002015250600101611dc7565b50611f85612571565b5f6020826101808560088cfa9151919c9115159b50909950505050505050505050565b6040805180820182528581526020808201859052825180840190935285835282018390525f91611fd6612552565b5f5b600281101561218d575f611fed826006612f58565b905084826002811061200157612001612bb4565b60200201515183612012835f612f6f565b600c811061202257612022612bb4565b602002015284826002811061203957612039612bb4565b602002015160200151838260016120509190612f6f565b600c811061206057612060612bb4565b602002015283826002811061207757612077612bb4565b602002015151518361208a836002612f6f565b600c811061209a5761209a612bb4565b60200201528382600281106120b1576120b1612bb4565b60200201515160016020020151836120ca836003612f6f565b600c81106120da576120da612bb4565b60200201528382600281106120f1576120f1612bb4565b6020020151602001515f6002811061210b5761210b612bb4565b60200201518361211c836004612f6f565b600c811061212c5761212c612bb4565b602002015283826002811061214357612143612bb4565b60200201516020015160016002811061215e5761215e612bb4565b60200201518361216f836005612f6f565b600c811061217f5761217f612bb4565b602002015250600101611fd8565b50612196612571565b5f6020826101808560086107d05a03fa905080806121b057fe5b50806121cf576040516324ccc79360e21b815260040160405180910390fd5b5051151598975050505050505050565b5f5f8251604103612213576020830151604084015160608501515f1a61220787828585612381565b94509450505050610730565b505f90506002610730565b5f5f5f856001600160a01b0316631626ba7e60e01b8686604051602401612246929190612f82565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516122849190612fa2565b5f60405180830381855afa9150503d805f81146122bc576040519150601f19603f3d011682016040523d82523d5f602084013e6122c1565b606091505b50915091508180156122d557506020815110155b801561061957508051630b135d3f60e11b906122fa9083016020908101908401612fb8565b149695505050505050565b5f80805f516020612fd05f395f51905f5260035f516020612fd05f395f51905f52865f516020612fd05f395f51905f52888909090890505f612375827f0c19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f525f516020612fd05f395f51905f5261243e565b91959194509092505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123b657505f90506003612435565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612407573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661242f575f60019250925050612435565b91505f90505b94509492505050565b5f5f612448612571565b61245061258f565b602080825281810181905260408201819052606082018890526080820187905260a082018690528260c08360056107d05a03fa9250828061248d57fe5b50826124ac5760405163d51edae360e01b815260040160405180910390fd5b505195945050505050565b5080546124c390612b38565b5f825580601f106124d2575050565b601f0160209004905f5260205f20908101906124ee91906125ad565b50565b60405180604001604052806125046125c5565b81526020016125116125c5565b905290565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b604051806101800160405280600c906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b808211156125c1575f81556001016125ae565b5090565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561261a5761261a6125e3565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612649576126496125e3565b604052919050565b80356001600160a01b0381168114612667575f5ffd5b919050565b5f6040828403121561267c575f5ffd5b6126846125f7565b905061268f82612651565b8152602082013563ffffffff811681146126a7575f5ffd5b602082015292915050565b5f5f606083850312156126c3575f5ffd5b6126cd848461266c565b91506126db60408401612651565b90509250929050565b5f82601f8301126126f3575f5ffd5b6126fd6040612620565b80604084018581111561270e575f5ffd5b845b81811015612728578035845260209384019301612710565b509095945050505050565b5f5f82840360c0811215612745575f5ffd5b6040811215612752575f5ffd5b61275a6125f7565b843581526020808601359082015292506080603f198201121561277b575f5ffd5b506127846125f7565b61279185604086016126e4565b81526127a085608086016126e4565b6020820152809150509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610fad60208301846127b0565b5f5f83601f840112612800575f5ffd5b50813567ffffffffffffffff811115612817575f5ffd5b602083019150836020828501011115610730575f5ffd5b5f5f5f5f60808587031215612841575f5ffd5b61284a85612651565b9350612859866020870161266c565b9250606085013567ffffffffffffffff811115612874575f5ffd5b612880878288016127f0565b95989497509550505050565b5f6040828403121561289c575f5ffd5b610fad838361266c565b634e487b7160e01b5f52602160045260245ffd5b600381106128d657634e487b7160e01b5f52602160045260245ffd5b9052565b6020810161052782846128ba565b5f5f606083850312156128f9575f5ffd5b612903848461266c565b9150604083013567ffffffffffffffff81111561291e575f5ffd5b8301601f8101851361292e575f5ffd5b803567ffffffffffffffff811115612948576129486125e3565b61295b601f8201601f1916602001612620565b81815286602083850101111561296f575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f5f6060838503121561299f575f5ffd5b6129a883612651565b91506126db846020850161266c565b805f5b60028110156118ec5781518452602093840193909101906001016129ba565b5f60c08201905083518252602084015160208301526129fc6040830184516129b7565b6020830151612a0e60808401826129b7565b509392505050565b5f5f5f5f5f5f60a08789031215612a2b575f5ffd5b612a3487612651565b9550612a43886020890161266c565b9450606087013567ffffffffffffffff811115612a5e575f5ffd5b612a6a89828a016127f0565b909550935050608087013567ffffffffffffffff811115612a89575f5ffd5b612a9589828a016127f0565b979a9699509497509295939492505050565b5f5f5f60808486031215612ab9575f5ffd5b612ac284612651565b9250612ad1856020860161266c565b9150612adf60608501612651565b90509250925092565b5f60208284031215612af8575f5ffd5b5035919050565b5f5f60608385031215612b10575f5ffd5b612b1a848461266c565b9150604083013560038110612b2d575f5ffd5b809150509250929050565b600181811c90821680612b4c57607f821691505b602082108103612b6a57634e487b7160e01b5f52602260045260245ffd5b50919050565b805160208201516001600160601b0319811691906014821015612bad576001600160601b03196001600160601b03198360140360031b1b82161692505b5050919050565b634e487b7160e01b5f52603260045260245ffd5b818382375f9101908152919050565b5f5f60408385031215612be8575f5ffd5b505080516020909101519092909150565b6001600160a01b038316815260608101610fad602083018480516001600160a01b0316825260209081015163ffffffff16910152565b5f60208284031215612c3f575f5ffd5b81518015158114610fad575f5ffd5b82516001600160a01b0316815260208084015163ffffffff169082015260608101610fad60408301846128ba565b5f82601f830112612c8b575f5ffd5b612c956040612620565b806040840185811115612ca6575f5ffd5b845b81811015612728578051845260209384019301612ca8565b5f5f5f5f60c08587031215612cd3575f5ffd5b845160208601519094509250612cec8660408701612c7c565b9150612cfb8660808701612c7c565b905092959194509250565b84516001600160a01b0316815260208086015163ffffffff1690820152612d3060408201856128ba565b60806060820152816080820152818360a08301375f81830160a090810191909152601f909201601f191601019392505050565b80516020808301519190811015612b6a575f1960209190910360031b1b16919050565b80356001600160601b03198116906014841015612dbd576001600160601b03196001600160601b03198560140360031b1b82161691505b5092915050565b5f5f5f5f60c08587031215612dd7575f5ffd5b8435935060208501359250612def86604087016126e4565b9150612cfb86608087016126e4565b5f5f60408385031215612e0f575f5ffd5b50508035926020909101359150565b601f821115612e6557805f5260205f20601f840160051c81016020851015612e435750805b601f840160051c820191505b81811015612e62575f8155600101612e4f565b50505b505050565b815167ffffffffffffffff811115612e8457612e846125e3565b612e9881612e928454612b38565b84612e1e565b6020601f821160018114612eca575f8315612eb35750848201515b5f19600385901b1c1916600184901b178455612e62565b5f84815260208120601f198516915b82811015612ef95787850151825560209485019460019092019101612ed9565b5084821015612f1657868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f82612f3f57634e487b7160e01b5f52601260045260245ffd5b500690565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761052757610527612f44565b8082018082111561052757610527612f44565b828152604060208201525f612f9a60408301846127b0565b949350505050565b5f82518060208501845e5f920191825250919050565b5f60208284031215612fc8575f5ffd5b505191905056fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a264697066735822122058c5271c226327558942ec7203175af9de56674b1baf354e3f284d564b37d0a364736f6c634300081b0033", } // KeyRegistrarABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/OperatorTableUpdater/binding.go b/pkg/bindings/OperatorTableUpdater/binding.go index 9980797545..165fb1910f 100644 --- a/pkg/bindings/OperatorTableUpdater/binding.go +++ b/pkg/bindings/OperatorTableUpdater/binding.go @@ -86,7 +86,7 @@ type OperatorSet struct { // OperatorTableUpdaterMetaData contains all meta data concerning the OperatorTableUpdater contract. var OperatorTableUpdaterMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_bn254CertificateVerifier\",\"type\":\"address\",\"internalType\":\"contractIBN254CertificateVerifier\"},{\"name\":\"_ecdsaCertificateVerifier\",\"type\":\"address\",\"internalType\":\"contractIECDSACertificateVerifier\"},{\"name\":\"_pauserRegistry\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"GLOBAL_TABLE_ROOT_CERT_TYPEHASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"INITIAL_GLOBAL_TABLE_ROOT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAX_BPS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bn254CertificateVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBN254CertificateVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"confirmGlobalTableRoot\",\"inputs\":[{\"name\":\"globalTableRootCert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"disableRoot\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ecdsaCertificateVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIECDSACertificateVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCertificateVerifier\",\"inputs\":[{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentGlobalTableRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGenerator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGeneratorReferenceTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalTableRootByTimestamp\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGlobalTableUpdateMessageHash\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getLatestReferenceBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLatestReferenceTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getReferenceBlockNumberByTimestamp\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getReferenceTimestampByBlockNumber\",\"inputs\":[{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"globalRootConfirmationThreshold\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_generator\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"_globalRootConfirmationThreshold\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"generatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"generatorConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isRootValid\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isRootValidByTimestamp\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pauseAll\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pauserRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPauserRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGenerator\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGlobalRootConfirmationThreshold\",\"inputs\":[{\"name\":\"bps\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateGenerator\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"generatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorSetInfo\",\"components\":[{\"name\":\"operatorInfoTreeRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"numOperators\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregatePubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"totalWeights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"generatorConfig\",\"type\":\"tuple\",\"internalType\":\"structICrossChainRegistryTypes.OperatorSetConfig\",\"components\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"maxStalenessPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateOperatorTable\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"operatorSetIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorTableBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"GeneratorUpdated\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalRootConfirmationThresholdUpdated\",\"inputs\":[{\"name\":\"bps\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GlobalRootDisabled\",\"inputs\":[{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewGlobalTableRoot\",\"inputs\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"globalTableRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newPausedStatus\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CertificateInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CurrentlyPaused\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GlobalTableRootInFuture\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GlobalTableRootStale\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InputAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConfirmationThreshold\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidGlobalTableRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidMessageHash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNewPausedStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSetProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProofLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignatureLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyUnpauser\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignersNotOrdered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TableUpdateForPastTimestamp\",\"inputs\":[]}]", - Bin: "0x610100604052348015610010575f5ffd5b5060405161280438038061280483398101604081905261002f916101b9565b808484846001600160a01b03811661005a576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805291821660a0521660c05261007b81610090565b60e052506100876100d6565b505050506102fe565b5f5f829050601f815111156100c3578260405163305a27a960e01b81526004016100ba91906102a3565b60405180910390fd5b80516100ce826102d8565b179392505050565b5f54610100900460ff161561013d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b60648201526084016100ba565b5f5460ff9081161461018c575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101a2575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f5f608085870312156101cc575f5ffd5b84516101d78161018e565b60208601519094506101e88161018e565b60408601519093506101f98161018e565b60608601519092506001600160401b03811115610214575f5ffd5b8501601f81018713610224575f5ffd5b80516001600160401b0381111561023d5761023d6101a5565b604051601f8201601f19908116603f011681016001600160401b038111828210171561026b5761026b6101a5565b604052818152828201602001891015610282575f5ffd5b8160208401602083015e5f6020838301015280935050505092959194509250565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102f8575f198160200360031b1b821691505b50919050565b60805160a05160c05160e0516124946103705f395f61065801525f81816104e6015281816106f201526109b801525f818161050d015281816106b20152818161075e0152818161091301528181610c0a015261142201525f818161049b0152818161105c015261149201526124945ff3fe608060405234801561000f575f5ffd5b5060043610610208575f3560e01c8063715018a61161011f578063c3621f0a116100a9578063eaaed9d511610079578063eaaed9d5146105ae578063ed90dc60146105c1578063f2fde38b146105d4578063fabc1cbc146105e7578063fd967f47146105fa575f5ffd5b8063c3621f0a14610550578063c3be1e3314610563578063c5916a3914610576578063e944e0a81461059b575f5ffd5b80638da5cb5b116100ef5780638da5cb5b146104bd5780639ea94778146104ce578063ad0f9582146104e1578063b8c1430614610508578063c252aa221461052f575f5ffd5b8063715018a6146104735780637551ba341461047b57806377d90e9414610483578063886f119514610496575f5ffd5b80633ef6cd7a116101a0578063595c6a6711610170578063595c6a67146103e05780635ac86ab7146103e85780635c975abb1461040b57806364e1df84146104135780636f728c5014610448575f5ffd5b80633ef6cd7a146103695780634624e6a3146103905780634af81d7a146103a457806354fd4d50146103cb575f5ffd5b806323b7b5b2116101db57806323b7b5b2146102be57806328522d79146102e657806330ef41b41461031257806331a599d214610344575f5ffd5b8063136439dd1461020c578063193b79f3146102215780631e2ca260146102635780632370356c146102ab575b5f5ffd5b61021f61021a366004611655565b610603565b005b61024961022f36600461167d565b63ffffffff9081165f908152609b60205260409020541690565b60405163ffffffff90911681526020015b60405180910390f35b6040805180820182525f80825260209182015281518083019092526098546001600160a01b0381168352600160a01b900463ffffffff169082015260405161025a91906116bd565b61021f6102b93660046116dc565b61063d565b6102496102cc36600461167d565b63ffffffff9081165f908152609a60205260409020541690565b60975462010000900463ffffffff165f908152609960205260409020545b60405190815260200161025a565b610334610320366004611655565b5f908152609c602052604090205460ff1690565b604051901515815260200161025a565b60975462010000900463ffffffff9081165f908152609a602052604090205416610249565b6103047f4491f5ee91595f938885ef73c9a1fa8a6d14ff9b9dab4aa24b8802bbb9bfc1cc81565b60975462010000900463ffffffff16610249565b6103047f2eddfa6e51c2e0ba986436883fbc224e895ba21e8fc61421f6b10d11e25d008e81565b6103d3610651565b60405161025a91906116f5565b61021f610681565b6103346103f636600461172a565b606654600160ff9092169190911b9081161490565b606654610304565b61033461042136600461167d565b63ffffffff165f908152609960209081526040808320548352609c90915290205460ff1690565b61045b610456366004611758565b610695565b6040516001600160a01b03909116815260200161025a565b61021f610734565b610249610745565b61021f610491366004611787565b6107d3565b61045b7f000000000000000000000000000000000000000000000000000000000000000081565b6033546001600160a01b031661045b565b61021f6104dc3660046117e5565b6107e4565b61045b7f000000000000000000000000000000000000000000000000000000000000000081565b61045b7f000000000000000000000000000000000000000000000000000000000000000081565b60975461053d9061ffff1681565b60405161ffff909116815260200161025a565b61021f61055e366004611655565b610a1e565b610304610571366004611880565b610a93565b61030461058436600461167d565b63ffffffff165f9081526099602052604090205490565b61021f6105a93660046118cf565b610afb565b61021f6105bc36600461192b565b610b13565b61021f6105cf3660046119ab565b610d50565b61021f6105e2366004611a45565b610f64565b61021f6105f5366004611655565b610fda565b61053d61271081565b61060b611047565b60665481811681146106305760405163c61dca5d60e01b815260040160405180910390fd5b610639826110ea565b5050565b610645611127565b61064e81611181565b50565b606061067c7f00000000000000000000000000000000000000000000000000000000000000006111f3565b905090565b610689611047565b6106935f196110ea565b565b5f60028260028111156106aa576106aa611a60565b036106d657507f0000000000000000000000000000000000000000000000000000000000000000919050565b60018260028111156106ea576106ea611a60565b0361071657507f0000000000000000000000000000000000000000000000000000000000000000919050565b60405163fdea7c0960e01b815260040160405180910390fd5b919050565b61073c611127565b6106935f611230565b604051635ddb9b5b60e01b81525f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635ddb9b5b9061079490609890600401611a74565b602060405180830381865afa1580156107af573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067c9190611a9b565b6107db611127565b61064e81611281565b60016107ef816112c0565b5f5f5f5f6107fd87876112eb565b5f8f8152609c60205260409020549397509195509350915060ff166108355760405163504570e360e01b815260040160405180910390fd5b61083e83610695565b6001600160a01b0316635ddb9b5b856040518263ffffffff1660e01b815260040161086991906116bd565b602060405180830381865afa158015610884573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108a89190611a9b565b63ffffffff168c63ffffffff16116108d35760405163207617df60e01b815260040160405180910390fd5b6108f88c8c8c8c8c8c8c6040516108eb929190611ab6565b6040518091039020611332565b600283600281111561090c5761090c611a60565b0361099d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636738c40b858e61094b856113d3565b866040518563ffffffff1660e01b815260040161096b9493929190611aff565b5f604051808303815f87803b158015610982575f5ffd5b505af1158015610994573d5f5f3e3d5ffd5b50505050610a10565b60018360028111156109b1576109b1611a60565b03610716577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166356d482f5858e6109f0856113f5565b866040518563ffffffff1660e01b815260040161096b9493929190611b7b565b505050505050505050505050565b610a26611047565b5f818152609c602052604090205460ff16610a545760405163504570e360e01b815260040160405180910390fd5b5f818152609c6020526040808220805460ff191690555182917f8bd43de1250f58fe6ec9a78671a8b78dba70f0018656d157a3aeaabec389df3491a250565b604080517f4491f5ee91595f938885ef73c9a1fa8a6d14ff9b9dab4aa24b8802bbb9bfc1cc602082015290810184905263ffffffff8084166060830152821660808201525f9060a0016040516020818303038152906040528051906020012090509392505050565b610b03611127565b610b0e83838361140b565b505050565b5f610b1d816112c0565b428363ffffffff161115610b4457604051635a119db560e11b815260040160405180910390fd5b60975463ffffffff62010000909104811690841611610b765760405163037fa86b60e31b815260040160405180910390fd5b610b81848484610a93565b856020013514610ba457604051638b56642d60e01b815260040160405180910390fd5b6040805160018082528183019092525f91602080830190803683375050609754825192935061ffff16918391505f90610bdf57610bdf611c34565b61ffff90921660209283029190910190910152604051625f5e5d60e21b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d797490610c44906098908b908790600401611d66565b6020604051808303815f875af1158015610c60573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c849190611ef3565b905080610ca457604051633042041f60e21b815260040160405180910390fd5b6097805463ffffffff80881662010000810265ffffffff000019909316929092179092555f818152609a602090815260408083208054958a1663ffffffff1996871681179091558352609b825280832080549095168417909455828252609981528382208a9055898252609c9052828120805460ff19166001179055915188927f010dcbe0d1e019c93357711f7bb6287d543b7ff7de74f29df3fb5ecceec8d36991a350505050505050565b5f54610100900460ff1615808015610d6e57505f54600160ff909116105b80610d875750303b158015610d8757505f5460ff166001145b610def5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015610e10575f805461ff0019166101001790555b610e1988611230565b610e22876110ea565b610e2b86611281565b610e3485611181565b610e3f84848461140b565b63ffffffff8481165f8181526099602090815260408083207f2eddfa6e51c2e0ba986436883fbc224e895ba21e8fc61421f6b10d11e25d008e908190557fd6e1a24cb7e68b47373042d0900dfd69bffcfc2c807e706164b25b408655b71f805460ff19166001179055609a835281842080544390971663ffffffff1997881681179091558452609b909252808320805490951684179094556097805462010000850265ffffffff00001990911617905592517f010dcbe0d1e019c93357711f7bb6287d543b7ff7de74f29df3fb5ecceec8d3699190a38015610f5a575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b610f6c611127565b6001600160a01b038116610fd15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610de6565b61064e81611230565b610fe2611490565b606654801982198116146110095760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156110a9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110cd9190611ef3565b61069357604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b6033546001600160a01b031633146106935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610de6565b61271061ffff821611156111a8576040516307336f0360e11b815260040160405180910390fd5b6097805461ffff191661ffff83169081179091556040519081527ff5d1836df8fcd7c1e54047e94ac8773d2855395603e2ef9ba5f5f16905f22592906020015b60405180910390a150565b60605f6111ff83611541565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b80609861128e8282611f12565b9050507f3463431b09dfd43dec7349f8f24acfa753fe4cf40a26235402d213373df15856816040516111e89190611fa3565b606654600160ff83161b9081160361064e5760405163840a48d560e01b815260040160405180910390fd5b604080518082019091525f8082526020820152604080518082019091525f808252602082018190529060606113228587018761206b565b9299919850965090945092505050565b63ffffffff86165f9081526099602052604090205485146113665760405163639d09b560e11b815260040160405180910390fd5b6113ae83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508992508591505063ffffffff8816611568565b6113cb5760405163afa42ca760e01b815260040160405180910390fd5b505050505050565b6113db611616565b818060200190518101906113ef91906121bc565b92915050565b6060818060200190518101906113ef919061226b565b604051636738c40b60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636738c40b9061145e9060989087908790879060040161236c565b5f604051808303815f87803b158015611475575f5ffd5b505af1158015611487573d5f5f3e3d5ffd5b50505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114ec573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115109190612405565b6001600160a01b0316336001600160a01b0316146106935760405163794821ff60e01b815260040160405180910390fd5b5f60ff8216601f8111156113ef57604051632cd44ac360e21b815260040160405180910390fd5b5f8361157586858561157f565b1495945050505050565b5f6020845161158e9190612420565b156115ac576040516313717da960e21b815260040160405180910390fd5b8260205b8551811161160d576115c3600285612420565b5f036115e457815f528086015160205260405f2091506002840493506115fb565b808601515f528160205260405f2091506002840493505b61160660208261243f565b90506115b0565b50949350505050565b60405180608001604052805f81526020015f815260200161164860405180604001604052805f81526020015f81525090565b8152602001606081525090565b5f60208284031215611665575f5ffd5b5035919050565b63ffffffff8116811461064e575f5ffd5b5f6020828403121561168d575f5ffd5b81356116988161166c565b9392505050565b80516001600160a01b0316825260209081015163ffffffff16910152565b604081016113ef828461169f565b803561ffff8116811461072f575f5ffd5b5f602082840312156116ec575f5ffd5b611698826116cb565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f6020828403121561173a575f5ffd5b813560ff81168114611698575f5ffd5b80356003811061072f575f5ffd5b5f60208284031215611768575f5ffd5b6116988261174a565b5f60408284031215611781575f5ffd5b50919050565b5f60408284031215611797575f5ffd5b6116988383611771565b5f5f83601f8401126117b1575f5ffd5b5081356001600160401b038111156117c7575f5ffd5b6020830191508360208285010111156117de575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a0312156117fb575f5ffd5b87356118068161166c565b965060208801359550604088013561181d8161166c565b945060608801356001600160401b03811115611837575f5ffd5b6118438a828b016117a1565b90955093505060808801356001600160401b03811115611861575f5ffd5b61186d8a828b016117a1565b989b979a50959850939692959293505050565b5f5f5f60608486031215611892575f5ffd5b8335925060208401356118a48161166c565b915060408401356118b48161166c565b809150509250925092565b5f60a08284031215611781575f5ffd5b5f5f5f608084860312156118e1575f5ffd5b83356118ec8161166c565b925060208401356001600160401b03811115611906575f5ffd5b611912868287016118bf565b9250506119228560408601611771565b90509250925092565b5f5f5f5f6080858703121561193e575f5ffd5b84356001600160401b03811115611953575f5ffd5b85016101208188031215611965575f5ffd5b935060208501359250604085013561197c8161166c565b9150606085013561198c8161166c565b939692955090935050565b6001600160a01b038116811461064e575f5ffd5b5f5f5f5f5f5f5f610120888a0312156119c2575f5ffd5b87356119cd81611997565b9650602088013595506119e38960408a01611771565b94506119f1608089016116cb565b935060a0880135611a018161166c565b925060c08801356001600160401b03811115611a1b575f5ffd5b611a278a828b016118bf565b925050611a378960e08a01611771565b905092959891949750929550565b5f60208284031215611a55575f5ffd5b813561169881611997565b634e487b7160e01b5f52602160045260245ffd5b604081016113ef8284546001600160a01b038116825260a01c63ffffffff16602090910152565b5f60208284031215611aab575f5ffd5b81516116988161166c565b818382375f9101908152919050565b5f8151808452602084019350602083015f5b82811015611af5578151865260209586019590910190600101611ad7565b5093949350505050565b611b09818661169f565b63ffffffff8416604082015260c06060820152825160c0820152602083015160e08201525f60408401518051610100840152602081015161012084015250606084015160a0610140840152611b62610160840182611ac5565b915050611b72608083018461169f565b95945050505050565b5f60c08201611b8a838861169f565b63ffffffff8616604084015260c0606084015280855180835260e08501915060e08160051b8601019250602087015f5b82811015611c0b5786850360df19018452815180516001600160a01b03168652602090810151604091870182905290611bf590870182611ac5565b9550506020938401939190910190600101611bba565b5050505080915050611b72608083018461169f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f5f8335601e19843603018112611c5d575f5ffd5b83016020810192503590506001600160401b03811115611c7b575f5ffd5b8060051b36038213156117de575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235605e19833603018112611cc8575f5ffd5b90910192915050565b8183525f6001600160fb1b03831115611ce8575f5ffd5b8260051b80836020870137939093016020019392505050565b80358252602080820135908301525f611d1d6040830183611c48565b60606040860152611b72606086018284611cd1565b5f8151808452602084019350602083015f5b82811015611af557815161ffff16865260209586019590910190600101611d44565b611d898185546001600160a01b038116825260a01c63ffffffff16602090910152565b608060408201525f6101a082018435611da18161166c565b63ffffffff166080840152602085013560a0840152604085013560c0840152606085013560e0840152604060808601610100850137604060c08601610140850137611df0610100860186611c48565b610120610180860152828184526101c0860190506101c08260051b8701019350825f5b83811015611ed2578786036101bf19018352611e2f8286611cb4565b8035611e3a8161166c565b63ffffffff168752602081013536829003601e19018112611e59575f5ffd5b81016020810190356001600160401b03811115611e74575f5ffd5b803603821315611e82575f5ffd5b606060208a0152611e9760608a018284611c8c565b915050611ea76040830183611cb4565b91508781036040890152611ebb8183611d01565b975050506020928301929190910190600101611e13565b50505050508281036060840152611ee98185611d32565b9695505050505050565b5f60208284031215611f03575f5ffd5b81518015158114611698575f5ffd5b8135611f1d81611997565b81546001600160a01b031981166001600160a01b039290921691821783556020840135611f498161166c565b6001600160c01b03199190911690911760a09190911b63ffffffff60a01b1617905550565b8035611f7981611997565b6001600160a01b031682526020810135611f928161166c565b63ffffffff81166020840152505050565b604081016113ef8284611f6e565b604080519081016001600160401b0381118282101715611fd357611fd3611c20565b60405290565b604051608081016001600160401b0381118282101715611fd357611fd3611c20565b604051601f8201601f191681016001600160401b038111828210171561202357612023611c20565b604052919050565b5f6040828403121561203b575f5ffd5b612043611fb1565b9050813561205081611997565b815260208201356120608161166c565b602082015292915050565b5f5f5f5f60c0858703121561207e575f5ffd5b612088868661202b565b93506120966040860161174a565b92506120a5866060870161202b565b915060a08501356001600160401b038111156120bf575f5ffd5b8501601f810187136120cf575f5ffd5b80356001600160401b038111156120e8576120e8611c20565b6120fb601f8201601f1916602001611ffb565b81815288602083850101111561210f575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b5f6001600160401b0382111561214857612148611c20565b5060051b60200190565b5f82601f830112612161575f5ffd5b815161217461216f82612130565b611ffb565b8082825260208201915060208360051b860101925085831115612195575f5ffd5b602085015b838110156121b257805183526020928301920161219a565b5095945050505050565b5f602082840312156121cc575f5ffd5b81516001600160401b038111156121e1575f5ffd5b820180840360a08112156121f3575f5ffd5b6121fb611fd9565b82518152602080840151908201526040603f198301121561221a575f5ffd5b612222611fb1565b604084810151825260608501516020830152820152608083015191506001600160401b03821115612251575f5ffd5b61225d86838501612152565b606082015295945050505050565b5f6020828403121561227b575f5ffd5b81516001600160401b03811115612290575f5ffd5b8201601f810184136122a0575f5ffd5b80516122ae61216f82612130565b8082825260208201915060208360051b8501019250868311156122cf575f5ffd5b602084015b838110156123615780516001600160401b038111156122f1575f5ffd5b85016040818a03601f19011215612306575f5ffd5b61230e611fb1565b602082015161231c81611997565b815260408201516001600160401b03811115612336575f5ffd5b6123458b602083860101612152565b60208301525080855250506020830192506020810190506122d4565b509695505050505050565b61238f8186546001600160a01b038116825260a01c63ffffffff16602090910152565b63ffffffff841660408281019190915260c06060808401829052853591840191909152602085013560e0840152908401356101008301528301356101208201525f6123dd6080850185611c48565b60a06101408501526123f461016085018284611cd1565b92505050611b726080830184611f6e565b5f60208284031215612415575f5ffd5b815161169881611997565b5f8261243a57634e487b7160e01b5f52601260045260245ffd5b500690565b808201808211156113ef57634e487b7160e01b5f52601160045260245ffdfea2646970667358221220208e8450200ce459c99269862a3a6eeb93b95a5e851a56c28c7b549b0594ae5064736f6c634300081b0033", + Bin: "0x610100604052348015610010575f5ffd5b5060405161280438038061280483398101604081905261002f916101b9565b808484846001600160a01b03811661005a576040516339b190bb60e11b815260040160405180910390fd5b6001600160a01b0390811660805291821660a0521660c05261007b81610090565b60e052506100876100d6565b505050506102fe565b5f5f829050601f815111156100c3578260405163305a27a960e01b81526004016100ba91906102a3565b60405180910390fd5b80516100ce826102d8565b179392505050565b5f54610100900460ff161561013d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b60648201526084016100ba565b5f5460ff9081161461018c575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101a2575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f5f608085870312156101cc575f5ffd5b84516101d78161018e565b60208601519094506101e88161018e565b60408601519093506101f98161018e565b60608601519092506001600160401b03811115610214575f5ffd5b8501601f81018713610224575f5ffd5b80516001600160401b0381111561023d5761023d6101a5565b604051601f8201601f19908116603f011681016001600160401b038111828210171561026b5761026b6101a5565b604052818152828201602001891015610282575f5ffd5b8160208401602083015e5f6020838301015280935050505092959194509250565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102f8575f198160200360031b1b821691505b50919050565b60805160a05160c05160e0516124946103705f395f61065801525f81816104e6015281816106f201526109b801525f818161050d015281816106b20152818161075e0152818161091301528181610c0a015261142201525f818161049b0152818161105c015261149201526124945ff3fe608060405234801561000f575f5ffd5b5060043610610208575f3560e01c8063715018a61161011f578063c3621f0a116100a9578063eaaed9d511610079578063eaaed9d5146105ae578063ed90dc60146105c1578063f2fde38b146105d4578063fabc1cbc146105e7578063fd967f47146105fa575f5ffd5b8063c3621f0a14610550578063c3be1e3314610563578063c5916a3914610576578063e944e0a81461059b575f5ffd5b80638da5cb5b116100ef5780638da5cb5b146104bd5780639ea94778146104ce578063ad0f9582146104e1578063b8c1430614610508578063c252aa221461052f575f5ffd5b8063715018a6146104735780637551ba341461047b57806377d90e9414610483578063886f119514610496575f5ffd5b80633ef6cd7a116101a0578063595c6a6711610170578063595c6a67146103e05780635ac86ab7146103e85780635c975abb1461040b57806364e1df84146104135780636f728c5014610448575f5ffd5b80633ef6cd7a146103695780634624e6a3146103905780634af81d7a146103a457806354fd4d50146103cb575f5ffd5b806323b7b5b2116101db57806323b7b5b2146102be57806328522d79146102e657806330ef41b41461031257806331a599d214610344575f5ffd5b8063136439dd1461020c578063193b79f3146102215780631e2ca260146102635780632370356c146102ab575b5f5ffd5b61021f61021a366004611655565b610603565b005b61024961022f36600461167d565b63ffffffff9081165f908152609b60205260409020541690565b60405163ffffffff90911681526020015b60405180910390f35b6040805180820182525f80825260209182015281518083019092526098546001600160a01b0381168352600160a01b900463ffffffff169082015260405161025a91906116bd565b61021f6102b93660046116dc565b61063d565b6102496102cc36600461167d565b63ffffffff9081165f908152609a60205260409020541690565b60975462010000900463ffffffff165f908152609960205260409020545b60405190815260200161025a565b610334610320366004611655565b5f908152609c602052604090205460ff1690565b604051901515815260200161025a565b60975462010000900463ffffffff9081165f908152609a602052604090205416610249565b6103047f4491f5ee91595f938885ef73c9a1fa8a6d14ff9b9dab4aa24b8802bbb9bfc1cc81565b60975462010000900463ffffffff16610249565b6103047f2eddfa6e51c2e0ba986436883fbc224e895ba21e8fc61421f6b10d11e25d008e81565b6103d3610651565b60405161025a91906116f5565b61021f610681565b6103346103f636600461172a565b606654600160ff9092169190911b9081161490565b606654610304565b61033461042136600461167d565b63ffffffff165f908152609960209081526040808320548352609c90915290205460ff1690565b61045b610456366004611758565b610695565b6040516001600160a01b03909116815260200161025a565b61021f610734565b610249610745565b61021f610491366004611787565b6107d3565b61045b7f000000000000000000000000000000000000000000000000000000000000000081565b6033546001600160a01b031661045b565b61021f6104dc3660046117e5565b6107e4565b61045b7f000000000000000000000000000000000000000000000000000000000000000081565b61045b7f000000000000000000000000000000000000000000000000000000000000000081565b60975461053d9061ffff1681565b60405161ffff909116815260200161025a565b61021f61055e366004611655565b610a1e565b610304610571366004611880565b610a93565b61030461058436600461167d565b63ffffffff165f9081526099602052604090205490565b61021f6105a93660046118cf565b610afb565b61021f6105bc36600461192b565b610b13565b61021f6105cf3660046119ab565b610d50565b61021f6105e2366004611a45565b610f64565b61021f6105f5366004611655565b610fda565b61053d61271081565b61060b611047565b60665481811681146106305760405163c61dca5d60e01b815260040160405180910390fd5b610639826110ea565b5050565b610645611127565b61064e81611181565b50565b606061067c7f00000000000000000000000000000000000000000000000000000000000000006111f3565b905090565b610689611047565b6106935f196110ea565b565b5f60028260028111156106aa576106aa611a60565b036106d657507f0000000000000000000000000000000000000000000000000000000000000000919050565b60018260028111156106ea576106ea611a60565b0361071657507f0000000000000000000000000000000000000000000000000000000000000000919050565b60405163fdea7c0960e01b815260040160405180910390fd5b919050565b61073c611127565b6106935f611230565b604051635ddb9b5b60e01b81525f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635ddb9b5b9061079490609890600401611a74565b602060405180830381865afa1580156107af573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067c9190611a9b565b6107db611127565b61064e81611281565b60016107ef816112c0565b5f5f5f5f6107fd87876112eb565b5f8f8152609c60205260409020549397509195509350915060ff166108355760405163504570e360e01b815260040160405180910390fd5b61083e83610695565b6001600160a01b0316635ddb9b5b856040518263ffffffff1660e01b815260040161086991906116bd565b602060405180830381865afa158015610884573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108a89190611a9b565b63ffffffff168c63ffffffff16116108d35760405163207617df60e01b815260040160405180910390fd5b6108f88c8c8c8c8c8c8c6040516108eb929190611ab6565b6040518091039020611332565b600283600281111561090c5761090c611a60565b0361099d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636738c40b858e61094b856113d3565b866040518563ffffffff1660e01b815260040161096b9493929190611aff565b5f604051808303815f87803b158015610982575f5ffd5b505af1158015610994573d5f5f3e3d5ffd5b50505050610a10565b60018360028111156109b1576109b1611a60565b03610716577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166356d482f5858e6109f0856113f5565b866040518563ffffffff1660e01b815260040161096b9493929190611b7b565b505050505050505050505050565b610a26611047565b5f818152609c602052604090205460ff16610a545760405163504570e360e01b815260040160405180910390fd5b5f818152609c6020526040808220805460ff191690555182917f8bd43de1250f58fe6ec9a78671a8b78dba70f0018656d157a3aeaabec389df3491a250565b604080517f4491f5ee91595f938885ef73c9a1fa8a6d14ff9b9dab4aa24b8802bbb9bfc1cc602082015290810184905263ffffffff8084166060830152821660808201525f9060a0016040516020818303038152906040528051906020012090509392505050565b610b03611127565b610b0e83838361140b565b505050565b5f610b1d816112c0565b428363ffffffff161115610b4457604051635a119db560e11b815260040160405180910390fd5b60975463ffffffff62010000909104811690841611610b765760405163037fa86b60e31b815260040160405180910390fd5b610b81848484610a93565b856020013514610ba457604051638b56642d60e01b815260040160405180910390fd5b6040805160018082528183019092525f91602080830190803683375050609754825192935061ffff16918391505f90610bdf57610bdf611c34565b61ffff90921660209283029190910190910152604051625f5e5d60e21b81525f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d797490610c44906098908b908790600401611d66565b6020604051808303815f875af1158015610c60573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c849190611ef3565b905080610ca457604051633042041f60e21b815260040160405180910390fd5b6097805463ffffffff80881662010000810265ffffffff000019909316929092179092555f818152609a602090815260408083208054958a1663ffffffff1996871681179091558352609b825280832080549095168417909455828252609981528382208a9055898252609c9052828120805460ff19166001179055915188927f010dcbe0d1e019c93357711f7bb6287d543b7ff7de74f29df3fb5ecceec8d36991a350505050505050565b5f54610100900460ff1615808015610d6e57505f54600160ff909116105b80610d875750303b158015610d8757505f5460ff166001145b610def5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015610e10575f805461ff0019166101001790555b610e1988611230565b610e22876110ea565b610e2b86611281565b610e3485611181565b610e3f84848461140b565b63ffffffff8481165f8181526099602090815260408083207f2eddfa6e51c2e0ba986436883fbc224e895ba21e8fc61421f6b10d11e25d008e908190557fd6e1a24cb7e68b47373042d0900dfd69bffcfc2c807e706164b25b408655b71f805460ff19166001179055609a835281842080544390971663ffffffff1997881681179091558452609b909252808320805490951684179094556097805462010000850265ffffffff00001990911617905592517f010dcbe0d1e019c93357711f7bb6287d543b7ff7de74f29df3fb5ecceec8d3699190a38015610f5a575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b610f6c611127565b6001600160a01b038116610fd15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610de6565b61064e81611230565b610fe2611490565b606654801982198116146110095760405163c61dca5d60e01b815260040160405180910390fd5b606682905560405182815233907f3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c9060200160405180910390a25050565b60405163237dfb4760e11b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906346fbf68e90602401602060405180830381865afa1580156110a9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110cd9190611ef3565b61069357604051631d77d47760e21b815260040160405180910390fd5b606681905560405181815233907fab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d9060200160405180910390a250565b6033546001600160a01b031633146106935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610de6565b61271061ffff821611156111a8576040516307336f0360e11b815260040160405180910390fd5b6097805461ffff191661ffff83169081179091556040519081527ff5d1836df8fcd7c1e54047e94ac8773d2855395603e2ef9ba5f5f16905f22592906020015b60405180910390a150565b60605f6111ff83611541565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b80609861128e8282611f12565b9050507f3463431b09dfd43dec7349f8f24acfa753fe4cf40a26235402d213373df15856816040516111e89190611fa3565b606654600160ff83161b9081160361064e5760405163840a48d560e01b815260040160405180910390fd5b604080518082019091525f8082526020820152604080518082019091525f808252602082018190529060606113228587018761206b565b9299919850965090945092505050565b63ffffffff86165f9081526099602052604090205485146113665760405163639d09b560e11b815260040160405180910390fd5b6113ae83838080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508992508591505063ffffffff8816611568565b6113cb5760405163afa42ca760e01b815260040160405180910390fd5b505050505050565b6113db611616565b818060200190518101906113ef91906121bc565b92915050565b6060818060200190518101906113ef919061226b565b604051636738c40b60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636738c40b9061145e9060989087908790879060040161236c565b5f604051808303815f87803b158015611475575f5ffd5b505af1158015611487573d5f5f3e3d5ffd5b50505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663eab66d7a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114ec573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115109190612405565b6001600160a01b0316336001600160a01b0316146106935760405163794821ff60e01b815260040160405180910390fd5b5f60ff8216601f8111156113ef57604051632cd44ac360e21b815260040160405180910390fd5b5f8361157586858561157f565b1495945050505050565b5f6020845161158e9190612420565b156115ac576040516313717da960e21b815260040160405180910390fd5b8260205b8551811161160d576115c3600285612420565b5f036115e457815f528086015160205260405f2091506002840493506115fb565b808601515f528160205260405f2091506002840493505b61160660208261243f565b90506115b0565b50949350505050565b60405180608001604052805f81526020015f815260200161164860405180604001604052805f81526020015f81525090565b8152602001606081525090565b5f60208284031215611665575f5ffd5b5035919050565b63ffffffff8116811461064e575f5ffd5b5f6020828403121561168d575f5ffd5b81356116988161166c565b9392505050565b80516001600160a01b0316825260209081015163ffffffff16910152565b604081016113ef828461169f565b803561ffff8116811461072f575f5ffd5b5f602082840312156116ec575f5ffd5b611698826116cb565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f6020828403121561173a575f5ffd5b813560ff81168114611698575f5ffd5b80356003811061072f575f5ffd5b5f60208284031215611768575f5ffd5b6116988261174a565b5f60408284031215611781575f5ffd5b50919050565b5f60408284031215611797575f5ffd5b6116988383611771565b5f5f83601f8401126117b1575f5ffd5b5081356001600160401b038111156117c7575f5ffd5b6020830191508360208285010111156117de575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a0312156117fb575f5ffd5b87356118068161166c565b965060208801359550604088013561181d8161166c565b945060608801356001600160401b03811115611837575f5ffd5b6118438a828b016117a1565b90955093505060808801356001600160401b03811115611861575f5ffd5b61186d8a828b016117a1565b989b979a50959850939692959293505050565b5f5f5f60608486031215611892575f5ffd5b8335925060208401356118a48161166c565b915060408401356118b48161166c565b809150509250925092565b5f60a08284031215611781575f5ffd5b5f5f5f608084860312156118e1575f5ffd5b83356118ec8161166c565b925060208401356001600160401b03811115611906575f5ffd5b611912868287016118bf565b9250506119228560408601611771565b90509250925092565b5f5f5f5f6080858703121561193e575f5ffd5b84356001600160401b03811115611953575f5ffd5b85016101208188031215611965575f5ffd5b935060208501359250604085013561197c8161166c565b9150606085013561198c8161166c565b939692955090935050565b6001600160a01b038116811461064e575f5ffd5b5f5f5f5f5f5f5f610120888a0312156119c2575f5ffd5b87356119cd81611997565b9650602088013595506119e38960408a01611771565b94506119f1608089016116cb565b935060a0880135611a018161166c565b925060c08801356001600160401b03811115611a1b575f5ffd5b611a278a828b016118bf565b925050611a378960e08a01611771565b905092959891949750929550565b5f60208284031215611a55575f5ffd5b813561169881611997565b634e487b7160e01b5f52602160045260245ffd5b604081016113ef8284546001600160a01b038116825260a01c63ffffffff16602090910152565b5f60208284031215611aab575f5ffd5b81516116988161166c565b818382375f9101908152919050565b5f8151808452602084019350602083015f5b82811015611af5578151865260209586019590910190600101611ad7565b5093949350505050565b611b09818661169f565b63ffffffff8416604082015260c06060820152825160c0820152602083015160e08201525f60408401518051610100840152602081015161012084015250606084015160a0610140840152611b62610160840182611ac5565b915050611b72608083018461169f565b95945050505050565b5f60c08201611b8a838861169f565b63ffffffff8616604084015260c0606084015280855180835260e08501915060e08160051b8601019250602087015f5b82811015611c0b5786850360df19018452815180516001600160a01b03168652602090810151604091870182905290611bf590870182611ac5565b9550506020938401939190910190600101611bba565b5050505080915050611b72608083018461169f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f5f8335601e19843603018112611c5d575f5ffd5b83016020810192503590506001600160401b03811115611c7b575f5ffd5b8060051b36038213156117de575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235605e19833603018112611cc8575f5ffd5b90910192915050565b8183525f6001600160fb1b03831115611ce8575f5ffd5b8260051b80836020870137939093016020019392505050565b80358252602080820135908301525f611d1d6040830183611c48565b60606040860152611b72606086018284611cd1565b5f8151808452602084019350602083015f5b82811015611af557815161ffff16865260209586019590910190600101611d44565b611d898185546001600160a01b038116825260a01c63ffffffff16602090910152565b608060408201525f6101a082018435611da18161166c565b63ffffffff166080840152602085013560a0840152604085013560c0840152606085013560e0840152604060808601610100850137604060c08601610140850137611df0610100860186611c48565b610120610180860152828184526101c0860190506101c08260051b8701019350825f5b83811015611ed2578786036101bf19018352611e2f8286611cb4565b8035611e3a8161166c565b63ffffffff168752602081013536829003601e19018112611e59575f5ffd5b81016020810190356001600160401b03811115611e74575f5ffd5b803603821315611e82575f5ffd5b606060208a0152611e9760608a018284611c8c565b915050611ea76040830183611cb4565b91508781036040890152611ebb8183611d01565b975050506020928301929190910190600101611e13565b50505050508281036060840152611ee98185611d32565b9695505050505050565b5f60208284031215611f03575f5ffd5b81518015158114611698575f5ffd5b8135611f1d81611997565b81546001600160a01b031981166001600160a01b039290921691821783556020840135611f498161166c565b6001600160c01b03199190911690911760a09190911b63ffffffff60a01b1617905550565b8035611f7981611997565b6001600160a01b031682526020810135611f928161166c565b63ffffffff81166020840152505050565b604081016113ef8284611f6e565b604080519081016001600160401b0381118282101715611fd357611fd3611c20565b60405290565b604051608081016001600160401b0381118282101715611fd357611fd3611c20565b604051601f8201601f191681016001600160401b038111828210171561202357612023611c20565b604052919050565b5f6040828403121561203b575f5ffd5b612043611fb1565b9050813561205081611997565b815260208201356120608161166c565b602082015292915050565b5f5f5f5f60c0858703121561207e575f5ffd5b612088868661202b565b93506120966040860161174a565b92506120a5866060870161202b565b915060a08501356001600160401b038111156120bf575f5ffd5b8501601f810187136120cf575f5ffd5b80356001600160401b038111156120e8576120e8611c20565b6120fb601f8201601f1916602001611ffb565b81815288602083850101111561210f575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b5f6001600160401b0382111561214857612148611c20565b5060051b60200190565b5f82601f830112612161575f5ffd5b815161217461216f82612130565b611ffb565b8082825260208201915060208360051b860101925085831115612195575f5ffd5b602085015b838110156121b257805183526020928301920161219a565b5095945050505050565b5f602082840312156121cc575f5ffd5b81516001600160401b038111156121e1575f5ffd5b820180840360a08112156121f3575f5ffd5b6121fb611fd9565b82518152602080840151908201526040603f198301121561221a575f5ffd5b612222611fb1565b604084810151825260608501516020830152820152608083015191506001600160401b03821115612251575f5ffd5b61225d86838501612152565b606082015295945050505050565b5f6020828403121561227b575f5ffd5b81516001600160401b03811115612290575f5ffd5b8201601f810184136122a0575f5ffd5b80516122ae61216f82612130565b8082825260208201915060208360051b8501019250868311156122cf575f5ffd5b602084015b838110156123615780516001600160401b038111156122f1575f5ffd5b85016040818a03601f19011215612306575f5ffd5b61230e611fb1565b602082015161231c81611997565b815260408201516001600160401b03811115612336575f5ffd5b6123458b602083860101612152565b60208301525080855250506020830192506020810190506122d4565b509695505050505050565b61238f8186546001600160a01b038116825260a01c63ffffffff16602090910152565b63ffffffff841660408281019190915260c06060808401829052853591840191909152602085013560e0840152908401356101008301528301356101208201525f6123dd6080850185611c48565b60a06101408501526123f461016085018284611cd1565b92505050611b726080830184611f6e565b5f60208284031215612415575f5ffd5b815161169881611997565b5f8261243a57634e487b7160e01b5f52601260045260245ffd5b500690565b808201808211156113ef57634e487b7160e01b5f52601160045260245ffdfea26469706673582212202d883c86b09b3bc1fe937fec0029ae3a85471894ab68343dd5d2a46d25a4f91a64736f6c634300081b0033", } // OperatorTableUpdaterABI is the input ABI used to generate the binding from. diff --git a/pkg/bindings/TaskMailbox/binding.go b/pkg/bindings/TaskMailbox/binding.go new file mode 100644 index 0000000000..b79be0859e --- /dev/null +++ b/pkg/bindings/TaskMailbox/binding.go @@ -0,0 +1,2413 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package TaskMailbox + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// BN254G1Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G1Point struct { + X *big.Int + Y *big.Int +} + +// BN254G2Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G2Point struct { + X [2]*big.Int + Y [2]*big.Int +} + +// IBN254CertificateVerifierTypesBN254Certificate is an auto generated low-level Go binding around an user-defined struct. +type IBN254CertificateVerifierTypesBN254Certificate struct { + ReferenceTimestamp uint32 + MessageHash [32]byte + Signature BN254G1Point + Apk BN254G2Point + NonSignerWitnesses []IBN254CertificateVerifierTypesBN254OperatorInfoWitness +} + +// IBN254CertificateVerifierTypesBN254OperatorInfoWitness is an auto generated low-level Go binding around an user-defined struct. +type IBN254CertificateVerifierTypesBN254OperatorInfoWitness struct { + OperatorIndex uint32 + OperatorInfoProof []byte + OperatorInfo IOperatorTableCalculatorTypesBN254OperatorInfo +} + +// IECDSACertificateVerifierTypesECDSACertificate is an auto generated low-level Go binding around an user-defined struct. +type IECDSACertificateVerifierTypesECDSACertificate struct { + ReferenceTimestamp uint32 + MessageHash [32]byte + Sig []byte +} + +// IOperatorTableCalculatorTypesBN254OperatorInfo is an auto generated low-level Go binding around an user-defined struct. +type IOperatorTableCalculatorTypesBN254OperatorInfo struct { + Pubkey BN254G1Point + Weights []*big.Int +} + +// ITaskMailboxTypesConsensus is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesConsensus struct { + ConsensusType uint8 + Value []byte +} + +// ITaskMailboxTypesExecutorOperatorSetTaskConfig is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesExecutorOperatorSetTaskConfig struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +} + +// ITaskMailboxTypesTask is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesTask struct { + Creator common.Address + CreationTime *big.Int + Avs common.Address + AvsFee *big.Int + RefundCollector common.Address + ExecutorOperatorSetId uint32 + FeeSplit uint16 + Status uint8 + IsFeeRefunded bool + ExecutorOperatorSetTaskConfig ITaskMailboxTypesExecutorOperatorSetTaskConfig + Payload []byte + ExecutorCert []byte + Result []byte +} + +// ITaskMailboxTypesTaskParams is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesTaskParams struct { + RefundCollector common.Address + ExecutorOperatorSet OperatorSet + Payload []byte +} + +// OperatorSet is an auto generated low-level Go binding around an user-defined struct. +type OperatorSet struct { + Avs common.Address + Id uint32 +} + +// TaskMailboxMetaData contains all meta data concerning the TaskMailbox contract. +var TaskMailboxMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_bn254CertificateVerifier\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_ecdsaCertificateVerifier\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_version\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BN254_CERTIFICATE_VERIFIER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ECDSA_CERTIFICATE_VERIFIER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createTask\",\"inputs\":[{\"name\":\"taskParams\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.TaskParams\",\"components\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executorOperatorSetTaskConfigs\",\"inputs\":[{\"name\":\"operatorSetKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeSplit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeSplitCollector\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBN254CertificateBytes\",\"inputs\":[{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getECDSACertificateBytes\",\"inputs\":[{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getExecutorOperatorSetTaskConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFeeSplit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFeeSplitCollector\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskInfo\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Task\",\"components\":[{\"name\":\"creator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"creationTime\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"},{\"name\":\"isFeeRefunded\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"executorOperatorSetTaskConfig\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskResult\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskStatus\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"_feeSplitCollector\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isExecutorOperatorSetRegistered\",\"inputs\":[{\"name\":\"operatorSetKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"isRegistered\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"refundFee\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerExecutorOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"isRegistered\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExecutorOperatorSetTaskConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"config\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeeSplit\",\"inputs\":[{\"name\":\"_feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeeSplitCollector\",\"inputs\":[{\"name\":\"_feeSplitCollector\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"submitResult\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ExecutorOperatorSetRegistered\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"isRegistered\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ExecutorOperatorSetTaskConfigSet\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"config\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeRefunded\",\"inputs\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeSplitCollectorSet\",\"inputs\":[{\"name\":\"feeSplitCollector\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeSplitSet\",\"inputs\":[{\"name\":\"feeSplit\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TaskCreated\",\"inputs\":[{\"name\":\"creator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"refundCollector\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"taskDeadline\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"payload\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TaskVerified\",\"inputs\":[{\"name\":\"aggregator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CertificateVerificationFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyCertificateSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExecutorOperatorSetNotRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExecutorOperatorSetTaskConfigNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeAlreadyRefunded\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConsensusType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConsensusValue\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFeeReceiver\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFeeSplit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSetOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidShortString\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTaskCreator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTaskStatus\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"},{\"name\":\"actual\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"}]},{\"type\":\"error\",\"name\":\"OnlyRefundCollector\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PayloadIsEmpty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StringTooLong\",\"inputs\":[{\"name\":\"str\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"TaskSLAIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TimestampAtCreation\",\"inputs\":[]}]", + Bin: "0x60e060405234801561000f575f5ffd5b506040516158f83803806158f883398101604081905261002e9161018c565b6001600160a01b03808416608052821660a0528061004b8161005f565b60c052506100576100a5565b5050506102b8565b5f5f829050601f81511115610092578260405163305a27a960e01b8152600401610089919061025d565b60405180910390fd5b805161009d82610292565b179392505050565b5f54610100900460ff161561010c5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610089565b5f5460ff9081161461015b575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b0381168114610173575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f6060848603121561019e575f5ffd5b6101a78461015d565b92506101b56020850161015d565b60408501519092506001600160401b038111156101d0575f5ffd5b8401601f810186136101e0575f5ffd5b80516001600160401b038111156101f9576101f9610178565b604051601f8201601f19908116603f011681016001600160401b038111828210171561022757610227610178565b60405281815282820160200188101561023e575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b805160208083015191908110156102b2575f198160200360031b1b821691505b50919050565b60805160a05160c0516155fa6102fe5f395f611b8301525f81816102bb015281816134c8015261397901525f81816103d501528181613488015261388c01526155fa5ff3fe608060405234801561000f575f5ffd5b5060043610610187575f3560e01c80636373ea69116100d9578063a5fabc8111610093578063f2fde38b1161006e578063f2fde38b146103aa578063f741e81a146103bd578063f7424fc9146103d0578063fa2c0b37146103f7575f5ffd5b8063a5fabc8114610378578063b86941661461038b578063eda0be691461039e575f5ffd5b80636373ea69146102f8578063678fbdb3146103195780636bf6fad51461032c578063708c0db91461034c578063715018a61461035f5780638da5cb5b14610367575f5ffd5b80632bf6cc79116101445780634ad52e021161011f5780634ad52e021461029657806354743ad2146102b657806354fd4d50146102dd57806362fee037146102e5575f5ffd5b80632bf6cc791461024e578063468c07a01461026e57806349acd88414610283575f5ffd5b806302a744801461018b5780631270a892146101bb5780631a20c505146101db5780631ae370eb146101f45780631c7edb17146102075780631fb66f5d1461022d575b5f5ffd5b609b546201000090046001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6101ce6101c9366004613f5c565b610429565b6040516101b29190614011565b609b5461019e906201000090046001600160a01b031681565b6101ce61020236600461426e565b610452565b61021a61021536600461434e565b610465565b6040516101b297969594939291906143bd565b61024061023b366004614492565b61060c565b6040519081526020016101b2565b61026161025c36600461434e565b610ea9565b6040516101b29190614517565b61028161027c366004614534565b61133d565b005b61028161029136600461455c565b611351565b6102a96102a436600461434e565b61160c565b6040516101b29190614638565b61019e7f000000000000000000000000000000000000000000000000000000000000000081565b6101ce611b7c565b6101ce6102f336600461434e565b611bac565b609b546103069061ffff1681565b60405161ffff90911681526020016101b2565b61028161032736600461476f565b612091565b61033f61033a36600461478a565b6120a2565b6040516101b291906147a4565b61028161035a3660046147b6565b6122b6565b6102816123e7565b6033546001600160a01b031661019e565b6102816103863660046147fe565b6123fa565b61028161039936600461434e565b612cbc565b609b5461ffff16610306565b6102816103b836600461476f565b612eee565b6102816103cb3660046148f0565b612f64565b61019e7f000000000000000000000000000000000000000000000000000000000000000081565b61041961040536600461434e565b60996020525f908152604090205460ff1681565b60405190151581526020016101b2565b60608160405160200161043c9190614a1b565b6040516020818303038152906040529050919050565b60608160405160200161043c9190614b9f565b609a6020525f9081526040908190208054600180830154600284015485518087019096526003850180546001600160a01b03808716986001600160601b03600160a01b9889900416988683169860ff970487169795909216959194909392849216908111156104d6576104d6614365565b60018111156104e7576104e7614365565b81526020016001820180546104fb90614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461052790614bb1565b80156105725780601f1061054957610100808354040283529160200191610572565b820191905f5260205f20905b81548152906001019060200180831161055557829003601f168201915b5050505050815250509080600501805461058b90614bb1565b80601f01602080910402602001604051908101604052809291908181526020018280546105b790614bb1565b80156106025780601f106105d957610100808354040283529160200191610602565b820191905f5260205f20905b8154815290600101906020018083116105e557829003601f168201915b5050505050905087565b5f6106156131a6565b5f8260400151511161063a57604051636b1a1b6960e11b815260040160405180910390fd5b60995f61064a84602001516131ff565b815260208101919091526040015f205460ff1661067a5760405163c292b29760e01b815260040160405180910390fd5b5f609a5f61068b85602001516131ff565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff1660028111156106f9576106f9614365565b600281111561070a5761070a614365565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561074b5761074b614365565b600181111561075c5761075c614365565b815260200160018201805461077090614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461079c90614bb1565b80156107e75780601f106107be576101008083540402835291602001916107e7565b820191905f5260205f20905b8154815290600101906020018083116107ca57829003601f168201915b505050505081525050815260200160058201805461080490614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461083090614bb1565b801561087b5780601f106108525761010080835404028352916020019161087b565b820191905f5260205f20905b81548152906001019060200180831161085e57829003601f168201915b50505050508152505090505f600281111561089857610898614365565b816060015160028111156108ae576108ae614365565b141580156108c5575080516001600160a01b031615155b80156108dd57505f81602001516001600160601b0316115b80156108ff57505f60a08201515160018111156108fc576108fc614365565b14155b61091c576040516314b0a41d60e11b815260040160405180910390fd5b8051604051630a3fc61360e31b81526001600160a01b03909116906351fe30989061094d9033908790600401614c3d565b5f6040518083038186803b158015610963575f5ffd5b505afa158015610975573d5f5f3e3d5ffd5b50508251604051637036693f60e11b81525f93506001600160a01b03909116915063e06cd27e906109aa908790600401614c60565b602060405180830381865afa1580156109c5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109e99190614c72565b90505f609754304687604051602001610a059493929190614c8d565b6040516020818303038152906040528051906020012090506097546001610a2c9190614cd7565b609755604080516101a0810190915233815260208101610a4b42613268565b6001600160601b03908116825260208881018051516001600160a01b03908116838601529287166040850152895190921660608401529051015163ffffffff166080820152609b5461ffff1660a082015260c001600181525f6020808301829052604080840188905289810151606080860191909152815180840183528481526080808701919091528251808501845285815260a09687015287855260988452938290208651938701516001600160601b03908116600160a01b9081026001600160a01b039687161783559388015192880151168302918416919091176001820155928501516002840180549587015160c088015161ffff16600160c01b0261ffff60c01b1963ffffffff9092169094026001600160c01b03199097169290941691909117949094179182168117845560e085015192939160ff60d01b1990911662ffffff60c01b1990911617600160d01b836003811115610baf57610baf614365565b021790555061010082015160028083018054921515600160d81b0260ff60d81b1990931692909217909155610120830151805160208201516001600160601b0316600160a01b9081026001600160a01b0392831617600386019081556040840151600487018054919094166001600160a01b031982168117855560608601519596929594936001600160a81b031990921617918490811115610c5357610c53614365565b021790555060808201516002820180546001600160a01b0319166001600160a01b0390921691909117905560a08201518051600383018054909190829060ff191660018381811115610ca757610ca7614365565b021790555060208201516001820190610cc09082614d35565b50505060c08201516005820190610cd79082614d35565b5050506101408201516009820190610cef9082614d35565b50610160820151600a820190610d059082614d35565b50610180820151600b820190610d1b9082614d35565b50505060408301516001600160a01b031615801590610d4257505f826001600160601b0316115b15610dbd5760808301516001600160a01b0316610d7257604051633480121760e21b815260040160405180910390fd5b84516001600160a01b0316610d9a57604051633480121760e21b815260040160405180910390fd5b6040830151610dbd906001600160a01b031633306001600160601b0386166132d3565b8251604051629c5c4560e41b8152600481018390526001600160a01b03909116906309c5c450906024015f604051808303815f87803b158015610dfe575f5ffd5b505af1158015610e10573d5f5f3e3d5ffd5b5050505084602001515f01516001600160a01b031681336001600160a01b03167f4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317886020015160200151895f01518789602001516001600160601b031642610e789190614cd7565b8c60400151604051610e8e959493929190614def565b60405180910390a492505050610ea46001606555565b919050565b5f81815260986020908152604080832081516101a08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c084015283929160e0830190600160d01b900460ff166003811115610f5557610f55614365565b6003811115610f6657610f66614365565b815260028281015460ff600160d81b909104811615156020808501919091526040805160e0810182526003870180546001600160a01b0380821684526001600160601b03600160a01b92839004169584019590955260048901549485168385015292909601959094909360608601939290920490911690811115610fec57610fec614365565b6002811115610ffd57610ffd614365565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561103e5761103e614365565b600181111561104f5761104f614365565b815260200160018201805461106390614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461108f90614bb1565b80156110da5780601f106110b1576101008083540402835291602001916110da565b820191905f5260205f20905b8154815290600101906020018083116110bd57829003601f168201915b50505050508152505081526020016005820180546110f790614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461112390614bb1565b801561116e5780601f106111455761010080835404028352916020019161116e565b820191905f5260205f20905b81548152906001019060200180831161115157829003601f168201915b505050505081525050815260200160098201805461118b90614bb1565b80601f01602080910402602001604051908101604052809291908181526020018280546111b790614bb1565b80156112025780601f106111d957610100808354040283529160200191611202565b820191905f5260205f20905b8154815290600101906020018083116111e557829003601f168201915b50505050508152602001600a8201805461121b90614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461124790614bb1565b80156112925780601f1061126957610100808354040283529160200191611292565b820191905f5260205f20905b81548152906001019060200180831161127557829003601f168201915b50505050508152602001600b820180546112ab90614bb1565b80601f01602080910402602001604051908101604052809291908181526020018280546112d790614bb1565b80156113225780601f106112f957610100808354040283529160200191611322565b820191905f5260205f20905b81548152906001019060200180831161130557829003601f168201915b505050505081525050905061133681613345565b9392505050565b6113456133a0565b61134e816133fa565b50565b5f609a5f61135e856131ff565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff1660028111156113cc576113cc614365565b60028111156113dd576113dd614365565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561141e5761141e614365565b600181111561142f5761142f614365565b815260200160018201805461144390614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461146f90614bb1565b80156114ba5780601f10611491576101008083540402835291602001916114ba565b820191905f5260205f20905b81548152906001019060200180831161149d57829003601f168201915b50505050508152505081526020016005820180546114d790614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461150390614bb1565b801561154e5780601f106115255761010080835404028352916020019161154e565b820191905f5260205f20905b81548152906001019060200180831161153157829003601f168201915b50505050508152505090505f600281111561156b5761156b614365565b8160600151600281111561158157611581614365565b14158015611598575080516001600160a01b031615155b80156115b057505f81602001516001600160601b0316115b80156115d257505f60a08201515160018111156115cf576115cf614365565b14155b6115ef576040516314b0a41d60e11b815260040160405180910390fd5b6115fd83826060015161346b565b6116078383613599565b505050565b611614613d43565b5f82815260986020908152604080832081516101a08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c08401529060e0830190600160d01b900460ff1660038111156116be576116be614365565b60038111156116cf576116cf614365565b815260028281015460ff600160d81b909104811615156020808501919091526040805160e0810182526003870180546001600160a01b0380821684526001600160601b03600160a01b9283900416958401959095526004890154948516838501529290960195909490936060860193929092049091169081111561175557611755614365565b600281111561176657611766614365565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff1660018111156117a7576117a7614365565b60018111156117b8576117b8614365565b81526020016001820180546117cc90614bb1565b80601f01602080910402602001604051908101604052809291908181526020018280546117f890614bb1565b80156118435780601f1061181a57610100808354040283529160200191611843565b820191905f5260205f20905b81548152906001019060200180831161182657829003601f168201915b505050505081525050815260200160058201805461186090614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461188c90614bb1565b80156118d75780601f106118ae576101008083540402835291602001916118d7565b820191905f5260205f20905b8154815290600101906020018083116118ba57829003601f168201915b50505050508152505081526020016009820180546118f490614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461192090614bb1565b801561196b5780601f106119425761010080835404028352916020019161196b565b820191905f5260205f20905b81548152906001019060200180831161194e57829003601f168201915b50505050508152602001600a8201805461198490614bb1565b80601f01602080910402602001604051908101604052809291908181526020018280546119b090614bb1565b80156119fb5780601f106119d2576101008083540402835291602001916119fb565b820191905f5260205f20905b8154815290600101906020018083116119de57829003601f168201915b50505050508152602001600b82018054611a1490614bb1565b80601f0160208091040260200160405190810160405280929190818152602001828054611a4090614bb1565b8015611a8b5780601f10611a6257610100808354040283529160200191611a8b565b820191905f5260205f20905b815481529060010190602001808311611a6e57829003601f168201915b5050505050815250509050604051806101a00160405280825f01516001600160a01b0316815260200182602001516001600160601b0316815260200182604001516001600160a01b0316815260200182606001516001600160601b0316815260200182608001516001600160a01b031681526020018260a0015163ffffffff1681526020018260c0015161ffff168152602001611b2783613345565b6003811115611b3857611b38614365565b815260200182610100015115158152602001826101200151815260200182610140015181526020018261016001518152602001826101800151815250915050919050565b6060611ba77f000000000000000000000000000000000000000000000000000000000000000061362a565b905090565b5f81815260986020908152604080832081516101a08101835281546001600160a01b038082168352600160a01b918290046001600160601b0390811696840196909652600184015480821695840195909552938190049094166060808301919091526002830154938416608083015293830463ffffffff1660a0820152600160c01b830461ffff1660c08201529293929160e0830190600160d01b900460ff166003811115611c5d57611c5d614365565b6003811115611c6e57611c6e614365565b815260028281015460ff600160d81b909104811615156020808501919091526040805160e0810182526003870180546001600160a01b0380821684526001600160601b03600160a01b92839004169584019590955260048901549485168385015292909601959094909360608601939290920490911690811115611cf457611cf4614365565b6002811115611d0557611d05614365565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff166001811115611d4657611d46614365565b6001811115611d5757611d57614365565b8152602001600182018054611d6b90614bb1565b80601f0160208091040260200160405190810160405280929190818152602001828054611d9790614bb1565b8015611de25780601f10611db957610100808354040283529160200191611de2565b820191905f5260205f20905b815481529060010190602001808311611dc557829003601f168201915b5050505050815250508152602001600582018054611dff90614bb1565b80601f0160208091040260200160405190810160405280929190818152602001828054611e2b90614bb1565b8015611e765780601f10611e4d57610100808354040283529160200191611e76565b820191905f5260205f20905b815481529060010190602001808311611e5957829003601f168201915b5050505050815250508152602001600982018054611e9390614bb1565b80601f0160208091040260200160405190810160405280929190818152602001828054611ebf90614bb1565b8015611f0a5780601f10611ee157610100808354040283529160200191611f0a565b820191905f5260205f20905b815481529060010190602001808311611eed57829003601f168201915b50505050508152602001600a82018054611f2390614bb1565b80601f0160208091040260200160405190810160405280929190818152602001828054611f4f90614bb1565b8015611f9a5780601f10611f7157610100808354040283529160200191611f9a565b820191905f5260205f20905b815481529060010190602001808311611f7d57829003601f168201915b50505050508152602001600b82018054611fb390614bb1565b80601f0160208091040260200160405190810160405280929190818152602001828054611fdf90614bb1565b801561202a5780601f106120015761010080835404028352916020019161202a565b820191905f5260205f20905b81548152906001019060200180831161200d57829003601f168201915b50505050508152505090505f61203f82613345565b9050600281600381111561205557612055614365565b14600282909161208357604051634091b18960e11b815260040161207a929190614e30565b60405180910390fd5b505050610180015192915050565b6120996133a0565b61134e81613667565b6120aa613daf565b609a5f6120b6846131ff565b815260208082019290925260409081015f20815160e08101835281546001600160a01b038082168352600160a01b918290046001600160601b03169583019590955260018301549485169382019390935292909160608401910460ff16600281111561212457612124614365565b600281111561213557612135614365565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561217657612176614365565b600181111561218757612187614365565b815260200160018201805461219b90614bb1565b80601f01602080910402602001604051908101604052809291908181526020018280546121c790614bb1565b80156122125780601f106121e957610100808354040283529160200191612212565b820191905f5260205f20905b8154815290600101906020018083116121f557829003601f168201915b505050505081525050815260200160058201805461222f90614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461225b90614bb1565b80156122a65780601f1061227d576101008083540402835291602001916122a6565b820191905f5260205f20905b81548152906001019060200180831161228957829003601f168201915b5050505050815250509050919050565b5f54610100900460ff16158080156122d457505f54600160ff909116105b806122ed5750303b1580156122ed57505f5460ff166001145b6123505760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161207a565b5f805460ff191660011790558015612371575f805461ff0019166101001790555b6123796136e1565b61238161370f565b61238a8461373d565b612393836133fa565b61239c82613667565b80156123e1575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6123ef6133a0565b6123f85f61373d565b565b6124026131a6565b5f83815260986020908152604080832081516101a08101835281546001600160a01b038082168352600160a01b918290046001600160601b03908116968401969096526001840154808216958401959095529381900490941660608201526002820154928316608082015292820463ffffffff1660a0840152600160c01b820461ffff1660c0840152929161288e91849060e0830190600160d01b900460ff1660038111156124b3576124b3614365565b60038111156124c4576124c4614365565b815260028281015460ff600160d81b909104811615156020808501919091526040805160e0810182526003870180546001600160a01b0380821684526001600160601b03600160a01b9283900416958401959095526004890154948516838501529290960195909490936060860193929092049091169081111561254a5761254a614365565b600281111561255b5761255b614365565b815260028201546001600160a01b0316602082015260408051808201825260038401805492909301929091829060ff16600181111561259c5761259c614365565b60018111156125ad576125ad614365565b81526020016001820180546125c190614bb1565b80601f01602080910402602001604051908101604052809291908181526020018280546125ed90614bb1565b80156126385780601f1061260f57610100808354040283529160200191612638565b820191905f5260205f20905b81548152906001019060200180831161261b57829003601f168201915b505050505081525050815260200160058201805461265590614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461268190614bb1565b80156126cc5780601f106126a3576101008083540402835291602001916126cc565b820191905f5260205f20905b8154815290600101906020018083116126af57829003601f168201915b50505050508152505081526020016009820180546126e990614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461271590614bb1565b80156127605780601f1061273757610100808354040283529160200191612760565b820191905f5260205f20905b81548152906001019060200180831161274357829003601f168201915b50505050508152602001600a8201805461277990614bb1565b80601f01602080910402602001604051908101604052809291908181526020018280546127a590614bb1565b80156127f05780601f106127c7576101008083540402835291602001916127f0565b820191905f5260205f20905b8154815290600101906020018083116127d357829003601f168201915b50505050508152602001600b8201805461280990614bb1565b80601f016020809104026020016040519081016040528092919081815260200182805461283590614bb1565b80156128805780601f1061285757610100808354040283529160200191612880565b820191905f5260205f20905b81548152906001019060200180831161286357829003601f168201915b505050505081525050613345565b905060018160038111156128a4576128a4614365565b1460018290916128c957604051634091b18960e11b815260040161207a929190614e30565b50508154600160a01b90046001600160601b031642116128fc5760405163015a4b7560e51b815260040160405180910390fd5b600382015460405163ba33565d60e01b81526001600160a01b039091169063ba33565d90612934903390899089908990600401614e4b565b5f6040518083038186803b15801561294a575f5ffd5b505afa15801561295c573d5f5f3e3d5ffd5b50506040805180820182526001808701546001600160a01b03168252600287015463ffffffff600160a01b91829004166020840152600488015484518086019095526006890180549497505f9650612a7a9560ff9390920483169491939092849216908111156129ce576129ce614365565b60018111156129df576129df614365565b81526020016001820180546129f390614bb1565b80601f0160208091040260200160405190810160405280929190818152602001828054612a1f90614bb1565b8015612a6a5780601f10612a4157610100808354040283529160200191612a6a565b820191905f5260205f20905b815481529060010190602001808311612a4d57829003601f168201915b505050505081525050848961378e565b905080612a9a5760405163efcb98e760e01b815260040160405180910390fd5b60028401805460ff60d01b1916600160d11b179055600a8401612abd8782614d35565b50600b8401612acc8682614d35565b5060048401546001600160a01b031615801590612afc57506001840154600160a01b90046001600160601b031615155b15612bea57600284015460018501545f91612b4a9161271091612b3b91600160c01b90910461ffff1690600160a01b90046001600160601b0316614e83565b612b459190614e9a565b613268565b90506001600160601b03811615612b8a57609b546004860154612b8a916001600160a01b039182169162010000909104166001600160601b038416613a25565b60018501545f90612bac908390600160a01b90046001600160601b0316614eb9565b90506001600160601b03811615612be75760058601546004870154612be7916001600160a01b0391821691166001600160601b038416613a25565b50505b600384015460405163db6ecf6760e01b8152600481018990526001600160a01b039091169063db6ecf67906024015f604051808303815f87803b158015612c2f575f5ffd5b505af1158015612c41573d5f5f3e3d5ffd5b505050600185015460028601546040516001600160a01b039092169250899133917f659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a991612ca69163ffffffff600160a01b9091041690600a8b0190600b8c0190614f57565b60405180910390a4505050506116076001606555565b612cc46131a6565b5f81815260986020526040902060028101546001600160a01b03163314612cfe576040516370f43cb760e01b815260040160405180910390fd5b6002810154600160d81b900460ff1615612d2b57604051633e3d786960e01b815260040160405180910390fd5b604080516101a08101825282546001600160a01b038082168352600160a01b918290046001600160601b03908116602085015260018601548083169585019590955293829004909316606083015260028401549283166080830152820463ffffffff1660a0820152600160c01b820461ffff1660c08201525f91612dcc9190849060e0830190600160d01b900460ff1660038111156124b3576124b3614365565b90506003816003811115612de257612de2614365565b146003829091612e0757604051634091b18960e11b815260040161207a929190614e30565b505060028201805460ff60d81b1916600160d81b17905560048201546001600160a01b031615801590612e4d57506001820154600160a01b90046001600160601b031615155b15612e8957600282015460018301546004840154612e89926001600160a01b0391821692911690600160a01b90046001600160601b0316613a25565b60028201546001830154604051600160a01b9091046001600160601b0316815284916001600160a01b0316907fe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea39060200160405180910390a3505061134e6001606555565b612ef66133a0565b6001600160a01b038116612f5b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161207a565b61134e8161373d565b5f81606001516002811115612f7b57612f7b614365565b03612f995760405163fdea7c0960e01b815260040160405180910390fd5b80516001600160a01b0316612fc157604051630863a45360e11b815260040160405180910390fd5b5f81602001516001600160601b031611612fee5760405163568added60e11b815260040160405180910390fd5b612ffb8160a00151613a55565b61300982826060015161346b565b80609a5f613016856131ff565b815260208082019290925260409081015f208351928401516001600160601b0316600160a01b9081026001600160a01b0394851617825591840151600182018054919094166001600160a01b03198216811785556060860151929492936001600160a81b0319909216179083600281111561309357613093614365565b021790555060808201516002820180546001600160a01b0319166001600160a01b0390921691909117905560a08201518051600383018054909190829060ff1916600183818111156130e7576130e7614365565b0217905550602082015160018201906131009082614d35565b50505060c082015160058201906131179082614d35565b50905050816020015163ffffffff16825f01516001600160a01b0316336001600160a01b03167f7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d28460405161316c91906147a4565b60405180910390a460995f613180846131ff565b815260208101919091526040015f205460ff166131a2576131a2826001613599565b5050565b6002606554036131f85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161207a565b6002606555565b5f815f0151826020015163ffffffff1660405160200161324a92919060609290921b6bffffffffffffffffffffffff1916825260a01b6001600160a01b031916601482015260200190565b60405160208183030381529060405261326290614f87565b92915050565b5f6001600160601b038211156132cf5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201526536206269747360d01b606482015260840161207a565b5090565b6040516001600160a01b03808516602483015283166044820152606481018290526123e19085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613ad7565b6001606555565b5f60018260e00151600381111561335e5761335e614365565b14801561338b575081610120015160200151826020015161337f9190614faa565b6001600160601b031642115b1561339857506003919050565b5060e0015190565b6033546001600160a01b031633146123f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161207a565b6127108161ffff16111561342157604051630601f69760e01b815260040160405180910390fd5b609b805461ffff191661ffff83169081179091556040519081527f886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf9060200160405180910390a150565b5f600282600281111561348057613480614365565b036134ac57507f0000000000000000000000000000000000000000000000000000000000000000613505565b60018260028111156134c0576134c0614365565b036134ec57507f0000000000000000000000000000000000000000000000000000000000000000613505565b60405163fdea7c0960e01b815260040160405180910390fd5b6040516304240c4960e51b815233906001600160a01b03831690638481892090613533908790600401614fc9565b602060405180830381865afa15801561354e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906135729190614fef565b6001600160a01b031614611607576040516342ecfee960e11b815260040160405180910390fd5b8060995f6135a6856131ff565b81526020019081526020015f205f6101000a81548160ff021916908315150217905550816020015163ffffffff16825f01516001600160a01b0316336001600160a01b03167f48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f398460405161361e911515815260200190565b60405180910390a45050565b60605f61363683613baa565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b6001600160a01b03811661368e57604051630863a45360e11b815260040160405180910390fd5b609b805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040517f262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d905f90a250565b5f54610100900460ff166137075760405162461bcd60e51b815260040161207a9061500a565b6123f8613bd1565b5f54610100900460ff166137355760405162461bcd60e51b815260040161207a9061500a565b6123f8613c00565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6001845160018111156137a4576137a4614365565b03613a04575f84602001518060200190518101906137c29190615055565b6040805160018082528183019092529192505f91906020808301908036833701905050905081815f815181106137fa576137fa615070565b61ffff90921660209283029190910190910152600287600281111561382157613821614365565b0361390d575f8480602001905181019061383b91906152e5565b60408101515190915015801590613859575060408101516020015115155b61387657604051637a8a1dbd60e11b815260040160405180910390fd5b604051625f5e5d60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063017d7974906138c5908990859087906004016153f5565b6020604051808303815f875af11580156138e1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139059190615439565b9350506139fd565b600187600281111561392157613921614365565b036134ec575f8480602001905181019061393b9190615454565b90505f8160400151511161396257604051637a8a1dbd60e11b815260040160405180910390fd5b604051630606d12160e51b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c0da2420906139b2908990859087906004016154cd565b5f60405180830381865afa1580156139cc573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526139f391908101906154ff565b5093506139fd9050565b5050613a1d565b6040516347d3772160e11b815260040160405180910390fd5b949350505050565b6040516001600160a01b03831660248201526044810182905261160790849063a9059cbb60e01b90606401613307565b600181516001811115613a6a57613a6a614365565b03613a0457806020015151602014613a9557604051631501e04760e21b815260040160405180910390fd5b5f8160200151806020019051810190613aae9190615055565b90506127108161ffff1611156131a257604051631501e04760e21b815260040160405180910390fd5b5f613b2b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613c269092919063ffffffff16565b905080515f1480613b4b575080806020019051810190613b4b9190615439565b6116075760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161207a565b5f60ff8216601f81111561326257604051632cd44ac360e21b815260040160405180910390fd5b5f54610100900460ff16613bf75760405162461bcd60e51b815260040161207a9061500a565b6123f83361373d565b5f54610100900460ff1661333e5760405162461bcd60e51b815260040161207a9061500a565b6060613a1d84845f85855f5f866001600160a01b03168587604051613c4b91906155ae565b5f6040518083038185875af1925050503d805f8114613c85576040519150601f19603f3d011682016040523d82523d5f602084013e613c8a565b606091505b5091509150613c9b87838387613ca6565b979650505050505050565b60608315613d145782515f03613d0d576001600160a01b0385163b613d0d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161207a565b5081613a1d565b613a1d8383815115613d295781518083602001fd5b8060405162461bcd60e51b815260040161207a9190614011565b604080516101a0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290529060e082019081525f6020820152604001613d94613daf565b81526020016060815260200160608152602001606081525090565b6040805160e0810182525f8082526020820181905291810182905290606082019081525f6020820152604001613de3613df0565b8152602001606081525090565b60408051808201909152805f613de3565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715613e3757613e37613e01565b60405290565b604080519081016001600160401b0381118282101715613e3757613e37613e01565b60405160a081016001600160401b0381118282101715613e3757613e37613e01565b60405160e081016001600160401b0381118282101715613e3757613e37613e01565b604051601f8201601f191681016001600160401b0381118282101715613ecb57613ecb613e01565b604052919050565b63ffffffff8116811461134e575f5ffd5b5f6001600160401b03821115613efc57613efc613e01565b50601f01601f191660200190565b5f82601f830112613f19575f5ffd5b8135613f2c613f2782613ee4565b613ea3565b818152846020838601011115613f40575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215613f6c575f5ffd5b81356001600160401b03811115613f81575f5ffd5b820160608185031215613f92575f5ffd5b613f9a613e15565b8135613fa581613ed3565b81526020828101359082015260408201356001600160401b03811115613fc9575f5ffd5b613fd586828501613f0a565b604083015250949350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6113366020830184613fe3565b5f60408284031215614033575f5ffd5b61403b613e3d565b823581526020928301359281019290925250919050565b5f82601f830112614061575f5ffd5b61406b6040613ea3565b80604084018581111561407c575f5ffd5b845b8181101561409657803584526020938401930161407e565b509095945050505050565b5f6001600160401b038211156140b9576140b9613e01565b5060051b60200190565b5f82601f8301126140d2575f5ffd5b81356140e0613f27826140a1565b8082825260208201915060208360051b860101925085831115614101575f5ffd5b602085015b838110156142645780356001600160401b03811115614123575f5ffd5b86016060818903601f19011215614138575f5ffd5b614140613e15565b602082013561414e81613ed3565b815260408201356001600160401b03811115614168575f5ffd5b6141778a602083860101613f0a565b60208301525060608201356001600160401b03811115614195575f5ffd5b6020818401019250506060828a0312156141ad575f5ffd5b6141b5613e3d565b6141bf8a84614023565b815260408301356001600160401b038111156141d9575f5ffd5b80840193505089601f8401126141ed575f5ffd5b82356141fb613f27826140a1565b8082825260208201915060208360051b87010192508c83111561421c575f5ffd5b6020860195505b8286101561423e578535825260209586019590910190614223565b806020850152505050806040830152508085525050602083019250602081019050614106565b5095945050505050565b5f6020828403121561427e575f5ffd5b81356001600160401b03811115614293575f5ffd5b82018084036101208112156142a6575f5ffd5b6142ae613e5f565b82356142b981613ed3565b8152602083810135908201526142d28660408501614023565b60408201526080607f19830112156142e8575f5ffd5b6142f0613e3d565b91506142ff8660808501614052565b825261430e8660c08501614052565b602083015281606082015261010083013591506001600160401b03821115614334575f5ffd5b614340868385016140c3565b608082015295945050505050565b5f6020828403121561435e575f5ffd5b5035919050565b634e487b7160e01b5f52602160045260245ffd5b6003811061438957614389614365565b9052565b5f8151600281106143a0576143a0614365565b80845250602082015160406020850152613a1d6040850182613fe3565b6001600160a01b0388811682526001600160601b0388166020830152861660408201526143ed6060820186614379565b6001600160a01b038416608082015260e060a082018190525f906144139083018561438d565b82810360c08401526144258185613fe3565b9a9950505050505050505050565b6001600160a01b038116811461134e575f5ffd5b8035610ea481614433565b5f60408284031215614462575f5ffd5b61446a613e3d565b9050813561447781614433565b8152602082013561448781613ed3565b602082015292915050565b5f602082840312156144a2575f5ffd5b81356001600160401b038111156144b7575f5ffd5b8201608081850312156144c8575f5ffd5b6144d0613e15565b81356144db81614433565b81526144ea8560208401614452565b602082015260608201356001600160401b03811115613fc9575f5ffd5b6004811061438957614389614365565b602081016132628284614507565b61ffff8116811461134e575f5ffd5b5f60208284031215614544575f5ffd5b813561133681614525565b801515811461134e575f5ffd5b5f5f6060838503121561456d575f5ffd5b6145778484614452565b915060408301356145878161454f565b809150509250929050565b80516001600160a01b031682526020808201516001600160601b0316908301526040808201515f916145ce908501826001600160a01b03169052565b5060608201516145e16060850182614379565b5060808201516145fc60808501826001600160a01b03169052565b5060a082015160e060a085015261461660e085018261438d565b905060c083015184820360c086015261462f8282613fe3565b95945050505050565b602081526146526020820183516001600160a01b03169052565b5f602083015161466d60408401826001600160601b03169052565b5060408301516001600160a01b03811660608401525060608301516001600160601b03811660808401525060808301516001600160a01b03811660a08401525060a083015163ffffffff811660c08401525060c083015161ffff811660e08401525060e08301516146e2610100840182614507565b50610100830151801515610120840152506101208301516101a06101408401526147106101c0840182614592565b9050610140840151601f198483030161016085015261472f8282613fe3565b915050610160840151601f198483030161018085015261474f8282613fe3565b915050610180840151601f19848303016101a085015261462f8282613fe3565b5f6020828403121561477f575f5ffd5b813561133681614433565b5f6040828403121561479a575f5ffd5b6113368383614452565b602081525f6113366020830184614592565b5f5f5f606084860312156147c8575f5ffd5b83356147d381614433565b925060208401356147e381614525565b915060408401356147f381614433565b809150509250925092565b5f5f5f60608486031215614810575f5ffd5b8335925060208401356001600160401b0381111561482c575f5ffd5b61483886828701613f0a565b92505060408401356001600160401b03811115614853575f5ffd5b61485f86828701613f0a565b9150509250925092565b6001600160601b038116811461134e575f5ffd5b8035610ea481614869565b803560038110610ea4575f5ffd5b5f604082840312156148a6575f5ffd5b6148ae613e3d565b90508135600281106148be575f5ffd5b815260208201356001600160401b038111156148d8575f5ffd5b6148e484828501613f0a565b60208301525092915050565b5f5f60608385031215614901575f5ffd5b61490b8484614452565b915060408301356001600160401b03811115614925575f5ffd5b830160e08186031215614936575f5ffd5b61493e613e81565b61494782614447565b81526149556020830161487d565b602082015261496660408301614447565b604082015261497760608301614888565b606082015261498860808301614447565b608082015260a08201356001600160401b038111156149a5575f5ffd5b6149b187828501614896565b60a08301525060c08201356001600160401b038111156149cf575f5ffd5b6149db87828501613f0a565b60c08301525080925050509250929050565b63ffffffff8151168252602081015160208301525f604082015160606040850152613a1d6060850182613fe3565b602081525f61133660208301846149ed565b805f5b60028110156123e1578151845260209384019390910190600101614a30565b5f610120830163ffffffff8351168452602083015160208501526040830151614a85604086018280518252602090810151910152565b506060830151614a99608086018251614a2d565b60200151614aaa60c0860182614a2d565b506080830151610120610100860152818151808452610140870191506101408160051b88010193506020830192505f5b81811015614b935761013f19888603018352835163ffffffff8151168652602081015160606020880152614b116060880182613fe3565b905060408201519150868103604088015260608101614b3b82845180518252602090810151910152565b6020928301516060604084015280518083529301925f92608001905b80841015614b7a5784518252602082019150602085019450600184019350614b57565b5097505050602094850194939093019250600101614ada565b50929695505050505050565b602081525f6113366020830184614a4f565b600181811c90821680614bc557607f821691505b602082108103614be357634e487b7160e01b5f52602260045260245ffd5b50919050565b80516001600160a01b031682526020808201515f91614c239085018280516001600160a01b0316825260209081015163ffffffff16910152565b50604082015160806060850152613a1d6080850182613fe3565b6001600160a01b03831681526040602082018190525f90613a1d90830184614be9565b602081525f6113366020830184614be9565b5f60208284031215614c82575f5ffd5b815161133681614869565b84815260018060a01b0384166020820152826040820152608060608201525f614cb96080830184614be9565b9695505050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561326257613262614cc3565b601f82111561160757805f5260205f20601f840160051c81016020851015614d0f5750805b601f840160051c820191505b81811015614d2e575f8155600101614d1b565b5050505050565b81516001600160401b03811115614d4e57614d4e613e01565b614d6281614d5c8454614bb1565b84614cea565b6020601f821160018114614d94575f8315614d7d5750848201515b5f19600385901b1c1916600184901b178455614d2e565b5f84815260208120601f198516915b82811015614dc35787850151825560209485019460019092019101614da3565b5084821015614de057868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b63ffffffff8616815260018060a01b03851660208201526001600160601b038416604082015282606082015260a060808201525f613c9b60a0830184613fe3565b60408101614e3e8285614507565b6113366020830184614507565b60018060a01b0385168152836020820152608060408201525f614e716080830185613fe3565b8281036060840152613c9b8185613fe3565b808202811582820484141761326257613262614cc3565b5f82614eb457634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160601b03828116828216039081111561326257613262614cc3565b5f8154614ee481614bb1565b808552600182168015614efe5760018114614f1a57614f4e565b60ff1983166020870152602082151560051b8701019350614f4e565b845f5260205f205f5b83811015614f455781546020828a010152600182019150602081019050614f23565b87016020019450505b50505092915050565b63ffffffff84168152606060208201525f614f756060830185614ed8565b8281036040840152614cb98185614ed8565b80516020808301519190811015614be3575f1960209190910360031b1b16919050565b6001600160601b03818116838216019081111561326257613262614cc3565b81516001600160a01b0316815260208083015163ffffffff169082015260408101613262565b5f60208284031215614fff575f5ffd5b815161133681614433565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b5f60208284031215615065575f5ffd5b815161133681614525565b634e487b7160e01b5f52603260045260245ffd5b5f60408284031215615094575f5ffd5b61509c613e3d565b825181526020928301519281019290925250919050565b5f82601f8301126150c2575f5ffd5b6150cc6040613ea3565b8060408401858111156150dd575f5ffd5b845b818110156140965780518452602093840193016150df565b5f82601f830112615106575f5ffd5b8151615114613f2782613ee4565b818152846020838601011115615128575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f82601f830112615153575f5ffd5b8151615161613f27826140a1565b8082825260208201915060208360051b860101925085831115615182575f5ffd5b602085015b838110156142645780516001600160401b038111156151a4575f5ffd5b86016060818903601f190112156151b9575f5ffd5b6151c1613e15565b60208201516151cf81613ed3565b815260408201516001600160401b038111156151e9575f5ffd5b6151f88a6020838601016150f7565b60208301525060608201516001600160401b03811115615216575f5ffd5b6020818401019250506060828a03121561522e575f5ffd5b615236613e3d565b6152408a84615084565b815260408301516001600160401b0381111561525a575f5ffd5b80840193505089601f84011261526e575f5ffd5b825161527c613f27826140a1565b8082825260208201915060208360051b87010192508c83111561529d575f5ffd5b6020860195505b828610156152bf5785518252602095860195909101906152a4565b806020850152505050806040830152508085525050602083019250602081019050615187565b5f602082840312156152f5575f5ffd5b81516001600160401b0381111561530a575f5ffd5b820180840361012081121561531d575f5ffd5b615325613e5f565b825161533081613ed3565b8152602083810151908201526153498660408501615084565b60408201526080607f198301121561535f575f5ffd5b615367613e3d565b915061537686608085016150b3565b82526153858660c085016150b3565b602083015281606082015261010083015191506001600160401b038211156153ab575f5ffd5b61434086838501615144565b5f8151808452602084019350602083015f5b828110156153eb57815161ffff168652602095860195909101906001016153c9565b5093949350505050565b83516001600160a01b0316815260208085015163ffffffff1690820152608060408201525f6154276080830185614a4f565b8281036060840152614cb981856153b7565b5f60208284031215615449575f5ffd5b81516113368161454f565b5f60208284031215615464575f5ffd5b81516001600160401b03811115615479575f5ffd5b82016060818503121561548a575f5ffd5b615492613e15565b815161549d81613ed3565b81526020828101519082015260408201516001600160401b038111156154c1575f5ffd5b613fd5868285016150f7565b83516001600160a01b0316815260208085015163ffffffff1690820152608060408201525f61542760808301856149ed565b5f5f60408385031215615510575f5ffd5b825161551b8161454f565b60208401519092506001600160401b03811115615536575f5ffd5b8301601f81018513615546575f5ffd5b8051615554613f27826140a1565b8082825260208201915060208360051b850101925087831115615575575f5ffd5b6020840193505b828410156155a057835161558f81614433565b82526020938401939091019061557c565b809450505050509250929050565b5f82518060208501845e5f92019182525091905056fea2646970667358221220084d2c54e2947819ff9c81f7c2d549499d4abc859fb04936c2d83d18118a51f064736f6c634300081b0033", +} + +// TaskMailboxABI is the input ABI used to generate the binding from. +// Deprecated: Use TaskMailboxMetaData.ABI instead. +var TaskMailboxABI = TaskMailboxMetaData.ABI + +// TaskMailboxBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use TaskMailboxMetaData.Bin instead. +var TaskMailboxBin = TaskMailboxMetaData.Bin + +// DeployTaskMailbox deploys a new Ethereum contract, binding an instance of TaskMailbox to it. +func DeployTaskMailbox(auth *bind.TransactOpts, backend bind.ContractBackend, _bn254CertificateVerifier common.Address, _ecdsaCertificateVerifier common.Address, _version string) (common.Address, *types.Transaction, *TaskMailbox, error) { + parsed, err := TaskMailboxMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(TaskMailboxBin), backend, _bn254CertificateVerifier, _ecdsaCertificateVerifier, _version) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &TaskMailbox{TaskMailboxCaller: TaskMailboxCaller{contract: contract}, TaskMailboxTransactor: TaskMailboxTransactor{contract: contract}, TaskMailboxFilterer: TaskMailboxFilterer{contract: contract}}, nil +} + +// TaskMailbox is an auto generated Go binding around an Ethereum contract. +type TaskMailbox struct { + TaskMailboxCaller // Read-only binding to the contract + TaskMailboxTransactor // Write-only binding to the contract + TaskMailboxFilterer // Log filterer for contract events +} + +// TaskMailboxCaller is an auto generated read-only Go binding around an Ethereum contract. +type TaskMailboxCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaskMailboxTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TaskMailboxTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaskMailboxFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TaskMailboxFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaskMailboxSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TaskMailboxSession struct { + Contract *TaskMailbox // 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 +} + +// TaskMailboxCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TaskMailboxCallerSession struct { + Contract *TaskMailboxCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TaskMailboxTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TaskMailboxTransactorSession struct { + Contract *TaskMailboxTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TaskMailboxRaw is an auto generated low-level Go binding around an Ethereum contract. +type TaskMailboxRaw struct { + Contract *TaskMailbox // Generic contract binding to access the raw methods on +} + +// TaskMailboxCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TaskMailboxCallerRaw struct { + Contract *TaskMailboxCaller // Generic read-only contract binding to access the raw methods on +} + +// TaskMailboxTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TaskMailboxTransactorRaw struct { + Contract *TaskMailboxTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTaskMailbox creates a new instance of TaskMailbox, bound to a specific deployed contract. +func NewTaskMailbox(address common.Address, backend bind.ContractBackend) (*TaskMailbox, error) { + contract, err := bindTaskMailbox(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TaskMailbox{TaskMailboxCaller: TaskMailboxCaller{contract: contract}, TaskMailboxTransactor: TaskMailboxTransactor{contract: contract}, TaskMailboxFilterer: TaskMailboxFilterer{contract: contract}}, nil +} + +// NewTaskMailboxCaller creates a new read-only instance of TaskMailbox, bound to a specific deployed contract. +func NewTaskMailboxCaller(address common.Address, caller bind.ContractCaller) (*TaskMailboxCaller, error) { + contract, err := bindTaskMailbox(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TaskMailboxCaller{contract: contract}, nil +} + +// NewTaskMailboxTransactor creates a new write-only instance of TaskMailbox, bound to a specific deployed contract. +func NewTaskMailboxTransactor(address common.Address, transactor bind.ContractTransactor) (*TaskMailboxTransactor, error) { + contract, err := bindTaskMailbox(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TaskMailboxTransactor{contract: contract}, nil +} + +// NewTaskMailboxFilterer creates a new log filterer instance of TaskMailbox, bound to a specific deployed contract. +func NewTaskMailboxFilterer(address common.Address, filterer bind.ContractFilterer) (*TaskMailboxFilterer, error) { + contract, err := bindTaskMailbox(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TaskMailboxFilterer{contract: contract}, nil +} + +// bindTaskMailbox binds a generic wrapper to an already deployed contract. +func bindTaskMailbox(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TaskMailboxMetaData.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 (_TaskMailbox *TaskMailboxRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaskMailbox.Contract.TaskMailboxCaller.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 (_TaskMailbox *TaskMailboxRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaskMailbox.Contract.TaskMailboxTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TaskMailbox *TaskMailboxRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaskMailbox.Contract.TaskMailboxTransactor.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 (_TaskMailbox *TaskMailboxCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaskMailbox.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 (_TaskMailbox *TaskMailboxTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaskMailbox.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TaskMailbox *TaskMailboxTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaskMailbox.Contract.contract.Transact(opts, method, params...) +} + +// BN254CERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0xf7424fc9. +// +// Solidity: function BN254_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailbox *TaskMailboxCaller) BN254CERTIFICATEVERIFIER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "BN254_CERTIFICATE_VERIFIER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BN254CERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0xf7424fc9. +// +// Solidity: function BN254_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailbox *TaskMailboxSession) BN254CERTIFICATEVERIFIER() (common.Address, error) { + return _TaskMailbox.Contract.BN254CERTIFICATEVERIFIER(&_TaskMailbox.CallOpts) +} + +// BN254CERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0xf7424fc9. +// +// Solidity: function BN254_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailbox *TaskMailboxCallerSession) BN254CERTIFICATEVERIFIER() (common.Address, error) { + return _TaskMailbox.Contract.BN254CERTIFICATEVERIFIER(&_TaskMailbox.CallOpts) +} + +// ECDSACERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0x54743ad2. +// +// Solidity: function ECDSA_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailbox *TaskMailboxCaller) ECDSACERTIFICATEVERIFIER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "ECDSA_CERTIFICATE_VERIFIER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ECDSACERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0x54743ad2. +// +// Solidity: function ECDSA_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailbox *TaskMailboxSession) ECDSACERTIFICATEVERIFIER() (common.Address, error) { + return _TaskMailbox.Contract.ECDSACERTIFICATEVERIFIER(&_TaskMailbox.CallOpts) +} + +// ECDSACERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0x54743ad2. +// +// Solidity: function ECDSA_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailbox *TaskMailboxCallerSession) ECDSACERTIFICATEVERIFIER() (common.Address, error) { + return _TaskMailbox.Contract.ECDSACERTIFICATEVERIFIER(&_TaskMailbox.CallOpts) +} + +// ExecutorOperatorSetTaskConfigs is a free data retrieval call binding the contract method 0x1c7edb17. +// +// Solidity: function executorOperatorSetTaskConfigs(bytes32 operatorSetKey) view returns(address taskHook, uint96 taskSLA, address feeToken, uint8 curveType, address feeCollector, (uint8,bytes) consensus, bytes taskMetadata) +func (_TaskMailbox *TaskMailboxCaller) ExecutorOperatorSetTaskConfigs(opts *bind.CallOpts, operatorSetKey [32]byte) (struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +}, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "executorOperatorSetTaskConfigs", operatorSetKey) + + outstruct := new(struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte + }) + if err != nil { + return *outstruct, err + } + + outstruct.TaskHook = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.TaskSLA = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.FeeToken = *abi.ConvertType(out[2], new(common.Address)).(*common.Address) + outstruct.CurveType = *abi.ConvertType(out[3], new(uint8)).(*uint8) + outstruct.FeeCollector = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) + outstruct.Consensus = *abi.ConvertType(out[5], new(ITaskMailboxTypesConsensus)).(*ITaskMailboxTypesConsensus) + outstruct.TaskMetadata = *abi.ConvertType(out[6], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +// ExecutorOperatorSetTaskConfigs is a free data retrieval call binding the contract method 0x1c7edb17. +// +// Solidity: function executorOperatorSetTaskConfigs(bytes32 operatorSetKey) view returns(address taskHook, uint96 taskSLA, address feeToken, uint8 curveType, address feeCollector, (uint8,bytes) consensus, bytes taskMetadata) +func (_TaskMailbox *TaskMailboxSession) ExecutorOperatorSetTaskConfigs(operatorSetKey [32]byte) (struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +}, error) { + return _TaskMailbox.Contract.ExecutorOperatorSetTaskConfigs(&_TaskMailbox.CallOpts, operatorSetKey) +} + +// ExecutorOperatorSetTaskConfigs is a free data retrieval call binding the contract method 0x1c7edb17. +// +// Solidity: function executorOperatorSetTaskConfigs(bytes32 operatorSetKey) view returns(address taskHook, uint96 taskSLA, address feeToken, uint8 curveType, address feeCollector, (uint8,bytes) consensus, bytes taskMetadata) +func (_TaskMailbox *TaskMailboxCallerSession) ExecutorOperatorSetTaskConfigs(operatorSetKey [32]byte) (struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +}, error) { + return _TaskMailbox.Contract.ExecutorOperatorSetTaskConfigs(&_TaskMailbox.CallOpts, operatorSetKey) +} + +// FeeSplit is a free data retrieval call binding the contract method 0x6373ea69. +// +// Solidity: function feeSplit() view returns(uint16) +func (_TaskMailbox *TaskMailboxCaller) FeeSplit(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "feeSplit") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// FeeSplit is a free data retrieval call binding the contract method 0x6373ea69. +// +// Solidity: function feeSplit() view returns(uint16) +func (_TaskMailbox *TaskMailboxSession) FeeSplit() (uint16, error) { + return _TaskMailbox.Contract.FeeSplit(&_TaskMailbox.CallOpts) +} + +// FeeSplit is a free data retrieval call binding the contract method 0x6373ea69. +// +// Solidity: function feeSplit() view returns(uint16) +func (_TaskMailbox *TaskMailboxCallerSession) FeeSplit() (uint16, error) { + return _TaskMailbox.Contract.FeeSplit(&_TaskMailbox.CallOpts) +} + +// FeeSplitCollector is a free data retrieval call binding the contract method 0x1a20c505. +// +// Solidity: function feeSplitCollector() view returns(address) +func (_TaskMailbox *TaskMailboxCaller) FeeSplitCollector(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "feeSplitCollector") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeSplitCollector is a free data retrieval call binding the contract method 0x1a20c505. +// +// Solidity: function feeSplitCollector() view returns(address) +func (_TaskMailbox *TaskMailboxSession) FeeSplitCollector() (common.Address, error) { + return _TaskMailbox.Contract.FeeSplitCollector(&_TaskMailbox.CallOpts) +} + +// FeeSplitCollector is a free data retrieval call binding the contract method 0x1a20c505. +// +// Solidity: function feeSplitCollector() view returns(address) +func (_TaskMailbox *TaskMailboxCallerSession) FeeSplitCollector() (common.Address, error) { + return _TaskMailbox.Contract.FeeSplitCollector(&_TaskMailbox.CallOpts) +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_TaskMailbox *TaskMailboxCaller) GetBN254CertificateBytes(opts *bind.CallOpts, cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "getBN254CertificateBytes", cert) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_TaskMailbox *TaskMailboxSession) GetBN254CertificateBytes(cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + return _TaskMailbox.Contract.GetBN254CertificateBytes(&_TaskMailbox.CallOpts, cert) +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_TaskMailbox *TaskMailboxCallerSession) GetBN254CertificateBytes(cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + return _TaskMailbox.Contract.GetBN254CertificateBytes(&_TaskMailbox.CallOpts, cert) +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_TaskMailbox *TaskMailboxCaller) GetECDSACertificateBytes(opts *bind.CallOpts, cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "getECDSACertificateBytes", cert) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_TaskMailbox *TaskMailboxSession) GetECDSACertificateBytes(cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + return _TaskMailbox.Contract.GetECDSACertificateBytes(&_TaskMailbox.CallOpts, cert) +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_TaskMailbox *TaskMailboxCallerSession) GetECDSACertificateBytes(cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + return _TaskMailbox.Contract.GetECDSACertificateBytes(&_TaskMailbox.CallOpts, cert) +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_TaskMailbox *TaskMailboxCaller) GetExecutorOperatorSetTaskConfig(opts *bind.CallOpts, operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "getExecutorOperatorSetTaskConfig", operatorSet) + + if err != nil { + return *new(ITaskMailboxTypesExecutorOperatorSetTaskConfig), err + } + + out0 := *abi.ConvertType(out[0], new(ITaskMailboxTypesExecutorOperatorSetTaskConfig)).(*ITaskMailboxTypesExecutorOperatorSetTaskConfig) + + return out0, err + +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_TaskMailbox *TaskMailboxSession) GetExecutorOperatorSetTaskConfig(operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + return _TaskMailbox.Contract.GetExecutorOperatorSetTaskConfig(&_TaskMailbox.CallOpts, operatorSet) +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_TaskMailbox *TaskMailboxCallerSession) GetExecutorOperatorSetTaskConfig(operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + return _TaskMailbox.Contract.GetExecutorOperatorSetTaskConfig(&_TaskMailbox.CallOpts, operatorSet) +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_TaskMailbox *TaskMailboxCaller) GetFeeSplit(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "getFeeSplit") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_TaskMailbox *TaskMailboxSession) GetFeeSplit() (uint16, error) { + return _TaskMailbox.Contract.GetFeeSplit(&_TaskMailbox.CallOpts) +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_TaskMailbox *TaskMailboxCallerSession) GetFeeSplit() (uint16, error) { + return _TaskMailbox.Contract.GetFeeSplit(&_TaskMailbox.CallOpts) +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_TaskMailbox *TaskMailboxCaller) GetFeeSplitCollector(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "getFeeSplitCollector") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_TaskMailbox *TaskMailboxSession) GetFeeSplitCollector() (common.Address, error) { + return _TaskMailbox.Contract.GetFeeSplitCollector(&_TaskMailbox.CallOpts) +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_TaskMailbox *TaskMailboxCallerSession) GetFeeSplitCollector() (common.Address, error) { + return _TaskMailbox.Contract.GetFeeSplitCollector(&_TaskMailbox.CallOpts) +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_TaskMailbox *TaskMailboxCaller) GetTaskInfo(opts *bind.CallOpts, taskHash [32]byte) (ITaskMailboxTypesTask, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "getTaskInfo", taskHash) + + if err != nil { + return *new(ITaskMailboxTypesTask), err + } + + out0 := *abi.ConvertType(out[0], new(ITaskMailboxTypesTask)).(*ITaskMailboxTypesTask) + + return out0, err + +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_TaskMailbox *TaskMailboxSession) GetTaskInfo(taskHash [32]byte) (ITaskMailboxTypesTask, error) { + return _TaskMailbox.Contract.GetTaskInfo(&_TaskMailbox.CallOpts, taskHash) +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_TaskMailbox *TaskMailboxCallerSession) GetTaskInfo(taskHash [32]byte) (ITaskMailboxTypesTask, error) { + return _TaskMailbox.Contract.GetTaskInfo(&_TaskMailbox.CallOpts, taskHash) +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_TaskMailbox *TaskMailboxCaller) GetTaskResult(opts *bind.CallOpts, taskHash [32]byte) ([]byte, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "getTaskResult", taskHash) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_TaskMailbox *TaskMailboxSession) GetTaskResult(taskHash [32]byte) ([]byte, error) { + return _TaskMailbox.Contract.GetTaskResult(&_TaskMailbox.CallOpts, taskHash) +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_TaskMailbox *TaskMailboxCallerSession) GetTaskResult(taskHash [32]byte) ([]byte, error) { + return _TaskMailbox.Contract.GetTaskResult(&_TaskMailbox.CallOpts, taskHash) +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_TaskMailbox *TaskMailboxCaller) GetTaskStatus(opts *bind.CallOpts, taskHash [32]byte) (uint8, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "getTaskStatus", taskHash) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_TaskMailbox *TaskMailboxSession) GetTaskStatus(taskHash [32]byte) (uint8, error) { + return _TaskMailbox.Contract.GetTaskStatus(&_TaskMailbox.CallOpts, taskHash) +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_TaskMailbox *TaskMailboxCallerSession) GetTaskStatus(taskHash [32]byte) (uint8, error) { + return _TaskMailbox.Contract.GetTaskStatus(&_TaskMailbox.CallOpts, taskHash) +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool isRegistered) +func (_TaskMailbox *TaskMailboxCaller) IsExecutorOperatorSetRegistered(opts *bind.CallOpts, operatorSetKey [32]byte) (bool, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "isExecutorOperatorSetRegistered", operatorSetKey) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool isRegistered) +func (_TaskMailbox *TaskMailboxSession) IsExecutorOperatorSetRegistered(operatorSetKey [32]byte) (bool, error) { + return _TaskMailbox.Contract.IsExecutorOperatorSetRegistered(&_TaskMailbox.CallOpts, operatorSetKey) +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool isRegistered) +func (_TaskMailbox *TaskMailboxCallerSession) IsExecutorOperatorSetRegistered(operatorSetKey [32]byte) (bool, error) { + return _TaskMailbox.Contract.IsExecutorOperatorSetRegistered(&_TaskMailbox.CallOpts, operatorSetKey) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaskMailbox *TaskMailboxCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailbox.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaskMailbox *TaskMailboxSession) Owner() (common.Address, error) { + return _TaskMailbox.Contract.Owner(&_TaskMailbox.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TaskMailbox *TaskMailboxCallerSession) Owner() (common.Address, error) { + return _TaskMailbox.Contract.Owner(&_TaskMailbox.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_TaskMailbox *TaskMailboxCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _TaskMailbox.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 (_TaskMailbox *TaskMailboxSession) Version() (string, error) { + return _TaskMailbox.Contract.Version(&_TaskMailbox.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_TaskMailbox *TaskMailboxCallerSession) Version() (string, error) { + return _TaskMailbox.Contract.Version(&_TaskMailbox.CallOpts) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32) +func (_TaskMailbox *TaskMailboxTransactor) CreateTask(opts *bind.TransactOpts, taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "createTask", taskParams) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32) +func (_TaskMailbox *TaskMailboxSession) CreateTask(taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _TaskMailbox.Contract.CreateTask(&_TaskMailbox.TransactOpts, taskParams) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32) +func (_TaskMailbox *TaskMailboxTransactorSession) CreateTask(taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _TaskMailbox.Contract.CreateTask(&_TaskMailbox.TransactOpts, taskParams) +} + +// Initialize is a paid mutator transaction binding the contract method 0x708c0db9. +// +// Solidity: function initialize(address _owner, uint16 _feeSplit, address _feeSplitCollector) returns() +func (_TaskMailbox *TaskMailboxTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address, _feeSplit uint16, _feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "initialize", _owner, _feeSplit, _feeSplitCollector) +} + +// Initialize is a paid mutator transaction binding the contract method 0x708c0db9. +// +// Solidity: function initialize(address _owner, uint16 _feeSplit, address _feeSplitCollector) returns() +func (_TaskMailbox *TaskMailboxSession) Initialize(_owner common.Address, _feeSplit uint16, _feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailbox.Contract.Initialize(&_TaskMailbox.TransactOpts, _owner, _feeSplit, _feeSplitCollector) +} + +// Initialize is a paid mutator transaction binding the contract method 0x708c0db9. +// +// Solidity: function initialize(address _owner, uint16 _feeSplit, address _feeSplitCollector) returns() +func (_TaskMailbox *TaskMailboxTransactorSession) Initialize(_owner common.Address, _feeSplit uint16, _feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailbox.Contract.Initialize(&_TaskMailbox.TransactOpts, _owner, _feeSplit, _feeSplitCollector) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_TaskMailbox *TaskMailboxTransactor) RefundFee(opts *bind.TransactOpts, taskHash [32]byte) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "refundFee", taskHash) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_TaskMailbox *TaskMailboxSession) RefundFee(taskHash [32]byte) (*types.Transaction, error) { + return _TaskMailbox.Contract.RefundFee(&_TaskMailbox.TransactOpts, taskHash) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_TaskMailbox *TaskMailboxTransactorSession) RefundFee(taskHash [32]byte) (*types.Transaction, error) { + return _TaskMailbox.Contract.RefundFee(&_TaskMailbox.TransactOpts, taskHash) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_TaskMailbox *TaskMailboxTransactor) RegisterExecutorOperatorSet(opts *bind.TransactOpts, operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "registerExecutorOperatorSet", operatorSet, isRegistered) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_TaskMailbox *TaskMailboxSession) RegisterExecutorOperatorSet(operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _TaskMailbox.Contract.RegisterExecutorOperatorSet(&_TaskMailbox.TransactOpts, operatorSet, isRegistered) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_TaskMailbox *TaskMailboxTransactorSession) RegisterExecutorOperatorSet(operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _TaskMailbox.Contract.RegisterExecutorOperatorSet(&_TaskMailbox.TransactOpts, operatorSet, isRegistered) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaskMailbox *TaskMailboxTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaskMailbox *TaskMailboxSession) RenounceOwnership() (*types.Transaction, error) { + return _TaskMailbox.Contract.RenounceOwnership(&_TaskMailbox.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TaskMailbox *TaskMailboxTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _TaskMailbox.Contract.RenounceOwnership(&_TaskMailbox.TransactOpts) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_TaskMailbox *TaskMailboxTransactor) SetExecutorOperatorSetTaskConfig(opts *bind.TransactOpts, operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "setExecutorOperatorSetTaskConfig", operatorSet, config) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_TaskMailbox *TaskMailboxSession) SetExecutorOperatorSetTaskConfig(operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _TaskMailbox.Contract.SetExecutorOperatorSetTaskConfig(&_TaskMailbox.TransactOpts, operatorSet, config) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_TaskMailbox *TaskMailboxTransactorSession) SetExecutorOperatorSetTaskConfig(operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _TaskMailbox.Contract.SetExecutorOperatorSetTaskConfig(&_TaskMailbox.TransactOpts, operatorSet, config) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_TaskMailbox *TaskMailboxTransactor) SetFeeSplit(opts *bind.TransactOpts, _feeSplit uint16) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "setFeeSplit", _feeSplit) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_TaskMailbox *TaskMailboxSession) SetFeeSplit(_feeSplit uint16) (*types.Transaction, error) { + return _TaskMailbox.Contract.SetFeeSplit(&_TaskMailbox.TransactOpts, _feeSplit) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_TaskMailbox *TaskMailboxTransactorSession) SetFeeSplit(_feeSplit uint16) (*types.Transaction, error) { + return _TaskMailbox.Contract.SetFeeSplit(&_TaskMailbox.TransactOpts, _feeSplit) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_TaskMailbox *TaskMailboxTransactor) SetFeeSplitCollector(opts *bind.TransactOpts, _feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "setFeeSplitCollector", _feeSplitCollector) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_TaskMailbox *TaskMailboxSession) SetFeeSplitCollector(_feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailbox.Contract.SetFeeSplitCollector(&_TaskMailbox.TransactOpts, _feeSplitCollector) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_TaskMailbox *TaskMailboxTransactorSession) SetFeeSplitCollector(_feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailbox.Contract.SetFeeSplitCollector(&_TaskMailbox.TransactOpts, _feeSplitCollector) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_TaskMailbox *TaskMailboxTransactor) SubmitResult(opts *bind.TransactOpts, taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "submitResult", taskHash, executorCert, result) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_TaskMailbox *TaskMailboxSession) SubmitResult(taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _TaskMailbox.Contract.SubmitResult(&_TaskMailbox.TransactOpts, taskHash, executorCert, result) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_TaskMailbox *TaskMailboxTransactorSession) SubmitResult(taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _TaskMailbox.Contract.SubmitResult(&_TaskMailbox.TransactOpts, taskHash, executorCert, result) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaskMailbox *TaskMailboxTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _TaskMailbox.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaskMailbox *TaskMailboxSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TaskMailbox.Contract.TransferOwnership(&_TaskMailbox.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TaskMailbox *TaskMailboxTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TaskMailbox.Contract.TransferOwnership(&_TaskMailbox.TransactOpts, newOwner) +} + +// TaskMailboxExecutorOperatorSetRegisteredIterator is returned from FilterExecutorOperatorSetRegistered and is used to iterate over the raw logs and unpacked data for ExecutorOperatorSetRegistered events raised by the TaskMailbox contract. +type TaskMailboxExecutorOperatorSetRegisteredIterator struct { + Event *TaskMailboxExecutorOperatorSetRegistered // 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 *TaskMailboxExecutorOperatorSetRegisteredIterator) 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(TaskMailboxExecutorOperatorSetRegistered) + 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(TaskMailboxExecutorOperatorSetRegistered) + 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 *TaskMailboxExecutorOperatorSetRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxExecutorOperatorSetRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxExecutorOperatorSetRegistered represents a ExecutorOperatorSetRegistered event raised by the TaskMailbox contract. +type TaskMailboxExecutorOperatorSetRegistered struct { + Caller common.Address + Avs common.Address + ExecutorOperatorSetId uint32 + IsRegistered bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutorOperatorSetRegistered is a free log retrieval operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_TaskMailbox *TaskMailboxFilterer) FilterExecutorOperatorSetRegistered(opts *bind.FilterOpts, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (*TaskMailboxExecutorOperatorSetRegisteredIterator, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "ExecutorOperatorSetRegistered", callerRule, avsRule, executorOperatorSetIdRule) + if err != nil { + return nil, err + } + return &TaskMailboxExecutorOperatorSetRegisteredIterator{contract: _TaskMailbox.contract, event: "ExecutorOperatorSetRegistered", logs: logs, sub: sub}, nil +} + +// WatchExecutorOperatorSetRegistered is a free log subscription operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_TaskMailbox *TaskMailboxFilterer) WatchExecutorOperatorSetRegistered(opts *bind.WatchOpts, sink chan<- *TaskMailboxExecutorOperatorSetRegistered, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (event.Subscription, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _TaskMailbox.contract.WatchLogs(opts, "ExecutorOperatorSetRegistered", callerRule, avsRule, executorOperatorSetIdRule) + 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(TaskMailboxExecutorOperatorSetRegistered) + if err := _TaskMailbox.contract.UnpackLog(event, "ExecutorOperatorSetRegistered", 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 +} + +// ParseExecutorOperatorSetRegistered is a log parse operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_TaskMailbox *TaskMailboxFilterer) ParseExecutorOperatorSetRegistered(log types.Log) (*TaskMailboxExecutorOperatorSetRegistered, error) { + event := new(TaskMailboxExecutorOperatorSetRegistered) + if err := _TaskMailbox.contract.UnpackLog(event, "ExecutorOperatorSetRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxExecutorOperatorSetTaskConfigSetIterator is returned from FilterExecutorOperatorSetTaskConfigSet and is used to iterate over the raw logs and unpacked data for ExecutorOperatorSetTaskConfigSet events raised by the TaskMailbox contract. +type TaskMailboxExecutorOperatorSetTaskConfigSetIterator struct { + Event *TaskMailboxExecutorOperatorSetTaskConfigSet // 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 *TaskMailboxExecutorOperatorSetTaskConfigSetIterator) 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(TaskMailboxExecutorOperatorSetTaskConfigSet) + 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(TaskMailboxExecutorOperatorSetTaskConfigSet) + 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 *TaskMailboxExecutorOperatorSetTaskConfigSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxExecutorOperatorSetTaskConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxExecutorOperatorSetTaskConfigSet represents a ExecutorOperatorSetTaskConfigSet event raised by the TaskMailbox contract. +type TaskMailboxExecutorOperatorSetTaskConfigSet struct { + Caller common.Address + Avs common.Address + ExecutorOperatorSetId uint32 + Config ITaskMailboxTypesExecutorOperatorSetTaskConfig + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutorOperatorSetTaskConfigSet is a free log retrieval operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_TaskMailbox *TaskMailboxFilterer) FilterExecutorOperatorSetTaskConfigSet(opts *bind.FilterOpts, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (*TaskMailboxExecutorOperatorSetTaskConfigSetIterator, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "ExecutorOperatorSetTaskConfigSet", callerRule, avsRule, executorOperatorSetIdRule) + if err != nil { + return nil, err + } + return &TaskMailboxExecutorOperatorSetTaskConfigSetIterator{contract: _TaskMailbox.contract, event: "ExecutorOperatorSetTaskConfigSet", logs: logs, sub: sub}, nil +} + +// WatchExecutorOperatorSetTaskConfigSet is a free log subscription operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_TaskMailbox *TaskMailboxFilterer) WatchExecutorOperatorSetTaskConfigSet(opts *bind.WatchOpts, sink chan<- *TaskMailboxExecutorOperatorSetTaskConfigSet, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (event.Subscription, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _TaskMailbox.contract.WatchLogs(opts, "ExecutorOperatorSetTaskConfigSet", callerRule, avsRule, executorOperatorSetIdRule) + 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(TaskMailboxExecutorOperatorSetTaskConfigSet) + if err := _TaskMailbox.contract.UnpackLog(event, "ExecutorOperatorSetTaskConfigSet", 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 +} + +// ParseExecutorOperatorSetTaskConfigSet is a log parse operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_TaskMailbox *TaskMailboxFilterer) ParseExecutorOperatorSetTaskConfigSet(log types.Log) (*TaskMailboxExecutorOperatorSetTaskConfigSet, error) { + event := new(TaskMailboxExecutorOperatorSetTaskConfigSet) + if err := _TaskMailbox.contract.UnpackLog(event, "ExecutorOperatorSetTaskConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxFeeRefundedIterator is returned from FilterFeeRefunded and is used to iterate over the raw logs and unpacked data for FeeRefunded events raised by the TaskMailbox contract. +type TaskMailboxFeeRefundedIterator struct { + Event *TaskMailboxFeeRefunded // 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 *TaskMailboxFeeRefundedIterator) 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(TaskMailboxFeeRefunded) + 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(TaskMailboxFeeRefunded) + 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 *TaskMailboxFeeRefundedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxFeeRefundedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxFeeRefunded represents a FeeRefunded event raised by the TaskMailbox contract. +type TaskMailboxFeeRefunded struct { + RefundCollector common.Address + TaskHash [32]byte + AvsFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeRefunded is a free log retrieval operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_TaskMailbox *TaskMailboxFilterer) FilterFeeRefunded(opts *bind.FilterOpts, refundCollector []common.Address, taskHash [][32]byte) (*TaskMailboxFeeRefundedIterator, error) { + + var refundCollectorRule []interface{} + for _, refundCollectorItem := range refundCollector { + refundCollectorRule = append(refundCollectorRule, refundCollectorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "FeeRefunded", refundCollectorRule, taskHashRule) + if err != nil { + return nil, err + } + return &TaskMailboxFeeRefundedIterator{contract: _TaskMailbox.contract, event: "FeeRefunded", logs: logs, sub: sub}, nil +} + +// WatchFeeRefunded is a free log subscription operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_TaskMailbox *TaskMailboxFilterer) WatchFeeRefunded(opts *bind.WatchOpts, sink chan<- *TaskMailboxFeeRefunded, refundCollector []common.Address, taskHash [][32]byte) (event.Subscription, error) { + + var refundCollectorRule []interface{} + for _, refundCollectorItem := range refundCollector { + refundCollectorRule = append(refundCollectorRule, refundCollectorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + + logs, sub, err := _TaskMailbox.contract.WatchLogs(opts, "FeeRefunded", refundCollectorRule, taskHashRule) + 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(TaskMailboxFeeRefunded) + if err := _TaskMailbox.contract.UnpackLog(event, "FeeRefunded", 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 +} + +// ParseFeeRefunded is a log parse operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_TaskMailbox *TaskMailboxFilterer) ParseFeeRefunded(log types.Log) (*TaskMailboxFeeRefunded, error) { + event := new(TaskMailboxFeeRefunded) + if err := _TaskMailbox.contract.UnpackLog(event, "FeeRefunded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxFeeSplitCollectorSetIterator is returned from FilterFeeSplitCollectorSet and is used to iterate over the raw logs and unpacked data for FeeSplitCollectorSet events raised by the TaskMailbox contract. +type TaskMailboxFeeSplitCollectorSetIterator struct { + Event *TaskMailboxFeeSplitCollectorSet // 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 *TaskMailboxFeeSplitCollectorSetIterator) 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(TaskMailboxFeeSplitCollectorSet) + 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(TaskMailboxFeeSplitCollectorSet) + 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 *TaskMailboxFeeSplitCollectorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxFeeSplitCollectorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxFeeSplitCollectorSet represents a FeeSplitCollectorSet event raised by the TaskMailbox contract. +type TaskMailboxFeeSplitCollectorSet struct { + FeeSplitCollector common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeSplitCollectorSet is a free log retrieval operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_TaskMailbox *TaskMailboxFilterer) FilterFeeSplitCollectorSet(opts *bind.FilterOpts, feeSplitCollector []common.Address) (*TaskMailboxFeeSplitCollectorSetIterator, error) { + + var feeSplitCollectorRule []interface{} + for _, feeSplitCollectorItem := range feeSplitCollector { + feeSplitCollectorRule = append(feeSplitCollectorRule, feeSplitCollectorItem) + } + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "FeeSplitCollectorSet", feeSplitCollectorRule) + if err != nil { + return nil, err + } + return &TaskMailboxFeeSplitCollectorSetIterator{contract: _TaskMailbox.contract, event: "FeeSplitCollectorSet", logs: logs, sub: sub}, nil +} + +// WatchFeeSplitCollectorSet is a free log subscription operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_TaskMailbox *TaskMailboxFilterer) WatchFeeSplitCollectorSet(opts *bind.WatchOpts, sink chan<- *TaskMailboxFeeSplitCollectorSet, feeSplitCollector []common.Address) (event.Subscription, error) { + + var feeSplitCollectorRule []interface{} + for _, feeSplitCollectorItem := range feeSplitCollector { + feeSplitCollectorRule = append(feeSplitCollectorRule, feeSplitCollectorItem) + } + + logs, sub, err := _TaskMailbox.contract.WatchLogs(opts, "FeeSplitCollectorSet", feeSplitCollectorRule) + 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(TaskMailboxFeeSplitCollectorSet) + if err := _TaskMailbox.contract.UnpackLog(event, "FeeSplitCollectorSet", 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 +} + +// ParseFeeSplitCollectorSet is a log parse operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_TaskMailbox *TaskMailboxFilterer) ParseFeeSplitCollectorSet(log types.Log) (*TaskMailboxFeeSplitCollectorSet, error) { + event := new(TaskMailboxFeeSplitCollectorSet) + if err := _TaskMailbox.contract.UnpackLog(event, "FeeSplitCollectorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxFeeSplitSetIterator is returned from FilterFeeSplitSet and is used to iterate over the raw logs and unpacked data for FeeSplitSet events raised by the TaskMailbox contract. +type TaskMailboxFeeSplitSetIterator struct { + Event *TaskMailboxFeeSplitSet // 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 *TaskMailboxFeeSplitSetIterator) 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(TaskMailboxFeeSplitSet) + 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(TaskMailboxFeeSplitSet) + 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 *TaskMailboxFeeSplitSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxFeeSplitSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxFeeSplitSet represents a FeeSplitSet event raised by the TaskMailbox contract. +type TaskMailboxFeeSplitSet struct { + FeeSplit uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeSplitSet is a free log retrieval operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_TaskMailbox *TaskMailboxFilterer) FilterFeeSplitSet(opts *bind.FilterOpts) (*TaskMailboxFeeSplitSetIterator, error) { + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "FeeSplitSet") + if err != nil { + return nil, err + } + return &TaskMailboxFeeSplitSetIterator{contract: _TaskMailbox.contract, event: "FeeSplitSet", logs: logs, sub: sub}, nil +} + +// WatchFeeSplitSet is a free log subscription operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_TaskMailbox *TaskMailboxFilterer) WatchFeeSplitSet(opts *bind.WatchOpts, sink chan<- *TaskMailboxFeeSplitSet) (event.Subscription, error) { + + logs, sub, err := _TaskMailbox.contract.WatchLogs(opts, "FeeSplitSet") + 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(TaskMailboxFeeSplitSet) + if err := _TaskMailbox.contract.UnpackLog(event, "FeeSplitSet", 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 +} + +// ParseFeeSplitSet is a log parse operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_TaskMailbox *TaskMailboxFilterer) ParseFeeSplitSet(log types.Log) (*TaskMailboxFeeSplitSet, error) { + event := new(TaskMailboxFeeSplitSet) + if err := _TaskMailbox.contract.UnpackLog(event, "FeeSplitSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaskMailbox contract. +type TaskMailboxInitializedIterator struct { + Event *TaskMailboxInitialized // 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 *TaskMailboxInitializedIterator) 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(TaskMailboxInitialized) + 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(TaskMailboxInitialized) + 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 *TaskMailboxInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxInitialized represents a Initialized event raised by the TaskMailbox contract. +type TaskMailboxInitialized 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 (_TaskMailbox *TaskMailboxFilterer) FilterInitialized(opts *bind.FilterOpts) (*TaskMailboxInitializedIterator, error) { + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &TaskMailboxInitializedIterator{contract: _TaskMailbox.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 (_TaskMailbox *TaskMailboxFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaskMailboxInitialized) (event.Subscription, error) { + + logs, sub, err := _TaskMailbox.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(TaskMailboxInitialized) + if err := _TaskMailbox.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 (_TaskMailbox *TaskMailboxFilterer) ParseInitialized(log types.Log) (*TaskMailboxInitialized, error) { + event := new(TaskMailboxInitialized) + if err := _TaskMailbox.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaskMailbox contract. +type TaskMailboxOwnershipTransferredIterator struct { + Event *TaskMailboxOwnershipTransferred // 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 *TaskMailboxOwnershipTransferredIterator) 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(TaskMailboxOwnershipTransferred) + 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(TaskMailboxOwnershipTransferred) + 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 *TaskMailboxOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxOwnershipTransferred represents a OwnershipTransferred event raised by the TaskMailbox contract. +type TaskMailboxOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaskMailbox *TaskMailboxFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaskMailboxOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TaskMailboxOwnershipTransferredIterator{contract: _TaskMailbox.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaskMailbox *TaskMailboxFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaskMailboxOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaskMailbox.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaskMailboxOwnershipTransferred) + if err := _TaskMailbox.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaskMailbox *TaskMailboxFilterer) ParseOwnershipTransferred(log types.Log) (*TaskMailboxOwnershipTransferred, error) { + event := new(TaskMailboxOwnershipTransferred) + if err := _TaskMailbox.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxTaskCreatedIterator is returned from FilterTaskCreated and is used to iterate over the raw logs and unpacked data for TaskCreated events raised by the TaskMailbox contract. +type TaskMailboxTaskCreatedIterator struct { + Event *TaskMailboxTaskCreated // 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 *TaskMailboxTaskCreatedIterator) 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(TaskMailboxTaskCreated) + 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(TaskMailboxTaskCreated) + 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 *TaskMailboxTaskCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxTaskCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxTaskCreated represents a TaskCreated event raised by the TaskMailbox contract. +type TaskMailboxTaskCreated struct { + Creator common.Address + TaskHash [32]byte + Avs common.Address + ExecutorOperatorSetId uint32 + RefundCollector common.Address + AvsFee *big.Int + TaskDeadline *big.Int + Payload []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTaskCreated is a free log retrieval operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_TaskMailbox *TaskMailboxFilterer) FilterTaskCreated(opts *bind.FilterOpts, creator []common.Address, taskHash [][32]byte, avs []common.Address) (*TaskMailboxTaskCreatedIterator, error) { + + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "TaskCreated", creatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return &TaskMailboxTaskCreatedIterator{contract: _TaskMailbox.contract, event: "TaskCreated", logs: logs, sub: sub}, nil +} + +// WatchTaskCreated is a free log subscription operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_TaskMailbox *TaskMailboxFilterer) WatchTaskCreated(opts *bind.WatchOpts, sink chan<- *TaskMailboxTaskCreated, creator []common.Address, taskHash [][32]byte, avs []common.Address) (event.Subscription, error) { + + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _TaskMailbox.contract.WatchLogs(opts, "TaskCreated", creatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaskMailboxTaskCreated) + if err := _TaskMailbox.contract.UnpackLog(event, "TaskCreated", 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 +} + +// ParseTaskCreated is a log parse operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_TaskMailbox *TaskMailboxFilterer) ParseTaskCreated(log types.Log) (*TaskMailboxTaskCreated, error) { + event := new(TaskMailboxTaskCreated) + if err := _TaskMailbox.contract.UnpackLog(event, "TaskCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxTaskVerifiedIterator is returned from FilterTaskVerified and is used to iterate over the raw logs and unpacked data for TaskVerified events raised by the TaskMailbox contract. +type TaskMailboxTaskVerifiedIterator struct { + Event *TaskMailboxTaskVerified // 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 *TaskMailboxTaskVerifiedIterator) 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(TaskMailboxTaskVerified) + 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(TaskMailboxTaskVerified) + 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 *TaskMailboxTaskVerifiedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxTaskVerifiedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxTaskVerified represents a TaskVerified event raised by the TaskMailbox contract. +type TaskMailboxTaskVerified struct { + Aggregator common.Address + TaskHash [32]byte + Avs common.Address + ExecutorOperatorSetId uint32 + ExecutorCert []byte + Result []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTaskVerified is a free log retrieval operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_TaskMailbox *TaskMailboxFilterer) FilterTaskVerified(opts *bind.FilterOpts, aggregator []common.Address, taskHash [][32]byte, avs []common.Address) (*TaskMailboxTaskVerifiedIterator, error) { + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _TaskMailbox.contract.FilterLogs(opts, "TaskVerified", aggregatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return &TaskMailboxTaskVerifiedIterator{contract: _TaskMailbox.contract, event: "TaskVerified", logs: logs, sub: sub}, nil +} + +// WatchTaskVerified is a free log subscription operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_TaskMailbox *TaskMailboxFilterer) WatchTaskVerified(opts *bind.WatchOpts, sink chan<- *TaskMailboxTaskVerified, aggregator []common.Address, taskHash [][32]byte, avs []common.Address) (event.Subscription, error) { + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _TaskMailbox.contract.WatchLogs(opts, "TaskVerified", aggregatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaskMailboxTaskVerified) + if err := _TaskMailbox.contract.UnpackLog(event, "TaskVerified", 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 +} + +// ParseTaskVerified is a log parse operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_TaskMailbox *TaskMailboxFilterer) ParseTaskVerified(log types.Log) (*TaskMailboxTaskVerified, error) { + event := new(TaskMailboxTaskVerified) + if err := _TaskMailbox.contract.UnpackLog(event, "TaskVerified", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/bindings/TaskMailboxStorage/binding.go b/pkg/bindings/TaskMailboxStorage/binding.go new file mode 100644 index 0000000000..295232d3f6 --- /dev/null +++ b/pkg/bindings/TaskMailboxStorage/binding.go @@ -0,0 +1,1979 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package TaskMailboxStorage + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// BN254G1Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G1Point struct { + X *big.Int + Y *big.Int +} + +// BN254G2Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G2Point struct { + X [2]*big.Int + Y [2]*big.Int +} + +// IBN254CertificateVerifierTypesBN254Certificate is an auto generated low-level Go binding around an user-defined struct. +type IBN254CertificateVerifierTypesBN254Certificate struct { + ReferenceTimestamp uint32 + MessageHash [32]byte + Signature BN254G1Point + Apk BN254G2Point + NonSignerWitnesses []IBN254CertificateVerifierTypesBN254OperatorInfoWitness +} + +// IBN254CertificateVerifierTypesBN254OperatorInfoWitness is an auto generated low-level Go binding around an user-defined struct. +type IBN254CertificateVerifierTypesBN254OperatorInfoWitness struct { + OperatorIndex uint32 + OperatorInfoProof []byte + OperatorInfo IOperatorTableCalculatorTypesBN254OperatorInfo +} + +// IECDSACertificateVerifierTypesECDSACertificate is an auto generated low-level Go binding around an user-defined struct. +type IECDSACertificateVerifierTypesECDSACertificate struct { + ReferenceTimestamp uint32 + MessageHash [32]byte + Sig []byte +} + +// IOperatorTableCalculatorTypesBN254OperatorInfo is an auto generated low-level Go binding around an user-defined struct. +type IOperatorTableCalculatorTypesBN254OperatorInfo struct { + Pubkey BN254G1Point + Weights []*big.Int +} + +// ITaskMailboxTypesConsensus is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesConsensus struct { + ConsensusType uint8 + Value []byte +} + +// ITaskMailboxTypesExecutorOperatorSetTaskConfig is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesExecutorOperatorSetTaskConfig struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +} + +// ITaskMailboxTypesTask is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesTask struct { + Creator common.Address + CreationTime *big.Int + Avs common.Address + AvsFee *big.Int + RefundCollector common.Address + ExecutorOperatorSetId uint32 + FeeSplit uint16 + Status uint8 + IsFeeRefunded bool + ExecutorOperatorSetTaskConfig ITaskMailboxTypesExecutorOperatorSetTaskConfig + Payload []byte + ExecutorCert []byte + Result []byte +} + +// ITaskMailboxTypesTaskParams is an auto generated low-level Go binding around an user-defined struct. +type ITaskMailboxTypesTaskParams struct { + RefundCollector common.Address + ExecutorOperatorSet OperatorSet + Payload []byte +} + +// OperatorSet is an auto generated low-level Go binding around an user-defined struct. +type OperatorSet struct { + Avs common.Address + Id uint32 +} + +// TaskMailboxStorageMetaData contains all meta data concerning the TaskMailboxStorage contract. +var TaskMailboxStorageMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"BN254_CERTIFICATE_VERIFIER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ECDSA_CERTIFICATE_VERIFIER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"createTask\",\"inputs\":[{\"name\":\"taskParams\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.TaskParams\",\"components\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executorOperatorSetTaskConfigs\",\"inputs\":[{\"name\":\"operatorSetKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeSplit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeSplitCollector\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBN254CertificateBytes\",\"inputs\":[{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254Certificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"apk\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"},{\"name\":\"Y\",\"type\":\"uint256[2]\",\"internalType\":\"uint256[2]\"}]},{\"name\":\"nonSignerWitnesses\",\"type\":\"tuple[]\",\"internalType\":\"structIBN254CertificateVerifierTypes.BN254OperatorInfoWitness[]\",\"components\":[{\"name\":\"operatorIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"operatorInfoProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operatorInfo\",\"type\":\"tuple\",\"internalType\":\"structIOperatorTableCalculatorTypes.BN254OperatorInfo\",\"components\":[{\"name\":\"pubkey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"weights\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getECDSACertificateBytes\",\"inputs\":[{\"name\":\"cert\",\"type\":\"tuple\",\"internalType\":\"structIECDSACertificateVerifierTypes.ECDSACertificate\",\"components\":[{\"name\":\"referenceTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"messageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sig\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getExecutorOperatorSetTaskConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFeeSplit\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFeeSplitCollector\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskInfo\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Task\",\"components\":[{\"name\":\"creator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"creationTime\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"refundCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"},{\"name\":\"isFeeRefunded\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"executorOperatorSetTaskConfig\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"payload\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskResult\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTaskStatus\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isExecutorOperatorSetRegistered\",\"inputs\":[{\"name\":\"operatorSetKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"isRegistered\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"refundFee\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerExecutorOperatorSet\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"isRegistered\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExecutorOperatorSetTaskConfig\",\"inputs\":[{\"name\":\"operatorSet\",\"type\":\"tuple\",\"internalType\":\"structOperatorSet\",\"components\":[{\"name\":\"avs\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"id\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"config\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeeSplit\",\"inputs\":[{\"name\":\"_feeSplit\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeeSplitCollector\",\"inputs\":[{\"name\":\"_feeSplitCollector\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"submitResult\",\"inputs\":[{\"name\":\"taskHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ExecutorOperatorSetRegistered\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"isRegistered\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ExecutorOperatorSetTaskConfigSet\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":true,\"internalType\":\"uint32\"},{\"name\":\"config\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structITaskMailboxTypes.ExecutorOperatorSetTaskConfig\",\"components\":[{\"name\":\"taskHook\",\"type\":\"address\",\"internalType\":\"contractIAVSTaskHook\"},{\"name\":\"taskSLA\",\"type\":\"uint96\",\"internalType\":\"uint96\"},{\"name\":\"feeToken\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"curveType\",\"type\":\"uint8\",\"internalType\":\"enumIKeyRegistrarTypes.CurveType\"},{\"name\":\"feeCollector\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"consensus\",\"type\":\"tuple\",\"internalType\":\"structITaskMailboxTypes.Consensus\",\"components\":[{\"name\":\"consensusType\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.ConsensusType\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"taskMetadata\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeRefunded\",\"inputs\":[{\"name\":\"refundCollector\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeSplitCollectorSet\",\"inputs\":[{\"name\":\"feeSplitCollector\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeSplitSet\",\"inputs\":[{\"name\":\"feeSplit\",\"type\":\"uint16\",\"indexed\":false,\"internalType\":\"uint16\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TaskCreated\",\"inputs\":[{\"name\":\"creator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"refundCollector\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"avsFee\",\"type\":\"uint96\",\"indexed\":false,\"internalType\":\"uint96\"},{\"name\":\"taskDeadline\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"payload\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TaskVerified\",\"inputs\":[{\"name\":\"aggregator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"taskHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"avs\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"executorOperatorSetId\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"executorCert\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"result\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CertificateVerificationFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EmptyCertificateSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExecutorOperatorSetNotRegistered\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExecutorOperatorSetTaskConfigNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeAlreadyRefunded\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidAddressZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConsensusType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidConsensusValue\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCurveType\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFeeReceiver\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFeeSplit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOperatorSetOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTaskCreator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidTaskStatus\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"},{\"name\":\"actual\",\"type\":\"uint8\",\"internalType\":\"enumITaskMailboxTypes.TaskStatus\"}]},{\"type\":\"error\",\"name\":\"OnlyRefundCollector\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PayloadIsEmpty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TaskSLAIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TimestampAtCreation\",\"inputs\":[]}]", +} + +// TaskMailboxStorageABI is the input ABI used to generate the binding from. +// Deprecated: Use TaskMailboxStorageMetaData.ABI instead. +var TaskMailboxStorageABI = TaskMailboxStorageMetaData.ABI + +// TaskMailboxStorage is an auto generated Go binding around an Ethereum contract. +type TaskMailboxStorage struct { + TaskMailboxStorageCaller // Read-only binding to the contract + TaskMailboxStorageTransactor // Write-only binding to the contract + TaskMailboxStorageFilterer // Log filterer for contract events +} + +// TaskMailboxStorageCaller is an auto generated read-only Go binding around an Ethereum contract. +type TaskMailboxStorageCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaskMailboxStorageTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TaskMailboxStorageTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaskMailboxStorageFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TaskMailboxStorageFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TaskMailboxStorageSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TaskMailboxStorageSession struct { + Contract *TaskMailboxStorage // 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 +} + +// TaskMailboxStorageCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TaskMailboxStorageCallerSession struct { + Contract *TaskMailboxStorageCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TaskMailboxStorageTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TaskMailboxStorageTransactorSession struct { + Contract *TaskMailboxStorageTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TaskMailboxStorageRaw is an auto generated low-level Go binding around an Ethereum contract. +type TaskMailboxStorageRaw struct { + Contract *TaskMailboxStorage // Generic contract binding to access the raw methods on +} + +// TaskMailboxStorageCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TaskMailboxStorageCallerRaw struct { + Contract *TaskMailboxStorageCaller // Generic read-only contract binding to access the raw methods on +} + +// TaskMailboxStorageTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TaskMailboxStorageTransactorRaw struct { + Contract *TaskMailboxStorageTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTaskMailboxStorage creates a new instance of TaskMailboxStorage, bound to a specific deployed contract. +func NewTaskMailboxStorage(address common.Address, backend bind.ContractBackend) (*TaskMailboxStorage, error) { + contract, err := bindTaskMailboxStorage(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TaskMailboxStorage{TaskMailboxStorageCaller: TaskMailboxStorageCaller{contract: contract}, TaskMailboxStorageTransactor: TaskMailboxStorageTransactor{contract: contract}, TaskMailboxStorageFilterer: TaskMailboxStorageFilterer{contract: contract}}, nil +} + +// NewTaskMailboxStorageCaller creates a new read-only instance of TaskMailboxStorage, bound to a specific deployed contract. +func NewTaskMailboxStorageCaller(address common.Address, caller bind.ContractCaller) (*TaskMailboxStorageCaller, error) { + contract, err := bindTaskMailboxStorage(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TaskMailboxStorageCaller{contract: contract}, nil +} + +// NewTaskMailboxStorageTransactor creates a new write-only instance of TaskMailboxStorage, bound to a specific deployed contract. +func NewTaskMailboxStorageTransactor(address common.Address, transactor bind.ContractTransactor) (*TaskMailboxStorageTransactor, error) { + contract, err := bindTaskMailboxStorage(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TaskMailboxStorageTransactor{contract: contract}, nil +} + +// NewTaskMailboxStorageFilterer creates a new log filterer instance of TaskMailboxStorage, bound to a specific deployed contract. +func NewTaskMailboxStorageFilterer(address common.Address, filterer bind.ContractFilterer) (*TaskMailboxStorageFilterer, error) { + contract, err := bindTaskMailboxStorage(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TaskMailboxStorageFilterer{contract: contract}, nil +} + +// bindTaskMailboxStorage binds a generic wrapper to an already deployed contract. +func bindTaskMailboxStorage(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TaskMailboxStorageMetaData.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 (_TaskMailboxStorage *TaskMailboxStorageRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaskMailboxStorage.Contract.TaskMailboxStorageCaller.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 (_TaskMailboxStorage *TaskMailboxStorageRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.TaskMailboxStorageTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TaskMailboxStorage *TaskMailboxStorageRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.TaskMailboxStorageTransactor.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 (_TaskMailboxStorage *TaskMailboxStorageCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaskMailboxStorage.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 (_TaskMailboxStorage *TaskMailboxStorageTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TaskMailboxStorage *TaskMailboxStorageTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.contract.Transact(opts, method, params...) +} + +// BN254CERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0xf7424fc9. +// +// Solidity: function BN254_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) BN254CERTIFICATEVERIFIER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "BN254_CERTIFICATE_VERIFIER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BN254CERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0xf7424fc9. +// +// Solidity: function BN254_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageSession) BN254CERTIFICATEVERIFIER() (common.Address, error) { + return _TaskMailboxStorage.Contract.BN254CERTIFICATEVERIFIER(&_TaskMailboxStorage.CallOpts) +} + +// BN254CERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0xf7424fc9. +// +// Solidity: function BN254_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) BN254CERTIFICATEVERIFIER() (common.Address, error) { + return _TaskMailboxStorage.Contract.BN254CERTIFICATEVERIFIER(&_TaskMailboxStorage.CallOpts) +} + +// ECDSACERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0x54743ad2. +// +// Solidity: function ECDSA_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) ECDSACERTIFICATEVERIFIER(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "ECDSA_CERTIFICATE_VERIFIER") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ECDSACERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0x54743ad2. +// +// Solidity: function ECDSA_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageSession) ECDSACERTIFICATEVERIFIER() (common.Address, error) { + return _TaskMailboxStorage.Contract.ECDSACERTIFICATEVERIFIER(&_TaskMailboxStorage.CallOpts) +} + +// ECDSACERTIFICATEVERIFIER is a free data retrieval call binding the contract method 0x54743ad2. +// +// Solidity: function ECDSA_CERTIFICATE_VERIFIER() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) ECDSACERTIFICATEVERIFIER() (common.Address, error) { + return _TaskMailboxStorage.Contract.ECDSACERTIFICATEVERIFIER(&_TaskMailboxStorage.CallOpts) +} + +// ExecutorOperatorSetTaskConfigs is a free data retrieval call binding the contract method 0x1c7edb17. +// +// Solidity: function executorOperatorSetTaskConfigs(bytes32 operatorSetKey) view returns(address taskHook, uint96 taskSLA, address feeToken, uint8 curveType, address feeCollector, (uint8,bytes) consensus, bytes taskMetadata) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) ExecutorOperatorSetTaskConfigs(opts *bind.CallOpts, operatorSetKey [32]byte) (struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +}, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "executorOperatorSetTaskConfigs", operatorSetKey) + + outstruct := new(struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte + }) + if err != nil { + return *outstruct, err + } + + outstruct.TaskHook = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.TaskSLA = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.FeeToken = *abi.ConvertType(out[2], new(common.Address)).(*common.Address) + outstruct.CurveType = *abi.ConvertType(out[3], new(uint8)).(*uint8) + outstruct.FeeCollector = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) + outstruct.Consensus = *abi.ConvertType(out[5], new(ITaskMailboxTypesConsensus)).(*ITaskMailboxTypesConsensus) + outstruct.TaskMetadata = *abi.ConvertType(out[6], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +// ExecutorOperatorSetTaskConfigs is a free data retrieval call binding the contract method 0x1c7edb17. +// +// Solidity: function executorOperatorSetTaskConfigs(bytes32 operatorSetKey) view returns(address taskHook, uint96 taskSLA, address feeToken, uint8 curveType, address feeCollector, (uint8,bytes) consensus, bytes taskMetadata) +func (_TaskMailboxStorage *TaskMailboxStorageSession) ExecutorOperatorSetTaskConfigs(operatorSetKey [32]byte) (struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +}, error) { + return _TaskMailboxStorage.Contract.ExecutorOperatorSetTaskConfigs(&_TaskMailboxStorage.CallOpts, operatorSetKey) +} + +// ExecutorOperatorSetTaskConfigs is a free data retrieval call binding the contract method 0x1c7edb17. +// +// Solidity: function executorOperatorSetTaskConfigs(bytes32 operatorSetKey) view returns(address taskHook, uint96 taskSLA, address feeToken, uint8 curveType, address feeCollector, (uint8,bytes) consensus, bytes taskMetadata) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) ExecutorOperatorSetTaskConfigs(operatorSetKey [32]byte) (struct { + TaskHook common.Address + TaskSLA *big.Int + FeeToken common.Address + CurveType uint8 + FeeCollector common.Address + Consensus ITaskMailboxTypesConsensus + TaskMetadata []byte +}, error) { + return _TaskMailboxStorage.Contract.ExecutorOperatorSetTaskConfigs(&_TaskMailboxStorage.CallOpts, operatorSetKey) +} + +// FeeSplit is a free data retrieval call binding the contract method 0x6373ea69. +// +// Solidity: function feeSplit() view returns(uint16) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) FeeSplit(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "feeSplit") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// FeeSplit is a free data retrieval call binding the contract method 0x6373ea69. +// +// Solidity: function feeSplit() view returns(uint16) +func (_TaskMailboxStorage *TaskMailboxStorageSession) FeeSplit() (uint16, error) { + return _TaskMailboxStorage.Contract.FeeSplit(&_TaskMailboxStorage.CallOpts) +} + +// FeeSplit is a free data retrieval call binding the contract method 0x6373ea69. +// +// Solidity: function feeSplit() view returns(uint16) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) FeeSplit() (uint16, error) { + return _TaskMailboxStorage.Contract.FeeSplit(&_TaskMailboxStorage.CallOpts) +} + +// FeeSplitCollector is a free data retrieval call binding the contract method 0x1a20c505. +// +// Solidity: function feeSplitCollector() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) FeeSplitCollector(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "feeSplitCollector") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeSplitCollector is a free data retrieval call binding the contract method 0x1a20c505. +// +// Solidity: function feeSplitCollector() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageSession) FeeSplitCollector() (common.Address, error) { + return _TaskMailboxStorage.Contract.FeeSplitCollector(&_TaskMailboxStorage.CallOpts) +} + +// FeeSplitCollector is a free data retrieval call binding the contract method 0x1a20c505. +// +// Solidity: function feeSplitCollector() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) FeeSplitCollector() (common.Address, error) { + return _TaskMailboxStorage.Contract.FeeSplitCollector(&_TaskMailboxStorage.CallOpts) +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) GetBN254CertificateBytes(opts *bind.CallOpts, cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "getBN254CertificateBytes", cert) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageSession) GetBN254CertificateBytes(cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + return _TaskMailboxStorage.Contract.GetBN254CertificateBytes(&_TaskMailboxStorage.CallOpts, cert) +} + +// GetBN254CertificateBytes is a free data retrieval call binding the contract method 0x1ae370eb. +// +// Solidity: function getBN254CertificateBytes((uint32,bytes32,(uint256,uint256),(uint256[2],uint256[2]),(uint32,bytes,((uint256,uint256),uint256[]))[]) cert) pure returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) GetBN254CertificateBytes(cert IBN254CertificateVerifierTypesBN254Certificate) ([]byte, error) { + return _TaskMailboxStorage.Contract.GetBN254CertificateBytes(&_TaskMailboxStorage.CallOpts, cert) +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) GetECDSACertificateBytes(opts *bind.CallOpts, cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "getECDSACertificateBytes", cert) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageSession) GetECDSACertificateBytes(cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + return _TaskMailboxStorage.Contract.GetECDSACertificateBytes(&_TaskMailboxStorage.CallOpts, cert) +} + +// GetECDSACertificateBytes is a free data retrieval call binding the contract method 0x1270a892. +// +// Solidity: function getECDSACertificateBytes((uint32,bytes32,bytes) cert) pure returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) GetECDSACertificateBytes(cert IECDSACertificateVerifierTypesECDSACertificate) ([]byte, error) { + return _TaskMailboxStorage.Contract.GetECDSACertificateBytes(&_TaskMailboxStorage.CallOpts, cert) +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) GetExecutorOperatorSetTaskConfig(opts *bind.CallOpts, operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "getExecutorOperatorSetTaskConfig", operatorSet) + + if err != nil { + return *new(ITaskMailboxTypesExecutorOperatorSetTaskConfig), err + } + + out0 := *abi.ConvertType(out[0], new(ITaskMailboxTypesExecutorOperatorSetTaskConfig)).(*ITaskMailboxTypesExecutorOperatorSetTaskConfig) + + return out0, err + +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_TaskMailboxStorage *TaskMailboxStorageSession) GetExecutorOperatorSetTaskConfig(operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + return _TaskMailboxStorage.Contract.GetExecutorOperatorSetTaskConfig(&_TaskMailboxStorage.CallOpts, operatorSet) +} + +// GetExecutorOperatorSetTaskConfig is a free data retrieval call binding the contract method 0x6bf6fad5. +// +// Solidity: function getExecutorOperatorSetTaskConfig((address,uint32) operatorSet) view returns((address,uint96,address,uint8,address,(uint8,bytes),bytes)) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) GetExecutorOperatorSetTaskConfig(operatorSet OperatorSet) (ITaskMailboxTypesExecutorOperatorSetTaskConfig, error) { + return _TaskMailboxStorage.Contract.GetExecutorOperatorSetTaskConfig(&_TaskMailboxStorage.CallOpts, operatorSet) +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) GetFeeSplit(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "getFeeSplit") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_TaskMailboxStorage *TaskMailboxStorageSession) GetFeeSplit() (uint16, error) { + return _TaskMailboxStorage.Contract.GetFeeSplit(&_TaskMailboxStorage.CallOpts) +} + +// GetFeeSplit is a free data retrieval call binding the contract method 0xeda0be69. +// +// Solidity: function getFeeSplit() view returns(uint16) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) GetFeeSplit() (uint16, error) { + return _TaskMailboxStorage.Contract.GetFeeSplit(&_TaskMailboxStorage.CallOpts) +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) GetFeeSplitCollector(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "getFeeSplitCollector") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageSession) GetFeeSplitCollector() (common.Address, error) { + return _TaskMailboxStorage.Contract.GetFeeSplitCollector(&_TaskMailboxStorage.CallOpts) +} + +// GetFeeSplitCollector is a free data retrieval call binding the contract method 0x02a74480. +// +// Solidity: function getFeeSplitCollector() view returns(address) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) GetFeeSplitCollector() (common.Address, error) { + return _TaskMailboxStorage.Contract.GetFeeSplitCollector(&_TaskMailboxStorage.CallOpts) +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) GetTaskInfo(opts *bind.CallOpts, taskHash [32]byte) (ITaskMailboxTypesTask, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "getTaskInfo", taskHash) + + if err != nil { + return *new(ITaskMailboxTypesTask), err + } + + out0 := *abi.ConvertType(out[0], new(ITaskMailboxTypesTask)).(*ITaskMailboxTypesTask) + + return out0, err + +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_TaskMailboxStorage *TaskMailboxStorageSession) GetTaskInfo(taskHash [32]byte) (ITaskMailboxTypesTask, error) { + return _TaskMailboxStorage.Contract.GetTaskInfo(&_TaskMailboxStorage.CallOpts, taskHash) +} + +// GetTaskInfo is a free data retrieval call binding the contract method 0x4ad52e02. +// +// Solidity: function getTaskInfo(bytes32 taskHash) view returns((address,uint96,address,uint96,address,uint32,uint16,uint8,bool,(address,uint96,address,uint8,address,(uint8,bytes),bytes),bytes,bytes,bytes)) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) GetTaskInfo(taskHash [32]byte) (ITaskMailboxTypesTask, error) { + return _TaskMailboxStorage.Contract.GetTaskInfo(&_TaskMailboxStorage.CallOpts, taskHash) +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) GetTaskResult(opts *bind.CallOpts, taskHash [32]byte) ([]byte, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "getTaskResult", taskHash) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageSession) GetTaskResult(taskHash [32]byte) ([]byte, error) { + return _TaskMailboxStorage.Contract.GetTaskResult(&_TaskMailboxStorage.CallOpts, taskHash) +} + +// GetTaskResult is a free data retrieval call binding the contract method 0x62fee037. +// +// Solidity: function getTaskResult(bytes32 taskHash) view returns(bytes) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) GetTaskResult(taskHash [32]byte) ([]byte, error) { + return _TaskMailboxStorage.Contract.GetTaskResult(&_TaskMailboxStorage.CallOpts, taskHash) +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) GetTaskStatus(opts *bind.CallOpts, taskHash [32]byte) (uint8, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "getTaskStatus", taskHash) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_TaskMailboxStorage *TaskMailboxStorageSession) GetTaskStatus(taskHash [32]byte) (uint8, error) { + return _TaskMailboxStorage.Contract.GetTaskStatus(&_TaskMailboxStorage.CallOpts, taskHash) +} + +// GetTaskStatus is a free data retrieval call binding the contract method 0x2bf6cc79. +// +// Solidity: function getTaskStatus(bytes32 taskHash) view returns(uint8) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) GetTaskStatus(taskHash [32]byte) (uint8, error) { + return _TaskMailboxStorage.Contract.GetTaskStatus(&_TaskMailboxStorage.CallOpts, taskHash) +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool isRegistered) +func (_TaskMailboxStorage *TaskMailboxStorageCaller) IsExecutorOperatorSetRegistered(opts *bind.CallOpts, operatorSetKey [32]byte) (bool, error) { + var out []interface{} + err := _TaskMailboxStorage.contract.Call(opts, &out, "isExecutorOperatorSetRegistered", operatorSetKey) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool isRegistered) +func (_TaskMailboxStorage *TaskMailboxStorageSession) IsExecutorOperatorSetRegistered(operatorSetKey [32]byte) (bool, error) { + return _TaskMailboxStorage.Contract.IsExecutorOperatorSetRegistered(&_TaskMailboxStorage.CallOpts, operatorSetKey) +} + +// IsExecutorOperatorSetRegistered is a free data retrieval call binding the contract method 0xfa2c0b37. +// +// Solidity: function isExecutorOperatorSetRegistered(bytes32 operatorSetKey) view returns(bool isRegistered) +func (_TaskMailboxStorage *TaskMailboxStorageCallerSession) IsExecutorOperatorSetRegistered(operatorSetKey [32]byte) (bool, error) { + return _TaskMailboxStorage.Contract.IsExecutorOperatorSetRegistered(&_TaskMailboxStorage.CallOpts, operatorSetKey) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32 taskHash) +func (_TaskMailboxStorage *TaskMailboxStorageTransactor) CreateTask(opts *bind.TransactOpts, taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _TaskMailboxStorage.contract.Transact(opts, "createTask", taskParams) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32 taskHash) +func (_TaskMailboxStorage *TaskMailboxStorageSession) CreateTask(taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.CreateTask(&_TaskMailboxStorage.TransactOpts, taskParams) +} + +// CreateTask is a paid mutator transaction binding the contract method 0x1fb66f5d. +// +// Solidity: function createTask((address,(address,uint32),bytes) taskParams) returns(bytes32 taskHash) +func (_TaskMailboxStorage *TaskMailboxStorageTransactorSession) CreateTask(taskParams ITaskMailboxTypesTaskParams) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.CreateTask(&_TaskMailboxStorage.TransactOpts, taskParams) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactor) RefundFee(opts *bind.TransactOpts, taskHash [32]byte) (*types.Transaction, error) { + return _TaskMailboxStorage.contract.Transact(opts, "refundFee", taskHash) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_TaskMailboxStorage *TaskMailboxStorageSession) RefundFee(taskHash [32]byte) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.RefundFee(&_TaskMailboxStorage.TransactOpts, taskHash) +} + +// RefundFee is a paid mutator transaction binding the contract method 0xb8694166. +// +// Solidity: function refundFee(bytes32 taskHash) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactorSession) RefundFee(taskHash [32]byte) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.RefundFee(&_TaskMailboxStorage.TransactOpts, taskHash) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactor) RegisterExecutorOperatorSet(opts *bind.TransactOpts, operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _TaskMailboxStorage.contract.Transact(opts, "registerExecutorOperatorSet", operatorSet, isRegistered) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_TaskMailboxStorage *TaskMailboxStorageSession) RegisterExecutorOperatorSet(operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.RegisterExecutorOperatorSet(&_TaskMailboxStorage.TransactOpts, operatorSet, isRegistered) +} + +// RegisterExecutorOperatorSet is a paid mutator transaction binding the contract method 0x49acd884. +// +// Solidity: function registerExecutorOperatorSet((address,uint32) operatorSet, bool isRegistered) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactorSession) RegisterExecutorOperatorSet(operatorSet OperatorSet, isRegistered bool) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.RegisterExecutorOperatorSet(&_TaskMailboxStorage.TransactOpts, operatorSet, isRegistered) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactor) SetExecutorOperatorSetTaskConfig(opts *bind.TransactOpts, operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _TaskMailboxStorage.contract.Transact(opts, "setExecutorOperatorSetTaskConfig", operatorSet, config) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_TaskMailboxStorage *TaskMailboxStorageSession) SetExecutorOperatorSetTaskConfig(operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.SetExecutorOperatorSetTaskConfig(&_TaskMailboxStorage.TransactOpts, operatorSet, config) +} + +// SetExecutorOperatorSetTaskConfig is a paid mutator transaction binding the contract method 0xf741e81a. +// +// Solidity: function setExecutorOperatorSetTaskConfig((address,uint32) operatorSet, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactorSession) SetExecutorOperatorSetTaskConfig(operatorSet OperatorSet, config ITaskMailboxTypesExecutorOperatorSetTaskConfig) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.SetExecutorOperatorSetTaskConfig(&_TaskMailboxStorage.TransactOpts, operatorSet, config) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactor) SetFeeSplit(opts *bind.TransactOpts, _feeSplit uint16) (*types.Transaction, error) { + return _TaskMailboxStorage.contract.Transact(opts, "setFeeSplit", _feeSplit) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_TaskMailboxStorage *TaskMailboxStorageSession) SetFeeSplit(_feeSplit uint16) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.SetFeeSplit(&_TaskMailboxStorage.TransactOpts, _feeSplit) +} + +// SetFeeSplit is a paid mutator transaction binding the contract method 0x468c07a0. +// +// Solidity: function setFeeSplit(uint16 _feeSplit) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactorSession) SetFeeSplit(_feeSplit uint16) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.SetFeeSplit(&_TaskMailboxStorage.TransactOpts, _feeSplit) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactor) SetFeeSplitCollector(opts *bind.TransactOpts, _feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailboxStorage.contract.Transact(opts, "setFeeSplitCollector", _feeSplitCollector) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_TaskMailboxStorage *TaskMailboxStorageSession) SetFeeSplitCollector(_feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.SetFeeSplitCollector(&_TaskMailboxStorage.TransactOpts, _feeSplitCollector) +} + +// SetFeeSplitCollector is a paid mutator transaction binding the contract method 0x678fbdb3. +// +// Solidity: function setFeeSplitCollector(address _feeSplitCollector) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactorSession) SetFeeSplitCollector(_feeSplitCollector common.Address) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.SetFeeSplitCollector(&_TaskMailboxStorage.TransactOpts, _feeSplitCollector) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactor) SubmitResult(opts *bind.TransactOpts, taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _TaskMailboxStorage.contract.Transact(opts, "submitResult", taskHash, executorCert, result) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_TaskMailboxStorage *TaskMailboxStorageSession) SubmitResult(taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.SubmitResult(&_TaskMailboxStorage.TransactOpts, taskHash, executorCert, result) +} + +// SubmitResult is a paid mutator transaction binding the contract method 0xa5fabc81. +// +// Solidity: function submitResult(bytes32 taskHash, bytes executorCert, bytes result) returns() +func (_TaskMailboxStorage *TaskMailboxStorageTransactorSession) SubmitResult(taskHash [32]byte, executorCert []byte, result []byte) (*types.Transaction, error) { + return _TaskMailboxStorage.Contract.SubmitResult(&_TaskMailboxStorage.TransactOpts, taskHash, executorCert, result) +} + +// TaskMailboxStorageExecutorOperatorSetRegisteredIterator is returned from FilterExecutorOperatorSetRegistered and is used to iterate over the raw logs and unpacked data for ExecutorOperatorSetRegistered events raised by the TaskMailboxStorage contract. +type TaskMailboxStorageExecutorOperatorSetRegisteredIterator struct { + Event *TaskMailboxStorageExecutorOperatorSetRegistered // 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 *TaskMailboxStorageExecutorOperatorSetRegisteredIterator) 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(TaskMailboxStorageExecutorOperatorSetRegistered) + 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(TaskMailboxStorageExecutorOperatorSetRegistered) + 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 *TaskMailboxStorageExecutorOperatorSetRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxStorageExecutorOperatorSetRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxStorageExecutorOperatorSetRegistered represents a ExecutorOperatorSetRegistered event raised by the TaskMailboxStorage contract. +type TaskMailboxStorageExecutorOperatorSetRegistered struct { + Caller common.Address + Avs common.Address + ExecutorOperatorSetId uint32 + IsRegistered bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutorOperatorSetRegistered is a free log retrieval operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) FilterExecutorOperatorSetRegistered(opts *bind.FilterOpts, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (*TaskMailboxStorageExecutorOperatorSetRegisteredIterator, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.FilterLogs(opts, "ExecutorOperatorSetRegistered", callerRule, avsRule, executorOperatorSetIdRule) + if err != nil { + return nil, err + } + return &TaskMailboxStorageExecutorOperatorSetRegisteredIterator{contract: _TaskMailboxStorage.contract, event: "ExecutorOperatorSetRegistered", logs: logs, sub: sub}, nil +} + +// WatchExecutorOperatorSetRegistered is a free log subscription operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) WatchExecutorOperatorSetRegistered(opts *bind.WatchOpts, sink chan<- *TaskMailboxStorageExecutorOperatorSetRegistered, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (event.Subscription, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.WatchLogs(opts, "ExecutorOperatorSetRegistered", callerRule, avsRule, executorOperatorSetIdRule) + 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(TaskMailboxStorageExecutorOperatorSetRegistered) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "ExecutorOperatorSetRegistered", 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 +} + +// ParseExecutorOperatorSetRegistered is a log parse operation binding the contract event 0x48b63f21a1eb9dd6880e196de6d7db3fbd0c282b74f1298dcb4cf53472298f39. +// +// Solidity: event ExecutorOperatorSetRegistered(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) ParseExecutorOperatorSetRegistered(log types.Log) (*TaskMailboxStorageExecutorOperatorSetRegistered, error) { + event := new(TaskMailboxStorageExecutorOperatorSetRegistered) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "ExecutorOperatorSetRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxStorageExecutorOperatorSetTaskConfigSetIterator is returned from FilterExecutorOperatorSetTaskConfigSet and is used to iterate over the raw logs and unpacked data for ExecutorOperatorSetTaskConfigSet events raised by the TaskMailboxStorage contract. +type TaskMailboxStorageExecutorOperatorSetTaskConfigSetIterator struct { + Event *TaskMailboxStorageExecutorOperatorSetTaskConfigSet // 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 *TaskMailboxStorageExecutorOperatorSetTaskConfigSetIterator) 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(TaskMailboxStorageExecutorOperatorSetTaskConfigSet) + 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(TaskMailboxStorageExecutorOperatorSetTaskConfigSet) + 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 *TaskMailboxStorageExecutorOperatorSetTaskConfigSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxStorageExecutorOperatorSetTaskConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxStorageExecutorOperatorSetTaskConfigSet represents a ExecutorOperatorSetTaskConfigSet event raised by the TaskMailboxStorage contract. +type TaskMailboxStorageExecutorOperatorSetTaskConfigSet struct { + Caller common.Address + Avs common.Address + ExecutorOperatorSetId uint32 + Config ITaskMailboxTypesExecutorOperatorSetTaskConfig + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutorOperatorSetTaskConfigSet is a free log retrieval operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) FilterExecutorOperatorSetTaskConfigSet(opts *bind.FilterOpts, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (*TaskMailboxStorageExecutorOperatorSetTaskConfigSetIterator, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.FilterLogs(opts, "ExecutorOperatorSetTaskConfigSet", callerRule, avsRule, executorOperatorSetIdRule) + if err != nil { + return nil, err + } + return &TaskMailboxStorageExecutorOperatorSetTaskConfigSetIterator{contract: _TaskMailboxStorage.contract, event: "ExecutorOperatorSetTaskConfigSet", logs: logs, sub: sub}, nil +} + +// WatchExecutorOperatorSetTaskConfigSet is a free log subscription operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) WatchExecutorOperatorSetTaskConfigSet(opts *bind.WatchOpts, sink chan<- *TaskMailboxStorageExecutorOperatorSetTaskConfigSet, caller []common.Address, avs []common.Address, executorOperatorSetId []uint32) (event.Subscription, error) { + + var callerRule []interface{} + for _, callerItem := range caller { + callerRule = append(callerRule, callerItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + var executorOperatorSetIdRule []interface{} + for _, executorOperatorSetIdItem := range executorOperatorSetId { + executorOperatorSetIdRule = append(executorOperatorSetIdRule, executorOperatorSetIdItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.WatchLogs(opts, "ExecutorOperatorSetTaskConfigSet", callerRule, avsRule, executorOperatorSetIdRule) + 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(TaskMailboxStorageExecutorOperatorSetTaskConfigSet) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "ExecutorOperatorSetTaskConfigSet", 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 +} + +// ParseExecutorOperatorSetTaskConfigSet is a log parse operation binding the contract event 0x7cd76abd4025a20959a1b20f7c1536e3894a0735cd8de0215dde803ddea7f2d2. +// +// Solidity: event ExecutorOperatorSetTaskConfigSet(address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, (address,uint96,address,uint8,address,(uint8,bytes),bytes) config) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) ParseExecutorOperatorSetTaskConfigSet(log types.Log) (*TaskMailboxStorageExecutorOperatorSetTaskConfigSet, error) { + event := new(TaskMailboxStorageExecutorOperatorSetTaskConfigSet) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "ExecutorOperatorSetTaskConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxStorageFeeRefundedIterator is returned from FilterFeeRefunded and is used to iterate over the raw logs and unpacked data for FeeRefunded events raised by the TaskMailboxStorage contract. +type TaskMailboxStorageFeeRefundedIterator struct { + Event *TaskMailboxStorageFeeRefunded // 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 *TaskMailboxStorageFeeRefundedIterator) 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(TaskMailboxStorageFeeRefunded) + 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(TaskMailboxStorageFeeRefunded) + 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 *TaskMailboxStorageFeeRefundedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxStorageFeeRefundedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxStorageFeeRefunded represents a FeeRefunded event raised by the TaskMailboxStorage contract. +type TaskMailboxStorageFeeRefunded struct { + RefundCollector common.Address + TaskHash [32]byte + AvsFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeRefunded is a free log retrieval operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) FilterFeeRefunded(opts *bind.FilterOpts, refundCollector []common.Address, taskHash [][32]byte) (*TaskMailboxStorageFeeRefundedIterator, error) { + + var refundCollectorRule []interface{} + for _, refundCollectorItem := range refundCollector { + refundCollectorRule = append(refundCollectorRule, refundCollectorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.FilterLogs(opts, "FeeRefunded", refundCollectorRule, taskHashRule) + if err != nil { + return nil, err + } + return &TaskMailboxStorageFeeRefundedIterator{contract: _TaskMailboxStorage.contract, event: "FeeRefunded", logs: logs, sub: sub}, nil +} + +// WatchFeeRefunded is a free log subscription operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) WatchFeeRefunded(opts *bind.WatchOpts, sink chan<- *TaskMailboxStorageFeeRefunded, refundCollector []common.Address, taskHash [][32]byte) (event.Subscription, error) { + + var refundCollectorRule []interface{} + for _, refundCollectorItem := range refundCollector { + refundCollectorRule = append(refundCollectorRule, refundCollectorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.WatchLogs(opts, "FeeRefunded", refundCollectorRule, taskHashRule) + 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(TaskMailboxStorageFeeRefunded) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "FeeRefunded", 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 +} + +// ParseFeeRefunded is a log parse operation binding the contract event 0xe3ed40d31808582f7a92a30beacc0ec788d5091407ec6c10c1b999b3f317aea3. +// +// Solidity: event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) ParseFeeRefunded(log types.Log) (*TaskMailboxStorageFeeRefunded, error) { + event := new(TaskMailboxStorageFeeRefunded) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "FeeRefunded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxStorageFeeSplitCollectorSetIterator is returned from FilterFeeSplitCollectorSet and is used to iterate over the raw logs and unpacked data for FeeSplitCollectorSet events raised by the TaskMailboxStorage contract. +type TaskMailboxStorageFeeSplitCollectorSetIterator struct { + Event *TaskMailboxStorageFeeSplitCollectorSet // 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 *TaskMailboxStorageFeeSplitCollectorSetIterator) 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(TaskMailboxStorageFeeSplitCollectorSet) + 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(TaskMailboxStorageFeeSplitCollectorSet) + 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 *TaskMailboxStorageFeeSplitCollectorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxStorageFeeSplitCollectorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxStorageFeeSplitCollectorSet represents a FeeSplitCollectorSet event raised by the TaskMailboxStorage contract. +type TaskMailboxStorageFeeSplitCollectorSet struct { + FeeSplitCollector common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeSplitCollectorSet is a free log retrieval operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) FilterFeeSplitCollectorSet(opts *bind.FilterOpts, feeSplitCollector []common.Address) (*TaskMailboxStorageFeeSplitCollectorSetIterator, error) { + + var feeSplitCollectorRule []interface{} + for _, feeSplitCollectorItem := range feeSplitCollector { + feeSplitCollectorRule = append(feeSplitCollectorRule, feeSplitCollectorItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.FilterLogs(opts, "FeeSplitCollectorSet", feeSplitCollectorRule) + if err != nil { + return nil, err + } + return &TaskMailboxStorageFeeSplitCollectorSetIterator{contract: _TaskMailboxStorage.contract, event: "FeeSplitCollectorSet", logs: logs, sub: sub}, nil +} + +// WatchFeeSplitCollectorSet is a free log subscription operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) WatchFeeSplitCollectorSet(opts *bind.WatchOpts, sink chan<- *TaskMailboxStorageFeeSplitCollectorSet, feeSplitCollector []common.Address) (event.Subscription, error) { + + var feeSplitCollectorRule []interface{} + for _, feeSplitCollectorItem := range feeSplitCollector { + feeSplitCollectorRule = append(feeSplitCollectorRule, feeSplitCollectorItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.WatchLogs(opts, "FeeSplitCollectorSet", feeSplitCollectorRule) + 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(TaskMailboxStorageFeeSplitCollectorSet) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "FeeSplitCollectorSet", 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 +} + +// ParseFeeSplitCollectorSet is a log parse operation binding the contract event 0x262aa27c244f6f0088cb3092548a0adcaddedf459070a9ccab2dc6a07abe701d. +// +// Solidity: event FeeSplitCollectorSet(address indexed feeSplitCollector) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) ParseFeeSplitCollectorSet(log types.Log) (*TaskMailboxStorageFeeSplitCollectorSet, error) { + event := new(TaskMailboxStorageFeeSplitCollectorSet) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "FeeSplitCollectorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxStorageFeeSplitSetIterator is returned from FilterFeeSplitSet and is used to iterate over the raw logs and unpacked data for FeeSplitSet events raised by the TaskMailboxStorage contract. +type TaskMailboxStorageFeeSplitSetIterator struct { + Event *TaskMailboxStorageFeeSplitSet // 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 *TaskMailboxStorageFeeSplitSetIterator) 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(TaskMailboxStorageFeeSplitSet) + 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(TaskMailboxStorageFeeSplitSet) + 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 *TaskMailboxStorageFeeSplitSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxStorageFeeSplitSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxStorageFeeSplitSet represents a FeeSplitSet event raised by the TaskMailboxStorage contract. +type TaskMailboxStorageFeeSplitSet struct { + FeeSplit uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeSplitSet is a free log retrieval operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) FilterFeeSplitSet(opts *bind.FilterOpts) (*TaskMailboxStorageFeeSplitSetIterator, error) { + + logs, sub, err := _TaskMailboxStorage.contract.FilterLogs(opts, "FeeSplitSet") + if err != nil { + return nil, err + } + return &TaskMailboxStorageFeeSplitSetIterator{contract: _TaskMailboxStorage.contract, event: "FeeSplitSet", logs: logs, sub: sub}, nil +} + +// WatchFeeSplitSet is a free log subscription operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) WatchFeeSplitSet(opts *bind.WatchOpts, sink chan<- *TaskMailboxStorageFeeSplitSet) (event.Subscription, error) { + + logs, sub, err := _TaskMailboxStorage.contract.WatchLogs(opts, "FeeSplitSet") + 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(TaskMailboxStorageFeeSplitSet) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "FeeSplitSet", 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 +} + +// ParseFeeSplitSet is a log parse operation binding the contract event 0x886b2cfcb151fd8b19ed902cc88f4a06dd9fe351a4a9ab93f33fe84abc157edf. +// +// Solidity: event FeeSplitSet(uint16 feeSplit) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) ParseFeeSplitSet(log types.Log) (*TaskMailboxStorageFeeSplitSet, error) { + event := new(TaskMailboxStorageFeeSplitSet) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "FeeSplitSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxStorageTaskCreatedIterator is returned from FilterTaskCreated and is used to iterate over the raw logs and unpacked data for TaskCreated events raised by the TaskMailboxStorage contract. +type TaskMailboxStorageTaskCreatedIterator struct { + Event *TaskMailboxStorageTaskCreated // 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 *TaskMailboxStorageTaskCreatedIterator) 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(TaskMailboxStorageTaskCreated) + 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(TaskMailboxStorageTaskCreated) + 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 *TaskMailboxStorageTaskCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxStorageTaskCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxStorageTaskCreated represents a TaskCreated event raised by the TaskMailboxStorage contract. +type TaskMailboxStorageTaskCreated struct { + Creator common.Address + TaskHash [32]byte + Avs common.Address + ExecutorOperatorSetId uint32 + RefundCollector common.Address + AvsFee *big.Int + TaskDeadline *big.Int + Payload []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTaskCreated is a free log retrieval operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) FilterTaskCreated(opts *bind.FilterOpts, creator []common.Address, taskHash [][32]byte, avs []common.Address) (*TaskMailboxStorageTaskCreatedIterator, error) { + + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.FilterLogs(opts, "TaskCreated", creatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return &TaskMailboxStorageTaskCreatedIterator{contract: _TaskMailboxStorage.contract, event: "TaskCreated", logs: logs, sub: sub}, nil +} + +// WatchTaskCreated is a free log subscription operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) WatchTaskCreated(opts *bind.WatchOpts, sink chan<- *TaskMailboxStorageTaskCreated, creator []common.Address, taskHash [][32]byte, avs []common.Address) (event.Subscription, error) { + + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.WatchLogs(opts, "TaskCreated", creatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaskMailboxStorageTaskCreated) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "TaskCreated", 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 +} + +// ParseTaskCreated is a log parse operation binding the contract event 0x4a09af06a0e08fd1c053a8b400de7833019c88066be8a2d3b3b17174a74fe317. +// +// Solidity: event TaskCreated(address indexed creator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, address refundCollector, uint96 avsFee, uint256 taskDeadline, bytes payload) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) ParseTaskCreated(log types.Log) (*TaskMailboxStorageTaskCreated, error) { + event := new(TaskMailboxStorageTaskCreated) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "TaskCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaskMailboxStorageTaskVerifiedIterator is returned from FilterTaskVerified and is used to iterate over the raw logs and unpacked data for TaskVerified events raised by the TaskMailboxStorage contract. +type TaskMailboxStorageTaskVerifiedIterator struct { + Event *TaskMailboxStorageTaskVerified // 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 *TaskMailboxStorageTaskVerifiedIterator) 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(TaskMailboxStorageTaskVerified) + 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(TaskMailboxStorageTaskVerified) + 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 *TaskMailboxStorageTaskVerifiedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaskMailboxStorageTaskVerifiedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaskMailboxStorageTaskVerified represents a TaskVerified event raised by the TaskMailboxStorage contract. +type TaskMailboxStorageTaskVerified struct { + Aggregator common.Address + TaskHash [32]byte + Avs common.Address + ExecutorOperatorSetId uint32 + ExecutorCert []byte + Result []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTaskVerified is a free log retrieval operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) FilterTaskVerified(opts *bind.FilterOpts, aggregator []common.Address, taskHash [][32]byte, avs []common.Address) (*TaskMailboxStorageTaskVerifiedIterator, error) { + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.FilterLogs(opts, "TaskVerified", aggregatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return &TaskMailboxStorageTaskVerifiedIterator{contract: _TaskMailboxStorage.contract, event: "TaskVerified", logs: logs, sub: sub}, nil +} + +// WatchTaskVerified is a free log subscription operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) WatchTaskVerified(opts *bind.WatchOpts, sink chan<- *TaskMailboxStorageTaskVerified, aggregator []common.Address, taskHash [][32]byte, avs []common.Address) (event.Subscription, error) { + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + var taskHashRule []interface{} + for _, taskHashItem := range taskHash { + taskHashRule = append(taskHashRule, taskHashItem) + } + var avsRule []interface{} + for _, avsItem := range avs { + avsRule = append(avsRule, avsItem) + } + + logs, sub, err := _TaskMailboxStorage.contract.WatchLogs(opts, "TaskVerified", aggregatorRule, taskHashRule, avsRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaskMailboxStorageTaskVerified) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "TaskVerified", 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 +} + +// ParseTaskVerified is a log parse operation binding the contract event 0x659f23b2e7edf490e5fd6561c5148691ed0375ed7ddd3ab1bcfcfdbec4f209a9. +// +// Solidity: event TaskVerified(address indexed aggregator, bytes32 indexed taskHash, address indexed avs, uint32 executorOperatorSetId, bytes executorCert, bytes result) +func (_TaskMailboxStorage *TaskMailboxStorageFilterer) ParseTaskVerified(log types.Log) (*TaskMailboxStorageTaskVerified, error) { + event := new(TaskMailboxStorageTaskVerified) + if err := _TaskMailboxStorage.contract.UnpackLog(event, "TaskVerified", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/src/contracts/avs/task/TaskMailbox.sol b/src/contracts/avs/task/TaskMailbox.sol new file mode 100644 index 0000000000..08749f5b7b --- /dev/null +++ b/src/contracts/avs/task/TaskMailbox.sol @@ -0,0 +1,480 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {ReentrancyGuardUpgradeable} from "@openzeppelin-upgrades/contracts/security/ReentrancyGuardUpgradeable.sol"; +import {OwnableUpgradeable} from "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; +import {Initializable} from "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; + +import {IAVSTaskHook} from "../../interfaces/IAVSTaskHook.sol"; +import { + IBN254CertificateVerifier, IBN254CertificateVerifierTypes +} from "../../interfaces/IBN254CertificateVerifier.sol"; +import { + IECDSACertificateVerifier, IECDSACertificateVerifierTypes +} from "../../interfaces/IECDSACertificateVerifier.sol"; +import {IBaseCertificateVerifier} from "../../interfaces/IBaseCertificateVerifier.sol"; +import {IKeyRegistrarTypes} from "../../interfaces/IKeyRegistrar.sol"; +import {ITaskMailbox} from "../../interfaces/ITaskMailbox.sol"; +import {OperatorSet, OperatorSetLib} from "../../libraries/OperatorSetLib.sol"; +import {SemVerMixin} from "../../mixins/SemVerMixin.sol"; +import {TaskMailboxStorage} from "./TaskMailboxStorage.sol"; + +/** + * @title TaskMailbox + * @author Layr Labs, Inc. + * @notice Contract for managing the lifecycle of tasks that are executed by operator sets of task-based AVSs. + */ +contract TaskMailbox is + Initializable, + OwnableUpgradeable, + ReentrancyGuardUpgradeable, + TaskMailboxStorage, + SemVerMixin +{ + using SafeERC20 for IERC20; + using SafeCast for *; + + /** + * @notice Constructor for TaskMailbox + * @param _bn254CertificateVerifier Address of the BN254 certificate verifier + * @param _ecdsaCertificateVerifier Address of the ECDSA certificate verifier + * @param _version The semantic version of the contract + */ + constructor( + address _bn254CertificateVerifier, + address _ecdsaCertificateVerifier, + string memory _version + ) TaskMailboxStorage(_bn254CertificateVerifier, _ecdsaCertificateVerifier) SemVerMixin(_version) { + _disableInitializers(); + } + + /** + * @notice Initializer for TaskMailbox + * @param _owner The owner of the contract + * @param _feeSplit The initial fee split in basis points + * @param _feeSplitCollector The initial fee split collector address + */ + function initialize(address _owner, uint16 _feeSplit, address _feeSplitCollector) external initializer { + __Ownable_init(); + __ReentrancyGuard_init(); + _transferOwnership(_owner); + _setFeeSplit(_feeSplit); + _setFeeSplitCollector(_feeSplitCollector); + } + + /** + * + * EXTERNAL FUNCTIONS + * + */ + + /// @inheritdoc ITaskMailbox + function setExecutorOperatorSetTaskConfig( + OperatorSet memory operatorSet, + ExecutorOperatorSetTaskConfig memory config + ) external { + // Validate config + require(config.curveType != IKeyRegistrarTypes.CurveType.NONE, InvalidCurveType()); + require(config.taskHook != IAVSTaskHook(address(0)), InvalidAddressZero()); + require(config.taskSLA > 0, TaskSLAIsZero()); + _validateConsensus(config.consensus); + + // Validate operator set ownership + _validateOperatorSetOwner(operatorSet, config.curveType); + + _executorOperatorSetTaskConfigs[operatorSet.key()] = config; + emit ExecutorOperatorSetTaskConfigSet(msg.sender, operatorSet.avs, operatorSet.id, config); + + // If executor operator set is not registered, register it. + if (!isExecutorOperatorSetRegistered[operatorSet.key()]) { + _registerExecutorOperatorSet(operatorSet, true); + } + } + + /// @inheritdoc ITaskMailbox + function registerExecutorOperatorSet(OperatorSet memory operatorSet, bool isRegistered) external { + ExecutorOperatorSetTaskConfig memory taskConfig = _executorOperatorSetTaskConfigs[operatorSet.key()]; + + // Validate that task config has been set before registration can be toggled. + require( + taskConfig.curveType != IKeyRegistrarTypes.CurveType.NONE && address(taskConfig.taskHook) != address(0) + && taskConfig.taskSLA > 0 && taskConfig.consensus.consensusType != ConsensusType.NONE, + ExecutorOperatorSetTaskConfigNotSet() + ); + + // Validate operator set ownership + _validateOperatorSetOwner(operatorSet, taskConfig.curveType); + + _registerExecutorOperatorSet(operatorSet, isRegistered); + } + + /// @inheritdoc ITaskMailbox + function createTask( + TaskParams memory taskParams + ) external nonReentrant returns (bytes32) { + require(taskParams.payload.length > 0, PayloadIsEmpty()); + require( + isExecutorOperatorSetRegistered[taskParams.executorOperatorSet.key()], ExecutorOperatorSetNotRegistered() + ); + + ExecutorOperatorSetTaskConfig memory taskConfig = + _executorOperatorSetTaskConfigs[taskParams.executorOperatorSet.key()]; + require( + taskConfig.curveType != IKeyRegistrarTypes.CurveType.NONE && address(taskConfig.taskHook) != address(0) + && taskConfig.taskSLA > 0 && taskConfig.consensus.consensusType != ConsensusType.NONE, + ExecutorOperatorSetTaskConfigNotSet() + ); + + // Pre-task submission checks: AVS can validate the caller and task params. + taskConfig.taskHook.validatePreTaskCreation(msg.sender, taskParams); + + // Calculate the AVS fee using the task hook + uint96 avsFee = taskConfig.taskHook.calculateTaskFee(taskParams); + + bytes32 taskHash = keccak256(abi.encode(_globalTaskCount, address(this), block.chainid, taskParams)); + _globalTaskCount = _globalTaskCount + 1; + + _tasks[taskHash] = Task( + msg.sender, + block.timestamp.toUint96(), + taskParams.executorOperatorSet.avs, + avsFee, + taskParams.refundCollector, + taskParams.executorOperatorSet.id, + feeSplit, + TaskStatus.CREATED, + false, // isFeeRefunded + taskConfig, + taskParams.payload, + bytes(""), + bytes("") + ); + + // Transfer fee to the TaskMailbox if there's a fee to transfer + if (taskConfig.feeToken != IERC20(address(0)) && avsFee > 0) { + require(taskConfig.feeCollector != address(0), InvalidFeeReceiver()); + require(taskParams.refundCollector != address(0), InvalidFeeReceiver()); + taskConfig.feeToken.safeTransferFrom(msg.sender, address(this), avsFee); + } + + // Post-task submission checks: AVS can write to storage in their hook for validating task lifecycle + taskConfig.taskHook.handlePostTaskCreation(taskHash); + + emit TaskCreated( + msg.sender, + taskHash, + taskParams.executorOperatorSet.avs, + taskParams.executorOperatorSet.id, + taskParams.refundCollector, + avsFee, + block.timestamp + taskConfig.taskSLA, + taskParams.payload + ); + return taskHash; + } + + /// @inheritdoc ITaskMailbox + function submitResult(bytes32 taskHash, bytes memory executorCert, bytes memory result) external nonReentrant { + Task storage task = _tasks[taskHash]; + TaskStatus status = _getTaskStatus(task); + require(status == TaskStatus.CREATED, InvalidTaskStatus(TaskStatus.CREATED, status)); + require(block.timestamp > task.creationTime, TimestampAtCreation()); + + // Pre-task result submission checks: AVS can validate the caller, task result, params and certificate. + task.executorOperatorSetTaskConfig.taskHook.validatePreTaskResultSubmission( + msg.sender, taskHash, executorCert, result + ); + + // Verify certificate based on consensus configuration + OperatorSet memory executorOperatorSet = OperatorSet(task.avs, task.executorOperatorSetId); + bool isCertificateValid = _verifyExecutorCertificate( + task.executorOperatorSetTaskConfig.curveType, + task.executorOperatorSetTaskConfig.consensus, + executorOperatorSet, + executorCert + ); + require(isCertificateValid, CertificateVerificationFailed()); + + task.status = TaskStatus.VERIFIED; + task.executorCert = executorCert; + task.result = result; + + // Transfer fee to the fee collector if there's a fee to transfer + if (task.executorOperatorSetTaskConfig.feeToken != IERC20(address(0)) && task.avsFee > 0) { + // Calculate fee split amount + uint96 feeSplitAmount = ((uint256(task.avsFee) * task.feeSplit) / ONE_HUNDRED_IN_BIPS).toUint96(); + + // Transfer split to fee split collector if there's a split + if (feeSplitAmount > 0) { + task.executorOperatorSetTaskConfig.feeToken.safeTransfer(feeSplitCollector, feeSplitAmount); + } + + // Transfer remaining fee to AVS fee collector + uint96 avsAmount = task.avsFee - feeSplitAmount; + if (avsAmount > 0) { + task.executorOperatorSetTaskConfig.feeToken.safeTransfer( + task.executorOperatorSetTaskConfig.feeCollector, avsAmount + ); + } + } + + // Post-task result submission checks: AVS can update hook storage for task lifecycle if needed. + task.executorOperatorSetTaskConfig.taskHook.handlePostTaskResultSubmission(taskHash); + + emit TaskVerified(msg.sender, taskHash, task.avs, task.executorOperatorSetId, task.executorCert, task.result); + } + + /// @inheritdoc ITaskMailbox + function refundFee( + bytes32 taskHash + ) external nonReentrant { + Task storage task = _tasks[taskHash]; + require(task.refundCollector == msg.sender, OnlyRefundCollector()); + require(!task.isFeeRefunded, FeeAlreadyRefunded()); + + TaskStatus status = _getTaskStatus(task); + require(status == TaskStatus.EXPIRED, InvalidTaskStatus(TaskStatus.EXPIRED, status)); + + // Mark fee as refunded to prevent double refunds + task.isFeeRefunded = true; + + // Transfer fee to refund collector if there's a fee to refund + if (task.executorOperatorSetTaskConfig.feeToken != IERC20(address(0)) && task.avsFee > 0) { + task.executorOperatorSetTaskConfig.feeToken.safeTransfer(task.refundCollector, task.avsFee); + } + + emit FeeRefunded(task.refundCollector, taskHash, task.avsFee); + } + + /// @inheritdoc ITaskMailbox + function setFeeSplit( + uint16 _feeSplit + ) external onlyOwner { + _setFeeSplit(_feeSplit); + } + + /// @inheritdoc ITaskMailbox + function setFeeSplitCollector( + address _feeSplitCollector + ) external onlyOwner { + _setFeeSplitCollector(_feeSplitCollector); + } + + /** + * + * INTERNAL FUNCTIONS + * + */ + + /** + * @notice Sets the fee split percentage + * @param _feeSplit The fee split in basis points (0-10000) + */ + function _setFeeSplit( + uint16 _feeSplit + ) internal { + require(_feeSplit <= ONE_HUNDRED_IN_BIPS, InvalidFeeSplit()); + feeSplit = _feeSplit; + emit FeeSplitSet(_feeSplit); + } + + /** + * @notice Sets the fee split collector address + * @param _feeSplitCollector The address to receive fee splits + */ + function _setFeeSplitCollector( + address _feeSplitCollector + ) internal { + require(_feeSplitCollector != address(0), InvalidAddressZero()); + feeSplitCollector = _feeSplitCollector; + emit FeeSplitCollectorSet(_feeSplitCollector); + } + + /** + * @notice Gets the current status of a task + * @param task The task to get the status for + * @return The current status of the task, considering expiration + */ + function _getTaskStatus( + Task memory task + ) internal view returns (TaskStatus) { + if ( + task.status == TaskStatus.CREATED + && block.timestamp > (task.creationTime + task.executorOperatorSetTaskConfig.taskSLA) + ) { + return TaskStatus.EXPIRED; + } + return task.status; + } + + /** + * @notice Registers an executor operator set with the TaskMailbox + * @param operatorSet The operator set to register + * @param isRegistered Whether the operator set is registered + */ + function _registerExecutorOperatorSet(OperatorSet memory operatorSet, bool isRegistered) internal { + isExecutorOperatorSetRegistered[operatorSet.key()] = isRegistered; + emit ExecutorOperatorSetRegistered(msg.sender, operatorSet.avs, operatorSet.id, isRegistered); + } + + /** + * @notice Validates that the caller is the owner of the operator set + * @param operatorSet The operator set to validate ownership for + * @param curveType The curve type used to determine the certificate verifier + */ + function _validateOperatorSetOwner( + OperatorSet memory operatorSet, + IKeyRegistrarTypes.CurveType curveType + ) internal view { + address certificateVerifier; + if (curveType == IKeyRegistrarTypes.CurveType.BN254) { + certificateVerifier = BN254_CERTIFICATE_VERIFIER; + } else if (curveType == IKeyRegistrarTypes.CurveType.ECDSA) { + certificateVerifier = ECDSA_CERTIFICATE_VERIFIER; + } else { + revert InvalidCurveType(); + } + + require( + IBaseCertificateVerifier(certificateVerifier).getOperatorSetOwner(operatorSet) == msg.sender, + InvalidOperatorSetOwner() + ); + } + + /** + * @notice Validates the consensus configuration + * @param consensus The consensus configuration to validate + */ + function _validateConsensus( + Consensus memory consensus + ) internal pure { + if (consensus.consensusType == ConsensusType.STAKE_PROPORTION_THRESHOLD) { + // Decode and validate the stake proportion threshold + require(consensus.value.length == 32, InvalidConsensusValue()); + uint16 stakeProportionThreshold = abi.decode(consensus.value, (uint16)); + require(stakeProportionThreshold <= ONE_HUNDRED_IN_BIPS, InvalidConsensusValue()); + } else { + revert InvalidConsensusType(); + } + } + + /** + * @notice Verifies an executor certificate based on the consensus configuration + * @param curveType The curve type used for signature verification + * @param consensus The consensus configuration + * @param executorOperatorSet The executor operator set + * @param executorCert The executor certificate to verify + * @return isCertificateValid Whether the certificate is valid + */ + function _verifyExecutorCertificate( + IKeyRegistrarTypes.CurveType curveType, + Consensus memory consensus, + OperatorSet memory executorOperatorSet, + bytes memory executorCert + ) internal returns (bool isCertificateValid) { + if (consensus.consensusType == ConsensusType.STAKE_PROPORTION_THRESHOLD) { + // Decode stake proportion threshold + uint16 stakeProportionThreshold = abi.decode(consensus.value, (uint16)); + uint16[] memory totalStakeProportionThresholds = new uint16[](1); + totalStakeProportionThresholds[0] = stakeProportionThreshold; + + // Verify certificate based on curve type + if (curveType == IKeyRegistrarTypes.CurveType.BN254) { + // BN254 Certificate verification + IBN254CertificateVerifierTypes.BN254Certificate memory bn254Cert = + abi.decode(executorCert, (IBN254CertificateVerifierTypes.BN254Certificate)); + + // Validate that the certificate has a non-empty signature + require(bn254Cert.signature.X != 0 && bn254Cert.signature.Y != 0, EmptyCertificateSignature()); + + isCertificateValid = IBN254CertificateVerifier(BN254_CERTIFICATE_VERIFIER).verifyCertificateProportion( + executorOperatorSet, bn254Cert, totalStakeProportionThresholds + ); + } else if (curveType == IKeyRegistrarTypes.CurveType.ECDSA) { + // ECDSA Certificate verification + IECDSACertificateVerifierTypes.ECDSACertificate memory ecdsaCert = + abi.decode(executorCert, (IECDSACertificateVerifierTypes.ECDSACertificate)); + + // Validate that the certificate has a non-empty signature + require(ecdsaCert.sig.length > 0, EmptyCertificateSignature()); + + (isCertificateValid,) = IECDSACertificateVerifier(ECDSA_CERTIFICATE_VERIFIER) + .verifyCertificateProportion(executorOperatorSet, ecdsaCert, totalStakeProportionThresholds); + } else { + revert InvalidCurveType(); + } + } else { + revert InvalidConsensusType(); + } + } + + /** + * + * VIEW FUNCTIONS + * + */ + + /// @inheritdoc ITaskMailbox + function getExecutorOperatorSetTaskConfig( + OperatorSet memory operatorSet + ) external view returns (ExecutorOperatorSetTaskConfig memory) { + return _executorOperatorSetTaskConfigs[operatorSet.key()]; + } + + /// @inheritdoc ITaskMailbox + function getTaskInfo( + bytes32 taskHash + ) external view returns (Task memory) { + Task memory task = _tasks[taskHash]; + return Task( + task.creator, + task.creationTime, + task.avs, + task.avsFee, + task.refundCollector, + task.executorOperatorSetId, + task.feeSplit, + _getTaskStatus(task), + task.isFeeRefunded, + task.executorOperatorSetTaskConfig, + task.payload, + task.executorCert, + task.result + ); + } + + /// @inheritdoc ITaskMailbox + function getTaskStatus( + bytes32 taskHash + ) external view returns (TaskStatus) { + Task memory task = _tasks[taskHash]; + return _getTaskStatus(task); + } + + /// @inheritdoc ITaskMailbox + function getTaskResult( + bytes32 taskHash + ) external view returns (bytes memory) { + Task memory task = _tasks[taskHash]; + TaskStatus status = _getTaskStatus(task); + require(status == TaskStatus.VERIFIED, InvalidTaskStatus(TaskStatus.VERIFIED, status)); + return task.result; + } + + /// @inheritdoc ITaskMailbox + function getBN254CertificateBytes( + IBN254CertificateVerifierTypes.BN254Certificate memory cert + ) external pure returns (bytes memory) { + return abi.encode(cert); + } + + /// @inheritdoc ITaskMailbox + function getECDSACertificateBytes( + IECDSACertificateVerifierTypes.ECDSACertificate memory cert + ) external pure returns (bytes memory) { + return abi.encode(cert); + } +} diff --git a/src/contracts/avs/task/TaskMailboxStorage.sol b/src/contracts/avs/task/TaskMailboxStorage.sol new file mode 100644 index 0000000000..2986bffb87 --- /dev/null +++ b/src/contracts/avs/task/TaskMailboxStorage.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {ITaskMailbox} from "../../interfaces/ITaskMailbox.sol"; +import {IKeyRegistrarTypes} from "../../interfaces/IKeyRegistrar.sol"; + +/** + * @title TaskMailboxStorage + * @author Layr Labs, Inc. + * @notice Storage contract for the TaskMailbox contract. + */ +abstract contract TaskMailboxStorage is ITaskMailbox { + /// @notice Equivalent to 100%, but in basis points. + uint16 internal constant ONE_HUNDRED_IN_BIPS = 10_000; + + /// @notice Immutable BN254 certificate verifier + address public immutable BN254_CERTIFICATE_VERIFIER; + + /// @notice Immutable ECDSA certificate verifier + address public immutable ECDSA_CERTIFICATE_VERIFIER; + + /// @notice Global counter for tasks created across the TaskMailbox + uint256 internal _globalTaskCount; + + /// @notice Mapping from task hash to task details + mapping(bytes32 taskHash => Task task) internal _tasks; + + /// @notice Mapping to track registered executor operator sets by their keys + mapping(bytes32 operatorSetKey => bool isRegistered) public isExecutorOperatorSetRegistered; + + /// @notice Mapping from executor operator set key to its task configuration + mapping(bytes32 operatorSetKey => ExecutorOperatorSetTaskConfig config) internal _executorOperatorSetTaskConfigs; + + /// @notice The fee split percentage in basis points (0-10000) + uint16 public feeSplit; + + /// @notice The address that receives the fee split + address public feeSplitCollector; + + /** + * @notice Constructor for TaskMailboxStorage + * @param _bn254CertificateVerifier Address of the BN254 certificate verifier + * @param _ecdsaCertificateVerifier Address of the ECDSA certificate verifier + */ + constructor(address _bn254CertificateVerifier, address _ecdsaCertificateVerifier) { + BN254_CERTIFICATE_VERIFIER = _bn254CertificateVerifier; + ECDSA_CERTIFICATE_VERIFIER = _ecdsaCertificateVerifier; + } + + /** + * @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[45] private __gap; +} diff --git a/src/contracts/interfaces/IAVSTaskHook.sol b/src/contracts/interfaces/IAVSTaskHook.sol new file mode 100644 index 0000000000..676d837656 --- /dev/null +++ b/src/contracts/interfaces/IAVSTaskHook.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {ITaskMailboxTypes} from "./ITaskMailbox.sol"; +import {OperatorSet} from "../libraries/OperatorSetLib.sol"; + +/** + * @title IAVSTaskHook + * @author Layr Labs, Inc. + * @notice Interface for AVS-specific task lifecycle hooks. + * @dev This interface allows AVSs to implement custom validation logic for tasks. + */ +interface IAVSTaskHook { + /** + * @notice Validates a task before it is created + * @param caller Address that is creating the task + * @param taskParams Task parameters + * @dev This function should revert if the task should not be created + */ + function validatePreTaskCreation(address caller, ITaskMailboxTypes.TaskParams memory taskParams) external view; + + /** + * @notice Handles a task after it is created + * @param taskHash Unique identifier of the task + * @dev This function can be used to perform additional validation or update AVS-specific state + */ + function handlePostTaskCreation( + bytes32 taskHash + ) external; + + /** + * @notice Validates a task before it is submitted for verification + * @param caller Address that is submitting the result + * @param taskHash Unique identifier of the task + * @param cert Certificate proving the validity of the result + * @param result Task execution result data + * @dev This function should revert if the task should not be verified + */ + function validatePreTaskResultSubmission( + address caller, + bytes32 taskHash, + bytes memory cert, + bytes memory result + ) external view; + + /** + * @notice Handles a task result submission + * @param taskHash Unique identifier of the task + * @dev This function can be used to perform additional validation or update AVS-specific state + */ + function handlePostTaskResultSubmission( + bytes32 taskHash + ) external; + + /** + * @notice Calculates the fee for a task payload against a specific fee market + * @param taskParams The task parameters + * @return The fee for the task + */ + function calculateTaskFee( + ITaskMailboxTypes.TaskParams memory taskParams + ) external view returns (uint96); +} diff --git a/src/contracts/interfaces/ITaskMailbox.sol b/src/contracts/interfaces/ITaskMailbox.sol new file mode 100644 index 0000000000..0d82251e71 --- /dev/null +++ b/src/contracts/interfaces/ITaskMailbox.sol @@ -0,0 +1,449 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +import {IAVSTaskHook} from "./IAVSTaskHook.sol"; +import {IBN254CertificateVerifierTypes} from "./IBN254CertificateVerifier.sol"; +import {IECDSACertificateVerifierTypes} from "./IECDSACertificateVerifier.sol"; +import {IKeyRegistrarTypes} from "./IKeyRegistrar.sol"; +import {OperatorSet, OperatorSetLib} from "../libraries/OperatorSetLib.sol"; + +/** + * @title ITaskMailboxTypes + * @notice Interface defining the type structures used in the TaskMailbox + */ +interface ITaskMailboxTypes { + /** + * @notice Enum defining the type of consensus mechanism + */ + enum ConsensusType { + NONE, + STAKE_PROPORTION_THRESHOLD + } + + /** + * @notice Consensus configuration for task verification + * @param consensusType The type of consensus mechanism + * @param value Encoded consensus parameters based on consensusType + */ + struct Consensus { + ConsensusType consensusType; + bytes value; + } + + /** + * @notice Configuration for the executor operator set + * @param taskHook Address of the AVS task hook contract + * @param taskSLA Time (in seconds) within which the task must be completed + * @param feeToken ERC20 token used for task fees + * @param curveType The curve type used for signature verification + * @param feeCollector Address to receive AVS fees + * @param consensus Consensus configuration for task verification + * @param taskMetadata Additional metadata for task execution + */ + struct ExecutorOperatorSetTaskConfig { + // Storage slot 1: taskHook (20 bytes) + taskSLA (12 bytes) = 32 bytes + IAVSTaskHook taskHook; + uint96 taskSLA; + // Storage slot 2: feeToken (20 bytes) + curveType (1 byte) = 21 bytes (11 bytes unused) + IERC20 feeToken; + IKeyRegistrarTypes.CurveType curveType; + // Storage slot 3: feeCollector (20 bytes) = 20 bytes (12 bytes unused) + address feeCollector; + // Dynamic storage slots + Consensus consensus; + bytes taskMetadata; + } + + /** + * @notice Parameters for creating a new task + * @param refundCollector Address to receive refunds if task is not completed + * @param executorOperatorSet The operator set that will execute the task + * @param payload Task payload + */ + struct TaskParams { + address refundCollector; + OperatorSet executorOperatorSet; + bytes payload; + } + + /** + * @notice Status of a task in the system + */ + enum TaskStatus { + NONE, // 0 - Default value for uninitialized tasks + CREATED, // 1 - Task has been created + VERIFIED, // 2 - Task has been verified + EXPIRED // 3 - Task has expired + + } + + /** + * @notice Complete task information + * @param creator Address that created the task + * @param creationTime Block timestamp when task was created + * @param avs Address of the AVS handling the task + * @param avsFee Fee paid to the AVS + * @param refundCollector Address to receive refunds + * @param executorOperatorSetId ID of the operator set executing the task + * @param feeSplit Percentage split of fees taken by the TaskMailbox in basis points + * @param status Current status of the task + * @param isFeeRefunded Whether the fee has been refunded + * @param executorOperatorSetTaskConfig Configuration for executor operator set task execution + * @param payload Task payload + * @param executorCert Executor certificate + * @param result Task execution result data + */ + struct Task { + // Storage slot 1: creator (20 bytes) + creationTime (12 bytes) = 32 bytes + address creator; + uint96 creationTime; + // Storage slot 2: avs (20 bytes) + avsFee (12 bytes) = 32 bytes + address avs; + uint96 avsFee; + // Storage slot 3: refundCollector (20 bytes) + executorOperatorSetId (4 bytes) + feeSplit (2 bytes) + status (1 byte) + isFeeRefunded (1 byte) = 28 bytes (4 bytes unused) + address refundCollector; + uint32 executorOperatorSetId; + uint16 feeSplit; + TaskStatus status; + bool isFeeRefunded; + // Dynamic storage slots + ExecutorOperatorSetTaskConfig executorOperatorSetTaskConfig; + bytes payload; + bytes executorCert; + bytes result; + } +} + +/** + * @title ITaskMailboxErrors + * @notice Interface defining errors that can be thrown by the TaskMailbox + */ +interface ITaskMailboxErrors is ITaskMailboxTypes { + /// @notice Thrown when a certificate verification fails + error CertificateVerificationFailed(); + + /// @notice Thrown when an executor operator set is not registered + error ExecutorOperatorSetNotRegistered(); + + /// @notice Thrown when an executor operator set task config is not set + error ExecutorOperatorSetTaskConfigNotSet(); + + /// @notice Thrown when an input address is zero + error InvalidAddressZero(); + + /// @notice Thrown when an invalid curve type is provided + error InvalidCurveType(); + + /// @notice Thrown when a task creator is invalid + error InvalidTaskCreator(); + + /// @notice Thrown when a task status is invalid + /// @param expected The expected task status + /// @param actual The actual task status + error InvalidTaskStatus(TaskStatus expected, TaskStatus actual); + + /// @notice Thrown when a payload is empty + error PayloadIsEmpty(); + + /// @notice Thrown when a task SLA is zero + error TaskSLAIsZero(); + + /// @notice Thrown when a timestamp is at creation + error TimestampAtCreation(); + + /// @notice Thrown when an operator set owner is invalid + error InvalidOperatorSetOwner(); + + /// @notice Thrown when an invalid consensus type is provided + error InvalidConsensusType(); + + /// @notice Thrown when an invalid consensus value is provided + error InvalidConsensusValue(); + + /// @notice Thrown when a certificate has an empty signature + error EmptyCertificateSignature(); + + /// @notice Thrown when fee receiver is zero address + error InvalidFeeReceiver(); + + /// @notice Thrown when fee has already been refunded + error FeeAlreadyRefunded(); + + /// @notice Thrown when caller is not the refund collector + error OnlyRefundCollector(); + + /// @notice Thrown when fee split value is invalid (> 10000 bips) + error InvalidFeeSplit(); +} + +/** + * @title ITaskMailboxEvents + * @notice Interface defining events emitted by the TaskMailbox + */ +interface ITaskMailboxEvents is ITaskMailboxTypes { + /** + * @notice Emitted when an executor operator set is registered + * @param caller Address that called the registration function + * @param avs Address of the AVS being registered + * @param executorOperatorSetId ID of the executor operator set + * @param isRegistered Whether the operator set is registered + */ + event ExecutorOperatorSetRegistered( + address indexed caller, address indexed avs, uint32 indexed executorOperatorSetId, bool isRegistered + ); + + /** + * @notice Emitted when an executor operator set task configuration is set + * @param caller Address that called the configuration function + * @param avs Address of the AVS being configured + * @param executorOperatorSetId ID of the executor operator set + * @param config The task configuration for the executor operator set + */ + event ExecutorOperatorSetTaskConfigSet( + address indexed caller, + address indexed avs, + uint32 indexed executorOperatorSetId, + ExecutorOperatorSetTaskConfig config + ); + + /** + * @notice Emitted when a new task is created + * @param creator Address that created the task + * @param taskHash Unique identifier of the task + * @param avs Address of the AVS handling the task + * @param executorOperatorSetId ID of the executor operator set + * @param refundCollector Address to receive refunds + * @param avsFee Fee paid to the AVS + * @param taskDeadline Timestamp by which the task must be completed + * @param payload Task payload + */ + event TaskCreated( + address indexed creator, + bytes32 indexed taskHash, + address indexed avs, + uint32 executorOperatorSetId, + address refundCollector, + uint96 avsFee, + uint256 taskDeadline, + bytes payload + ); + + /** + * @notice Emitted when a task is verified + * @param aggregator Address that submitted the verification + * @param taskHash Unique identifier of the task + * @param avs Address of the AVS handling the task + * @param executorOperatorSetId ID of the executor operator set + * @param executorCert Executor certificate + * @param result Task execution result data + */ + event TaskVerified( + address indexed aggregator, + bytes32 indexed taskHash, + address indexed avs, + uint32 executorOperatorSetId, + bytes executorCert, + bytes result + ); + + /** + * @notice Emitted when a task fee is refunded + * @param refundCollector Address that received the refund + * @param taskHash Unique identifier of the task + * @param avsFee Amount of fee refunded + */ + event FeeRefunded(address indexed refundCollector, bytes32 indexed taskHash, uint96 avsFee); + + /** + * @notice Emitted when the fee split is updated + * @param feeSplit The new fee split value in basis points + */ + event FeeSplitSet(uint16 feeSplit); + + /** + * @notice Emitted when the fee split collector is updated + * @param feeSplitCollector The new fee split collector address + */ + event FeeSplitCollectorSet(address indexed feeSplitCollector); +} + +/** + * @title ITaskMailbox + * @author Layr Labs, Inc. + * @notice Interface for the TaskMailbox contract. + */ +interface ITaskMailbox is ITaskMailboxErrors, ITaskMailboxEvents { + /** + * + * EXTERNAL FUNCTIONS + * + */ + + /** + * @notice Initializes the TaskMailbox + * @param owner The owner of the contract + * @param feeSplit The initial fee split in basis points + * @param feeSplitCollector The initial fee split collector address + */ + function initialize(address owner, uint16 feeSplit, address feeSplitCollector) external; + + /** + * @notice Sets the task configuration for an executor operator set + * @param operatorSet The operator set to configure + * @param config Task configuration for the operator set + * @dev Fees can be switched off by setting the fee token to the zero address. + */ + function setExecutorOperatorSetTaskConfig( + OperatorSet memory operatorSet, + ExecutorOperatorSetTaskConfig memory config + ) external; + + /** + * @notice Registers an executor operator set with the TaskMailbox + * @param operatorSet The operator set to register + * @param isRegistered Whether the operator set is registered + * @dev This function can be called to toggle the registration once the task config has been set. + */ + function registerExecutorOperatorSet(OperatorSet memory operatorSet, bool isRegistered) external; + + /** + * @notice Creates a new task + * @param taskParams Parameters for the task + * @return taskHash Unique identifier of the created task + * @dev If the operator set has its fee token set, call `IAVSTaskHook.calculateTaskFee()` to get + * the fee for the task and approve the TaskMailbox for the fee before calling this function. + */ + function createTask( + TaskParams memory taskParams + ) external returns (bytes32 taskHash); + + /** + * @notice Submits the result of a task execution + * @param taskHash Unique identifier of the task + * @param executorCert Certificate proving the validity of the result + * @param result Task execution result data + */ + function submitResult(bytes32 taskHash, bytes memory executorCert, bytes memory result) external; + + /** + * @notice Refunds the fee for an expired task + * @param taskHash Unique identifier of the task + * @dev Can only be called by the refund collector for expired tasks + */ + function refundFee( + bytes32 taskHash + ) external; + + /** + * @notice Sets the fee split percentage + * @param feeSplit The fee split in basis points (0-10000) + * @dev Only callable by the owner + */ + function setFeeSplit( + uint16 feeSplit + ) external; + + /** + * @notice Sets the fee split collector address + * @param feeSplitCollector The address to receive fee splits + * @dev Only callable by the owner + */ + function setFeeSplitCollector( + address feeSplitCollector + ) external; + + /** + * + * VIEW FUNCTIONS + * + */ + + /** + * @notice Checks if an executor operator set is registered + * @param operatorSetKey Key of the operator set to check + * @return True if the executor operator set is registered, false otherwise + */ + function isExecutorOperatorSetRegistered( + bytes32 operatorSetKey + ) external view returns (bool); + + /** + * @notice Gets the task configuration for an executor operator set + * @param operatorSet The operator set to get configuration for + * @return Task configuration for the operator set + */ + function getExecutorOperatorSetTaskConfig( + OperatorSet memory operatorSet + ) external view returns (ExecutorOperatorSetTaskConfig memory); + + /** + * @notice Gets complete information about a task + * @param taskHash Unique identifier of the task + * @return Complete task information + */ + function getTaskInfo( + bytes32 taskHash + ) external view returns (Task memory); + + /** + * @notice Gets the current status of a task + * @param taskHash Unique identifier of the task + * @return Current status of the task + */ + function getTaskStatus( + bytes32 taskHash + ) external view returns (TaskStatus); + + /** + * @notice Gets the result of a verified task + * @param taskHash Unique identifier of the task + * @return Result data of the task + */ + function getTaskResult( + bytes32 taskHash + ) external view returns (bytes memory); + + /** + * @notice Gets the bytes of a BN254 certificate + * @param cert The certificate to get the bytes of + * @return The bytes of the certificate + */ + function getBN254CertificateBytes( + IBN254CertificateVerifierTypes.BN254Certificate memory cert + ) external pure returns (bytes memory); + + /** + * @notice Gets the bytes of a ECDSA certificate + * @param cert The certificate to get the bytes of + * @return The bytes of the certificate + */ + function getECDSACertificateBytes( + IECDSACertificateVerifierTypes.ECDSACertificate memory cert + ) external pure returns (bytes memory); + + /** + * @notice Gets the current fee split percentage + * @return The fee split in basis points + */ + function feeSplit() external view returns (uint16); + + /** + * @notice Gets the current fee split collector address + * @return The address that receives fee splits + */ + function feeSplitCollector() external view returns (address); + + /** + * @notice Gets the BN254 certificate verifier address + * @return The address of the BN254 certificate verifier + */ + function BN254_CERTIFICATE_VERIFIER() external view returns (address); + + /** + * @notice Gets the ECDSA certificate verifier address + * @return The address of the ECDSA certificate verifier + */ + function ECDSA_CERTIFICATE_VERIFIER() external view returns (address); +} diff --git a/src/test/mocks/AVSTaskHookReentrantAttacker.sol b/src/test/mocks/AVSTaskHookReentrantAttacker.sol new file mode 100644 index 0000000000..9ccdb5a5f8 --- /dev/null +++ b/src/test/mocks/AVSTaskHookReentrantAttacker.sol @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {IBN254CertificateVerifierTypes} from "src/contracts/interfaces/IBN254CertificateVerifier.sol"; +import {OperatorSet} from "src/contracts/libraries/OperatorSetLib.sol"; +import {BN254} from "src/contracts/libraries/BN254.sol"; + +import {TaskMailbox} from "src/contracts/avs/task/TaskMailbox.sol"; +import {ITaskMailboxTypes} from "src/contracts/interfaces/ITaskMailbox.sol"; +import {IAVSTaskHook} from "src/contracts/interfaces/IAVSTaskHook.sol"; + +/** + * @title AVSTaskHookReentrantAttacker + * @notice Mock contract for testing reentrancy protection in AVSTaskHook + */ +contract AVSTaskHookReentrantAttacker is IAVSTaskHook, ITaskMailboxTypes { + TaskMailbox public taskMailbox; + + // Store attack parameters individually to avoid memory/storage issues + address public refundCollector; + address public executorOperatorSetAvs; + uint32 public executorOperatorSetId; + bytes public payload; + + bytes32 public attackTaskHash; + bytes public result; + bool public attackOnPost; + bool public attackCreateTask; + + constructor(address _taskMailbox) { + taskMailbox = TaskMailbox(_taskMailbox); + } + + function setAttackParams( + TaskParams memory _taskParams, + bytes32 _attackTaskHash, + IBN254CertificateVerifierTypes.BN254Certificate memory, // unused but kept for interface compatibility + bytes memory _result, + bool _attackOnPost, + bool _attackCreateTask + ) external { + // Store TaskParams fields individually + refundCollector = _taskParams.refundCollector; + executorOperatorSetAvs = _taskParams.executorOperatorSet.avs; + executorOperatorSetId = _taskParams.executorOperatorSet.id; + payload = _taskParams.payload; + + attackTaskHash = _attackTaskHash; + result = _result; + attackOnPost = _attackOnPost; + attackCreateTask = _attackCreateTask; + } + + function validatePreTaskCreation(address, TaskParams memory) external view {} + + function handlePostTaskCreation(bytes32) external override { + if (attackOnPost) { + if (attackCreateTask) { + // Reconstruct TaskParams for the attack + TaskParams memory taskParams = TaskParams({ + refundCollector: refundCollector, + executorOperatorSet: OperatorSet(executorOperatorSetAvs, executorOperatorSetId), + payload: payload + }); + // Try to reenter createTask + taskMailbox.createTask(taskParams); + } else { + // Reconstruct certificate for the attack + IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: attackTaskHash, + signature: BN254.G1Point(0, 0), + apk: BN254.G2Point([uint(0), uint(0)], [uint(0), uint(0)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + // Try to reenter submitResult + taskMailbox.submitResult(attackTaskHash, abi.encode(cert), result); + } + } + } + + function validatePreTaskResultSubmission(address, bytes32, bytes memory, bytes memory) external view {} + + function handlePostTaskResultSubmission(bytes32) external { + if (!attackOnPost) { + if (attackCreateTask) { + // Reconstruct TaskParams for the attack + TaskParams memory taskParams = TaskParams({ + refundCollector: refundCollector, + executorOperatorSet: OperatorSet(executorOperatorSetAvs, executorOperatorSetId), + payload: payload + }); + // Try to reenter createTask + taskMailbox.createTask(taskParams); + } else { + // Reconstruct certificate for the attack + IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: attackTaskHash, + signature: BN254.G1Point(0, 0), + apk: BN254.G2Point([uint(0), uint(0)], [uint(0), uint(0)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + // Try to reenter submitResult + taskMailbox.submitResult(attackTaskHash, abi.encode(cert), result); + } + } + } + + function calculateTaskFee(ITaskMailboxTypes.TaskParams memory) external pure returns (uint96) { + return 0; + } +} diff --git a/src/test/mocks/MockAVSTaskHook.sol b/src/test/mocks/MockAVSTaskHook.sol new file mode 100644 index 0000000000..4e37dd9eb2 --- /dev/null +++ b/src/test/mocks/MockAVSTaskHook.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {OperatorSet} from "src/contracts/libraries/OperatorSetLib.sol"; +import {IAVSTaskHook} from "src/contracts/interfaces/IAVSTaskHook.sol"; +import {ITaskMailboxTypes} from "src/contracts/interfaces/ITaskMailbox.sol"; + +contract MockAVSTaskHook is IAVSTaskHook { + uint96 public defaultFee = 1 ether; + + function setDefaultFee(uint96 _fee) external { + defaultFee = _fee; + } + + function validatePreTaskCreation(address, /*caller*/ ITaskMailboxTypes.TaskParams memory /*taskParams*/ ) external view { + //TODO: Implement + } + + function handlePostTaskCreation(bytes32 /*taskHash*/ ) external { + //TODO: Implement + } + + function validatePreTaskResultSubmission(address, /*caller*/ bytes32, /*taskHash*/ bytes memory, /*cert*/ bytes memory /*result*/ ) + external + view + { + //TODO: Implement + } + + function handlePostTaskResultSubmission(bytes32 /*taskHash*/ ) external { + //TODO: Implement + } + + function calculateTaskFee(ITaskMailboxTypes.TaskParams memory /*taskParams*/ ) external view returns (uint96) { + return defaultFee; + } +} diff --git a/src/test/mocks/MockBN254CertificateVerifier.sol b/src/test/mocks/MockBN254CertificateVerifier.sol new file mode 100644 index 0000000000..4882107a86 --- /dev/null +++ b/src/test/mocks/MockBN254CertificateVerifier.sol @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {IBN254CertificateVerifier, IBN254CertificateVerifierTypes} from "src/contracts/interfaces/IBN254CertificateVerifier.sol"; +import {IOperatorTableCalculatorTypes} from "src/contracts/interfaces/IOperatorTableCalculator.sol"; +import {OperatorSet} from "src/contracts/libraries/OperatorSetLib.sol"; +import {BN254} from "src/contracts/libraries/BN254.sol"; + +contract MockBN254CertificateVerifier is IBN254CertificateVerifier { + // Mapping to store operator set owners for testing + mapping(bytes32 => address) public operatorSetOwners; + + function setOperatorSetOwner(OperatorSet memory operatorSet, address owner) external { + operatorSetOwners[keccak256(abi.encode(operatorSet.avs, operatorSet.id))] = owner; + } + + function updateOperatorTable( + OperatorSet calldata, /*operatorSet*/ + uint32, /*referenceTimestamp*/ + IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory, /*operatorSetInfo*/ + OperatorSetConfig calldata /*operatorSetConfig*/ + ) external pure {} + + function verifyCertificate(OperatorSet memory, /*operatorSet*/ BN254Certificate memory /*cert*/ ) + external + pure + returns (uint[] memory signedStakes) + { + return new uint[](0); + } + + function verifyCertificateProportion( + OperatorSet memory, /*operatorSet*/ + BN254Certificate memory, /*cert*/ + uint16[] memory /*totalStakeProportionThresholds*/ + ) external pure returns (bool) { + return true; + } + + function verifyCertificateNominal( + OperatorSet memory, /*operatorSet*/ + BN254Certificate memory, /*cert*/ + uint[] memory /*totalStakeNominalThresholds*/ + ) external pure returns (bool) { + return true; + } + + // Implement IBaseCertificateVerifier required functions + function operatorTableUpdater(OperatorSet memory /*operatorSet*/ ) external pure returns (address) { + return address(0); + } + + function getLatestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 0; + } + + function getOperatorSetOwner(OperatorSet memory operatorSet) external view returns (address) { + // Return the configured owner, or the AVS address by default + address owner = operatorSetOwners[keccak256(abi.encode(operatorSet.avs, operatorSet.id))]; + return owner != address(0) ? owner : operatorSet.avs; + } + + function latestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 0; + } + + function maxOperatorTableStaleness(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 86_400; + } + + function trySignatureVerification( + bytes32, /*msgHash*/ + BN254.G1Point memory, /*aggPubkey*/ + BN254.G2Point memory, /*apkG2*/ + BN254.G1Point memory /*signature*/ + ) external pure returns (bool pairingSuccessful, bool signatureValid) { + return (true, true); + } + + function getNonsignerOperatorInfo(OperatorSet memory, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + external + pure + returns (IOperatorTableCalculatorTypes.BN254OperatorInfo memory) + { + uint[] memory weights = new uint[](0); + return IOperatorTableCalculatorTypes.BN254OperatorInfo({pubkey: BN254.G1Point(0, 0), weights: weights}); + } + + function isNonsignerCached(OperatorSet memory, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + external + pure + returns (bool) + { + return false; + } + + function getOperatorSetInfo(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + external + pure + returns (IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory) + { + uint[] memory totalWeights = new uint[](0); + return IOperatorTableCalculatorTypes.BN254OperatorSetInfo({ + operatorInfoTreeRoot: bytes32(0), + numOperators: 0, + aggregatePubkey: BN254.G1Point(0, 0), + totalWeights: totalWeights + }); + } +} diff --git a/src/test/mocks/MockBN254CertificateVerifierFailure.sol b/src/test/mocks/MockBN254CertificateVerifierFailure.sol new file mode 100644 index 0000000000..f7b13b65f4 --- /dev/null +++ b/src/test/mocks/MockBN254CertificateVerifierFailure.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {IBN254CertificateVerifier, IBN254CertificateVerifierTypes} from "src/contracts/interfaces/IBN254CertificateVerifier.sol"; +import {IOperatorTableCalculatorTypes} from "src/contracts/interfaces/IOperatorTableCalculator.sol"; +import {OperatorSet} from "src/contracts/libraries/OperatorSetLib.sol"; +import {BN254} from "src/contracts/libraries/BN254.sol"; + +/** + * @title MockBN254CertificateVerifierFailure + * @notice Mock BN254 certificate verifier that always fails verification + * @dev Used for testing certificate verification failure scenarios + */ +contract MockBN254CertificateVerifierFailure is IBN254CertificateVerifier { + // Mapping to store operator set owners for testing + mapping(bytes32 => address) public operatorSetOwners; + + function setOperatorSetOwner(OperatorSet memory operatorSet, address owner) external { + operatorSetOwners[keccak256(abi.encode(operatorSet.avs, operatorSet.id))] = owner; + } + + function updateOperatorTable( + OperatorSet calldata, /*operatorSet*/ + uint32, /*referenceTimestamp*/ + IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory, /*operatorSetInfo*/ + OperatorSetConfig calldata /*operatorSetConfig*/ + ) external pure {} + + function verifyCertificate(OperatorSet memory, /*operatorSet*/ BN254Certificate memory /*cert*/ ) + external + pure + returns (uint[] memory signedStakes) + { + return new uint[](0); + } + + function verifyCertificateProportion( + OperatorSet memory, /*operatorSet*/ + BN254Certificate memory, /*cert*/ + uint16[] memory /*totalStakeProportionThresholds*/ + ) external pure returns (bool) { + return false; // Always fail + } + + function verifyCertificateNominal( + OperatorSet memory, /*operatorSet*/ + BN254Certificate memory, /*cert*/ + uint[] memory /*totalStakeNominalThresholds*/ + ) external pure returns (bool) { + return false; // Always fail + } + + // Implement IBaseCertificateVerifier required functions + function operatorTableUpdater(OperatorSet memory /*operatorSet*/ ) external pure returns (address) { + return address(0); + } + + function getLatestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 0; + } + + function getOperatorSetOwner(OperatorSet memory operatorSet) external view returns (address) { + // Return the configured owner, or the AVS address by default + address owner = operatorSetOwners[keccak256(abi.encode(operatorSet.avs, operatorSet.id))]; + return owner != address(0) ? owner : operatorSet.avs; + } + + function latestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 0; + } + + function maxOperatorTableStaleness(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 86_400; + } + + function trySignatureVerification( + bytes32, /*msgHash*/ + BN254.G1Point memory, /*aggPubkey*/ + BN254.G2Point memory, /*apkG2*/ + BN254.G1Point memory /*signature*/ + ) external pure returns (bool pairingSuccessful, bool signatureValid) { + return (true, false); // Pairing succeeds but signature is invalid + } + + function getNonsignerOperatorInfo(OperatorSet memory, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + external + pure + returns (IOperatorTableCalculatorTypes.BN254OperatorInfo memory) + { + uint[] memory weights = new uint[](0); + return IOperatorTableCalculatorTypes.BN254OperatorInfo({pubkey: BN254.G1Point(0, 0), weights: weights}); + } + + function isNonsignerCached(OperatorSet memory, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + external + pure + returns (bool) + { + return false; + } + + function getOperatorSetInfo(OperatorSet memory, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + external + pure + returns (IOperatorTableCalculatorTypes.BN254OperatorSetInfo memory) + { + uint[] memory totalWeights = new uint[](0); + return IOperatorTableCalculatorTypes.BN254OperatorSetInfo({ + operatorInfoTreeRoot: bytes32(0), + numOperators: 0, + aggregatePubkey: BN254.G1Point(0, 0), + totalWeights: totalWeights + }); + } +} diff --git a/src/test/mocks/MockECDSACertificateVerifier.sol b/src/test/mocks/MockECDSACertificateVerifier.sol new file mode 100644 index 0000000000..7d5171461f --- /dev/null +++ b/src/test/mocks/MockECDSACertificateVerifier.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {IECDSACertificateVerifier, IECDSACertificateVerifierTypes} from "src/contracts/interfaces/IECDSACertificateVerifier.sol"; +import {OperatorSet} from "src/contracts/libraries/OperatorSetLib.sol"; + +contract MockECDSACertificateVerifier is IECDSACertificateVerifier { + // Mapping to store operator set owners for testing + mapping(bytes32 => address) public operatorSetOwners; + + function setOperatorSetOwner(OperatorSet memory operatorSet, address owner) external { + operatorSetOwners[keccak256(abi.encode(operatorSet.avs, operatorSet.id))] = owner; + } + + function updateOperatorTable( + OperatorSet calldata, /*operatorSet*/ + uint32, /*referenceTimestamp*/ + ECDSAOperatorInfo[] calldata, /*operatorInfos*/ + OperatorSetConfig calldata /*operatorSetConfig*/ + ) external pure {} + + function verifyCertificate(OperatorSet calldata, /*operatorSet*/ ECDSACertificate memory /*cert*/ ) + external + pure + returns (uint[] memory signedStakes, address[] memory signers) + { + return (new uint[](0), new address[](0)); + } + + function verifyCertificateProportion( + OperatorSet calldata, /*operatorSet*/ + ECDSACertificate memory, /*cert*/ + uint16[] memory /*totalStakeProportionThresholds*/ + ) external pure returns (bool, address[] memory signers) { + return (true, new address[](0)); + } + + function verifyCertificateNominal( + OperatorSet calldata, /*operatorSet*/ + ECDSACertificate memory, /*cert*/ + uint[] memory /*totalStakeNominalThresholds*/ + ) external pure returns (bool, address[] memory signers) { + return (true, new address[](0)); + } + + // Implement IBaseCertificateVerifier required functions + function operatorTableUpdater(OperatorSet memory /*operatorSet*/ ) external pure returns (address) { + return address(0); + } + + function getLatestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 0; + } + + function getOperatorSetOwner(OperatorSet memory operatorSet) external view returns (address) { + // Return the configured owner, or the AVS address by default + address owner = operatorSetOwners[keccak256(abi.encode(operatorSet.avs, operatorSet.id))]; + return owner != address(0) ? owner : operatorSet.avs; + } + + function latestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 0; + } + + function maxOperatorTableStaleness(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 86_400; + } + + function getCachedSignerList(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + external + pure + returns (address[] memory) + { + return new address[](0); + } + + function getOperatorInfos(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + external + pure + returns (ECDSAOperatorInfo[] memory) + { + return new ECDSAOperatorInfo[](0); + } + + function getOperatorInfo(OperatorSet calldata, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + external + pure + returns (ECDSAOperatorInfo memory) + { + uint[] memory weights = new uint[](0); + return ECDSAOperatorInfo({pubkey: address(0), weights: weights}); + } + + function getOperatorCount(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint32) { + return 0; + } + + function getTotalStakes(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint[] memory) { + return new uint[](0); + } + + function domainSeparator() external pure returns (bytes32) { + return bytes32(0); + } + + function calculateCertificateDigest(uint32, /*referenceTimestamp*/ bytes32 /*messageHash*/ ) external pure returns (bytes32) { + return bytes32(0); + } +} diff --git a/src/test/mocks/MockECDSACertificateVerifierFailure.sol b/src/test/mocks/MockECDSACertificateVerifierFailure.sol new file mode 100644 index 0000000000..7443b001e9 --- /dev/null +++ b/src/test/mocks/MockECDSACertificateVerifierFailure.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {IECDSACertificateVerifier, IECDSACertificateVerifierTypes} from "src/contracts/interfaces/IECDSACertificateVerifier.sol"; +import {OperatorSet} from "src/contracts/libraries/OperatorSetLib.sol"; + +contract MockECDSACertificateVerifierFailure is IECDSACertificateVerifier { + // Mapping to store operator set owners for testing + mapping(bytes32 => address) public operatorSetOwners; + + function setOperatorSetOwner(OperatorSet memory operatorSet, address owner) external { + operatorSetOwners[keccak256(abi.encode(operatorSet.avs, operatorSet.id))] = owner; + } + + function updateOperatorTable( + OperatorSet calldata, /*operatorSet*/ + uint32, /*referenceTimestamp*/ + ECDSAOperatorInfo[] calldata, /*operatorInfos*/ + OperatorSetConfig calldata /*operatorSetConfig*/ + ) external pure {} + + function verifyCertificate(OperatorSet calldata, /*operatorSet*/ ECDSACertificate memory /*cert*/ ) + external + pure + returns (uint[] memory signedStakes, address[] memory signers) + { + return (new uint[](0), new address[](0)); + } + + function verifyCertificateProportion( + OperatorSet calldata, /*operatorSet*/ + ECDSACertificate memory, /*cert*/ + uint16[] memory /*totalStakeProportionThresholds*/ + ) external pure returns (bool, address[] memory signers) { + return (false, new address[](0)); // Always fail + } + + function verifyCertificateNominal( + OperatorSet calldata, /*operatorSet*/ + ECDSACertificate memory, /*cert*/ + uint[] memory /*totalStakeNominalThresholds*/ + ) external pure returns (bool, address[] memory signers) { + return (false, new address[](0)); // Always fail + } + + // Implement IBaseCertificateVerifier required functions + function operatorTableUpdater(OperatorSet memory /*operatorSet*/ ) external pure returns (address) { + return address(0); + } + + function getLatestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 0; + } + + function getOperatorSetOwner(OperatorSet memory operatorSet) external view returns (address) { + // Return the configured owner, or the AVS address by default + address owner = operatorSetOwners[keccak256(abi.encode(operatorSet.avs, operatorSet.id))]; + return owner != address(0) ? owner : operatorSet.avs; + } + + function latestReferenceTimestamp(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 0; + } + + function maxOperatorTableStaleness(OperatorSet memory /*operatorSet*/ ) external pure returns (uint32) { + return 86_400; + } + + function getCachedSignerList(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + external + pure + returns (address[] memory) + { + return new address[](0); + } + + function getOperatorInfos(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) + external + pure + returns (ECDSAOperatorInfo[] memory) + { + return new ECDSAOperatorInfo[](0); + } + + function getOperatorInfo(OperatorSet calldata, /*operatorSet*/ uint32, /*referenceTimestamp*/ uint /*operatorIndex*/ ) + external + pure + returns (ECDSAOperatorInfo memory) + { + uint[] memory weights = new uint[](0); + return ECDSAOperatorInfo({pubkey: address(0), weights: weights}); + } + + function getOperatorCount(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint32) { + return 0; + } + + function getTotalStakes(OperatorSet calldata, /*operatorSet*/ uint32 /*referenceTimestamp*/ ) external pure returns (uint[] memory) { + return new uint[](0); + } + + function domainSeparator() external pure returns (bytes32) { + return bytes32(0); + } + + function calculateCertificateDigest(uint32, /*referenceTimestamp*/ bytes32 /*messageHash*/ ) external pure returns (bytes32) { + return bytes32(0); + } +} diff --git a/src/test/mocks/MockSimpleERC20.sol b/src/test/mocks/MockSimpleERC20.sol new file mode 100644 index 0000000000..66302f8129 --- /dev/null +++ b/src/test/mocks/MockSimpleERC20.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +/** + * @title MockSimpleERC20 + * @notice Mock ERC20 token for testing + * @dev Simple ERC20 implementation with mint function for testing + */ +contract MockSimpleERC20 is ERC20 { + constructor() ERC20("Mock Token", "MOCK") {} + + function mint(address to, uint amount) public { + _mint(to, amount); + } +} diff --git a/src/test/unit/TaskMailboxUnit.t.sol b/src/test/unit/TaskMailboxUnit.t.sol new file mode 100644 index 0000000000..203f11c5a8 --- /dev/null +++ b/src/test/unit/TaskMailboxUnit.t.sol @@ -0,0 +1,2454 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import {Test, console, Vm} from "forge-std/Test.sol"; +import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +import {IBN254CertificateVerifier, IBN254CertificateVerifierTypes} from "src/contracts/interfaces/IBN254CertificateVerifier.sol"; +import {IECDSACertificateVerifier, IECDSACertificateVerifierTypes} from "src/contracts/interfaces/IECDSACertificateVerifier.sol"; +import {OperatorSet, OperatorSetLib} from "src/contracts/libraries/OperatorSetLib.sol"; +import {BN254} from "src/contracts/libraries/BN254.sol"; +import {IKeyRegistrarTypes} from "src/contracts/interfaces/IKeyRegistrar.sol"; +import {TaskMailbox} from "src/contracts/avs/task/TaskMailbox.sol"; +import {ITaskMailbox, ITaskMailboxTypes, ITaskMailboxErrors, ITaskMailboxEvents} from "src/contracts/interfaces/ITaskMailbox.sol"; +import {IAVSTaskHook} from "src/contracts/interfaces/IAVSTaskHook.sol"; + +import {MockAVSTaskHook} from "src/test/mocks/MockAVSTaskHook.sol"; +import {MockBN254CertificateVerifier} from "src/test/mocks/MockBN254CertificateVerifier.sol"; +import {MockBN254CertificateVerifierFailure} from "src/test/mocks/MockBN254CertificateVerifierFailure.sol"; +import {MockECDSACertificateVerifier} from "src/test/mocks/MockECDSACertificateVerifier.sol"; +import {MockECDSACertificateVerifierFailure} from "src/test/mocks/MockECDSACertificateVerifierFailure.sol"; +import {MockSimpleERC20} from "src/test/mocks/MockSimpleERC20.sol"; +import {AVSTaskHookReentrantAttacker} from "src/test/mocks/AVSTaskHookReentrantAttacker.sol"; + +contract TaskMailboxUnitTests is Test, ITaskMailboxTypes, ITaskMailboxErrors, ITaskMailboxEvents { + using OperatorSetLib for OperatorSet; + + // Contracts + TaskMailbox public taskMailbox; + ProxyAdmin public proxyAdmin; + MockAVSTaskHook public mockTaskHook; + MockBN254CertificateVerifier public mockBN254CertificateVerifier; + MockECDSACertificateVerifier public mockECDSACertificateVerifier; + MockSimpleERC20 public mockToken; + + // Test addresses + address public avs = address(0x1); + address public avs2 = address(0x2); + address public feeCollector = address(0x3); + address public refundCollector = address(0x4); + address public creator = address(0x5); + address public aggregator = address(0x6); + address public owner = address(0x7); + address public feeSplitCollector = address(0x8); + + // Test operator set IDs + uint32 public executorOperatorSetId = 1; + uint32 public executorOperatorSetId2 = 2; + + // Test config values + uint96 public taskSLA = 60 seconds; + uint16 public stakeProportionThreshold = 6667; // 66.67% + uint96 public avsFee = 1 ether; + + function setUp() public virtual { + // Deploy mock contracts + mockTaskHook = new MockAVSTaskHook(); + mockBN254CertificateVerifier = new MockBN254CertificateVerifier(); + mockECDSACertificateVerifier = new MockECDSACertificateVerifier(); + mockToken = new MockSimpleERC20(); + + // Deploy TaskMailbox with proxy pattern + proxyAdmin = new ProxyAdmin(); + TaskMailbox taskMailboxImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), "1.0.0"); + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( + address(taskMailboxImpl), + address(proxyAdmin), + abi.encodeWithSelector(TaskMailbox.initialize.selector, owner, 0, feeSplitCollector) + ); + taskMailbox = TaskMailbox(address(proxy)); + + // Give creator some tokens and approve TaskMailbox + mockToken.mint(creator, 1000 ether); + vm.prank(creator); + mockToken.approve(address(taskMailbox), type(uint).max); + } + + function _createValidTaskParams() internal view returns (TaskParams memory) { + return TaskParams({ + refundCollector: refundCollector, + executorOperatorSet: OperatorSet(avs, executorOperatorSetId), + payload: bytes("test payload") + }); + } + + function _createValidExecutorOperatorSetTaskConfig() internal view returns (ExecutorOperatorSetTaskConfig memory) { + return ExecutorOperatorSetTaskConfig({ + taskHook: IAVSTaskHook(address(mockTaskHook)), + taskSLA: taskSLA, + feeToken: IERC20(address(mockToken)), + curveType: IKeyRegistrarTypes.CurveType.BN254, + feeCollector: feeCollector, + consensus: Consensus({consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, value: abi.encode(stakeProportionThreshold)}), + taskMetadata: bytes("test metadata") + }); + } + + function _createValidBN254Certificate(bytes32 messageHash) + internal + view + returns (IBN254CertificateVerifierTypes.BN254Certificate memory) + { + return IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: messageHash, + signature: BN254.G1Point(1, 2), // Non-zero signature + apk: BN254.G2Point([uint(1), uint(2)], [uint(3), uint(4)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + } + + function _createValidECDSACertificate(bytes32 messageHash) + internal + view + returns (IECDSACertificateVerifierTypes.ECDSACertificate memory) + { + return IECDSACertificateVerifierTypes.ECDSACertificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: messageHash, + sig: bytes("0x1234567890abcdef") // Non-empty signature + }); + } +} + +contract TaskMailboxUnitTests_Constructor is TaskMailboxUnitTests { + function test_Constructor_WithCertificateVerifiers() public { + address bn254Verifier = address(0x1234); + address ecdsaVerifier = address(0x5678); + + // Deploy with proxy pattern + ProxyAdmin proxyAdmin = new ProxyAdmin(); + TaskMailbox taskMailboxImpl = new TaskMailbox(bn254Verifier, ecdsaVerifier, "1.0.0"); + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( + address(taskMailboxImpl), + address(proxyAdmin), + abi.encodeWithSelector(TaskMailbox.initialize.selector, owner, 0, feeSplitCollector) + ); + TaskMailbox newTaskMailbox = TaskMailbox(address(proxy)); + + assertEq(newTaskMailbox.BN254_CERTIFICATE_VERIFIER(), bn254Verifier); + assertEq(newTaskMailbox.ECDSA_CERTIFICATE_VERIFIER(), ecdsaVerifier); + assertEq(newTaskMailbox.version(), "1.0.0"); + assertEq(newTaskMailbox.owner(), owner); + assertEq(newTaskMailbox.feeSplit(), 0); + assertEq(newTaskMailbox.feeSplitCollector(), feeSplitCollector); + } +} + +// Test contract for registerExecutorOperatorSet +contract TaskMailboxUnitTests_registerExecutorOperatorSet is TaskMailboxUnitTests { + function testFuzz_registerExecutorOperatorSet(address fuzzAvs, uint32 fuzzOperatorSetId, bool fuzzIsRegistered) public { + // Skip if fuzzAvs is the proxy admin to avoid proxy admin access issues + vm.assume(fuzzAvs != address(proxyAdmin)); + OperatorSet memory operatorSet = OperatorSet(fuzzAvs, fuzzOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + // Set config first (requirement for registerExecutorOperatorSet) + vm.prank(fuzzAvs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // If unregistering, expect event + if (!fuzzIsRegistered) { + vm.expectEmit(true, true, true, true, address(taskMailbox)); + emit ExecutorOperatorSetRegistered(fuzzAvs, fuzzAvs, fuzzOperatorSetId, fuzzIsRegistered); + + // Register operator set + vm.prank(fuzzAvs); + taskMailbox.registerExecutorOperatorSet(operatorSet, fuzzIsRegistered); + } + + // Verify registration status + assertEq(taskMailbox.isExecutorOperatorSetRegistered(operatorSet.key()), fuzzIsRegistered); + } + + function test_registerExecutorOperatorSet_Unregister() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + // Set config (this automatically registers the operator set) + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + assertTrue(taskMailbox.isExecutorOperatorSetRegistered(operatorSet.key())); + + // Then unregister + vm.expectEmit(true, true, true, true, address(taskMailbox)); + emit ExecutorOperatorSetRegistered(avs, avs, executorOperatorSetId, false); + + vm.prank(avs); + taskMailbox.registerExecutorOperatorSet(operatorSet, false); + assertFalse(taskMailbox.isExecutorOperatorSetRegistered(operatorSet.key())); + } + + function test_Revert_registerExecutorOperatorSet_ConfigNotSet() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + + vm.prank(avs); + vm.expectRevert(ExecutorOperatorSetTaskConfigNotSet.selector); + taskMailbox.registerExecutorOperatorSet(operatorSet, true); + } + + function test_Revert_registerExecutorOperatorSet_InvalidOperatorSetOwner() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + // Set config as avs + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Try to register as different address + vm.prank(avs2); + vm.expectRevert(InvalidOperatorSetOwner.selector); + taskMailbox.registerExecutorOperatorSet(operatorSet, false); + } +} + +// Test contract for setExecutorOperatorSetTaskConfig +contract TaskMailboxUnitTests_setExecutorOperatorSetTaskConfig is TaskMailboxUnitTests { + function test_Revert_InvalidOperatorSetOwner() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + // Try to set config as wrong address + vm.prank(avs2); + vm.expectRevert(InvalidOperatorSetOwner.selector); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } + + function testFuzz_setExecutorOperatorSetTaskConfig( + address fuzzCertificateVerifier, + address fuzzTaskHook, + address fuzzFeeToken, + address fuzzFeeCollector, + uint96 fuzzTaskSLA, + uint16 fuzzStakeProportionThreshold, + bytes memory fuzzTaskMetadata + ) public { + // Bound inputs + vm.assume(fuzzCertificateVerifier != address(0)); + vm.assume(fuzzTaskHook != address(0)); + vm.assume(fuzzTaskSLA > 0); + // Bound stake proportion threshold to valid range (0-10000 basis points) + fuzzStakeProportionThreshold = uint16(bound(fuzzStakeProportionThreshold, 0, 10_000)); + + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + + ExecutorOperatorSetTaskConfig memory config = ExecutorOperatorSetTaskConfig({ + taskHook: IAVSTaskHook(fuzzTaskHook), + taskSLA: fuzzTaskSLA, + feeToken: IERC20(fuzzFeeToken), + curveType: IKeyRegistrarTypes.CurveType.BN254, + feeCollector: fuzzFeeCollector, + consensus: Consensus({consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, value: abi.encode(fuzzStakeProportionThreshold)}), + taskMetadata: fuzzTaskMetadata + }); + + // Since setExecutorOperatorSetTaskConfig always registers if not already registered, + // we expect both events every time for a new operator set + // Note: The contract emits config event first, then registration event + + // Expect config event first + vm.expectEmit(true, true, true, true, address(taskMailbox)); + emit ExecutorOperatorSetTaskConfigSet(avs, avs, executorOperatorSetId, config); + + // Expect registration event second + vm.expectEmit(true, true, true, true, address(taskMailbox)); + emit ExecutorOperatorSetRegistered(avs, avs, executorOperatorSetId, true); + + // Set config + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Verify config was set + ExecutorOperatorSetTaskConfig memory retrievedConfig = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); + + assertEq(uint8(retrievedConfig.curveType), uint8(IKeyRegistrarTypes.CurveType.BN254)); + assertEq(address(retrievedConfig.taskHook), fuzzTaskHook); + assertEq(address(retrievedConfig.feeToken), fuzzFeeToken); + assertEq(retrievedConfig.feeCollector, fuzzFeeCollector); + assertEq(retrievedConfig.taskSLA, fuzzTaskSLA); + // Verify consensus configuration + assertEq(uint8(retrievedConfig.consensus.consensusType), uint8(ConsensusType.STAKE_PROPORTION_THRESHOLD)); + uint16 decodedThreshold = abi.decode(retrievedConfig.consensus.value, (uint16)); + assertEq(decodedThreshold, fuzzStakeProportionThreshold); + assertEq(retrievedConfig.taskMetadata, fuzzTaskMetadata); + + // Verify operator set is registered + assertTrue(taskMailbox.isExecutorOperatorSetRegistered(operatorSet.key())); + } + + function test_setExecutorOperatorSetTaskConfig_AlreadyRegistered() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + // First set config (which auto-registers) + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + assertTrue(taskMailbox.isExecutorOperatorSetRegistered(operatorSet.key())); + + // Update config again + config.taskSLA = 120; + + // Should not emit registration event since already registered + vm.recordLogs(); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Verify only one event was emitted (config set, not registration) + Vm.Log[] memory entries = vm.getRecordedLogs(); + assertEq(entries.length, 1); + assertEq( + entries[0].topics[0], + keccak256("ExecutorOperatorSetTaskConfigSet(address,address,uint32,(address,uint96,address,uint8,address,(uint8,bytes),bytes))") + ); + + // Verify the config was updated + ExecutorOperatorSetTaskConfig memory updatedConfig = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); + assertEq(updatedConfig.taskSLA, 120); + } + + function test_Revert_WhenCurveTypeIsNone() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.curveType = IKeyRegistrarTypes.CurveType.NONE; + + // Expecting revert due to accessing zero address certificate verifier + vm.prank(avs); + vm.expectRevert(); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } + + function test_Revert_WhenTaskHookIsZero() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.taskHook = IAVSTaskHook(address(0)); + + vm.prank(avs); + vm.expectRevert(InvalidAddressZero.selector); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } + + function test_Revert_WhenTaskSLAIsZero() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.taskSLA = 0; + + vm.prank(avs); + vm.expectRevert(TaskSLAIsZero.selector); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } + + function test_Revert_WhenConsensusValueInvalid_EmptyBytes() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, value: bytes("")}); + + vm.prank(avs); + vm.expectRevert(InvalidConsensusValue.selector); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } + + function test_Revert_WhenConsensusValueInvalid_WrongLength() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encodePacked(uint8(50)) // Wrong size - should be 32 bytes + }); + + vm.prank(avs); + vm.expectRevert(InvalidConsensusValue.selector); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } + + function test_Revert_WhenConsensusValueInvalid_ExceedsMaximum() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encode(uint16(10_001)) // Exceeds 10000 basis points + }); + + vm.prank(avs); + vm.expectRevert(InvalidConsensusValue.selector); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } + + function test_ConsensusZeroThreshold() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encode(uint16(0)) // Zero threshold is valid + }); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Verify config was set + ExecutorOperatorSetTaskConfig memory retrievedConfig = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); + uint16 decodedThreshold = abi.decode(retrievedConfig.consensus.value, (uint16)); + assertEq(decodedThreshold, 0); + } + + function test_ConsensusMaxThreshold() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encode(uint16(10_000)) // Maximum 100% + }); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Verify config was set + ExecutorOperatorSetTaskConfig memory retrievedConfig = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); + uint16 decodedThreshold = abi.decode(retrievedConfig.consensus.value, (uint16)); + assertEq(decodedThreshold, 10_000); + } + + function test_Revert_WhenConsensusTypeIsNone() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({ + consensusType: ConsensusType.NONE, + value: bytes("") // Empty value for NONE type + }); + + vm.prank(avs); + vm.expectRevert(InvalidConsensusType.selector); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } +} + +// Test contract for setFeeSplit +contract TaskMailboxUnitTests_setFeeSplit is TaskMailboxUnitTests { + function test_SetFeeSplit() public { + uint16 newFeeSplit = 2000; // 20% + + vm.expectEmit(true, true, true, true); + emit FeeSplitSet(newFeeSplit); + + vm.prank(owner); + taskMailbox.setFeeSplit(newFeeSplit); + assertEq(taskMailbox.feeSplit(), newFeeSplit); + } + + function test_SetFeeSplit_MaxValue() public { + uint16 maxFeeSplit = 10_000; // 100% + + vm.expectEmit(true, true, true, true); + emit FeeSplitSet(maxFeeSplit); + + vm.prank(owner); + taskMailbox.setFeeSplit(maxFeeSplit); + assertEq(taskMailbox.feeSplit(), maxFeeSplit); + } + + function test_Revert_SetFeeSplit_NotOwner() public { + vm.prank(address(0x999)); + vm.expectRevert("Ownable: caller is not the owner"); + taskMailbox.setFeeSplit(1000); + } + + function test_Revert_SetFeeSplit_ExceedsMax() public { + vm.prank(owner); + vm.expectRevert(InvalidFeeSplit.selector); + taskMailbox.setFeeSplit(10_001); // > 100% + } +} + +// Test contract for setFeeSplitCollector +contract TaskMailboxUnitTests_setFeeSplitCollector is TaskMailboxUnitTests { + function test_SetFeeSplitCollector() public { + address newCollector = address(0x123); + + vm.expectEmit(true, true, true, true); + emit FeeSplitCollectorSet(newCollector); + + vm.prank(owner); + taskMailbox.setFeeSplitCollector(newCollector); + assertEq(taskMailbox.feeSplitCollector(), newCollector); + } + + function test_Revert_SetFeeSplitCollector_NotOwner() public { + vm.prank(address(0x999)); + vm.expectRevert("Ownable: caller is not the owner"); + taskMailbox.setFeeSplitCollector(address(0x123)); + } + + function test_Revert_SetFeeSplitCollector_ZeroAddress() public { + vm.prank(owner); + vm.expectRevert(InvalidAddressZero.selector); + taskMailbox.setFeeSplitCollector(address(0)); + } +} + +// Test contract for createTask +contract TaskMailboxUnitTests_createTask is TaskMailboxUnitTests { + function setUp() public override { + super.setUp(); + + // Set up executor operator set task config + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + } + + function testFuzz_createTask(address fuzzRefundCollector, uint96 fuzzAvsFee, bytes memory fuzzPayload) public { + // Bound inputs + vm.assume(fuzzPayload.length > 0); + // We create two tasks in this test, so need at least 2x the fee + vm.assume(fuzzAvsFee <= mockToken.balanceOf(creator) / 2); + + // Set the mock hook to return the fuzzed fee + mockTaskHook.setDefaultFee(fuzzAvsFee); + + TaskParams memory taskParams = TaskParams({ + refundCollector: fuzzRefundCollector, + executorOperatorSet: OperatorSet(avs, executorOperatorSetId), + payload: fuzzPayload + }); + + // First task will have count 0 + uint expectedTaskCount = 0; + bytes32 expectedTaskHash = keccak256(abi.encode(expectedTaskCount, address(taskMailbox), block.chainid, taskParams)); + + // Expect Transfer event for fee transfer from creator to taskMailbox + if (fuzzAvsFee > 0) { + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), fuzzAvsFee); + } + + // Expect event + vm.expectEmit(true, true, true, true, address(taskMailbox)); + emit TaskCreated( + creator, expectedTaskHash, avs, executorOperatorSetId, fuzzRefundCollector, fuzzAvsFee, block.timestamp + taskSLA, fuzzPayload + ); + + // Create task + vm.prank(creator); + bytes32 taskHash = taskMailbox.createTask(taskParams); + + // Verify task hash + assertEq(taskHash, expectedTaskHash); + + // Verify global task count incremented by creating another task and checking its hash + bytes32 nextExpectedTaskHash = keccak256(abi.encode(expectedTaskCount + 1, address(taskMailbox), block.chainid, taskParams)); + + // Expect Transfer event for fee transfer from creator to taskMailbox for second task + if (fuzzAvsFee > 0) { + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), fuzzAvsFee); + } + + vm.prank(creator); + bytes32 nextTaskHash = taskMailbox.createTask(taskParams); + assertEq(nextTaskHash, nextExpectedTaskHash); + + // Verify task was created + Task memory task = taskMailbox.getTaskInfo(taskHash); + assertEq(task.creator, creator); + assertEq(task.creationTime, block.timestamp); + assertEq(uint8(task.status), uint8(TaskStatus.CREATED)); + assertEq(task.avs, avs); + assertEq(task.executorOperatorSetId, executorOperatorSetId); + assertEq(task.refundCollector, fuzzRefundCollector); + assertEq(task.avsFee, fuzzAvsFee); + assertEq(task.feeSplit, 0); + assertEq(task.payload, fuzzPayload); + + // Verify token transfer if fee > 0 + // Note: We created two tasks with the same fee, so balance should be 2 * fuzzAvsFee + if (fuzzAvsFee > 0) assertEq(mockToken.balanceOf(address(taskMailbox)), fuzzAvsFee * 2); + } + + function test_createTask_ZeroFee() public { + // Set the mock hook to return 0 fee + mockTaskHook.setDefaultFee(0); + + TaskParams memory taskParams = _createValidTaskParams(); + + uint balanceBefore = mockToken.balanceOf(address(taskMailbox)); + + vm.prank(creator); + bytes32 taskHash = taskMailbox.createTask(taskParams); + + // Verify no token transfer occurred + assertEq(mockToken.balanceOf(address(taskMailbox)), balanceBefore); + + // Verify task was created with zero fee + Task memory task = taskMailbox.getTaskInfo(taskHash); + assertEq(task.avsFee, 0); + } + + function test_createTask_NoFeeToken() public { + // Set up config without fee token + OperatorSet memory operatorSet = OperatorSet(avs2, executorOperatorSetId2); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.feeToken = IERC20(address(0)); + + vm.prank(avs2); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + TaskParams memory taskParams = + TaskParams({refundCollector: refundCollector, executorOperatorSet: operatorSet, payload: bytes("test payload")}); + + uint balanceBefore = mockToken.balanceOf(address(taskMailbox)); + + vm.prank(creator); + bytes32 taskHash = taskMailbox.createTask(taskParams); + + // Verify no token transfer occurred even with non-zero fee + assertEq(mockToken.balanceOf(address(taskMailbox)), balanceBefore); + + // Verify task was created + Task memory task = taskMailbox.getTaskInfo(taskHash); + assertEq(task.avsFee, 1 ether); + } + + function test_Revert_WhenPayloadIsEmpty() public { + TaskParams memory taskParams = _createValidTaskParams(); + taskParams.payload = bytes(""); + + vm.prank(creator); + vm.expectRevert(PayloadIsEmpty.selector); + taskMailbox.createTask(taskParams); + } + + function test_Revert_WhenExecutorOperatorSetNotRegistered() public { + TaskParams memory taskParams = _createValidTaskParams(); + taskParams.executorOperatorSet.id = 99; // Unregistered operator set + + vm.prank(creator); + vm.expectRevert(ExecutorOperatorSetNotRegistered.selector); + taskMailbox.createTask(taskParams); + } + + function test_Revert_WhenExecutorOperatorSetTaskConfigNotSet() public { + // Create an operator set that has never been configured + OperatorSet memory operatorSet = OperatorSet(avs2, executorOperatorSetId2); + + TaskParams memory taskParams = + TaskParams({refundCollector: refundCollector, executorOperatorSet: operatorSet, payload: bytes("test payload")}); + + // Should revert because operator set is not registered (no config set) + vm.prank(creator); + vm.expectRevert(ExecutorOperatorSetNotRegistered.selector); + taskMailbox.createTask(taskParams); + } + + function test_Revert_ReentrancyOnCreateTask() public { + // Deploy reentrant attacker as task hook + AVSTaskHookReentrantAttacker attacker = new AVSTaskHookReentrantAttacker(address(taskMailbox)); + + // Set up executor operator set with attacker as hook + OperatorSet memory operatorSet = OperatorSet(avs2, executorOperatorSetId2); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.taskHook = IAVSTaskHook(address(attacker)); + + vm.prank(avs2); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Give attacker tokens and approve + mockToken.mint(address(attacker), 1000 ether); + vm.prank(address(attacker)); + mockToken.approve(address(taskMailbox), type(uint).max); + + // Set up attack parameters + TaskParams memory taskParams = + TaskParams({refundCollector: refundCollector, executorOperatorSet: operatorSet, payload: bytes("test payload")}); + + attacker.setAttackParams( + taskParams, + bytes32(0), + _createValidBN254Certificate(bytes32(0)), + bytes(""), + true, // attack on post + true // attack createTask + ); + + // Try to create task - should revert on reentrancy + vm.prank(creator); + vm.expectRevert("ReentrancyGuard: reentrant call"); + taskMailbox.createTask(taskParams); + } + + function test_Revert_createTask_InvalidFeeReceiver_RefundCollector() public { + // Set up operator set with fee token + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.feeToken = mockToken; + config.feeCollector = feeCollector; + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task params with zero refund collector + TaskParams memory taskParams = + TaskParams({refundCollector: address(0), executorOperatorSet: operatorSet, payload: bytes("test payload")}); + + // Should revert with InvalidFeeReceiver when refundCollector is zero + vm.prank(creator); + vm.expectRevert(InvalidFeeReceiver.selector); + taskMailbox.createTask(taskParams); + } + + function test_Revert_createTask_InvalidFeeReceiver_FeeCollector() public { + // Set up operator set with fee token but zero fee collector + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.feeToken = mockToken; + config.feeCollector = address(0); // Zero fee collector + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create valid task params + TaskParams memory taskParams = _createValidTaskParams(); + + // Should revert with InvalidFeeReceiver when feeCollector is zero + vm.prank(creator); + vm.expectRevert(InvalidFeeReceiver.selector); + taskMailbox.createTask(taskParams); + } + + function test_createTask_ValidWithZeroFeeReceivers_NoFeeToken() public { + // When there's no fee token, zero addresses should be allowed + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.feeToken = IERC20(address(0)); // No fee token + config.feeCollector = address(0); // Zero fee collector is OK when no fee token + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task params with zero refund collector + TaskParams memory taskParams = TaskParams({ + refundCollector: address(0), // Zero refund collector is OK when no fee token + executorOperatorSet: operatorSet, + payload: bytes("test payload") + }); + + // Should succeed when there's no fee token + vm.prank(creator); + bytes32 taskHash = taskMailbox.createTask(taskParams); + + // Verify task was created + Task memory task = taskMailbox.getTaskInfo(taskHash); + assertEq(task.creator, creator); + assertEq(task.refundCollector, address(0)); + } + + function test_createTask_CapturesFeeSplitValues() public { + // Set fee split values + uint16 feeSplit = 1500; // 15% + address localFeeSplitCollector = address(0x456); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 taskHash = taskMailbox.createTask(taskParams); + + // Verify task captured current fee split value + Task memory task = taskMailbox.getTaskInfo(taskHash); + assertEq(task.feeSplit, feeSplit); + + // Change fee split values + uint16 newFeeSplit = 3000; // 30% + address newFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(newFeeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(newFeeSplitCollector); + + // Create another task + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Verify new task has new fee split while old task retains old value + Task memory newTask = taskMailbox.getTaskInfo(newTaskHash); + assertEq(newTask.feeSplit, newFeeSplit); + + // Verify old task still has old fee split value + task = taskMailbox.getTaskInfo(taskHash); + assertEq(task.feeSplit, feeSplit); + + // Verify that the global feeSplitCollector is used (not captured in task) + assertEq(taskMailbox.feeSplitCollector(), newFeeSplitCollector); + } +} + +// Test contract for submitResult +contract TaskMailboxUnitTests_submitResult is TaskMailboxUnitTests { + bytes32 public taskHash; + + function setUp() public override { + super.setUp(); + + // Set up executor operator set task config + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create a task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + taskHash = taskMailbox.createTask(taskParams); + } + + function testFuzz_submitResult_WithBN254Certificate(bytes memory fuzzResult) public { + // Advance time by 1 second to pass TimestampAtCreation check + vm.warp(block.timestamp + 1); + + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(taskHash); + + // Expect event + vm.expectEmit(true, true, true, true, address(taskMailbox)); + emit TaskVerified(aggregator, taskHash, avs, executorOperatorSetId, abi.encode(cert), fuzzResult); + + // Submit result + vm.prank(aggregator); + taskMailbox.submitResult(taskHash, abi.encode(cert), fuzzResult); + + // Verify task was verified + TaskStatus status = taskMailbox.getTaskStatus(taskHash); + assertEq(uint8(status), uint8(TaskStatus.VERIFIED)); + + // Verify result was stored + bytes memory storedResult = taskMailbox.getTaskResult(taskHash); + assertEq(storedResult, fuzzResult); + + // Verify certificate was stored + Task memory task = taskMailbox.getTaskInfo(taskHash); + assertEq(task.executorCert, abi.encode(cert)); + } + + function testFuzz_submitResult_WithECDSACertificate(bytes memory fuzzResult) public { + // Setup executor operator set with ECDSA curve type + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.curveType = IKeyRegistrarTypes.CurveType.ECDSA; + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Advance time by 1 second to pass TimestampAtCreation check + vm.warp(block.timestamp + 1); + + // Create ECDSA certificate + IECDSACertificateVerifierTypes.ECDSACertificate memory cert = _createValidECDSACertificate(newTaskHash); + + // Expect event + vm.expectEmit(true, true, true, true); + emit TaskVerified(aggregator, newTaskHash, avs, executorOperatorSetId, abi.encode(cert), fuzzResult); + + // Submit result with ECDSA certificate + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, abi.encode(cert), fuzzResult); + + // Verify task was verified + TaskStatus status = taskMailbox.getTaskStatus(newTaskHash); + assertEq(uint8(status), uint8(TaskStatus.VERIFIED)); + + // Verify result was stored + bytes memory storedResult = taskMailbox.getTaskResult(newTaskHash); + assertEq(storedResult, fuzzResult); + + // Verify certificate was stored + Task memory task = taskMailbox.getTaskInfo(newTaskHash); + assertEq(task.executorCert, abi.encode(cert)); + } + + function test_Revert_WhenTimestampAtCreation() public { + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(taskHash); + + // Don't advance time + vm.prank(aggregator); + vm.expectRevert(TimestampAtCreation.selector); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenTaskExpired() public { + // Advance time past task SLA + vm.warp(block.timestamp + taskSLA + 1); + + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(taskHash); + + vm.prank(aggregator); + vm.expectRevert(abi.encodeWithSelector(InvalidTaskStatus.selector, TaskStatus.CREATED, TaskStatus.EXPIRED)); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenTaskDoesNotExist() public { + bytes32 nonExistentHash = keccak256("non-existent"); + + // Advance time by 1 second to pass TimestampAtCreation check + vm.warp(block.timestamp + 1); + + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(nonExistentHash); + + vm.prank(aggregator); + vm.expectRevert(abi.encodeWithSelector(InvalidTaskStatus.selector, TaskStatus.CREATED, TaskStatus.NONE)); + taskMailbox.submitResult(nonExistentHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenCertificateVerificationFailed_BN254() public { + // Create a custom mock that returns false for certificate verification + MockBN254CertificateVerifierFailure mockFailingVerifier = new MockBN254CertificateVerifierFailure(); + + // Deploy a new TaskMailbox with the failing verifier using proxy pattern + ProxyAdmin proxyAdmin = new ProxyAdmin(); + TaskMailbox taskMailboxImpl = new TaskMailbox(address(mockFailingVerifier), address(mockECDSACertificateVerifier), "1.0.0"); + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( + address(taskMailboxImpl), + address(proxyAdmin), + abi.encodeWithSelector(TaskMailbox.initialize.selector, owner, 0, feeSplitCollector) + ); + TaskMailbox failingTaskMailbox = TaskMailbox(address(proxy)); + + // Give creator tokens and approve the new TaskMailbox + vm.prank(creator); + mockToken.approve(address(failingTaskMailbox), type(uint).max); + + // Set config + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + vm.prank(avs); + failingTaskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create new task with this config + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = failingTaskMailbox.createTask(taskParams); + + // Advance time + vm.warp(block.timestamp + 1); + + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(newTaskHash); + + vm.prank(aggregator); + vm.expectRevert(CertificateVerificationFailed.selector); + failingTaskMailbox.submitResult(newTaskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenCertificateVerificationFailed_ECDSA() public { + // Create a custom mock that returns false for certificate verification + MockECDSACertificateVerifierFailure mockECDSACertificateVerifierFailure = new MockECDSACertificateVerifierFailure(); + + // Deploy a new TaskMailbox with the failing ECDSA verifier using proxy pattern + ProxyAdmin proxyAdmin = new ProxyAdmin(); + TaskMailbox taskMailboxImpl = + new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifierFailure), "1.0.0"); + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( + address(taskMailboxImpl), + address(proxyAdmin), + abi.encodeWithSelector(TaskMailbox.initialize.selector, owner, 0, feeSplitCollector) + ); + TaskMailbox failingTaskMailbox = TaskMailbox(address(proxy)); + + // Give creator tokens and approve the new TaskMailbox + vm.prank(creator); + mockToken.approve(address(failingTaskMailbox), type(uint).max); + + // Setup executor operator set with ECDSA curve type + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.curveType = IKeyRegistrarTypes.CurveType.ECDSA; + + vm.prank(avs); + failingTaskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = failingTaskMailbox.createTask(taskParams); + + // Advance time + vm.warp(block.timestamp + 1); + + // Create ECDSA certificate + IECDSACertificateVerifierTypes.ECDSACertificate memory cert = _createValidECDSACertificate(newTaskHash); + + // Submit should fail + vm.prank(aggregator); + vm.expectRevert(CertificateVerificationFailed.selector); + failingTaskMailbox.submitResult(newTaskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenInvalidCertificateEncoding() public { + // Setup executor operator set with ECDSA curve type + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.curveType = IKeyRegistrarTypes.CurveType.ECDSA; + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Create invalid encoded certificate (not properly encoded ECDSA certificate) + bytes memory invalidCert = abi.encode("invalid", "certificate", "data"); + bytes memory result = bytes("test result"); + + // Submit should fail due to decoding error + vm.prank(aggregator); + vm.expectRevert(); // Will revert during abi.decode + taskMailbox.submitResult(newTaskHash, invalidCert, result); + } + + function test_Revert_AlreadyVerified() public { + // First submit a valid result + vm.warp(block.timestamp + 1); + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(taskHash); + + vm.prank(aggregator); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("result")); + + // Try to submit again + vm.prank(aggregator); + vm.expectRevert(abi.encodeWithSelector(InvalidTaskStatus.selector, TaskStatus.CREATED, TaskStatus.VERIFIED)); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("new result")); + } + + function test_Revert_ReentrancyOnSubmitResult() public { + // Deploy reentrant attacker as task hook + AVSTaskHookReentrantAttacker attacker = new AVSTaskHookReentrantAttacker(address(taskMailbox)); + + // Set up executor operator set with attacker as hook + OperatorSet memory operatorSet = OperatorSet(avs2, executorOperatorSetId2); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.taskHook = IAVSTaskHook(address(attacker)); + + vm.prank(avs2); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create a task + TaskParams memory taskParams = + TaskParams({refundCollector: refundCollector, executorOperatorSet: operatorSet, payload: bytes("test payload")}); + + vm.prank(creator); + bytes32 attackTaskHash = taskMailbox.createTask(taskParams); + + // Advance time + vm.warp(block.timestamp + 1); + + // Set up attack parameters + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(attackTaskHash); + + attacker.setAttackParams( + taskParams, + attackTaskHash, + cert, + bytes("result"), + false, // attack on handleTaskResultSubmission + false // attack submitResult + ); + + // Try to submit result - should revert on reentrancy + vm.prank(aggregator); + vm.expectRevert("ReentrancyGuard: reentrant call"); + taskMailbox.submitResult(attackTaskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_ReentrancyOnSubmitResult_TryingToCreateTask() public { + // Deploy reentrant attacker as task hook + AVSTaskHookReentrantAttacker attacker = new AVSTaskHookReentrantAttacker(address(taskMailbox)); + + // Give attacker tokens and approve + mockToken.mint(address(attacker), 1000 ether); + vm.prank(address(attacker)); + mockToken.approve(address(taskMailbox), type(uint).max); + + // Set up executor operator set with attacker as hook + OperatorSet memory operatorSet = OperatorSet(avs2, executorOperatorSetId2); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.taskHook = IAVSTaskHook(address(attacker)); + + vm.prank(avs2); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create a task + TaskParams memory taskParams = + TaskParams({refundCollector: refundCollector, executorOperatorSet: operatorSet, payload: bytes("test payload")}); + + vm.prank(creator); + bytes32 attackTaskHash = taskMailbox.createTask(taskParams); + + // Advance time + vm.warp(block.timestamp + 1); + + // Set up attack parameters + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(attackTaskHash); + + attacker.setAttackParams( + taskParams, + attackTaskHash, + cert, + bytes("result"), + false, // attack on handleTaskResultSubmission + true // attack createTask + ); + + // Try to submit result - should revert on reentrancy + vm.prank(aggregator); + vm.expectRevert("ReentrancyGuard: reentrant call"); + taskMailbox.submitResult(attackTaskHash, abi.encode(cert), bytes("result")); + } + + function test_submitResult_WithZeroStakeThreshold() public { + // Setup executor operator set with zero stake threshold + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encode(uint16(0)) // Zero threshold + }); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Advance time + vm.warp(block.timestamp + 1); + + // Submit result with zero threshold should still work + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(newTaskHash); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, abi.encode(cert), bytes("test result")); + + // Verify task was verified + TaskStatus status = taskMailbox.getTaskStatus(newTaskHash); + assertEq(uint8(status), uint8(TaskStatus.VERIFIED)); + } + + function test_submitResult_WithMaxStakeThreshold() public { + // Setup executor operator set with max stake threshold + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encode(uint16(10_000)) // 100% threshold + }); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Advance time + vm.warp(block.timestamp + 1); + + // Submit result with max threshold + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(newTaskHash); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, abi.encode(cert), bytes("test result")); + + // Verify task was verified + TaskStatus status = taskMailbox.getTaskStatus(newTaskHash); + assertEq(uint8(status), uint8(TaskStatus.VERIFIED)); + } + + function test_Revert_WhenBN254CertificateHasEmptySignature() public { + // Advance time by 1 second to pass TimestampAtCreation check + vm.warp(block.timestamp + 1); + + // Create BN254 certificate with empty signature (X=0, Y=0) + IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: taskHash, + signature: BN254.G1Point(0, 0), // Empty signature + apk: BN254.G2Point([uint(1), uint(2)], [uint(3), uint(4)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + + // Submit result should fail with EmptyCertificateSignature error + vm.prank(aggregator); + vm.expectRevert(EmptyCertificateSignature.selector); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenBN254CertificateHasEmptySignature_OnlyXZero() public { + // Advance time by 1 second to pass TimestampAtCreation check + vm.warp(block.timestamp + 1); + + // Create BN254 certificate with partially empty signature (X=0, Y=1) + IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: taskHash, + signature: BN254.G1Point(0, 1), // Partially empty signature + apk: BN254.G2Point([uint(1), uint(2)], [uint(3), uint(4)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + + // This should now fail since any coordinate being zero is invalid + vm.prank(aggregator); + vm.expectRevert(EmptyCertificateSignature.selector); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenBN254CertificateHasEmptySignature_OnlyYZero() public { + // Advance time by 1 second to pass TimestampAtCreation check + vm.warp(block.timestamp + 1); + + // Create BN254 certificate with partially empty signature (X=1, Y=0) + IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: taskHash, + signature: BN254.G1Point(1, 0), // Partially empty signature + apk: BN254.G2Point([uint(1), uint(2)], [uint(3), uint(4)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + + // This should also fail since any coordinate being zero is invalid + vm.prank(aggregator); + vm.expectRevert(EmptyCertificateSignature.selector); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenECDSACertificateHasEmptySignature() public { + // Setup executor operator set with ECDSA curve type + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.curveType = IKeyRegistrarTypes.CurveType.ECDSA; + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Advance time by 1 second to pass TimestampAtCreation check + vm.warp(block.timestamp + 1); + + // Create ECDSA certificate with empty signature + IECDSACertificateVerifierTypes.ECDSACertificate memory cert = IECDSACertificateVerifierTypes.ECDSACertificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: newTaskHash, + sig: bytes("") // Empty signature + }); + + // Submit result should fail with EmptyCertificateSignature error + vm.prank(aggregator); + vm.expectRevert(EmptyCertificateSignature.selector); + taskMailbox.submitResult(newTaskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenBN254CertificateHasEmptySignature_WithZeroThreshold() public { + // Setup executor operator set with zero stake threshold + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.consensus = Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encode(uint16(0)) // Zero threshold + }); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Advance time + vm.warp(block.timestamp + 1); + + // Create BN254 certificate with empty signature + IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: newTaskHash, + signature: BN254.G1Point(0, 0), // Empty signature + apk: BN254.G2Point([uint(1), uint(2)], [uint(3), uint(4)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + + // Even with zero threshold, empty signatures should be rejected + vm.prank(aggregator); + vm.expectRevert(EmptyCertificateSignature.selector); + taskMailbox.submitResult(newTaskHash, abi.encode(cert), bytes("result")); + } + + function test_Revert_WhenECDSACertificateHasEmptySignature_WithZeroThreshold() public { + // Setup executor operator set with ECDSA curve type and zero threshold + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.curveType = IKeyRegistrarTypes.CurveType.ECDSA; + config.consensus = Consensus({ + consensusType: ConsensusType.STAKE_PROPORTION_THRESHOLD, + value: abi.encode(uint16(0)) // Zero threshold + }); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Advance time + vm.warp(block.timestamp + 1); + + // Create ECDSA certificate with empty signature + IECDSACertificateVerifierTypes.ECDSACertificate memory cert = IECDSACertificateVerifierTypes.ECDSACertificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: newTaskHash, + sig: bytes("") // Empty signature + }); + + // Even with zero threshold, empty signatures should be rejected + vm.prank(aggregator); + vm.expectRevert(EmptyCertificateSignature.selector); + taskMailbox.submitResult(newTaskHash, abi.encode(cert), bytes("result")); + } + + function test_submitResult_FeeTransferToCollector() public { + // Set up operator set with fee token + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.feeToken = mockToken; + config.feeCollector = feeCollector; + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create task with fee + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balances + uint mailboxBalanceBefore = mockToken.balanceOf(address(taskMailbox)); + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + // mailboxBalanceBefore should be 2*avsFee (one from setUp, one from this test) + + // Advance time and submit result + vm.warp(block.timestamp + 1); + + IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: newTaskHash, + signature: BN254.G1Point(1, 2), + apk: BN254.G2Point([uint(3), uint(4)], [uint(5), uint(6)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + + // Mock certificate verification + vm.mockCall( + address(mockBN254CertificateVerifier), + abi.encodeWithSelector(IBN254CertificateVerifier.verifyCertificateProportion.selector), + abi.encode(true) + ); + + // Expect Transfer event for fee transfer from taskMailbox to feeCollector + // Since feeSplit is 0 by default, all avsFee goes to feeCollector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), feeCollector, avsFee); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, abi.encode(cert), bytes("result")); + + // Verify fee was transferred to fee collector + assertEq(mockToken.balanceOf(address(taskMailbox)), mailboxBalanceBefore - avsFee); + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore + avsFee); + + // Verify task cannot be refunded after verification + Task memory task = taskMailbox.getTaskInfo(newTaskHash); + assertEq(uint8(task.status), uint8(TaskStatus.VERIFIED)); + assertFalse(task.isFeeRefunded); + } + + function test_FeeSplit_10Percent() public { + // Setup fee split + uint16 feeSplit = 1000; // 10% + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balances + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + uint feeSplitCollectorBalanceBefore = mockToken.balanceOf(localFeeSplitCollector); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + // Calculate expected amounts + uint expectedFeeSplitAmount = (avsFee * feeSplit) / 10_000; + uint expectedFeeCollectorAmount = avsFee - expectedFeeSplitAmount; + + // Expect Transfer events for fee distribution + // First, transfer to fee split collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), localFeeSplitCollector, expectedFeeSplitAmount); + + // Then, transfer remaining to fee collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), feeCollector, expectedFeeCollectorAmount); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + assertEq(mockToken.balanceOf(localFeeSplitCollector), feeSplitCollectorBalanceBefore + expectedFeeSplitAmount); + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore + expectedFeeCollectorAmount); + } + + function test_FeeSplit_50Percent() public { + // Setup fee split + uint16 feeSplit = 5000; // 50% + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balances + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + uint feeSplitCollectorBalanceBefore = mockToken.balanceOf(localFeeSplitCollector); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + // Calculate expected amounts - should be equal split + uint expectedFeeSplitAmount = avsFee / 2; + uint expectedFeeCollectorAmount = avsFee - expectedFeeSplitAmount; + + // Expect Transfer events for fee distribution + // First, transfer to fee split collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), localFeeSplitCollector, expectedFeeSplitAmount); + + // Then, transfer remaining to fee collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), feeCollector, expectedFeeCollectorAmount); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + assertEq(mockToken.balanceOf(localFeeSplitCollector), feeSplitCollectorBalanceBefore + expectedFeeSplitAmount); + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore + expectedFeeCollectorAmount); + } + + function test_FeeSplit_0Percent() public { + // Setup fee split - 0% means all fees go to fee collector + uint16 feeSplit = 0; + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balances + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + uint feeSplitCollectorBalanceBefore = mockToken.balanceOf(localFeeSplitCollector); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + // Expect Transfer event for fee transfer to fee collector only (no fee split) + // Since feeSplit is 0, all avsFee goes to feeCollector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), feeCollector, avsFee); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + // Verify all fees went to fee collector + assertEq(mockToken.balanceOf(localFeeSplitCollector), feeSplitCollectorBalanceBefore); // No change + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore + avsFee); + } + + function test_FeeSplit_100Percent() public { + // Setup fee split - 100% means all fees go to fee split collector + uint16 feeSplit = 10_000; + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balances + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + uint feeSplitCollectorBalanceBefore = mockToken.balanceOf(localFeeSplitCollector); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + // Expect Transfer event for fee transfer to fee split collector only + // Since feeSplit is 100%, all avsFee goes to feeSplitCollector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), localFeeSplitCollector, avsFee); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + // Verify all fees went to fee split collector + assertEq(mockToken.balanceOf(localFeeSplitCollector), feeSplitCollectorBalanceBefore + avsFee); + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore); // No change + } + + function test_FeeSplit_ZeroFeeAmount() public { + // Setup fee split + uint16 feeSplit = 5000; // 50% + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Setup operator set with zero fee + mockTaskHook.setDefaultFee(0); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balances + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + uint feeSplitCollectorBalanceBefore = mockToken.balanceOf(localFeeSplitCollector); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + // Verify no transfers occurred + assertEq(mockToken.balanceOf(feeSplitCollector), feeSplitCollectorBalanceBefore); + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore); + } + + function test_FeeSplit_WithSmallFee() public { + // Setup fee split + uint16 feeSplit = 3333; // 33.33% + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Setup small fee + uint96 smallFee = 100; // 100 wei + mockTaskHook.setDefaultFee(smallFee); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), smallFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balances + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + uint feeSplitCollectorBalanceBefore = mockToken.balanceOf(localFeeSplitCollector); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + // Calculate expected fee distribution + uint expectedFeeSplitAmount = (smallFee * feeSplit) / 10_000; // 33 wei + uint expectedFeeCollectorAmount = smallFee - expectedFeeSplitAmount; // 67 wei + + // Expect Transfer events for fee distribution + // First, transfer to fee split collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), localFeeSplitCollector, expectedFeeSplitAmount); + + // Then, transfer remaining to fee collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), feeCollector, expectedFeeCollectorAmount); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + assertEq(mockToken.balanceOf(localFeeSplitCollector), feeSplitCollectorBalanceBefore + expectedFeeSplitAmount); + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore + expectedFeeCollectorAmount); + assertEq(expectedFeeSplitAmount + expectedFeeCollectorAmount, smallFee); // Verify no wei lost + } + + function test_FeeSplit_Rounding() public { + // Setup fee split that will cause rounding + uint16 feeSplit = 1; // 0.01% + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Setup fee that won't divide evenly + uint96 oddFee = 10_001; // Will result in 1.0001 wei split + mockTaskHook.setDefaultFee(oddFee); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), oddFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + // Calculate expected fee distribution + uint expectedFeeSplitAmount = (oddFee * feeSplit) / 10_000; // 1 wei (rounded down from 1.0001) + uint expectedFeeCollectorAmount = oddFee - expectedFeeSplitAmount; // 10000 wei + + // Expect Transfer events for fee distribution + // First, transfer to fee split collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), localFeeSplitCollector, expectedFeeSplitAmount); + + // Then, transfer remaining to fee collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), feeCollector, expectedFeeCollectorAmount); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + assertEq(mockToken.balanceOf(localFeeSplitCollector), expectedFeeSplitAmount); + assertEq(mockToken.balanceOf(feeCollector), expectedFeeCollectorAmount); + assertEq(expectedFeeSplitAmount + expectedFeeCollectorAmount, oddFee); + } + + function testFuzz_FeeSplit(uint16 _feeSplit, uint96 _avsFee) public { + // Bound inputs + _feeSplit = uint16(bound(_feeSplit, 0, 10_000)); + vm.assume(_avsFee > 0 && _avsFee <= 1000 ether); + vm.assume(_avsFee <= mockToken.balanceOf(creator)); + + // Setup fee split + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(_feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Setup fee + mockTaskHook.setDefaultFee(_avsFee); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + if (_avsFee > 0) { + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), _avsFee); + } + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balances + uint mailboxBalanceBefore = mockToken.balanceOf(address(taskMailbox)); + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + uint feeSplitCollectorBalanceBefore = mockToken.balanceOf(localFeeSplitCollector); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + // Calculate expected amounts + uint expectedFeeSplitAmount = (uint(_avsFee) * _feeSplit) / 10_000; + uint expectedAvsAmount = _avsFee - expectedFeeSplitAmount; + + // Expect Transfer events for fee distribution + if (_avsFee > 0) { + if (expectedFeeSplitAmount > 0) { + // First, transfer to fee split collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), localFeeSplitCollector, expectedFeeSplitAmount); + } + + if (expectedAvsAmount > 0) { + // Then, transfer remaining to fee collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), feeCollector, expectedAvsAmount); + } + } + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + // Verify balances + assertEq(mockToken.balanceOf(localFeeSplitCollector), feeSplitCollectorBalanceBefore + expectedFeeSplitAmount); + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore + expectedAvsAmount); + + // Verify total distribution equals original fee + assertEq(expectedFeeSplitAmount + expectedAvsAmount, _avsFee); + } + + function test_FeeSplit_TaskUsesSnapshotFeeSplitAndCurrentCollector() public { + // Setup initial fee split + uint16 initialFeeSplit = 2000; // 20% + address initialFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(initialFeeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(initialFeeSplitCollector); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Change fee split after task creation + uint16 newFeeSplit = 5000; // 50% + address newFeeSplitCollector = address(0xABC); + vm.prank(owner); + taskMailbox.setFeeSplit(newFeeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(newFeeSplitCollector); + + // Check initial balances + uint feeCollectorBalanceBefore = mockToken.balanceOf(feeCollector); + uint initialCollectorBalanceBefore = mockToken.balanceOf(initialFeeSplitCollector); + uint newCollectorBalanceBefore = mockToken.balanceOf(newFeeSplitCollector); + + // Submit result + vm.warp(block.timestamp + 1); + bytes memory executorCert = abi.encode(_createValidBN254Certificate(newTaskHash)); + + // Calculate expected fee distribution using snapshot feeSplit (20%) but current collector + uint expectedFeeSplitAmount = (avsFee * initialFeeSplit) / 10_000; + uint expectedFeeCollectorAmount = avsFee - expectedFeeSplitAmount; + + // Expect Transfer events for fee distribution + // First, transfer to current fee split collector (not the initial one) + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), newFeeSplitCollector, expectedFeeSplitAmount); + + // Then, transfer remaining to fee collector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), feeCollector, expectedFeeCollectorAmount); + + vm.prank(aggregator); + taskMailbox.submitResult(newTaskHash, executorCert, bytes("result")); + + assertEq(mockToken.balanceOf(initialFeeSplitCollector), initialCollectorBalanceBefore); // No change + assertEq(mockToken.balanceOf(feeCollector), feeCollectorBalanceBefore + expectedFeeCollectorAmount); + assertEq(mockToken.balanceOf(newFeeSplitCollector), newCollectorBalanceBefore + expectedFeeSplitAmount); // Gets the fee split + } +} + +// Test contract for refundFee function +contract TaskMailboxUnitTests_refundFee is TaskMailboxUnitTests { + bytes32 public taskHash; + + function setUp() public override { + super.setUp(); + + // Set up operator set and task config with fee token + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.feeToken = mockToken; + config.feeCollector = feeCollector; + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create a task with fee + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + taskHash = taskMailbox.createTask(taskParams); + } + + function test_refundFee_Success() public { + // Move time forward to expire the task + vm.warp(block.timestamp + taskSLA + 1); + + // Check initial balances + uint mailboxBalanceBefore = mockToken.balanceOf(address(taskMailbox)); + uint refundCollectorBalanceBefore = mockToken.balanceOf(refundCollector); + + // Expect Transfer event for fee refund from taskMailbox to refundCollector + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), refundCollector, avsFee); + + // Refund fee as refund collector + vm.expectEmit(true, true, false, true); + emit FeeRefunded(refundCollector, taskHash, avsFee); + + vm.prank(refundCollector); + taskMailbox.refundFee(taskHash); + + // Verify balances changed correctly + assertEq(mockToken.balanceOf(address(taskMailbox)), mailboxBalanceBefore - avsFee); + assertEq(mockToken.balanceOf(refundCollector), refundCollectorBalanceBefore + avsFee); + + // Verify task state + Task memory task = taskMailbox.getTaskInfo(taskHash); + assertTrue(task.isFeeRefunded); + assertEq(uint8(task.status), uint8(TaskStatus.EXPIRED)); + } + + function test_Revert_refundFee_OnlyRefundCollector() public { + // Move time forward to expire the task + vm.warp(block.timestamp + taskSLA + 1); + + // Try to refund as someone else (not refund collector) + vm.prank(creator); + vm.expectRevert(OnlyRefundCollector.selector); + taskMailbox.refundFee(taskHash); + + // Try as a random address + vm.prank(address(0x1234)); + vm.expectRevert(OnlyRefundCollector.selector); + taskMailbox.refundFee(taskHash); + } + + function test_Revert_refundFee_FeeAlreadyRefunded() public { + // Move time forward to expire the task + vm.warp(block.timestamp + taskSLA + 1); + + // First refund should succeed + vm.prank(refundCollector); + taskMailbox.refundFee(taskHash); + + // Second refund should fail + vm.prank(refundCollector); + vm.expectRevert(FeeAlreadyRefunded.selector); + taskMailbox.refundFee(taskHash); + } + + function test_Revert_refundFee_TaskNotExpired() public { + // Try to refund before task expires + vm.prank(refundCollector); + vm.expectRevert(abi.encodeWithSelector(InvalidTaskStatus.selector, TaskStatus.EXPIRED, TaskStatus.CREATED)); + taskMailbox.refundFee(taskHash); + } + + function test_Revert_refundFee_TaskAlreadyVerified() public { + // Submit result to verify the task + IBN254CertificateVerifierTypes.BN254Certificate memory cert = IBN254CertificateVerifierTypes.BN254Certificate({ + referenceTimestamp: uint32(block.timestamp), + messageHash: taskHash, + signature: BN254.G1Point(1, 2), + apk: BN254.G2Point([uint(3), uint(4)], [uint(5), uint(6)]), + nonSignerWitnesses: new IBN254CertificateVerifierTypes.BN254OperatorInfoWitness[](0) + }); + + // Mock certificate verification + vm.mockCall( + address(mockBN254CertificateVerifier), + abi.encodeWithSelector(IBN254CertificateVerifier.verifyCertificateProportion.selector), + abi.encode(true) + ); + + vm.prank(aggregator); + vm.warp(block.timestamp + 1); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("result")); + + // Move time forward to what would be expiry + vm.warp(block.timestamp + taskSLA + 1); + + // Try to refund - should fail because task is verified + vm.prank(refundCollector); + vm.expectRevert(abi.encodeWithSelector(InvalidTaskStatus.selector, TaskStatus.EXPIRED, TaskStatus.VERIFIED)); + taskMailbox.refundFee(taskHash); + } + + function test_refundFee_NoFeeToken() public { + // Create a task without fee token + OperatorSet memory operatorSet = OperatorSet(avs2, executorOperatorSetId2); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + config.feeToken = IERC20(address(0)); + + vm.prank(avs2); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + TaskParams memory taskParams = + TaskParams({refundCollector: refundCollector, executorOperatorSet: operatorSet, payload: bytes("test payload")}); + + vm.prank(creator); + bytes32 noFeeTaskHash = taskMailbox.createTask(taskParams); + + // Move time forward to expire the task + vm.warp(block.timestamp + taskSLA + 1); + + // Refund should succeed but no transfer should occur + uint mailboxBalanceBefore = mockToken.balanceOf(address(taskMailbox)); + uint refundCollectorBalanceBefore = mockToken.balanceOf(refundCollector); + + vm.prank(refundCollector); + taskMailbox.refundFee(noFeeTaskHash); + + // Balances should not change since there's no fee token + assertEq(mockToken.balanceOf(address(taskMailbox)), mailboxBalanceBefore); + assertEq(mockToken.balanceOf(refundCollector), refundCollectorBalanceBefore); + + // Task should still be marked as refunded + Task memory task = taskMailbox.getTaskInfo(noFeeTaskHash); + assertTrue(task.isFeeRefunded); + } + + function test_refundFee_WithFeeSplit() public { + // Setup fee split + uint16 feeSplit = 3000; // 30% + address localFeeSplitCollector = address(0x789); + vm.prank(owner); + taskMailbox.setFeeSplit(feeSplit); + vm.prank(owner); + taskMailbox.setFeeSplitCollector(localFeeSplitCollector); + + // Create task + TaskParams memory taskParams = _createValidTaskParams(); + + // Expect Transfer event for fee transfer from creator to taskMailbox + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(creator, address(taskMailbox), avsFee); + + vm.prank(creator); + bytes32 newTaskHash = taskMailbox.createTask(taskParams); + + // Check initial balance + uint refundCollectorBalanceBefore = mockToken.balanceOf(refundCollector); + + // Move time forward to expire the task + vm.warp(block.timestamp + taskSLA + 1); + + // Expect Transfer event for fee refund from taskMailbox to refundCollector + // Note: fee split doesn't apply to refunds, full amount is refunded + vm.expectEmit(true, true, false, true, address(mockToken)); + emit IERC20.Transfer(address(taskMailbox), refundCollector, avsFee); + + // Refund fee + vm.prank(refundCollector); + taskMailbox.refundFee(newTaskHash); + + // Verify full fee was refunded (fee split doesn't apply to refunds) + assertEq(mockToken.balanceOf(refundCollector), refundCollectorBalanceBefore + avsFee); + + // Verify fee split collector got nothing + assertEq(mockToken.balanceOf(feeSplitCollector), 0); + } + + function test_refundFee_ZeroFee() public { + // Set mock to return 0 fee + mockTaskHook.setDefaultFee(0); + + // Create a task with 0 fee + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 zeroFeeTaskHash = taskMailbox.createTask(taskParams); + + // Move time forward to expire the task + vm.warp(block.timestamp + taskSLA + 1); + + // Refund should succeed but no transfer should occur + uint mailboxBalanceBefore = mockToken.balanceOf(address(taskMailbox)); + uint refundCollectorBalanceBefore = mockToken.balanceOf(refundCollector); + + vm.prank(refundCollector); + taskMailbox.refundFee(zeroFeeTaskHash); + + // Balances should not change since fee is 0 + assertEq(mockToken.balanceOf(address(taskMailbox)), mailboxBalanceBefore); + assertEq(mockToken.balanceOf(refundCollector), refundCollectorBalanceBefore); + + // Task should still be marked as refunded + Task memory task = taskMailbox.getTaskInfo(zeroFeeTaskHash); + assertTrue(task.isFeeRefunded); + } +} + +// Test contract for view functions +contract TaskMailboxUnitTests_ViewFunctions is TaskMailboxUnitTests { + bytes32 public taskHash; + OperatorSet public operatorSet; + + function setUp() public override { + super.setUp(); + + // Set up executor operator set task config + operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create a task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + taskHash = taskMailbox.createTask(taskParams); + } + + function test_ViewFunctions() public { + // Test that we can read the immutable certificate verifiers + assertEq(taskMailbox.BN254_CERTIFICATE_VERIFIER(), address(mockBN254CertificateVerifier)); + assertEq(taskMailbox.ECDSA_CERTIFICATE_VERIFIER(), address(mockECDSACertificateVerifier)); + assertEq(taskMailbox.version(), "1.0.0"); + assertEq(taskMailbox.owner(), owner); + + // Test fee split getters + assertEq(taskMailbox.feeSplit(), 0); // Default value from initialization + assertEq(taskMailbox.feeSplitCollector(), feeSplitCollector); // Default value from initialization + } + + function test_getExecutorOperatorSetTaskConfig() public { + ExecutorOperatorSetTaskConfig memory config = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); + + assertEq(uint8(config.curveType), uint8(IKeyRegistrarTypes.CurveType.BN254)); + assertEq(address(config.taskHook), address(mockTaskHook)); + assertEq(address(config.feeToken), address(mockToken)); + assertEq(config.feeCollector, feeCollector); + assertEq(config.taskSLA, taskSLA); + assertEq(uint8(config.consensus.consensusType), uint8(ConsensusType.STAKE_PROPORTION_THRESHOLD)); + uint16 decodedThreshold = abi.decode(config.consensus.value, (uint16)); + assertEq(decodedThreshold, stakeProportionThreshold); + assertEq(config.taskMetadata, bytes("test metadata")); + } + + function test_getExecutorOperatorSetTaskConfig_Unregistered() public { + OperatorSet memory unregisteredSet = OperatorSet(avs2, 99); + ExecutorOperatorSetTaskConfig memory config = taskMailbox.getExecutorOperatorSetTaskConfig(unregisteredSet); + + // Should return empty config + assertEq(uint8(config.curveType), uint8(IKeyRegistrarTypes.CurveType.NONE)); + assertEq(address(config.taskHook), address(0)); + assertEq(address(config.feeToken), address(0)); + assertEq(config.feeCollector, address(0)); + assertEq(config.taskSLA, 0); + assertEq(config.consensus.value.length, 0); + assertEq(config.taskMetadata, bytes("")); + } + + function test_getTaskInfo() public { + Task memory task = taskMailbox.getTaskInfo(taskHash); + + assertEq(task.creator, creator); + assertEq(task.creationTime, block.timestamp); + assertEq(uint8(task.status), uint8(TaskStatus.CREATED)); + assertEq(task.avs, avs); + assertEq(task.executorOperatorSetId, executorOperatorSetId); + assertEq(task.refundCollector, refundCollector); + assertEq(task.avsFee, avsFee); + assertEq(task.feeSplit, 0); + assertEq(task.payload, bytes("test payload")); + assertEq(task.executorCert, bytes("")); + assertEq(task.result, bytes("")); + } + + function test_getTaskInfo_NonExistentTask() public { + bytes32 nonExistentHash = keccak256("non-existent"); + Task memory task = taskMailbox.getTaskInfo(nonExistentHash); + + // Should return empty task with NONE status (default for non-existent tasks) + assertEq(task.creator, address(0)); + assertEq(task.creationTime, 0); + assertEq(uint8(task.status), uint8(TaskStatus.NONE)); // Non-existent tasks show as NONE + assertEq(task.avs, address(0)); + assertEq(task.executorOperatorSetId, 0); + } + + function test_getTaskStatus_Created() public { + TaskStatus status = taskMailbox.getTaskStatus(taskHash); + assertEq(uint8(status), uint8(TaskStatus.CREATED)); + } + + function test_getTaskStatus_Verified() public { + vm.warp(block.timestamp + 1); + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(taskHash); + + vm.prank(aggregator); + taskMailbox.submitResult(taskHash, abi.encode(cert), bytes("result")); + + TaskStatus status = taskMailbox.getTaskStatus(taskHash); + assertEq(uint8(status), uint8(TaskStatus.VERIFIED)); + } + + function test_getTaskStatus_Expired() public { + // Advance time past SLA + vm.warp(block.timestamp + taskSLA + 1); + + TaskStatus status = taskMailbox.getTaskStatus(taskHash); + assertEq(uint8(status), uint8(TaskStatus.EXPIRED)); + } + + function test_getTaskStatus_None() public { + // Get status of non-existent task + bytes32 nonExistentHash = keccak256("non-existent"); + TaskStatus status = taskMailbox.getTaskStatus(nonExistentHash); + assertEq(uint8(status), uint8(TaskStatus.NONE)); + } + + function test_getTaskInfo_Expired() public { + // Advance time past SLA + vm.warp(block.timestamp + taskSLA + 1); + + Task memory task = taskMailbox.getTaskInfo(taskHash); + + // getTaskInfo should return Expired status + assertEq(uint8(task.status), uint8(TaskStatus.EXPIRED)); + } + + function test_getTaskResult() public { + // Submit result first + vm.warp(block.timestamp + 1); + IBN254CertificateVerifier.BN254Certificate memory cert = _createValidBN254Certificate(taskHash); + bytes memory expectedResult = bytes("test result"); + + vm.prank(aggregator); + taskMailbox.submitResult(taskHash, abi.encode(cert), expectedResult); + + // Get result + bytes memory result = taskMailbox.getTaskResult(taskHash); + assertEq(result, expectedResult); + } + + function test_Revert_getTaskResult_NotVerified() public { + vm.expectRevert(abi.encodeWithSelector(InvalidTaskStatus.selector, TaskStatus.VERIFIED, TaskStatus.CREATED)); + taskMailbox.getTaskResult(taskHash); + } + + function test_Revert_getTaskResult_Expired() public { + vm.warp(block.timestamp + taskSLA + 1); + + vm.expectRevert(abi.encodeWithSelector(InvalidTaskStatus.selector, TaskStatus.VERIFIED, TaskStatus.EXPIRED)); + taskMailbox.getTaskResult(taskHash); + } + + function test_Revert_getTaskResult_None() public { + bytes32 nonExistentHash = keccak256("non-existent"); + + vm.expectRevert(abi.encodeWithSelector(InvalidTaskStatus.selector, TaskStatus.VERIFIED, TaskStatus.NONE)); + taskMailbox.getTaskResult(nonExistentHash); + } +} + +// Test contract for storage variables +contract TaskMailboxUnitTests_Storage is TaskMailboxUnitTests { + function test_globalTaskCount() public { + // Set up executor operator set task config + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create multiple tasks and verify the count through task hashes + TaskParams memory taskParams = _createValidTaskParams(); + + // First task should have count 0 + bytes32 expectedHash0 = keccak256(abi.encode(0, address(taskMailbox), block.chainid, taskParams)); + vm.prank(creator); + bytes32 taskHash0 = taskMailbox.createTask(taskParams); + assertEq(taskHash0, expectedHash0); + + // Second task should have count 1 + bytes32 expectedHash1 = keccak256(abi.encode(1, address(taskMailbox), block.chainid, taskParams)); + vm.prank(creator); + bytes32 taskHash1 = taskMailbox.createTask(taskParams); + assertEq(taskHash1, expectedHash1); + + // Third task should have count 2 + bytes32 expectedHash2 = keccak256(abi.encode(2, address(taskMailbox), block.chainid, taskParams)); + vm.prank(creator); + bytes32 taskHash2 = taskMailbox.createTask(taskParams); + assertEq(taskHash2, expectedHash2); + } + + function test_isExecutorOperatorSetRegistered() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + // Initially not registered + assertFalse(taskMailbox.isExecutorOperatorSetRegistered(operatorSet.key())); + + // Set config first (requirement for registerExecutorOperatorSet) + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // After setting config, it should be automatically registered + assertTrue(taskMailbox.isExecutorOperatorSetRegistered(operatorSet.key())); + + // Unregister + vm.prank(avs); + taskMailbox.registerExecutorOperatorSet(operatorSet, false); + assertFalse(taskMailbox.isExecutorOperatorSetRegistered(operatorSet.key())); + } + + function test_getExecutorOperatorSetTaskConfig() public { + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + // Set config + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Access config via getExecutorOperatorSetTaskConfig function + ExecutorOperatorSetTaskConfig memory storedConfig = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); + + assertEq(uint8(storedConfig.curveType), uint8(config.curveType)); + assertEq(address(storedConfig.taskHook), address(config.taskHook)); + assertEq(address(storedConfig.feeToken), address(config.feeToken)); + assertEq(storedConfig.feeCollector, config.feeCollector); + assertEq(storedConfig.taskSLA, config.taskSLA); + assertEq(uint8(storedConfig.consensus.consensusType), uint8(config.consensus.consensusType)); + assertEq(storedConfig.consensus.value, config.consensus.value); + assertEq(storedConfig.taskMetadata, config.taskMetadata); + } + + function test_tasks() public { + // Set up executor operator set task config + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Create a task + TaskParams memory taskParams = _createValidTaskParams(); + vm.prank(creator); + bytes32 taskHash = taskMailbox.createTask(taskParams); + + // Access task via getTaskInfo public function + Task memory task = taskMailbox.getTaskInfo(taskHash); + + assertEq(task.creator, creator); + assertEq(task.creationTime, block.timestamp); + assertEq(uint8(task.status), uint8(TaskStatus.CREATED)); + assertEq(task.avs, avs); + assertEq(task.executorOperatorSetId, executorOperatorSetId); + assertEq(task.refundCollector, refundCollector); + assertEq(task.avsFee, avsFee); + assertEq(task.feeSplit, 0); + assertEq(task.payload, bytes("test payload")); + assertEq(task.executorCert, bytes("")); + assertEq(task.result, bytes("")); + } +} + +// Test contract for upgradeable functionality +contract TaskMailboxUnitTests_Upgradeable is TaskMailboxUnitTests { + function test_Initialize_OnlyOnce() public { + // Try to initialize again, should revert + vm.expectRevert("Initializable: contract is already initialized"); + taskMailbox.initialize(address(0x9999), 0, feeSplitCollector); + } + + function test_Implementation_CannotBeInitialized() public { + // Deploy a new implementation + TaskMailbox newImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), "1.0.1"); + + // Try to initialize the implementation directly, should revert + vm.expectRevert("Initializable: contract is already initialized"); + newImpl.initialize(owner, 0, feeSplitCollector); + } + + function test_ProxyUpgrade() public { + address newOwner = address(0x1234); + + // Deploy new implementation with different version + TaskMailbox newImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), "2.0.0"); + + // Check version before upgrade + assertEq(taskMailbox.version(), "1.0.0"); + + // Upgrade proxy to new implementation + proxyAdmin.upgrade(ITransparentUpgradeableProxy(address(taskMailbox)), address(newImpl)); + + // Check version after upgrade + assertEq(taskMailbox.version(), "2.0.0"); + + // Verify state is preserved (owner should still be the same) + assertEq(taskMailbox.owner(), owner); + } + + function test_ProxyAdmin_OnlyOwnerCanUpgrade() public { + address attacker = address(0x9999); + + // Deploy new implementation + TaskMailbox newImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), "2.0.0"); + + // Try to upgrade from non-owner, should revert + vm.prank(attacker); + vm.expectRevert("Ownable: caller is not the owner"); + proxyAdmin.upgrade(ITransparentUpgradeableProxy(address(taskMailbox)), address(newImpl)); + } + + function test_ProxyAdmin_CannotCallImplementation() public { + // ProxyAdmin should not be able to call implementation functions + vm.prank(address(proxyAdmin)); + vm.expectRevert("TransparentUpgradeableProxy: admin cannot fallback to proxy target"); + TaskMailbox(payable(address(taskMailbox))).owner(); + } + + function test_StorageSlotConsistency_AfterUpgrade() public { + address newOwner = address(0x1234); + + // First, make some state changes + vm.prank(owner); + taskMailbox.transferOwnership(newOwner); + assertEq(taskMailbox.owner(), newOwner); + + // Set up an executor operator set + OperatorSet memory operatorSet = OperatorSet(avs, executorOperatorSetId); + ExecutorOperatorSetTaskConfig memory config = _createValidExecutorOperatorSetTaskConfig(); + vm.prank(avs); + taskMailbox.setExecutorOperatorSetTaskConfig(operatorSet, config); + + // Verify config is set + ExecutorOperatorSetTaskConfig memory retrievedConfig = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); + assertEq(address(retrievedConfig.taskHook), address(config.taskHook)); + + // Deploy new implementation + TaskMailbox newImpl = new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), "2.0.0"); + + // Upgrade + vm.prank(address(this)); // proxyAdmin owner + proxyAdmin.upgrade(ITransparentUpgradeableProxy(address(taskMailbox)), address(newImpl)); + + // Verify all state is preserved after upgrade + assertEq(taskMailbox.owner(), newOwner); + assertEq(taskMailbox.version(), "2.0.0"); + + // Verify the executor operator set config is still there + ExecutorOperatorSetTaskConfig memory configAfterUpgrade = taskMailbox.getExecutorOperatorSetTaskConfig(operatorSet); + assertEq(address(configAfterUpgrade.taskHook), address(config.taskHook)); + assertEq(configAfterUpgrade.taskSLA, config.taskSLA); + assertEq(uint8(configAfterUpgrade.consensus.consensusType), uint8(config.consensus.consensusType)); + assertEq(configAfterUpgrade.consensus.value, config.consensus.value); + } + + function test_InitializerModifier_PreventsReinitialization() public { + // Deploy a new proxy without initialization data + TransparentUpgradeableProxy uninitializedProxy = new TransparentUpgradeableProxy( + address(new TaskMailbox(address(mockBN254CertificateVerifier), address(mockECDSACertificateVerifier), "1.0.0")), + address(new ProxyAdmin()), + "" + ); + + TaskMailbox uninitializedTaskMailbox = TaskMailbox(address(uninitializedProxy)); + + // Initialize it once + uninitializedTaskMailbox.initialize(owner, 0, feeSplitCollector); + assertEq(uninitializedTaskMailbox.owner(), owner); + + // Try to initialize again, should fail + vm.expectRevert("Initializable: contract is already initialized"); + uninitializedTaskMailbox.initialize(address(0x9999), 0, feeSplitCollector); + } +}