From ba55c96e0668edcba9907d682c2d05221fba5057 Mon Sep 17 00:00:00 2001 From: Segue Date: Mon, 30 Dec 2024 16:16:02 +0800 Subject: [PATCH 1/9] refactor --- contracts/contracts/l2/staking/Distribute.sol | 399 ------------------ .../contracts/l2/staking/IDistribute.sol | 155 ------- contracts/contracts/l2/staking/IL2Staking.sol | 134 +++++- contracts/contracts/l2/staking/IRecord.sol | 76 +--- contracts/contracts/l2/staking/L2Staking.sol | 338 +++++++++++---- contracts/contracts/l2/staking/Record.sol | 158 ------- contracts/contracts/l2/system/MorphToken.sol | 20 +- .../libraries/constants/Predeploys.sol | 10 +- go-ethereum | 2 +- 9 files changed, 377 insertions(+), 915 deletions(-) delete mode 100644 contracts/contracts/l2/staking/Distribute.sol delete mode 100644 contracts/contracts/l2/staking/IDistribute.sol diff --git a/contracts/contracts/l2/staking/Distribute.sol b/contracts/contracts/l2/staking/Distribute.sol deleted file mode 100644 index c7b132cad..000000000 --- a/contracts/contracts/l2/staking/Distribute.sol +++ /dev/null @@ -1,399 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity =0.8.24; - -import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -import {EnumerableSetUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; - -import {Predeploys} from "../../libraries/constants/Predeploys.sol"; -import {IDistribute} from "./IDistribute.sol"; -import {IMorphToken} from "../system/IMorphToken.sol"; - -contract Distribute is IDistribute, OwnableUpgradeable { - using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; - - /************* - * Constants * - *************/ - - /// @notice MorphToken contract address - address public immutable MORPH_TOKEN_CONTRACT; - - /// @notice l2 staking contract address - address public immutable L2_STAKING_CONTRACT; - - /// @notice record contract address - address public immutable RECORD_CONTRACT; - - /************* - * Variables * - *************/ - - /// @notice total minted epoch - uint256 private mintedEpochCount; - - /// @notice distribution info, delete after all claimed - mapping(address delegatee => mapping(uint256 epochIndex => Distribution)) private distributions; - - /// oldest distribution - mapping(address delegatee => uint256 epochIndex) private oldestDistribution; - - /// @notice delegatee's unclaimed commission - mapping(address delegatee => uint256 amount) private commissions; - - /// @notice delegator's unclaimed reward - mapping(address delegator => Unclaimed) private unclaimed; - - /********************** - * Function Modifiers * - **********************/ - - /// @notice Ensures that the caller message from l2 staking contract. - modifier onlyL2StakingContract() { - require(_msgSender() == L2_STAKING_CONTRACT, "only l2 staking contract allowed"); - _; - } - - /// @notice Ensures that the caller message from record contract. - modifier onlyRecordContract() { - require(_msgSender() == RECORD_CONTRACT, "only record contract allowed"); - _; - } - - /*************** - * Constructor * - ***************/ - - /// @notice constructor - constructor() { - MORPH_TOKEN_CONTRACT = Predeploys.MORPH_TOKEN; - L2_STAKING_CONTRACT = Predeploys.L2_STAKING; - RECORD_CONTRACT = Predeploys.RECORD; - _disableInitializers(); - } - - /*************** - * Initializer * - ***************/ - - /// @notice initializer - /// @param _owner owner - function initialize(address _owner) public initializer { - require(_owner != address(0), "invalid owner address"); - _transferOwnership(_owner); - } - - /************************ - * Restricted Functions * - ************************/ - - /// @dev notify delegation - /// @param delegatee delegatee address - /// @param delegator delegator address - /// @param effectiveEpoch delegation effective epoch - /// @param amount delegator total amount, not increment - /// @param totalAmount delegatee total amount - /// @param newDelegation first delegate or additional delegate - function notifyDelegation( - address delegatee, - address delegator, - uint256 effectiveEpoch, - uint256 amount, - uint256 totalAmount, - bool newDelegation - ) public onlyL2StakingContract { - // update distribution info - distributions[delegatee][effectiveEpoch].delegationAmount = totalAmount; - distributions[delegatee][effectiveEpoch].delegators.add(delegator); - distributions[delegatee][effectiveEpoch].amounts[delegator] = amount; - - // update unclaimed info - if (newDelegation) { - unclaimed[delegator].delegatees.add(delegatee); - unclaimed[delegator].unclaimedStart[delegatee] = effectiveEpoch; - } - } - - /// @dev notify unDelegation - /// @param delegatee delegatee address - /// @param delegator delegator address - /// @param effectiveEpoch delegation effective epoch - /// @param totalAmount delegatee total amount - function notifyUndelegation( - address delegatee, - address delegator, - uint256 effectiveEpoch, - uint256 totalAmount - ) public onlyL2StakingContract { - // update distribution info - distributions[delegatee][effectiveEpoch].delegationAmount = totalAmount; - - // not start reward yet, or delegate and undelegation within the same epoch, remove unclaim info - if (effectiveEpoch == 0 || unclaimed[delegator].unclaimedStart[delegatee] == effectiveEpoch) { - // update distribution info - distributions[delegatee][effectiveEpoch].delegators.remove(delegator); - delete distributions[delegatee][effectiveEpoch].amounts[delegator]; - - // update unclaimed info - unclaimed[delegator].delegatees.remove(delegatee); - delete unclaimed[delegator].undelegated[delegatee]; - delete unclaimed[delegator].unclaimedStart[delegatee]; - delete unclaimed[delegator].unclaimedEnd[delegatee]; - return; - } - - // update unclaimed info - unclaimed[delegator].undelegated[delegatee] = true; - unclaimed[delegator].unclaimedEnd[delegatee] = effectiveEpoch - 1; - } - - /// @dev update epoch reward - /// @param epochIndex epoch index - /// @param sequencers sequencers - /// @param delegatorRewards sequencer's delegator reward amount - /// @param commissionsAmount sequencers commission amount - function updateEpochReward( - uint256 epochIndex, - address[] calldata sequencers, - uint256[] calldata delegatorRewards, - uint256[] calldata commissionsAmount - ) external onlyRecordContract { - mintedEpochCount++; - require(mintedEpochCount - 1 == epochIndex, "invalid epoch index"); - require( - delegatorRewards.length == sequencers.length && commissionsAmount.length == sequencers.length, - "invalid data length" - ); - - for (uint256 i = 0; i < sequencers.length; i++) { - distributions[sequencers[i]][epochIndex].delegatorRewardAmount = delegatorRewards[i]; - if (distributions[sequencers[i]][epochIndex].delegationAmount == 0 && epochIndex > 0) { - distributions[sequencers[i]][epochIndex].delegationAmount = distributions[sequencers[i]][epochIndex - 1] - .delegationAmount; - } - commissions[sequencers[i]] += commissionsAmount[i]; - } - } - - /// @dev clean distributions - /// @param delegatee delegatee address - /// @param targetEpochIndex the epoch index to delete up to - /// - /// check off-chain that all rewards have been claimed - function cleanDistributions(address delegatee, uint256 targetEpochIndex) external onlyOwner { - uint256 i = oldestDistribution[delegatee]; - for (; i <= targetEpochIndex; i++) { - delete distributions[delegatee][i]; - } - oldestDistribution[delegatee] = i; - } - - /// @dev claim delegation reward of a delegatee. - /// @param delegatee delegatee address - /// @param delegator delegator address - /// @param targetEpochIndex the epoch index that the user wants to claim up to - /// - /// If targetEpochIndex is zero, claim up to latest mint epoch, - /// otherwise it must be greater than the last claimed epoch index. - function claim(address delegatee, address delegator, uint256 targetEpochIndex) external onlyL2StakingContract { - require(mintedEpochCount != 0, "not minted yet"); - uint256 endEpochIndex = (targetEpochIndex == 0 || targetEpochIndex > mintedEpochCount - 1) - ? mintedEpochCount - 1 - : targetEpochIndex; - (uint256 reward, ) = _claim(delegatee, delegator, endEpochIndex); - if (reward > 0) { - _transfer(delegator, reward); - } - } - - /// @dev claim delegation reward of all sequencers. - /// @param delegator delegator address - /// @param targetEpochIndex the epoch index that the user wants to claim up to - /// - /// If targetEpochIndex is zero, claim up to latest mint epoch, - /// otherwise it must be greater than the last claimed epoch index. - function claimAll(address delegator, uint256 targetEpochIndex) external onlyL2StakingContract { - require(mintedEpochCount != 0, "not minted yet"); - uint256 endEpochIndex = (targetEpochIndex == 0 || targetEpochIndex > mintedEpochCount - 1) - ? mintedEpochCount - 1 - : targetEpochIndex; - uint256 reward; - for (uint256 i = 0; i < unclaimed[delegator].delegatees.length(); ) { - bool removed = false; - address delegatee = unclaimed[delegator].delegatees.at(i); - if ( - unclaimed[delegator].delegatees.contains(delegatee) && - unclaimed[delegator].unclaimedStart[delegatee] <= endEpochIndex - ) { - (uint256 rewardTmp, bool removedTmp) = _claim(delegatee, delegator, endEpochIndex); - reward += rewardTmp; - removed = removedTmp; - } - if (!removed) { - i++; - } - } - if (reward > 0) { - _transfer(delegator, reward); - } - } - - /// @dev claim commission reward - /// @param delegatee delegatee address - function claimCommission(address delegatee) external onlyL2StakingContract { - require(commissions[delegatee] > 0, "no commission to claim"); - - uint256 amount = commissions[delegatee]; - delete commissions[delegatee]; - _transfer(delegatee, amount); - - emit CommissionClaimed(delegatee, amount); - } - - /************************* - * Public View Functions * - *************************/ - - /// @notice query oldest distribution - /// @param delegatee delegatee address - function queryOldestDistribution(address delegatee) external view returns (uint256 epochIndex) { - return oldestDistribution[delegatee]; - } - - /// @notice query whether all rewards have been claimed for a delegatee - /// @param delegator delegatee address - /// @param delegatee delegatee address - function isRewardClaimed(address delegator, address delegatee) external view returns (bool claimed) { - return !unclaimed[delegator].delegatees.contains(delegatee); - } - - /// @notice query all unclaimed commission of a delegatee - /// @param delegatee delegatee address - function queryUnclaimedCommission(address delegatee) external view returns (uint256 amount) { - return commissions[delegatee]; - } - - /// @notice query unclaimed morph reward on a delegatee - /// @param delegatee delegatee address - /// @param delegator delegatee address - function queryUnclaimed(address delegatee, address delegator) external view returns (uint256 reward) { - require(unclaimed[delegator].delegatees.length() != 0, "invalid delegator or no remaining reward"); - require(unclaimed[delegator].delegatees.contains(delegatee), "no remaining reward of the delegatee"); - - uint256 delegateeAmount; - uint256 delegatorAmount; - for (uint256 i = unclaimed[delegator].unclaimedStart[delegatee]; i < mintedEpochCount; i++) { - if (distributions[delegatee][i].amounts[delegator] > 0) { - delegatorAmount = distributions[delegatee][i].amounts[delegator]; - } - if (distributions[delegatee][i].delegationAmount > 0) { - delegateeAmount = distributions[delegatee][i].delegationAmount; - } - reward += (distributions[delegatee][i].delegatorRewardAmount * delegatorAmount) / delegateeAmount; - - if (unclaimed[delegator].undelegated[delegatee] && unclaimed[delegator].unclaimedEnd[delegatee] == i) { - break; - } - } - } - - /// @notice query all unclaimed morph reward - /// @param delegator delegatee address - function queryAllUnclaimed( - address delegator - ) external view returns (address[] memory delegatees, uint256[] memory rewards) { - uint256 length = unclaimed[delegator].delegatees.length(); - require(length != 0, "invalid delegator or no remaining reward"); - delegatees = new address[](length); - rewards = new uint256[](length); - for (uint256 j = 0; j < unclaimed[delegator].delegatees.length(); j++) { - address delegatee = unclaimed[delegator].delegatees.at(j); - uint256 reward; - uint256 delegateeAmount; - uint256 delegatorAmount; - uint256 start = unclaimed[delegator].unclaimedStart[delegatee]; - for (uint256 i = start; i < mintedEpochCount; i++) { - if (distributions[delegatee][i].amounts[delegator] > 0) { - delegatorAmount = distributions[delegatee][i].amounts[delegator]; - } - if (distributions[delegatee][i].delegationAmount > 0) { - delegateeAmount = distributions[delegatee][i].delegationAmount; - } - reward += (distributions[delegatee][i].delegatorRewardAmount * delegatorAmount) / delegateeAmount; - if (unclaimed[delegator].undelegated[delegatee] && unclaimed[delegator].unclaimedEnd[delegatee] == i) { - break; - } - } - delegatees[j] = delegatee; - rewards[j] = reward; - } - } - - /// @notice query all unclaimed morph reward epochs info - /// @param delegator delegatee address - function queryAllUnclaimedEpochs( - address delegator - ) external view returns (address[] memory, bool[] memory, uint256[] memory, uint256[] memory) { - uint256 length = unclaimed[delegator].delegatees.length(); - address[] memory delegatees = new address[](length); - bool[] memory undelegated = new bool[](length); - uint256[] memory unclaimedStart = new uint256[](length); - uint256[] memory unclaimedEnd = new uint256[](length); - for (uint256 i = 0; i < length; i++) { - delegatees[i] = unclaimed[delegator].delegatees.at(i); - undelegated[i] = unclaimed[delegator].undelegated[delegatees[i]]; - unclaimedStart[i] = unclaimed[delegator].unclaimedStart[delegatees[i]]; - unclaimedEnd[i] = unclaimed[delegator].unclaimedEnd[delegatees[i]]; - } - return (delegatees, undelegated, unclaimedStart, unclaimedEnd); - } - - /********************** - * Internal Functions * - **********************/ - - /// @notice transfer morph token - function _transfer(address _to, uint256 _amount) internal { - uint256 balanceBefore = IMorphToken(MORPH_TOKEN_CONTRACT).balanceOf(address(this)); - IMorphToken(MORPH_TOKEN_CONTRACT).transfer(_to, _amount); - uint256 balanceAfter = IMorphToken(MORPH_TOKEN_CONTRACT).balanceOf(address(this)); - require(_amount > 0 && balanceBefore - balanceAfter == _amount, "morph token transfer failed"); - } - - /// @notice claim delegator morph reward - function _claim( - address delegatee, - address delegator, - uint256 endEpochIndex - ) internal returns (uint256 reward, bool removed) { - require(unclaimed[delegator].delegatees.contains(delegatee), "no remaining reward"); - require(unclaimed[delegator].unclaimedStart[delegatee] <= endEpochIndex, "all reward claimed"); - - uint256 delegateeAmount; - uint256 delegatorAmount; - for (uint256 i = unclaimed[delegator].unclaimedStart[delegatee]; i <= endEpochIndex; i++) { - if (distributions[delegatee][i].amounts[delegator] > 0) { - delegatorAmount = distributions[delegatee][i].amounts[delegator]; - } - if (distributions[delegatee][i].delegationAmount > 0) { - delegateeAmount = distributions[delegatee][i].delegationAmount; - } - reward += (distributions[delegatee][i].delegatorRewardAmount * delegatorAmount) / delegateeAmount; - - // if undelegated, remove delegator unclaimed info after claimed all - if (unclaimed[delegator].undelegated[delegatee] && unclaimed[delegator].unclaimedEnd[delegatee] == i) { - removed = true; - unclaimed[delegator].delegatees.remove(delegatee); - delete unclaimed[delegator].undelegated[delegatee]; - delete unclaimed[delegator].unclaimedStart[delegatee]; - delete unclaimed[delegator].unclaimedEnd[delegatee]; - break; - } - } - unclaimed[delegator].unclaimedStart[delegatee] = endEpochIndex + 1; - if (distributions[delegatee][endEpochIndex + 1].amounts[delegator] == 0) { - distributions[delegatee][endEpochIndex + 1].amounts[delegator] = delegatorAmount; - } - - emit RewardClaimed(delegator, delegatee, endEpochIndex, reward); - } -} diff --git a/contracts/contracts/l2/staking/IDistribute.sol b/contracts/contracts/l2/staking/IDistribute.sol deleted file mode 100644 index 39ac3da90..000000000 --- a/contracts/contracts/l2/staking/IDistribute.sol +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -import {EnumerableSetUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; - -/** - * @dev Interface of the Distribute. - */ -interface IDistribute { - /*********** - * Structs * - ***********/ - - /// @notice Distribution representing a distribution - /// - /// @custom:field delegatorRewardAmount total reward amount minus commission - /// @custom:field delegationAmount total delegation amount - /// @custom:field delegators delegator set - /// @custom:field amounts delegators delegation amount - struct Distribution { - uint256 delegatorRewardAmount; - uint256 delegationAmount; - EnumerableSetUpgradeable.AddressSet delegators; - mapping(address delegator => uint256 amount) amounts; - } - - /// @notice Unclaimed representing a unclaimd info of a delegator - /// - /// @custom:field delegatees all delegatees if this delegator, remove delegatee after all reward claimed - /// @custom:field undelegated whether is undelegated - /// @custom:field unclaimedStart unclaimed start epoch index - /// @custom:field unclaimedEnd unclaimed end epoch index, set 0 if undelegated is false or all claimed - struct Unclaimed { - EnumerableSetUpgradeable.AddressSet delegatees; - mapping(address delegator => bool undelegated) undelegated; - mapping(address delegator => uint256 startEpoch) unclaimedStart; - mapping(address delegator => uint256 endEpoch) unclaimedEnd; - } - - /********** - * Events * - **********/ - - /// @notice reward claimed - /// @param delegator delegator - /// @param delegatee delegatee - /// @param upToEpoch up to epoch index - /// @param amount amount - event RewardClaimed(address indexed delegator, address indexed delegatee, uint256 upToEpoch, uint256 amount); - - /// @notice commission claimed - /// @param delegatee delegatee - /// @param amount amount - event CommissionClaimed(address indexed delegatee, uint256 amount); - - /************************* - * Public View Functions * - *************************/ - - /// @notice query whether all rewards have been claimed for a delegatee - /// @param delegator delegatee address - /// @param delegatee delegatee address - function isRewardClaimed(address delegator, address delegatee) external view returns (bool claimed); - - /// @notice query unclaimed morph reward on a delegatee - /// @param delegatee delegatee address - /// @param delegator delegatee address - function queryUnclaimed(address delegatee, address delegator) external view returns (uint256); - - /// @notice query all unclaimed morph reward - /// @param delegator delegatee address - function queryAllUnclaimed( - address delegator - ) external view returns (address[] memory delegatee, uint256[] memory reward); - - /// @notice query all unclaimed morph reward epochs info - /// @param delegator delegatee address - function queryAllUnclaimedEpochs( - address delegator - ) external view returns (address[] memory, bool[] memory, uint256[] memory, uint256[] memory); - - /// @notice query oldest distribution - /// @param delegatee delegatee address - function queryOldestDistribution(address delegatee) external view returns (uint256 epochIndex); - - /// @notice query all unclaimed commission of a staker - /// @param delegatee delegatee address - function queryUnclaimedCommission(address delegatee) external view returns (uint256 amount); - - /***************************** - * Public Mutating Functions * - *****************************/ - - /// @dev notify delegation - /// @param delegatee delegatee address - /// @param delegator delegator address - /// @param effectiveEpoch delegation effective epoch - /// @param amount delegator amount - /// @param totalAmount delegatee total amount - /// @param newDelegation first delegate or additional delegate - function notifyDelegation( - address delegatee, - address delegator, - uint256 effectiveEpoch, - uint256 amount, - uint256 totalAmount, - bool newDelegation - ) external; - - /// @dev notify unDelegation - /// @param delegatee delegatee address - /// @param delegator delegator address - /// @param effectiveEpoch delegation effective epoch - /// @param totalAmount delegatee total amount - function notifyUndelegation( - address delegatee, - address delegator, - uint256 effectiveEpoch, - uint256 totalAmount - ) external; - - /// @dev update epoch reward - /// @param epochIndex epoch index - /// @param sequencers sequencers - /// @param delegatorRewards sequencer's delegator reward amount - /// @param commissionsAmount sequencers commission amount - function updateEpochReward( - uint256 epochIndex, - address[] calldata sequencers, - uint256[] calldata delegatorRewards, - uint256[] calldata commissionsAmount - ) external; - - /// @dev claim delegation reward of all sequencers. - /// @param delegator delegator address - /// @param targetEpochIndex the epoch index that the user wants to claim up to - /// - /// If targetEpochIndex is zero, claim up to latest mint epoch, - /// otherwise it must be greater than the last claimed epoch index. - function claimAll(address delegator, uint256 targetEpochIndex) external; - - /// @dev claim delegation reward of a delegatee. - /// @param delegatee delegatee address - /// @param delegator delegator address - /// @param targetEpochIndex the epoch index that the user wants to claim up to - /// - /// If targetEpochIndex is zero, claim up to latest mint epoch, - /// otherwise it must be greater than the last claimed epoch index. - function claim(address delegatee, address delegator, uint256 targetEpochIndex) external; - - /// @dev claim commission reward - /// @param delegatee delegatee address - function claimCommission(address delegatee) external; -} diff --git a/contracts/contracts/l2/staking/IL2Staking.sol b/contracts/contracts/l2/staking/IL2Staking.sol index 793da06bc..a8d0179b1 100644 --- a/contracts/contracts/l2/staking/IL2Staking.sol +++ b/contracts/contracts/l2/staking/IL2Staking.sol @@ -8,6 +8,45 @@ interface IL2Staking { * Structs * ***********/ + /// @notice Commission representing a delegatee's commission info. + /// + /// @custom:field checkpoint The epoch when the commission percentage was last changed + /// @custom:field percentage commission percentage + /// @custom:field prePercentage pre commission percentage + /// @custom:field amount unclaimed commission amount + struct Commission { + uint256 checkpoint; + uint256 prePercentage; + uint256 percentage; + uint256 amount; + } + + /// @notice DelegateeDelegation representing a delegatee's delegation info. + /// + /// @custom:field checkpoint The epoch when the share was last changed + /// @custom:field preAmount Total delegations of a delegatee + /// @custom:field amount Total delegations of a delegatee + /// @custom:field preShare Total share of a delegatee at the start of an epoch + /// @custom:field share Total share of a delegatee at the end of an epoch + struct DelegateeDelegation { + uint256 checkpoint; + uint256 preAmount; + uint256 amount; + uint256 preShare; + uint256 share; + } + + /// @notice DelegatorDelegation representing a delegator's delegation info. + /// + /// @custom:field checkpoint The epoch when the share was last changed + /// @custom:field preShare share of a delegator at the start of an epoch + /// @custom:field share share of a delegator at the end of an epoch + struct DelegatorDelegation { + uint256 checkpoint; + uint256 preShare; + uint256 share; + } + /// @notice Undelegation representing a undelegation info. /// /// @custom:field delegatee delegatee @@ -19,6 +58,16 @@ interface IL2Staking { uint256 unlockEpoch; } + /*********** + * Errors * + ***********/ + + /// @notice error not staker + error ErrNotStaker(); + + /// @notice error invalid nonce + error ErrInvalidNonce(); + /********** * Events * **********/ @@ -26,27 +75,37 @@ interface IL2Staking { /// @notice Emitted delegated stake /// @param delegatee delegatee /// @param delegator delegator - /// @param amount new delegation amount, not increment /// @param stakeAmount stake amount + /// @param delegateeAmount new delegatee total amount + /// @param delegateeShare new delegatee total sare + /// @param delegatorShare new delegator share /// @param effectiveEpoch effective epoch event Delegated( address indexed delegatee, address indexed delegator, - uint256 amount, uint256 stakeAmount, + uint256 delegateeAmount, + uint256 delegateeShare, + uint256 delegatorShare, uint256 effectiveEpoch ); /// @notice Emitted undelegated stake /// @param delegatee delegatee /// @param delegator delegator - /// @param amount undelegation amount + /// @param unstakeAmount stake amount + /// @param delegateeAmount new delegatee total amount + /// @param delegateeShare new delegatee total sare + /// @param delegatorShare new delegator share /// @param effectiveEpoch effective epoch /// @param unlockEpoch unlock epoch index event Undelegated( address indexed delegatee, address indexed delegator, - uint256 amount, + uint256 unstakeAmount, + uint256 delegateeAmount, + uint256 delegateeShare, + uint256 delegatorShare, uint256 effectiveEpoch, uint256 unlockEpoch ); @@ -62,12 +121,6 @@ interface IL2Staking { uint256 amount ); - /// @notice Emitted commission updated - /// @param staker staker address - /// @param percentage commission percentage - /// @param epochEffective epoch effective - event CommissionUpdated(address indexed staker, uint256 percentage, uint256 epochEffective); - /// @notice Emitted staker added /// @param addr staker address /// @param tmKey staker tendermint pubkey @@ -88,6 +141,29 @@ interface IL2Staking { /// @param newSize The new sequencer set max size event SequencerSetMaxSizeUpdated(uint256 oldSize, uint256 newSize); + /// @notice Emitted reward epochs uploaded + /// @param sequencer The sequencer address + /// @param delegatorReward The delegator reward amount + /// @param commissionAmount The commission amount + event Distributed(address indexed sequencer, uint256 delegatorReward, uint256 commissionAmount); + + /// @notice Emitted commission updated + /// @param staker staker address + /// @param oldPercentage old commission percentage + /// @param newPercentage new commission percentage + /// @param epochEffective epoch effective + event CommissionUpdated( + address indexed staker, + uint256 oldPercentage, + uint256 newPercentage, + uint256 epochEffective + ); + + /// @notice commission claimed + /// @param delegatee delegatee + /// @param amount amount + event CommissionClaimed(address indexed delegatee, uint256 amount); + /************************* * Public View Functions * *************************/ @@ -135,6 +211,10 @@ interface IL2Staking { /// @notice get staker addresses length function getStakerAddressesLength() external view returns (uint256); + /// @notice query all unclaimed commission of a staker + /// @param delegatee delegatee address + function queryUnclaimedCommission(address delegatee) external view returns (uint256 amount); + /***************************** * Public Mutating Functions * *****************************/ @@ -149,27 +229,39 @@ interface IL2Staking { /// @param remove staker to remove function removeStakers(uint256 nonce, address[] calldata remove) external; - /// @notice setCommissionRate set delegate commission percentage - /// @param commission commission percentage, denominator is 100 - function setCommissionRate(uint256 commission) external; + /// @notice setCommissionPercentage set delegate commission percentage + /// @param percentage commission percentage, denominator is 100 + function setCommissionPercentage(uint256 percentage) external; /// @notice delegator stake morph to delegatee /// @param delegatee stake to whom /// @param amount stake amount function delegateStake(address delegatee, uint256 amount) external; - /// @notice delegator unstake morph - /// @param delegatee delegatee address - function undelegateStake(address delegatee) external; + /// @notice delegator redelegate stake morph token to new delegatee + /// @param delegateeFrom old delegatee + /// @param delegateeTo new delegatee + /// @param amount amount + function redelegateStake(address delegateeFrom, address delegateeTo, uint256 amount) external; + + /// @notice delegator undelegate stake morph token + /// @param delegatee delegatee address + /// @param amount undelegate stake amount, undelegate all if set 0 + function undelegateStake(address delegatee, uint256 amount) external; /// @notice delegator cliam delegate staking value function claimUndelegation() external; - /// @notice delegator claim reward - /// @param delegatee delegatee address, claim all if address(0) - /// @param targetEpochIndex up to the epoch index that the delegator wants to claim - function claimReward(address delegatee, uint256 targetEpochIndex) external; - /// @notice claimCommission claim unclaimed commission reward of a staker function claimCommission() external; + + /// @dev distribute inflation by system at end of the epoch + /// @param epochIndex epoch index + /// @param sequencers sequencers + /// @param rewards total rewards + function distributeInflation( + uint256 epochIndex, + address[] calldata sequencers, + uint256[] calldata rewards + ) external; } diff --git a/contracts/contracts/l2/staking/IRecord.sol b/contracts/contracts/l2/staking/IRecord.sol index 63d7d0d72..9564405ba 100644 --- a/contracts/contracts/l2/staking/IRecord.sol +++ b/contracts/contracts/l2/staking/IRecord.sol @@ -23,39 +23,12 @@ interface IRecord { uint256 rollupBlock; } - /// @notice RollupEpochInfo representing a rollup epoch - /// - /// @custom:field index epoch index - /// @custom:field submitter submitter - /// @custom:field startTime epoch start time - /// @custom:field endTime epoch end time - /// @custom:field endBlock epoch end block number - struct RollupEpochInfo { - uint256 index; - address submitter; - uint256 startTime; - uint256 endTime; - uint256 endBlock; - } + /*********** + * Errors * + ***********/ - /// @notice RewardEpochInfo representing a reward epoch. - /// - /// @custom:field index epoch index - /// @custom:field blockCount the number of blocks included in epoch - /// @custom:field sequencers sequencers have produced blocks - /// @custom:field sequencerBlocks number of blocks produced by sequencer - /// @custom:field sequencerRatios sequencers reward ratio, precision is 1e8 - /// @custom:field sequencerCommissions sequencers commission percentage - /// - /// If no blocks were produced in this epoch, no sequencer will receive the reward - struct RewardEpochInfo { - uint256 index; - uint256 blockCount; - address[] sequencers; - uint256[] sequencerBlocks; - uint256[] sequencerRatios; - uint256[] sequencerCommissions; - } + /// @notice error xxx + error ErrXXX(); /********** * Events * @@ -66,16 +39,6 @@ interface IRecord { /// @param dataLength The data length event BatchSubmissionsUploaded(uint256 indexed startIndex, uint256 dataLength); - /// @notice Emitted rollup epochs uploaded - /// @param startIndex The data start index - /// @param dataLength The data length - event RollupEpochsUploaded(uint256 indexed startIndex, uint256 dataLength); - - /// @notice Emitted reward epochs uploaded - /// @param startIndex The data start index - /// @param dataLength The data length - event RewardEpochsUploaded(uint256 indexed startIndex, uint256 dataLength); - /************************* * Public View Functions * *************************/ @@ -83,30 +46,11 @@ interface IRecord { /// @notice return next rollup epoch index function nextBatchSubmissionIndex() external view returns (uint256); - /// @notice return next rollup epoch index - function nextRollupEpochIndex() external view returns (uint256); - - /// @notice return next reward epoch index - function nextRewardEpochIndex() external view returns (uint256); - - /// @notice return latest reward epoch block - function latestRewardEpochBlock() external view returns (uint256); - /// @notice getBatchSubmissions /// @param start start index /// @param end end index function getBatchSubmissions(uint256 start, uint256 end) external view returns (BatchSubmission[] memory); - /// @notice get rollup epochs - /// @param start start index - /// @param end end index - function getRollupEpochs(uint256 start, uint256 end) external view returns (RollupEpochInfo[] memory); - - /// @notice get reward epochs - /// @param start start index - /// @param end end index - function getRewardEpochs(uint256 start, uint256 end) external view returns (RewardEpochInfo[] memory); - /***************************** * Public Mutating Functions * *****************************/ @@ -115,16 +59,6 @@ interface IRecord { /// @param _oracle oracle address function setOracleAddress(address _oracle) external; - /// @notice set latest block - /// @param _latestBlock latest block - function setLatestRewardEpochBlock(uint256 _latestBlock) external; - /// @notice record batch submissions function recordFinalizedBatchSubmissions(BatchSubmission[] calldata _batchSubmissions) external; - - /// @notice record epochs - function recordRollupEpochs(RollupEpochInfo[] calldata _rollupEpochs) external; - - /// @notice record epochs - function recordRewardEpochs(RewardEpochInfo[] calldata _rewardEpochs) external; } diff --git a/contracts/contracts/l2/staking/L2Staking.sol b/contracts/contracts/l2/staking/L2Staking.sol index 72daad1e9..f391630a9 100644 --- a/contracts/contracts/l2/staking/L2Staking.sol +++ b/contracts/contracts/l2/staking/L2Staking.sol @@ -10,7 +10,6 @@ import {Predeploys} from "../../libraries/constants/Predeploys.sol"; import {Staking} from "../../libraries/staking/Staking.sol"; import {IL2Staking} from "./IL2Staking.sol"; import {ISequencer} from "./ISequencer.sol"; -import {IDistribute} from "./IDistribute.sol"; import {IMorphToken} from "../system/IMorphToken.sol"; contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUpgradeable { @@ -29,8 +28,8 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice sequencer contract address address public immutable SEQUENCER_CONTRACT; - /// @notice distribute contract address - address public immutable DISTRIBUTE_CONTRACT; + /// @notice system address + address public immutable SYSTEM_ADDRESS; /************* * Variables * @@ -54,6 +53,9 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice sequencer candidate number uint256 public candidateNumber; + /// @notice nonce of staking L1 => L2 msg + uint256 public nonce; + /// @notice sync from l1 staking address[] public stakerAddresses; @@ -63,43 +65,44 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice stakers info mapping(address staker => Types.StakerInfo) public stakers; - /// @notice staker commissions, default commission is zero if not set - mapping(address staker => uint256 amount) public commissions; - - /// @notice staker's total delegation amount - mapping(address staker => uint256 totalDelegationAmount) public stakerDelegations; + /// @notice staker commissions info, default commission percentage is zero if not set + mapping(address staker => Commission) public commissions; - /// @notice delegators of staker + /// @notice delegators of a delegatee mapping(address staker => EnumerableSetUpgradeable.AddressSet) internal delegators; - /// @notice delegations of a staker - mapping(address staker => mapping(address delegator => uint256 amount)) public delegations; + /// @notice delegation of a delegatee + mapping(address staker => DelegateeDelegation) public delegateeDelegations; + + /// @notice the delegation of a delegator + mapping(address staker => mapping(address delegator => DelegatorDelegation)) public delegatorDelegations; /// @notice delegator's undelegations mapping(address delegator => Undelegation[]) public undelegations; - /// @notice nonce of staking L1 => L2 msg - uint256 public nonce; - /********************** * Function Modifiers * **********************/ /// @notice must be staker - modifier isStaker(address addr) { - require(stakerRankings[addr] > 0, "not staker"); + modifier onlyStaker(address addr) { + if (stakerRankings[_msgSender()] == 0) { + revert ErrNotStaker(); + } _; } - /// @notice only staker allowed - modifier onlyStaker() { - require(stakerRankings[_msgSender()] > 0, "only staker allowed"); + /// @notice check nonce + modifier checkNonce(uint256 _nonce) { + if (_nonce != nonce) { + revert ErrInvalidNonce(); + } _; } - /// @notice check nonce - modifier checkNonce(uint256 _nonce) { - require(_nonce == nonce, "invalid nonce"); + /// @notice Ensures that the caller message from system + modifier onlSystem() { + require(_msgSender() == SYSTEM_ADDRESS, "only system contract allowed"); _; } @@ -112,7 +115,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp constructor(address payable _otherStaking) Staking(payable(Predeploys.L2_CROSS_DOMAIN_MESSENGER), _otherStaking) { MORPH_TOKEN_CONTRACT = Predeploys.MORPH_TOKEN; SEQUENCER_CONTRACT = Predeploys.SEQUENCER; - DISTRIBUTE_CONTRACT = Predeploys.DISTRIBUTE; + SYSTEM_ADDRESS = Predeploys.System; } /*************** @@ -200,7 +203,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp delete stakerRankings[remove[i]]; // update candidateNumber - if (stakerDelegations[remove[i]] > 0) { + if (delegateeDelegations[remove[i]].amount > 0) { candidateNumber -= 1; } } @@ -252,7 +255,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp delete stakerRankings[remove[i]]; // update candidateNumber - if (stakerDelegations[remove[i]] > 0) { + if (delegateeDelegations[remove[i]].amount > 0) { candidateNumber -= 1; } } @@ -266,18 +269,30 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } } - /// @notice setCommissionRate set delegate commission percentage - /// @param commission commission percentage - function setCommissionRate(uint256 commission) external onlyStaker { - require(commission <= 20, "invalid commission"); - commissions[_msgSender()] = commission; + /// @notice setCommissionPercentage set delegate commission percentage + /// @param percentage commission percentage + function setCommissionPercentage(uint256 percentage) external onlyStaker(_msgSender()) { + require(percentage <= 20, "invalid commission"); + uint256 oldPercentage = commissions[_msgSender()].percentage; uint256 epochEffective = rewardStarted ? currentEpoch() + 1 : 0; - emit CommissionUpdated(_msgSender(), commission, epochEffective); + commissions[_msgSender()] = Commission( + epochEffective, + oldPercentage, + percentage, + commissions[_msgSender()].amount + ); + emit CommissionUpdated(_msgSender(), percentage, oldPercentage, epochEffective); } /// @notice claimCommission claim unclaimed commission reward of a staker function claimCommission() external nonReentrant { - IDistribute(DISTRIBUTE_CONTRACT).claimCommission(_msgSender()); + require(commissions[_msgSender()].amount > 0, "no commission to claim"); + + uint256 amount = commissions[_msgSender()].amount; + commissions[_msgSender()].amount = 0; + _transfer(_msgSender(), amount); + + emit CommissionClaimed(_msgSender(), amount); } /// @notice update params @@ -326,7 +341,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp // sort stakers by insertion sort for (uint256 i = 1; i < stakerAddresses.length; i++) { for (uint256 j = 0; j < i; j++) { - if (stakerDelegations[stakerAddresses[i]] > stakerDelegations[stakerAddresses[j]]) { + if (delegateeDelegations[stakerAddresses[i]].amount > delegateeDelegations[stakerAddresses[j]].amount) { address tmp = stakerAddresses[j]; stakerAddresses[j] = stakerAddresses[i]; stakerAddresses[i] = tmp; @@ -349,19 +364,53 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice delegator stake morph to delegatee /// @param delegatee stake to whom /// @param amount stake amount - function delegateStake(address delegatee, uint256 amount) external isStaker(delegatee) nonReentrant { + function delegateStake(address delegatee, uint256 amount) external onlyStaker(delegatee) nonReentrant { require(amount > 0, "invalid stake amount"); - // Re-staking to the same delegatee is not allowed before claiming undelegation & reward - require(!_unclaimedUndelegation(_msgSender(), delegatee), "undelegation unclaimed"); - if (!_isStakingTo(delegatee)) { - require(!_unclaimedReward(_msgSender(), delegatee), "reward unclaimed"); - } - stakerDelegations[delegatee] += amount; - delegations[delegatee][_msgSender()] += amount; + uint256 effectiveEpoch = rewardStarted ? currentEpoch() + 1 : 0; delegators[delegatee].add(_msgSender()); // will not be added repeatedly - if (stakerDelegations[delegatee] == amount) { + // update delegateeDelegations + if (!rewardStarted) { + // reward not start yet, checkpoint should be 0 + delegateeDelegations[delegatee].checkpoint = 0; + delegateeDelegations[delegatee].amount += amount; + delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; + delegateeDelegations[delegatee].share = delegateeDelegations[delegatee].amount; // {share = amount} before reward start + delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; + } else if (delegateeDelegations[delegatee].checkpoint < effectiveEpoch) { + // first delegate stake at this epoch, update checkpoint & preAmount & preShare + delegateeDelegations[delegatee].checkpoint = effectiveEpoch; + delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; + delegateeDelegations[delegatee].amount += amount; + delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; + delegateeDelegations[delegatee].share = 0; // TODO + } else { + // non-first delegate stake at the current epoch, do not update checkpoint & preAmount & preShare + delegateeDelegations[delegatee].amount += amount; + delegateeDelegations[delegatee].share = 0; // TODO + } + + // update delegatorDelegations + if (!rewardStarted) { + // reward not start yet, checkpoint should be 0 + delegatorDelegations[delegatee][_msgSender()].checkpoint = 0; + delegatorDelegations[delegatee][_msgSender()].share += amount; // {share = amount} before reward start + delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] + .share; + } else if (delegatorDelegations[delegatee][_msgSender()].checkpoint < effectiveEpoch) { + // first delegate stake at this epoch, update checkpoint & preShare + delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; + delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] + .share; + delegatorDelegations[delegatee][_msgSender()].share = 0; //TODO + } else { + // non-first delegate stake at the current epoch, do not update checkpoint & preShare + delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; + delegatorDelegations[delegatee][_msgSender()].share = 0; //TODO + } + + if (delegateeDelegations[delegatee].amount == amount) { candidateNumber += 1; } @@ -369,7 +418,10 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp if (rewardStarted && beforeRanking > 1) { // update stakers and rankings for (uint256 i = beforeRanking - 1; i > 0; i--) { - if (stakerDelegations[stakerAddresses[i]] > stakerDelegations[stakerAddresses[i - 1]]) { + if ( + delegateeDelegations[stakerAddresses[i]].amount > + delegateeDelegations[stakerAddresses[i - 1]].amount + ) { address tmp = stakerAddresses[i - 1]; stakerAddresses[i - 1] = stakerAddresses[i]; stakerAddresses[i] = tmp; @@ -379,26 +431,17 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } } } - uint256 effectiveEpoch = rewardStarted ? currentEpoch() + 1 : 0; emit Delegated( delegatee, _msgSender(), - delegations[delegatee][_msgSender()], // new amount, not incremental amount, + delegateeDelegations[delegatee].amount, + delegateeDelegations[delegatee].share, + delegatorDelegations[delegatee][_msgSender()].share, effectiveEpoch ); - // notify delegation to distribute contract - IDistribute(DISTRIBUTE_CONTRACT).notifyDelegation( - delegatee, - _msgSender(), - effectiveEpoch, - delegations[delegatee][_msgSender()], - stakerDelegations[delegatee], - delegations[delegatee][_msgSender()] == amount - ); - // transfer morph token from delegator to this _transferFrom(_msgSender(), address(this), amount); @@ -409,35 +452,91 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } } - /// @notice delegator unstake morph - /// @param delegatee delegatee address - function undelegateStake(address delegatee) external nonReentrant { + /// @notice delegator redelegate stake morph token to new delegatee + /// @param delegateeFrom old delegatee + /// @param delegateeTo new delegatee + /// @param amount amount + function redelegateStake( + address delegateeFrom, + address delegateeTo, + uint256 amount + ) external onlyStaker(delegateeFrom) onlyStaker(delegateeTo) nonReentrant { + // TODO + } + + /// @notice delegator undelegate stake morph token + /// @param delegatee delegatee address + /// @param amount undelegate stake amount, undelegate all if set 0 + function undelegateStake(address delegatee, uint256 amount) external nonReentrant { require(_isStakingTo(delegatee), "staking amount is zero"); - // staker has been removed, unlock next epoch + // weather staker has been removed bool removed = stakerRankings[delegatee] == 0; - uint256 effectiveEpoch = rewardStarted ? currentEpoch() + 1 : 0; - uint256 unlockEpoch = (rewardStarted && !removed) - ? effectiveEpoch + undelegateLockEpochs // reward started and staker is active - : effectiveEpoch; // equal to 0 if reward not started. equal to effectiveEpoch is staker is removed - - Undelegation memory undelegation = Undelegation(delegatee, delegations[delegatee][_msgSender()], unlockEpoch); - undelegations[_msgSender()].push(undelegation); - delete delegations[delegatee][_msgSender()]; - stakerDelegations[delegatee] -= undelegation.amount; - delegators[delegatee].remove(_msgSender()); + uint256 unlockEpoch = rewardStarted + ? effectiveEpoch + undelegateLockEpochs // reward started and staker is active + : 0; // equal to 0 if reward not started + + // Undelegation memory undelegation = Undelegation(delegatee, delegations[delegatee][_msgSender()], unlockEpoch); + // undelegations[_msgSender()].push(undelegation); + // delete delegations[delegatee][_msgSender()]; + // stakerDelegations[delegatee] -= undelegation.amount; + // delegators[delegatee].remove(_msgSender()); + + // ----------------------------------------------------------------------------------------------- + + // // update delegateeDelegations + // if (!rewardStarted) { + // // reward not start yet, checkpoint should be 0 + // delegateeDelegations[delegatee].checkpoint = 0; + // delegateeDelegations[delegatee].amount += amount; + // delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; + // delegateeDelegations[delegatee].share = delegateeDelegations[delegatee].amount; // {share = amount} before reward start + // delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; + // } else if (delegateeDelegations[delegatee].checkpoint < effectiveEpoch) { + // // first delegate stake at this epoch, update checkpoint & preAmount & preShare + // delegateeDelegations[delegatee].checkpoint = effectiveEpoch; + // delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; + // delegateeDelegations[delegatee].amount += amount; + // delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; + // delegateeDelegations[delegatee].share = 0; // TODO + // } else { + // // non-first delegate stake at the current epoch, do not update checkpoint & preAmount & preShare + // delegateeDelegations[delegatee].amount += amount; + // delegateeDelegations[delegatee].share = 0; // TODO + // } + + // // update delegatorDelegations + // if (!rewardStarted) { + // // reward not start yet, checkpoint should be 0 + // delegatorDelegations[delegatee][_msgSender()].checkpoint = 0; + // delegatorDelegations[delegatee][_msgSender()].share += amount; // {share = amount} before reward start + // delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] + // .share; + // } else if (delegatorDelegations[delegatee][_msgSender()].checkpoint < effectiveEpoch) { + // // first delegate stake at this epoch, update checkpoint & preShare + // delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; + // delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] + // .share; + // delegatorDelegations[delegatee][_msgSender()].share = 0; //TODO + // } else { + // // non-first delegate stake at the current epoch, do not update checkpoint & preShare + // delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; + // delegatorDelegations[delegatee][_msgSender()].share = 0; //TODO + // } uint256 beforeRanking = stakerRankings[delegatee]; if (!removed && rewardStarted && beforeRanking < candidateNumber) { // update stakers and rankings for (uint256 i = stakerRankings[delegatee] - 1; i < candidateNumber - 1; i++) { - if (stakerDelegations[stakerAddresses[i + 1]] > stakerDelegations[stakerAddresses[i]]) { + if ( + delegateeDelegations[stakerAddresses[i + 1]].amount > + delegateeDelegations[stakerAddresses[i]].amount + ) { address tmp = stakerAddresses[i]; stakerAddresses[i] = stakerAddresses[i + 1]; stakerAddresses[i + 1] = tmp; - stakerRankings[stakerAddresses[i]] = i + 1; stakerRankings[stakerAddresses[i + 1]] = i + 2; } @@ -445,20 +544,21 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } // update candidateNumber - if (!removed && stakerDelegations[delegatee] == 0) { + if (!removed && delegateeDelegations[delegatee].amount == 0) { candidateNumber -= 1; } - // notify undelegation to distribute contract - IDistribute(DISTRIBUTE_CONTRACT).notifyUndelegation( + emit Undelegated( delegatee, _msgSender(), + amount, + delegateeDelegations[delegatee].amount, + delegateeDelegations[delegatee].share, + delegatorDelegations[delegatee][_msgSender()].share, effectiveEpoch, - stakerDelegations[delegatee] + unlockEpoch ); - emit Undelegated(delegatee, _msgSender(), undelegation.amount, effectiveEpoch, unlockEpoch); - if ( !removed && rewardStarted && @@ -500,15 +600,42 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp _transfer(_msgSender(), totalAmount); } - /// @notice delegator claim reward - /// @param delegatee delegatee address, claim all if empty - /// @param targetEpochIndex up to the epoch index that the delegator wants to claim - function claimReward(address delegatee, uint256 targetEpochIndex) external nonReentrant { - if (delegatee == address(0)) { - IDistribute(DISTRIBUTE_CONTRACT).claimAll(_msgSender(), targetEpochIndex); - } else { - IDistribute(DISTRIBUTE_CONTRACT).claim(delegatee, _msgSender(), targetEpochIndex); - } + /// @dev distribute inflation by system on epoch end + /// @param epochIndex epoch index + /// @param sequencers sequencers + /// @param rewards total rewards + function distributeInflation( + uint256 epochIndex, + address[] calldata sequencers, + uint256[] calldata rewards + ) external onlSystem { + // mintedEpochCount++; + // require(mintedEpochCount - 1 == epochIndex, "invalid epoch index"); + // require( + // delegatorRewards.length == sequencers.length && commissionsAmount.length == sequencers.length, + // "invalid data length" + // ); + // for (uint256 i = 0; i < sequencers.length; i++) { + // distributions[sequencers[i]][epochIndex].delegatorRewardAmount = delegatorRewards[i]; + // if (distributions[sequencers[i]][epochIndex].delegationAmount == 0 && epochIndex > 0) { + // distributions[sequencers[i]][epochIndex].delegationAmount = distributions[sequencers[i]][epochIndex - 1] + // .delegationAmount; + // } + // commissions[sequencers[i]] += commissionsAmount[i]; + // emit Distributed(sequencers[i], delegatorRewards[i], commissionsAmount[i]); + // } + } + + /// @dev claim commission reward + /// @param delegatee delegatee address + function claimCommission(address delegatee) external nonReentrant { + require(commissions[delegatee].amount > 0, "no commission to claim"); + + uint256 amount = commissions[delegatee].amount; + commissions[delegatee].amount = 0; + _transfer(delegatee, amount); + + emit CommissionClaimed(delegatee, amount); } /************************* @@ -597,6 +724,19 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp return undelegations[delegator]; } + /// @notice query all unclaimed commission of a delegatee + /// @param delegatee delegatee address + function queryUnclaimedCommission(address delegatee) external view returns (uint256 amount) { + return commissions[delegatee].amount; + } + + /// @notice query delegation amount of a delegator + /// @param delegatee delegatee address + /// @param delegator delegator address + function queryDelegationAmount(address delegatee, address delegator) external view returns (uint256 amount) { + return _getDelegationAmount(delegatee, delegator); + } + /********************** * Internal Functions * **********************/ @@ -617,10 +757,10 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp require(_amount > 0 && balanceAfter - balanceBefore == _amount, "morph token transfer failed"); } - /// @notice check if the user has staked to staker - /// @param staker sequencers size - function _isStakingTo(address staker) internal view returns (bool) { - return delegations[staker][_msgSender()] > 0; + /// @notice check if the user has staked to delegatee + /// @param delegatee delegatee + function _isStakingTo(address delegatee) internal view returns (bool) { + return delegatorDelegations[delegatee][_msgSender()].share > 0; } /// @notice select the size of staker with the largest staking amount, the max size is ${sequencerSetMaxSize} @@ -651,8 +791,20 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp return false; } - /// @notice whether there is a undedeletion unclaimed - function _unclaimedReward(address delegator, address delegatee) internal view returns (bool) { - return !IDistribute(DISTRIBUTE_CONTRACT).isRewardClaimed(delegator, delegatee); + /// @notice query delegation amount of a delegator + /// @param delegatee delegatee address + /// @param delegator delegator address + function _getDelegationAmount(address delegatee, address delegator) internal view returns (uint256 amount) { + uint256 cEpoch = currentEpoch(); + uint256 share = cEpoch < delegatorDelegations[delegatee][delegator].checkpoint + ? delegatorDelegations[delegatee][delegator].preShare + : delegatorDelegations[delegatee][delegator].share; + uint256 tShare = cEpoch < delegateeDelegations[delegatee].checkpoint + ? delegateeDelegations[delegatee].preShare + : delegateeDelegations[delegatee].share; + uint256 tAmount = cEpoch < delegateeDelegations[delegatee].checkpoint + ? delegateeDelegations[delegatee].preAmount + : delegateeDelegations[delegatee].amount; + return (tAmount * share) / tShare; } } diff --git a/contracts/contracts/l2/staking/Record.sol b/contracts/contracts/l2/staking/Record.sol index 1d218f69b..eebbee835 100644 --- a/contracts/contracts/l2/staking/Record.sol +++ b/contracts/contracts/l2/staking/Record.sol @@ -4,34 +4,9 @@ pragma solidity =0.8.24; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {Predeploys} from "../../libraries/constants/Predeploys.sol"; -import {IMorphToken} from "../system/IMorphToken.sol"; -import {IL2Staking} from "./IL2Staking.sol"; -import {IDistribute} from "./IDistribute.sol"; import {IRecord} from "./IRecord.sol"; contract Record is IRecord, OwnableUpgradeable { - /************* - * Constants * - *************/ - - /// @notice inflation rate precision - uint256 private constant PRECISION = 1e8; - - /// @notice MorphToken contract address - address public immutable MORPH_TOKEN_CONTRACT; - - /// @notice l2 staking contract address - address public immutable L2_STAKING_CONTRACT; - - /// @notice sequencer contract address - address public immutable SEQUENCER_CONTRACT; - - /// @notice distribute contract address - address public immutable DISTRIBUTE_CONTRACT; - - /// @notice gov contract address - address public immutable GOV_CONTRACT; - /************* * Variables * *************/ @@ -42,24 +17,9 @@ contract Record is IRecord, OwnableUpgradeable { /// @notice If the sequencer set or rollup epoch changed, reset the submitter round mapping(uint256 batchIndex => BatchSubmission) public batchSubmissions; - /// @notice rollup epoch info - mapping(uint256 rollupEpochIndex => RollupEpochInfo) public rollupEpochs; - - /// @notice reward epoch info - mapping(uint256 rewardEpochIndex => RewardEpochInfo) public rewardEpochs; - /// @notice next batch submission index uint256 public override nextBatchSubmissionIndex; - /// @notice next rollup epoch index - uint256 public override nextRollupEpochIndex; - - /// @notice next reward epoch index - uint256 public override nextRewardEpochIndex; - - /// @notice latest reward epoch block - uint256 public override latestRewardEpochBlock; - /********************** * Function Modifiers * **********************/ @@ -76,11 +36,6 @@ contract Record is IRecord, OwnableUpgradeable { /// @notice constructor constructor() { - MORPH_TOKEN_CONTRACT = Predeploys.MORPH_TOKEN; - L2_STAKING_CONTRACT = Predeploys.L2_STAKING; - SEQUENCER_CONTRACT = Predeploys.SEQUENCER; - DISTRIBUTE_CONTRACT = Predeploys.DISTRIBUTE; - GOV_CONTRACT = Predeploys.GOV; _disableInitializers(); } @@ -114,20 +69,11 @@ contract Record is IRecord, OwnableUpgradeable { oracle = _oracle; } - /// @notice set latest block - /// @param _latestBlock latest block - function setLatestRewardEpochBlock(uint256 _latestBlock) external onlyOracle { - require(latestRewardEpochBlock == 0, "already set"); - require(_latestBlock > 0, "invalid latest block"); - latestRewardEpochBlock = _latestBlock; - } - /// @notice record batch submissions function recordFinalizedBatchSubmissions(BatchSubmission[] calldata _batchSubmissions) external onlyOracle { require(_batchSubmissions.length > 0, "empty batch submissions"); for (uint256 i = 0; i < _batchSubmissions.length; i++) { require(_batchSubmissions[i].index == nextBatchSubmissionIndex + i, "invalid index"); - // TODO: check more batchSubmissions[_batchSubmissions[i].index] = BatchSubmission( _batchSubmissions[i].index, _batchSubmissions[i].submitter, @@ -141,88 +87,6 @@ contract Record is IRecord, OwnableUpgradeable { nextBatchSubmissionIndex += _batchSubmissions.length; } - /// @notice record epochs - function recordRollupEpochs(RollupEpochInfo[] calldata _rollupEpochs) external onlyOracle { - require(_rollupEpochs.length > 0, "empty rollup epochs"); - for (uint256 i = 0; i < _rollupEpochs.length; i++) { - require(_rollupEpochs[i].index == nextRollupEpochIndex + i, "invalid index"); - // TODO: check more - rollupEpochs[_rollupEpochs[i].index] = RollupEpochInfo( - _rollupEpochs[i].index, - _rollupEpochs[i].submitter, - _rollupEpochs[i].startTime, - _rollupEpochs[i].endTime, - _rollupEpochs[i].endBlock - ); - } - emit RollupEpochsUploaded(nextRollupEpochIndex, _rollupEpochs.length); - nextRollupEpochIndex += _rollupEpochs.length; - } - - /// @notice record epochs - function recordRewardEpochs(RewardEpochInfo[] calldata _rewardEpochs) external onlyOracle { - require(_rewardEpochs.length > 0, "empty reward epochs"); - require(latestRewardEpochBlock > 0, "start block should be set"); - require( - nextRewardEpochIndex + _rewardEpochs.length - 1 < IL2Staking(L2_STAKING_CONTRACT).currentEpoch(), - "unfinished epochs cannot be uploaded" - ); - IMorphToken(MORPH_TOKEN_CONTRACT).mintInflations(nextRewardEpochIndex + _rewardEpochs.length - 1); - - uint256 totalBlocks; - for (uint256 i = 0; i < _rewardEpochs.length; i++) { - uint256 dataLen = _rewardEpochs[i].sequencers.length; - uint256 index = _rewardEpochs[i].index; - require(index == nextRewardEpochIndex + i, "invalid epoch index"); - require( - _rewardEpochs[i].sequencerBlocks.length == dataLen && - _rewardEpochs[i].sequencerRatios.length == dataLen && - _rewardEpochs[i].sequencerCommissions.length == dataLen, - "invalid data length" - ); - - totalBlocks += _rewardEpochs[i].blockCount; - rewardEpochs[index] = RewardEpochInfo( - index, - _rewardEpochs[i].blockCount, - _rewardEpochs[i].sequencers, - _rewardEpochs[i].sequencerBlocks, - _rewardEpochs[i].sequencerRatios, - _rewardEpochs[i].sequencerCommissions - ); - - uint256 inflationAmount = IMorphToken(MORPH_TOKEN_CONTRACT).inflation(index); - uint256 blockCount; - uint256 ratioSum; - uint256[] memory delegatorRewards = new uint256[](dataLen); - uint256[] memory commissions = new uint256[](dataLen); - for (uint256 j = 0; j < dataLen; j++) { - require(_rewardEpochs[i].sequencerCommissions[j] <= 20, "invalid sequencers commission"); - ratioSum += _rewardEpochs[i].sequencerRatios[j]; - blockCount += _rewardEpochs[i].sequencerBlocks[j]; - - // compute rewards per sequencer - uint256 reward = (inflationAmount * _rewardEpochs[i].sequencerRatios[j]) / PRECISION; - commissions[j] = (reward * _rewardEpochs[i].sequencerCommissions[j]) / 100; - delegatorRewards[j] = reward - commissions[j]; - } - require(blockCount == _rewardEpochs[i].blockCount, "invalid sequencers blocks"); - require(ratioSum <= PRECISION, "invalid sequencers ratios"); - - // update sequencers reward data - IDistribute(DISTRIBUTE_CONTRACT).updateEpochReward( - index, - _rewardEpochs[i].sequencers, - delegatorRewards, - commissions - ); - } - - emit RewardEpochsUploaded(nextRewardEpochIndex, _rewardEpochs.length); - latestRewardEpochBlock += totalBlocks; - nextRewardEpochIndex += _rewardEpochs.length; - } - /************************* * Public View Functions * *************************/ @@ -237,26 +101,4 @@ contract Record is IRecord, OwnableUpgradeable { res[i] = batchSubmissions[i]; } } - - /// @notice get rollup epochs - /// @param start start index - /// @param end end index - function getRollupEpochs(uint256 start, uint256 end) external view returns (RollupEpochInfo[] memory res) { - require(end >= start, "invalid index"); - res = new RollupEpochInfo[](end - start + 1); - for (uint256 i = start; i <= end; i++) { - res[i] = rollupEpochs[i]; - } - } - - /// @notice get reward epochs - /// @param start start index - /// @param end end index - function getRewardEpochs(uint256 start, uint256 end) external view returns (RewardEpochInfo[] memory res) { - require(end >= start, "invalid index"); - res = new RewardEpochInfo[](end - start + 1); - for (uint256 i = start; i <= end; i++) { - res[i] = rewardEpochs[i]; - } - } } diff --git a/contracts/contracts/l2/system/MorphToken.sol b/contracts/contracts/l2/system/MorphToken.sol index d2a98933a..3ff9a3a4d 100644 --- a/contracts/contracts/l2/system/MorphToken.sol +++ b/contracts/contracts/l2/system/MorphToken.sol @@ -19,11 +19,8 @@ contract MorphToken is IMorphToken, OwnableUpgradeable { /// @notice l2 staking contract address address public immutable L2_STAKING_CONTRACT; - /// @notice distribute contract address - address public immutable DISTRIBUTE_CONTRACT; - - /// @notice record contract address - address public immutable RECORD_CONTRACT; + /// @notice system address + address public immutable SYSTEM_ADDRESS; /************* * Variables * @@ -57,9 +54,9 @@ contract MorphToken is IMorphToken, OwnableUpgradeable { * Function Modifiers * **********************/ - /// @notice Ensures that the caller message from record contract. - modifier onlyRecordContract() { - require(_msgSender() == RECORD_CONTRACT, "only record contract allowed"); + /// @notice Ensures that the caller message from system + modifier onlSystem() { + require(_msgSender() == SYSTEM_ADDRESS, "only system contract allowed"); _; } @@ -70,8 +67,7 @@ contract MorphToken is IMorphToken, OwnableUpgradeable { /// @notice constructor constructor() { L2_STAKING_CONTRACT = Predeploys.L2_STAKING; - DISTRIBUTE_CONTRACT = Predeploys.DISTRIBUTE; - RECORD_CONTRACT = Predeploys.RECORD; + SYSTEM_ADDRESS = Predeploys.System; } /************** @@ -117,7 +113,7 @@ contract MorphToken is IMorphToken, OwnableUpgradeable { /// @dev mint inflations /// @param upToEpochIndex mint up to which epoch - function mintInflations(uint256 upToEpochIndex) external onlyRecordContract { + function mintInflations(uint256 upToEpochIndex) external onlSystem { // inflations can only be minted for epochs that have ended. require( IL2Staking(L2_STAKING_CONTRACT).currentEpoch() > upToEpochIndex, @@ -137,7 +133,7 @@ contract MorphToken is IMorphToken, OwnableUpgradeable { } uint256 increment = (_totalSupply * rate) / PRECISION; _inflations[i] = increment; - _mint(DISTRIBUTE_CONTRACT, increment); + _mint(L2_STAKING_CONTRACT, increment); emit InflationMinted(i, increment); } diff --git a/contracts/contracts/libraries/constants/Predeploys.sol b/contracts/contracts/libraries/constants/Predeploys.sol index f467f56f7..9a22a9f45 100644 --- a/contracts/contracts/libraries/constants/Predeploys.sol +++ b/contracts/contracts/libraries/constants/Predeploys.sol @@ -92,11 +92,6 @@ library Predeploys { */ address internal constant MORPH_TOKEN = 0x5300000000000000000000000000000000000013; - /** - * @notice Address of the DISTRIBUTE predeploy. - */ - address internal constant DISTRIBUTE = 0x5300000000000000000000000000000000000014; - /** * @notice Address of the L2_STAKING predeploy. */ @@ -116,4 +111,9 @@ library Predeploys { * @notice Address of the L2_REVERSE_ERC20_GATEWAY predeploy. */ address internal constant L2_REVERSE_ERC20_GATEWAY = 0x5300000000000000000000000000000000000018; + + /** + * @notice Address of the System. + */ + address internal constant System = 0x5300000000000000000000000000000000000019; } diff --git a/go-ethereum b/go-ethereum index 1582a364e..5c7f1bb70 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 1582a364edc0434bec74f3e3933d5a787b7429ac +Subproject commit 5c7f1bb7073ef2c88ea52d00e217b60d34ff221f From c30ae2982e40adb4f0017ee1abe57bfd00427944 Mon Sep 17 00:00:00 2001 From: Segue Date: Mon, 13 Jan 2025 14:32:11 +0800 Subject: [PATCH 2/9] update l2 staking contracts --- contracts/contracts/l2/staking/IL2Staking.sol | 112 ++-- contracts/contracts/l2/staking/IRecord.sol | 64 -- contracts/contracts/l2/staking/L2Staking.sol | 607 ++++++++++++------ contracts/contracts/l2/staking/Record.sol | 104 --- contracts/contracts/l2/system/MorphToken.sol | 2 +- .../libraries/constants/Predeploys.sol | 7 +- contracts/contracts/test/MorphToken.t.sol | 34 +- .../contracts/test/base/L2StakingBase.t.sol | 13 - 8 files changed, 484 insertions(+), 459 deletions(-) delete mode 100644 contracts/contracts/l2/staking/IRecord.sol delete mode 100644 contracts/contracts/l2/staking/Record.sol diff --git a/contracts/contracts/l2/staking/IL2Staking.sol b/contracts/contracts/l2/staking/IL2Staking.sol index a8d0179b1..6a2aa5e90 100644 --- a/contracts/contracts/l2/staking/IL2Staking.sol +++ b/contracts/contracts/l2/staking/IL2Staking.sol @@ -10,14 +10,10 @@ interface IL2Staking { /// @notice Commission representing a delegatee's commission info. /// - /// @custom:field checkpoint The epoch when the commission percentage was last changed - /// @custom:field percentage commission percentage - /// @custom:field prePercentage pre commission percentage - /// @custom:field amount unclaimed commission amount + /// @custom:field rate commission percentage + /// @custom:field amount unclaimed commission amount struct Commission { - uint256 checkpoint; - uint256 prePercentage; - uint256 percentage; + uint256 rate; uint256 amount; } @@ -47,13 +43,11 @@ interface IL2Staking { uint256 share; } - /// @notice Undelegation representing a undelegation info. + /// @notice UndelegateRequest representing a undelegate request info. /// - /// @custom:field delegatee delegatee /// @custom:field amount staking amount /// @custom:field unlock unlock epoch index - struct Undelegation { - address delegatee; + struct UndelegateRequest { uint256 amount; uint256 unlockEpoch; } @@ -64,9 +58,28 @@ interface IL2Staking { /// @notice error not staker error ErrNotStaker(); - /// @notice error invalid nonce error ErrInvalidNonce(); + /// @notice error zero delegate amount + error ErrZeroShares(); + // @notice error zero amount + error ErrZeroAmount(); + /// @notice error insufficient balance + error ErrInsufficientBalance(); + /// @notice error only system address allowed + error ErrOnlySystem(); + /// @notice error request existed + error ErrRequestExisted(); + /// @notice error no undelegate request + error ErrNoUndelegateRequest(); + /// @notice error no claimable undelegate request + error ErrNoClaimableUndelegateRequest(); + // @notice error transfer failed + error ErrTransferFailed(); + // @notice error invalid epoch + error ErrInvalidEpoch(); + // @notice error invalid rewards + error ErrInvalidRewards(); /********** * Events * @@ -75,41 +88,40 @@ interface IL2Staking { /// @notice Emitted delegated stake /// @param delegatee delegatee /// @param delegator delegator - /// @param stakeAmount stake amount + /// @param amount amount /// @param delegateeAmount new delegatee total amount - /// @param delegateeShare new delegatee total sare - /// @param delegatorShare new delegator share - /// @param effectiveEpoch effective epoch - event Delegated( - address indexed delegatee, - address indexed delegator, - uint256 stakeAmount, - uint256 delegateeAmount, - uint256 delegateeShare, - uint256 delegatorShare, - uint256 effectiveEpoch - ); + event Delegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 delegateeAmount); /// @notice Emitted undelegated stake /// @param delegatee delegatee /// @param delegator delegator - /// @param unstakeAmount stake amount + /// @param amount amount /// @param delegateeAmount new delegatee total amount - /// @param delegateeShare new delegatee total sare - /// @param delegatorShare new delegator share - /// @param effectiveEpoch effective epoch /// @param unlockEpoch unlock epoch index event Undelegated( address indexed delegatee, address indexed delegator, - uint256 unstakeAmount, + uint256 amount, uint256 delegateeAmount, - uint256 delegateeShare, - uint256 delegatorShare, - uint256 effectiveEpoch, uint256 unlockEpoch ); + /// @notice Emitted undelegated stake + /// @param delegateeFrom delegatee from + /// @param delegateeTo delegatee to + /// @param delegator delegator + /// @param amount stake amount + /// @param delegateeAmountFrom new delegatee from total amount + /// @param delegateeAmountTo new delegatee to total amount + event Redelegated( + address indexed delegateeFrom, + address indexed delegateeTo, + address indexed delegator, + uint256 amount, + uint256 delegateeAmountFrom, + uint256 delegateeAmountTo + ); + /// @notice Emitted claim info /// @param delegator delegator /// @param unlockEpoch unlock epoch index @@ -149,15 +161,9 @@ interface IL2Staking { /// @notice Emitted commission updated /// @param staker staker address - /// @param oldPercentage old commission percentage - /// @param newPercentage new commission percentage - /// @param epochEffective epoch effective - event CommissionUpdated( - address indexed staker, - uint256 oldPercentage, - uint256 newPercentage, - uint256 epochEffective - ); + /// @param oldRate old commission percentage + /// @param newRate new commission percentage + event CommissionUpdated(address indexed staker, uint256 oldRate, uint256 newRate); /// @notice commission claimed /// @param delegatee delegatee @@ -229,28 +235,30 @@ interface IL2Staking { /// @param remove staker to remove function removeStakers(uint256 nonce, address[] calldata remove) external; - /// @notice setCommissionPercentage set delegate commission percentage - /// @param percentage commission percentage, denominator is 100 - function setCommissionPercentage(uint256 percentage) external; + /// @notice setCommissionRate set delegate commission percentage + /// @param rate commission percentage, denominator is 100 + function setCommissionRate(uint256 rate) external; /// @notice delegator stake morph to delegatee /// @param delegatee stake to whom /// @param amount stake amount - function delegateStake(address delegatee, uint256 amount) external; + function delegate(address delegatee, uint256 amount) external; /// @notice delegator redelegate stake morph token to new delegatee /// @param delegateeFrom old delegatee /// @param delegateeTo new delegatee /// @param amount amount - function redelegateStake(address delegateeFrom, address delegateeTo, uint256 amount) external; + function redelegate(address delegateeFrom, address delegateeTo, uint256 amount) external; /// @notice delegator undelegate stake morph token /// @param delegatee delegatee address /// @param amount undelegate stake amount, undelegate all if set 0 - function undelegateStake(address delegatee, uint256 amount) external; + function undelegate(address delegatee, uint256 amount) external; /// @notice delegator cliam delegate staking value - function claimUndelegation() external; + /// @param number the number of undelegate requests to be claimed. 0 means claim all + /// @return amount the total amount of MPH claimed + function claimUndelegation(uint256 number) external returns (uint256); /// @notice claimCommission claim unclaimed commission reward of a staker function claimCommission() external; @@ -259,9 +267,5 @@ interface IL2Staking { /// @param epochIndex epoch index /// @param sequencers sequencers /// @param rewards total rewards - function distributeInflation( - uint256 epochIndex, - address[] calldata sequencers, - uint256[] calldata rewards - ) external; + function distribute(uint256 epochIndex, address[] calldata sequencers, uint256[] calldata rewards) external; } diff --git a/contracts/contracts/l2/staking/IRecord.sol b/contracts/contracts/l2/staking/IRecord.sol deleted file mode 100644 index 9564405ba..000000000 --- a/contracts/contracts/l2/staking/IRecord.sol +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity =0.8.24; - -interface IRecord { - /*********** - * Structs * - ***********/ - - /// @notice BatchSubmission representing a batch submission - /// - /// @custom:field index batch index - /// @custom:field submitter batch submitter - /// @custom:field startBlock batch start block - /// @custom:field endBlock batch end block - /// @custom:field rollupTime batch rollup time - /// @custom:field rollupBlock batch rollup block number - struct BatchSubmission { - uint256 index; - address submitter; - uint256 startBlock; - uint256 endBlock; - uint256 rollupTime; - uint256 rollupBlock; - } - - /*********** - * Errors * - ***********/ - - /// @notice error xxx - error ErrXXX(); - - /********** - * Events * - **********/ - - /// @notice Emitted batch submissions uploaded - /// @param startIndex The data start index - /// @param dataLength The data length - event BatchSubmissionsUploaded(uint256 indexed startIndex, uint256 dataLength); - - /************************* - * Public View Functions * - *************************/ - - /// @notice return next rollup epoch index - function nextBatchSubmissionIndex() external view returns (uint256); - - /// @notice getBatchSubmissions - /// @param start start index - /// @param end end index - function getBatchSubmissions(uint256 start, uint256 end) external view returns (BatchSubmission[] memory); - - /***************************** - * Public Mutating Functions * - *****************************/ - - /// @notice set oracle address - /// @param _oracle oracle address - function setOracleAddress(address _oracle) external; - - /// @notice record batch submissions - function recordFinalizedBatchSubmissions(BatchSubmission[] calldata _batchSubmissions) external; -} diff --git a/contracts/contracts/l2/staking/L2Staking.sol b/contracts/contracts/l2/staking/L2Staking.sol index f391630a9..9fbc146f9 100644 --- a/contracts/contracts/l2/staking/L2Staking.sol +++ b/contracts/contracts/l2/staking/L2Staking.sol @@ -4,6 +4,8 @@ pragma solidity =0.8.24; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {EnumerableSetUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; +import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; +import {DoubleEndedQueueUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/structs/DoubleEndedQueueUpgradeable.sol"; import {Types} from "../../libraries/common/Types.sol"; import {Predeploys} from "../../libraries/constants/Predeploys.sol"; @@ -14,6 +16,8 @@ import {IMorphToken} from "../system/IMorphToken.sol"; contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUpgradeable { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; + using CountersUpgradeable for CountersUpgradeable.Counter; + using DoubleEndedQueueUpgradeable for DoubleEndedQueueUpgradeable.Bytes32Deque; /************* * Constants * @@ -22,6 +26,9 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice reward epoch, seconds of one day (3600 * 24) uint256 private constant REWARD_EPOCH = 86400; + /// @notice commission rate base + uint256 private constant COMMISSION_RATE_BASE = 100; // 100% + /// @notice MorphToken contract address address public immutable MORPH_TOKEN_CONTRACT; @@ -77,8 +84,14 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice the delegation of a delegator mapping(address staker => mapping(address delegator => DelegatorDelegation)) public delegatorDelegations; - /// @notice delegator's undelegations - mapping(address delegator => Undelegation[]) public undelegations; + // hash of the undelegate request => undelegate request + mapping(bytes32 => UndelegateRequest) private _undelegateRequests; + + // delegator address => undelegate request queue(hash of the request) + mapping(address => DoubleEndedQueueUpgradeable.Bytes32Deque) private _undelegateRequestsQueue; + + // delegator address => personal undelegate sequence + mapping(address => CountersUpgradeable.Counter) private _undelegateSequence; /********************** * Function Modifiers * @@ -86,23 +99,19 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice must be staker modifier onlyStaker(address addr) { - if (stakerRankings[_msgSender()] == 0) { - revert ErrNotStaker(); - } + if (stakerRankings[_msgSender()] == 0) revert ErrNotStaker(); _; } /// @notice check nonce modifier checkNonce(uint256 _nonce) { - if (_nonce != nonce) { - revert ErrInvalidNonce(); - } + if (_nonce != nonce) revert ErrInvalidNonce(); _; } /// @notice Ensures that the caller message from system modifier onlSystem() { - require(_msgSender() == SYSTEM_ADDRESS, "only system contract allowed"); + if (_msgSender() != SYSTEM_ADDRESS) revert ErrOnlySystem(); _; } @@ -115,7 +124,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp constructor(address payable _otherStaking) Staking(payable(Predeploys.L2_CROSS_DOMAIN_MESSENGER), _otherStaking) { MORPH_TOKEN_CONTRACT = Predeploys.MORPH_TOKEN; SEQUENCER_CONTRACT = Predeploys.SEQUENCER; - SYSTEM_ADDRESS = Predeploys.System; + SYSTEM_ADDRESS = Predeploys.SYSTEM; } /*************** @@ -270,18 +279,12 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } /// @notice setCommissionPercentage set delegate commission percentage - /// @param percentage commission percentage - function setCommissionPercentage(uint256 percentage) external onlyStaker(_msgSender()) { - require(percentage <= 20, "invalid commission"); - uint256 oldPercentage = commissions[_msgSender()].percentage; - uint256 epochEffective = rewardStarted ? currentEpoch() + 1 : 0; - commissions[_msgSender()] = Commission( - epochEffective, - oldPercentage, - percentage, - commissions[_msgSender()].amount - ); - emit CommissionUpdated(_msgSender(), percentage, oldPercentage, epochEffective); + /// @param rate commission percentage + function setCommissionRate(uint256 rate) external onlyStaker(_msgSender()) { + require(rate <= 20, "invalid commission"); + uint256 oldRate = commissions[_msgSender()].rate; + commissions[_msgSender()] = Commission({rate: rate, amount: commissions[_msgSender()].amount}); + emit CommissionUpdated(_msgSender(), rate, oldRate); } /// @notice claimCommission claim unclaimed commission reward of a staker @@ -364,52 +367,53 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice delegator stake morph to delegatee /// @param delegatee stake to whom /// @param amount stake amount - function delegateStake(address delegatee, uint256 amount) external onlyStaker(delegatee) nonReentrant { - require(amount > 0, "invalid stake amount"); + function delegate(address delegatee, uint256 amount) external onlyStaker(delegatee) nonReentrant { + if (amount == 0) revert ErrZeroAmount(); uint256 effectiveEpoch = rewardStarted ? currentEpoch() + 1 : 0; delegators[delegatee].add(_msgSender()); // will not be added repeatedly - // update delegateeDelegations + // *********************************************************************************************** + // update delegatorDelegations & delegateeDelegations if (!rewardStarted) { // reward not start yet, checkpoint should be 0 + delegatorDelegations[delegatee][_msgSender()].checkpoint = 0; + delegatorDelegations[delegatee][_msgSender()].share += amount; // {share = amount} before reward start + delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] + .share; + delegateeDelegations[delegatee].checkpoint = 0; delegateeDelegations[delegatee].amount += amount; delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; delegateeDelegations[delegatee].share = delegateeDelegations[delegatee].amount; // {share = amount} before reward start delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; - } else if (delegateeDelegations[delegatee].checkpoint < effectiveEpoch) { - // first delegate stake at this epoch, update checkpoint & preAmount & preShare - delegateeDelegations[delegatee].checkpoint = effectiveEpoch; - delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; - delegateeDelegations[delegatee].amount += amount; - delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; - delegateeDelegations[delegatee].share = 0; // TODO - } else { - // non-first delegate stake at the current epoch, do not update checkpoint & preAmount & preShare - delegateeDelegations[delegatee].amount += amount; - delegateeDelegations[delegatee].share = 0; // TODO } - // update delegatorDelegations - if (!rewardStarted) { - // reward not start yet, checkpoint should be 0 - delegatorDelegations[delegatee][_msgSender()].checkpoint = 0; - delegatorDelegations[delegatee][_msgSender()].share += amount; // {share = amount} before reward start - delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] - .share; - } else if (delegatorDelegations[delegatee][_msgSender()].checkpoint < effectiveEpoch) { - // first delegate stake at this epoch, update checkpoint & preShare + // first delegate stake at this epoch, update checkpoint & preShare + if (delegatorDelegations[delegatee][_msgSender()].checkpoint < effectiveEpoch) { delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] .share; - delegatorDelegations[delegatee][_msgSender()].share = 0; //TODO - } else { - // non-first delegate stake at the current epoch, do not update checkpoint & preShare - delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; - delegatorDelegations[delegatee][_msgSender()].share = 0; //TODO } + // first delegate stake at this epoch, update checkpoint & preAmount & preShare + if (delegateeDelegations[delegatee].checkpoint < effectiveEpoch) { + delegateeDelegations[delegatee].checkpoint = effectiveEpoch; + delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; + delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; + } + + uint256 _tshare = delegateeDelegations[delegatee].share; + uint256 _tAmount = delegateeDelegations[delegatee].amount; + uint256 _uShare = delegatorDelegations[delegatee][_msgSender()].share; + + delegatorDelegations[delegatee][_msgSender()].share = _uShare + (amount * _tshare) / _tAmount; + + delegateeDelegations[delegatee].amount += amount; + delegateeDelegations[delegatee].share = _tshare + (amount * _tshare) / _tAmount; + + // *********************************************************************************************** + if (delegateeDelegations[delegatee].amount == amount) { candidateNumber += 1; } @@ -432,15 +436,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } } - emit Delegated( - delegatee, - _msgSender(), - amount, - delegateeDelegations[delegatee].amount, - delegateeDelegations[delegatee].share, - delegatorDelegations[delegatee][_msgSender()].share, - effectiveEpoch - ); + emit Delegated(delegatee, _msgSender(), amount, delegateeDelegations[delegatee].amount); // transfer morph token from delegator to this _transferFrom(_msgSender(), address(this), amount); @@ -452,23 +448,13 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } } - /// @notice delegator redelegate stake morph token to new delegatee - /// @param delegateeFrom old delegatee - /// @param delegateeTo new delegatee - /// @param amount amount - function redelegateStake( - address delegateeFrom, - address delegateeTo, - uint256 amount - ) external onlyStaker(delegateeFrom) onlyStaker(delegateeTo) nonReentrant { - // TODO - } - /// @notice delegator undelegate stake morph token /// @param delegatee delegatee address /// @param amount undelegate stake amount, undelegate all if set 0 - function undelegateStake(address delegatee, uint256 amount) external nonReentrant { - require(_isStakingTo(delegatee), "staking amount is zero"); + function undelegate(address delegatee, uint256 amount) external nonReentrant { + if (amount == 0) revert ErrZeroAmount(); + if (_getDelegationAmount(delegatee, _msgSender()) == 0) revert ErrZeroShares(); + if (_getDelegationAmount(delegatee, _msgSender()) < amount) revert ErrInsufficientBalance(); // weather staker has been removed bool removed = stakerRankings[delegatee] == 0; @@ -478,53 +464,51 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp ? effectiveEpoch + undelegateLockEpochs // reward started and staker is active : 0; // equal to 0 if reward not started - // Undelegation memory undelegation = Undelegation(delegatee, delegations[delegatee][_msgSender()], unlockEpoch); - // undelegations[_msgSender()].push(undelegation); - // delete delegations[delegatee][_msgSender()]; - // stakerDelegations[delegatee] -= undelegation.amount; - // delegators[delegatee].remove(_msgSender()); - - // ----------------------------------------------------------------------------------------------- - - // // update delegateeDelegations - // if (!rewardStarted) { - // // reward not start yet, checkpoint should be 0 - // delegateeDelegations[delegatee].checkpoint = 0; - // delegateeDelegations[delegatee].amount += amount; - // delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; - // delegateeDelegations[delegatee].share = delegateeDelegations[delegatee].amount; // {share = amount} before reward start - // delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; - // } else if (delegateeDelegations[delegatee].checkpoint < effectiveEpoch) { - // // first delegate stake at this epoch, update checkpoint & preAmount & preShare - // delegateeDelegations[delegatee].checkpoint = effectiveEpoch; - // delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; - // delegateeDelegations[delegatee].amount += amount; - // delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; - // delegateeDelegations[delegatee].share = 0; // TODO - // } else { - // // non-first delegate stake at the current epoch, do not update checkpoint & preAmount & preShare - // delegateeDelegations[delegatee].amount += amount; - // delegateeDelegations[delegatee].share = 0; // TODO - // } - - // // update delegatorDelegations - // if (!rewardStarted) { - // // reward not start yet, checkpoint should be 0 - // delegatorDelegations[delegatee][_msgSender()].checkpoint = 0; - // delegatorDelegations[delegatee][_msgSender()].share += amount; // {share = amount} before reward start - // delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] - // .share; - // } else if (delegatorDelegations[delegatee][_msgSender()].checkpoint < effectiveEpoch) { - // // first delegate stake at this epoch, update checkpoint & preShare - // delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; - // delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] - // .share; - // delegatorDelegations[delegatee][_msgSender()].share = 0; //TODO - // } else { - // // non-first delegate stake at the current epoch, do not update checkpoint & preShare - // delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; - // delegatorDelegations[delegatee][_msgSender()].share = 0; //TODO - // } + UndelegateRequest memory request = UndelegateRequest({amount: amount, unlockEpoch: unlockEpoch}); + bytes32 hash = keccak256(abi.encodePacked(_msgSender(), _useSequence(_msgSender()))); + // the hash should not exist in the queue + // this will not happen in normal cases + if (_undelegateRequests[hash].amount != 0) revert ErrRequestExisted(); + _undelegateRequests[hash] = request; + _undelegateRequestsQueue[_msgSender()].pushBack(hash); + + // update delegatorDelegations & delegateeDelegations + if (!rewardStarted) { + // reward not start yet, checkpoint should be 0 + delegatorDelegations[delegatee][_msgSender()].checkpoint = 0; + delegatorDelegations[delegatee][_msgSender()].share -= amount; // {share = amount} before reward start + delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] + .share; + + delegateeDelegations[delegatee].checkpoint = 0; + delegateeDelegations[delegatee].amount -= amount; + delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; + delegateeDelegations[delegatee].share = delegateeDelegations[delegatee].amount; // {share = amount} before reward start + delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; + } + + // first delegate stake at this epoch, update checkpoint & preShare + if (delegatorDelegations[delegatee][_msgSender()].checkpoint < effectiveEpoch) { + delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; + delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] + .share; + } + + // first delegate stake at this epoch, update checkpoint & preAmount & preShare + if (delegateeDelegations[delegatee].checkpoint < effectiveEpoch) { + delegateeDelegations[delegatee].checkpoint = effectiveEpoch; + delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; + delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; + } + + uint256 _tshare = delegateeDelegations[delegatee].share; + uint256 _tAmount = delegateeDelegations[delegatee].amount; + uint256 _uShare = delegatorDelegations[delegatee][_msgSender()].share; + + delegatorDelegations[delegatee][_msgSender()].share = _uShare - (amount * _tshare) / _tAmount; + + delegateeDelegations[delegatee].amount += amount; + delegateeDelegations[delegatee].share = _tshare - (amount * _tshare) / _tAmount; uint256 beforeRanking = stakerRankings[delegatee]; if (!removed && rewardStarted && beforeRanking < candidateNumber) { @@ -548,16 +532,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp candidateNumber -= 1; } - emit Undelegated( - delegatee, - _msgSender(), - amount, - delegateeDelegations[delegatee].amount, - delegateeDelegations[delegatee].share, - delegatorDelegations[delegatee][_msgSender()].share, - effectiveEpoch, - unlockEpoch - ); + emit Undelegated(delegatee, _msgSender(), amount, delegateeDelegations[delegatee].amount, unlockEpoch); if ( !removed && @@ -569,61 +544,243 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } } - /// @notice delegator cliam delegate staking value - function claimUndelegation() external nonReentrant { - uint256 totalAmount; - uint256 length = undelegations[_msgSender()].length; + /// @notice delegator redelegate stake morph token to new delegatee + /// @param delegateeFrom old delegatee + /// @param delegateeTo new delegatee + /// @param amount amount + function redelegate( + address delegateeFrom, + address delegateeTo, + uint256 amount + ) external onlyStaker(delegateeFrom) onlyStaker(delegateeTo) nonReentrant { + if (amount == 0) revert ErrZeroAmount(); + if (_getDelegationAmount(delegateeFrom, _msgSender()) == 0) revert ErrZeroShares(); + if (_getDelegationAmount(delegateeFrom, _msgSender()) < amount) revert ErrInsufficientBalance(); + + bool updateSequencerSet; + + // weather staker has been removed + uint256 effectiveEpoch = rewardStarted ? currentEpoch() + 1 : 0; + + // ***************************** undelegate from old delegatee ***************************** // + bool removed = stakerRankings[delegateeFrom] == 0; + + // update delegatorDelegations & delegateeDelegations + if (!rewardStarted) { + // reward not start yet, checkpoint should be 0 + delegatorDelegations[delegateeFrom][_msgSender()].checkpoint = 0; + delegatorDelegations[delegateeFrom][_msgSender()].share -= amount; // {share = amount} before reward start + delegatorDelegations[delegateeFrom][_msgSender()].preShare = delegatorDelegations[delegateeFrom][ + _msgSender() + ].share; + + delegateeDelegations[delegateeFrom].checkpoint = 0; + delegateeDelegations[delegateeFrom].amount -= amount; + delegateeDelegations[delegateeFrom].preAmount = delegateeDelegations[delegateeFrom].amount; + delegateeDelegations[delegateeFrom].share = delegateeDelegations[delegateeFrom].amount; // {share = amount} before reward start + delegateeDelegations[delegateeFrom].preShare = delegateeDelegations[delegateeFrom].share; + } + + // first delegate stake at this epoch, update checkpoint & preShare + if (delegatorDelegations[delegateeFrom][_msgSender()].checkpoint < effectiveEpoch) { + delegatorDelegations[delegateeFrom][_msgSender()].checkpoint = effectiveEpoch; + delegatorDelegations[delegateeFrom][_msgSender()].preShare = delegatorDelegations[delegateeFrom][ + _msgSender() + ].share; + } + + // first delegate stake at this epoch, update checkpoint & preAmount & preShare + if (delegateeDelegations[delegateeFrom].checkpoint < effectiveEpoch) { + delegateeDelegations[delegateeFrom].checkpoint = effectiveEpoch; + delegateeDelegations[delegateeFrom].preAmount = delegateeDelegations[delegateeFrom].amount; + delegateeDelegations[delegateeFrom].preShare = delegateeDelegations[delegateeFrom].share; + } + + uint256 _tshare = delegateeDelegations[delegateeFrom].share; + uint256 _tAmount = delegateeDelegations[delegateeFrom].amount; + uint256 _uShare = delegatorDelegations[delegateeFrom][_msgSender()].share; + + delegatorDelegations[delegateeFrom][_msgSender()].share = _uShare - (amount * _tshare) / _tAmount; + + delegateeDelegations[delegateeFrom].amount += amount; + delegateeDelegations[delegateeFrom].share = _tshare - (amount * _tshare) / _tAmount; + + uint256 beforeRanking = stakerRankings[delegateeFrom]; + if (!removed && rewardStarted && beforeRanking < candidateNumber) { + // update stakers and rankings + for (uint256 i = stakerRankings[delegateeFrom] - 1; i < candidateNumber - 1; i++) { + if ( + delegateeDelegations[stakerAddresses[i + 1]].amount > + delegateeDelegations[stakerAddresses[i]].amount + ) { + address tmp = stakerAddresses[i]; + stakerAddresses[i] = stakerAddresses[i + 1]; + stakerAddresses[i + 1] = tmp; + stakerRankings[stakerAddresses[i]] = i + 1; + stakerRankings[stakerAddresses[i + 1]] = i + 2; + } + } + } + + // update candidateNumber + if (!removed && delegateeDelegations[delegateeFrom].amount == 0) { + candidateNumber -= 1; + } + + if ( + !removed && + rewardStarted && + beforeRanking <= latestSequencerSetSize && + (stakerRankings[delegateeFrom] > latestSequencerSetSize || stakerRankings[delegateeFrom] > candidateNumber) + ) { + updateSequencerSet = true; + } + + // ***************************** bond to new delegatee ***************************** // + + delegators[delegateeTo].add(_msgSender()); // will not be added repeatedly + + // update delegatorDelegations & delegateeDelegations + if (!rewardStarted) { + // reward not start yet, checkpoint should be 0 + delegatorDelegations[delegateeTo][_msgSender()].checkpoint = 0; + delegatorDelegations[delegateeTo][_msgSender()].share += amount; // {share = amount} before reward start + delegatorDelegations[delegateeTo][_msgSender()].preShare = delegatorDelegations[delegateeTo][_msgSender()] + .share; + + delegateeDelegations[delegateeTo].checkpoint = 0; + delegateeDelegations[delegateeTo].amount += amount; + delegateeDelegations[delegateeTo].preAmount = delegateeDelegations[delegateeTo].amount; + delegateeDelegations[delegateeTo].share = delegateeDelegations[delegateeTo].amount; // {share = amount} before reward start + delegateeDelegations[delegateeTo].preShare = delegateeDelegations[delegateeTo].share; + } + + // first delegate stake at this epoch, update checkpoint & preShare + if (delegatorDelegations[delegateeTo][_msgSender()].checkpoint < effectiveEpoch) { + delegatorDelegations[delegateeTo][_msgSender()].checkpoint = effectiveEpoch; + delegatorDelegations[delegateeTo][_msgSender()].preShare = delegatorDelegations[delegateeTo][_msgSender()] + .share; + } + + // first delegate stake at this epoch, update checkpoint & preAmount & preShare + if (delegateeDelegations[delegateeTo].checkpoint < effectiveEpoch) { + delegateeDelegations[delegateeTo].checkpoint = effectiveEpoch; + delegateeDelegations[delegateeTo].preAmount = delegateeDelegations[delegateeTo].amount; + delegateeDelegations[delegateeTo].preShare = delegateeDelegations[delegateeTo].share; + } - for (uint256 i = 0; i < length; ) { - // if the reward is not started yet, claiming directly is allowed - if (!rewardStarted || undelegations[_msgSender()][i].unlockEpoch <= currentEpoch()) { - totalAmount += undelegations[_msgSender()][i].amount; + _tshare = delegateeDelegations[delegateeTo].share; + _tAmount = delegateeDelegations[delegateeTo].amount; + _uShare = delegatorDelegations[delegateeTo][_msgSender()].share; - // event params - address delegatee = undelegations[_msgSender()][i].delegatee; - uint256 unlockEpoch = undelegations[_msgSender()][i].unlockEpoch; - uint256 amount = undelegations[_msgSender()][i].amount; + delegatorDelegations[delegateeTo][_msgSender()].share = _uShare + (amount * _tshare) / _tAmount; + + delegateeDelegations[delegateeTo].amount += amount; + delegateeDelegations[delegateeTo].share = _tshare + (amount * _tshare) / _tAmount; + + if (delegateeDelegations[delegateeTo].amount == amount) { + candidateNumber += 1; + } - if (i < length - 1) { - undelegations[_msgSender()][i] = undelegations[_msgSender()][length - 1]; + beforeRanking = stakerRankings[delegateeTo]; + if (rewardStarted && beforeRanking > 1) { + // update stakers and rankings + for (uint256 i = beforeRanking - 1; i > 0; i--) { + if ( + delegateeDelegations[stakerAddresses[i]].amount > + delegateeDelegations[stakerAddresses[i - 1]].amount + ) { + address tmp = stakerAddresses[i - 1]; + stakerAddresses[i - 1] = stakerAddresses[i]; + stakerAddresses[i] = tmp; + + stakerRankings[stakerAddresses[i - 1]] = i; + stakerRankings[stakerAddresses[i]] = i + 1; } - undelegations[_msgSender()].pop(); - length = length - 1; + } + } - emit UndelegationClaimed(delegatee, _msgSender(), unlockEpoch, amount); - } else { - i = i + 1; + if ( + rewardStarted && + beforeRanking > latestSequencerSetSize && + stakerRankings[delegateeTo] <= sequencerSetMaxSize + ) { + updateSequencerSet = true; + } + + // ********************************************************************************* // + + if (updateSequencerSet) { + _updateSequencerSet(); + } + + emit Redelegated( + delegateeFrom, + delegateeTo, + _msgSender(), + amount, + delegateeDelegations[delegateeFrom].amount, + delegateeDelegations[delegateeTo].amount + ); + } + + /// @notice delegator cliam delegate staking value + /// @param number the number of undelegate requests to be claimed. 0 means claim all + /// @return amount the total amount of MPH claimed + function claimUndelegation(uint256 number) external nonReentrant returns (uint256) { + // number == 0 means claim all + // number should not exceed the length of the queue + if (_undelegateRequestsQueue[_msgSender()].length() == 0) revert ErrNoUndelegateRequest(); + + number = (number == 0 || number > _undelegateRequestsQueue[_msgSender()].length()) + ? _undelegateRequestsQueue[_msgSender()].length() + : number; + + uint256 totalAmount; + while (number != 0) { + bytes32 hash = _undelegateRequestsQueue[_msgSender()].front(); + UndelegateRequest memory request = _undelegateRequests[hash]; + if (currentEpoch() < request.unlockEpoch) { + break; } + + // remove from the queue + _undelegateRequestsQueue[_msgSender()].popFront(); + + totalAmount += request.amount; + --number; } + if (totalAmount == 0) revert ErrNoClaimableUndelegateRequest(); - require(totalAmount > 0, "no Morph token to claim"); _transfer(_msgSender(), totalAmount); + + return totalAmount; } /// @dev distribute inflation by system on epoch end /// @param epochIndex epoch index /// @param sequencers sequencers /// @param rewards total rewards - function distributeInflation( + function distribute( uint256 epochIndex, address[] calldata sequencers, uint256[] calldata rewards ) external onlSystem { - // mintedEpochCount++; - // require(mintedEpochCount - 1 == epochIndex, "invalid epoch index"); - // require( - // delegatorRewards.length == sequencers.length && commissionsAmount.length == sequencers.length, - // "invalid data length" - // ); - // for (uint256 i = 0; i < sequencers.length; i++) { - // distributions[sequencers[i]][epochIndex].delegatorRewardAmount = delegatorRewards[i]; - // if (distributions[sequencers[i]][epochIndex].delegationAmount == 0 && epochIndex > 0) { - // distributions[sequencers[i]][epochIndex].delegationAmount = distributions[sequencers[i]][epochIndex - 1] - // .delegationAmount; - // } - // commissions[sequencers[i]] += commissionsAmount[i]; - // emit Distributed(sequencers[i], delegatorRewards[i], commissionsAmount[i]); - // } + if (currentEpoch() != epochIndex) revert ErrInvalidEpoch(); + if (sequencers.length != rewards.length) revert ErrInvalidRewards(); + + for (uint256 i = 0; i < sequencers.length; i++) { + uint256 commissionRate = commissions[sequencers[i]].rate; + uint256 commissionAmount = (rewards[i] * commissionRate) / COMMISSION_RATE_BASE; + uint256 rewardAmount = rewards[i] - commissionAmount; + commissions[sequencers[i]].amount += commissionAmount; + delegateeDelegations[sequencers[i]].amount += rewardAmount; + + delegateeDelegations[sequencers[i]].preAmount = delegateeDelegations[sequencers[i]].amount; + delegateeDelegations[sequencers[i]].checkpoint = epochIndex; + + emit Distributed(sequencers[i], rewardAmount, commissionAmount); + } } /// @dev claim commission reward @@ -642,6 +799,65 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp * Public View Functions * *************************/ + /// @notice return the total length of delegator's pending undelegate queue. + /// @param delegator delegator + function pendingUndelegateRequest(address delegator) public view returns (uint256) { + return _undelegateRequestsQueue[delegator].length(); + } + + /// @notice return the total number of delegator's claimable undelegate requests. + /// @param delegator delegator + function claimableUndelegateRequest(address delegator) public view returns (uint256) { + uint256 length = _undelegateRequestsQueue[delegator].length(); + uint256 count; + for (uint256 i; i < length; ++i) { + bytes32 hash = _undelegateRequestsQueue[delegator].at(i); + UndelegateRequest memory request = _undelegateRequests[hash]; + if (currentEpoch() >= request.unlockEpoch) { + ++count; + } else { + break; + } + } + return count; + } + + /// @notice return the sum of first `number` requests' MPH locked in delegator's undelegate queue. + /// @param delegator delegator + /// @param number number + function lockedAmount(address delegator, uint256 number) public view returns (uint256) { + // number == 0 means all + // number should not exceed the length of the queue + if (_undelegateRequestsQueue[delegator].length() == 0) { + return 0; + } + number = (number == 0 || number > _undelegateRequestsQueue[delegator].length()) + ? _undelegateRequestsQueue[delegator].length() + : number; + + uint256 _totalAmount; + for (uint256 i; i < number; ++i) { + bytes32 hash = _undelegateRequestsQueue[delegator].at(i); + UndelegateRequest memory request = _undelegateRequests[hash]; + _totalAmount += request.amount; + } + return _totalAmount; + } + + /// @notice return the undelegate request at _index. + /// @param delegator delegator + /// @param _index index + function undelegateRequest(address delegator, uint256 _index) public view returns (UndelegateRequest memory) { + bytes32 hash = _undelegateRequestsQueue[delegator].at(_index); + return _undelegateRequests[hash]; + } + + /// @notice return the personal undelegate sequence of the delegator. + /// @param delegator delegator + function undelegateSequence(address delegator) public view returns (uint256) { + return _undelegateSequence[delegator].current(); + } + /// @notice return current reward epoch index function currentEpoch() public view returns (uint256) { require(block.timestamp >= rewardStartTime, "reward is not started yet"); @@ -718,12 +934,6 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp return stakerAddresses.length; } - /// @notice get undelegations of a delegator - /// @param delegator delegator - function getUndelegations(address delegator) external view returns (Undelegation[] memory) { - return undelegations[delegator]; - } - /// @notice query all unclaimed commission of a delegatee /// @param delegatee delegatee address function queryUnclaimedCommission(address delegatee) external view returns (uint256 amount) { @@ -737,24 +947,38 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp return _getDelegationAmount(delegatee, delegator); } + /// @notice query pre-delegation amount of a delegator + /// @param delegatee delegatee address + /// @param delegator delegator address + function queryPreDelegationAmount(address delegatee, address delegator) external view returns (uint256 amount) { + return _getPreDelegationAmount(delegatee, delegator); + } + /********************** * Internal Functions * **********************/ + /// @notice use sequence + function _useSequence(address delegator) internal returns (uint256 current) { + CountersUpgradeable.Counter storage sequence = _undelegateSequence[delegator]; + current = sequence.current(); + sequence.increment(); + } + /// @notice transfer morph token function _transfer(address _to, uint256 _amount) internal { uint256 balanceBefore = IMorphToken(MORPH_TOKEN_CONTRACT).balanceOf(_to); - IMorphToken(MORPH_TOKEN_CONTRACT).transfer(_to, _amount); + if (!IMorphToken(MORPH_TOKEN_CONTRACT).transfer(_to, _amount)) revert ErrTransferFailed(); uint256 balanceAfter = IMorphToken(MORPH_TOKEN_CONTRACT).balanceOf(_to); - require(_amount > 0 && balanceAfter - balanceBefore == _amount, "morph token transfer failed"); + if (_amount == 0 || balanceAfter - balanceBefore != _amount) revert ErrTransferFailed(); } /// @notice transfer morph token from function _transferFrom(address _from, address _to, uint256 _amount) internal { uint256 balanceBefore = IMorphToken(MORPH_TOKEN_CONTRACT).balanceOf(_to); - IMorphToken(MORPH_TOKEN_CONTRACT).transferFrom(_from, _to, _amount); + if (!IMorphToken(MORPH_TOKEN_CONTRACT).transferFrom(_from, _to, _amount)) revert ErrTransferFailed(); uint256 balanceAfter = IMorphToken(MORPH_TOKEN_CONTRACT).balanceOf(_to); - require(_amount > 0 && balanceAfter - balanceBefore == _amount, "morph token transfer failed"); + if (_amount == 0 || balanceAfter - balanceBefore != _amount) revert ErrTransferFailed(); } /// @notice check if the user has staked to delegatee @@ -781,30 +1005,21 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp latestSequencerSetSize = sequencerSet.length; } - /// @notice whether there is a undedeletion unclaimed - function _unclaimedUndelegation(address delegator, address delegatee) internal view returns (bool) { - for (uint256 i = 0; i < undelegations[delegator].length; i++) { - if (undelegations[delegator][i].delegatee == delegatee) { - return true; - } - } - return false; + /// @notice query delegation amount of a delegator + /// @param delegatee delegatee address + /// @param delegator delegator address + function _getDelegationAmount(address delegatee, address delegator) internal view returns (uint256 amount) { + return + (delegateeDelegations[delegatee].amount * delegatorDelegations[delegatee][delegator].share) / + delegateeDelegations[delegatee].share; } /// @notice query delegation amount of a delegator /// @param delegatee delegatee address /// @param delegator delegator address - function _getDelegationAmount(address delegatee, address delegator) internal view returns (uint256 amount) { - uint256 cEpoch = currentEpoch(); - uint256 share = cEpoch < delegatorDelegations[delegatee][delegator].checkpoint - ? delegatorDelegations[delegatee][delegator].preShare - : delegatorDelegations[delegatee][delegator].share; - uint256 tShare = cEpoch < delegateeDelegations[delegatee].checkpoint - ? delegateeDelegations[delegatee].preShare - : delegateeDelegations[delegatee].share; - uint256 tAmount = cEpoch < delegateeDelegations[delegatee].checkpoint - ? delegateeDelegations[delegatee].preAmount - : delegateeDelegations[delegatee].amount; - return (tAmount * share) / tShare; + function _getPreDelegationAmount(address delegatee, address delegator) internal view returns (uint256 amount) { + return + (delegateeDelegations[delegatee].amount * delegatorDelegations[delegatee][delegator].preShare) / + delegateeDelegations[delegatee].share; } } diff --git a/contracts/contracts/l2/staking/Record.sol b/contracts/contracts/l2/staking/Record.sol deleted file mode 100644 index eebbee835..000000000 --- a/contracts/contracts/l2/staking/Record.sol +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity =0.8.24; - -import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; - -import {Predeploys} from "../../libraries/constants/Predeploys.sol"; -import {IRecord} from "./IRecord.sol"; - -contract Record is IRecord, OwnableUpgradeable { - /************* - * Variables * - *************/ - - /// @notice oracle address - address public oracle; - - /// @notice If the sequencer set or rollup epoch changed, reset the submitter round - mapping(uint256 batchIndex => BatchSubmission) public batchSubmissions; - - /// @notice next batch submission index - uint256 public override nextBatchSubmissionIndex; - - /********************** - * Function Modifiers * - **********************/ - - /// @notice Only prover allowed. - modifier onlyOracle() { - require(_msgSender() == oracle, "only oracle allowed"); - _; - } - - /*************** - * Constructor * - ***************/ - - /// @notice constructor - constructor() { - _disableInitializers(); - } - - /*************** - * Initializer * - ***************/ - - /// @notice Initializer. - /// @param _owner owner - /// @param _oracle oracle address - /// @param _nextBatchSubmissionIndex next batch submission index - function initialize(address _owner, address _oracle, uint256 _nextBatchSubmissionIndex) public initializer { - require(_owner != address(0), "invalid owner address"); - require(_nextBatchSubmissionIndex != 0, "invalid next batch submission index"); - require(_oracle != address(0), "invalid oracle address"); - - _transferOwnership(_owner); - - oracle = _oracle; - nextBatchSubmissionIndex = _nextBatchSubmissionIndex; - } - - /************************ - * Restricted Functions * - ************************/ - - /// @notice set oracle address - /// @param _oracle oracle address - function setOracleAddress(address _oracle) external onlyOwner { - require(_oracle != address(0), "invalid oracle address"); - oracle = _oracle; - } - - /// @notice record batch submissions - function recordFinalizedBatchSubmissions(BatchSubmission[] calldata _batchSubmissions) external onlyOracle { - require(_batchSubmissions.length > 0, "empty batch submissions"); - for (uint256 i = 0; i < _batchSubmissions.length; i++) { - require(_batchSubmissions[i].index == nextBatchSubmissionIndex + i, "invalid index"); - batchSubmissions[_batchSubmissions[i].index] = BatchSubmission( - _batchSubmissions[i].index, - _batchSubmissions[i].submitter, - _batchSubmissions[i].startBlock, - _batchSubmissions[i].endBlock, - _batchSubmissions[i].rollupTime, - _batchSubmissions[i].rollupBlock - ); - } - emit BatchSubmissionsUploaded(nextBatchSubmissionIndex, _batchSubmissions.length); - nextBatchSubmissionIndex += _batchSubmissions.length; - } - - /************************* - * Public View Functions * - *************************/ - - /// @notice getBatchSubmissions - /// @param start start index - /// @param end end index - function getBatchSubmissions(uint256 start, uint256 end) external view returns (BatchSubmission[] memory res) { - require(end >= start, "invalid index"); - res = new BatchSubmission[](end - start + 1); - for (uint256 i = start; i <= end; i++) { - res[i] = batchSubmissions[i]; - } - } -} diff --git a/contracts/contracts/l2/system/MorphToken.sol b/contracts/contracts/l2/system/MorphToken.sol index 3ff9a3a4d..c32a6c355 100644 --- a/contracts/contracts/l2/system/MorphToken.sol +++ b/contracts/contracts/l2/system/MorphToken.sol @@ -67,7 +67,7 @@ contract MorphToken is IMorphToken, OwnableUpgradeable { /// @notice constructor constructor() { L2_STAKING_CONTRACT = Predeploys.L2_STAKING; - SYSTEM_ADDRESS = Predeploys.System; + SYSTEM_ADDRESS = Predeploys.SYSTEM; } /************** diff --git a/contracts/contracts/libraries/constants/Predeploys.sol b/contracts/contracts/libraries/constants/Predeploys.sol index 9a22a9f45..017c676a8 100644 --- a/contracts/contracts/libraries/constants/Predeploys.sol +++ b/contracts/contracts/libraries/constants/Predeploys.sol @@ -82,11 +82,6 @@ library Predeploys { */ address internal constant L2_WETH = 0x5300000000000000000000000000000000000011; - /** - * @notice Address of the RECORD predeploy. - */ - address internal constant RECORD = 0x5300000000000000000000000000000000000012; - /** * @notice Address of the MORPH_TOKEN predeploy. */ @@ -115,5 +110,5 @@ library Predeploys { /** * @notice Address of the System. */ - address internal constant System = 0x5300000000000000000000000000000000000019; + address internal constant SYSTEM = 0x5300000000000000000000000000000000000019; } diff --git a/contracts/contracts/test/MorphToken.t.sol b/contracts/contracts/test/MorphToken.t.sol index e1bd35e01..58f76b5a4 100644 --- a/contracts/contracts/test/MorphToken.t.sol +++ b/contracts/contracts/test/MorphToken.t.sol @@ -58,14 +58,6 @@ contract MorphTokenTest is L2StakingBaseTest { assertEq(morphToken.L2_STAKING_CONTRACT(), Predeploys.L2_STAKING); } - function test_distribute_contract_succeeds() public { - assertEq(morphToken.DISTRIBUTE_CONTRACT(), Predeploys.DISTRIBUTE); - } - - function test_record_contract_succeeds() public { - assertEq(morphToken.RECORD_CONTRACT(), Predeploys.RECORD); - } - function test_name_succeeds() public { assertEq(morphToken.name(), "Morph"); } @@ -160,15 +152,15 @@ contract MorphTokenTest is L2StakingBaseTest { assertEq(morphToken.epochInflationRates(newCount - 1).effectiveEpochIndex, newEpochIndex); } - function test_mintInflations_notRecord_reverts() public { - hevm.startPrank(Predeploys.DISTRIBUTE); - hevm.expectRevert("only record contract allowed"); + function test_mintInflations_notSystem_reverts() public { + hevm.startPrank(Predeploys.L2_STAKING); + hevm.expectRevert("only system address allowed"); morphToken.mintInflations(0); hevm.stopPrank(); } function test_mintInflations_notStart_reverts() public { - hevm.startPrank(Predeploys.RECORD); + hevm.startPrank(Predeploys.SYSTEM); hevm.warp(block.timestamp + rewardStartTime - 2); hevm.expectRevert("reward is not started yet"); morphToken.mintInflations(0); @@ -176,7 +168,7 @@ contract MorphTokenTest is L2StakingBaseTest { } function test_mintInflations_invalidEpoch_reverts() public { - hevm.startPrank(Predeploys.RECORD); + hevm.startPrank(Predeploys.SYSTEM); hevm.warp(block.timestamp + rewardStartTime); hevm.expectRevert("the specified time has not yet been reached"); morphToken.mintInflations(0); @@ -184,7 +176,7 @@ contract MorphTokenTest is L2StakingBaseTest { } function test_mintInflations_exceedCurrentEpoch_reverts() public { - hevm.startPrank(Predeploys.RECORD); + hevm.startPrank(Predeploys.SYSTEM); hevm.warp(block.timestamp + rewardStartTime * 2); uint256 exceedingEpoch = l2Staking.currentEpoch() + 1; hevm.expectRevert("the specified time has not yet been reached"); @@ -193,7 +185,7 @@ contract MorphTokenTest is L2StakingBaseTest { } function test_mintInflations_check_reverts() public { - hevm.startPrank(Predeploys.RECORD); + hevm.startPrank(Predeploys.SYSTEM); uint256 beforeTotal = morphToken.totalSupply(); hevm.warp(block.timestamp + rewardStartTime * 2); morphToken.mintInflations(0); @@ -206,13 +198,13 @@ contract MorphTokenTest is L2StakingBaseTest { } function test_mintInflations_succeeds() public { - hevm.startPrank(Predeploys.RECORD); + hevm.startPrank(Predeploys.SYSTEM); uint256 beforeTotal = morphToken.totalSupply(); - uint256 dbb = morphToken.balanceOf(Predeploys.DISTRIBUTE); + uint256 dbb = morphToken.balanceOf(Predeploys.L2_STAKING); hevm.warp(block.timestamp + rewardStartTime * 2); morphToken.mintInflations(0); uint256 afterTotal = morphToken.totalSupply(); - uint256 dab = morphToken.balanceOf(Predeploys.DISTRIBUTE); + uint256 dab = morphToken.balanceOf(Predeploys.L2_STAKING); assertEq(afterTotal - beforeTotal, morphToken.inflation(0)); assertEq(dab - dbb, morphToken.inflation(0)); hevm.stopPrank(); @@ -223,7 +215,7 @@ contract MorphTokenTest is L2StakingBaseTest { morphToken.updateRate(1596535874529 + 100, 1); hevm.stopPrank(); - hevm.startPrank(Predeploys.RECORD); + hevm.startPrank(Predeploys.SYSTEM); hevm.warp(block.timestamp + REWARD_EPOCH * 3); morphToken.mintInflations(0); uint256 oldTotal = morphToken.totalSupply(); @@ -413,7 +405,7 @@ contract MorphTokenTest is L2StakingBaseTest { } function test_inflation_succeeds() public { - hevm.startPrank(Predeploys.RECORD); + hevm.startPrank(Predeploys.SYSTEM); uint256 beforeTotal = morphToken.totalSupply(); hevm.warp(block.timestamp + rewardStartTime * 2); morphToken.mintInflations(0); @@ -423,7 +415,7 @@ contract MorphTokenTest is L2StakingBaseTest { } function test_inflationMintedEpochs_succeeds() public { - hevm.startPrank(Predeploys.RECORD); + hevm.startPrank(Predeploys.SYSTEM); uint256 beforeTotal = morphToken.totalSupply(); hevm.warp(block.timestamp + rewardStartTime * 2); assertEq(morphToken.inflationMintedEpochs(), 0); diff --git a/contracts/contracts/test/base/L2StakingBase.t.sol b/contracts/contracts/test/base/L2StakingBase.t.sol index 8c9cef5f9..5cb7cfe85 100644 --- a/contracts/contracts/test/base/L2StakingBase.t.sol +++ b/contracts/contracts/test/base/L2StakingBase.t.sol @@ -73,26 +73,14 @@ contract L2StakingBaseTest is L2MessageBaseTest { Predeploys.MORPH_TOKEN, address(new TransparentUpgradeableProxy(address(emptyContract), address(multisig), new bytes(0))).code ); - hevm.etch( - Predeploys.DISTRIBUTE, - address(new TransparentUpgradeableProxy(address(emptyContract), address(multisig), new bytes(0))).code - ); - hevm.etch( - Predeploys.RECORD, - address(new TransparentUpgradeableProxy(address(emptyContract), address(multisig), new bytes(0))).code - ); TransparentUpgradeableProxy sequencerProxy = TransparentUpgradeableProxy(payable(Predeploys.SEQUENCER)); TransparentUpgradeableProxy govProxy = TransparentUpgradeableProxy(payable(Predeploys.GOV)); TransparentUpgradeableProxy l2StakingProxy = TransparentUpgradeableProxy(payable(Predeploys.L2_STAKING)); TransparentUpgradeableProxy morphTokenProxy = TransparentUpgradeableProxy(payable(Predeploys.MORPH_TOKEN)); - TransparentUpgradeableProxy distributeProxy = TransparentUpgradeableProxy(payable(Predeploys.DISTRIBUTE)); - TransparentUpgradeableProxy recordProxy = TransparentUpgradeableProxy(payable(Predeploys.RECORD)); hevm.store(address(sequencerProxy), bytes32(PROXY_OWNER_KEY), bytes32(abi.encode(address(multisig)))); hevm.store(address(govProxy), bytes32(PROXY_OWNER_KEY), bytes32(abi.encode(address(multisig)))); hevm.store(address(l2StakingProxy), bytes32(PROXY_OWNER_KEY), bytes32(abi.encode(address(multisig)))); hevm.store(address(morphTokenProxy), bytes32(PROXY_OWNER_KEY), bytes32(abi.encode(address(multisig)))); - hevm.store(address(distributeProxy), bytes32(PROXY_OWNER_KEY), bytes32(abi.encode(address(multisig)))); - hevm.store(address(recordProxy), bytes32(PROXY_OWNER_KEY), bytes32(abi.encode(address(multisig)))); hevm.startPrank(multisig); // deploy impl contracts @@ -100,7 +88,6 @@ contract L2StakingBaseTest is L2MessageBaseTest { L2Staking l2StakingImpl = new L2Staking(payable(NON_ZERO_ADDRESS)); Sequencer sequencerImpl = new Sequencer(); Distribute distributeImpl = new Distribute(); - Record recordImpl = new Record(); Gov govImpl = new Gov(); // upgrade proxy From 8e74bf0c4324432300207a3b597b676442bc8d32 Mon Sep 17 00:00:00 2001 From: Segue Date: Mon, 13 Jan 2025 14:37:23 +0800 Subject: [PATCH 3/9] fix sth --- contracts/contracts/l2/staking/L2Staking.sol | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/contracts/contracts/l2/staking/L2Staking.sol b/contracts/contracts/l2/staking/L2Staking.sol index 9fbc146f9..f22017249 100644 --- a/contracts/contracts/l2/staking/L2Staking.sol +++ b/contracts/contracts/l2/staking/L2Staking.sol @@ -436,7 +436,8 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } } - emit Delegated(delegatee, _msgSender(), amount, delegateeDelegations[delegatee].amount); + uint256 delegateeAmount = delegateeDelegations[delegatee].amount; + emit Delegated(delegatee, _msgSender(), amount, delegateeAmount); // transfer morph token from delegator to this _transferFrom(_msgSender(), address(this), amount); @@ -532,7 +533,8 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp candidateNumber -= 1; } - emit Undelegated(delegatee, _msgSender(), amount, delegateeDelegations[delegatee].amount, unlockEpoch); + uint256 delegateeAmount = delegateeDelegations[delegatee].amount; + emit Undelegated(delegatee, _msgSender(), amount, delegateeAmount, unlockEpoch); if ( !removed && @@ -714,14 +716,9 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp _updateSequencerSet(); } - emit Redelegated( - delegateeFrom, - delegateeTo, - _msgSender(), - amount, - delegateeDelegations[delegateeFrom].amount, - delegateeDelegations[delegateeTo].amount - ); + uint256 delegateeFromAmount = delegateeDelegations[delegateeFrom].amount; + uint256 delegateeToAmount = delegateeDelegations[delegateeTo].amount; + emit Redelegated(delegateeFrom, delegateeTo, _msgSender(), amount, delegateeFromAmount, delegateeToAmount); } /// @notice delegator cliam delegate staking value From 7ae396def3a1a08a3b6102ca4785d6d0032c6e60 Mon Sep 17 00:00:00 2001 From: Segue Date: Mon, 13 Jan 2025 15:30:22 +0800 Subject: [PATCH 4/9] update bindings makefile --- bindings/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bindings/Makefile b/bindings/Makefile index 80655a0c0..1472c0337 100644 --- a/bindings/Makefile +++ b/bindings/Makefile @@ -126,10 +126,6 @@ l2-sequencer-bindings: compile ./gen_bindings.sh contracts/l2/staking/Sequencer.sol:Sequencer $(pkg) l2-staking-bindings: compile ./gen_bindings.sh contracts/l2/staking/L2Staking.sol:L2Staking $(pkg) -l2-distribute-bindings: compile - ./gen_bindings.sh contracts/l2/staking/Distribute.sol:Distribute $(pkg) -l2-record-bindings: compile - ./gen_bindings.sh contracts/l2/staking/Record.sol:Record $(pkg) # Gateways l2-eth-gateway-bindings: compile From abf8bdef595724b84c791f5aac09e2a9e6f20b07 Mon Sep 17 00:00:00 2001 From: Segue Date: Mon, 13 Jan 2025 15:31:09 +0800 Subject: [PATCH 5/9] update l2 staking --- contracts/contracts/Staking.md | 134 ------------------ contracts/contracts/l2/staking/IL2Staking.sol | 26 ++++ contracts/contracts/l2/staking/L2Staking.sol | 58 +++----- 3 files changed, 45 insertions(+), 173 deletions(-) delete mode 100644 contracts/contracts/Staking.md diff --git a/contracts/contracts/Staking.md b/contracts/contracts/Staking.md deleted file mode 100644 index b657c8114..000000000 --- a/contracts/contracts/Staking.md +++ /dev/null @@ -1,134 +0,0 @@ -# Staking - ---- - -## Core Process - -**Staking & Sequencer Selection** - -Morph token staking will be divided into three stages: - -- MorphToken has not yet issued yet -- MorphToken has been issued, but inflation and staking rewards have not started yet. -- Inflation starts and distribute staking rewards - -1. `L1` Update whitelist -2. `L1` Register and stake eth to become staker -3. `L1->L2` Send {add staker} message -4. `L2` Update stakers -5. `L2` Delegate stake MorphToken to staker -6. `L2` Update sequencer set by amount of MorphToken delegation - -**Rollp Verify** - -- The submitted batch requires the BLS signature of more than 2/3 of the sequencers -- Before BLS implementation, only staker (not withdrawing, not slashing) can rollup - -1. `L1` Submit batch and sequencer sets -2. `L1` Verify sequencer set -3. `L1` Verify batch signature - -**Slash Sequencers After Challenger Win** - -- Sequencer will be confiscated all stake amount and removed from sequencer set if defense challenge fails -- Even if challenged repeatedly, each sequencer will only be slashed once -- The reward for a successful challenge is a fixed proportion of the staking amount, and is greater than the challenge deposit -- If the slash causes the number of sequences to be 0, then the layer2 will stop running. We can restart by upgrading, reset stakers and sequencer set. This does not affect the security of the evm state - -1. `L1` Slash staking value of signed sequencers and remove from stakers -2. `L1` Distribute challenger rewards -3. `L1->L2` Send {remove stakers} message -4. `L2` Update sequencer set by amount of MorphToken delegation - -**Delegation Rewards** - -- MorphToken is inflated at a fixed ratio every day, and the additional tokens are used as rewards for sequencers and delegators -- The sequencer and his delegators get MorphToken inflation reward according to the block production ratio -- Sequencer charges commission as its own income -- Users get remaining reward according to their delegation amount - -1. `L2` Staker set delegation commission rate -2. `L2` Upload sequencers work records in epoch (an epoch is a day) -3. `L2` Mint MorphToken inflation as delegation reward -4. `L2` Claim delegation reward or claim commission - -**Quit Staker** - -The exit lock period should be long enough to ensure that stakers and sequencers in L2 have been updated - -1. `L1` Apply to withdraw, remove from staker list, enter lock period -2. `L1->L2` Send {remove staker} message -3. `L2` Remove from stakers and sequencers if needed -4. `L1` Claim allowed until reach unlock height,remove staker info after claiming - ---- - -## Contracts - -### L1 Contract - -#### L1Staking Contract - -**Main functions** - -- Update whitelist -- Register as staker -- Staker quit -- Slash signed sequencers if challenger win, call by rollup contract - -#### Rollup Contract - -**Main functions** - -- Commit batch & verify -- Challenge batch - -### L2 Contract - -#### MorphToken Contract - -**Main functions** - -- Mint inflation - -#### Record Contract - -**Main functions** - -- Record finalized batch submissions, call by oracle -- Record rollup epochs, call by oracle -- Record reward epochs, call by oracle - -#### L2Staking Contract - -**Main functions** - -- Add staker, sync from L1 staking contract -- Remove stakers, sync from L1 staking contract -- Staker set commission rate -- User delegate stake morph token -- User undelegate stake morph token -- User claim delegation reward -- Sequencer claim commission - -#### Sequencer Contract - -**Main functions** - -- Update sequencer set, call form l2 staking contract - -#### Distribute Contract - -**Main functions** - -- Record delegation info by l2 staking contract -- Record undelegation info by l2 staking contract -- Compute delegator's delegation reward, call form l2 staking contract -- Compute sequencer's commission, call form l2 staking contract - -#### Gov Contract - -**Main functions** - -- Submit proposal -- Vote proposal diff --git a/contracts/contracts/l2/staking/IL2Staking.sol b/contracts/contracts/l2/staking/IL2Staking.sol index 6a2aa5e90..21ee9d381 100644 --- a/contracts/contracts/l2/staking/IL2Staking.sol +++ b/contracts/contracts/l2/staking/IL2Staking.sol @@ -56,6 +56,30 @@ interface IL2Staking { * Errors * ***********/ + /// @notice error invalid owner + error ErrInvalidOwner(); + /// @notice error zero sequencer size + error ErrZeroSequencerSize(); + /// @notice error invalid sequencer size + error ErrInvalidSequencerSize(); + /// @notice error zero lock epochs + error ErrZeroLockEpochs(); + /// @notice error reward started + error ErrRewardStarted(); + /// @notice error reward not started + error ErrRewardNotStarted(); + /// @notice error start time not reached + error ErrStartTimeNotReached(); + /// @notice error invalid start time + error ErrInvalidStartTime(); + /// @notice error no candidate + error ErrNoCandidate(); + /// @notice error no stakers + error ErrNoStakers(); + /// @notice error invalid commission rate + error ErrInvalidCommissionRate(); + /// @notice error no commission to claim + error ErrNoCommission(); /// @notice error not staker error ErrNotStaker(); /// @notice error invalid nonce @@ -80,6 +104,8 @@ interface IL2Staking { error ErrInvalidEpoch(); // @notice error invalid rewards error ErrInvalidRewards(); + // @notice error invalid page size + error ErrInvalidPageSize(); /********** * Events * diff --git a/contracts/contracts/l2/staking/L2Staking.sol b/contracts/contracts/l2/staking/L2Staking.sol index f22017249..980c89b93 100644 --- a/contracts/contracts/l2/staking/L2Staking.sol +++ b/contracts/contracts/l2/staking/L2Staking.sol @@ -144,14 +144,11 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp uint256 _rewardStartTime, Types.StakerInfo[] calldata _stakers ) public initializer { - require(_owner != address(0), "invalid owner address"); - require(_sequencersMaxSize > 0, "sequencersSize must greater than 0"); - require(_undelegateLockEpochs > 0, "invalid undelegateLockEpochs"); - require( - _rewardStartTime > block.timestamp && _rewardStartTime % REWARD_EPOCH == 0, - "invalid reward start time" - ); - require(_stakers.length > 0, "invalid initial stakers"); + if (_owner == address(0)) revert ErrInvalidOwner(); + if (_sequencersMaxSize == 0) revert ErrZeroSequencerSize(); + if (_undelegateLockEpochs == 0) revert ErrZeroLockEpochs(); + if (_rewardStartTime <= block.timestamp || _rewardStartTime % REWARD_EPOCH != 0) revert ErrInvalidStartTime(); + if (_stakers.length == 0) revert ErrNoStakers(); _transferOwnership(_owner); __ReentrancyGuard_init(); @@ -281,7 +278,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice setCommissionPercentage set delegate commission percentage /// @param rate commission percentage function setCommissionRate(uint256 rate) external onlyStaker(_msgSender()) { - require(rate <= 20, "invalid commission"); + if (rate > 20) revert ErrInvalidCommissionRate(); uint256 oldRate = commissions[_msgSender()].rate; commissions[_msgSender()] = Commission({rate: rate, amount: commissions[_msgSender()].amount}); emit CommissionUpdated(_msgSender(), rate, oldRate); @@ -289,22 +286,17 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice claimCommission claim unclaimed commission reward of a staker function claimCommission() external nonReentrant { - require(commissions[_msgSender()].amount > 0, "no commission to claim"); - + if (commissions[_msgSender()].amount == 0) revert ErrNoCommission(); uint256 amount = commissions[_msgSender()].amount; commissions[_msgSender()].amount = 0; _transfer(_msgSender(), amount); - emit CommissionClaimed(_msgSender(), amount); } /// @notice update params /// @param _sequencerSetMaxSize max size of sequencer set function updateSequencerSetMaxSize(uint256 _sequencerSetMaxSize) external onlyOwner { - require( - _sequencerSetMaxSize > 0 && _sequencerSetMaxSize != sequencerSetMaxSize, - "invalid new sequencer set max size" - ); + if (_sequencerSetMaxSize == 0 || _sequencerSetMaxSize == sequencerSetMaxSize) revert ErrInvalidSequencerSize(); uint256 _oldSequencerSetMaxSize = sequencerSetMaxSize; sequencerSetMaxSize = _sequencerSetMaxSize; emit SequencerSetMaxSizeUpdated(_oldSequencerSetMaxSize, _sequencerSetMaxSize); @@ -322,13 +314,13 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice advance layer2 stage /// @param _rewardStartTime reward start time function updateRewardStartTime(uint256 _rewardStartTime) external onlyOwner { - require(!rewardStarted, "reward already started"); - require( - _rewardStartTime > block.timestamp && - _rewardStartTime % REWARD_EPOCH == 0 && - _rewardStartTime != rewardStartTime, - "invalid reward start time" - ); + if (rewardStarted) revert ErrRewardStarted(); + if ( + _rewardStartTime <= block.timestamp || + _rewardStartTime % REWARD_EPOCH != 0 || + _rewardStartTime == rewardStartTime + ) revert ErrInvalidStartTime(); + uint256 _oldTime = rewardStartTime; rewardStartTime = _rewardStartTime; emit RewardStartTimeUpdated(_oldTime, _rewardStartTime); @@ -336,8 +328,8 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice start reward function startReward() external onlyOwner { - require(block.timestamp >= rewardStartTime, "can't start before reward start time"); - require(candidateNumber > 0, "none candidate"); + if (block.timestamp < rewardStartTime) revert ErrStartTimeNotReached(); + if (candidateNumber == 0) revert ErrNoCandidate(); rewardStarted = true; @@ -780,18 +772,6 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp } } - /// @dev claim commission reward - /// @param delegatee delegatee address - function claimCommission(address delegatee) external nonReentrant { - require(commissions[delegatee].amount > 0, "no commission to claim"); - - uint256 amount = commissions[delegatee].amount; - commissions[delegatee].amount = 0; - _transfer(delegatee, amount); - - emit CommissionClaimed(delegatee, amount); - } - /************************* * Public View Functions * *************************/ @@ -857,7 +837,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice return current reward epoch index function currentEpoch() public view returns (uint256) { - require(block.timestamp >= rewardStartTime, "reward is not started yet"); + if (block.timestamp < rewardStartTime) revert ErrRewardNotStarted(); return (block.timestamp - rewardStartTime) / REWARD_EPOCH; } @@ -882,7 +862,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp uint256 pageSize, uint256 pageIndex ) external view returns (uint256 delegatorsTotalNumber, address[] memory delegatorsInPage) { - require(pageSize > 0, "invalid page size"); + if (pageSize == 0) revert ErrInvalidPageSize(); delegatorsTotalNumber = delegators[staker].length(); delegatorsInPage = new address[](pageSize); From d3a7c893dd1d86bf546caacfc8b69e400c0dc0f3 Mon Sep 17 00:00:00 2001 From: Segue Date: Mon, 13 Jan 2025 15:31:23 +0800 Subject: [PATCH 6/9] update test --- contracts/contracts/test/Distribute.t.sol | 300 -------------- contracts/contracts/test/L2Staking.t.sol | 2 - contracts/contracts/test/Record.t.sol | 365 ------------------ .../contracts/test/base/L2StakingBase.t.sol | 8 - 4 files changed, 675 deletions(-) delete mode 100644 contracts/contracts/test/Distribute.t.sol delete mode 100644 contracts/contracts/test/Record.t.sol diff --git a/contracts/contracts/test/Distribute.t.sol b/contracts/contracts/test/Distribute.t.sol deleted file mode 100644 index ac4119cc7..000000000 --- a/contracts/contracts/test/Distribute.t.sol +++ /dev/null @@ -1,300 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity =0.8.24; - -import {L2StakingBaseTest} from "./base/L2StakingBase.t.sol"; -import {IDistribute} from "../l2/staking/IDistribute.sol"; - -contract DistributeTest is L2StakingBaseTest { - address public firstStaker; - address public secondStaker; - uint256 public mockReward; - uint256 public mockCommission; - - function setUp() public virtual override { - super.setUp(); - - firstStaker = address(uint160(beginSeq)); - secondStaker = address(uint160(beginSeq + 1)); - mockReward = 10 ether; - mockCommission = 1 ether; - } - - /** - * @notice update epoch reward - */ - function _update_epoch_reward(uint256 epochIndex) internal { - uint256 updateEpochNum = sequencer.getSequencerSet2Size(); - address[] memory sequencers = new address[](updateEpochNum); - uint256[] memory delegatorRewards = new uint256[](updateEpochNum); - uint256[] memory commissions = new uint256[](updateEpochNum); - - for (uint256 i = 0; i < updateEpochNum; i++) { - sequencers[i] = address(uint160(beginSeq + i)); - delegatorRewards[i] = mockReward; - commissions[i] = mockCommission; - } - - hevm.prank(address(record)); - distribute.updateEpochReward(epochIndex, sequencers, delegatorRewards, commissions); - } - - /** - * @notice initialize: re-initialize - */ - function test_initialize_onlyOnce_reverts() public { - hevm.expectRevert("Initializable: contract is already initialized"); - hevm.prank(multisig); - distribute.initialize(multisig); - } - - /** - * @notice notifyDelegation: only l2 staking allowed - */ - function test_notifyDelegation_onlyCaller_reverts() public { - hevm.expectRevert("only l2 staking contract allowed"); - hevm.prank(alice); - distribute.notifyDelegation(address(0), address(0), 0, 0, 0, false); - } - - /** - * @notice notifyUndelegation: only l2 staking allowed - */ - function test_notifyUndelegation_onlyCaller_reverts() public { - hevm.expectRevert("only l2 staking contract allowed"); - hevm.prank(alice); - distribute.notifyUndelegation(address(0), address(0), 0, 0); - } - - /** - * @notice claim: check params - * 1. only l2 staking allowed - * 2. not minted yet - * 3. no remaining reward - */ - function test_claim_paramsCheck_reverts() public { - hevm.expectRevert("only l2 staking contract allowed"); - hevm.prank(alice); - distribute.claim(address(0), address(0), 0); - - hevm.expectRevert("not minted yet"); - hevm.prank(address(l2Staking)); - distribute.claim(address(0), address(0), 0); - - _update_epoch_reward(0); - hevm.expectRevert("no remaining reward"); - hevm.prank(address(l2Staking)); - distribute.claim(firstStaker, alice, 0); - } - - /** - * @notice claim - * 1. normal claim - * 2. all reward claimed - */ - function test_claim_succeeds() public { - hevm.prank(address(l2Staking)); - distribute.notifyDelegation(firstStaker, alice, 0, 10 ether, 10 ether, true); - - _update_epoch_reward(0); - - // mock inflation - hevm.prank(multisig); - morphToken.transfer(address(distribute), 100 ether); - - uint256 reward = distribute.queryUnclaimed(firstStaker, alice); - assertEq(reward, mockReward); - - // Verify the RewardClaimed event is emitted successfully. - hevm.expectEmit(true, true, true, true); - emit IDistribute.RewardClaimed(alice, firstStaker, 0, mockReward); - - // delegator claim - uint256 balanceBefore = morphToken.balanceOf(alice); - hevm.prank(address(l2Staking)); - distribute.claim(firstStaker, alice, 0); - uint256 balanceAfter = morphToken.balanceOf(alice); - assertEq(balanceAfter - balanceBefore, mockReward); - - // delegatee claimCommission - balanceBefore = morphToken.balanceOf(firstStaker); - hevm.prank(address(l2Staking)); - distribute.claimCommission(firstStaker); - balanceAfter = morphToken.balanceOf(firstStaker); - assertEq(balanceAfter - balanceBefore, mockCommission); - - hevm.expectRevert("all reward claimed"); - hevm.prank(address(l2Staking)); - distribute.claim(firstStaker, alice, 0); - } - - /** - * @notice claim - * 1. normal claim - * 2. all reward claimed - * 3. target epoch index > minted_count - 1 - */ - function test_claim_works() public { - hevm.prank(address(l2Staking)); - distribute.notifyDelegation(firstStaker, alice, 0, 10 ether, 10 ether, true); - - _update_epoch_reward(0); - - // mock inflation - hevm.prank(multisig); - morphToken.transfer(address(distribute), 100 ether); - - uint256 reward = distribute.queryUnclaimed(firstStaker, alice); - assertEq(reward, mockReward); - - uint256 target_epoch_index = 4; - - // delegator claim - uint256 balanceBefore = morphToken.balanceOf(alice); - hevm.prank(address(l2Staking)); - distribute.claim(firstStaker, alice, target_epoch_index); - uint256 balanceAfter = morphToken.balanceOf(alice); - assertEq(balanceAfter - balanceBefore, mockReward); - - // delegatee claimCommission - balanceBefore = morphToken.balanceOf(firstStaker); - hevm.prank(address(l2Staking)); - distribute.claimCommission(firstStaker); - balanceAfter = morphToken.balanceOf(firstStaker); - assertEq(balanceAfter - balanceBefore, mockCommission); - - hevm.expectRevert("all reward claimed"); - hevm.prank(address(l2Staking)); - distribute.claim(firstStaker, alice, target_epoch_index); - } - - /** - * @notice claimAll: only l2 staking allowed - */ - function test_claimAll_paramsCheck_reverts() public { - hevm.expectRevert("only l2 staking contract allowed"); - hevm.prank(alice); - distribute.claimAll(address(0), 0); - - hevm.expectRevert("not minted yet"); - hevm.prank(address(l2Staking)); - distribute.claim(address(0), address(0), 0); - } - - /** - * @notice claimAll: Test claiming rewards from multiple delegatees. - */ - function test_claimAll_multipleDelegatees_succeeds() public { - // Notify delegation from two stakers: 10 ether and 5 ether to Alice - hevm.startPrank(address(l2Staking)); - distribute.notifyDelegation(firstStaker, alice, 0, 10 ether, 10 ether, true); - distribute.notifyDelegation(secondStaker, alice, 0, 5 ether, 5 ether, true); - hevm.stopPrank(); - - // Update the epoch reward for epoch 0. - _update_epoch_reward(0); - - // Transfer 100 ether to the distribute contract from multisig - hevm.prank(multisig); - morphToken.transfer(address(distribute), 100 ether); - - uint256 rewardBefore = morphToken.balanceOf(alice); - - // Claim all rewards for Alice for epoch 0 - hevm.prank(address(l2Staking)); - distribute.claimAll(alice, 0); - uint256 rewardAfter = morphToken.balanceOf(alice); - - // Verify Alice claimed the expected amount of rewards (mockReward * 2). - assertEq(rewardAfter, rewardBefore + mockReward * 2); - } - - /** - * @notice updateEpochReward: only record contract allowed - */ - function test_updateEpochReward_paramsCheck_reverts() public { - uint256 updateEpochNum = 1; - address[] memory sequencers = new address[](updateEpochNum); - uint256[] memory delegatorRewards = new uint256[](updateEpochNum); - uint256[] memory commissions = new uint256[](updateEpochNum); - - hevm.expectRevert("only record contract allowed"); - hevm.prank(alice); - distribute.updateEpochReward(0, sequencers, delegatorRewards, commissions); - - hevm.expectRevert("invalid epoch index"); - hevm.prank(address(record)); - distribute.updateEpochReward(1, sequencers, delegatorRewards, commissions); - - delegatorRewards = new uint256[](2); - hevm.expectRevert("invalid data length"); - hevm.prank(address(record)); - distribute.updateEpochReward(0, sequencers, delegatorRewards, commissions); - } - - /** - * @notice claimCommission: only l2 staking allowed - */ - function test_claimCommission_onlyCaller_reverts() public { - hevm.expectRevert("only l2 staking contract allowed"); - hevm.prank(alice); - distribute.claimCommission(address(0)); - } - - /** - * @notice claimCommission: expect revert if tokens are not minted yet - */ - function test_claimCommission_notMinted_reverts() public { - hevm.expectRevert("no commission to claim"); - hevm.prank(address(l2Staking)); - distribute.claimCommission(address(0)); - } - - /** - * @notice claimCommission: claim commission - */ - function test_claimCommission_succeeds() public { - // Simulate l2Staking address to notify delegation. - hevm.prank(address(l2Staking)); - distribute.notifyDelegation(firstStaker, alice, 0, 10 ether, 10 ether, true); - - // Update the epoch reward for epoch 0. - _update_epoch_reward(0); - - // Transfer 10 ether to the distribute contract from multisig. - hevm.prank(multisig); - morphToken.transfer(address(distribute), 10 ether); - - // Expect the CommissionClaimed event to be emitted successfully. - hevm.expectEmit(true, true, true, true); - emit IDistribute.CommissionClaimed(firstStaker, 1 ether); - - uint256 beforeReward = morphToken.balanceOf(firstStaker); - - // Simulate l2Staking address to claim the commission for the first staker for epoch 0 - hevm.prank(address(l2Staking)); - distribute.claimCommission(firstStaker); - uint256 afterReward = morphToken.balanceOf(firstStaker); - - // Verify the reward after claiming is the reward before plus the mock commission. - assertEq(afterReward, beforeReward + mockCommission); - } - - /** - * @notice claimCommission: expect revert "all commission claimed" - */ - function test_claimCommission_allCommissionClaimed_reverts() public { - hevm.prank(address(l2Staking)); - distribute.notifyDelegation(firstStaker, alice, 0, 10 ether, 10 ether, true); - _update_epoch_reward(0); - - hevm.prank(multisig); - morphToken.transfer(address(distribute), 10 ether); - - hevm.prank(address(l2Staking)); - distribute.claimCommission(firstStaker); - - hevm.expectRevert("no commission to claim"); - hevm.prank(address(l2Staking)); - distribute.claimCommission(firstStaker); - } -} diff --git a/contracts/contracts/test/L2Staking.t.sol b/contracts/contracts/test/L2Staking.t.sol index f09d465a3..329af596e 100644 --- a/contracts/contracts/test/L2Staking.t.sol +++ b/contracts/contracts/test/L2Staking.t.sol @@ -3,14 +3,12 @@ pragma solidity =0.8.24; import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IRecord} from "../l2/staking/IRecord.sol"; import {Types} from "../libraries/common/Types.sol"; import {L2StakingBaseTest} from "./base/L2StakingBase.t.sol"; import {L2Staking} from "../l2/staking/L2Staking.sol"; import {IL2Staking} from "../l2/staking/IL2Staking.sol"; import {Predeploys} from "../libraries/constants/Predeploys.sol"; import {ICrossDomainMessenger} from "../libraries/ICrossDomainMessenger.sol"; -import {IDistribute} from "../l2/staking/IDistribute.sol"; import {console} from "forge-std/Test.sol"; import "forge-std/console.sol"; diff --git a/contracts/contracts/test/Record.t.sol b/contracts/contracts/test/Record.t.sol deleted file mode 100644 index cafd2d474..000000000 --- a/contracts/contracts/test/Record.t.sol +++ /dev/null @@ -1,365 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity =0.8.24; -import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; - -import {L2StakingBaseTest} from "./base/L2StakingBase.t.sol"; -import {IRecord} from "../l2/staking/IRecord.sol"; -import {Record} from "../l2/staking/Record.sol"; -import {Types} from "../libraries/common/Types.sol"; - -contract RecordTest is L2StakingBaseTest { - function setUp() public virtual override { - super.setUp(); - } - - /** - * @notice initialize: re-initialize - */ - function test_initialize_onlyOnce_reverts() public { - hevm.expectRevert("Initializable: contract is already initialized"); - hevm.prank(multisig); - record.initialize(multisig, address(0), 1); - } - - /** - * @notice initialize: Reverts if next batch submission index is zero. - */ - function test_initialize_zeroNextBatchSubmissionIndex_reverts() public { - // Deploy a TransparentUpgradeableProxy contract for recordProxyTemp. - TransparentUpgradeableProxy recordProxyTemp = new TransparentUpgradeableProxy( - address(emptyContract), - address(multisig), - new bytes(0) - ); - - // Deploy Record implementation. - Record recordImplTemp = new Record(); - - Types.StakerInfo[] memory stakerInfos = new Types.StakerInfo[](SEQUENCER_SIZE); - for (uint256 i = 0; i < SEQUENCER_SIZE; i++) { - address user = address(uint160(beginSeq + i)); - Types.StakerInfo memory stakerInfo = ffi.generateStakerInfo(user); - stakerInfos[i] = stakerInfo; - sequencerAddresses.push(stakerInfo.addr); - } - - // Expect revert due to invalid next batch submission index. - hevm.expectRevert("invalid next batch submission index"); - hevm.startPrank(multisig); - - // Initialize the proxy with the new implementation. - ITransparentUpgradeableProxy(address(recordProxyTemp)).upgradeToAndCall( - address(recordImplTemp), - abi.encodeCall(Record.initialize, (multisig, oracleAddress, 0)) - ); - hevm.stopPrank(); - } - - /** - * @notice initialize: Initializes the Record contract successfully. - */ - function test_initialize_succeeds() public { - // Deploy a TransparentUpgradeableProxy contract for recordProxyTemp. - TransparentUpgradeableProxy recordProxyTemp = new TransparentUpgradeableProxy( - address(emptyContract), - address(multisig), - new bytes(0) - ); - - // Deploy Record implementation. - Record recordImplTemp = new Record(); - - Types.StakerInfo[] memory stakerInfos = new Types.StakerInfo[](SEQUENCER_SIZE); - for (uint256 i = 0; i < SEQUENCER_SIZE; i++) { - address user = address(uint160(beginSeq + i)); - Types.StakerInfo memory stakerInfo = ffi.generateStakerInfo(user); - stakerInfos[i] = stakerInfo; - sequencerAddresses.push(stakerInfo.addr); - } - - hevm.startPrank(multisig); - - // Initialize the proxy with the new implementation. - ITransparentUpgradeableProxy(address(recordProxyTemp)).upgradeToAndCall( - address(recordImplTemp), - abi.encodeCall(Record.initialize, (multisig, oracleAddress, nextBatchSubmissionIndex)) - ); - hevm.stopPrank(); - - // Cast the proxy address to the Record contract type to call its methods. - Record recordTemp = Record(payable(address(recordProxyTemp))); - - // Verify that the oracle address and nextBatchSubmissionIndex are correctly initialized. - assertEq(recordTemp.oracle(), oracleAddress); - assertEq(recordTemp.nextBatchSubmissionIndex(), nextBatchSubmissionIndex); - } - - /** - * @notice setOracleAddress: check params - */ - function test_setOracleAddress_invalidAddress_reverts() public { - hevm.expectRevert("invalid oracle address"); - hevm.prank(multisig); - record.setOracleAddress(address(0)); - } - - /** - * @notice setOracleAddress: check owner - */ - function test_owner_onlyOwner_reverts() public { - hevm.expectRevert("Ownable: caller is not the owner"); - hevm.prank(alice); - record.setOracleAddress(address(0)); - } - - /** - * @notice setLatestRewardEpochBlock: check params - */ - function test_setLatestRewardEpochBlock_paramsCheck_reverts() public { - hevm.expectRevert("only oracle allowed"); - hevm.prank(multisig); - record.setLatestRewardEpochBlock(0); - - hevm.expectRevert("invalid latest block"); - hevm.prank(oracleAddress); - record.setLatestRewardEpochBlock(0); - - hevm.prank(oracleAddress); - record.setLatestRewardEpochBlock(100); - - hevm.expectRevert("already set"); - hevm.prank(oracleAddress); - record.setLatestRewardEpochBlock(100); - } - - /** - * @notice recordFinalizedBatchSubmissions - * 1. check owner - * 2. check params - */ - function test_recordFinalizedBatchSubmissions_paramsCheck_reverts() public { - IRecord.BatchSubmission[] memory submissions = new IRecord.BatchSubmission[](0); - - hevm.expectRevert("only oracle allowed"); - hevm.prank(multisig); - record.recordFinalizedBatchSubmissions(submissions); - - hevm.expectRevert("empty batch submissions"); - hevm.prank(oracleAddress); - record.recordFinalizedBatchSubmissions(submissions); - - submissions = new IRecord.BatchSubmission[](1); - hevm.expectRevert("invalid index"); - hevm.prank(oracleAddress); - record.recordFinalizedBatchSubmissions(submissions); - - // recordFinalizedBatchSubmissions - IRecord.BatchSubmission memory submission = IRecord.BatchSubmission( - nextBatchSubmissionIndex, - address(0), - 0, - 1, - 0, - 0 - ); - submissions = new IRecord.BatchSubmission[](1); - submissions[0] = submission; - hevm.expectEmit(true, true, false, false); - emit IRecord.BatchSubmissionsUploaded(1, 1); - hevm.prank(oracleAddress); - record.recordFinalizedBatchSubmissions(submissions); - - // Verify that the nextBatchSubmissionIndex updated correctly. - assertEq(record.nextBatchSubmissionIndex(), nextBatchSubmissionIndex + 1); - } - - /** - * @notice recordRollupEpochs - * 1. check owner - * 2. check params - */ - function test_recordRollupEpochs_paramsCheck_reverts() public { - IRecord.RollupEpochInfo[] memory epochInfos = new IRecord.RollupEpochInfo[](0); - - hevm.expectRevert("only oracle allowed"); - hevm.prank(multisig); - record.recordRollupEpochs(epochInfos); - - hevm.expectRevert("empty rollup epochs"); - hevm.prank(oracleAddress); - record.recordRollupEpochs(epochInfos); - - epochInfos = new IRecord.RollupEpochInfo[](1); - IRecord.RollupEpochInfo memory epochInfo = IRecord.RollupEpochInfo( - 1, // invalid index - address(0), - 0, - 0, - 0 - ); - epochInfos[0] = epochInfo; - hevm.expectRevert("invalid index"); - hevm.prank(oracleAddress); - record.recordRollupEpochs(epochInfos); - - // recordRollupEpochs - epochInfo = IRecord.RollupEpochInfo(0, address(0), 0, 0, 0); - epochInfos[0] = epochInfo; - hevm.expectEmit(true, true, false, false); - emit IRecord.RollupEpochsUploaded(0, 1); - hevm.prank(oracleAddress); - record.recordRollupEpochs(epochInfos); - - // Verify that the nextRollupEpochIndex updated correctly. - assertEq(record.nextRollupEpochIndex(), 1); - } - - /** - * @notice recordRewardEpochs: check owner - */ - function test_recordRewardEpochs_onlyOwner_reverts() public { - uint256 sequencerSize = sequencer.getSequencerSet2Size(); - address[] memory sequencers = sequencer.getSequencerSet2(); - uint256[] memory sequencerBlocks = new uint256[](sequencerSize); - uint256[] memory sequencerRatios = new uint256[](sequencerSize); - uint256[] memory sequencerCommissions = new uint256[](sequencerSize); - - for (uint256 i = 0; i < sequencerSize; i++) { - sequencerBlocks[i] = 0; - sequencerRatios[i] = SEQUENCER_RATIO_PRECISION / sequencerSize; - sequencerCommissions[i] = 1; - } - - IRecord.RewardEpochInfo[] memory rewardEpochInfos = new IRecord.RewardEpochInfo[](1); - - rewardEpochInfos[0] = IRecord.RewardEpochInfo( - 0, - 1, - sequencers, - sequencerBlocks, - sequencerRatios, - sequencerCommissions - ); - - hevm.expectRevert("only oracle allowed"); - hevm.prank(multisig); - record.recordRewardEpochs(rewardEpochInfos); - } - - /** - * @notice recordRewardEpochs: check params - */ - function test_recordRewardEpochs_paramsCheck_reverts() public { - uint256 sequencerSize = sequencer.getSequencerSet2Size(); - address[] memory sequencers = sequencer.getSequencerSet2(); - uint256[] memory sequencerBlocks = new uint256[](sequencerSize); - uint256[] memory sequencerRatios = new uint256[](sequencerSize); - uint256[] memory sequencerCommissions = new uint256[](sequencerSize); - - for (uint256 i = 0; i < sequencerSize; i++) { - sequencerBlocks[i] = 1; - sequencerRatios[i] = SEQUENCER_RATIO_PRECISION / sequencerSize; - sequencerCommissions[i] = 1; - } - - IRecord.RewardEpochInfo[] memory rewardEpochInfos = new IRecord.RewardEpochInfo[](0); - - hevm.expectRevert("empty reward epochs"); - hevm.prank(oracleAddress); - record.recordRewardEpochs(rewardEpochInfos); - - // greater than minted epoch - rewardEpochInfos = new IRecord.RewardEpochInfo[](2); - - hevm.expectRevert("start block should be set"); - hevm.prank(oracleAddress); - record.recordRewardEpochs(rewardEpochInfos); - - hevm.prank(oracleAddress); - record.setLatestRewardEpochBlock(1); - - hevm.expectRevert("reward is not started yet"); - hevm.prank(oracleAddress); - record.recordRewardEpochs(rewardEpochInfos); - - // update epoch - hevm.warp(rewardStartTime * 2); - rewardEpochInfos = new IRecord.RewardEpochInfo[](1); - rewardEpochInfos[0] = IRecord.RewardEpochInfo( - 0, - 1, // total block not equal - sequencers, - sequencerBlocks, - sequencerRatios, - sequencerCommissions - ); - hevm.expectRevert("invalid sequencers blocks"); - hevm.prank(oracleAddress); - record.recordRewardEpochs(rewardEpochInfos); - - // invalide commission rate - sequencerCommissions = new uint256[](sequencerSize); - for (uint256 i = 0; i < sequencerSize; i++) { - sequencerCommissions[i] = 21; - } - rewardEpochInfos[0] = IRecord.RewardEpochInfo( - 0, - 1, // total block not equal - sequencers, - sequencerBlocks, - sequencerRatios, - sequencerCommissions - ); - - hevm.expectRevert("invalid sequencers commission"); - hevm.prank(oracleAddress); - record.recordRewardEpochs(rewardEpochInfos); - - // invalide sequencers ratios - sequencerRatios = new uint256[](sequencerSize); - sequencerCommissions = new uint256[](sequencerSize); - for (uint256 i = 0; i < sequencerSize; i++) { - sequencerRatios[i] = SEQUENCER_RATIO_PRECISION / sequencerSize + 1; - sequencerCommissions[i] = 2; - } - rewardEpochInfos[0] = IRecord.RewardEpochInfo( - 0, - 3, // total block not equal - sequencers, - sequencerBlocks, - sequencerRatios, - sequencerCommissions - ); - - hevm.expectRevert("invalid sequencers ratios"); - hevm.prank(oracleAddress); - record.recordRewardEpochs(rewardEpochInfos); - } - - /** - * @notice getBatchSubmissions: check params - */ - function test_getBatchSubmissions_paramsCheck_reverts() public { - hevm.expectRevert("invalid index"); - hevm.prank(oracleAddress); - record.getBatchSubmissions(2, 1); - } - - /** - * @notice getRollupEpochs: check params - */ - function test_getRollupEpochs_paramsCheck_reverts() public { - hevm.expectRevert("invalid index"); - hevm.prank(oracleAddress); - record.getRollupEpochs(2, 1); - } - - /** - * @notice getRewardEpochs: check params - */ - function test_getRewardEpochs_paramsCheck_reverts() public { - hevm.expectRevert("invalid index"); - hevm.prank(oracleAddress); - record.getRewardEpochs(2, 1); - } -} diff --git a/contracts/contracts/test/base/L2StakingBase.t.sol b/contracts/contracts/test/base/L2StakingBase.t.sol index 5cb7cfe85..348738a03 100644 --- a/contracts/contracts/test/base/L2StakingBase.t.sol +++ b/contracts/contracts/test/base/L2StakingBase.t.sol @@ -8,8 +8,6 @@ import {Types} from "../../libraries/common/Types.sol"; import {MorphToken} from "../../l2/system/MorphToken.sol"; import {L2Staking} from "../../l2/staking/L2Staking.sol"; import {Sequencer} from "../../l2/staking/Sequencer.sol"; -import {Distribute} from "../../l2/staking/Distribute.sol"; -import {Record} from "../../l2/staking/Record.sol"; import {Gov} from "../../l2/staking/Gov.sol"; import {L2MessageBaseTest} from "./L2MessageBase.t.sol"; @@ -40,12 +38,6 @@ contract L2StakingBaseTest is L2MessageBaseTest { // Morph token MorphToken public morphToken; - // Distribute - Distribute public distribute; - - // Record - Record public record; - //Oracle address address public oracleAddress = address(1000); uint256 public nextBatchSubmissionIndex = 1; From 974760ce36c1f9f70ccef5f6e51007b330f4c92d Mon Sep 17 00:00:00 2001 From: Segue Date: Wed, 19 Feb 2025 23:25:31 +0800 Subject: [PATCH 7/9] update contract --- contracts/contracts/l2/staking/IL2Staking.sol | 15 ++-- contracts/contracts/l2/staking/L2Staking.sol | 86 +++++++++++++------ contracts/contracts/l2/system/MorphToken.sol | 1 + .../libraries/constants/Predeploys.sol | 2 +- 4 files changed, 66 insertions(+), 38 deletions(-) diff --git a/contracts/contracts/l2/staking/IL2Staking.sol b/contracts/contracts/l2/staking/IL2Staking.sol index 21ee9d381..12afef8a5 100644 --- a/contracts/contracts/l2/staking/IL2Staking.sol +++ b/contracts/contracts/l2/staking/IL2Staking.sol @@ -92,6 +92,8 @@ interface IL2Staking { error ErrInsufficientBalance(); /// @notice error only system address allowed error ErrOnlySystem(); + /// @notice error only morph token contract allowed + error ErrOnlyMorphTokenContract(); /// @notice error request existed error ErrRequestExisted(); /// @notice error no undelegate request @@ -100,10 +102,6 @@ interface IL2Staking { error ErrNoClaimableUndelegateRequest(); // @notice error transfer failed error ErrTransferFailed(); - // @notice error invalid epoch - error ErrInvalidEpoch(); - // @notice error invalid rewards - error ErrInvalidRewards(); // @notice error invalid page size error ErrInvalidPageSize(); @@ -289,9 +287,8 @@ interface IL2Staking { /// @notice claimCommission claim unclaimed commission reward of a staker function claimCommission() external; - /// @dev distribute inflation by system at end of the epoch - /// @param epochIndex epoch index - /// @param sequencers sequencers - /// @param rewards total rewards - function distribute(uint256 epochIndex, address[] calldata sequencers, uint256[] calldata rewards) external; + /// @dev distribute inflation by MorphTokenContract on epoch end + /// @param amount amount + /// @param epoch epoch index + function distribute(uint256 amount, uint256 epoch) external; } diff --git a/contracts/contracts/l2/staking/L2Staking.sol b/contracts/contracts/l2/staking/L2Staking.sol index 980c89b93..c913b6960 100644 --- a/contracts/contracts/l2/staking/L2Staking.sol +++ b/contracts/contracts/l2/staking/L2Staking.sol @@ -93,6 +93,15 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp // delegator address => personal undelegate sequence mapping(address => CountersUpgradeable.Counter) private _undelegateSequence; + // total blocks of an epoch + EnumerableSetUpgradeable.AddressSet private epochSequencers; + + // sequencers that has produced blocks + uint256 private epochTotalBlocks; + + // blocks produced by sequencers + mapping(address seequencer => uint256) private epochSequencerBlocks; + /********************** * Function Modifiers * **********************/ @@ -115,6 +124,12 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp _; } + /// @notice Ensures that the caller message from system + modifier onlyMorphTokenContract() { + if (_msgSender() != MORPH_TOKEN_CONTRACT) revert ErrOnlyMorphTokenContract(); + _; + } + /*************** * Constructor * ***************/ @@ -399,10 +414,15 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp uint256 _tAmount = delegateeDelegations[delegatee].amount; uint256 _uShare = delegatorDelegations[delegatee][_msgSender()].share; - delegatorDelegations[delegatee][_msgSender()].share = _uShare + (amount * _tshare) / _tAmount; - - delegateeDelegations[delegatee].amount += amount; - delegateeDelegations[delegatee].share = _tshare + (amount * _tshare) / _tAmount; + if (_tAmount == 0) { + delegatorDelegations[delegatee][_msgSender()].share = amount; + delegateeDelegations[delegatee].share = amount; + delegateeDelegations[delegatee].amount = amount; + } else { + delegatorDelegations[delegatee][_msgSender()].share = _uShare + (amount * _tshare) / _tAmount; + delegateeDelegations[delegatee].amount += amount; + delegateeDelegations[delegatee].share = _tshare + (amount * _tshare) / _tAmount; + } // *********************************************************************************************** @@ -500,7 +520,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp delegatorDelegations[delegatee][_msgSender()].share = _uShare - (amount * _tshare) / _tAmount; - delegateeDelegations[delegatee].amount += amount; + delegateeDelegations[delegatee].amount -= amount; delegateeDelegations[delegatee].share = _tshare - (amount * _tshare) / _tAmount; uint256 beforeRanking = stakerRankings[delegatee]; @@ -596,7 +616,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp delegatorDelegations[delegateeFrom][_msgSender()].share = _uShare - (amount * _tshare) / _tAmount; - delegateeDelegations[delegateeFrom].amount += amount; + delegateeDelegations[delegateeFrom].amount -= amount; delegateeDelegations[delegateeFrom].share = _tshare - (amount * _tshare) / _tAmount; uint256 beforeRanking = stakerRankings[delegateeFrom]; @@ -746,32 +766,42 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp return totalAmount; } - /// @dev distribute inflation by system on epoch end - /// @param epochIndex epoch index - /// @param sequencers sequencers - /// @param rewards total rewards - function distribute( - uint256 epochIndex, - address[] calldata sequencers, - uint256[] calldata rewards - ) external onlSystem { - if (currentEpoch() != epochIndex) revert ErrInvalidEpoch(); - if (sequencers.length != rewards.length) revert ErrInvalidRewards(); - - for (uint256 i = 0; i < sequencers.length; i++) { - uint256 commissionRate = commissions[sequencers[i]].rate; - uint256 commissionAmount = (rewards[i] * commissionRate) / COMMISSION_RATE_BASE; - uint256 rewardAmount = rewards[i] - commissionAmount; - commissions[sequencers[i]].amount += commissionAmount; - delegateeDelegations[sequencers[i]].amount += rewardAmount; - - delegateeDelegations[sequencers[i]].preAmount = delegateeDelegations[sequencers[i]].amount; - delegateeDelegations[sequencers[i]].checkpoint = epochIndex; + /// @dev distribute inflation by MorphTokenContract on epoch end + /// @param amount total reward amount + /// @param epoch epoch index + function distribute(uint256 amount, uint256 epoch) external onlyMorphTokenContract { + if (epochTotalBlocks != 0) { + for (uint256 i = 0; i < epochSequencers.length(); i++) { + uint256 commissionRate = commissions[epochSequencers.at(i)].rate; + uint256 rewardAmount = (amount * epochSequencerBlocks[epochSequencers.at(i)]) / epochTotalBlocks; + uint256 commissionAmount = (rewardAmount * commissionRate) / COMMISSION_RATE_BASE; + uint256 delegatorRewardAmount = rewardAmount - commissionAmount; + + commissions[epochSequencers.at(i)].amount += commissionAmount; + delegateeDelegations[epochSequencers.at(i)].amount += delegatorRewardAmount; + delegateeDelegations[epochSequencers.at(i)].preAmount = delegateeDelegations[epochSequencers.at(i)] + .amount; + delegateeDelegations[epochSequencers.at(i)].checkpoint = epoch; + + emit Distributed(epochSequencers.at(i), delegatorRewardAmount, commissionAmount); + } + } - emit Distributed(sequencers[i], rewardAmount, commissionAmount); + // clean block record + for (uint256 i = 0; i < epochSequencers.length(); i++) { + delete epochSequencerBlocks[epochSequencers.at(i)]; + epochSequencers.remove(epochSequencers.at(i)); } } + /// @dev record block producer + /// @param sequencerAddr producer address + function recordBlocks(address sequencerAddr) external onlSystem { + epochSequencers.add(sequencerAddr); + epochTotalBlocks += 1; + epochSequencerBlocks[sequencerAddr] += 1; + } + /************************* * Public View Functions * *************************/ diff --git a/contracts/contracts/l2/system/MorphToken.sol b/contracts/contracts/l2/system/MorphToken.sol index c32a6c355..5646ca851 100644 --- a/contracts/contracts/l2/system/MorphToken.sol +++ b/contracts/contracts/l2/system/MorphToken.sol @@ -134,6 +134,7 @@ contract MorphToken is IMorphToken, OwnableUpgradeable { uint256 increment = (_totalSupply * rate) / PRECISION; _inflations[i] = increment; _mint(L2_STAKING_CONTRACT, increment); + IL2Staking(L2_STAKING_CONTRACT).distribute(increment,i); emit InflationMinted(i, increment); } diff --git a/contracts/contracts/libraries/constants/Predeploys.sol b/contracts/contracts/libraries/constants/Predeploys.sol index 017c676a8..e6506bb8d 100644 --- a/contracts/contracts/libraries/constants/Predeploys.sol +++ b/contracts/contracts/libraries/constants/Predeploys.sol @@ -110,5 +110,5 @@ library Predeploys { /** * @notice Address of the System. */ - address internal constant SYSTEM = 0x5300000000000000000000000000000000000019; + address internal constant SYSTEM = 0x5300000000000000000000000000000000000021; } From 2d0e273bd9a32ccd2c2348ad634e1ef1f112d9c3 Mon Sep 17 00:00:00 2001 From: Segue Date: Fri, 21 Feb 2025 13:43:18 +0800 Subject: [PATCH 8/9] update bindings --- contracts/contracts/l2/staking/IL2Staking.sol | 19 +-- contracts/contracts/l2/staking/L2Staking.sol | 152 +++--------------- contracts/contracts/l2/system/MorphToken.sol | 2 +- 3 files changed, 22 insertions(+), 151 deletions(-) diff --git a/contracts/contracts/l2/staking/IL2Staking.sol b/contracts/contracts/l2/staking/IL2Staking.sol index 12afef8a5..8a7a22bd9 100644 --- a/contracts/contracts/l2/staking/IL2Staking.sol +++ b/contracts/contracts/l2/staking/IL2Staking.sol @@ -20,26 +20,10 @@ interface IL2Staking { /// @notice DelegateeDelegation representing a delegatee's delegation info. /// /// @custom:field checkpoint The epoch when the share was last changed - /// @custom:field preAmount Total delegations of a delegatee /// @custom:field amount Total delegations of a delegatee - /// @custom:field preShare Total share of a delegatee at the start of an epoch /// @custom:field share Total share of a delegatee at the end of an epoch struct DelegateeDelegation { - uint256 checkpoint; - uint256 preAmount; uint256 amount; - uint256 preShare; - uint256 share; - } - - /// @notice DelegatorDelegation representing a delegator's delegation info. - /// - /// @custom:field checkpoint The epoch when the share was last changed - /// @custom:field preShare share of a delegator at the start of an epoch - /// @custom:field share share of a delegator at the end of an epoch - struct DelegatorDelegation { - uint256 checkpoint; - uint256 preShare; uint256 share; } @@ -289,6 +273,5 @@ interface IL2Staking { /// @dev distribute inflation by MorphTokenContract on epoch end /// @param amount amount - /// @param epoch epoch index - function distribute(uint256 amount, uint256 epoch) external; + function distribute(uint256 amount) external; } diff --git a/contracts/contracts/l2/staking/L2Staking.sol b/contracts/contracts/l2/staking/L2Staking.sol index c913b6960..b0cc3b1bf 100644 --- a/contracts/contracts/l2/staking/L2Staking.sol +++ b/contracts/contracts/l2/staking/L2Staking.sol @@ -82,7 +82,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp mapping(address staker => DelegateeDelegation) public delegateeDelegations; /// @notice the delegation of a delegator - mapping(address staker => mapping(address delegator => DelegatorDelegation)) public delegatorDelegations; + mapping(address staker => mapping(address delegator => uint256 share)) public delegatorDelegations; // hash of the undelegate request => undelegate request mapping(bytes32 => UndelegateRequest) private _undelegateRequests; @@ -377,49 +377,27 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp function delegate(address delegatee, uint256 amount) external onlyStaker(delegatee) nonReentrant { if (amount == 0) revert ErrZeroAmount(); - uint256 effectiveEpoch = rewardStarted ? currentEpoch() + 1 : 0; delegators[delegatee].add(_msgSender()); // will not be added repeatedly // *********************************************************************************************** // update delegatorDelegations & delegateeDelegations if (!rewardStarted) { - // reward not start yet, checkpoint should be 0 - delegatorDelegations[delegatee][_msgSender()].checkpoint = 0; - delegatorDelegations[delegatee][_msgSender()].share += amount; // {share = amount} before reward start - delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] - .share; + delegatorDelegations[delegatee][_msgSender()] += amount; // {share = amount} before reward start - delegateeDelegations[delegatee].checkpoint = 0; delegateeDelegations[delegatee].amount += amount; - delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; delegateeDelegations[delegatee].share = delegateeDelegations[delegatee].amount; // {share = amount} before reward start - delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; - } - - // first delegate stake at this epoch, update checkpoint & preShare - if (delegatorDelegations[delegatee][_msgSender()].checkpoint < effectiveEpoch) { - delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; - delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] - .share; - } - - // first delegate stake at this epoch, update checkpoint & preAmount & preShare - if (delegateeDelegations[delegatee].checkpoint < effectiveEpoch) { - delegateeDelegations[delegatee].checkpoint = effectiveEpoch; - delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; - delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; } uint256 _tshare = delegateeDelegations[delegatee].share; uint256 _tAmount = delegateeDelegations[delegatee].amount; - uint256 _uShare = delegatorDelegations[delegatee][_msgSender()].share; + uint256 _uShare = delegatorDelegations[delegatee][_msgSender()]; if (_tAmount == 0) { - delegatorDelegations[delegatee][_msgSender()].share = amount; + delegatorDelegations[delegatee][_msgSender()] = amount; delegateeDelegations[delegatee].share = amount; delegateeDelegations[delegatee].amount = amount; } else { - delegatorDelegations[delegatee][_msgSender()].share = _uShare + (amount * _tshare) / _tAmount; + delegatorDelegations[delegatee][_msgSender()] = _uShare + (amount * _tshare) / _tAmount; delegateeDelegations[delegatee].amount += amount; delegateeDelegations[delegatee].share = _tshare + (amount * _tshare) / _tAmount; } @@ -471,11 +449,8 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp // weather staker has been removed bool removed = stakerRankings[delegatee] == 0; - uint256 effectiveEpoch = rewardStarted ? currentEpoch() + 1 : 0; - uint256 unlockEpoch = rewardStarted - ? effectiveEpoch + undelegateLockEpochs // reward started and staker is active - : 0; // equal to 0 if reward not started + uint256 unlockEpoch = rewardStarted ? undelegateLockEpochs + 1 : 0; UndelegateRequest memory request = UndelegateRequest({amount: amount, unlockEpoch: unlockEpoch}); bytes32 hash = keccak256(abi.encodePacked(_msgSender(), _useSequence(_msgSender()))); @@ -487,38 +462,17 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp // update delegatorDelegations & delegateeDelegations if (!rewardStarted) { - // reward not start yet, checkpoint should be 0 - delegatorDelegations[delegatee][_msgSender()].checkpoint = 0; - delegatorDelegations[delegatee][_msgSender()].share -= amount; // {share = amount} before reward start - delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] - .share; + delegatorDelegations[delegatee][_msgSender()] -= amount; // {share = amount} before reward start - delegateeDelegations[delegatee].checkpoint = 0; delegateeDelegations[delegatee].amount -= amount; - delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; delegateeDelegations[delegatee].share = delegateeDelegations[delegatee].amount; // {share = amount} before reward start - delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; - } - - // first delegate stake at this epoch, update checkpoint & preShare - if (delegatorDelegations[delegatee][_msgSender()].checkpoint < effectiveEpoch) { - delegatorDelegations[delegatee][_msgSender()].checkpoint = effectiveEpoch; - delegatorDelegations[delegatee][_msgSender()].preShare = delegatorDelegations[delegatee][_msgSender()] - .share; - } - - // first delegate stake at this epoch, update checkpoint & preAmount & preShare - if (delegateeDelegations[delegatee].checkpoint < effectiveEpoch) { - delegateeDelegations[delegatee].checkpoint = effectiveEpoch; - delegateeDelegations[delegatee].preAmount = delegateeDelegations[delegatee].amount; - delegateeDelegations[delegatee].preShare = delegateeDelegations[delegatee].share; } uint256 _tshare = delegateeDelegations[delegatee].share; uint256 _tAmount = delegateeDelegations[delegatee].amount; - uint256 _uShare = delegatorDelegations[delegatee][_msgSender()].share; + uint256 _uShare = delegatorDelegations[delegatee][_msgSender()]; - delegatorDelegations[delegatee][_msgSender()].share = _uShare - (amount * _tshare) / _tAmount; + delegatorDelegations[delegatee][_msgSender()] = _uShare - (amount * _tshare) / _tAmount; delegateeDelegations[delegatee].amount -= amount; delegateeDelegations[delegatee].share = _tshare - (amount * _tshare) / _tAmount; @@ -573,48 +527,23 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp bool updateSequencerSet; - // weather staker has been removed - uint256 effectiveEpoch = rewardStarted ? currentEpoch() + 1 : 0; - // ***************************** undelegate from old delegatee ***************************** // + // weather staker has been removed bool removed = stakerRankings[delegateeFrom] == 0; // update delegatorDelegations & delegateeDelegations if (!rewardStarted) { - // reward not start yet, checkpoint should be 0 - delegatorDelegations[delegateeFrom][_msgSender()].checkpoint = 0; - delegatorDelegations[delegateeFrom][_msgSender()].share -= amount; // {share = amount} before reward start - delegatorDelegations[delegateeFrom][_msgSender()].preShare = delegatorDelegations[delegateeFrom][ - _msgSender() - ].share; - - delegateeDelegations[delegateeFrom].checkpoint = 0; + delegatorDelegations[delegateeFrom][_msgSender()] -= amount; // {share = amount} before reward start + delegateeDelegations[delegateeFrom].amount -= amount; - delegateeDelegations[delegateeFrom].preAmount = delegateeDelegations[delegateeFrom].amount; delegateeDelegations[delegateeFrom].share = delegateeDelegations[delegateeFrom].amount; // {share = amount} before reward start - delegateeDelegations[delegateeFrom].preShare = delegateeDelegations[delegateeFrom].share; - } - - // first delegate stake at this epoch, update checkpoint & preShare - if (delegatorDelegations[delegateeFrom][_msgSender()].checkpoint < effectiveEpoch) { - delegatorDelegations[delegateeFrom][_msgSender()].checkpoint = effectiveEpoch; - delegatorDelegations[delegateeFrom][_msgSender()].preShare = delegatorDelegations[delegateeFrom][ - _msgSender() - ].share; - } - - // first delegate stake at this epoch, update checkpoint & preAmount & preShare - if (delegateeDelegations[delegateeFrom].checkpoint < effectiveEpoch) { - delegateeDelegations[delegateeFrom].checkpoint = effectiveEpoch; - delegateeDelegations[delegateeFrom].preAmount = delegateeDelegations[delegateeFrom].amount; - delegateeDelegations[delegateeFrom].preShare = delegateeDelegations[delegateeFrom].share; } uint256 _tshare = delegateeDelegations[delegateeFrom].share; uint256 _tAmount = delegateeDelegations[delegateeFrom].amount; - uint256 _uShare = delegatorDelegations[delegateeFrom][_msgSender()].share; + uint256 _uShare = delegatorDelegations[delegateeFrom][_msgSender()]; - delegatorDelegations[delegateeFrom][_msgSender()].share = _uShare - (amount * _tshare) / _tAmount; + delegatorDelegations[delegateeFrom][_msgSender()] = _uShare - (amount * _tshare) / _tAmount; delegateeDelegations[delegateeFrom].amount -= amount; delegateeDelegations[delegateeFrom].share = _tshare - (amount * _tshare) / _tAmount; @@ -656,38 +585,17 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp // update delegatorDelegations & delegateeDelegations if (!rewardStarted) { - // reward not start yet, checkpoint should be 0 - delegatorDelegations[delegateeTo][_msgSender()].checkpoint = 0; - delegatorDelegations[delegateeTo][_msgSender()].share += amount; // {share = amount} before reward start - delegatorDelegations[delegateeTo][_msgSender()].preShare = delegatorDelegations[delegateeTo][_msgSender()] - .share; + delegatorDelegations[delegateeTo][_msgSender()] += amount; // {share = amount} before reward start - delegateeDelegations[delegateeTo].checkpoint = 0; delegateeDelegations[delegateeTo].amount += amount; - delegateeDelegations[delegateeTo].preAmount = delegateeDelegations[delegateeTo].amount; delegateeDelegations[delegateeTo].share = delegateeDelegations[delegateeTo].amount; // {share = amount} before reward start - delegateeDelegations[delegateeTo].preShare = delegateeDelegations[delegateeTo].share; - } - - // first delegate stake at this epoch, update checkpoint & preShare - if (delegatorDelegations[delegateeTo][_msgSender()].checkpoint < effectiveEpoch) { - delegatorDelegations[delegateeTo][_msgSender()].checkpoint = effectiveEpoch; - delegatorDelegations[delegateeTo][_msgSender()].preShare = delegatorDelegations[delegateeTo][_msgSender()] - .share; - } - - // first delegate stake at this epoch, update checkpoint & preAmount & preShare - if (delegateeDelegations[delegateeTo].checkpoint < effectiveEpoch) { - delegateeDelegations[delegateeTo].checkpoint = effectiveEpoch; - delegateeDelegations[delegateeTo].preAmount = delegateeDelegations[delegateeTo].amount; - delegateeDelegations[delegateeTo].preShare = delegateeDelegations[delegateeTo].share; } _tshare = delegateeDelegations[delegateeTo].share; _tAmount = delegateeDelegations[delegateeTo].amount; - _uShare = delegatorDelegations[delegateeTo][_msgSender()].share; + _uShare = delegatorDelegations[delegateeTo][_msgSender()]; - delegatorDelegations[delegateeTo][_msgSender()].share = _uShare + (amount * _tshare) / _tAmount; + delegatorDelegations[delegateeTo][_msgSender()] = _uShare + (amount * _tshare) / _tAmount; delegateeDelegations[delegateeTo].amount += amount; delegateeDelegations[delegateeTo].share = _tshare + (amount * _tshare) / _tAmount; @@ -768,8 +676,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @dev distribute inflation by MorphTokenContract on epoch end /// @param amount total reward amount - /// @param epoch epoch index - function distribute(uint256 amount, uint256 epoch) external onlyMorphTokenContract { + function distribute(uint256 amount) external onlyMorphTokenContract { if (epochTotalBlocks != 0) { for (uint256 i = 0; i < epochSequencers.length(); i++) { uint256 commissionRate = commissions[epochSequencers.at(i)].rate; @@ -779,9 +686,6 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp commissions[epochSequencers.at(i)].amount += commissionAmount; delegateeDelegations[epochSequencers.at(i)].amount += delegatorRewardAmount; - delegateeDelegations[epochSequencers.at(i)].preAmount = delegateeDelegations[epochSequencers.at(i)] - .amount; - delegateeDelegations[epochSequencers.at(i)].checkpoint = epoch; emit Distributed(epochSequencers.at(i), delegatorRewardAmount, commissionAmount); } @@ -954,13 +858,6 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp return _getDelegationAmount(delegatee, delegator); } - /// @notice query pre-delegation amount of a delegator - /// @param delegatee delegatee address - /// @param delegator delegator address - function queryPreDelegationAmount(address delegatee, address delegator) external view returns (uint256 amount) { - return _getPreDelegationAmount(delegatee, delegator); - } - /********************** * Internal Functions * **********************/ @@ -991,7 +888,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @notice check if the user has staked to delegatee /// @param delegatee delegatee function _isStakingTo(address delegatee) internal view returns (bool) { - return delegatorDelegations[delegatee][_msgSender()].share > 0; + return delegatorDelegations[delegatee][_msgSender()] > 0; } /// @notice select the size of staker with the largest staking amount, the max size is ${sequencerSetMaxSize} @@ -1017,16 +914,7 @@ contract L2Staking is IL2Staking, Staking, OwnableUpgradeable, ReentrancyGuardUp /// @param delegator delegator address function _getDelegationAmount(address delegatee, address delegator) internal view returns (uint256 amount) { return - (delegateeDelegations[delegatee].amount * delegatorDelegations[delegatee][delegator].share) / - delegateeDelegations[delegatee].share; - } - - /// @notice query delegation amount of a delegator - /// @param delegatee delegatee address - /// @param delegator delegator address - function _getPreDelegationAmount(address delegatee, address delegator) internal view returns (uint256 amount) { - return - (delegateeDelegations[delegatee].amount * delegatorDelegations[delegatee][delegator].preShare) / + (delegateeDelegations[delegatee].amount * delegatorDelegations[delegatee][delegator]) / delegateeDelegations[delegatee].share; } } diff --git a/contracts/contracts/l2/system/MorphToken.sol b/contracts/contracts/l2/system/MorphToken.sol index 5646ca851..c750b6799 100644 --- a/contracts/contracts/l2/system/MorphToken.sol +++ b/contracts/contracts/l2/system/MorphToken.sol @@ -134,7 +134,7 @@ contract MorphToken is IMorphToken, OwnableUpgradeable { uint256 increment = (_totalSupply * rate) / PRECISION; _inflations[i] = increment; _mint(L2_STAKING_CONTRACT, increment); - IL2Staking(L2_STAKING_CONTRACT).distribute(increment,i); + IL2Staking(L2_STAKING_CONTRACT).distribute(increment); emit InflationMinted(i, increment); } From 9323fff4447d90887a5ec6bec684e2560bdfdcd5 Mon Sep 17 00:00:00 2001 From: Segue Date: Fri, 21 Feb 2025 13:46:11 +0800 Subject: [PATCH 9/9] update bingdings --- bindings/Makefile | 4 +- bindings/bin/distribute_deployed.hex | 1 - bindings/bin/l2staking_deployed.hex | 2 +- bindings/bin/morphtoken_deployed.hex | 2 +- bindings/bin/record_deployed.hex | 1 - bindings/bindings/distribute.go | 1327 -------------------- bindings/bindings/distribute_more.go | 25 - bindings/bindings/l2staking.go | 1142 +++++++++++++---- bindings/bindings/l2staking_more.go | 4 +- bindings/bindings/morphtoken.go | 59 +- bindings/bindings/morphtoken_more.go | 2 +- bindings/bindings/record.go | 1726 -------------------------- bindings/bindings/record_more.go | 25 - bindings/predeploys/addresses.go | 11 +- 14 files changed, 926 insertions(+), 3405 deletions(-) delete mode 100644 bindings/bin/distribute_deployed.hex delete mode 100644 bindings/bin/record_deployed.hex delete mode 100644 bindings/bindings/distribute.go delete mode 100644 bindings/bindings/distribute_more.go delete mode 100644 bindings/bindings/record.go delete mode 100644 bindings/bindings/record_more.go diff --git a/bindings/Makefile b/bindings/Makefile index 1472c0337..792d23ed7 100644 --- a/bindings/Makefile +++ b/bindings/Makefile @@ -29,8 +29,6 @@ bindings: \ l2-gov-bindings \ l2-sequencer-bindings \ l2-staking-bindings \ - l2-distribute-bindings \ - l2-record-bindings \ l2-eth-gateway-bindings \ l2-standard-erc20-gateway-bindings \ l2-gateway-router-bindings \ @@ -187,7 +185,7 @@ more: compile-forge go run ./gen/main.go \ -artifacts ../contracts/artifacts \ -out ./bindings \ - -contracts ProxyAdmin,TransparentUpgradeableProxy,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,L1LidoGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,Distribute,L2Staking,Record,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,L2LidoGateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1,L2WstETHToken \ + -contracts ProxyAdmin,TransparentUpgradeableProxy,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,L1LidoGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,L2Staking,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,L2LidoGateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1,L2WstETHToken \ -package bindings mkdir: diff --git a/bindings/bin/distribute_deployed.hex b/bindings/bin/distribute_deployed.hex deleted file mode 100644 index f8c4dfac1..000000000 --- a/bindings/bin/distribute_deployed.hex +++ /dev/null @@ -1 +0,0 @@ -0x608060405234801561000f575f80fd5b5060043610610163575f3560e01c8063a766c529116100c7578063cd4281d01161007d578063d557714111610063578063d55771411461033e578063de6ac93314610365578063f2fde38b14610388575f80fd5b8063cd4281d014610304578063cdd0c50e1461032b575f80fd5b8063b809af0f116100ad578063b809af0f146102b6578063bf2dca0a146102c9578063c4d66de8146102f1575f80fd5b8063a766c5291461027b578063ac2ac640146102a3575f80fd5b8063807de4431161011c578063921ae9b811610102578063921ae9b8146102245780639889be5114610247578063996cba6814610268575f80fd5b8063807de443146101d45780638da5cb5b14610213575f80fd5b80635cf20c7b1161014c5780635cf20c7b146101a6578063715018a6146101b95780637f683ee3146101c1575f80fd5b8063273d8e82146101675780634eedab3214610191575b5f80fd5b61017a610175366004612537565b61039b565b6040516101889291906125c2565b60405180910390f35b6101a461019f3660046125ef565b610729565b005b6101a46101b43660046125ef565b6107c7565b6101a46109c3565b6101a46101cf366004612617565b6109d6565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610188565b6033546001600160a01b03166101fb565b610237610232366004612537565b610c1c565b6040516101889493929190612656565b61025a6102553660046126d5565b610f59565b604051908152602001610188565b6101a4610276366004612706565b611230565b61025a610289366004612537565b6001600160a01b03165f9081526067602052604090205490565b6101a46102b1366004612537565b611355565b6101a46102c436600461274c565b61149e565b61025a6102d7366004612537565b6001600160a01b03165f9081526068602052604090205490565b6101a46102ff366004612537565b6115dc565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6101a46103393660046127f3565b6117a6565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6103786103733660046126d5565b611b06565b6040519015158152602001610188565b6101a4610396366004612537565b611b31565b6001600160a01b0381165f90815260696020526040812060609182916103c090611bc1565b9050805f0361043c5760405162461bcd60e51b815260206004820152602860248201527f696e76616c69642064656c656761746f72206f72206e6f2072656d61696e696e60448201527f672072657761726400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b8067ffffffffffffffff8111156104555761045561288f565b60405190808252806020026020018201604052801561047e578160200160208202803683370190505b5092508067ffffffffffffffff81111561049a5761049a61288f565b6040519080825280602002602001820160405280156104c3578160200160208202803683370190505b5091505f5b6001600160a01b0385165f9081526069602052604090206104e890611bc1565b811015610722576001600160a01b0385165f9081526069602052604081206105109083611bca565b6001600160a01b038088165f908152606960209081526040808320938516835260039093019052908120549192509081908190805b6065548110156106bf576001600160a01b038087165f9081526066602090815260408083208584528252808320938f168352600490930190522054156105b9576001600160a01b038087165f9081526066602090815260408083208584528252808320938f16835260049093019052205492505b6001600160a01b0386165f9081526066602090815260408083208484529091529020600101541561060d576001600160a01b0386165f90815260666020908152604080832084845290915290206001015493505b6001600160a01b0386165f908152606660209081526040808320848452909152902054849061063d9085906128e9565b6106479190612900565b6106519086612938565b6001600160a01b03808d165f908152606960209081526040808320938b16835260029093019052205490955060ff1680156106b357506001600160a01b03808c165f908152606960209081526040808320938a16835260049093019052205481145b6106bf57600101610545565b50848987815181106106d3576106d361294b565b60200260200101906001600160a01b031690816001600160a01b031681525050838887815181106107065761070661294b565b60209081029190910101525050600190930192506104c8915050565b5050915091565b610731611bdc565b6001600160a01b0382165f908152606760205260409020545b8181116107a8576001600160a01b0383165f908152606660209081526040808320848452909152812081815560018101829055906002820181818161078f82826124ee565b50505050505080806107a090612978565b91505061074a565b6001600160a01b039092165f9081526067602052604090209190915550565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461083f5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6065545f036108905760405162461bcd60e51b815260206004820152600e60248201527f6e6f74206d696e746564207965740000000000000000000000000000000000006044820152606401610433565b5f8115806108ab575060016065546108a891906129af565b82115b6108b557816108c4565b60016065546108c491906129af565b90505f805b6001600160a01b0385165f9081526069602052604090206108e990611bc1565b8110156109ac576001600160a01b0385165f90815260696020526040812081906109139084611bca565b6001600160a01b0388165f9081526069602052604090209091506109379082611c36565b801561096b57506001600160a01b038088165f90815260696020908152604080832093851683526003909301905220548510155b15610992575f8061097d838a89611c57565b909250905061098c8287612938565b95509250505b816109a557826109a181612978565b9350505b50506108c9565b5080156109bd576109bd84826120b2565b50505050565b6109cb611bdc565b6109d45f612308565b565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610a4e5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6001600160a01b0384165f9081526066602090815260408083208584529091529020600101819055811580610aaa57506001600160a01b038084165f908152606960209081526040808320938816835260039093019052205482145b15610b8f576001600160a01b0384165f9081526066602090815260408083208584529091529020610ade9060020184612371565b506001600160a01b038085165f90815260666020908152604080832086845282528083209387168352600490930181528282208290556069905220610b239085612371565b506001600160a01b038381165f908152606960209081526040808320938816835260028401825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560038401825280832083905560049093019052908120556109bd565b6001600160a01b038084165f9081526069602090815260408083209388168352600290930190522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155610bed90836129af565b6001600160a01b038085165f908152606960209081526040808320938916835260049093019052205550505050565b6001600160a01b0381165f908152606960205260408120606091829182918291610c4590611bc1565b90505f8167ffffffffffffffff811115610c6157610c6161288f565b604051908082528060200260200182016040528015610c8a578160200160208202803683370190505b5090505f8267ffffffffffffffff811115610ca757610ca761288f565b604051908082528060200260200182016040528015610cd0578160200160208202803683370190505b5090505f8367ffffffffffffffff811115610ced57610ced61288f565b604051908082528060200260200182016040528015610d16578160200160208202803683370190505b5090505f8467ffffffffffffffff811115610d3357610d3361288f565b604051908082528060200260200182016040528015610d5c578160200160208202803683370190505b5090505f5b85811015610f48576001600160a01b038b165f908152606960205260409020610d8a9082611bca565b858281518110610d9c57610d9c61294b565b60200260200101906001600160a01b031690816001600160a01b03168152505060695f8c6001600160a01b03166001600160a01b031681526020019081526020015f206002015f868381518110610df557610df561294b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f9054906101000a900460ff16848281518110610e3b57610e3b61294b565b9115156020928302919091018201526001600160a01b038c165f908152606990915260408120865160039091019190879084908110610e7c57610e7c61294b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2054838281518110610eb657610eb661294b565b60200260200101818152505060695f8c6001600160a01b03166001600160a01b031681526020019081526020015f206004015f868381518110610efb57610efb61294b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2054828281518110610f3557610f3561294b565b6020908102919091010152600101610d61565b509299919850965090945092505050565b6001600160a01b0381165f908152606960205260408120610f7990611bc1565b5f03610fed5760405162461bcd60e51b815260206004820152602860248201527f696e76616c69642064656c656761746f72206f72206e6f2072656d61696e696e60448201527f67207265776172640000000000000000000000000000000000000000000000006064820152608401610433565b6001600160a01b0382165f90815260696020526040902061100e9084611c36565b61107f5760405162461bcd60e51b8152602060048201526024808201527f6e6f2072656d61696e696e6720726577617264206f66207468652064656c656760448201527f61746565000000000000000000000000000000000000000000000000000000006064820152608401610433565b6001600160a01b038083165f9081526069602090815260408083209387168352600390930190529081205481905b606554811015611227576001600160a01b038087165f9081526066602090815260408083208584528252808320938916835260049093019052205415611121576001600160a01b038087165f9081526066602090815260408083208584528252808320938916835260049093019052205491505b6001600160a01b0386165f90815260666020908152604080832084845290915290206001015415611175576001600160a01b0386165f90815260666020908152604080832084845290915290206001015492505b6001600160a01b0386165f90815260666020908152604080832084845290915290205483906111a59084906128e9565b6111af9190612900565b6111b99085612938565b6001600160a01b038087165f908152606960209081526040808320938b16835260029093019052205490945060ff16801561121b57506001600160a01b038086165f908152606960209081526040808320938a16835260049093019052205481145b611227576001016110ad565b50505092915050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146112a85760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6065545f036112f95760405162461bcd60e51b815260206004820152600e60248201527f6e6f74206d696e746564207965740000000000000000000000000000000000006044820152606401610433565b5f8115806113145750600160655461131191906129af565b82115b61131e578161132d565b600160655461132d91906129af565b90505f61133b858584611c57565b509050801561134e5761134e84826120b2565b5050505050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146113cd5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6001600160a01b0381165f908152606860205260409020546114315760405162461bcd60e51b815260206004820152601660248201527f6e6f20636f6d6d697373696f6e20746f20636c61696d000000000000000000006044820152606401610433565b6001600160a01b0381165f908152606860205260408120805491905561145782826120b2565b816001600160a01b03167f8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e4118260405161149291815260200190565b60405180910390a25050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146115165760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6001600160a01b0386165f90815260666020908152604080832087845290915290206001810183905561154c9060020186612385565b506001600160a01b038087165f90815260666020908152604080832088845282528083209389168352600490930190522083905580156115d4576001600160a01b0385165f9081526069602052604090206115a79087612385565b506001600160a01b038086165f908152606960209081526040808320938a16835260039093019052208490555b505050505050565b5f54610100900460ff16158080156115fa57505f54600160ff909116105b806116135750303b15801561161357505f5460ff166001145b6116855760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610433565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156116e1575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b0382166117375760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e6572206164647265737300000000000000000000006044820152606401610433565b61174082612308565b80156117a2575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461181e5760405162461bcd60e51b815260206004820152601c60248201527f6f6e6c79207265636f726420636f6e747261637420616c6c6f776564000000006044820152606401610433565b60658054905f61182d83612978565b919050555086600160655461184291906129af565b1461188f5760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642065706f636820696e646578000000000000000000000000006044820152606401610433565b828514801561189d57508085145b6118e95760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642064617461206c656e677468000000000000000000000000006044820152606401610433565b5f5b85811015611afc578484828181106119055761190561294b565b9050602002013560665f8989858181106119215761192161294b565b90506020020160208101906119369190612537565b6001600160a01b0316815260208082019290925260409081015f9081208c82529092528120919091556066908888848181106119745761197461294b565b90506020020160208101906119899190612537565b6001600160a01b0316815260208082019290925260409081015f9081208b82529092529020600101541580156119be57505f88115b15611a7f5760665f8888848181106119d8576119d861294b565b90506020020160208101906119ed9190612537565b6001600160a01b03166001600160a01b031681526020019081526020015f205f60018a611a1a91906129af565b81526020019081526020015f206001015460665f898985818110611a4057611a4061294b565b9050602002016020810190611a559190612537565b6001600160a01b0316815260208082019290925260409081015f9081208c82529092529020600101555b828282818110611a9157611a9161294b565b9050602002013560685f898985818110611aad57611aad61294b565b9050602002016020810190611ac29190612537565b6001600160a01b03166001600160a01b031681526020019081526020015f205f828254611aef9190612938565b90915550506001016118eb565b5050505050505050565b6001600160a01b0382165f908152606960205260408120611b279083611c36565b1590505b92915050565b611b39611bdc565b6001600160a01b038116611bb55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610433565b611bbe81612308565b50565b5f611b2b825490565b5f611bd58383612399565b9392505050565b6033546001600160a01b031633146109d45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610433565b6001600160a01b0381165f9081526001830160205260408120541515611bd5565b6001600160a01b0382165f9081526069602052604081208190611c7a9086611c36565b611cc65760405162461bcd60e51b815260206004820152601360248201527f6e6f2072656d61696e696e6720726577617264000000000000000000000000006044820152606401610433565b6001600160a01b038085165f9081526069602090815260408083209389168352600390930190522054831015611d3e5760405162461bcd60e51b815260206004820152601260248201527f616c6c2072657761726420636c61696d656400000000000000000000000000006044820152606401610433565b6001600160a01b038085165f9081526069602090815260408083209389168352600390930190529081205481905b858111611f7f576001600160a01b038089165f9081526066602090815260408083208584528252808320938b16835260049093019052205415611ddd576001600160a01b038089165f9081526066602090815260408083208584528252808320938b16835260049093019052205491505b6001600160a01b0388165f90815260666020908152604080832084845290915290206001015415611e31576001600160a01b0388165f90815260666020908152604080832084845290915290206001015492505b6001600160a01b0388165f9081526066602090815260408083208484529091529020548390611e619084906128e9565b611e6b9190612900565b611e759086612938565b6001600160a01b038089165f908152606960209081526040808320938d16835260029093019052205490955060ff168015611ed757506001600160a01b038088165f908152606960209081526040808320938c16835260049093019052205481145b15611f6d576001600160a01b0387165f90815260696020526040902060019450611f019089612371565b506001600160a01b038781165f908152606960209081526040808320938c16835260028401825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556003840182528083208390556004909301905290812055611f7f565b80611f7781612978565b915050611d6c565b50611f8b856001612938565b6001600160a01b038088165f908152606960209081526040808320938c16835260039093018152828220939093556066909252812090611fcc876001612938565b81526020019081526020015f206004015f876001600160a01b03166001600160a01b031681526020019081526020015f20545f03612052576001600160a01b0387165f9081526066602052604081208291612028886001612938565b815260208082019290925260409081015f9081206001600160a01b038b1682526004019092529020555b866001600160a01b0316866001600160a01b03167f7a84a08b02c91f3c62d572853f966fc799bbd121e8ad7833a4494ab8dcfcb40487876040516120a0929190918252602082015260400190565b60405180910390a35050935093915050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561212f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061215391906129c2565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af11580156121dd573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061220191906129d9565b506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561227f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a391906129c2565b90505f831180156122bc5750826122ba82846129af565b145b6109bd5760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610433565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f611bd5836001600160a01b0384166123bf565b5f611bd5836001600160a01b0384166124a2565b5f825f0182815481106123ae576123ae61294b565b905f5260205f200154905092915050565b5f8181526001830160205260408120548015612499575f6123e16001836129af565b85549091505f906123f4906001906129af565b9050818114612453575f865f0182815481106124125761241261294b565b905f5260205f200154905080875f0184815481106124325761243261294b565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080612464576124646129f4565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050611b2b565b5f915050611b2b565b5f8181526001830160205260408120546124e757508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155611b2b565b505f611b2b565b5080545f8255905f5260205f2090810190611bbe91905b80821115612518575f8155600101612505565b5090565b80356001600160a01b0381168114612532575f80fd5b919050565b5f60208284031215612547575f80fd5b611bd58261251c565b5f815180845260208085019450602084015f5b838110156125885781516001600160a01b031687529582019590820190600101612563565b509495945050505050565b5f815180845260208085019450602084015f5b83811015612588578151875295820195908201906001016125a6565b604081525f6125d46040830185612550565b82810360208401526125e68185612593565b95945050505050565b5f8060408385031215612600575f80fd5b6126098361251c565b946020939093013593505050565b5f805f806080858703121561262a575f80fd5b6126338561251c565b93506126416020860161251c565b93969395505050506040820135916060013590565b608081525f6126686080830187612550565b8281036020848101919091528651808352878201928201905f5b818110156126a0578451151583529383019391830191600101612682565b505084810360408601526126b48188612593565b9250505082810360608401526126ca8185612593565b979650505050505050565b5f80604083850312156126e6575f80fd5b6126ef8361251c565b91506126fd6020840161251c565b90509250929050565b5f805f60608486031215612718575f80fd5b6127218461251c565b925061272f6020850161251c565b9150604084013590509250925092565b8015158114611bbe575f80fd5b5f805f805f8060c08789031215612761575f80fd5b61276a8761251c565b95506127786020880161251c565b945060408701359350606087013592506080870135915060a087013561279d8161273f565b809150509295509295509295565b5f8083601f8401126127bb575f80fd5b50813567ffffffffffffffff8111156127d2575f80fd5b6020830191508360208260051b85010111156127ec575f80fd5b9250929050565b5f805f805f805f6080888a031215612809575f80fd5b87359650602088013567ffffffffffffffff80821115612827575f80fd5b6128338b838c016127ab565b909850965060408a013591508082111561284b575f80fd5b6128578b838c016127ab565b909650945060608a013591508082111561286f575f80fd5b5061287c8a828b016127ab565b989b979a50959850939692959293505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417611b2b57611b2b6128bc565b5f82612933577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b80820180821115611b2b57611b2b6128bc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036129a8576129a86128bc565b5060010190565b81810381811115611b2b57611b2b6128bc565b5f602082840312156129d2575f80fd5b5051919050565b5f602082840312156129e9575f80fd5b8151611bd58161273f565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a diff --git a/bindings/bin/l2staking_deployed.hex b/bindings/bin/l2staking_deployed.hex index d748c0f81..ba99aa29d 100644 --- a/bindings/bin/l2staking_deployed.hex +++ b/bindings/bin/l2staking_deployed.hex @@ -1 +1 @@ -0x608060405234801561000f575f80fd5b50600436106102ec575f3560e01c8063746c8ae111610192578063affed0e0116100e8578063e10911b111610093578063f2fde38b1161006e578063f2fde38b146106cf578063fad99f98146106e2578063fc6facc6146106ea575f80fd5b8063e10911b11461069e578063ed70b343146106a6578063f0261bc2146106c6575f80fd5b8063cce6cf9f116100c3578063cce6cf9f14610643578063d31d83d914610656578063d557714114610677575f80fd5b8063affed0e0146105f1578063b5d2e0dc146105fa578063c64814dd14610619575f80fd5b80638da5cb5b1161014857806391bd43a41161012357806391bd43a41461059e578063927ede2d146105bd57806396ab994d146105e4575f80fd5b80638da5cb5b146105445780638e21d5fb146105555780639168ae721461057c575f80fd5b80637b05afb5116101785780637b05afb5146104db578063831cfb58146104fa57806384d7d1d414610521575f80fd5b8063746c8ae1146104cb57806376671808146104d3575f80fd5b80633b8024211161024757806343352d61116101fd57806346cdc18a116101d857806346cdc18a146104a85780637046529b146104b0578063715018a6146104c3575f80fd5b806343352d611461047a578063439162b514610482578063459598a214610495575f80fd5b80633cb747bf1161022d5780633cb747bf146104065780633d9353fe1461044057806340b5c83714610467575f80fd5b80633b802421146103ea5780633c323a1b146103f3575f80fd5b8063174e31c4116102a75780632e787be3116102825780632e787be3146103ae57806330158eea146103b75780633385ccc2146103d7575f80fd5b8063174e31c41461037f57806319fac8fd146103925780632cc138be146103a5575f80fd5b80630eb573af116102d75780630eb573af1461032b5780630f3b70591461033e57806312a3e94714610376575f80fd5b806243b758146102f05780629c6f0c14610316575b5f80fd5b6103036102fe3660046145c5565b6106fd565b6040519081526020015b60405180910390f35b6103296103243660046145e0565b610723565b005b61032961033936600461462a565b610901565b61035161034c366004614641565b610a14565b604080516001600160a01b03909416845260208401929092529082015260600161030d565b610303609a5481565b61032961038d366004614641565b610a5c565b6103296103a036600461462a565b610bd4565b61030360985481565b61030360995481565b6103ca6103c53660046146b3565b610cf6565b60405161030d9190614753565b6103296103e53660046145c5565b610f1d565b610303609c5481565b610329610401366004614641565b611557565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b03909116815260200161030d565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61032961047536600461462a565b611be6565b6103ca611cf9565b6103296104903660046147f9565b611f15565b6104286104a336600461462a565b612446565b609d54610303565b6103296104be3660046145e0565b61246e565b6103296125c8565b6103296125db565b6103036128cb565b6103036104e93660046145c5565b60a06020525f908152604090205481565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61053461052f3660046145c5565b61293f565b604051901515815260200161030d565b6033546001600160a01b0316610428565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61058f61058a3660046145c5565b612969565b60405161030d93929190614867565b6103036105ac3660046145c5565b60a16020525f908152604090205481565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b6097546105349060ff1681565b61030360a55481565b6103036106083660046145c5565b609e6020525f908152604090205481565b610303610627366004614897565b60a360209081525f928352604080842090915290825290205481565b6103296106513660046148c3565b612a1b565b61066961066436600461490b565b612f87565b60405161030d929190614980565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b610329613115565b6106b96106b43660046145c5565b613499565b60405161030d91906149a0565b610303609b5481565b6103296106dd3660046145c5565b61352f565b6103296135bc565b6103296106f83660046148c3565b61366a565b6001600160a01b0381165f90815260a26020526040812061071d90613a35565b92915050565b61072b613a3e565b8160a55481146107825760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064015b60405180910390fd5b61078d836001614a2e565b60a555609e5f6107a060208501856145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20545f0361084257609d6107d560208401846145c5565b81546001810183555f9283526020808420909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039390931692909217909155609d5491609e91610828908601866145c5565b6001600160a01b0316815260208101919091526040015f20555b81609f5f61085360208401846145c5565b6001600160a01b0316815260208101919091526040015f206108758282614b5e565b50610885905060208301836145c5565b6001600160a01b03167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d60208401356108c16040860186614a41565b6040516108d093929190614cc5565b60405180910390a260975460ff161580156108ef5750609954609d5411155b156108fc576108fc613a98565b505050565b610909613a3e565b5f8111801561091a57506099548114155b61098c5760405162461bcd60e51b815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a650000000000000000000000000000000000000000000000000000000000006064820152608401610779565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff166109e157609d546109e5565b609c545b90505f60995482106109f9576099546109fb565b815b9050609b548114610a0e57610a0e613a98565b50505050565b60a4602052815f5260405f208181548110610a2d575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116935090915083565b610a64613c18565b6001600160a01b038216610b1a576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044015f604051808303815f87803b158015610aff575f80fd5b505af1158015610b11573d5f803e3d5ffd5b50505050610bc6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604481018490526064015f604051808303815f87803b158015610baf575f80fd5b505af1158015610bc1573d5f803e3d5ffd5b505050505b610bd06001606555565b5050565b335f908152609e6020526040902054610c2f5760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f776564000000000000000000000000006044820152606401610779565b6014811115610c805760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e00000000000000000000000000006044820152606401610779565b335f90815260a06020526040812082905560975460ff16610ca1575f610cb4565b610ca96128cb565b610cb4906001614a2e565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff811115610d1257610d12614aa2565b604051908082528060200260200182016040528015610d5e57816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081610d305790505b5090505f5b83811015610f15576040518060600160405280609f5f888886818110610d8b57610d8b614d18565b9050602002016020810190610da091906145c5565b6001600160a01b03908116825260208083019390935260409091015f908120549091168352910190609f90888886818110610ddd57610ddd614d18565b9050602002016020810190610df291906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f888886818110610e2f57610e2f614d18565b9050602002016020810190610e4491906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f206002018054610e7190614acf565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9d90614acf565b8015610ee85780601f10610ebf57610100808354040283529160200191610ee8565b820191905f5260205f20905b815481529060010190602001808311610ecb57829003601f168201915b5050505050815250828281518110610f0257610f02614d18565b6020908102919091010152600101610d63565b509392505050565b610f25613c18565b6001600160a01b0381165f90815260a360209081526040808320338452909152902054610f945760405162461bcd60e51b815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f000000000000000000006044820152606401610779565b6001600160a01b0381165f908152609e60205260408120546097549015919060ff16610fc0575f610fd3565b610fc86128cb565b610fd3906001614a2e565b6097549091505f9060ff168015610fe8575082155b610ff25781610fff565b609a54610fff9083614a2e565b604080516060810182526001600160a01b038781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c51600390920201805473ffffffffffffffffffffffffffffffffffffffff191691909b16178a558251908a015551600290980197909755908452908252829055925191815260a1909252928120805494955091936110b6908490614d45565b90915550506001600160a01b0385165f90815260a2602052604090206110dc9033613c78565b506001600160a01b0385165f908152609e602052604090205484158015611105575060975460ff165b80156111125750609c5481105b15611373576001600160a01b0386165f908152609e602052604081205461113b90600190614d45565b90505b6001609c5461114d9190614d45565b8110156113715760a15f609d838154811061116a5761116a614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a190609d61119f856001614a2e565b815481106111af576111af614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611369575f609d82815481106111ed576111ed614d18565b5f918252602090912001546001600160a01b03169050609d611210836001614a2e565b8154811061122057611220614d18565b5f91825260209091200154609d80546001600160a01b03909216918490811061124b5761124b614d18565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905580609d61128e846001614a2e565b8154811061129e5761129e614d18565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790556112de826001614a2e565b609e5f609d85815481106112f4576112f4614d18565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055611323826002614a2e565b609e5f609d611333866001614a2e565b8154811061134357611343614d18565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b60010161113e565b505b8415801561139657506001600160a01b0386165f90815260a16020526040902054155b156113b3576001609c5f8282546113ad9190614d45565b90915550505b6001600160a01b038681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b158015611454575f80fd5b505af1158015611466573d5f803e3d5ffd5b505050506114713390565b6001600160a01b0316866001600160a01b03167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c846020015187876040516114cc939291909283526020830191909152604082015260600190565b60405180910390a3841580156114e4575060975460ff165b80156114f25750609b548111155b80156115385750609b546001600160a01b0387165f908152609e602052604090205411806115385750609c546001600160a01b0387165f908152609e6020526040902054115b1561154557611545613a98565b50505050506115546001606555565b50565b6001600160a01b0382165f908152609e602052604090205482906115bd5760405162461bcd60e51b815260206004820152600a60248201527f6e6f74207374616b6572000000000000000000000000000000000000000000006044820152606401610779565b6115c5613c18565b5f82116116145760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e740000000000000000000000006044820152606401610779565b61161e3384613c93565b1561166b5760405162461bcd60e51b815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d6564000000000000000000006044820152606401610779565b6001600160a01b0383165f90815260a3602090815260408083203384529091529020546116e95761169c3384613d1c565b156116e95760405162461bcd60e51b815260206004820152601060248201527f72657761726420756e636c61696d6564000000000000000000000000000000006044820152606401610779565b6001600160a01b0383165f90815260a1602052604081208054849290611710908490614a2e565b90915550506001600160a01b0383165f90815260a36020908152604080832033845290915281208054849290611747908490614a2e565b90915550506001600160a01b0383165f90815260a26020526040902061176d9033613dd1565b506001600160a01b0383165f90815260a160205260409020548290036117a5576001609c5f82825461179f9190614a2e565b90915550505b6001600160a01b0383165f908152609e602052604090205460975460ff1680156117cf5750600181115b15611a15575f6117e0600183614d45565b90505b8015611a135760a15f609d6117f9600185614d45565b8154811061180957611809614d18565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d848154811061185a5761185a614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611a01575f609d611892600184614d45565b815481106118a2576118a2614d18565b5f91825260209091200154609d80546001600160a01b03909216925090839081106118cf576118cf614d18565b5f918252602090912001546001600160a01b0316609d6118f0600185614d45565b8154811061190057611900614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d838154811061193f5761193f614d18565b5f9182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393909316929092179091558290609e90609d611986600185614d45565b8154811061199657611996614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040019020556119c5826001614a2e565b609e5f609d85815481106119db576119db614d18565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80611a0b81614d58565b9150506117e3565b505b6097545f9060ff16611a27575f611a3a565b611a2f6128cb565b611a3a906001614a2e565b6001600160a01b0386165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a36001600160a01b038581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b158015611b6e575f80fd5b505af1158015611b80573d5f803e3d5ffd5b50505050611b95611b8e3390565b3086613de5565b60975460ff168015611ba85750609b5482115b8015611bcd57506099546001600160a01b0386165f908152609e602052604090205411155b15611bda57611bda613a98565b50506108fc6001606555565b611bee613a3e565b60975460ff1615611c415760405162461bcd60e51b815260206004820152601660248201527f72657761726420616c72656164792073746172746564000000000000000000006044820152606401610779565b4281118015611c5a5750611c586201518082614d9a565b155b8015611c6857506098548114155b611cb45760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d65000000000000006044820152606401610779565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff811115611d1957611d19614aa2565b604051908082528060200260200182016040528015611d6557816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081611d375790505b5090505f5b609d54811015611f0f576040518060600160405280609f5f609d8581548110611d9557611d95614d18565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409092018120549092168352609d80549390910192609f92919086908110611de157611de1614d18565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f609d8581548110611e3a57611e3a614d18565b5f9182526020808320909101546001600160a01b0316835282019290925260400190206002018054611e6b90614acf565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9790614acf565b8015611ee25780601f10611eb957610100808354040283529160200191611ee2565b820191905f5260205f20905b815481529060010190602001808311611ec557829003601f168201915b5050505050815250828281518110611efc57611efc614d18565b6020908102919091010152600101611d6a565b50919050565b5f54610100900460ff1615808015611f3357505f54600160ff909116105b80611f4c5750303b158015611f4c57505f5460ff166001145b611fbe5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610779565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561201a575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b0387166120705760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e6572206164647265737300000000000000000000006044820152606401610779565b5f86116120e55760405162461bcd60e51b815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f20300000000000000000000000000000000000000000000000000000000000006064820152608401610779565b5f85116121345760405162461bcd60e51b815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f636873000000006044820152606401610779565b428411801561214d575061214b6201518085614d9a565b155b6121995760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d65000000000000006044820152606401610779565b816121e65760405162461bcd60e51b815260206004820152601760248201527f696e76616c696420696e697469616c207374616b6572730000000000000000006044820152606401610779565b6121ef8761404b565b6121f76140a9565b6099869055609a8590556098849055609b8290555f5b609b548110156123685783838281811061222957612229614d18565b905060200281019061223b9190614dad565b609f5f86868581811061225057612250614d18565b90506020028101906122629190614dad565b6122709060208101906145c5565b6001600160a01b0316815260208101919091526040015f206122928282614b5e565b905050609d8484838181106122a9576122a9614d18565b90506020028101906122bb9190614dad565b6122c99060208101906145c5565b8154600180820184555f938452602090932001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055612312908290614a2e565b609e5f86868581811061232757612327614d18565b90506020028101906123399190614dad565b6123479060208101906145c5565b6001600160a01b0316815260208101919091526040015f205560010161220d565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a1801561243d575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d8181548110612455575f80fd5b5f918252602090912001546001600160a01b0316905081565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561255657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612527573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061254b9190614de9565b6001600160a01b0316145b61072b5760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401610779565b6125d0613a3e565b6125d95f61404b565b565b6125e3613a3e565b60985442101561265a5760405162461bcd60e51b8152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d65000000000000000000000000000000000000000000000000000000006064820152608401610779565b5f609c54116126ab5760405162461bcd60e51b815260206004820152600e60248201527f6e6f6e652063616e6469646174650000000000000000000000000000000000006044820152606401610779565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d54811015612868575f5b8181101561285f5760a15f609d838154811061270457612704614d18565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d858154811061275557612755614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612857575f609d828154811061279357612793614d18565b5f91825260209091200154609d80546001600160a01b03909216925090849081106127c0576127c0614d18565b5f91825260209091200154609d80546001600160a01b0390921691849081106127eb576127eb614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d848154811061282a5761282a614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b6001016126e6565b506001016126da565b505f5b609d548110156128c257612880816001614a2e565b609e5f609d848154811061289657612896614d18565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205560010161286b565b506125d9613a98565b5f60985442101561291e5760405162461bcd60e51b815260206004820152601960248201527f726577617264206973206e6f74207374617274656420796574000000000000006044820152606401610779565b62015180609854426129309190614d45565b61293a9190614e04565b905090565b6001600160a01b0381165f90815260a360209081526040808320338452909152812054151561071d565b609f6020525f90815260409020805460018201546002830180546001600160a01b0390931693919261299a90614acf565b80601f01602080910402602001604051908101604052809291908181526020018280546129c690614acf565b8015612a115780601f106129e857610100808354040283529160200191612a11565b820191905f5260205f20905b8154815290600101906020018083116129f457829003601f168201915b5050505050905083565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015612b0357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ad4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612af89190614de9565b6001600160a01b0316145b612b755760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401610779565b8260a5548114612bc75760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610779565b612bd2846001614a2e565b60a5555f805b83811015612f3857609b54609e5f878785818110612bf857612bf8614d18565b9050602002016020810190612c0d91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205411612c3757600191505b5f609e5f878785818110612c4d57612c4d614d18565b9050602002016020810190612c6291906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115612eba575f6001609e5f888886818110612ca057612ca0614d18565b9050602002016020810190612cb591906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f2054612cdf9190614d45565b90505b609d54612cf190600190614d45565b811015612dc357609d612d05826001614a2e565b81548110612d1557612d15614d18565b5f91825260209091200154609d80546001600160a01b039092169183908110612d4057612d40614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d8481548110612d8357612d83614d18565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190612db6908490614d45565b9091555050600101612ce2565b50609d805480612dd557612dd5614e17565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609e90868684818110612e1a57612e1a614d18565b9050602002016020810190612e2f91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f878785818110612e6757612e67614d18565b9050602002016020810190612e7c91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115612eba576001609c5f828254612eb49190614d45565b90915550505b609f5f868684818110612ecf57612ecf614d18565b9050602002016020810190612ee491906145c5565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590612f2e6002830182614567565b5050600101612bd8565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618484604051612f6a929190614e44565b60405180910390a18015612f8057612f80613a98565b5050505050565b5f60605f8411612fd95760405162461bcd60e51b815260206004820152601160248201527f696e76616c696420706167652073697a650000000000000000000000000000006044820152606401610779565b6001600160a01b0385165f90815260a260205260409020612ff990613a35565b91508367ffffffffffffffff81111561301457613014614aa2565b60405190808252806020026020018201604052801561303d578160200160208202803683370190505b5090505f61304b8486614e91565b90505f600161305a8682614a2e565b6130649088614e91565b61306e9190614d45565b905061307b600185614d45565b8111156130905761308d600185614d45565b90505b815f5b828211613109576130c7826130a781614ea8565b6001600160a01b038c165f90815260a2602052604090209094509061412d565b85826130d281614ea8565b9350815181106130e4576130e4614d18565b60200260200101906001600160a01b031690816001600160a01b031681525050613093565b50505050935093915050565b61311d613c18565b335f90815260a46020526040812054815b818110156134335760975460ff16158061317e575061314b6128cb565b335f90815260a46020526040902080548390811061316b5761316b614d18565b905f5260205f2090600302016002015411155b1561342157335f90815260a4602052604090208054829081106131a3576131a3614d18565b905f5260205f20906003020160010154836131be9190614a2e565b335f90815260a46020526040812080549295509091839081106131e3576131e3614d18565b5f91825260208220600390910201546001600160a01b0316915060a4816132073390565b6001600160a01b03166001600160a01b031681526020019081526020015f20838154811061323757613237614d18565b905f5260205f2090600302016002015490505f60a45f6132543390565b6001600160a01b03166001600160a01b031681526020019081526020015f20848154811061328457613284614d18565b905f5260205f2090600302016001015490506001856132a39190614d45565b84101561336857335f90815260a4602052604090206132c3600187614d45565b815481106132d3576132d3614d18565b905f5260205f20906003020160a45f6132e93390565b6001600160a01b03166001600160a01b031681526020019081526020015f20858154811061331957613319614d18565b5f91825260209091208254600390920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091178155600180830154908201556002918201549101555b335f90815260a46020526040902080548061338557613385614e17565b5f8281526020812060035f1990930192830201805473ffffffffffffffffffffffffffffffffffffffff19168155600181810183905560029091019190915591556133d09086614d45565b604080518481526020810184905291965033916001600160a01b038616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a350505061312e565b61342c816001614a2e565b905061312e565b505f82116134835760405162461bcd60e51b815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d0000000000000000006044820152606401610779565b61348d3383614138565b50506125d96001606555565b6001600160a01b0381165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613524575f848152602090819020604080516060810182526003860290920180546001600160a01b03168352600180820154848601526002909101549183019190915290835290920191016134d0565b505050509050919050565b613537613a3e565b6001600160a01b0381166135b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610779565b6115548161404b565b6135c4613c18565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b15801561364a575f80fd5b505af115801561365c573d5f803e3d5ffd5b505050506125d96001606555565b613672613a3e565b8260a55481146136c45760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610779565b6136cf846001614a2e565b60a5555f805b83811015612f3857609b54609e5f8787858181106136f5576136f5614d18565b905060200201602081019061370a91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20541161373457600191505b5f609e5f87878581811061374a5761374a614d18565b905060200201602081019061375f91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205411156139b7575f6001609e5f88888681811061379d5761379d614d18565b90506020020160208101906137b291906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20546137dc9190614d45565b90505b609d546137ee90600190614d45565b8110156138c057609d613802826001614a2e565b8154811061381257613812614d18565b5f91825260209091200154609d80546001600160a01b03909216918390811061383d5761383d614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d848154811061388057613880614d18565b5f9182526020808320909101546001600160a01b03168352820192909252604001812080549091906138b3908490614d45565b90915550506001016137df565b50609d8054806138d2576138d2614e17565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609e9086868481811061391757613917614d18565b905060200201602081019061392c91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f87878581811061396457613964614d18565b905060200201602081019061397991906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205411156139b7576001609c5f8282546139b19190614d45565b90915550505b609f5f8686848181106139cc576139cc614d18565b90506020020160208101906139e191906145c5565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590613a2b6002830182614567565b50506001016136d5565b5f61071d825490565b6033546001600160a01b031633146125d95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610779565b60995460975460ff1615613abc57609954609c541015613ab75750609c545b613acd565b609954609d541015613acd5750609d545b5f8167ffffffffffffffff811115613ae757613ae7614aa2565b604051908082528060200260200182016040528015613b10578160200160208202803683370190505b5090505f5b82811015613b7d57609d8181548110613b3057613b30614d18565b905f5260205f20015f9054906101000a90046001600160a01b0316828281518110613b5d57613b5d614d18565b6001600160a01b0390921660209283029190910190910152600101613b15565b506040517f9b8201a40000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b8201a490613be3908490600401614ec0565b5f604051808303815f87803b158015613bfa575f80fd5b505af1158015613c0c573d5f803e3d5ffd5b50509151609b55505050565b600260655403613c6a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610779565b6002606555565b6001606555565b5f613c8c836001600160a01b038416614396565b9392505050565b5f805b6001600160a01b0384165f90815260a46020526040902054811015613d13576001600160a01b038481165f90815260a46020526040902080549185169183908110613ce357613ce3614d18565b5f9182526020909120600390910201546001600160a01b031603613d0b57600191505061071d565b600101613c96565b505f9392505050565b6040517fde6ac9330000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa158015613da5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613dc99190614ed2565b159392505050565b5f613c8c836001600160a01b038416614479565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613e66573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613e8a9190614ef1565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015613f1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613f409190614ed2565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613fc2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613fe69190614ef1565b90505f83118015613fff575082613ffd8383614d45565b145b612f805760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610779565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff166141255760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610779565b6125d96144c5565b5f613c8c8383614541565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156141b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141dd9190614ef1565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015614267573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061428b9190614ed2565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561430d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906143319190614ef1565b90505f8311801561434a5750826143488383614d45565b145b610a0e5760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610779565b5f8181526001830160205260408120548015614470575f6143b8600183614d45565b85549091505f906143cb90600190614d45565b905081811461442a575f865f0182815481106143e9576143e9614d18565b905f5260205f200154905080875f01848154811061440957614409614d18565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061443b5761443b614e17565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061071d565b5f91505061071d565b5f8181526001830160205260408120546144be57508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561071d565b505f61071d565b5f54610100900460ff16613c715760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610779565b5f825f01828154811061455657614556614d18565b905f5260205f200154905092915050565b50805461457390614acf565b5f825580601f10614582575050565b601f0160209004905f5260205f209081019061155491905b808211156145ad575f815560010161459a565b5090565b6001600160a01b0381168114611554575f80fd5b5f602082840312156145d5575f80fd5b8135613c8c816145b1565b5f80604083850312156145f1575f80fd5b82359150602083013567ffffffffffffffff81111561460e575f80fd5b83016060818603121561461f575f80fd5b809150509250929050565b5f6020828403121561463a575f80fd5b5035919050565b5f8060408385031215614652575f80fd5b823561465d816145b1565b946020939093013593505050565b5f8083601f84011261467b575f80fd5b50813567ffffffffffffffff811115614692575f80fd5b6020830191508360208260051b85010111156146ac575f80fd5b9250929050565b5f80602083850312156146c4575f80fd5b823567ffffffffffffffff8111156146da575f80fd5b6146e68582860161466b565b90969095509350505050565b5f81518084525f5b81811015614716576020818501810151868301820152016146fa565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b838110156147eb578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b03168452878101518885015286015160608785018190526147d7818601836146f2565b96890196945050509086019060010161477a565b509098975050505050505050565b5f805f805f8060a0878903121561480e575f80fd5b8635614819816145b1565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115614849575f80fd5b61485589828a0161466b565b979a9699509497509295939492505050565b6001600160a01b0384168152826020820152606060408201525f61488e60608301846146f2565b95945050505050565b5f80604083850312156148a8575f80fd5b82356148b3816145b1565b9150602083013561461f816145b1565b5f805f604084860312156148d5575f80fd5b83359250602084013567ffffffffffffffff8111156148f2575f80fd5b6148fe8682870161466b565b9497909650939450505050565b5f805f6060848603121561491d575f80fd5b8335614928816145b1565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b838110156149755781516001600160a01b031687529582019590820190600101614950565b509495945050505050565b828152604060208201525f614998604083018461493d565b949350505050565b602080825282518282018190525f919060409081850190868401855b828110156149f457815180516001600160a01b03168552868101518786015285015185850152606090930192908501906001016149bc565b5091979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561071d5761071d614a01565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614a74575f80fd5b83018035915067ffffffffffffffff821115614a8e575f80fd5b6020019150368190038213156146ac575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c90821680614ae357607f821691505b602082108103611f0f577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f8211156108fc57805f5260205f20601f840160051c81016020851015614b3f5750805b601f840160051c820191505b81811015612f80575f8155600101614b4b565b8135614b69816145b1565b6001600160a01b03811673ffffffffffffffffffffffffffffffffffffffff1983541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112614bd5575f80fd5b8501803567ffffffffffffffff811115614bed575f80fd5b8036038483011315614bfd575f80fd5b614c1181614c0b8554614acf565b85614b1a565b5f601f821160018114614c44575f8315614c2d57508382018601355b5f19600385901b1c1916600184901b178555614cba565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015614c9057868501890135825593880193908901908801614c71565b5084821015614cae575f1960f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8181038181111561071d5761071d614a01565b5f81614d6657614d66614a01565b505f190190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82614da857614da8614d6d565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112614ddf575f80fd5b9190910192915050565b5f60208284031215614df9575f80fd5b8151613c8c816145b1565b5f82614e1257614e12614d6d565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b86811015614e86578235614e6b816145b1565b6001600160a01b031682529183019190830190600101614e58565b509695505050505050565b808202811582820484141761071d5761071d614a01565b5f5f198203614eb957614eb9614a01565b5060010190565b602081525f613c8c602083018461493d565b5f60208284031215614ee2575f80fd5b81518015158114613c8c575f80fd5b5f60208284031215614f01575f80fd5b505191905056fea164736f6c6343000818000a +0x608060405234801561000f575f80fd5b5060043610610339575f3560e01c8063746c8ae1116101b3578063a61bb764116100f3578063d31d83d91161009e578063f2fde38b11610079578063f2fde38b146107c1578063fad99f98146107d4578063fc6facc6146107dc578063ff4840cd146107ef575f80fd5b8063d31d83d914610770578063d557714114610791578063f0261bc2146107b8575f80fd5b8063b7a587bf116100ce578063b7a587bf14610704578063bf2dca0a14610732578063cce6cf9f1461075d575f80fd5b8063a61bb764146106c9578063affed0e0146106dc578063b5d2e0dc146106e5575f80fd5b80638da5cb5b1161015e57806391c05b0b1161013957806391c05b0b1461066f578063927ede2d1461068257806396ab994d146106a95780639d51c3b9146106b6575f80fd5b80638da5cb5b146106155780638e21d5fb146106265780639168ae721461064d575f80fd5b80637c7e8bd21161018e5780637c7e8bd2146105b8578063831cfb58146105cb57806384d7d1d4146105f2575f80fd5b8063746c8ae114610582578063766718081461058a5780637b05afb514610592575f80fd5b80633434735f1161027e578063439162b5116102295780634d99dd16116102045780634d99dd16146105415780636bd8f804146105545780637046529b14610567578063715018a61461057a575f80fd5b8063439162b514610513578063459598a21461052657806346cdc18a14610539575f80fd5b80633cb747bf116102595780633cb747bf146104d257806340b5c837146104f857806343352d611461050b575f80fd5b80633434735f146104605780633b2713c51461049f5780633b802421146104c9575f80fd5b806313f22527116102e9578063201018fb116102c4578063201018fb1461041b5780632cc138be1461042e5780632e787be31461043757806330158eea14610440575f80fd5b806313f22527146103ba57806319fac8fd146103cd5780631d5611b8146103e0575f80fd5b80630321731c116103195780630321731c1461038b5780630eb573af1461039e57806312a3e947146103b1575f80fd5b806243b7581461033d5780629c6f0c14610363578063026e402b14610378575b5f80fd5b61035061034b3660046154c4565b610802565b6040519081526020015b60405180910390f35b6103766103713660046154df565b610828565b005b610376610386366004615529565b6109eb565b6103506103993660046154c4565b610f87565b6103766103ac366004615553565b610fc1565b610350609a5481565b6103506103c83660046154c4565b611096565b6103766103db366004615553565b611158565b6104066103ee3660046154c4565b60a36020525f90815260409020805460019091015482565b6040805192835260208301919091520161035a565b610350610429366004615553565b611251565b61035060985481565b61035060995481565b61045361044e3660046155b2565b6113f5565b60405161035a9190615652565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161035a565b6103506104ad3660046156f8565b60a460209081525f928352604080842090915290825290205481565b610350609c5481565b7f0000000000000000000000000000000000000000000000000000000000000000610487565b610376610506366004615553565b611614565b6104536116fb565b610376610521366004615724565b611917565b610487610534366004615553565b611dd8565b609e54610350565b61037661054f366004615529565b611e00565b610376610562366004615792565b612561565b6103766105753660046154df565b613045565b6103766131b9565b6103766131cc565b61035061345a565b6104066105a03660046154c4565b60a16020525f90815260409020805460019091015482565b6103506105c63660046154c4565b6134b8565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6106056106003660046154c4565b6134d5565b604051901515815260200161035a565b6033546001600160a01b0316610487565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b61066061065b3660046154c4565b6134ff565b60405161035a939291906157d0565b61037661067d366004615553565b6135b1565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6097546106059060ff1681565b6103506106c43660046156f8565b61380d565b6103506106d7366004615529565b61381f565b610350609d5481565b6103506106f33660046154c4565b609f6020525f908152604090205481565b610717610712366004615529565b613957565b6040805182518152602092830151928101929092520161035a565b6103506107403660046154c4565b6001600160a01b03165f90815260a1602052604090206001015490565b61037661076b366004615800565b6139b8565b61078361077e366004615848565b613f1a565b60405161035a9291906158bd565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b610350609b5481565b6103766107cf3660046154c4565b614092565b61037661413c565b6103766107ea366004615800565b6141ee565b6103766107fd3660046154c4565b61459c565b6001600160a01b0381165f90815260a26020526040812061082290614651565b92915050565b61083061465a565b81609d54811461086c576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61087783600161590a565b609d55609f5f61088a60208501856154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f20545f0361092c57609e6108bf60208401846154c4565b81546001810183555f9283526020808420909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039390931692909217909155609e5491609f91610912908601866154c4565b6001600160a01b0316815260208101919091526040015f20555b8160a05f61093d60208401846154c4565b6001600160a01b0316815260208101919091526040015f2061095f8282615a3a565b5061096f905060208301836154c4565b6001600160a01b03167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d60208401356109ab604086018661591d565b6040516109ba93929190615ba1565b60405180910390a260975460ff161580156109d95750609954609e5411155b156109e6576109e66146ce565b505050565b335f908152609f6020526040812054839103610a33576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a3b61484e565b815f03610a74576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a95336001600160a01b0385165f90815260a260205260409020906148c1565b5060975460ff16610b23576001600160a01b0383165f90815260a46020908152604080832033845290915281208054849290610ad290849061590a565b90915550506001600160a01b0383165f90815260a3602052604081208054849290610afe90849061590a565b90915550506001600160a01b0383165f90815260a36020526040902080546001909101555b6001600160a01b0383165f90815260a3602090815260408083206001810154905460a48452828520338652909352908320549092829003610b9a576001600160a01b0386165f81815260a460209081526040808320338452825280832089905592825260a390522060018101869055859055610c3b565b81610ba58487615bf4565b610baf9190615c38565b610bb9908261590a565b6001600160a01b0387165f81815260a46020908152604080832033845282528083209490945591815260a39091529081208054879290610bfa90849061590a565b90915550829050610c0b8487615bf4565b610c159190615c38565b610c1f908461590a565b6001600160a01b0387165f90815260a360205260409020600101555b6001600160a01b0386165f90815260a36020526040902054859003610c72576001609c5f828254610c6c919061590a565b90915550505b6001600160a01b0386165f908152609f602052604090205460975460ff168015610c9c5750600181115b15610ed1575f610cad600183615c4b565b90505b8015610ecf5760a35f609e610cc6600185615c4b565b81548110610cd657610cd6615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001812054609e8054919260a39290919085908110610d1657610d16615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115610ebd575f609e610d4e600184615c4b565b81548110610d5e57610d5e615c5e565b5f91825260209091200154609e80546001600160a01b0390921692509083908110610d8b57610d8b615c5e565b5f918252602090912001546001600160a01b0316609e610dac600185615c4b565b81548110610dbc57610dbc615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609e8381548110610dfb57610dfb615c5e565b5f9182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393909316929092179091558290609f90609e610e42600185615c4b565b81548110610e5257610e52615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055610e8182600161590a565b609f5f609e8581548110610e9757610e97615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80610ec781615c8b565b915050610cb0565b505b6001600160a01b0387165f81815260a360209081526040918290205482518a815291820181905292339290917f24d7bda8602b916d64417f0dbfe2e2e88ec9b1157bd9f596dfdb91ba26624e04910160405180910390a3610f333330896148d5565b60975460ff168015610f465750609b5482115b8015610f6b57506099546001600160a01b0389165f908152609f602052604090205411155b15610f7857610f786146ce565b50505050506109e66001606555565b6001600160a01b0381165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b03610822565b610fc961465a565b801580610fd7575060995481145b1561100e576040517f383a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff1661106357609e54611067565b609c545b90505f609954821061107b5760995461107d565b815b9050609b548114611090576110906146ce565b50505050565b6001600160a01b0381165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b0381805b82811015611150576001600160a01b0385165f90815260a6602052604081206110f79083614b61565b5f81815260a56020908152604091829020825180840190935280548352600101549082018190529192509061112a61345a565b1061113f5761113884615ca0565b9350611146565b5050611150565b50506001016110ce565b509392505050565b335f818152609f6020526040812054900361119f576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60148211156111da576040517f6e11528c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260a1602081815260408084208054825180840184528981526001830180548287019081529789905295855251909155935190925581518681529081018390529192917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a2505050565b5f61125a61484e565b6112a260a65f335b6001600160a01b03166001600160a01b031681526020019081526020015f2054600f81810b700100000000000000000000000000000000909204900b0390565b5f036112da576040517f5f013ef800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8115806112f157506112ee60a65f33611262565b82115b6112fb5781611307565b61130760a65f33611262565b91505f5b82156113a057335f90815260a66020526040812061132890614bf6565b5f81815260a56020908152604091829020825180840190935280548352600101549082018190529192509061135b61345a565b10156113685750506113a0565b335f90815260a66020526040902061137f90614c6e565b50805161138c908461590a565b925061139785615c8b565b9450505061130b565b805f036113d9576040517f3cc5dedc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113e4335b82614d29565b90506113f06001606555565b919050565b60605f8267ffffffffffffffff8111156114115761141161597e565b60405190808252806020026020018201604052801561145d57816020015b60408051606080820183525f80835260208301529181019190915281526020019060019003908161142f5790505b5090505f5b8381101561115057604051806060016040528060a05f88888681811061148a5761148a615c5e565b905060200201602081019061149f91906154c4565b6001600160a01b03908116825260208083019390935260409091015f90812054909116835291019060a0908888868181106114dc576114dc615c5e565b90506020020160208101906114f191906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f2060010154815260200160a05f88888681811061152e5761152e615c5e565b905060200201602081019061154391906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f206002018054611570906159ab565b80601f016020809104026020016040519081016040528092919081815260200182805461159c906159ab565b80156115e75780601f106115be576101008083540402835291602001916115e7565b820191905f5260205f20905b8154815290600101906020018083116115ca57829003601f168201915b505050505081525082828151811061160157611601615c5e565b6020908102919091010152600101611462565b61161c61465a565b60975460ff1615611659576040517fbd51da0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b428111158061167357506116706201518082615cb8565b15155b8061167f575060985481145b156116b6576040517fde16b26100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609e546060905f9067ffffffffffffffff81111561171b5761171b61597e565b60405190808252806020026020018201604052801561176757816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816117395790505b5090505f5b609e5481101561191157604051806060016040528060a05f609e858154811061179757611797615c5e565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409092018120549092168352609e8054939091019260a0929190869081106117e3576117e3615c5e565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f2060010154815260200160a05f609e858154811061183c5761183c615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020600201805461186d906159ab565b80601f0160208091040260200160405190810160405280929190818152602001828054611899906159ab565b80156118e45780601f106118bb576101008083540402835291602001916118e4565b820191905f5260205f20905b8154815290600101906020018083116118c757829003601f168201915b50505050508152508282815181106118fe576118fe615c5e565b602090810291909101015260010161176c565b50919050565b5f54610100900460ff161580801561193557505f54600160ff909116105b8061194e5750303b15801561194e57505f5460ff166001145b6119df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611a3b575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b038716611a7b576040517fee77070400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855f03611ab4576040517f2da55d0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845f03611aed576040517f7d8ad8a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4284111580611b075750611b046201518085615cb8565b15155b15611b3e576040517fde16b26100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f829003611b78576040517fbb01aad100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b8187614fa6565b611b89615004565b6099869055609a8590556098849055609b8290555f5b609b54811015611cfa57838382818110611bbb57611bbb615c5e565b9050602002810190611bcd9190615ccb565b60a05f868685818110611be257611be2615c5e565b9050602002810190611bf49190615ccb565b611c029060208101906154c4565b6001600160a01b0316815260208101919091526040015f20611c248282615a3a565b905050609e848483818110611c3b57611c3b615c5e565b9050602002810190611c4d9190615ccb565b611c5b9060208101906154c4565b8154600180820184555f938452602090932001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055611ca490829061590a565b609f5f868685818110611cb957611cb9615c5e565b9050602002810190611ccb9190615ccb565b611cd99060208101906154c4565b6001600160a01b0316815260208101919091526040015f2055600101611b9f565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a18015611dcf575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609e8181548110611de7575f80fd5b5f918252602090912001546001600160a01b0316905081565b611e0861484e565b805f03611e41576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e4b82336150a2565b5f03611e83576040517f857ad50500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611e8e83336150a2565b1015611ec6576040517f08c2348a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f908152609f60205260408120546097549015919060ff16611ef2575f611f00565b609a54611f0090600161590a565b60408051808201909152848152602081018290529091505f33611f22336150f2565b60405160609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208301526034820152605401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301205f81815260a590935291205490915015611fd6576040517fdeeb052700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81815260a560209081526040808320855181558583015160019182015533845260a68352818420805470010000000000000000000000000000000090819004600f0b8087528284019095529290942085905583546fffffffffffffffffffffffffffffffff90811693909101160217905560975460ff166120d5576001600160a01b0386165f90815260a46020908152604080832033845290915281208054879290612084908490615c4b565b90915550506001600160a01b0386165f90815260a36020526040812080548792906120b0908490615c4b565b90915550506001600160a01b0386165f90815260a36020526040902080546001909101555b6001600160a01b0386165f90815260a3602090815260408083206001810154905460a4845282852033865290935292205481612111848a615bf4565b61211b9190615c38565b6121259082615c4b565b6001600160a01b038a165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548a9290612166908490615c4b565b90915550829050612177848a615bf4565b6121819190615c38565b61218b9084615c4b565b6001600160a01b038a165f90815260a36020908152604080832060010193909355609f90522054871580156121c2575060975460ff165b80156121cf5750609c5481105b15612430576001600160a01b038a165f908152609f60205260408120546121f890600190615c4b565b90505b6001609c5461220a9190615c4b565b81101561242e5760a35f609e838154811061222757612227615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a390609e61225c85600161590a565b8154811061226c5761226c615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612426575f609e82815481106122aa576122aa615c5e565b5f918252602090912001546001600160a01b03169050609e6122cd83600161590a565b815481106122dd576122dd615c5e565b5f91825260209091200154609e80546001600160a01b03909216918490811061230857612308615c5e565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905580609e61234b84600161590a565b8154811061235b5761235b615c5e565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905561239b82600161590a565b609f5f609e85815481106123b1576123b1615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020556123e082600261590a565b609f5f609e6123f086600161590a565b8154811061240057612400615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b6001016121fb565b505b8715801561245357506001600160a01b038a165f90815260a36020526040902054155b15612470576001609c5f82825461246a9190615c4b565b90915550505b6001600160a01b038a165f90815260a3602052604090205433604080518c8152602081018490529081018a90526001600160a01b03918216918d16907f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c9060600160405180910390a3881580156124e9575060975460ff165b80156124f75750609b548211155b801561253d5750609b546001600160a01b038c165f908152609f6020526040902054118061253d5750609c546001600160a01b038c165f908152609f6020526040902054115b1561254a5761254a6146ce565b50505050505050505061255d6001606555565b5050565b335f908152609f60205260408120548491036125a9576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f908152609f60205260408120548491036125f1576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6125f961484e565b825f03612632576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61263c85336150a2565b5f03612674576040517f857ad50500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261267f86336150a2565b10156126b7576040517f08c2348a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385165f908152609f602052604081205460975490159060ff1661275f576001600160a01b0387165f90815260a4602090815260408083203384529091528120805487929061270e908490615c4b565b90915550506001600160a01b0387165f90815260a360205260408120805487929061273a908490615c4b565b90915550506001600160a01b0387165f90815260a36020526040902080546001909101555b6001600160a01b0387165f90815260a3602090815260408083206001810154905460a484528285203386529093529220548161279b848a615bf4565b6127a59190615c38565b6127af9082615c4b565b6001600160a01b038b165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548a92906127f0908490615c4b565b90915550829050612801848a615bf4565b61280b9190615c38565b6128159084615c4b565b6001600160a01b038b165f90815260a36020908152604080832060010193909355609f905220548415801561284c575060975460ff165b80156128595750609c5481105b15612aba576001600160a01b038b165f908152609f602052604081205461288290600190615c4b565b90505b6001609c546128949190615c4b565b811015612ab85760a35f609e83815481106128b1576128b1615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a390609e6128e685600161590a565b815481106128f6576128f6615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612ab0575f609e828154811061293457612934615c5e565b5f918252602090912001546001600160a01b03169050609e61295783600161590a565b8154811061296757612967615c5e565b5f91825260209091200154609e80546001600160a01b03909216918490811061299257612992615c5e565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905580609e6129d584600161590a565b815481106129e5576129e5615c5e565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055612a2582600161590a565b609f5f609e8581548110612a3b57612a3b615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055612a6a82600261590a565b609f5f609e612a7a86600161590a565b81548110612a8a57612a8a615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b600101612885565b505b84158015612add57506001600160a01b038b165f90815260a36020526040902054155b15612afa576001609c5f828254612af49190615c4b565b90915550505b84158015612b0a575060975460ff165b8015612b185750609b548111155b8015612b5e5750609b546001600160a01b038c165f908152609f60205260409020541180612b5e5750609c546001600160a01b038c165f908152609f6020526040902054115b15612b6857600195505b612b89336001600160a01b038c165f90815260a260205260409020906148c1565b5060975460ff16612c17576001600160a01b038a165f90815260a460209081526040808320338452909152812080548b9290612bc690849061590a565b90915550506001600160a01b038a165f90815260a36020526040812080548b9290612bf290849061590a565b90915550506001600160a01b038a165f90815260a36020526040902080546001909101555b6001600160a01b038a165f90815260a3602090815260408083206001810154905460a484528285203386529093529220549195509350915082612c5a858b615bf4565b612c649190615c38565b612c6e908361590a565b6001600160a01b038b165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548b9290612caf90849061590a565b90915550839050612cc0858b615bf4565b612cca9190615c38565b612cd4908561590a565b6001600160a01b038b165f90815260a360205260409020600181019190915554899003612d13576001609c5f828254612d0d919061590a565b90915550505b506001600160a01b0389165f908152609f602052604090205460975460ff168015612d3e5750600181115b15612f73575f612d4f600183615c4b565b90505b8015612f715760a35f609e612d68600185615c4b565b81548110612d7857612d78615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001812054609e8054919260a39290919085908110612db857612db8615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612f5f575f609e612df0600184615c4b565b81548110612e0057612e00615c5e565b5f91825260209091200154609e80546001600160a01b0390921692509083908110612e2d57612e2d615c5e565b5f918252602090912001546001600160a01b0316609e612e4e600185615c4b565b81548110612e5e57612e5e615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609e8381548110612e9d57612e9d615c5e565b5f9182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393909316929092179091558290609f90609e612ee4600185615c4b565b81548110612ef457612ef4615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055612f2382600161590a565b609f5f609e8581548110612f3957612f39615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80612f6981615c8b565b915050612d52565b505b60975460ff168015612f865750609b5481115b8015612fab57506099546001600160a01b038b165f908152609f602052604090205411155b15612fb557600195505b8515612fc357612fc36146ce565b6001600160a01b038b81165f81815260a36020908152604080832054948f16808452928190205481518f8152928301869052908201819052923392917ffdac6e81913996d95abcc289e90f2d8bd235487ce6fe6f821e7d21002a1915b49060600160405180910390a4505050505050505061303e6001606555565b5050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561312d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130fe573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131229190615d07565b6001600160a01b0316145b610830576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016119d6565b6131c161465a565b6131ca5f614fa6565b565b6131d461465a565b609854421015613210576040517f080bb11a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609c545f0361324b576040517fd7d776cb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609e548110156133f7575f5b818110156133ee5760a35f609e83815481106132a4576132a4615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001812054609e8054919260a392909190869081106132e4576132e4615c5e565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205411156133e6575f609e828154811061332257613322615c5e565b5f91825260209091200154609e80546001600160a01b039092169250908490811061334f5761334f615c5e565b5f91825260209091200154609e80546001600160a01b03909216918490811061337a5761337a615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609e84815481106133b9576133b9615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b600101613286565b5060010161327a565b505f5b609e548110156134515761340f81600161590a565b609f5f609e848154811061342557613425615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020556001016133fa565b506131ca6146ce565b5f609854421015613497576040517fd021716f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62015180609854426134a99190615c4b565b6134b39190615c38565b905090565b6001600160a01b0381165f90815260a76020526040812054610822565b6001600160a01b0381165f90815260a4602090815260408083203384529091528120541515610822565b60a06020525f90815260409020805460018201546002830180546001600160a01b03909316939192613530906159ab565b80601f016020809104026020016040519081016040528092919081815260200182805461355c906159ab565b80156135a75780601f1061357e576101008083540402835291602001916135a7565b820191905f5260205f20905b81548152906001019060200180831161358a57829003601f168201915b5050505050905083565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614613613576040517f4032cbb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60aa54156137b2575f5b61362760a8614651565b8110156137b0575f60a18161363d60a885615117565b6001600160a01b0316815260208101919091526040015f9081205460aa5490925060ab8261366c60a887615117565b6001600160a01b0316815260208101919091526040015f205461368f9086615bf4565b6136999190615c38565b90505f60646136a88484615bf4565b6136b29190615c38565b90505f6136bf8284615c4b565b90508160a15f6136d060a889615117565b6001600160a01b03166001600160a01b031681526020019081526020015f206001015f828254613700919061590a565b9091555081905060a35f61371560a889615117565b6001600160a01b03166001600160a01b031681526020019081526020015f205f015f828254613744919061590a565b90915550613755905060a886615117565b6001600160a01b03167f60ce3cc2d133631eac66a476f14997a9fa682bd05a60dd993cf02285822d78d88284604051613798929190918252602082015260400190565b60405180910390a250506001909201915061361d9050565b505b5f5b6137be60a8614651565b81101561255d5760ab5f6137d360a884615117565b6001600160a01b0316815260208101919091526040015f908120556138046137fc60a883615117565b60a890615122565b506001016137b4565b5f61381883836150a2565b9392505050565b6001600160a01b0382165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b035f0361386157505f610822565b8115806138a157506001600160a01b0383165f90815260a66020526040902054600f81810b700100000000000000000000000000000000909204900b0382115b6138ab57816138e1565b6001600160a01b0383165f90815260a66020526040902054600f81810b700100000000000000000000000000000000909204900b035b91505f805b83811015611150576001600160a01b0385165f90815260a66020526040812061390f9083614b61565b5f81815260a56020908152604091829020825180840190935280548084526001909101549183019190915291925090613948908561590a565b935050508060010190506138e6565b604080518082019091525f80825260208201526001600160a01b0383165f90815260a66020526040812061398b9084614b61565b5f90815260a560209081526040918290208251808401909352805483526001015490820152949350505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015613aa057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015613a71573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613a959190615d07565b6001600160a01b0316145b613b2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016119d6565b82609d548114613b68576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613b7384600161590a565b609d555f805b83811015613ed257609b54609f5f878785818110613b9957613b99615c5e565b9050602002016020810190613bae91906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f205411613bd857600191505b5f609f5f878785818110613bee57613bee615c5e565b9050602002016020810190613c0391906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115613e54575f6001609f5f888886818110613c4157613c41615c5e565b9050602002016020810190613c5691906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f2054613c809190615c4b565b90505b609e54613c9290600190615c4b565b811015613d6457609e613ca682600161590a565b81548110613cb657613cb6615c5e565b5f91825260209091200154609e80546001600160a01b039092169183908110613ce157613ce1615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609f5f609e8481548110613d2457613d24615c5e565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190613d57908490615c4b565b9091555050600101613c83565b50609e805480613d7657613d76615d22565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609f90868684818110613dbb57613dbb615c5e565b9050602002016020810190613dd091906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a35f878785818110613e0857613e08615c5e565b9050602002016020810190613e1d91906154c4565b6001600160a01b0316815260208101919091526040015f20541115613e54576001609c5f828254613e4e9190615c4b565b90915550505b60a05f868684818110613e6957613e69615c5e565b9050602002016020810190613e7e91906154c4565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590613ec8600283018261546a565b5050600101613b79565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618484604051613f04929190615d4f565b60405180910390a1801561303e5761303e6146ce565b5f6060835f03613f56576040517f89076b3900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385165f90815260a260205260409020613f7690614651565b91508367ffffffffffffffff811115613f9157613f9161597e565b604051908082528060200260200182016040528015613fba578160200160208202803683370190505b5090505f613fc88486615bf4565b90505f6001613fd7868261590a565b613fe19088615bf4565b613feb9190615c4b565b9050613ff8600185615c4b565b81111561400d5761400a600185615c4b565b90505b815f5b828211614086576140448261402481615ca0565b6001600160a01b038c165f90815260a26020526040902090945090615117565b858261404f81615ca0565b93508151811061406157614061615c5e565b60200260200101906001600160a01b031690816001600160a01b031681525050614010565b50505050935093915050565b61409a61465a565b6001600160a01b038116614130576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016119d6565b61413981614fa6565b50565b61414461484e565b335f90815260a16020526040812060010154900361418e576040517f5426dfcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260a1602052604081206001018054919055906141ae906113de565b60405181815233907f8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e4119060200160405180910390a2506131ca6001606555565b6141f661465a565b82609d548114614232576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61423d84600161590a565b609d555f805b83811015613ed257609b54609f5f87878581811061426357614263615c5e565b905060200201602081019061427891906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f2054116142a257600191505b5f609f5f8787858181106142b8576142b8615c5e565b90506020020160208101906142cd91906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f2054111561451e575f6001609f5f88888681811061430b5761430b615c5e565b905060200201602081019061432091906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f205461434a9190615c4b565b90505b609e5461435c90600190615c4b565b81101561442e57609e61437082600161590a565b8154811061438057614380615c5e565b5f91825260209091200154609e80546001600160a01b0390921691839081106143ab576143ab615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609f5f609e84815481106143ee576143ee615c5e565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190614421908490615c4b565b909155505060010161434d565b50609e80548061444057614440615d22565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609f9086868481811061448557614485615c5e565b905060200201602081019061449a91906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a35f8787858181106144d2576144d2615c5e565b90506020020160208101906144e791906154c4565b6001600160a01b0316815260208101919091526040015f2054111561451e576001609c5f8282546145189190615c4b565b90915550505b60a05f86868481811061453357614533615c5e565b905060200201602081019061454891906154c4565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590614592600283018261546a565b5050600101614243565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146145fe576040517f52d033bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61460960a8826148c1565b50600160aa5f82825461461c919061590a565b90915550506001600160a01b0381165f90815260ab6020526040812080546001929061464990849061590a565b909155505050565b5f610822825490565b6033546001600160a01b031633146131ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016119d6565b60995460975460ff16156146f257609954609c5410156146ed5750609c545b614703565b609954609e5410156147035750609e545b5f8167ffffffffffffffff81111561471d5761471d61597e565b604051908082528060200260200182016040528015614746578160200160208202803683370190505b5090505f5b828110156147b357609e818154811061476657614766615c5e565b905f5260205f20015f9054906101000a90046001600160a01b031682828151811061479357614793615c5e565b6001600160a01b039092166020928302919091019091015260010161474b565b506040517f9b8201a40000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b8201a490614819908490600401615d9c565b5f604051808303815f87803b158015614830575f80fd5b505af1158015614842573d5f803e3d5ffd5b50509151609b55505050565b6002606554036148ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016119d6565b6002606555565b5f613818836001600160a01b038416615136565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614956573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061497a9190615dae565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015614a0c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614a309190615dc5565b614a66576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614ae7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614b0b9190615dae565b9050821580614b23575082614b208383615c4b565b14155b1561303e576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001606555565b5f80614b83614b6f84615182565b8554614b7e9190600f0b615de4565b615237565b84549091507001000000000000000000000000000000009004600f90810b9082900b12614bdc576040517fb4120f1400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f0b5f9081526001939093016020525050604090205490565b5f614c1d8254600f81810b700100000000000000000000000000000000909204900b131590565b15614c54576040517f3db2a12a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b508054600f0b5f9081526001909101602052604090205490565b5f614c958254600f81810b700100000000000000000000000000000000909204900b131590565b15614ccc576040517f3db2a12a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b508054600f0b5f818152600180840160205260408220805492905583547fffffffffffffffffffffffffffffffff000000000000000000000000000000001692016fffffffffffffffffffffffffffffffff169190911790915590565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614daa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614dce9190615dae565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015614e58573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614e7c9190615dc5565b614eb2576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614f33573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614f579190615dae565b9050821580614f6f575082614f6c8383615c4b565b14155b15611090576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff1661509a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016119d6565b6131ca6152cb565b6001600160a01b038083165f81815260a360208181526040808420600181015460a48452828620978916865296835290842054948452919052549092916150e891615bf4565b6138189190615c38565b6001600160a01b0381165f90815260a760205260409020805460018101825590611911565b5f6138188383615361565b5f613818836001600160a01b038416615387565b5f81815260018301602052604081205461517b57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610822565b505f610822565b5f7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821115615233576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e206160448201527f6e20696e7432353600000000000000000000000000000000000000000000000060648201526084016119d6565b5090565b80600f81900b81146113f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f323820626974730000000000000000000000000000000000000000000000000060648201526084016119d6565b5f54610100900460ff16614b5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016119d6565b5f825f01828154811061537657615376615c5e565b905f5260205f200154905092915050565b5f8181526001830160205260408120548015615461575f6153a9600183615c4b565b85549091505f906153bc90600190615c4b565b905081811461541b575f865f0182815481106153da576153da615c5e565b905f5260205f200154905080875f0184815481106153fa576153fa615c5e565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061542c5761542c615d22565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610822565b5f915050610822565b508054615476906159ab565b5f825580601f10615485575050565b601f0160209004905f5260205f209081019061413991905b80821115615233575f815560010161549d565b6001600160a01b0381168114614139575f80fd5b5f602082840312156154d4575f80fd5b8135613818816154b0565b5f80604083850312156154f0575f80fd5b82359150602083013567ffffffffffffffff81111561550d575f80fd5b83016060818603121561551e575f80fd5b809150509250929050565b5f806040838503121561553a575f80fd5b8235615545816154b0565b946020939093013593505050565b5f60208284031215615563575f80fd5b5035919050565b5f8083601f84011261557a575f80fd5b50813567ffffffffffffffff811115615591575f80fd5b6020830191508360208260051b85010111156155ab575f80fd5b9250929050565b5f80602083850312156155c3575f80fd5b823567ffffffffffffffff8111156155d9575f80fd5b6155e58582860161556a565b90969095509350505050565b5f81518084525f5b81811015615615576020818501810151868301820152016155f9565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b838110156156ea578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b03168452878101518885015286015160608785018190526156d6818601836155f1565b968901969450505090860190600101615679565b509098975050505050505050565b5f8060408385031215615709575f80fd5b8235615714816154b0565b9150602083013561551e816154b0565b5f805f805f8060a08789031215615739575f80fd5b8635615744816154b0565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115615774575f80fd5b61578089828a0161556a565b979a9699509497509295939492505050565b5f805f606084860312156157a4575f80fd5b83356157af816154b0565b925060208401356157bf816154b0565b929592945050506040919091013590565b6001600160a01b0384168152826020820152606060408201525f6157f760608301846155f1565b95945050505050565b5f805f60408486031215615812575f80fd5b83359250602084013567ffffffffffffffff81111561582f575f80fd5b61583b8682870161556a565b9497909650939450505050565b5f805f6060848603121561585a575f80fd5b8335615865816154b0565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b838110156158b25781516001600160a01b03168752958201959082019060010161588d565b509495945050505050565b828152604060208201525f6158d5604083018461587a565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610822576108226158dd565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615950575f80fd5b83018035915067ffffffffffffffff82111561596a575f80fd5b6020019150368190038213156155ab575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c908216806159bf57607f821691505b602082108103611911577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f8211156109e657805f5260205f20601f840160051c81016020851015615a1b5750805b601f840160051c820191505b8181101561303e575f8155600101615a27565b8135615a45816154b0565b6001600160a01b03811673ffffffffffffffffffffffffffffffffffffffff1983541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112615ab1575f80fd5b8501803567ffffffffffffffff811115615ac9575f80fd5b8036038483011315615ad9575f80fd5b615aed81615ae785546159ab565b856159f6565b5f601f821160018114615b20575f8315615b0957508382018601355b5f19600385901b1c1916600184901b178555615b96565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015615b6c57868501890135825593880193908901908801615b4d565b5084821015615b8a575f1960f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b8082028115828204841417610822576108226158dd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82615c4657615c46615c0b565b500490565b81810381811115610822576108226158dd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81615c9957615c996158dd565b505f190190565b5f5f198203615cb157615cb16158dd565b5060010190565b5f82615cc657615cc6615c0b565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615cfd575f80fd5b9190910192915050565b5f60208284031215615d17575f80fd5b8151613818816154b0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b86811015615d91578235615d76816154b0565b6001600160a01b031682529183019190830190600101615d63565b509695505050505050565b602081525f613818602083018461587a565b5f60208284031215615dbe575f80fd5b5051919050565b5f60208284031215615dd5575f80fd5b81518015158114613818575f80fd5b8082018281125f831280158216821582161715615e0357615e036158dd565b50509291505056fea164736f6c6343000818000a diff --git a/bindings/bin/morphtoken_deployed.hex b/bindings/bin/morphtoken_deployed.hex index 77b8c97a8..75807d8a2 100644 --- a/bindings/bin/morphtoken_deployed.hex +++ b/bindings/bin/morphtoken_deployed.hex @@ -1 +1 @@ -0x608060405234801561000f575f80fd5b506004361061019a575f3560e01c8063715018a6116100e8578063a29bfb2c11610093578063c553f7b31161006e578063c553f7b3146103c5578063cd4281d0146103cd578063dd62ed3e146103f4578063f2fde38b14610439575f80fd5b8063a29bfb2c1461038c578063a457c2d71461039f578063a9059cbb146103b2575f80fd5b80638da5cb5b116100c35780638da5cb5b14610347578063944fa7461461036557806395d89b4114610384575f80fd5b8063715018a614610305578063748231321461030d578063807de44314610320575f80fd5b8063395093511161014857806342966c681161012357806342966c681461028f5780636d0c4a26146102a257806370a08231146102d0575f80fd5b8063395093511461021b5780633d9353fe1461022e578063405abb411461027a575f80fd5b806318160ddd1161017857806318160ddd146101f157806323b872dd146101f9578063313ce5671461020c575f80fd5b806306fdde031461019e578063095ea7b3146101bc5780630b88a984146101df575b5f80fd5b6101a661044c565b6040516101b391906115d5565b60405180910390f35b6101cf6101ca366004611667565b6104dc565b60405190151581526020016101b3565b606c545b6040519081526020016101b3565b6067546101e3565b6101cf61020736600461168f565b6104f5565b604051601281526020016101b3565b6101cf610229366004611667565b610518565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b3565b61028d6102883660046116c8565b610563565b005b61028d61029d3660046116e8565b61075e565b6102b56102b03660046116e8565b6107c2565b604080518251815260209283015192810192909252016101b3565b6101e36102de3660046116ff565b73ffffffffffffffffffffffffffffffffffffffff165f9081526068602052604090205490565b61028d610819565b61028d61031b3660046117f3565b61082c565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff16610255565b6101e36103733660046116e8565b5f908152606b602052604090205490565b6101a6610a68565b61028d61039a3660046116e8565b610a77565b6101cf6103ad366004611667565b610dbb565b6101cf6103c0366004611667565b610e4b565b606a546101e3565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b6101e3610402366004611873565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260696020908152604080832093909416825291909152205490565b61028d6104473660046116ff565b610e58565b60606065805461045b906118a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610487906118a4565b80156104d25780601f106104a9576101008083540402835291602001916104d2565b820191905f5260205f20905b8154815290600101906020018083116104b557829003601f168201915b5050505050905090565b5f336104e9818585610ef2565b60019150505b92915050565b5f33610502858285611026565b61050d8585856110e2565b506001949350505050565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104e9908290869061055e908790611922565b610ef2565b61056b611297565b606a805483919061057e90600190611935565b8154811061058e5761058e611948565b905f5260205f2090600202015f0154036106155760405162461bcd60e51b815260206004820152602760248201527f6e65772072617465206973207468652073616d6520617320746865206c61746560448201527f737420726174650000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606a805461062590600190611935565b8154811061063557610635611948565b905f5260205f2090600202016001015481116106b95760405162461bcd60e51b815260206004820152603260248201527f6566666563746976652065706f636873206166746572206d757374206265206760448201527f726561746572207468616e206265666f72650000000000000000000000000000606482015260840161060c565b60408051808201825283815260208101838152606a80546001810182555f91825292517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029094029384015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909201919091559051829184917fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f49190a35050565b610766611297565b5f81116107b55760405162461bcd60e51b815260206004820152601660248201527f616d6f756e7420746f206275726e206973207a65726f00000000000000000000604482015260640161060c565b6107bf33826112fe565b50565b604080518082019091525f8082526020820152606a82815481106107e8576107e8611948565b905f5260205f2090600202016040518060400160405290815f82015481526020016001820154815250509050919050565b610821611297565b61082a5f611486565b565b5f54610100900460ff161580801561084a57505f54600160ff909116105b806108635750303b15801561086357505f5460ff166001145b6108d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161060c565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610931575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606561093d87826119c1565b50606661094a86826119c1565b5061095584846114fc565b604080518082019091528281525f60208201818152606a8054600181018255925291517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029092029182015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909101556109d284611486565b6040515f9083907fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f4908390a38015610a60575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b60606066805461045b906118a4565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610afc5760405162461bcd60e51b815260206004820152601c60248201527f6f6e6c79207265636f726420636f6e747261637420616c6c6f77656400000000604482015260640161060c565b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b66573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611ad9565b11610bfd5760405162461bcd60e51b815260206004820152602b60248201527f746865207370656369666965642074696d6520686173206e6f7420796574206260448201527f65656e2072656163686564000000000000000000000000000000000000000000606482015260840161060c565b606c54811015610c4f5760405162461bcd60e51b815260206004820152601560248201527f616c6c20696e666c6174696f6e73206d696e7465640000000000000000000000604482015260640161060c565b606c545b818111610da9575f606a5f81548110610c6e57610c6e611948565b5f9182526020822060029091020154606a54909250610c8f90600190611935565b90505b8015610cfc5782606a8281548110610cac57610cac611948565b905f5260205f2090600202016001015411610cea57606a8181548110610cd457610cd4611948565b905f5260205f2090600202015f01549150610cfc565b80610cf481611af0565b915050610c92565b505f662386f26fc1000082606754610d149190611b24565b610d1e9190611b3b565b5f848152606b602052604090208190559050610d5a7f0000000000000000000000000000000000000000000000000000000000000000826114fc565b827f0d82c0920038b8dc7f633e18585f37092ba957b84876fcf833d6841f69eaa32782604051610d8c91815260200190565b60405180910390a250508080610da190611b73565b915050610c53565b50610db5816001611922565b606c5550565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610e3e5760405162461bcd60e51b815260206004820152601e60248201527f64656372656173656420616c6c6f77616e63652062656c6f77207a65726f0000604482015260640161060c565b61050d8286868403610ef2565b5f336104e98185856110e2565b610e60611297565b73ffffffffffffffffffffffffffffffffffffffff8116610ee95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161060c565b6107bf81611486565b73ffffffffffffffffffffffffffffffffffffffff8316610f555760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f2061646472657373000000604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff8216610fb85760405162461bcd60e51b815260206004820152601b60248201527f617070726f766520746f20746865207a65726f20616464726573730000000000604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181526069602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f908152606960209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146110dc57818110156110cf5760405162461bcd60e51b815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e636500000000000000000000604482015260640161060c565b6110dc8484848403610ef2565b50505050565b73ffffffffffffffffffffffffffffffffffffffff83166111455760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f20616464726573730000604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff82166111a85760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f206164647265737300000000604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff83165f908152606860205260409020548181101561121d5760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e636500604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526068602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112899086815260200190565b60405180910390a350505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461082a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff82166113875760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161060c565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260686020526040902054818110156114225760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161060c565b73ffffffffffffffffffffffffffffffffffffffff83165f8181526068602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611019565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b73ffffffffffffffffffffffffffffffffffffffff821661155f5760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f20616464726573730000000000000000604482015260640161060c565b8060675f8282546115709190611922565b909155505073ffffffffffffffffffffffffffffffffffffffff82165f818152606860209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b81811015611601578581018301518582016040015282016115e5565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611662575f80fd5b919050565b5f8060408385031215611678575f80fd5b6116818361163f565b946020939093013593505050565b5f805f606084860312156116a1575f80fd5b6116aa8461163f565b92506116b86020850161163f565b9150604084013590509250925092565b5f80604083850312156116d9575f80fd5b50508035926020909101359150565b5f602082840312156116f8575f80fd5b5035919050565b5f6020828403121561170f575f80fd5b6117188261163f565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261175b575f80fd5b813567ffffffffffffffff808211156117765761177661171f565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156117bc576117bc61171f565b816040528381528660208588010111156117d4575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a08688031215611807575f80fd5b853567ffffffffffffffff8082111561181e575f80fd5b61182a89838a0161174c565b9650602088013591508082111561183f575f80fd5b5061184c8882890161174c565b94505061185b6040870161163f565b94979396509394606081013594506080013592915050565b5f8060408385031215611884575f80fd5b61188d8361163f565b915061189b6020840161163f565b90509250929050565b600181811c908216806118b857607f821691505b6020821081036118ef577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156104ef576104ef6118f5565b818103818111156104ef576104ef6118f5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f8211156119bc57805f5260205f20601f840160051c8101602085101561199a5750805b601f840160051c820191505b818110156119b9575f81556001016119a6565b50505b505050565b815167ffffffffffffffff8111156119db576119db61171f565b6119ef816119e984546118a4565b84611975565b602080601f831160018114611a41575f8415611a0b5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610a60565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611a8d57888601518255948401946001909101908401611a6e565b5085821015611ac957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215611ae9575f80fd5b5051919050565b5f81611afe57611afe6118f5565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b80820281158282048414176104ef576104ef6118f5565b5f82611b6e577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ba357611ba36118f5565b506001019056fea164736f6c6343000818000a +0x608060405234801561000f575f80fd5b506004361061018f575f3560e01c8063715018a6116100dd578063a29bfb2c11610088578063c553f7b311610063578063c553f7b3146103ba578063dd62ed3e146103c2578063f2fde38b14610407575f80fd5b8063a29bfb2c14610381578063a457c2d714610394578063a9059cbb146103a7575f80fd5b80638da5cb5b116100b85780638da5cb5b1461033c578063944fa7461461035a57806395d89b4114610379575f80fd5b8063715018a6146102fa5780637482313214610302578063807de44314610315575f80fd5b80633434735f1161013d57806342966c681161011857806342966c68146102845780636d0c4a261461029757806370a08231146102c5575f80fd5b80633434735f14610210578063395093511461025c578063405abb411461026f575f80fd5b806318160ddd1161016d57806318160ddd146101e657806323b872dd146101ee578063313ce56714610201575f80fd5b806306fdde0314610193578063095ea7b3146101b15780630b88a984146101d4575b5f80fd5b61019b61041a565b6040516101a8919061163e565b60405180910390f35b6101c46101bf3660046116d0565b6104aa565b60405190151581526020016101a8565b606c545b6040519081526020016101a8565b6067546101d8565b6101c46101fc3660046116f8565b6104c3565b604051601281526020016101a8565b6102377f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a8565b6101c461026a3660046116d0565b6104e6565b61028261027d366004611731565b610531565b005b610282610292366004611751565b61072c565b6102aa6102a5366004611751565b610790565b604080518251815260209283015192810192909252016101a8565b6101d86102d3366004611768565b73ffffffffffffffffffffffffffffffffffffffff165f9081526068602052604090205490565b6102826107e7565b61028261031036600461185c565b6107fa565b6102377f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff16610237565b6101d8610368366004611751565b5f908152606b602052604090205490565b61019b610a36565b61028261038f366004611751565b610a45565b6101c46103a23660046116d0565b610e24565b6101c46103b53660046116d0565b610eb4565b606a546101d8565b6101d86103d03660046118dc565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260696020908152604080832093909416825291909152205490565b610282610415366004611768565b610ec1565b6060606580546104299061190d565b80601f01602080910402602001604051908101604052809291908181526020018280546104559061190d565b80156104a05780601f10610477576101008083540402835291602001916104a0565b820191905f5260205f20905b81548152906001019060200180831161048357829003601f168201915b5050505050905090565b5f336104b7818585610f5b565b60019150505b92915050565b5f336104d085828561108f565b6104db85858561114b565b506001949350505050565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104b7908290869061052c90879061198b565b610f5b565b610539611300565b606a805483919061054c9060019061199e565b8154811061055c5761055c6119b1565b905f5260205f2090600202015f0154036105e35760405162461bcd60e51b815260206004820152602760248201527f6e65772072617465206973207468652073616d6520617320746865206c61746560448201527f737420726174650000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606a80546105f39060019061199e565b81548110610603576106036119b1565b905f5260205f2090600202016001015481116106875760405162461bcd60e51b815260206004820152603260248201527f6566666563746976652065706f636873206166746572206d757374206265206760448201527f726561746572207468616e206265666f7265000000000000000000000000000060648201526084016105da565b60408051808201825283815260208101838152606a80546001810182555f91825292517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029094029384015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909201919091559051829184917fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f49190a35050565b610734611300565b5f81116107835760405162461bcd60e51b815260206004820152601660248201527f616d6f756e7420746f206275726e206973207a65726f0000000000000000000060448201526064016105da565b61078d3382611367565b50565b604080518082019091525f8082526020820152606a82815481106107b6576107b66119b1565b905f5260205f2090600202016040518060400160405290815f82015481526020016001820154815250509050919050565b6107ef611300565b6107f85f6114ef565b565b5f54610100900460ff161580801561081857505f54600160ff909116105b806108315750303b15801561083157505f5460ff166001145b6108a35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016105da565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156108ff575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606561090b8782611a2a565b5060666109188682611a2a565b506109238484611565565b604080518082019091528281525f60208201818152606a8054600181018255925291517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029092029182015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909101556109a0846114ef565b6040515f9083907fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f4908390a38015610a2e575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6060606680546104299061190d565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610aca5760405162461bcd60e51b815260206004820152601c60248201527f6f6e6c792073797374656d20636f6e747261637420616c6c6f7765640000000060448201526064016105da565b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b34573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b589190611b42565b11610bcb5760405162461bcd60e51b815260206004820152602b60248201527f746865207370656369666965642074696d6520686173206e6f7420796574206260448201527f65656e207265616368656400000000000000000000000000000000000000000060648201526084016105da565b606c54811015610c1d5760405162461bcd60e51b815260206004820152601560248201527f616c6c20696e666c6174696f6e73206d696e746564000000000000000000000060448201526064016105da565b606c545b818111610e12575f606a5f81548110610c3c57610c3c6119b1565b5f9182526020822060029091020154606a54909250610c5d9060019061199e565b90505b8015610cca5782606a8281548110610c7a57610c7a6119b1565b905f5260205f2090600202016001015411610cb857606a8181548110610ca257610ca26119b1565b905f5260205f2090600202015f01549150610cca565b80610cc281611b59565b915050610c60565b505f662386f26fc1000082606754610ce29190611b8d565b610cec9190611ba4565b5f848152606b602052604090208190559050610d287f000000000000000000000000000000000000000000000000000000000000000082611565565b6040517f91c05b0b000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906391c05b0b906024015f604051808303815f87803b158015610dad575f80fd5b505af1158015610dbf573d5f803e3d5ffd5b50505050827f0d82c0920038b8dc7f633e18585f37092ba957b84876fcf833d6841f69eaa32782604051610df591815260200190565b60405180910390a250508080610e0a90611bdc565b915050610c21565b50610e1e81600161198b565b606c5550565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610ea75760405162461bcd60e51b815260206004820152601e60248201527f64656372656173656420616c6c6f77616e63652062656c6f77207a65726f000060448201526064016105da565b6104db8286868403610f5b565b5f336104b781858561114b565b610ec9611300565b73ffffffffffffffffffffffffffffffffffffffff8116610f525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105da565b61078d816114ef565b73ffffffffffffffffffffffffffffffffffffffff8316610fbe5760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f206164647265737300000060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff82166110215760405162461bcd60e51b815260206004820152601b60248201527f617070726f766520746f20746865207a65726f2061646472657373000000000060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181526069602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f908152606960209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461114557818110156111385760405162461bcd60e51b815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e63650000000000000000000060448201526064016105da565b6111458484848403610f5b565b50505050565b73ffffffffffffffffffffffffffffffffffffffff83166111ae5760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff82166112115760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260686020526040902054818110156112865760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526068602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112f29086815260200190565b60405180910390a350505050565b60335473ffffffffffffffffffffffffffffffffffffffff1633146107f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff82166113f05760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016105da565b73ffffffffffffffffffffffffffffffffffffffff82165f908152606860205260409020548181101561148b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105da565b73ffffffffffffffffffffffffffffffffffffffff83165f8181526068602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611082565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b73ffffffffffffffffffffffffffffffffffffffff82166115c85760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f2061646472657373000000000000000060448201526064016105da565b8060675f8282546115d9919061198b565b909155505073ffffffffffffffffffffffffffffffffffffffff82165f818152606860209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b8181101561166a5785810183015185820160400152820161164e565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116cb575f80fd5b919050565b5f80604083850312156116e1575f80fd5b6116ea836116a8565b946020939093013593505050565b5f805f6060848603121561170a575f80fd5b611713846116a8565b9250611721602085016116a8565b9150604084013590509250925092565b5f8060408385031215611742575f80fd5b50508035926020909101359150565b5f60208284031215611761575f80fd5b5035919050565b5f60208284031215611778575f80fd5b611781826116a8565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126117c4575f80fd5b813567ffffffffffffffff808211156117df576117df611788565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561182557611825611788565b8160405283815286602085880101111561183d575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a08688031215611870575f80fd5b853567ffffffffffffffff80821115611887575f80fd5b61189389838a016117b5565b965060208801359150808211156118a8575f80fd5b506118b5888289016117b5565b9450506118c4604087016116a8565b94979396509394606081013594506080013592915050565b5f80604083850312156118ed575f80fd5b6118f6836116a8565b9150611904602084016116a8565b90509250929050565b600181811c9082168061192157607f821691505b602082108103611958577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156104bd576104bd61195e565b818103818111156104bd576104bd61195e565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f821115611a2557805f5260205f20601f840160051c81016020851015611a035750805b601f840160051c820191505b81811015611a22575f8155600101611a0f565b50505b505050565b815167ffffffffffffffff811115611a4457611a44611788565b611a5881611a52845461190d565b846119de565b602080601f831160018114611aaa575f8415611a745750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610a2e565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611af657888601518255948401946001909101908401611ad7565b5085821015611b3257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215611b52575f80fd5b5051919050565b5f81611b6757611b6761195e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b80820281158282048414176104bd576104bd61195e565b5f82611bd7577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611c0c57611c0c61195e565b506001019056fea164736f6c6343000818000a diff --git a/bindings/bin/record_deployed.hex b/bindings/bin/record_deployed.hex deleted file mode 100644 index 084d14f48..000000000 --- a/bindings/bin/record_deployed.hex +++ /dev/null @@ -1 +0,0 @@ -0x608060405234801561000f575f80fd5b506004361061019a575f3560e01c8063715018a6116100e85780638e21d5fb11610093578063cb6293e81161006e578063cb6293e8146104e3578063d557714114610503578063f2fde38b1461052a578063fe49dbc91461053d575f80fd5b80638e21d5fb146103f1578063a24231e814610418578063a795f409146104a8575f80fd5b80637dc0d1d0116100c35780637dc0d1d01461038c578063807de443146103ac5780638da5cb5b146103d3575f80fd5b8063715018a6146102c25780637828a905146102ca57806378f908e1146102f1575f80fd5b806341ed047f116101485780634e3ca406116101235780634e3ca4061461026f57806364b4abe31461028f5780636ea0396e146102af575f80fd5b806341ed047f14610240578063484f8d0f146102535780634c69c00f1461025c575f80fd5b80631794bb3c116101785780631794bb3c146101d85780632fbf6487146101eb5780633d9353fe146101f4575f80fd5b80630776c0f71461019e57806310c9873f146101ba5780631511e1b1146101cf575b5f80fd5b6101a7606c5481565b6040519081526020015b60405180910390f35b6101cd6101c83660046125b9565b610550565b005b6101a760695481565b6101cd6101e63660046125f8565b610676565b6101a7606b5481565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b1565b6101cd61024e366004612631565b61096c565b6101a7606a5481565b6101cd61026a3660046126a0565b610cab565b61028261027d3660046126c0565b610d5d565b6040516101b191906126e0565b6102a261029d3660046126c0565b610ef5565b6040516101b19190612763565b6101cd6102bd3660046127e3565b611096565b6101cd611d98565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b61034a6102ff3660046125b9565b60666020525f9081526040902080546001820154600283015460038401546004850154600590950154939473ffffffffffffffffffffffffffffffffffffffff909316939192909186565b6040805196875273ffffffffffffffffffffffffffffffffffffffff9095166020870152938501929092526060840152608083015260a082015260c0016101b1565b60655461021b9073ffffffffffffffffffffffffffffffffffffffff1681565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff1661021b565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b61046b6104263660046125b9565b60676020525f908152604090208054600182015460028301546003840154600490940154929373ffffffffffffffffffffffffffffffffffffffff9092169290919085565b6040805195865273ffffffffffffffffffffffffffffffffffffffff9094166020860152928401919091526060830152608082015260a0016101b1565b6104ce6104b63660046125b9565b60686020525f90815260409020805460019091015482565b604080519283526020830191909152016101b1565b6104f66104f13660046126c0565b611dab565b6040516101b1919061287a565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b6101cd6105383660046126a0565b61205f565b6101cd61054b3660046129a8565b6120fc565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105d25760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064015b60405180910390fd5b606c54156106225760405162461bcd60e51b815260206004820152600b60248201527f616c72656164792073657400000000000000000000000000000000000000000060448201526064016105c9565b5f81116106715760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206c617465737420626c6f636b00000000000000000000000060448201526064016105c9565b606c55565b5f54610100900460ff161580801561069457505f54600160ff909116105b806106ad5750303b1580156106ad57505f5460ff166001145b61071f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016105c9565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561077b575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff84166107de5760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e65722061646472657373000000000000000000000060448201526064016105c9565b815f036108535760405162461bcd60e51b815260206004820152602360248201527f696e76616c6964206e657874206261746368207375626d697373696f6e20696e60448201527f646578000000000000000000000000000000000000000000000000000000000060648201526084016105c9565b73ffffffffffffffffffffffffffffffffffffffff83166108b65760405162461bcd60e51b815260206004820152601660248201527f696e76616c6964206f7261636c6520616464726573730000000000000000000060448201526064016105c9565b6108bf84612407565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851617905560698290558015610966575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109e95760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105c9565b80610a365760405162461bcd60e51b815260206004820152601760248201527f656d707479206261746368207375626d697373696f6e7300000000000000000060448201526064016105c9565b5f5b81811015610c575780606954610a4e9190612a32565b838383818110610a6057610a60612a4b565b905060c002015f013514610ab65760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b6040518060c00160405280848484818110610ad357610ad3612a4b565b905060c002015f01358152602001848484818110610af357610af3612a4b565b905060c002016020016020810190610b0b91906126a0565b73ffffffffffffffffffffffffffffffffffffffff168152602001848484818110610b3857610b38612a4b565b905060c00201604001358152602001848484818110610b5957610b59612a4b565b905060c00201606001358152602001848484818110610b7a57610b7a612a4b565b905060c00201608001358152602001848484818110610b9b57610b9b612a4b565b905060c0020160a0013581525060665f858585818110610bbd57610bbd612a4b565b60c002919091013582525060208082019290925260409081015f208351815591830151600180840180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155908301516002830155606083015160038301556080830151600483015560a09092015160059091015501610a38565b506069546040518281527f1c517c9850aa84483b0b2434e58bab4c7967f0b1a34d8b18a6ad22436add010e9060200160405180910390a28181905060695f828254610ca29190612a32565b90915550505050565b610cb361247d565b73ffffffffffffffffffffffffffffffffffffffff8116610d165760405162461bcd60e51b815260206004820152601660248201527f696e76616c6964206f7261636c6520616464726573730000000000000000000060448201526064016105c9565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606082821015610daf5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b610db98383612a78565b610dc4906001612a32565b67ffffffffffffffff811115610ddc57610ddc612a8b565b604051908082528060200260200182016040528015610e5057816020015b610e3d6040518060a001604052805f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81525090565b815260200190600190039081610dfa5790505b509050825b828111610eee575f81815260676020908152604091829020825160a08101845281548152600182015473ffffffffffffffffffffffffffffffffffffffff16928101929092526002810154928201929092526003820154606082015260049091015460808201528251839083908110610ed057610ed0612a4b565b60200260200101819052508080610ee690612ab8565b915050610e55565b5092915050565b606082821015610f475760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b610f518383612a78565b610f5c906001612a32565b67ffffffffffffffff811115610f7457610f74612a8b565b604051908082528060200260200182016040528015610fee57816020015b610fdb6040518060c001604052805f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81526020015f81525090565b815260200190600190039081610f925790505b509050825b828111610eee575f81815260666020908152604091829020825160c08101845281548152600182015473ffffffffffffffffffffffffffffffffffffffff1692810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460a0820152825183908390811061107857611078612a4b565b6020026020010181905250808061108e90612ab8565b915050610ff3565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111135760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105c9565b806111605760405162461bcd60e51b815260206004820152601360248201527f656d707479207265776172642065706f6368730000000000000000000000000060448201526064016105c9565b5f606c54116111b15760405162461bcd60e51b815260206004820152601960248201527f737461727420626c6f636b2073686f756c64206265207365740000000000000060448201526064016105c9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa15801561121a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061123e9190612aef565b606b5460019061124f908490612a32565b6112599190612a78565b106112cb5760405162461bcd60e51b8152602060048201526024808201527f756e66696e69736865642065706f6368732063616e6e6f742062652075706c6f60448201527f616465640000000000000000000000000000000000000000000000000000000060648201526084016105c9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a29bfb2c600184849050606b5461131a9190612a32565b6113249190612a78565b6040518263ffffffff1660e01b815260040161134291815260200190565b5f604051808303815f87803b158015611359575f80fd5b505af115801561136b573d5f803e3d5ffd5b505f9250829150505b82811015611d2d575f84848381811061138f5761138f612a4b565b90506020028101906113a19190612b06565b6113af906040810190612b42565b905090505f8585848181106113c6576113c6612a4b565b90506020028101906113d89190612b06565b606b54903591506113ea908490612a32565b81146114385760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642065706f636820696e6465780000000000000000000000000060448201526064016105c9565b8186868581811061144b5761144b612a4b565b905060200281019061145d9190612b06565b61146b906060810190612b42565b90501480156114ac57508186868581811061148857611488612a4b565b905060200281019061149a9190612b06565b6114a8906080810190612b42565b9050145b80156114ea5750818686858181106114c6576114c6612a4b565b90506020028101906114d89190612b06565b6114e69060a0810190612b42565b9050145b6115365760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642064617461206c656e6774680000000000000000000000000060448201526064016105c9565b85858481811061154857611548612a4b565b905060200281019061155a9190612b06565b611568906020013585612a32565b93506040518060c0016040528082815260200187878681811061158d5761158d612a4b565b905060200281019061159f9190612b06565b6020013581526020018787868181106115ba576115ba612a4b565b90506020028101906115cc9190612b06565b6115da906040810190612b42565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525050509082525060200187878681811061162257611622612a4b565b90506020028101906116349190612b06565b611642906060810190612b42565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525050509082525060200187878681811061168a5761168a612a4b565b905060200281019061169c9190612b06565b6116aa906080810190612b42565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152505050908252506020018787868181106116f2576116f2612a4b565b90506020028101906117049190612b06565b6117129060a0810190612b42565b808060200260200160405190810160405280939291908181526020018383602002808284375f920182905250939094525050838152606860209081526040918290208451815584820151600182015591840151805192935061177d92600285019291909101906124e4565b506060820151805161179991600384019160209091019061256c565b50608082015180516117b591600484019160209091019061256c565b5060a082015180516117d191600584019160209091019061256c565b50506040517f944fa746000000000000000000000000000000000000000000000000000000008152600481018390525f91507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063944fa74690602401602060405180830381865afa15801561185f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118839190612aef565b90505f805f8567ffffffffffffffff8111156118a1576118a1612a8b565b6040519080825280602002602001820160405280156118ca578160200160208202803683370190505b5090505f8667ffffffffffffffff8111156118e7576118e7612a8b565b604051908082528060200260200182016040528015611910578160200160208202803683370190505b5090505f5b87811015611b915760148c8c8b81811061193157611931612a4b565b90506020028101906119439190612b06565b6119519060a0810190612b42565b8381811061196157611961612a4b565b9050602002013511156119b65760405162461bcd60e51b815260206004820152601d60248201527f696e76616c69642073657175656e6365727320636f6d6d697373696f6e00000060448201526064016105c9565b8b8b8a8181106119c8576119c8612a4b565b90506020028101906119da9190612b06565b6119e8906080810190612b42565b828181106119f8576119f8612a4b565b9050602002013584611a0a9190612a32565b93508b8b8a818110611a1e57611a1e612a4b565b9050602002810190611a309190612b06565b611a3e906060810190612b42565b82818110611a4e57611a4e612a4b565b9050602002013585611a609190612a32565b94505f6305f5e1008d8d8c818110611a7a57611a7a612a4b565b9050602002810190611a8c9190612b06565b611a9a906080810190612b42565b84818110611aaa57611aaa612a4b565b9050602002013588611abc9190612bad565b611ac69190612bc4565b905060648d8d8c818110611adc57611adc612a4b565b9050602002810190611aee9190612b06565b611afc9060a0810190612b42565b84818110611b0c57611b0c612a4b565b9050602002013582611b1e9190612bad565b611b289190612bc4565b838381518110611b3a57611b3a612a4b565b602002602001018181525050828281518110611b5857611b58612a4b565b602002602001015181611b6b9190612a78565b848381518110611b7d57611b7d612a4b565b602090810291909101015250600101611915565b508a8a89818110611ba457611ba4612a4b565b9050602002810190611bb69190612b06565b602001358414611c085760405162461bcd60e51b815260206004820152601960248201527f696e76616c69642073657175656e6365727320626c6f636b730000000000000060448201526064016105c9565b6305f5e100831115611c5c5760405162461bcd60e51b815260206004820152601960248201527f696e76616c69642073657175656e6365727320726174696f730000000000000060448201526064016105c9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cdd0c50e878d8d8c818110611cab57611cab612a4b565b9050602002810190611cbd9190612b06565b611ccb906040810190612b42565b86866040518663ffffffff1660e01b8152600401611ced959493929190612bfc565b5f604051808303815f87803b158015611d04575f80fd5b505af1158015611d16573d5f803e3d5ffd5b505060019099019850611374975050505050505050565b50606b546040518381527f4aa68efd05426e59a9d43654a55a2a74c3e8840894d6e291f8f83085e3a6d1ea9060200160405180910390a280606c5f828254611d759190612a32565b9091555050606b80548391905f90611d8e908490612a32565b9091555050505050565b611da061247d565b611da95f612407565b565b606082821015611dfd5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b611e078383612a78565b611e12906001612a32565b67ffffffffffffffff811115611e2a57611e2a612a8b565b604051908082528060200260200182016040528015611e9257816020015b611e7f6040518060c001604052805f81526020015f8152602001606081526020016060815260200160608152602001606081525090565b815260200190600190039081611e485790505b509050825b828111610eee575f81815260686020908152604091829020825160c0810184528154815260018201548184015260028201805485518186028101860187528181529295939493860193830182828015611f2457602002820191905f5260205f20905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611ef9575b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015611f7a57602002820191905f5260205f20905b815481526020019060010190808311611f66575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015611fd057602002820191905f5260205f20905b815481526020019060010190808311611fbc575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561202657602002820191905f5260205f20905b815481526020019060010190808311612012575b50505050508152505082828151811061204157612041612a4b565b6020026020010181905250808061205790612ab8565b915050611e97565b61206761247d565b73ffffffffffffffffffffffffffffffffffffffff81166120f05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105c9565b6120f981612407565b50565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146121795760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105c9565b806121c65760405162461bcd60e51b815260206004820152601360248201527f656d70747920726f6c6c75702065706f6368730000000000000000000000000060448201526064016105c9565b5f5b818110156123bc5780606a546121de9190612a32565b8383838181106121f0576121f0612a4b565b905060a002015f0135146122465760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b6040518060a0016040528084848481811061226357612263612a4b565b905060a002015f0135815260200184848481811061228357612283612a4b565b905060a00201602001602081019061229b91906126a0565b73ffffffffffffffffffffffffffffffffffffffff1681526020018484848181106122c8576122c8612a4b565b905060a002016040013581526020018484848181106122e9576122e9612a4b565b905060a0020160600135815260200184848481811061230a5761230a612a4b565b905060a002016080013581525060675f85858581811061232c5761232c612a4b565b60a002919091013582525060208082019290925260409081015f208351815591830151600180840180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9093169290921790915590830151600283015560608301516003830155608090920151600490910155016121c8565b50606a546040518281527f0c53377f3eed25c9883c67adabc3f817b4fdcde29f550a6a26c0676ed29929299060200160405180910390a281819050606a5f828254610ca29190612a32565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60335473ffffffffffffffffffffffffffffffffffffffff163314611da95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105c9565b828054828255905f5260205f2090810192821561255c579160200282015b8281111561255c57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190612502565b506125689291506125a5565b5090565b828054828255905f5260205f2090810192821561255c579160200282015b8281111561255c57825182559160200191906001019061258a565b5b80821115612568575f81556001016125a6565b5f602082840312156125c9575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146125f3575f80fd5b919050565b5f805f6060848603121561260a575f80fd5b612613846125d0565b9250612621602085016125d0565b9150604084013590509250925092565b5f8060208385031215612642575f80fd5b823567ffffffffffffffff80821115612659575f80fd5b818501915085601f83011261266c575f80fd5b81358181111561267a575f80fd5b86602060c08302850101111561268e575f80fd5b60209290920196919550909350505050565b5f602082840312156126b0575f80fd5b6126b9826125d0565b9392505050565b5f80604083850312156126d1575f80fd5b50508035926020909101359150565b602080825282518282018190525f919060409081850190868401855b82811015612756578151805185528681015173ffffffffffffffffffffffffffffffffffffffff16878601528581015186860152606080820151908601526080908101519085015260a090930192908501906001016126fc565b5091979650505050505050565b602080825282518282018190525f919060409081850190868401855b82811015612756578151805185528681015173ffffffffffffffffffffffffffffffffffffffff16878601528581015186860152606080820151908601526080808201519086015260a0908101519085015260c0909301929085019060010161277f565b5f80602083850312156127f4575f80fd5b823567ffffffffffffffff8082111561280b575f80fd5b818501915085601f83011261281e575f80fd5b81358181111561282c575f80fd5b8660208260051b850101111561268e575f80fd5b5f815180845260208085019450602084015f5b8381101561286f57815187529582019590820190600101612853565b509495945050505050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b8381101561299a578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc001855281518051845287810151888501528681015160c0888601819052815190860181905260e08601918a01905f905b8082101561293357825173ffffffffffffffffffffffffffffffffffffffff168452928b0192918b0191600191909101906128fd565b5050506060808301518683038288015261294d8382612840565b92505050608080830151868303828801526129688382612840565b9250505060a080830151925085820381870152506129868183612840565b9689019694505050908601906001016128a1565b509098975050505050505050565b5f80602083850312156129b9575f80fd5b823567ffffffffffffffff808211156129d0575f80fd5b818501915085601f8301126129e3575f80fd5b8135818111156129f1575f80fd5b86602060a08302850101111561268e575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115612a4557612a45612a05565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81810381811115612a4557612a45612a05565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ae857612ae8612a05565b5060010190565b5f60208284031215612aff575f80fd5b5051919050565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41833603018112612b38575f80fd5b9190910192915050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612b75575f80fd5b83018035915067ffffffffffffffff821115612b8f575f80fd5b6020019150600581901b3603821315612ba6575f80fd5b9250929050565b8082028115828204841417612a4557612a45612a05565b5f82612bf7577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b858152608060208083018290529082018590525f90869060a08401835b88811015612c525773ffffffffffffffffffffffffffffffffffffffff612c3f856125d0565b1682529282019290820190600101612c19565b508481036040860152612c658188612840565b925050508281036060840152612c7b8185612840565b9897505050505050505056fea164736f6c6343000818000a diff --git a/bindings/bindings/distribute.go b/bindings/bindings/distribute.go deleted file mode 100644 index 3632a94b0..000000000 --- a/bindings/bindings/distribute.go +++ /dev/null @@ -1,1327 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package bindings - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/morph-l2/go-ethereum" - "github.com/morph-l2/go-ethereum/accounts/abi" - "github.com/morph-l2/go-ethereum/accounts/abi/bind" - "github.com/morph-l2/go-ethereum/common" - "github.com/morph-l2/go-ethereum/core/types" - "github.com/morph-l2/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 -) - -// DistributeMetaData contains all meta data concerning the Distribute contract. -var DistributeMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CommissionClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"upToEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RewardClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"L2_STAKING_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MORPH_TOKEN_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RECORD_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"targetEpochIndex\",\"type\":\"uint256\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"targetEpochIndex\",\"type\":\"uint256\"}],\"name\":\"claimAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"claimCommission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"targetEpochIndex\",\"type\":\"uint256\"}],\"name\":\"cleanDistributions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"isRewardClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"claimed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"effectiveEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"newDelegation\",\"type\":\"bool\"}],\"name\":\"notifyDelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"effectiveEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"notifyUndelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"queryAllUnclaimed\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"delegatees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"rewards\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"queryAllUnclaimedEpochs\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"\",\"type\":\"bool[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"queryOldestDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epochIndex\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"queryUnclaimed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"queryUnclaimedCommission\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epochIndex\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"sequencers\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"delegatorRewards\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"commissionsAmount\",\"type\":\"uint256[]\"}],\"name\":\"updateEpochReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e060405234801562000010575f80fd5b5073530000000000000000000000000000000000001360805273530000000000000000000000000000000000001560a05273530000000000000000000000000000000000001260c0526200006362000069565b62000127565b5f54610100900460ff1615620000d55760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161462000125575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805160a05160c051612a2e620001915f395f818161030901526117a901525f81816101d9015281816107ca015281816109d9015281816112330152818161135801526114a101525f8181610343015281816120e20152818161219501526122320152612a2e5ff3fe608060405234801561000f575f80fd5b5060043610610163575f3560e01c8063a766c529116100c7578063cd4281d01161007d578063d557714111610063578063d55771411461033e578063de6ac93314610365578063f2fde38b14610388575f80fd5b8063cd4281d014610304578063cdd0c50e1461032b575f80fd5b8063b809af0f116100ad578063b809af0f146102b6578063bf2dca0a146102c9578063c4d66de8146102f1575f80fd5b8063a766c5291461027b578063ac2ac640146102a3575f80fd5b8063807de4431161011c578063921ae9b811610102578063921ae9b8146102245780639889be5114610247578063996cba6814610268575f80fd5b8063807de443146101d45780638da5cb5b14610213575f80fd5b80635cf20c7b1161014c5780635cf20c7b146101a6578063715018a6146101b95780637f683ee3146101c1575f80fd5b8063273d8e82146101675780634eedab3214610191575b5f80fd5b61017a610175366004612537565b61039b565b6040516101889291906125c2565b60405180910390f35b6101a461019f3660046125ef565b610729565b005b6101a46101b43660046125ef565b6107c7565b6101a46109c3565b6101a46101cf366004612617565b6109d6565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610188565b6033546001600160a01b03166101fb565b610237610232366004612537565b610c1c565b6040516101889493929190612656565b61025a6102553660046126d5565b610f59565b604051908152602001610188565b6101a4610276366004612706565b611230565b61025a610289366004612537565b6001600160a01b03165f9081526067602052604090205490565b6101a46102b1366004612537565b611355565b6101a46102c436600461274c565b61149e565b61025a6102d7366004612537565b6001600160a01b03165f9081526068602052604090205490565b6101a46102ff366004612537565b6115dc565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6101a46103393660046127f3565b6117a6565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6103786103733660046126d5565b611b06565b6040519015158152602001610188565b6101a4610396366004612537565b611b31565b6001600160a01b0381165f90815260696020526040812060609182916103c090611bc1565b9050805f0361043c5760405162461bcd60e51b815260206004820152602860248201527f696e76616c69642064656c656761746f72206f72206e6f2072656d61696e696e60448201527f672072657761726400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b8067ffffffffffffffff8111156104555761045561288f565b60405190808252806020026020018201604052801561047e578160200160208202803683370190505b5092508067ffffffffffffffff81111561049a5761049a61288f565b6040519080825280602002602001820160405280156104c3578160200160208202803683370190505b5091505f5b6001600160a01b0385165f9081526069602052604090206104e890611bc1565b811015610722576001600160a01b0385165f9081526069602052604081206105109083611bca565b6001600160a01b038088165f908152606960209081526040808320938516835260039093019052908120549192509081908190805b6065548110156106bf576001600160a01b038087165f9081526066602090815260408083208584528252808320938f168352600490930190522054156105b9576001600160a01b038087165f9081526066602090815260408083208584528252808320938f16835260049093019052205492505b6001600160a01b0386165f9081526066602090815260408083208484529091529020600101541561060d576001600160a01b0386165f90815260666020908152604080832084845290915290206001015493505b6001600160a01b0386165f908152606660209081526040808320848452909152902054849061063d9085906128e9565b6106479190612900565b6106519086612938565b6001600160a01b03808d165f908152606960209081526040808320938b16835260029093019052205490955060ff1680156106b357506001600160a01b03808c165f908152606960209081526040808320938a16835260049093019052205481145b6106bf57600101610545565b50848987815181106106d3576106d361294b565b60200260200101906001600160a01b031690816001600160a01b031681525050838887815181106107065761070661294b565b60209081029190910101525050600190930192506104c8915050565b5050915091565b610731611bdc565b6001600160a01b0382165f908152606760205260409020545b8181116107a8576001600160a01b0383165f908152606660209081526040808320848452909152812081815560018101829055906002820181818161078f82826124ee565b50505050505080806107a090612978565b91505061074a565b6001600160a01b039092165f9081526067602052604090209190915550565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461083f5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6065545f036108905760405162461bcd60e51b815260206004820152600e60248201527f6e6f74206d696e746564207965740000000000000000000000000000000000006044820152606401610433565b5f8115806108ab575060016065546108a891906129af565b82115b6108b557816108c4565b60016065546108c491906129af565b90505f805b6001600160a01b0385165f9081526069602052604090206108e990611bc1565b8110156109ac576001600160a01b0385165f90815260696020526040812081906109139084611bca565b6001600160a01b0388165f9081526069602052604090209091506109379082611c36565b801561096b57506001600160a01b038088165f90815260696020908152604080832093851683526003909301905220548510155b15610992575f8061097d838a89611c57565b909250905061098c8287612938565b95509250505b816109a557826109a181612978565b9350505b50506108c9565b5080156109bd576109bd84826120b2565b50505050565b6109cb611bdc565b6109d45f612308565b565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610a4e5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6001600160a01b0384165f9081526066602090815260408083208584529091529020600101819055811580610aaa57506001600160a01b038084165f908152606960209081526040808320938816835260039093019052205482145b15610b8f576001600160a01b0384165f9081526066602090815260408083208584529091529020610ade9060020184612371565b506001600160a01b038085165f90815260666020908152604080832086845282528083209387168352600490930181528282208290556069905220610b239085612371565b506001600160a01b038381165f908152606960209081526040808320938816835260028401825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560038401825280832083905560049093019052908120556109bd565b6001600160a01b038084165f9081526069602090815260408083209388168352600290930190522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155610bed90836129af565b6001600160a01b038085165f908152606960209081526040808320938916835260049093019052205550505050565b6001600160a01b0381165f908152606960205260408120606091829182918291610c4590611bc1565b90505f8167ffffffffffffffff811115610c6157610c6161288f565b604051908082528060200260200182016040528015610c8a578160200160208202803683370190505b5090505f8267ffffffffffffffff811115610ca757610ca761288f565b604051908082528060200260200182016040528015610cd0578160200160208202803683370190505b5090505f8367ffffffffffffffff811115610ced57610ced61288f565b604051908082528060200260200182016040528015610d16578160200160208202803683370190505b5090505f8467ffffffffffffffff811115610d3357610d3361288f565b604051908082528060200260200182016040528015610d5c578160200160208202803683370190505b5090505f5b85811015610f48576001600160a01b038b165f908152606960205260409020610d8a9082611bca565b858281518110610d9c57610d9c61294b565b60200260200101906001600160a01b031690816001600160a01b03168152505060695f8c6001600160a01b03166001600160a01b031681526020019081526020015f206002015f868381518110610df557610df561294b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f9054906101000a900460ff16848281518110610e3b57610e3b61294b565b9115156020928302919091018201526001600160a01b038c165f908152606990915260408120865160039091019190879084908110610e7c57610e7c61294b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2054838281518110610eb657610eb661294b565b60200260200101818152505060695f8c6001600160a01b03166001600160a01b031681526020019081526020015f206004015f868381518110610efb57610efb61294b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2054828281518110610f3557610f3561294b565b6020908102919091010152600101610d61565b509299919850965090945092505050565b6001600160a01b0381165f908152606960205260408120610f7990611bc1565b5f03610fed5760405162461bcd60e51b815260206004820152602860248201527f696e76616c69642064656c656761746f72206f72206e6f2072656d61696e696e60448201527f67207265776172640000000000000000000000000000000000000000000000006064820152608401610433565b6001600160a01b0382165f90815260696020526040902061100e9084611c36565b61107f5760405162461bcd60e51b8152602060048201526024808201527f6e6f2072656d61696e696e6720726577617264206f66207468652064656c656760448201527f61746565000000000000000000000000000000000000000000000000000000006064820152608401610433565b6001600160a01b038083165f9081526069602090815260408083209387168352600390930190529081205481905b606554811015611227576001600160a01b038087165f9081526066602090815260408083208584528252808320938916835260049093019052205415611121576001600160a01b038087165f9081526066602090815260408083208584528252808320938916835260049093019052205491505b6001600160a01b0386165f90815260666020908152604080832084845290915290206001015415611175576001600160a01b0386165f90815260666020908152604080832084845290915290206001015492505b6001600160a01b0386165f90815260666020908152604080832084845290915290205483906111a59084906128e9565b6111af9190612900565b6111b99085612938565b6001600160a01b038087165f908152606960209081526040808320938b16835260029093019052205490945060ff16801561121b57506001600160a01b038086165f908152606960209081526040808320938a16835260049093019052205481145b611227576001016110ad565b50505092915050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146112a85760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6065545f036112f95760405162461bcd60e51b815260206004820152600e60248201527f6e6f74206d696e746564207965740000000000000000000000000000000000006044820152606401610433565b5f8115806113145750600160655461131191906129af565b82115b61131e578161132d565b600160655461132d91906129af565b90505f61133b858584611c57565b509050801561134e5761134e84826120b2565b5050505050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146113cd5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6001600160a01b0381165f908152606860205260409020546114315760405162461bcd60e51b815260206004820152601660248201527f6e6f20636f6d6d697373696f6e20746f20636c61696d000000000000000000006044820152606401610433565b6001600160a01b0381165f908152606860205260408120805491905561145782826120b2565b816001600160a01b03167f8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e4118260405161149291815260200190565b60405180910390a25050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146115165760405162461bcd60e51b815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f7765646044820152606401610433565b6001600160a01b0386165f90815260666020908152604080832087845290915290206001810183905561154c9060020186612385565b506001600160a01b038087165f90815260666020908152604080832088845282528083209389168352600490930190522083905580156115d4576001600160a01b0385165f9081526069602052604090206115a79087612385565b506001600160a01b038086165f908152606960209081526040808320938a16835260039093019052208490555b505050505050565b5f54610100900460ff16158080156115fa57505f54600160ff909116105b806116135750303b15801561161357505f5460ff166001145b6116855760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610433565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156116e1575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b0382166117375760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e6572206164647265737300000000000000000000006044820152606401610433565b61174082612308565b80156117a2575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461181e5760405162461bcd60e51b815260206004820152601c60248201527f6f6e6c79207265636f726420636f6e747261637420616c6c6f776564000000006044820152606401610433565b60658054905f61182d83612978565b919050555086600160655461184291906129af565b1461188f5760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642065706f636820696e646578000000000000000000000000006044820152606401610433565b828514801561189d57508085145b6118e95760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642064617461206c656e677468000000000000000000000000006044820152606401610433565b5f5b85811015611afc578484828181106119055761190561294b565b9050602002013560665f8989858181106119215761192161294b565b90506020020160208101906119369190612537565b6001600160a01b0316815260208082019290925260409081015f9081208c82529092528120919091556066908888848181106119745761197461294b565b90506020020160208101906119899190612537565b6001600160a01b0316815260208082019290925260409081015f9081208b82529092529020600101541580156119be57505f88115b15611a7f5760665f8888848181106119d8576119d861294b565b90506020020160208101906119ed9190612537565b6001600160a01b03166001600160a01b031681526020019081526020015f205f60018a611a1a91906129af565b81526020019081526020015f206001015460665f898985818110611a4057611a4061294b565b9050602002016020810190611a559190612537565b6001600160a01b0316815260208082019290925260409081015f9081208c82529092529020600101555b828282818110611a9157611a9161294b565b9050602002013560685f898985818110611aad57611aad61294b565b9050602002016020810190611ac29190612537565b6001600160a01b03166001600160a01b031681526020019081526020015f205f828254611aef9190612938565b90915550506001016118eb565b5050505050505050565b6001600160a01b0382165f908152606960205260408120611b279083611c36565b1590505b92915050565b611b39611bdc565b6001600160a01b038116611bb55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610433565b611bbe81612308565b50565b5f611b2b825490565b5f611bd58383612399565b9392505050565b6033546001600160a01b031633146109d45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610433565b6001600160a01b0381165f9081526001830160205260408120541515611bd5565b6001600160a01b0382165f9081526069602052604081208190611c7a9086611c36565b611cc65760405162461bcd60e51b815260206004820152601360248201527f6e6f2072656d61696e696e6720726577617264000000000000000000000000006044820152606401610433565b6001600160a01b038085165f9081526069602090815260408083209389168352600390930190522054831015611d3e5760405162461bcd60e51b815260206004820152601260248201527f616c6c2072657761726420636c61696d656400000000000000000000000000006044820152606401610433565b6001600160a01b038085165f9081526069602090815260408083209389168352600390930190529081205481905b858111611f7f576001600160a01b038089165f9081526066602090815260408083208584528252808320938b16835260049093019052205415611ddd576001600160a01b038089165f9081526066602090815260408083208584528252808320938b16835260049093019052205491505b6001600160a01b0388165f90815260666020908152604080832084845290915290206001015415611e31576001600160a01b0388165f90815260666020908152604080832084845290915290206001015492505b6001600160a01b0388165f9081526066602090815260408083208484529091529020548390611e619084906128e9565b611e6b9190612900565b611e759086612938565b6001600160a01b038089165f908152606960209081526040808320938d16835260029093019052205490955060ff168015611ed757506001600160a01b038088165f908152606960209081526040808320938c16835260049093019052205481145b15611f6d576001600160a01b0387165f90815260696020526040902060019450611f019089612371565b506001600160a01b038781165f908152606960209081526040808320938c16835260028401825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556003840182528083208390556004909301905290812055611f7f565b80611f7781612978565b915050611d6c565b50611f8b856001612938565b6001600160a01b038088165f908152606960209081526040808320938c16835260039093018152828220939093556066909252812090611fcc876001612938565b81526020019081526020015f206004015f876001600160a01b03166001600160a01b031681526020019081526020015f20545f03612052576001600160a01b0387165f9081526066602052604081208291612028886001612938565b815260208082019290925260409081015f9081206001600160a01b038b1682526004019092529020555b866001600160a01b0316866001600160a01b03167f7a84a08b02c91f3c62d572853f966fc799bbd121e8ad7833a4494ab8dcfcb40487876040516120a0929190918252602082015260400190565b60405180910390a35050935093915050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561212f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061215391906129c2565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af11580156121dd573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061220191906129d9565b506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561227f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a391906129c2565b90505f831180156122bc5750826122ba82846129af565b145b6109bd5760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610433565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f611bd5836001600160a01b0384166123bf565b5f611bd5836001600160a01b0384166124a2565b5f825f0182815481106123ae576123ae61294b565b905f5260205f200154905092915050565b5f8181526001830160205260408120548015612499575f6123e16001836129af565b85549091505f906123f4906001906129af565b9050818114612453575f865f0182815481106124125761241261294b565b905f5260205f200154905080875f0184815481106124325761243261294b565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080612464576124646129f4565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050611b2b565b5f915050611b2b565b5f8181526001830160205260408120546124e757508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155611b2b565b505f611b2b565b5080545f8255905f5260205f2090810190611bbe91905b80821115612518575f8155600101612505565b5090565b80356001600160a01b0381168114612532575f80fd5b919050565b5f60208284031215612547575f80fd5b611bd58261251c565b5f815180845260208085019450602084015f5b838110156125885781516001600160a01b031687529582019590820190600101612563565b509495945050505050565b5f815180845260208085019450602084015f5b83811015612588578151875295820195908201906001016125a6565b604081525f6125d46040830185612550565b82810360208401526125e68185612593565b95945050505050565b5f8060408385031215612600575f80fd5b6126098361251c565b946020939093013593505050565b5f805f806080858703121561262a575f80fd5b6126338561251c565b93506126416020860161251c565b93969395505050506040820135916060013590565b608081525f6126686080830187612550565b8281036020848101919091528651808352878201928201905f5b818110156126a0578451151583529383019391830191600101612682565b505084810360408601526126b48188612593565b9250505082810360608401526126ca8185612593565b979650505050505050565b5f80604083850312156126e6575f80fd5b6126ef8361251c565b91506126fd6020840161251c565b90509250929050565b5f805f60608486031215612718575f80fd5b6127218461251c565b925061272f6020850161251c565b9150604084013590509250925092565b8015158114611bbe575f80fd5b5f805f805f8060c08789031215612761575f80fd5b61276a8761251c565b95506127786020880161251c565b945060408701359350606087013592506080870135915060a087013561279d8161273f565b809150509295509295509295565b5f8083601f8401126127bb575f80fd5b50813567ffffffffffffffff8111156127d2575f80fd5b6020830191508360208260051b85010111156127ec575f80fd5b9250929050565b5f805f805f805f6080888a031215612809575f80fd5b87359650602088013567ffffffffffffffff80821115612827575f80fd5b6128338b838c016127ab565b909850965060408a013591508082111561284b575f80fd5b6128578b838c016127ab565b909650945060608a013591508082111561286f575f80fd5b5061287c8a828b016127ab565b989b979a50959850939692959293505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417611b2b57611b2b6128bc565b5f82612933577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b80820180821115611b2b57611b2b6128bc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036129a8576129a86128bc565b5060010190565b81810381811115611b2b57611b2b6128bc565b5f602082840312156129d2575f80fd5b5051919050565b5f602082840312156129e9575f80fd5b8151611bd58161273f565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a", -} - -// DistributeABI is the input ABI used to generate the binding from. -// Deprecated: Use DistributeMetaData.ABI instead. -var DistributeABI = DistributeMetaData.ABI - -// DistributeBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use DistributeMetaData.Bin instead. -var DistributeBin = DistributeMetaData.Bin - -// DeployDistribute deploys a new Ethereum contract, binding an instance of Distribute to it. -func DeployDistribute(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Distribute, error) { - parsed, err := DistributeMetaData.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(DistributeBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Distribute{DistributeCaller: DistributeCaller{contract: contract}, DistributeTransactor: DistributeTransactor{contract: contract}, DistributeFilterer: DistributeFilterer{contract: contract}}, nil -} - -// Distribute is an auto generated Go binding around an Ethereum contract. -type Distribute struct { - DistributeCaller // Read-only binding to the contract - DistributeTransactor // Write-only binding to the contract - DistributeFilterer // Log filterer for contract events -} - -// DistributeCaller is an auto generated read-only Go binding around an Ethereum contract. -type DistributeCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// DistributeTransactor is an auto generated write-only Go binding around an Ethereum contract. -type DistributeTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// DistributeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type DistributeFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// DistributeSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type DistributeSession struct { - Contract *Distribute // 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 -} - -// DistributeCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type DistributeCallerSession struct { - Contract *DistributeCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// DistributeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type DistributeTransactorSession struct { - Contract *DistributeTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// DistributeRaw is an auto generated low-level Go binding around an Ethereum contract. -type DistributeRaw struct { - Contract *Distribute // Generic contract binding to access the raw methods on -} - -// DistributeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type DistributeCallerRaw struct { - Contract *DistributeCaller // Generic read-only contract binding to access the raw methods on -} - -// DistributeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type DistributeTransactorRaw struct { - Contract *DistributeTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewDistribute creates a new instance of Distribute, bound to a specific deployed contract. -func NewDistribute(address common.Address, backend bind.ContractBackend) (*Distribute, error) { - contract, err := bindDistribute(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Distribute{DistributeCaller: DistributeCaller{contract: contract}, DistributeTransactor: DistributeTransactor{contract: contract}, DistributeFilterer: DistributeFilterer{contract: contract}}, nil -} - -// NewDistributeCaller creates a new read-only instance of Distribute, bound to a specific deployed contract. -func NewDistributeCaller(address common.Address, caller bind.ContractCaller) (*DistributeCaller, error) { - contract, err := bindDistribute(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &DistributeCaller{contract: contract}, nil -} - -// NewDistributeTransactor creates a new write-only instance of Distribute, bound to a specific deployed contract. -func NewDistributeTransactor(address common.Address, transactor bind.ContractTransactor) (*DistributeTransactor, error) { - contract, err := bindDistribute(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &DistributeTransactor{contract: contract}, nil -} - -// NewDistributeFilterer creates a new log filterer instance of Distribute, bound to a specific deployed contract. -func NewDistributeFilterer(address common.Address, filterer bind.ContractFilterer) (*DistributeFilterer, error) { - contract, err := bindDistribute(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &DistributeFilterer{contract: contract}, nil -} - -// bindDistribute binds a generic wrapper to an already deployed contract. -func bindDistribute(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := DistributeMetaData.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 (_Distribute *DistributeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Distribute.Contract.DistributeCaller.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 (_Distribute *DistributeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Distribute.Contract.DistributeTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Distribute *DistributeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Distribute.Contract.DistributeTransactor.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 (_Distribute *DistributeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Distribute.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 (_Distribute *DistributeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Distribute.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Distribute *DistributeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Distribute.Contract.contract.Transact(opts, method, params...) -} - -// L2STAKINGCONTRACT is a free data retrieval call binding the contract method 0x807de443. -// -// Solidity: function L2_STAKING_CONTRACT() view returns(address) -func (_Distribute *DistributeCaller) L2STAKINGCONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "L2_STAKING_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// L2STAKINGCONTRACT is a free data retrieval call binding the contract method 0x807de443. -// -// Solidity: function L2_STAKING_CONTRACT() view returns(address) -func (_Distribute *DistributeSession) L2STAKINGCONTRACT() (common.Address, error) { - return _Distribute.Contract.L2STAKINGCONTRACT(&_Distribute.CallOpts) -} - -// L2STAKINGCONTRACT is a free data retrieval call binding the contract method 0x807de443. -// -// Solidity: function L2_STAKING_CONTRACT() view returns(address) -func (_Distribute *DistributeCallerSession) L2STAKINGCONTRACT() (common.Address, error) { - return _Distribute.Contract.L2STAKINGCONTRACT(&_Distribute.CallOpts) -} - -// MORPHTOKENCONTRACT is a free data retrieval call binding the contract method 0xd5577141. -// -// Solidity: function MORPH_TOKEN_CONTRACT() view returns(address) -func (_Distribute *DistributeCaller) MORPHTOKENCONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "MORPH_TOKEN_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// MORPHTOKENCONTRACT is a free data retrieval call binding the contract method 0xd5577141. -// -// Solidity: function MORPH_TOKEN_CONTRACT() view returns(address) -func (_Distribute *DistributeSession) MORPHTOKENCONTRACT() (common.Address, error) { - return _Distribute.Contract.MORPHTOKENCONTRACT(&_Distribute.CallOpts) -} - -// MORPHTOKENCONTRACT is a free data retrieval call binding the contract method 0xd5577141. -// -// Solidity: function MORPH_TOKEN_CONTRACT() view returns(address) -func (_Distribute *DistributeCallerSession) MORPHTOKENCONTRACT() (common.Address, error) { - return _Distribute.Contract.MORPHTOKENCONTRACT(&_Distribute.CallOpts) -} - -// RECORDCONTRACT is a free data retrieval call binding the contract method 0xcd4281d0. -// -// Solidity: function RECORD_CONTRACT() view returns(address) -func (_Distribute *DistributeCaller) RECORDCONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "RECORD_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// RECORDCONTRACT is a free data retrieval call binding the contract method 0xcd4281d0. -// -// Solidity: function RECORD_CONTRACT() view returns(address) -func (_Distribute *DistributeSession) RECORDCONTRACT() (common.Address, error) { - return _Distribute.Contract.RECORDCONTRACT(&_Distribute.CallOpts) -} - -// RECORDCONTRACT is a free data retrieval call binding the contract method 0xcd4281d0. -// -// Solidity: function RECORD_CONTRACT() view returns(address) -func (_Distribute *DistributeCallerSession) RECORDCONTRACT() (common.Address, error) { - return _Distribute.Contract.RECORDCONTRACT(&_Distribute.CallOpts) -} - -// IsRewardClaimed is a free data retrieval call binding the contract method 0xde6ac933. -// -// Solidity: function isRewardClaimed(address delegator, address delegatee) view returns(bool claimed) -func (_Distribute *DistributeCaller) IsRewardClaimed(opts *bind.CallOpts, delegator common.Address, delegatee common.Address) (bool, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "isRewardClaimed", delegator, delegatee) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsRewardClaimed is a free data retrieval call binding the contract method 0xde6ac933. -// -// Solidity: function isRewardClaimed(address delegator, address delegatee) view returns(bool claimed) -func (_Distribute *DistributeSession) IsRewardClaimed(delegator common.Address, delegatee common.Address) (bool, error) { - return _Distribute.Contract.IsRewardClaimed(&_Distribute.CallOpts, delegator, delegatee) -} - -// IsRewardClaimed is a free data retrieval call binding the contract method 0xde6ac933. -// -// Solidity: function isRewardClaimed(address delegator, address delegatee) view returns(bool claimed) -func (_Distribute *DistributeCallerSession) IsRewardClaimed(delegator common.Address, delegatee common.Address) (bool, error) { - return _Distribute.Contract.IsRewardClaimed(&_Distribute.CallOpts, delegator, delegatee) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Distribute *DistributeCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Distribute.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 (_Distribute *DistributeSession) Owner() (common.Address, error) { - return _Distribute.Contract.Owner(&_Distribute.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Distribute *DistributeCallerSession) Owner() (common.Address, error) { - return _Distribute.Contract.Owner(&_Distribute.CallOpts) -} - -// QueryAllUnclaimed is a free data retrieval call binding the contract method 0x273d8e82. -// -// Solidity: function queryAllUnclaimed(address delegator) view returns(address[] delegatees, uint256[] rewards) -func (_Distribute *DistributeCaller) QueryAllUnclaimed(opts *bind.CallOpts, delegator common.Address) (struct { - Delegatees []common.Address - Rewards []*big.Int -}, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "queryAllUnclaimed", delegator) - - outstruct := new(struct { - Delegatees []common.Address - Rewards []*big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Delegatees = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.Rewards = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) - - return *outstruct, err - -} - -// QueryAllUnclaimed is a free data retrieval call binding the contract method 0x273d8e82. -// -// Solidity: function queryAllUnclaimed(address delegator) view returns(address[] delegatees, uint256[] rewards) -func (_Distribute *DistributeSession) QueryAllUnclaimed(delegator common.Address) (struct { - Delegatees []common.Address - Rewards []*big.Int -}, error) { - return _Distribute.Contract.QueryAllUnclaimed(&_Distribute.CallOpts, delegator) -} - -// QueryAllUnclaimed is a free data retrieval call binding the contract method 0x273d8e82. -// -// Solidity: function queryAllUnclaimed(address delegator) view returns(address[] delegatees, uint256[] rewards) -func (_Distribute *DistributeCallerSession) QueryAllUnclaimed(delegator common.Address) (struct { - Delegatees []common.Address - Rewards []*big.Int -}, error) { - return _Distribute.Contract.QueryAllUnclaimed(&_Distribute.CallOpts, delegator) -} - -// QueryAllUnclaimedEpochs is a free data retrieval call binding the contract method 0x921ae9b8. -// -// Solidity: function queryAllUnclaimedEpochs(address delegator) view returns(address[], bool[], uint256[], uint256[]) -func (_Distribute *DistributeCaller) QueryAllUnclaimedEpochs(opts *bind.CallOpts, delegator common.Address) ([]common.Address, []bool, []*big.Int, []*big.Int, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "queryAllUnclaimedEpochs", delegator) - - if err != nil { - return *new([]common.Address), *new([]bool), *new([]*big.Int), *new([]*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - out1 := *abi.ConvertType(out[1], new([]bool)).(*[]bool) - out2 := *abi.ConvertType(out[2], new([]*big.Int)).(*[]*big.Int) - out3 := *abi.ConvertType(out[3], new([]*big.Int)).(*[]*big.Int) - - return out0, out1, out2, out3, err - -} - -// QueryAllUnclaimedEpochs is a free data retrieval call binding the contract method 0x921ae9b8. -// -// Solidity: function queryAllUnclaimedEpochs(address delegator) view returns(address[], bool[], uint256[], uint256[]) -func (_Distribute *DistributeSession) QueryAllUnclaimedEpochs(delegator common.Address) ([]common.Address, []bool, []*big.Int, []*big.Int, error) { - return _Distribute.Contract.QueryAllUnclaimedEpochs(&_Distribute.CallOpts, delegator) -} - -// QueryAllUnclaimedEpochs is a free data retrieval call binding the contract method 0x921ae9b8. -// -// Solidity: function queryAllUnclaimedEpochs(address delegator) view returns(address[], bool[], uint256[], uint256[]) -func (_Distribute *DistributeCallerSession) QueryAllUnclaimedEpochs(delegator common.Address) ([]common.Address, []bool, []*big.Int, []*big.Int, error) { - return _Distribute.Contract.QueryAllUnclaimedEpochs(&_Distribute.CallOpts, delegator) -} - -// QueryOldestDistribution is a free data retrieval call binding the contract method 0xa766c529. -// -// Solidity: function queryOldestDistribution(address delegatee) view returns(uint256 epochIndex) -func (_Distribute *DistributeCaller) QueryOldestDistribution(opts *bind.CallOpts, delegatee common.Address) (*big.Int, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "queryOldestDistribution", delegatee) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// QueryOldestDistribution is a free data retrieval call binding the contract method 0xa766c529. -// -// Solidity: function queryOldestDistribution(address delegatee) view returns(uint256 epochIndex) -func (_Distribute *DistributeSession) QueryOldestDistribution(delegatee common.Address) (*big.Int, error) { - return _Distribute.Contract.QueryOldestDistribution(&_Distribute.CallOpts, delegatee) -} - -// QueryOldestDistribution is a free data retrieval call binding the contract method 0xa766c529. -// -// Solidity: function queryOldestDistribution(address delegatee) view returns(uint256 epochIndex) -func (_Distribute *DistributeCallerSession) QueryOldestDistribution(delegatee common.Address) (*big.Int, error) { - return _Distribute.Contract.QueryOldestDistribution(&_Distribute.CallOpts, delegatee) -} - -// QueryUnclaimed is a free data retrieval call binding the contract method 0x9889be51. -// -// Solidity: function queryUnclaimed(address delegatee, address delegator) view returns(uint256 reward) -func (_Distribute *DistributeCaller) QueryUnclaimed(opts *bind.CallOpts, delegatee common.Address, delegator common.Address) (*big.Int, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "queryUnclaimed", delegatee, delegator) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// QueryUnclaimed is a free data retrieval call binding the contract method 0x9889be51. -// -// Solidity: function queryUnclaimed(address delegatee, address delegator) view returns(uint256 reward) -func (_Distribute *DistributeSession) QueryUnclaimed(delegatee common.Address, delegator common.Address) (*big.Int, error) { - return _Distribute.Contract.QueryUnclaimed(&_Distribute.CallOpts, delegatee, delegator) -} - -// QueryUnclaimed is a free data retrieval call binding the contract method 0x9889be51. -// -// Solidity: function queryUnclaimed(address delegatee, address delegator) view returns(uint256 reward) -func (_Distribute *DistributeCallerSession) QueryUnclaimed(delegatee common.Address, delegator common.Address) (*big.Int, error) { - return _Distribute.Contract.QueryUnclaimed(&_Distribute.CallOpts, delegatee, delegator) -} - -// QueryUnclaimedCommission is a free data retrieval call binding the contract method 0xbf2dca0a. -// -// Solidity: function queryUnclaimedCommission(address delegatee) view returns(uint256 amount) -func (_Distribute *DistributeCaller) QueryUnclaimedCommission(opts *bind.CallOpts, delegatee common.Address) (*big.Int, error) { - var out []interface{} - err := _Distribute.contract.Call(opts, &out, "queryUnclaimedCommission", delegatee) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// QueryUnclaimedCommission is a free data retrieval call binding the contract method 0xbf2dca0a. -// -// Solidity: function queryUnclaimedCommission(address delegatee) view returns(uint256 amount) -func (_Distribute *DistributeSession) QueryUnclaimedCommission(delegatee common.Address) (*big.Int, error) { - return _Distribute.Contract.QueryUnclaimedCommission(&_Distribute.CallOpts, delegatee) -} - -// QueryUnclaimedCommission is a free data retrieval call binding the contract method 0xbf2dca0a. -// -// Solidity: function queryUnclaimedCommission(address delegatee) view returns(uint256 amount) -func (_Distribute *DistributeCallerSession) QueryUnclaimedCommission(delegatee common.Address) (*big.Int, error) { - return _Distribute.Contract.QueryUnclaimedCommission(&_Distribute.CallOpts, delegatee) -} - -// Claim is a paid mutator transaction binding the contract method 0x996cba68. -// -// Solidity: function claim(address delegatee, address delegator, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeTransactor) Claim(opts *bind.TransactOpts, delegatee common.Address, delegator common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "claim", delegatee, delegator, targetEpochIndex) -} - -// Claim is a paid mutator transaction binding the contract method 0x996cba68. -// -// Solidity: function claim(address delegatee, address delegator, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeSession) Claim(delegatee common.Address, delegator common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.Contract.Claim(&_Distribute.TransactOpts, delegatee, delegator, targetEpochIndex) -} - -// Claim is a paid mutator transaction binding the contract method 0x996cba68. -// -// Solidity: function claim(address delegatee, address delegator, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeTransactorSession) Claim(delegatee common.Address, delegator common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.Contract.Claim(&_Distribute.TransactOpts, delegatee, delegator, targetEpochIndex) -} - -// ClaimAll is a paid mutator transaction binding the contract method 0x5cf20c7b. -// -// Solidity: function claimAll(address delegator, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeTransactor) ClaimAll(opts *bind.TransactOpts, delegator common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "claimAll", delegator, targetEpochIndex) -} - -// ClaimAll is a paid mutator transaction binding the contract method 0x5cf20c7b. -// -// Solidity: function claimAll(address delegator, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeSession) ClaimAll(delegator common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.Contract.ClaimAll(&_Distribute.TransactOpts, delegator, targetEpochIndex) -} - -// ClaimAll is a paid mutator transaction binding the contract method 0x5cf20c7b. -// -// Solidity: function claimAll(address delegator, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeTransactorSession) ClaimAll(delegator common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.Contract.ClaimAll(&_Distribute.TransactOpts, delegator, targetEpochIndex) -} - -// ClaimCommission is a paid mutator transaction binding the contract method 0xac2ac640. -// -// Solidity: function claimCommission(address delegatee) returns() -func (_Distribute *DistributeTransactor) ClaimCommission(opts *bind.TransactOpts, delegatee common.Address) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "claimCommission", delegatee) -} - -// ClaimCommission is a paid mutator transaction binding the contract method 0xac2ac640. -// -// Solidity: function claimCommission(address delegatee) returns() -func (_Distribute *DistributeSession) ClaimCommission(delegatee common.Address) (*types.Transaction, error) { - return _Distribute.Contract.ClaimCommission(&_Distribute.TransactOpts, delegatee) -} - -// ClaimCommission is a paid mutator transaction binding the contract method 0xac2ac640. -// -// Solidity: function claimCommission(address delegatee) returns() -func (_Distribute *DistributeTransactorSession) ClaimCommission(delegatee common.Address) (*types.Transaction, error) { - return _Distribute.Contract.ClaimCommission(&_Distribute.TransactOpts, delegatee) -} - -// CleanDistributions is a paid mutator transaction binding the contract method 0x4eedab32. -// -// Solidity: function cleanDistributions(address delegatee, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeTransactor) CleanDistributions(opts *bind.TransactOpts, delegatee common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "cleanDistributions", delegatee, targetEpochIndex) -} - -// CleanDistributions is a paid mutator transaction binding the contract method 0x4eedab32. -// -// Solidity: function cleanDistributions(address delegatee, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeSession) CleanDistributions(delegatee common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.Contract.CleanDistributions(&_Distribute.TransactOpts, delegatee, targetEpochIndex) -} - -// CleanDistributions is a paid mutator transaction binding the contract method 0x4eedab32. -// -// Solidity: function cleanDistributions(address delegatee, uint256 targetEpochIndex) returns() -func (_Distribute *DistributeTransactorSession) CleanDistributions(delegatee common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _Distribute.Contract.CleanDistributions(&_Distribute.TransactOpts, delegatee, targetEpochIndex) -} - -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _owner) returns() -func (_Distribute *DistributeTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "initialize", _owner) -} - -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _owner) returns() -func (_Distribute *DistributeSession) Initialize(_owner common.Address) (*types.Transaction, error) { - return _Distribute.Contract.Initialize(&_Distribute.TransactOpts, _owner) -} - -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. -// -// Solidity: function initialize(address _owner) returns() -func (_Distribute *DistributeTransactorSession) Initialize(_owner common.Address) (*types.Transaction, error) { - return _Distribute.Contract.Initialize(&_Distribute.TransactOpts, _owner) -} - -// NotifyDelegation is a paid mutator transaction binding the contract method 0xb809af0f. -// -// Solidity: function notifyDelegation(address delegatee, address delegator, uint256 effectiveEpoch, uint256 amount, uint256 totalAmount, bool newDelegation) returns() -func (_Distribute *DistributeTransactor) NotifyDelegation(opts *bind.TransactOpts, delegatee common.Address, delegator common.Address, effectiveEpoch *big.Int, amount *big.Int, totalAmount *big.Int, newDelegation bool) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "notifyDelegation", delegatee, delegator, effectiveEpoch, amount, totalAmount, newDelegation) -} - -// NotifyDelegation is a paid mutator transaction binding the contract method 0xb809af0f. -// -// Solidity: function notifyDelegation(address delegatee, address delegator, uint256 effectiveEpoch, uint256 amount, uint256 totalAmount, bool newDelegation) returns() -func (_Distribute *DistributeSession) NotifyDelegation(delegatee common.Address, delegator common.Address, effectiveEpoch *big.Int, amount *big.Int, totalAmount *big.Int, newDelegation bool) (*types.Transaction, error) { - return _Distribute.Contract.NotifyDelegation(&_Distribute.TransactOpts, delegatee, delegator, effectiveEpoch, amount, totalAmount, newDelegation) -} - -// NotifyDelegation is a paid mutator transaction binding the contract method 0xb809af0f. -// -// Solidity: function notifyDelegation(address delegatee, address delegator, uint256 effectiveEpoch, uint256 amount, uint256 totalAmount, bool newDelegation) returns() -func (_Distribute *DistributeTransactorSession) NotifyDelegation(delegatee common.Address, delegator common.Address, effectiveEpoch *big.Int, amount *big.Int, totalAmount *big.Int, newDelegation bool) (*types.Transaction, error) { - return _Distribute.Contract.NotifyDelegation(&_Distribute.TransactOpts, delegatee, delegator, effectiveEpoch, amount, totalAmount, newDelegation) -} - -// NotifyUndelegation is a paid mutator transaction binding the contract method 0x7f683ee3. -// -// Solidity: function notifyUndelegation(address delegatee, address delegator, uint256 effectiveEpoch, uint256 totalAmount) returns() -func (_Distribute *DistributeTransactor) NotifyUndelegation(opts *bind.TransactOpts, delegatee common.Address, delegator common.Address, effectiveEpoch *big.Int, totalAmount *big.Int) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "notifyUndelegation", delegatee, delegator, effectiveEpoch, totalAmount) -} - -// NotifyUndelegation is a paid mutator transaction binding the contract method 0x7f683ee3. -// -// Solidity: function notifyUndelegation(address delegatee, address delegator, uint256 effectiveEpoch, uint256 totalAmount) returns() -func (_Distribute *DistributeSession) NotifyUndelegation(delegatee common.Address, delegator common.Address, effectiveEpoch *big.Int, totalAmount *big.Int) (*types.Transaction, error) { - return _Distribute.Contract.NotifyUndelegation(&_Distribute.TransactOpts, delegatee, delegator, effectiveEpoch, totalAmount) -} - -// NotifyUndelegation is a paid mutator transaction binding the contract method 0x7f683ee3. -// -// Solidity: function notifyUndelegation(address delegatee, address delegator, uint256 effectiveEpoch, uint256 totalAmount) returns() -func (_Distribute *DistributeTransactorSession) NotifyUndelegation(delegatee common.Address, delegator common.Address, effectiveEpoch *big.Int, totalAmount *big.Int) (*types.Transaction, error) { - return _Distribute.Contract.NotifyUndelegation(&_Distribute.TransactOpts, delegatee, delegator, effectiveEpoch, totalAmount) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Distribute *DistributeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Distribute *DistributeSession) RenounceOwnership() (*types.Transaction, error) { - return _Distribute.Contract.RenounceOwnership(&_Distribute.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Distribute *DistributeTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Distribute.Contract.RenounceOwnership(&_Distribute.TransactOpts) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Distribute *DistributeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Distribute *DistributeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Distribute.Contract.TransferOwnership(&_Distribute.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Distribute *DistributeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Distribute.Contract.TransferOwnership(&_Distribute.TransactOpts, newOwner) -} - -// UpdateEpochReward is a paid mutator transaction binding the contract method 0xcdd0c50e. -// -// Solidity: function updateEpochReward(uint256 epochIndex, address[] sequencers, uint256[] delegatorRewards, uint256[] commissionsAmount) returns() -func (_Distribute *DistributeTransactor) UpdateEpochReward(opts *bind.TransactOpts, epochIndex *big.Int, sequencers []common.Address, delegatorRewards []*big.Int, commissionsAmount []*big.Int) (*types.Transaction, error) { - return _Distribute.contract.Transact(opts, "updateEpochReward", epochIndex, sequencers, delegatorRewards, commissionsAmount) -} - -// UpdateEpochReward is a paid mutator transaction binding the contract method 0xcdd0c50e. -// -// Solidity: function updateEpochReward(uint256 epochIndex, address[] sequencers, uint256[] delegatorRewards, uint256[] commissionsAmount) returns() -func (_Distribute *DistributeSession) UpdateEpochReward(epochIndex *big.Int, sequencers []common.Address, delegatorRewards []*big.Int, commissionsAmount []*big.Int) (*types.Transaction, error) { - return _Distribute.Contract.UpdateEpochReward(&_Distribute.TransactOpts, epochIndex, sequencers, delegatorRewards, commissionsAmount) -} - -// UpdateEpochReward is a paid mutator transaction binding the contract method 0xcdd0c50e. -// -// Solidity: function updateEpochReward(uint256 epochIndex, address[] sequencers, uint256[] delegatorRewards, uint256[] commissionsAmount) returns() -func (_Distribute *DistributeTransactorSession) UpdateEpochReward(epochIndex *big.Int, sequencers []common.Address, delegatorRewards []*big.Int, commissionsAmount []*big.Int) (*types.Transaction, error) { - return _Distribute.Contract.UpdateEpochReward(&_Distribute.TransactOpts, epochIndex, sequencers, delegatorRewards, commissionsAmount) -} - -// DistributeCommissionClaimedIterator is returned from FilterCommissionClaimed and is used to iterate over the raw logs and unpacked data for CommissionClaimed events raised by the Distribute contract. -type DistributeCommissionClaimedIterator struct { - Event *DistributeCommissionClaimed // 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 *DistributeCommissionClaimedIterator) 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(DistributeCommissionClaimed) - 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(DistributeCommissionClaimed) - 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 *DistributeCommissionClaimedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *DistributeCommissionClaimedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// DistributeCommissionClaimed represents a CommissionClaimed event raised by the Distribute contract. -type DistributeCommissionClaimed struct { - Delegatee common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterCommissionClaimed is a free log retrieval operation binding the contract event 0x8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e411. -// -// Solidity: event CommissionClaimed(address indexed delegatee, uint256 amount) -func (_Distribute *DistributeFilterer) FilterCommissionClaimed(opts *bind.FilterOpts, delegatee []common.Address) (*DistributeCommissionClaimedIterator, error) { - - var delegateeRule []interface{} - for _, delegateeItem := range delegatee { - delegateeRule = append(delegateeRule, delegateeItem) - } - - logs, sub, err := _Distribute.contract.FilterLogs(opts, "CommissionClaimed", delegateeRule) - if err != nil { - return nil, err - } - return &DistributeCommissionClaimedIterator{contract: _Distribute.contract, event: "CommissionClaimed", logs: logs, sub: sub}, nil -} - -// WatchCommissionClaimed is a free log subscription operation binding the contract event 0x8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e411. -// -// Solidity: event CommissionClaimed(address indexed delegatee, uint256 amount) -func (_Distribute *DistributeFilterer) WatchCommissionClaimed(opts *bind.WatchOpts, sink chan<- *DistributeCommissionClaimed, delegatee []common.Address) (event.Subscription, error) { - - var delegateeRule []interface{} - for _, delegateeItem := range delegatee { - delegateeRule = append(delegateeRule, delegateeItem) - } - - logs, sub, err := _Distribute.contract.WatchLogs(opts, "CommissionClaimed", delegateeRule) - 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(DistributeCommissionClaimed) - if err := _Distribute.contract.UnpackLog(event, "CommissionClaimed", 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 -} - -// ParseCommissionClaimed is a log parse operation binding the contract event 0x8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e411. -// -// Solidity: event CommissionClaimed(address indexed delegatee, uint256 amount) -func (_Distribute *DistributeFilterer) ParseCommissionClaimed(log types.Log) (*DistributeCommissionClaimed, error) { - event := new(DistributeCommissionClaimed) - if err := _Distribute.contract.UnpackLog(event, "CommissionClaimed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// DistributeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Distribute contract. -type DistributeInitializedIterator struct { - Event *DistributeInitialized // 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 *DistributeInitializedIterator) 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(DistributeInitialized) - 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(DistributeInitialized) - 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 *DistributeInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *DistributeInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// DistributeInitialized represents a Initialized event raised by the Distribute contract. -type DistributeInitialized 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 (_Distribute *DistributeFilterer) FilterInitialized(opts *bind.FilterOpts) (*DistributeInitializedIterator, error) { - - logs, sub, err := _Distribute.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &DistributeInitializedIterator{contract: _Distribute.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 (_Distribute *DistributeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *DistributeInitialized) (event.Subscription, error) { - - logs, sub, err := _Distribute.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(DistributeInitialized) - if err := _Distribute.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 (_Distribute *DistributeFilterer) ParseInitialized(log types.Log) (*DistributeInitialized, error) { - event := new(DistributeInitialized) - if err := _Distribute.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// DistributeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Distribute contract. -type DistributeOwnershipTransferredIterator struct { - Event *DistributeOwnershipTransferred // 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 *DistributeOwnershipTransferredIterator) 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(DistributeOwnershipTransferred) - 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(DistributeOwnershipTransferred) - 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 *DistributeOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *DistributeOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// DistributeOwnershipTransferred represents a OwnershipTransferred event raised by the Distribute contract. -type DistributeOwnershipTransferred 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 (_Distribute *DistributeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*DistributeOwnershipTransferredIterator, 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 := _Distribute.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &DistributeOwnershipTransferredIterator{contract: _Distribute.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 (_Distribute *DistributeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *DistributeOwnershipTransferred, 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 := _Distribute.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(DistributeOwnershipTransferred) - if err := _Distribute.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 (_Distribute *DistributeFilterer) ParseOwnershipTransferred(log types.Log) (*DistributeOwnershipTransferred, error) { - event := new(DistributeOwnershipTransferred) - if err := _Distribute.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// DistributeRewardClaimedIterator is returned from FilterRewardClaimed and is used to iterate over the raw logs and unpacked data for RewardClaimed events raised by the Distribute contract. -type DistributeRewardClaimedIterator struct { - Event *DistributeRewardClaimed // 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 *DistributeRewardClaimedIterator) 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(DistributeRewardClaimed) - 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(DistributeRewardClaimed) - 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 *DistributeRewardClaimedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *DistributeRewardClaimedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// DistributeRewardClaimed represents a RewardClaimed event raised by the Distribute contract. -type DistributeRewardClaimed struct { - Delegator common.Address - Delegatee common.Address - UpToEpoch *big.Int - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRewardClaimed is a free log retrieval operation binding the contract event 0x7a84a08b02c91f3c62d572853f966fc799bbd121e8ad7833a4494ab8dcfcb404. -// -// Solidity: event RewardClaimed(address indexed delegator, address indexed delegatee, uint256 upToEpoch, uint256 amount) -func (_Distribute *DistributeFilterer) FilterRewardClaimed(opts *bind.FilterOpts, delegator []common.Address, delegatee []common.Address) (*DistributeRewardClaimedIterator, error) { - - var delegatorRule []interface{} - for _, delegatorItem := range delegator { - delegatorRule = append(delegatorRule, delegatorItem) - } - var delegateeRule []interface{} - for _, delegateeItem := range delegatee { - delegateeRule = append(delegateeRule, delegateeItem) - } - - logs, sub, err := _Distribute.contract.FilterLogs(opts, "RewardClaimed", delegatorRule, delegateeRule) - if err != nil { - return nil, err - } - return &DistributeRewardClaimedIterator{contract: _Distribute.contract, event: "RewardClaimed", logs: logs, sub: sub}, nil -} - -// WatchRewardClaimed is a free log subscription operation binding the contract event 0x7a84a08b02c91f3c62d572853f966fc799bbd121e8ad7833a4494ab8dcfcb404. -// -// Solidity: event RewardClaimed(address indexed delegator, address indexed delegatee, uint256 upToEpoch, uint256 amount) -func (_Distribute *DistributeFilterer) WatchRewardClaimed(opts *bind.WatchOpts, sink chan<- *DistributeRewardClaimed, delegator []common.Address, delegatee []common.Address) (event.Subscription, error) { - - var delegatorRule []interface{} - for _, delegatorItem := range delegator { - delegatorRule = append(delegatorRule, delegatorItem) - } - var delegateeRule []interface{} - for _, delegateeItem := range delegatee { - delegateeRule = append(delegateeRule, delegateeItem) - } - - logs, sub, err := _Distribute.contract.WatchLogs(opts, "RewardClaimed", delegatorRule, delegateeRule) - 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(DistributeRewardClaimed) - if err := _Distribute.contract.UnpackLog(event, "RewardClaimed", 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 -} - -// ParseRewardClaimed is a log parse operation binding the contract event 0x7a84a08b02c91f3c62d572853f966fc799bbd121e8ad7833a4494ab8dcfcb404. -// -// Solidity: event RewardClaimed(address indexed delegator, address indexed delegatee, uint256 upToEpoch, uint256 amount) -func (_Distribute *DistributeFilterer) ParseRewardClaimed(log types.Log) (*DistributeRewardClaimed, error) { - event := new(DistributeRewardClaimed) - if err := _Distribute.contract.UnpackLog(event, "RewardClaimed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/bindings/bindings/distribute_more.go b/bindings/bindings/distribute_more.go deleted file mode 100644 index decb59f62..000000000 --- a/bindings/bindings/distribute_more.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package bindings - -import ( - "encoding/json" - - "morph-l2/bindings/solc" -) - -const DistributeStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1011_storage\"},{\"astId\":1003,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1010_storage\"},{\"astId\":1005,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"mintedEpochCount\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"distributions\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_mapping(t_address,t_mapping(t_uint256,t_struct(Distribution)1013_storage))\"},{\"astId\":1007,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"oldestDistribution\",\"offset\":0,\"slot\":\"103\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1008,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"commissions\",\"offset\":0,\"slot\":\"104\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1009,\"contract\":\"contracts/l2/staking/Distribute.sol:Distribute\",\"label\":\"unclaimed\",\"offset\":0,\"slot\":\"105\",\"type\":\"t_mapping(t_address,t_struct(Unclaimed)1015_storage)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_bytes32)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"bytes32[]\",\"numberOfBytes\":\"32\"},\"t_array(t_uint256)1010_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1011_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"t_mapping(t_address,t_mapping(t_uint256,t_struct(Distribution)1013_storage))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(uint256 =\u003e struct IDistribute.Distribution))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_uint256,t_struct(Distribution)1013_storage)\"},\"t_mapping(t_address,t_struct(Unclaimed)1015_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct IDistribute.Unclaimed)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Unclaimed)1015_storage\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_mapping(t_bytes32,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_uint256\"},\"t_mapping(t_uint256,t_struct(Distribution)1013_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IDistribute.Distribution)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(Distribution)1013_storage\"},\"t_struct(AddressSet)1012_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSetUpgradeable.AddressSet\",\"numberOfBytes\":\"64\"},\"t_struct(Distribution)1013_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IDistribute.Distribution\",\"numberOfBytes\":\"160\"},\"t_struct(Set)1014_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSetUpgradeable.Set\",\"numberOfBytes\":\"64\"},\"t_struct(Unclaimed)1015_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IDistribute.Unclaimed\",\"numberOfBytes\":\"160\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" - -var DistributeStorageLayout = new(solc.StorageLayout) - -var DistributeDeployedBin = "0x608060405234801561000f575f80fd5b5060043610610163575f3560e01c8063a766c529116100c7578063cd4281d01161007d578063d557714111610063578063d557714114610372578063de6ac93314610399578063f2fde38b146103bc575f80fd5b8063cd4281d014610338578063cdd0c50e1461035f575f80fd5b8063b809af0f116100ad578063b809af0f146102dd578063bf2dca0a146102f0578063c4d66de814610325575f80fd5b8063a766c52914610295578063ac2ac640146102ca575f80fd5b8063807de4431161011c578063921ae9b811610102578063921ae9b81461023e5780639889be5114610261578063996cba6814610282575f80fd5b8063807de443146101d45780638da5cb5b14610220575f80fd5b80635cf20c7b1161014c5780635cf20c7b146101a6578063715018a6146101b95780637f683ee3146101c1575f80fd5b8063273d8e82146101675780634eedab3214610191575b5f80fd5b61017a610175366004612cc8565b6103cf565b604051610188929190612d60565b60405180910390f35b6101a461019f366004612d8d565b610820565b005b6101a46101b4366004612d8d565b6108e5565b6101a4610b56565b6101a46101cf366004612db5565b610b69565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610188565b60335473ffffffffffffffffffffffffffffffffffffffff166101fb565b61025161024c366004612cc8565b610e31565b6040516101889493929190612df4565b61027461026f366004612e73565b611231565b604051908152602001610188565b6101a4610290366004612ea4565b6115be565b6102746102a3366004612cc8565b73ffffffffffffffffffffffffffffffffffffffff165f9081526067602052604090205490565b6101a46102d8366004612cc8565b611724565b6101a46102eb366004612eea565b6118d5565b6102746102fe366004612cc8565b73ffffffffffffffffffffffffffffffffffffffff165f9081526068602052604090205490565b6101a4610333366004612cc8565b611a6e565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6101a461036d366004612f91565b611c79565b6101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6103ac6103a7366004612e73565b61208f565b6040519015158152602001610188565b6101a46103ca366004612cc8565b6120c7565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260696020526040812060609182916104019061217e565b9050805f03610497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f696e76616c69642064656c656761746f72206f72206e6f2072656d61696e696e60448201527f672072657761726400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b8067ffffffffffffffff8111156104b0576104b061302d565b6040519080825280602002602001820160405280156104d9578160200160208202803683370190505b5092508067ffffffffffffffff8111156104f5576104f561302d565b60405190808252806020026020018201604052801561051e578160200160208202803683370190505b5091505f5b73ffffffffffffffffffffffffffffffffffffffff85165f9081526069602052604090206105509061217e565b8110156108195773ffffffffffffffffffffffffffffffffffffffff85165f9081526069602052604081206105859083612187565b73ffffffffffffffffffffffffffffffffffffffff8088165f908152606960209081526040808320938516835260039093019052908120549192509081908190805b60655481101561079c5773ffffffffffffffffffffffffffffffffffffffff8087165f9081526066602090815260408083208584528252808320938f168352600490930190522054156106555773ffffffffffffffffffffffffffffffffffffffff8087165f9081526066602090815260408083208584528252808320938f16835260049093019052205492505b73ffffffffffffffffffffffffffffffffffffffff86165f908152606660209081526040808320848452909152902060010154156106c35773ffffffffffffffffffffffffffffffffffffffff86165f90815260666020908152604080832084845290915290206001015493505b73ffffffffffffffffffffffffffffffffffffffff86165f9081526066602090815260408083208484529091529020548490610700908590613087565b61070a919061309e565b61071490866130d6565b73ffffffffffffffffffffffffffffffffffffffff808d165f908152606960209081526040808320938b16835260029093019052205490955060ff168015610790575073ffffffffffffffffffffffffffffffffffffffff808c165f908152606960209081526040808320938a16835260049093019052205481145b61079c576001016105c7565b50848987815181106107b0576107b06130e9565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050838887815181106107fd576107fd6130e9565b6020908102919091010152505060019093019250610523915050565b5050915091565b610828612199565b73ffffffffffffffffffffffffffffffffffffffff82165f908152606760205260409020545b8181116108b95773ffffffffffffffffffffffffffffffffffffffff83165f90815260666020908152604080832084845290915281208181556001810182905590600282018181816108a08282612c72565b50505050505080806108b190613116565b91505061084e565b73ffffffffffffffffffffffffffffffffffffffff9092165f9081526067602052604090209190915550565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f776564604482015260640161048e565b6065545f036109ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f74206d696e74656420796574000000000000000000000000000000000000604482015260640161048e565b5f811580610a0a57506001606554610a07919061314d565b82115b610a145781610a23565b6001606554610a23919061314d565b90505f805b73ffffffffffffffffffffffffffffffffffffffff85165f908152606960205260409020610a559061217e565b811015610b3f5773ffffffffffffffffffffffffffffffffffffffff85165f9081526069602052604081208190610a8c9084612187565b73ffffffffffffffffffffffffffffffffffffffff88165f908152606960205260409020909150610abd908261221a565b8015610afe575073ffffffffffffffffffffffffffffffffffffffff8088165f90815260696020908152604080832093851683526003909301905220548510155b15610b25575f80610b10838a89612248565b9092509050610b1f82876130d6565b95509250505b81610b385782610b3481613116565b9350505b5050610a28565b508015610b5057610b5084826127ce565b50505050565b610b5e612199565b610b675f612a65565b565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610c08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f776564604482015260640161048e565b73ffffffffffffffffffffffffffffffffffffffff84165f9081526066602090815260408083208584529091529020600101819055811580610c7e575073ffffffffffffffffffffffffffffffffffffffff8084165f908152606960209081526040808320938816835260039093019052205482145b15610d8a5773ffffffffffffffffffffffffffffffffffffffff84165f9081526066602090815260408083208584529091529020610cbf9060020184612adb565b5073ffffffffffffffffffffffffffffffffffffffff8085165f90815260666020908152604080832086845282528083209387168352600490930181528282208290556069905220610d119085612adb565b5073ffffffffffffffffffffffffffffffffffffffff8381165f908152606960209081526040808320938816835260028401825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556003840182528083208390556004909301905290812055610b50565b73ffffffffffffffffffffffffffffffffffffffff8084165f9081526069602090815260408083209388168352600290930190522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155610df5908361314d565b73ffffffffffffffffffffffffffffffffffffffff8085165f908152606960209081526040808320938916835260049093019052205550505050565b73ffffffffffffffffffffffffffffffffffffffff81165f908152606960205260408120606091829182918291610e679061217e565b90505f8167ffffffffffffffff811115610e8357610e8361302d565b604051908082528060200260200182016040528015610eac578160200160208202803683370190505b5090505f8267ffffffffffffffff811115610ec957610ec961302d565b604051908082528060200260200182016040528015610ef2578160200160208202803683370190505b5090505f8367ffffffffffffffff811115610f0f57610f0f61302d565b604051908082528060200260200182016040528015610f38578160200160208202803683370190505b5090505f8467ffffffffffffffff811115610f5557610f5561302d565b604051908082528060200260200182016040528015610f7e578160200160208202803683370190505b5090505f5b858110156112205773ffffffffffffffffffffffffffffffffffffffff8b165f908152606960205260409020610fb99082612187565b858281518110610fcb57610fcb6130e9565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060695f8c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206002015f868381518110611058576110586130e9565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff168482815181106110b8576110b86130e9565b91151560209283029190910182015273ffffffffffffffffffffffffffffffffffffffff8c165f908152606990915260408120865160039091019190879084908110611106576111066130e9565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205483828151811061115a5761115a6130e9565b60200260200101818152505060695f8c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206004015f8683815181106111b9576111b96130e9565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205482828151811061120d5761120d6130e9565b6020908102919091010152600101610f83565b509299919850965090945092505050565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260696020526040812061125e9061217e565b5f036112ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f696e76616c69642064656c656761746f72206f72206e6f2072656d61696e696e60448201527f6720726577617264000000000000000000000000000000000000000000000000606482015260840161048e565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260696020526040902061131a908461221a565b6113a5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6e6f2072656d61696e696e6720726577617264206f66207468652064656c656760448201527f6174656500000000000000000000000000000000000000000000000000000000606482015260840161048e565b73ffffffffffffffffffffffffffffffffffffffff8083165f9081526069602090815260408083209387168352600390930190529081205481905b6065548110156115b55773ffffffffffffffffffffffffffffffffffffffff8087165f908152606660209081526040808320858452825280832093891683526004909301905220541561146e5773ffffffffffffffffffffffffffffffffffffffff8087165f9081526066602090815260408083208584528252808320938916835260049093019052205491505b73ffffffffffffffffffffffffffffffffffffffff86165f908152606660209081526040808320848452909152902060010154156114dc5773ffffffffffffffffffffffffffffffffffffffff86165f90815260666020908152604080832084845290915290206001015492505b73ffffffffffffffffffffffffffffffffffffffff86165f9081526066602090815260408083208484529091529020548390611519908490613087565b611523919061309e565b61152d90856130d6565b73ffffffffffffffffffffffffffffffffffffffff8087165f908152606960209081526040808320938b16835260029093019052205490945060ff1680156115a9575073ffffffffffffffffffffffffffffffffffffffff8086165f908152606960209081526040808320938a16835260049093019052205481145b6115b5576001016113e0565b50505092915050565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff161461165d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f776564604482015260640161048e565b6065545f036116c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f74206d696e74656420796574000000000000000000000000000000000000604482015260640161048e565b5f8115806116e3575060016065546116e0919061314d565b82115b6116ed57816116fc565b60016065546116fc919061314d565b90505f61170a858584612248565b509050801561171d5761171d84826127ce565b5050505050565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16146117c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f776564604482015260640161048e565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526068602052604090205461184e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6e6f20636f6d6d697373696f6e20746f20636c61696d00000000000000000000604482015260640161048e565b73ffffffffffffffffffffffffffffffffffffffff81165f908152606860205260408120805491905561188182826127ce565b8173ffffffffffffffffffffffffffffffffffffffff167f8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e411826040516118c991815260200190565b60405180910390a25050565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614611974576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6f6e6c79206c32207374616b696e6720636f6e747261637420616c6c6f776564604482015260640161048e565b73ffffffffffffffffffffffffffffffffffffffff86165f9081526066602090815260408083208784529091529020600181018390556119b79060020186612afc565b5073ffffffffffffffffffffffffffffffffffffffff8087165f9081526066602090815260408083208884528252808320938916835260049093019052208390558015611a665773ffffffffffffffffffffffffffffffffffffffff85165f908152606960205260409020611a2c9087612afc565b5073ffffffffffffffffffffffffffffffffffffffff8086165f908152606960209081526040808320938a16835260039093019052208490555b505050505050565b5f54610100900460ff1615808015611a8c57505f54600160ff909116105b80611aa55750303b158015611aa557505f5460ff166001145b611b31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161048e565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611b8d575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff8216611c0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e76616c6964206f776e657220616464726573730000000000000000000000604482015260640161048e565b611c1382612a65565b8015611c75575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614611d18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6f6e6c79207265636f726420636f6e747261637420616c6c6f77656400000000604482015260640161048e565b60658054905f611d2783613116565b9190505550866001606554611d3c919061314d565b14611da3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642065706f636820696e64657800000000000000000000000000604482015260640161048e565b8285148015611db157508085145b611e17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642064617461206c656e67746800000000000000000000000000604482015260640161048e565b5f5b8581101561208557848482818110611e3357611e336130e9565b9050602002013560665f898985818110611e4f57611e4f6130e9565b9050602002016020810190611e649190612cc8565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081015f9081208c8252909252812091909155606690888884818110611eaf57611eaf6130e9565b9050602002016020810190611ec49190612cc8565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081015f9081208b8252909252902060010154158015611f0657505f88115b15611fee5760665f888884818110611f2057611f206130e9565b9050602002016020810190611f359190612cc8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f60018a611f7c919061314d565b81526020019081526020015f206001015460665f898985818110611fa257611fa26130e9565b9050602002016020810190611fb79190612cc8565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081015f9081208c82529092529020600101555b828282818110612000576120006130e9565b9050602002013560685f89898581811061201c5761201c6130e9565b90506020020160208101906120319190612cc8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461207891906130d6565b9091555050600101611e19565b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526069602052604081206120bd908361221a565b1590505b92915050565b6120cf612199565b73ffffffffffffffffffffffffffffffffffffffff8116612172576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161048e565b61217b81612a65565b50565b5f6120c1825490565b5f6121928383612b1d565b9392505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610b67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161048e565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001830160205260408120541515612192565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526069602052604081208190612278908661221a565b6122de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6e6f2072656d61696e696e672072657761726400000000000000000000000000604482015260640161048e565b73ffffffffffffffffffffffffffffffffffffffff8085165f908152606960209081526040808320938916835260039093019052205483101561237d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f616c6c2072657761726420636c61696d65640000000000000000000000000000604482015260640161048e565b73ffffffffffffffffffffffffffffffffffffffff8085165f9081526069602090815260408083209389168352600390930190529081205481905b8581116126405773ffffffffffffffffffffffffffffffffffffffff8089165f9081526066602090815260408083208584528252808320938b168352600490930190522054156124435773ffffffffffffffffffffffffffffffffffffffff8089165f9081526066602090815260408083208584528252808320938b16835260049093019052205491505b73ffffffffffffffffffffffffffffffffffffffff88165f908152606660209081526040808320848452909152902060010154156124b15773ffffffffffffffffffffffffffffffffffffffff88165f90815260666020908152604080832084845290915290206001015492505b73ffffffffffffffffffffffffffffffffffffffff88165f90815260666020908152604080832084845290915290205483906124ee908490613087565b6124f8919061309e565b61250290866130d6565b73ffffffffffffffffffffffffffffffffffffffff8089165f908152606960209081526040808320938d16835260029093019052205490955060ff16801561257e575073ffffffffffffffffffffffffffffffffffffffff8088165f908152606960209081526040808320938c16835260049093019052205481145b1561262e5773ffffffffffffffffffffffffffffffffffffffff87165f908152606960205260409020600194506125b59089612adb565b5073ffffffffffffffffffffffffffffffffffffffff8781165f908152606960209081526040808320938c16835260028401825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556003840182528083208390556004909301905290812055612640565b8061263881613116565b9150506123b8565b5061264c8560016130d6565b73ffffffffffffffffffffffffffffffffffffffff8088165f908152606960209081526040808320938c1683526003909301815282822093909355606690925281209061269a8760016130d6565b81526020019081526020015f206004015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20545f036127545773ffffffffffffffffffffffffffffffffffffffff87165f908152606660205260408120829161271d8860016130d6565b815260208082019290925260409081015f90812073ffffffffffffffffffffffffffffffffffffffff8b1682526004019092529020555b8673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f7a84a08b02c91f3c62d572853f966fc799bbd121e8ad7833a4494ab8dcfcb40487876040516127bc929190918252602082015260400190565b60405180910390a35050935093915050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015612858573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061287c9190613160565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015612913573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129379190613177565b506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156129c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129e69190613160565b90505f831180156129ff5750826129fd828461314d565b145b610b50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c65640000000000604482015260640161048e565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6121928373ffffffffffffffffffffffffffffffffffffffff8416612b43565b5f6121928373ffffffffffffffffffffffffffffffffffffffff8416612c26565b5f825f018281548110612b3257612b326130e9565b905f5260205f200154905092915050565b5f8181526001830160205260408120548015612c1d575f612b6560018361314d565b85549091505f90612b789060019061314d565b9050818114612bd7575f865f018281548110612b9657612b966130e9565b905f5260205f200154905080875f018481548110612bb657612bb66130e9565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080612be857612be8613192565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506120c1565b5f9150506120c1565b5f818152600183016020526040812054612c6b57508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556120c1565b505f6120c1565b5080545f8255905f5260205f209081019061217b91905b80821115612c9c575f8155600101612c89565b5090565b803573ffffffffffffffffffffffffffffffffffffffff81168114612cc3575f80fd5b919050565b5f60208284031215612cd8575f80fd5b61219282612ca0565b5f815180845260208085019450602084015f5b83811015612d2657815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101612cf4565b509495945050505050565b5f815180845260208085019450602084015f5b83811015612d2657815187529582019590820190600101612d44565b604081525f612d726040830185612ce1565b8281036020840152612d848185612d31565b95945050505050565b5f8060408385031215612d9e575f80fd5b612da783612ca0565b946020939093013593505050565b5f805f8060808587031215612dc8575f80fd5b612dd185612ca0565b9350612ddf60208601612ca0565b93969395505050506040820135916060013590565b608081525f612e066080830187612ce1565b8281036020848101919091528651808352878201928201905f5b81811015612e3e578451151583529383019391830191600101612e20565b50508481036040860152612e528188612d31565b925050508281036060840152612e688185612d31565b979650505050505050565b5f8060408385031215612e84575f80fd5b612e8d83612ca0565b9150612e9b60208401612ca0565b90509250929050565b5f805f60608486031215612eb6575f80fd5b612ebf84612ca0565b9250612ecd60208501612ca0565b9150604084013590509250925092565b801515811461217b575f80fd5b5f805f805f8060c08789031215612eff575f80fd5b612f0887612ca0565b9550612f1660208801612ca0565b945060408701359350606087013592506080870135915060a0870135612f3b81612edd565b809150509295509295509295565b5f8083601f840112612f59575f80fd5b50813567ffffffffffffffff811115612f70575f80fd5b6020830191508360208260051b8501011115612f8a575f80fd5b9250929050565b5f805f805f805f6080888a031215612fa7575f80fd5b87359650602088013567ffffffffffffffff80821115612fc5575f80fd5b612fd18b838c01612f49565b909850965060408a0135915080821115612fe9575f80fd5b612ff58b838c01612f49565b909650945060608a013591508082111561300d575f80fd5b5061301a8a828b01612f49565b989b979a50959850939692959293505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820281158282048414176120c1576120c161305a565b5f826130d1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b808201808211156120c1576120c161305a565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131465761314661305a565b5060010190565b818103818111156120c1576120c161305a565b5f60208284031215613170575f80fd5b5051919050565b5f60208284031215613187575f80fd5b815161219281612edd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a" - -func init() { - if err := json.Unmarshal([]byte(DistributeStorageLayoutJSON), DistributeStorageLayout); err != nil { - panic(err) - } - - layouts["Distribute"] = DistributeStorageLayout - deployedBytecodes["Distribute"] = DistributeDeployedBin -} diff --git a/bindings/bindings/l2staking.go b/bindings/bindings/l2staking.go index 759e66a57..369f4ada0 100644 --- a/bindings/bindings/l2staking.go +++ b/bindings/bindings/l2staking.go @@ -29,9 +29,8 @@ var ( _ = abi.ConvertType ) -// IL2StakingUndelegation is an auto generated low-level Go binding around an user-defined struct. -type IL2StakingUndelegation struct { - Delegatee common.Address +// IL2StakingUndelegateRequest is an auto generated low-level Go binding around an user-defined struct. +type IL2StakingUndelegateRequest struct { Amount *big.Int UnlockEpoch *big.Int } @@ -45,8 +44,8 @@ type TypesStakerInfo struct { // L2StakingMetaData contains all meta data concerning the L2Staking contract. var L2StakingMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_otherStaking\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"percentage\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epochEffective\",\"type\":\"uint256\"}],\"name\":\"CommissionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"effectiveEpoch\",\"type\":\"uint256\"}],\"name\":\"Delegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTime\",\"type\":\"uint256\"}],\"name\":\"RewardStartTimeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldSize\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSize\",\"type\":\"uint256\"}],\"name\":\"SequencerSetMaxSizeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"name\":\"StakerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"stakerAddresses\",\"type\":\"address[]\"}],\"name\":\"StakerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"effectiveEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"name\":\"Undelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UndelegationClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DISTRIBUTE_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MESSENGER\",\"outputs\":[{\"internalType\":\"contractICrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MORPH_TOKEN_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OTHER_STAKING\",\"outputs\":[{\"internalType\":\"contractStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SEQUENCER_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo\",\"name\":\"add\",\"type\":\"tuple\"}],\"name\":\"addStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"candidateNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimCommission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"targetEpochIndex\",\"type\":\"uint256\"}],\"name\":\"claimReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimUndelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"commissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegateStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo\",\"name\":\"add\",\"type\":\"tuple\"}],\"name\":\"emergencyAddStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"remove\",\"type\":\"address[]\"}],\"name\":\"emergencyRemoveStakers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"pageSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pageIndex\",\"type\":\"uint256\"}],\"name\":\"getAllDelegatorsInPagination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"delegatorsTotalNumber\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"delegatorsInPage\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"getDelegatorsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakerAddressesLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakers\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_stakerAddresses\",\"type\":\"address[]\"}],\"name\":\"getStakesInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"getUndelegations\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"internalType\":\"structIL2Staking.Undelegation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencersMaxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_undelegateLockEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rewardStartTime\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"_stakers\",\"type\":\"tuple[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isStakingTo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSequencerSetSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"remove\",\"type\":\"address[]\"}],\"name\":\"removeStakers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardStartTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardStarted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerSetMaxSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"commission\",\"type\":\"uint256\"}],\"name\":\"setCommissionRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"stakerAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakerDelegations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalDelegationAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakerRankings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ranking\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"undelegateLockEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"undelegateStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"undelegations\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardStartTime\",\"type\":\"uint256\"}],\"name\":\"updateRewardStartTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sequencerSetMaxSize\",\"type\":\"uint256\"}],\"name\":\"updateSequencerSetMaxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x61012060405234801562000011575f80fd5b50604051620050b5380380620050b58339810160408190526200003491620000a7565b7353000000000000000000000000000000000000076080526001600160a01b031660a05273530000000000000000000000000000000000001360c05273530000000000000000000000000000000000001760e05273530000000000000000000000000000000000001461010052620000d6565b5f60208284031215620000b8575f80fd5b81516001600160a01b0381168114620000cf575f80fd5b9392505050565b60805160a05160c05160e05161010051614f15620001a05f395f818161044501528181610a7c01528181610b240152818161140f01528181611b29015281816135ce0152613d5e01525f818161055a0152613bae01525f818161067c01528181613e1f01528181613ed401528181613f7b015281816141720152818161421f01526142c601525f81816104ff015281816124a30152612a5001525f8181610408015281816105c201528181612479015281816124cd01528181612a260152612a7a0152614f155ff3fe608060405234801561000f575f80fd5b50600436106102ec575f3560e01c8063746c8ae111610192578063affed0e0116100e8578063e10911b111610093578063f2fde38b1161006e578063f2fde38b146106cf578063fad99f98146106e2578063fc6facc6146106ea575f80fd5b8063e10911b11461069e578063ed70b343146106a6578063f0261bc2146106c6575f80fd5b8063cce6cf9f116100c3578063cce6cf9f14610643578063d31d83d914610656578063d557714114610677575f80fd5b8063affed0e0146105f1578063b5d2e0dc146105fa578063c64814dd14610619575f80fd5b80638da5cb5b1161014857806391bd43a41161012357806391bd43a41461059e578063927ede2d146105bd57806396ab994d146105e4575f80fd5b80638da5cb5b146105445780638e21d5fb146105555780639168ae721461057c575f80fd5b80637b05afb5116101785780637b05afb5146104db578063831cfb58146104fa57806384d7d1d414610521575f80fd5b8063746c8ae1146104cb57806376671808146104d3575f80fd5b80633b8024211161024757806343352d61116101fd57806346cdc18a116101d857806346cdc18a146104a85780637046529b146104b0578063715018a6146104c3575f80fd5b806343352d611461047a578063439162b514610482578063459598a214610495575f80fd5b80633cb747bf1161022d5780633cb747bf146104065780633d9353fe1461044057806340b5c83714610467575f80fd5b80633b802421146103ea5780633c323a1b146103f3575f80fd5b8063174e31c4116102a75780632e787be3116102825780632e787be3146103ae57806330158eea146103b75780633385ccc2146103d7575f80fd5b8063174e31c41461037f57806319fac8fd146103925780632cc138be146103a5575f80fd5b80630eb573af116102d75780630eb573af1461032b5780630f3b70591461033e57806312a3e94714610376575f80fd5b806243b758146102f05780629c6f0c14610316575b5f80fd5b6103036102fe3660046145c5565b6106fd565b6040519081526020015b60405180910390f35b6103296103243660046145e0565b610723565b005b61032961033936600461462a565b610901565b61035161034c366004614641565b610a14565b604080516001600160a01b03909416845260208401929092529082015260600161030d565b610303609a5481565b61032961038d366004614641565b610a5c565b6103296103a036600461462a565b610bd4565b61030360985481565b61030360995481565b6103ca6103c53660046146b3565b610cf6565b60405161030d9190614753565b6103296103e53660046145c5565b610f1d565b610303609c5481565b610329610401366004614641565b611557565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b03909116815260200161030d565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61032961047536600461462a565b611be6565b6103ca611cf9565b6103296104903660046147f9565b611f15565b6104286104a336600461462a565b612446565b609d54610303565b6103296104be3660046145e0565b61246e565b6103296125c8565b6103296125db565b6103036128cb565b6103036104e93660046145c5565b60a06020525f908152604090205481565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61053461052f3660046145c5565b61293f565b604051901515815260200161030d565b6033546001600160a01b0316610428565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61058f61058a3660046145c5565b612969565b60405161030d93929190614867565b6103036105ac3660046145c5565b60a16020525f908152604090205481565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b6097546105349060ff1681565b61030360a55481565b6103036106083660046145c5565b609e6020525f908152604090205481565b610303610627366004614897565b60a360209081525f928352604080842090915290825290205481565b6103296106513660046148c3565b612a1b565b61066961066436600461490b565b612f87565b60405161030d929190614980565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b610329613115565b6106b96106b43660046145c5565b613499565b60405161030d91906149a0565b610303609b5481565b6103296106dd3660046145c5565b61352f565b6103296135bc565b6103296106f83660046148c3565b61366a565b6001600160a01b0381165f90815260a26020526040812061071d90613a35565b92915050565b61072b613a3e565b8160a55481146107825760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064015b60405180910390fd5b61078d836001614a2e565b60a555609e5f6107a060208501856145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20545f0361084257609d6107d560208401846145c5565b81546001810183555f9283526020808420909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039390931692909217909155609d5491609e91610828908601866145c5565b6001600160a01b0316815260208101919091526040015f20555b81609f5f61085360208401846145c5565b6001600160a01b0316815260208101919091526040015f206108758282614b5e565b50610885905060208301836145c5565b6001600160a01b03167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d60208401356108c16040860186614a41565b6040516108d093929190614cc5565b60405180910390a260975460ff161580156108ef5750609954609d5411155b156108fc576108fc613a98565b505050565b610909613a3e565b5f8111801561091a57506099548114155b61098c5760405162461bcd60e51b815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a650000000000000000000000000000000000000000000000000000000000006064820152608401610779565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff166109e157609d546109e5565b609c545b90505f60995482106109f9576099546109fb565b815b9050609b548114610a0e57610a0e613a98565b50505050565b60a4602052815f5260405f208181548110610a2d575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116935090915083565b610a64613c18565b6001600160a01b038216610b1a576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044015f604051808303815f87803b158015610aff575f80fd5b505af1158015610b11573d5f803e3d5ffd5b50505050610bc6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604481018490526064015f604051808303815f87803b158015610baf575f80fd5b505af1158015610bc1573d5f803e3d5ffd5b505050505b610bd06001606555565b5050565b335f908152609e6020526040902054610c2f5760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f776564000000000000000000000000006044820152606401610779565b6014811115610c805760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e00000000000000000000000000006044820152606401610779565b335f90815260a06020526040812082905560975460ff16610ca1575f610cb4565b610ca96128cb565b610cb4906001614a2e565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff811115610d1257610d12614aa2565b604051908082528060200260200182016040528015610d5e57816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081610d305790505b5090505f5b83811015610f15576040518060600160405280609f5f888886818110610d8b57610d8b614d18565b9050602002016020810190610da091906145c5565b6001600160a01b03908116825260208083019390935260409091015f908120549091168352910190609f90888886818110610ddd57610ddd614d18565b9050602002016020810190610df291906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f888886818110610e2f57610e2f614d18565b9050602002016020810190610e4491906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f206002018054610e7190614acf565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9d90614acf565b8015610ee85780601f10610ebf57610100808354040283529160200191610ee8565b820191905f5260205f20905b815481529060010190602001808311610ecb57829003601f168201915b5050505050815250828281518110610f0257610f02614d18565b6020908102919091010152600101610d63565b509392505050565b610f25613c18565b6001600160a01b0381165f90815260a360209081526040808320338452909152902054610f945760405162461bcd60e51b815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f000000000000000000006044820152606401610779565b6001600160a01b0381165f908152609e60205260408120546097549015919060ff16610fc0575f610fd3565b610fc86128cb565b610fd3906001614a2e565b6097549091505f9060ff168015610fe8575082155b610ff25781610fff565b609a54610fff9083614a2e565b604080516060810182526001600160a01b038781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c51600390920201805473ffffffffffffffffffffffffffffffffffffffff191691909b16178a558251908a015551600290980197909755908452908252829055925191815260a1909252928120805494955091936110b6908490614d45565b90915550506001600160a01b0385165f90815260a2602052604090206110dc9033613c78565b506001600160a01b0385165f908152609e602052604090205484158015611105575060975460ff165b80156111125750609c5481105b15611373576001600160a01b0386165f908152609e602052604081205461113b90600190614d45565b90505b6001609c5461114d9190614d45565b8110156113715760a15f609d838154811061116a5761116a614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a190609d61119f856001614a2e565b815481106111af576111af614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611369575f609d82815481106111ed576111ed614d18565b5f918252602090912001546001600160a01b03169050609d611210836001614a2e565b8154811061122057611220614d18565b5f91825260209091200154609d80546001600160a01b03909216918490811061124b5761124b614d18565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905580609d61128e846001614a2e565b8154811061129e5761129e614d18565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790556112de826001614a2e565b609e5f609d85815481106112f4576112f4614d18565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055611323826002614a2e565b609e5f609d611333866001614a2e565b8154811061134357611343614d18565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b60010161113e565b505b8415801561139657506001600160a01b0386165f90815260a16020526040902054155b156113b3576001609c5f8282546113ad9190614d45565b90915550505b6001600160a01b038681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b158015611454575f80fd5b505af1158015611466573d5f803e3d5ffd5b505050506114713390565b6001600160a01b0316866001600160a01b03167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c846020015187876040516114cc939291909283526020830191909152604082015260600190565b60405180910390a3841580156114e4575060975460ff165b80156114f25750609b548111155b80156115385750609b546001600160a01b0387165f908152609e602052604090205411806115385750609c546001600160a01b0387165f908152609e6020526040902054115b1561154557611545613a98565b50505050506115546001606555565b50565b6001600160a01b0382165f908152609e602052604090205482906115bd5760405162461bcd60e51b815260206004820152600a60248201527f6e6f74207374616b6572000000000000000000000000000000000000000000006044820152606401610779565b6115c5613c18565b5f82116116145760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e740000000000000000000000006044820152606401610779565b61161e3384613c93565b1561166b5760405162461bcd60e51b815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d6564000000000000000000006044820152606401610779565b6001600160a01b0383165f90815260a3602090815260408083203384529091529020546116e95761169c3384613d1c565b156116e95760405162461bcd60e51b815260206004820152601060248201527f72657761726420756e636c61696d6564000000000000000000000000000000006044820152606401610779565b6001600160a01b0383165f90815260a1602052604081208054849290611710908490614a2e565b90915550506001600160a01b0383165f90815260a36020908152604080832033845290915281208054849290611747908490614a2e565b90915550506001600160a01b0383165f90815260a26020526040902061176d9033613dd1565b506001600160a01b0383165f90815260a160205260409020548290036117a5576001609c5f82825461179f9190614a2e565b90915550505b6001600160a01b0383165f908152609e602052604090205460975460ff1680156117cf5750600181115b15611a15575f6117e0600183614d45565b90505b8015611a135760a15f609d6117f9600185614d45565b8154811061180957611809614d18565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d848154811061185a5761185a614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611a01575f609d611892600184614d45565b815481106118a2576118a2614d18565b5f91825260209091200154609d80546001600160a01b03909216925090839081106118cf576118cf614d18565b5f918252602090912001546001600160a01b0316609d6118f0600185614d45565b8154811061190057611900614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d838154811061193f5761193f614d18565b5f9182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393909316929092179091558290609e90609d611986600185614d45565b8154811061199657611996614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040019020556119c5826001614a2e565b609e5f609d85815481106119db576119db614d18565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80611a0b81614d58565b9150506117e3565b505b6097545f9060ff16611a27575f611a3a565b611a2f6128cb565b611a3a906001614a2e565b6001600160a01b0386165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a36001600160a01b038581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b158015611b6e575f80fd5b505af1158015611b80573d5f803e3d5ffd5b50505050611b95611b8e3390565b3086613de5565b60975460ff168015611ba85750609b5482115b8015611bcd57506099546001600160a01b0386165f908152609e602052604090205411155b15611bda57611bda613a98565b50506108fc6001606555565b611bee613a3e565b60975460ff1615611c415760405162461bcd60e51b815260206004820152601660248201527f72657761726420616c72656164792073746172746564000000000000000000006044820152606401610779565b4281118015611c5a5750611c586201518082614d9a565b155b8015611c6857506098548114155b611cb45760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d65000000000000006044820152606401610779565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff811115611d1957611d19614aa2565b604051908082528060200260200182016040528015611d6557816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081611d375790505b5090505f5b609d54811015611f0f576040518060600160405280609f5f609d8581548110611d9557611d95614d18565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409092018120549092168352609d80549390910192609f92919086908110611de157611de1614d18565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f609d8581548110611e3a57611e3a614d18565b5f9182526020808320909101546001600160a01b0316835282019290925260400190206002018054611e6b90614acf565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9790614acf565b8015611ee25780601f10611eb957610100808354040283529160200191611ee2565b820191905f5260205f20905b815481529060010190602001808311611ec557829003601f168201915b5050505050815250828281518110611efc57611efc614d18565b6020908102919091010152600101611d6a565b50919050565b5f54610100900460ff1615808015611f3357505f54600160ff909116105b80611f4c5750303b158015611f4c57505f5460ff166001145b611fbe5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610779565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561201a575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b0387166120705760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e6572206164647265737300000000000000000000006044820152606401610779565b5f86116120e55760405162461bcd60e51b815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f20300000000000000000000000000000000000000000000000000000000000006064820152608401610779565b5f85116121345760405162461bcd60e51b815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f636873000000006044820152606401610779565b428411801561214d575061214b6201518085614d9a565b155b6121995760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d65000000000000006044820152606401610779565b816121e65760405162461bcd60e51b815260206004820152601760248201527f696e76616c696420696e697469616c207374616b6572730000000000000000006044820152606401610779565b6121ef8761404b565b6121f76140a9565b6099869055609a8590556098849055609b8290555f5b609b548110156123685783838281811061222957612229614d18565b905060200281019061223b9190614dad565b609f5f86868581811061225057612250614d18565b90506020028101906122629190614dad565b6122709060208101906145c5565b6001600160a01b0316815260208101919091526040015f206122928282614b5e565b905050609d8484838181106122a9576122a9614d18565b90506020028101906122bb9190614dad565b6122c99060208101906145c5565b8154600180820184555f938452602090932001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055612312908290614a2e565b609e5f86868581811061232757612327614d18565b90506020028101906123399190614dad565b6123479060208101906145c5565b6001600160a01b0316815260208101919091526040015f205560010161220d565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a1801561243d575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d8181548110612455575f80fd5b5f918252602090912001546001600160a01b0316905081565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561255657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612527573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061254b9190614de9565b6001600160a01b0316145b61072b5760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401610779565b6125d0613a3e565b6125d95f61404b565b565b6125e3613a3e565b60985442101561265a5760405162461bcd60e51b8152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d65000000000000000000000000000000000000000000000000000000006064820152608401610779565b5f609c54116126ab5760405162461bcd60e51b815260206004820152600e60248201527f6e6f6e652063616e6469646174650000000000000000000000000000000000006044820152606401610779565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d54811015612868575f5b8181101561285f5760a15f609d838154811061270457612704614d18565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d858154811061275557612755614d18565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612857575f609d828154811061279357612793614d18565b5f91825260209091200154609d80546001600160a01b03909216925090849081106127c0576127c0614d18565b5f91825260209091200154609d80546001600160a01b0390921691849081106127eb576127eb614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d848154811061282a5761282a614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b6001016126e6565b506001016126da565b505f5b609d548110156128c257612880816001614a2e565b609e5f609d848154811061289657612896614d18565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205560010161286b565b506125d9613a98565b5f60985442101561291e5760405162461bcd60e51b815260206004820152601960248201527f726577617264206973206e6f74207374617274656420796574000000000000006044820152606401610779565b62015180609854426129309190614d45565b61293a9190614e04565b905090565b6001600160a01b0381165f90815260a360209081526040808320338452909152812054151561071d565b609f6020525f90815260409020805460018201546002830180546001600160a01b0390931693919261299a90614acf565b80601f01602080910402602001604051908101604052809291908181526020018280546129c690614acf565b8015612a115780601f106129e857610100808354040283529160200191612a11565b820191905f5260205f20905b8154815290600101906020018083116129f457829003601f168201915b5050505050905083565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015612b0357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ad4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612af89190614de9565b6001600160a01b0316145b612b755760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401610779565b8260a5548114612bc75760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610779565b612bd2846001614a2e565b60a5555f805b83811015612f3857609b54609e5f878785818110612bf857612bf8614d18565b9050602002016020810190612c0d91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205411612c3757600191505b5f609e5f878785818110612c4d57612c4d614d18565b9050602002016020810190612c6291906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115612eba575f6001609e5f888886818110612ca057612ca0614d18565b9050602002016020810190612cb591906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f2054612cdf9190614d45565b90505b609d54612cf190600190614d45565b811015612dc357609d612d05826001614a2e565b81548110612d1557612d15614d18565b5f91825260209091200154609d80546001600160a01b039092169183908110612d4057612d40614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d8481548110612d8357612d83614d18565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190612db6908490614d45565b9091555050600101612ce2565b50609d805480612dd557612dd5614e17565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609e90868684818110612e1a57612e1a614d18565b9050602002016020810190612e2f91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f878785818110612e6757612e67614d18565b9050602002016020810190612e7c91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115612eba576001609c5f828254612eb49190614d45565b90915550505b609f5f868684818110612ecf57612ecf614d18565b9050602002016020810190612ee491906145c5565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590612f2e6002830182614567565b5050600101612bd8565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618484604051612f6a929190614e44565b60405180910390a18015612f8057612f80613a98565b5050505050565b5f60605f8411612fd95760405162461bcd60e51b815260206004820152601160248201527f696e76616c696420706167652073697a650000000000000000000000000000006044820152606401610779565b6001600160a01b0385165f90815260a260205260409020612ff990613a35565b91508367ffffffffffffffff81111561301457613014614aa2565b60405190808252806020026020018201604052801561303d578160200160208202803683370190505b5090505f61304b8486614e91565b90505f600161305a8682614a2e565b6130649088614e91565b61306e9190614d45565b905061307b600185614d45565b8111156130905761308d600185614d45565b90505b815f5b828211613109576130c7826130a781614ea8565b6001600160a01b038c165f90815260a2602052604090209094509061412d565b85826130d281614ea8565b9350815181106130e4576130e4614d18565b60200260200101906001600160a01b031690816001600160a01b031681525050613093565b50505050935093915050565b61311d613c18565b335f90815260a46020526040812054815b818110156134335760975460ff16158061317e575061314b6128cb565b335f90815260a46020526040902080548390811061316b5761316b614d18565b905f5260205f2090600302016002015411155b1561342157335f90815260a4602052604090208054829081106131a3576131a3614d18565b905f5260205f20906003020160010154836131be9190614a2e565b335f90815260a46020526040812080549295509091839081106131e3576131e3614d18565b5f91825260208220600390910201546001600160a01b0316915060a4816132073390565b6001600160a01b03166001600160a01b031681526020019081526020015f20838154811061323757613237614d18565b905f5260205f2090600302016002015490505f60a45f6132543390565b6001600160a01b03166001600160a01b031681526020019081526020015f20848154811061328457613284614d18565b905f5260205f2090600302016001015490506001856132a39190614d45565b84101561336857335f90815260a4602052604090206132c3600187614d45565b815481106132d3576132d3614d18565b905f5260205f20906003020160a45f6132e93390565b6001600160a01b03166001600160a01b031681526020019081526020015f20858154811061331957613319614d18565b5f91825260209091208254600390920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091178155600180830154908201556002918201549101555b335f90815260a46020526040902080548061338557613385614e17565b5f8281526020812060035f1990930192830201805473ffffffffffffffffffffffffffffffffffffffff19168155600181810183905560029091019190915591556133d09086614d45565b604080518481526020810184905291965033916001600160a01b038616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a350505061312e565b61342c816001614a2e565b905061312e565b505f82116134835760405162461bcd60e51b815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d0000000000000000006044820152606401610779565b61348d3383614138565b50506125d96001606555565b6001600160a01b0381165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613524575f848152602090819020604080516060810182526003860290920180546001600160a01b03168352600180820154848601526002909101549183019190915290835290920191016134d0565b505050509050919050565b613537613a3e565b6001600160a01b0381166135b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610779565b6115548161404b565b6135c4613c18565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b15801561364a575f80fd5b505af115801561365c573d5f803e3d5ffd5b505050506125d96001606555565b613672613a3e565b8260a55481146136c45760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610779565b6136cf846001614a2e565b60a5555f805b83811015612f3857609b54609e5f8787858181106136f5576136f5614d18565b905060200201602081019061370a91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20541161373457600191505b5f609e5f87878581811061374a5761374a614d18565b905060200201602081019061375f91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205411156139b7575f6001609e5f88888681811061379d5761379d614d18565b90506020020160208101906137b291906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f20546137dc9190614d45565b90505b609d546137ee90600190614d45565b8110156138c057609d613802826001614a2e565b8154811061381257613812614d18565b5f91825260209091200154609d80546001600160a01b03909216918390811061383d5761383d614d18565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d848154811061388057613880614d18565b5f9182526020808320909101546001600160a01b03168352820192909252604001812080549091906138b3908490614d45565b90915550506001016137df565b50609d8054806138d2576138d2614e17565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609e9086868481811061391757613917614d18565b905060200201602081019061392c91906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f87878581811061396457613964614d18565b905060200201602081019061397991906145c5565b6001600160a01b03166001600160a01b031681526020019081526020015f205411156139b7576001609c5f8282546139b19190614d45565b90915550505b609f5f8686848181106139cc576139cc614d18565b90506020020160208101906139e191906145c5565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590613a2b6002830182614567565b50506001016136d5565b5f61071d825490565b6033546001600160a01b031633146125d95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610779565b60995460975460ff1615613abc57609954609c541015613ab75750609c545b613acd565b609954609d541015613acd5750609d545b5f8167ffffffffffffffff811115613ae757613ae7614aa2565b604051908082528060200260200182016040528015613b10578160200160208202803683370190505b5090505f5b82811015613b7d57609d8181548110613b3057613b30614d18565b905f5260205f20015f9054906101000a90046001600160a01b0316828281518110613b5d57613b5d614d18565b6001600160a01b0390921660209283029190910190910152600101613b15565b506040517f9b8201a40000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b8201a490613be3908490600401614ec0565b5f604051808303815f87803b158015613bfa575f80fd5b505af1158015613c0c573d5f803e3d5ffd5b50509151609b55505050565b600260655403613c6a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610779565b6002606555565b6001606555565b5f613c8c836001600160a01b038416614396565b9392505050565b5f805b6001600160a01b0384165f90815260a46020526040902054811015613d13576001600160a01b038481165f90815260a46020526040902080549185169183908110613ce357613ce3614d18565b5f9182526020909120600390910201546001600160a01b031603613d0b57600191505061071d565b600101613c96565b505f9392505050565b6040517fde6ac9330000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa158015613da5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613dc99190614ed2565b159392505050565b5f613c8c836001600160a01b038416614479565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613e66573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613e8a9190614ef1565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015613f1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613f409190614ed2565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613fc2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613fe69190614ef1565b90505f83118015613fff575082613ffd8383614d45565b145b612f805760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610779565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff166141255760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610779565b6125d96144c5565b5f613c8c8383614541565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156141b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141dd9190614ef1565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015614267573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061428b9190614ed2565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561430d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906143319190614ef1565b90505f8311801561434a5750826143488383614d45565b145b610a0e5760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610779565b5f8181526001830160205260408120548015614470575f6143b8600183614d45565b85549091505f906143cb90600190614d45565b905081811461442a575f865f0182815481106143e9576143e9614d18565b905f5260205f200154905080875f01848154811061440957614409614d18565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061443b5761443b614e17565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061071d565b5f91505061071d565b5f8181526001830160205260408120546144be57508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561071d565b505f61071d565b5f54610100900460ff16613c715760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610779565b5f825f01828154811061455657614556614d18565b905f5260205f200154905092915050565b50805461457390614acf565b5f825580601f10614582575050565b601f0160209004905f5260205f209081019061155491905b808211156145ad575f815560010161459a565b5090565b6001600160a01b0381168114611554575f80fd5b5f602082840312156145d5575f80fd5b8135613c8c816145b1565b5f80604083850312156145f1575f80fd5b82359150602083013567ffffffffffffffff81111561460e575f80fd5b83016060818603121561461f575f80fd5b809150509250929050565b5f6020828403121561463a575f80fd5b5035919050565b5f8060408385031215614652575f80fd5b823561465d816145b1565b946020939093013593505050565b5f8083601f84011261467b575f80fd5b50813567ffffffffffffffff811115614692575f80fd5b6020830191508360208260051b85010111156146ac575f80fd5b9250929050565b5f80602083850312156146c4575f80fd5b823567ffffffffffffffff8111156146da575f80fd5b6146e68582860161466b565b90969095509350505050565b5f81518084525f5b81811015614716576020818501810151868301820152016146fa565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b838110156147eb578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b03168452878101518885015286015160608785018190526147d7818601836146f2565b96890196945050509086019060010161477a565b509098975050505050505050565b5f805f805f8060a0878903121561480e575f80fd5b8635614819816145b1565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115614849575f80fd5b61485589828a0161466b565b979a9699509497509295939492505050565b6001600160a01b0384168152826020820152606060408201525f61488e60608301846146f2565b95945050505050565b5f80604083850312156148a8575f80fd5b82356148b3816145b1565b9150602083013561461f816145b1565b5f805f604084860312156148d5575f80fd5b83359250602084013567ffffffffffffffff8111156148f2575f80fd5b6148fe8682870161466b565b9497909650939450505050565b5f805f6060848603121561491d575f80fd5b8335614928816145b1565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b838110156149755781516001600160a01b031687529582019590820190600101614950565b509495945050505050565b828152604060208201525f614998604083018461493d565b949350505050565b602080825282518282018190525f919060409081850190868401855b828110156149f457815180516001600160a01b03168552868101518786015285015185850152606090930192908501906001016149bc565b5091979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561071d5761071d614a01565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614a74575f80fd5b83018035915067ffffffffffffffff821115614a8e575f80fd5b6020019150368190038213156146ac575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c90821680614ae357607f821691505b602082108103611f0f577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f8211156108fc57805f5260205f20601f840160051c81016020851015614b3f5750805b601f840160051c820191505b81811015612f80575f8155600101614b4b565b8135614b69816145b1565b6001600160a01b03811673ffffffffffffffffffffffffffffffffffffffff1983541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112614bd5575f80fd5b8501803567ffffffffffffffff811115614bed575f80fd5b8036038483011315614bfd575f80fd5b614c1181614c0b8554614acf565b85614b1a565b5f601f821160018114614c44575f8315614c2d57508382018601355b5f19600385901b1c1916600184901b178555614cba565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015614c9057868501890135825593880193908901908801614c71565b5084821015614cae575f1960f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8181038181111561071d5761071d614a01565b5f81614d6657614d66614a01565b505f190190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82614da857614da8614d6d565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112614ddf575f80fd5b9190910192915050565b5f60208284031215614df9575f80fd5b8151613c8c816145b1565b5f82614e1257614e12614d6d565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b86811015614e86578235614e6b816145b1565b6001600160a01b031682529183019190830190600101614e58565b509695505050505050565b808202811582820484141761071d5761071d614a01565b5f5f198203614eb957614eb9614a01565b5060010190565b602081525f613c8c602083018461493d565b5f60208284031215614ee2575f80fd5b81518015158114613c8c575f80fd5b5f60208284031215614f01575f80fd5b505191905056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_otherStaking\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Empty\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidCommissionRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidNonce\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidPageSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidSequencerSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrInvalidStartTime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrNoCandidate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrNoClaimableUndelegateRequest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrNoCommission\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrNoStakers\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrNoUndelegateRequest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrNotStaker\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrOnlyMorphTokenContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrOnlySystem\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrRequestExisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrRewardNotStarted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrRewardStarted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrStartTimeNotReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrZeroAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrZeroLockEpochs\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrZeroSequencerSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ErrZeroShares\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutOfBounds\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CommissionClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldRate\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newRate\",\"type\":\"uint256\"}],\"name\":\"CommissionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"delegateeAmount\",\"type\":\"uint256\"}],\"name\":\"Delegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sequencer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"delegatorReward\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"commissionAmount\",\"type\":\"uint256\"}],\"name\":\"Distributed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegateeFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegateeTo\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"delegateeAmountFrom\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"delegateeAmountTo\",\"type\":\"uint256\"}],\"name\":\"Redelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTime\",\"type\":\"uint256\"}],\"name\":\"RewardStartTimeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldSize\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSize\",\"type\":\"uint256\"}],\"name\":\"SequencerSetMaxSizeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"name\":\"StakerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"stakerAddresses\",\"type\":\"address[]\"}],\"name\":\"StakerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"delegateeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"name\":\"Undelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UndelegationClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MESSENGER\",\"outputs\":[{\"internalType\":\"contractICrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MORPH_TOKEN_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OTHER_STAKING\",\"outputs\":[{\"internalType\":\"contractStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SEQUENCER_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SYSTEM_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo\",\"name\":\"add\",\"type\":\"tuple\"}],\"name\":\"addStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"candidateNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimCommission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"claimUndelegation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"claimableUndelegateRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"commissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"delegateeDelegations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"share\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegatorDelegations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"share\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"distribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo\",\"name\":\"add\",\"type\":\"tuple\"}],\"name\":\"emergencyAddStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"remove\",\"type\":\"address[]\"}],\"name\":\"emergencyRemoveStakers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"pageSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pageIndex\",\"type\":\"uint256\"}],\"name\":\"getAllDelegatorsInPagination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"delegatorsTotalNumber\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"delegatorsInPage\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"getDelegatorsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakerAddressesLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakers\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_stakerAddresses\",\"type\":\"address[]\"}],\"name\":\"getStakesInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencersMaxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_undelegateLockEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rewardStartTime\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"_stakers\",\"type\":\"tuple[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isStakingTo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSequencerSetSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"lockedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"pendingUndelegateRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"queryDelegationAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"queryUnclaimedCommission\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sequencerAddr\",\"type\":\"address\"}],\"name\":\"recordBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegateeFrom\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegateeTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redelegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"remove\",\"type\":\"address[]\"}],\"name\":\"removeStakers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardStartTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardStarted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerSetMaxSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"}],\"name\":\"setCommissionRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"stakerAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakerRankings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ranking\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"undelegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"undelegateLockEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"undelegateRequest\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"internalType\":\"structIL2Staking.UndelegateRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"undelegateSequence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardStartTime\",\"type\":\"uint256\"}],\"name\":\"updateRewardStartTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sequencerSetMaxSize\",\"type\":\"uint256\"}],\"name\":\"updateSequencerSetMaxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x61012060405234801562000011575f80fd5b5060405162005f9c38038062005f9c8339810160408190526200003491620000a7565b7353000000000000000000000000000000000000076080526001600160a01b031660a05273530000000000000000000000000000000000001360c05273530000000000000000000000000000000000001760e05273530000000000000000000000000000000000002161010052620000d6565b5f60208284031215620000b8575f80fd5b81516001600160a01b0381168114620000cf575f80fd5b9392505050565b60805160a05160c05160e05161010051615e18620001845f395f8181610465015261459f01525f818161062b01526147e401525f8181610796015281816135b40152818161490f015281816149c401528181614aa001528181614d6301528181614e100152614eec01525f81816105d00152818161307a01526139ed01525f81816104d40152818161068701528181613050015281816130a4015281816139c30152613a170152615e185ff3fe608060405234801561000f575f80fd5b5060043610610339575f3560e01c8063746c8ae1116101b3578063a61bb764116100f3578063d31d83d91161009e578063f2fde38b11610079578063f2fde38b146107c1578063fad99f98146107d4578063fc6facc6146107dc578063ff4840cd146107ef575f80fd5b8063d31d83d914610770578063d557714114610791578063f0261bc2146107b8575f80fd5b8063b7a587bf116100ce578063b7a587bf14610704578063bf2dca0a14610732578063cce6cf9f1461075d575f80fd5b8063a61bb764146106c9578063affed0e0146106dc578063b5d2e0dc146106e5575f80fd5b80638da5cb5b1161015e57806391c05b0b1161013957806391c05b0b1461066f578063927ede2d1461068257806396ab994d146106a95780639d51c3b9146106b6575f80fd5b80638da5cb5b146106155780638e21d5fb146106265780639168ae721461064d575f80fd5b80637c7e8bd21161018e5780637c7e8bd2146105b8578063831cfb58146105cb57806384d7d1d4146105f2575f80fd5b8063746c8ae114610582578063766718081461058a5780637b05afb514610592575f80fd5b80633434735f1161027e578063439162b5116102295780634d99dd16116102045780634d99dd16146105415780636bd8f804146105545780637046529b14610567578063715018a61461057a575f80fd5b8063439162b514610513578063459598a21461052657806346cdc18a14610539575f80fd5b80633cb747bf116102595780633cb747bf146104d257806340b5c837146104f857806343352d611461050b575f80fd5b80633434735f146104605780633b2713c51461049f5780633b802421146104c9575f80fd5b806313f22527116102e9578063201018fb116102c4578063201018fb1461041b5780632cc138be1461042e5780632e787be31461043757806330158eea14610440575f80fd5b806313f22527146103ba57806319fac8fd146103cd5780631d5611b8146103e0575f80fd5b80630321731c116103195780630321731c1461038b5780630eb573af1461039e57806312a3e947146103b1575f80fd5b806243b7581461033d5780629c6f0c14610363578063026e402b14610378575b5f80fd5b61035061034b3660046154c4565b610802565b6040519081526020015b60405180910390f35b6103766103713660046154df565b610828565b005b610376610386366004615529565b6109eb565b6103506103993660046154c4565b610f87565b6103766103ac366004615553565b610fc1565b610350609a5481565b6103506103c83660046154c4565b611096565b6103766103db366004615553565b611158565b6104066103ee3660046154c4565b60a36020525f90815260409020805460019091015482565b6040805192835260208301919091520161035a565b610350610429366004615553565b611251565b61035060985481565b61035060995481565b61045361044e3660046155b2565b6113f5565b60405161035a9190615652565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161035a565b6103506104ad3660046156f8565b60a460209081525f928352604080842090915290825290205481565b610350609c5481565b7f0000000000000000000000000000000000000000000000000000000000000000610487565b610376610506366004615553565b611614565b6104536116fb565b610376610521366004615724565b611917565b610487610534366004615553565b611dd8565b609e54610350565b61037661054f366004615529565b611e00565b610376610562366004615792565b612561565b6103766105753660046154df565b613045565b6103766131b9565b6103766131cc565b61035061345a565b6104066105a03660046154c4565b60a16020525f90815260409020805460019091015482565b6103506105c63660046154c4565b6134b8565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6106056106003660046154c4565b6134d5565b604051901515815260200161035a565b6033546001600160a01b0316610487565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b61066061065b3660046154c4565b6134ff565b60405161035a939291906157d0565b61037661067d366004615553565b6135b1565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6097546106059060ff1681565b6103506106c43660046156f8565b61380d565b6103506106d7366004615529565b61381f565b610350609d5481565b6103506106f33660046154c4565b609f6020525f908152604090205481565b610717610712366004615529565b613957565b6040805182518152602092830151928101929092520161035a565b6103506107403660046154c4565b6001600160a01b03165f90815260a1602052604090206001015490565b61037661076b366004615800565b6139b8565b61078361077e366004615848565b613f1a565b60405161035a9291906158bd565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b610350609b5481565b6103766107cf3660046154c4565b614092565b61037661413c565b6103766107ea366004615800565b6141ee565b6103766107fd3660046154c4565b61459c565b6001600160a01b0381165f90815260a26020526040812061082290614651565b92915050565b61083061465a565b81609d54811461086c576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61087783600161590a565b609d55609f5f61088a60208501856154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f20545f0361092c57609e6108bf60208401846154c4565b81546001810183555f9283526020808420909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039390931692909217909155609e5491609f91610912908601866154c4565b6001600160a01b0316815260208101919091526040015f20555b8160a05f61093d60208401846154c4565b6001600160a01b0316815260208101919091526040015f2061095f8282615a3a565b5061096f905060208301836154c4565b6001600160a01b03167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d60208401356109ab604086018661591d565b6040516109ba93929190615ba1565b60405180910390a260975460ff161580156109d95750609954609e5411155b156109e6576109e66146ce565b505050565b335f908152609f6020526040812054839103610a33576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a3b61484e565b815f03610a74576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a95336001600160a01b0385165f90815260a260205260409020906148c1565b5060975460ff16610b23576001600160a01b0383165f90815260a46020908152604080832033845290915281208054849290610ad290849061590a565b90915550506001600160a01b0383165f90815260a3602052604081208054849290610afe90849061590a565b90915550506001600160a01b0383165f90815260a36020526040902080546001909101555b6001600160a01b0383165f90815260a3602090815260408083206001810154905460a48452828520338652909352908320549092829003610b9a576001600160a01b0386165f81815260a460209081526040808320338452825280832089905592825260a390522060018101869055859055610c3b565b81610ba58487615bf4565b610baf9190615c38565b610bb9908261590a565b6001600160a01b0387165f81815260a46020908152604080832033845282528083209490945591815260a39091529081208054879290610bfa90849061590a565b90915550829050610c0b8487615bf4565b610c159190615c38565b610c1f908461590a565b6001600160a01b0387165f90815260a360205260409020600101555b6001600160a01b0386165f90815260a36020526040902054859003610c72576001609c5f828254610c6c919061590a565b90915550505b6001600160a01b0386165f908152609f602052604090205460975460ff168015610c9c5750600181115b15610ed1575f610cad600183615c4b565b90505b8015610ecf5760a35f609e610cc6600185615c4b565b81548110610cd657610cd6615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001812054609e8054919260a39290919085908110610d1657610d16615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115610ebd575f609e610d4e600184615c4b565b81548110610d5e57610d5e615c5e565b5f91825260209091200154609e80546001600160a01b0390921692509083908110610d8b57610d8b615c5e565b5f918252602090912001546001600160a01b0316609e610dac600185615c4b565b81548110610dbc57610dbc615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609e8381548110610dfb57610dfb615c5e565b5f9182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393909316929092179091558290609f90609e610e42600185615c4b565b81548110610e5257610e52615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055610e8182600161590a565b609f5f609e8581548110610e9757610e97615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80610ec781615c8b565b915050610cb0565b505b6001600160a01b0387165f81815260a360209081526040918290205482518a815291820181905292339290917f24d7bda8602b916d64417f0dbfe2e2e88ec9b1157bd9f596dfdb91ba26624e04910160405180910390a3610f333330896148d5565b60975460ff168015610f465750609b5482115b8015610f6b57506099546001600160a01b0389165f908152609f602052604090205411155b15610f7857610f786146ce565b50505050506109e66001606555565b6001600160a01b0381165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b03610822565b610fc961465a565b801580610fd7575060995481145b1561100e576040517f383a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff1661106357609e54611067565b609c545b90505f609954821061107b5760995461107d565b815b9050609b548114611090576110906146ce565b50505050565b6001600160a01b0381165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b0381805b82811015611150576001600160a01b0385165f90815260a6602052604081206110f79083614b61565b5f81815260a56020908152604091829020825180840190935280548352600101549082018190529192509061112a61345a565b1061113f5761113884615ca0565b9350611146565b5050611150565b50506001016110ce565b509392505050565b335f818152609f6020526040812054900361119f576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60148211156111da576040517f6e11528c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260a1602081815260408084208054825180840184528981526001830180548287019081529789905295855251909155935190925581518681529081018390529192917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a2505050565b5f61125a61484e565b6112a260a65f335b6001600160a01b03166001600160a01b031681526020019081526020015f2054600f81810b700100000000000000000000000000000000909204900b0390565b5f036112da576040517f5f013ef800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8115806112f157506112ee60a65f33611262565b82115b6112fb5781611307565b61130760a65f33611262565b91505f5b82156113a057335f90815260a66020526040812061132890614bf6565b5f81815260a56020908152604091829020825180840190935280548352600101549082018190529192509061135b61345a565b10156113685750506113a0565b335f90815260a66020526040902061137f90614c6e565b50805161138c908461590a565b925061139785615c8b565b9450505061130b565b805f036113d9576040517f3cc5dedc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113e4335b82614d29565b90506113f06001606555565b919050565b60605f8267ffffffffffffffff8111156114115761141161597e565b60405190808252806020026020018201604052801561145d57816020015b60408051606080820183525f80835260208301529181019190915281526020019060019003908161142f5790505b5090505f5b8381101561115057604051806060016040528060a05f88888681811061148a5761148a615c5e565b905060200201602081019061149f91906154c4565b6001600160a01b03908116825260208083019390935260409091015f90812054909116835291019060a0908888868181106114dc576114dc615c5e565b90506020020160208101906114f191906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f2060010154815260200160a05f88888681811061152e5761152e615c5e565b905060200201602081019061154391906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f206002018054611570906159ab565b80601f016020809104026020016040519081016040528092919081815260200182805461159c906159ab565b80156115e75780601f106115be576101008083540402835291602001916115e7565b820191905f5260205f20905b8154815290600101906020018083116115ca57829003601f168201915b505050505081525082828151811061160157611601615c5e565b6020908102919091010152600101611462565b61161c61465a565b60975460ff1615611659576040517fbd51da0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b428111158061167357506116706201518082615cb8565b15155b8061167f575060985481145b156116b6576040517fde16b26100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609e546060905f9067ffffffffffffffff81111561171b5761171b61597e565b60405190808252806020026020018201604052801561176757816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816117395790505b5090505f5b609e5481101561191157604051806060016040528060a05f609e858154811061179757611797615c5e565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409092018120549092168352609e8054939091019260a0929190869081106117e3576117e3615c5e565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f2060010154815260200160a05f609e858154811061183c5761183c615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020600201805461186d906159ab565b80601f0160208091040260200160405190810160405280929190818152602001828054611899906159ab565b80156118e45780601f106118bb576101008083540402835291602001916118e4565b820191905f5260205f20905b8154815290600101906020018083116118c757829003601f168201915b50505050508152508282815181106118fe576118fe615c5e565b602090810291909101015260010161176c565b50919050565b5f54610100900460ff161580801561193557505f54600160ff909116105b8061194e5750303b15801561194e57505f5460ff166001145b6119df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611a3b575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b038716611a7b576040517fee77070400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855f03611ab4576040517f2da55d0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845f03611aed576040517f7d8ad8a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4284111580611b075750611b046201518085615cb8565b15155b15611b3e576040517fde16b26100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f829003611b78576040517fbb01aad100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b8187614fa6565b611b89615004565b6099869055609a8590556098849055609b8290555f5b609b54811015611cfa57838382818110611bbb57611bbb615c5e565b9050602002810190611bcd9190615ccb565b60a05f868685818110611be257611be2615c5e565b9050602002810190611bf49190615ccb565b611c029060208101906154c4565b6001600160a01b0316815260208101919091526040015f20611c248282615a3a565b905050609e848483818110611c3b57611c3b615c5e565b9050602002810190611c4d9190615ccb565b611c5b9060208101906154c4565b8154600180820184555f938452602090932001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055611ca490829061590a565b609f5f868685818110611cb957611cb9615c5e565b9050602002810190611ccb9190615ccb565b611cd99060208101906154c4565b6001600160a01b0316815260208101919091526040015f2055600101611b9f565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a18015611dcf575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609e8181548110611de7575f80fd5b5f918252602090912001546001600160a01b0316905081565b611e0861484e565b805f03611e41576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e4b82336150a2565b5f03611e83576040517f857ad50500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611e8e83336150a2565b1015611ec6576040517f08c2348a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f908152609f60205260408120546097549015919060ff16611ef2575f611f00565b609a54611f0090600161590a565b60408051808201909152848152602081018290529091505f33611f22336150f2565b60405160609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208301526034820152605401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301205f81815260a590935291205490915015611fd6576040517fdeeb052700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81815260a560209081526040808320855181558583015160019182015533845260a68352818420805470010000000000000000000000000000000090819004600f0b8087528284019095529290942085905583546fffffffffffffffffffffffffffffffff90811693909101160217905560975460ff166120d5576001600160a01b0386165f90815260a46020908152604080832033845290915281208054879290612084908490615c4b565b90915550506001600160a01b0386165f90815260a36020526040812080548792906120b0908490615c4b565b90915550506001600160a01b0386165f90815260a36020526040902080546001909101555b6001600160a01b0386165f90815260a3602090815260408083206001810154905460a4845282852033865290935292205481612111848a615bf4565b61211b9190615c38565b6121259082615c4b565b6001600160a01b038a165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548a9290612166908490615c4b565b90915550829050612177848a615bf4565b6121819190615c38565b61218b9084615c4b565b6001600160a01b038a165f90815260a36020908152604080832060010193909355609f90522054871580156121c2575060975460ff165b80156121cf5750609c5481105b15612430576001600160a01b038a165f908152609f60205260408120546121f890600190615c4b565b90505b6001609c5461220a9190615c4b565b81101561242e5760a35f609e838154811061222757612227615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a390609e61225c85600161590a565b8154811061226c5761226c615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612426575f609e82815481106122aa576122aa615c5e565b5f918252602090912001546001600160a01b03169050609e6122cd83600161590a565b815481106122dd576122dd615c5e565b5f91825260209091200154609e80546001600160a01b03909216918490811061230857612308615c5e565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905580609e61234b84600161590a565b8154811061235b5761235b615c5e565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905561239b82600161590a565b609f5f609e85815481106123b1576123b1615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020556123e082600261590a565b609f5f609e6123f086600161590a565b8154811061240057612400615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b6001016121fb565b505b8715801561245357506001600160a01b038a165f90815260a36020526040902054155b15612470576001609c5f82825461246a9190615c4b565b90915550505b6001600160a01b038a165f90815260a3602052604090205433604080518c8152602081018490529081018a90526001600160a01b03918216918d16907f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c9060600160405180910390a3881580156124e9575060975460ff165b80156124f75750609b548211155b801561253d5750609b546001600160a01b038c165f908152609f6020526040902054118061253d5750609c546001600160a01b038c165f908152609f6020526040902054115b1561254a5761254a6146ce565b50505050505050505061255d6001606555565b5050565b335f908152609f60205260408120548491036125a9576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f908152609f60205260408120548491036125f1576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6125f961484e565b825f03612632576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61263c85336150a2565b5f03612674576040517f857ad50500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261267f86336150a2565b10156126b7576040517f08c2348a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385165f908152609f602052604081205460975490159060ff1661275f576001600160a01b0387165f90815260a4602090815260408083203384529091528120805487929061270e908490615c4b565b90915550506001600160a01b0387165f90815260a360205260408120805487929061273a908490615c4b565b90915550506001600160a01b0387165f90815260a36020526040902080546001909101555b6001600160a01b0387165f90815260a3602090815260408083206001810154905460a484528285203386529093529220548161279b848a615bf4565b6127a59190615c38565b6127af9082615c4b565b6001600160a01b038b165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548a92906127f0908490615c4b565b90915550829050612801848a615bf4565b61280b9190615c38565b6128159084615c4b565b6001600160a01b038b165f90815260a36020908152604080832060010193909355609f905220548415801561284c575060975460ff165b80156128595750609c5481105b15612aba576001600160a01b038b165f908152609f602052604081205461288290600190615c4b565b90505b6001609c546128949190615c4b565b811015612ab85760a35f609e83815481106128b1576128b1615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a390609e6128e685600161590a565b815481106128f6576128f6615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612ab0575f609e828154811061293457612934615c5e565b5f918252602090912001546001600160a01b03169050609e61295783600161590a565b8154811061296757612967615c5e565b5f91825260209091200154609e80546001600160a01b03909216918490811061299257612992615c5e565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905580609e6129d584600161590a565b815481106129e5576129e5615c5e565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055612a2582600161590a565b609f5f609e8581548110612a3b57612a3b615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055612a6a82600261590a565b609f5f609e612a7a86600161590a565b81548110612a8a57612a8a615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b600101612885565b505b84158015612add57506001600160a01b038b165f90815260a36020526040902054155b15612afa576001609c5f828254612af49190615c4b565b90915550505b84158015612b0a575060975460ff165b8015612b185750609b548111155b8015612b5e5750609b546001600160a01b038c165f908152609f60205260409020541180612b5e5750609c546001600160a01b038c165f908152609f6020526040902054115b15612b6857600195505b612b89336001600160a01b038c165f90815260a260205260409020906148c1565b5060975460ff16612c17576001600160a01b038a165f90815260a460209081526040808320338452909152812080548b9290612bc690849061590a565b90915550506001600160a01b038a165f90815260a36020526040812080548b9290612bf290849061590a565b90915550506001600160a01b038a165f90815260a36020526040902080546001909101555b6001600160a01b038a165f90815260a3602090815260408083206001810154905460a484528285203386529093529220549195509350915082612c5a858b615bf4565b612c649190615c38565b612c6e908361590a565b6001600160a01b038b165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548b9290612caf90849061590a565b90915550839050612cc0858b615bf4565b612cca9190615c38565b612cd4908561590a565b6001600160a01b038b165f90815260a360205260409020600181019190915554899003612d13576001609c5f828254612d0d919061590a565b90915550505b506001600160a01b0389165f908152609f602052604090205460975460ff168015612d3e5750600181115b15612f73575f612d4f600183615c4b565b90505b8015612f715760a35f609e612d68600185615c4b565b81548110612d7857612d78615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001812054609e8054919260a39290919085908110612db857612db8615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612f5f575f609e612df0600184615c4b565b81548110612e0057612e00615c5e565b5f91825260209091200154609e80546001600160a01b0390921692509083908110612e2d57612e2d615c5e565b5f918252602090912001546001600160a01b0316609e612e4e600185615c4b565b81548110612e5e57612e5e615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609e8381548110612e9d57612e9d615c5e565b5f9182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393909316929092179091558290609f90609e612ee4600185615c4b565b81548110612ef457612ef4615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055612f2382600161590a565b609f5f609e8581548110612f3957612f39615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80612f6981615c8b565b915050612d52565b505b60975460ff168015612f865750609b5481115b8015612fab57506099546001600160a01b038b165f908152609f602052604090205411155b15612fb557600195505b8515612fc357612fc36146ce565b6001600160a01b038b81165f81815260a36020908152604080832054948f16808452928190205481518f8152928301869052908201819052923392917ffdac6e81913996d95abcc289e90f2d8bd235487ce6fe6f821e7d21002a1915b49060600160405180910390a4505050505050505061303e6001606555565b5050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561312d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130fe573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131229190615d07565b6001600160a01b0316145b610830576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016119d6565b6131c161465a565b6131ca5f614fa6565b565b6131d461465a565b609854421015613210576040517f080bb11a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609c545f0361324b576040517fd7d776cb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609e548110156133f7575f5b818110156133ee5760a35f609e83815481106132a4576132a4615c5e565b5f9182526020808320909101546001600160a01b03168352820192909252604001812054609e8054919260a392909190869081106132e4576132e4615c5e565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205411156133e6575f609e828154811061332257613322615c5e565b5f91825260209091200154609e80546001600160a01b039092169250908490811061334f5761334f615c5e565b5f91825260209091200154609e80546001600160a01b03909216918490811061337a5761337a615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609e84815481106133b9576133b9615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b600101613286565b5060010161327a565b505f5b609e548110156134515761340f81600161590a565b609f5f609e848154811061342557613425615c5e565b5f9182526020808320909101546001600160a01b031683528201929092526040019020556001016133fa565b506131ca6146ce565b5f609854421015613497576040517fd021716f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62015180609854426134a99190615c4b565b6134b39190615c38565b905090565b6001600160a01b0381165f90815260a76020526040812054610822565b6001600160a01b0381165f90815260a4602090815260408083203384529091528120541515610822565b60a06020525f90815260409020805460018201546002830180546001600160a01b03909316939192613530906159ab565b80601f016020809104026020016040519081016040528092919081815260200182805461355c906159ab565b80156135a75780601f1061357e576101008083540402835291602001916135a7565b820191905f5260205f20905b81548152906001019060200180831161358a57829003601f168201915b5050505050905083565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614613613576040517f4032cbb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60aa54156137b2575f5b61362760a8614651565b8110156137b0575f60a18161363d60a885615117565b6001600160a01b0316815260208101919091526040015f9081205460aa5490925060ab8261366c60a887615117565b6001600160a01b0316815260208101919091526040015f205461368f9086615bf4565b6136999190615c38565b90505f60646136a88484615bf4565b6136b29190615c38565b90505f6136bf8284615c4b565b90508160a15f6136d060a889615117565b6001600160a01b03166001600160a01b031681526020019081526020015f206001015f828254613700919061590a565b9091555081905060a35f61371560a889615117565b6001600160a01b03166001600160a01b031681526020019081526020015f205f015f828254613744919061590a565b90915550613755905060a886615117565b6001600160a01b03167f60ce3cc2d133631eac66a476f14997a9fa682bd05a60dd993cf02285822d78d88284604051613798929190918252602082015260400190565b60405180910390a250506001909201915061361d9050565b505b5f5b6137be60a8614651565b81101561255d5760ab5f6137d360a884615117565b6001600160a01b0316815260208101919091526040015f908120556138046137fc60a883615117565b60a890615122565b506001016137b4565b5f61381883836150a2565b9392505050565b6001600160a01b0382165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b035f0361386157505f610822565b8115806138a157506001600160a01b0383165f90815260a66020526040902054600f81810b700100000000000000000000000000000000909204900b0382115b6138ab57816138e1565b6001600160a01b0383165f90815260a66020526040902054600f81810b700100000000000000000000000000000000909204900b035b91505f805b83811015611150576001600160a01b0385165f90815260a66020526040812061390f9083614b61565b5f81815260a56020908152604091829020825180840190935280548084526001909101549183019190915291925090613948908561590a565b935050508060010190506138e6565b604080518082019091525f80825260208201526001600160a01b0383165f90815260a66020526040812061398b9084614b61565b5f90815260a560209081526040918290208251808401909352805483526001015490820152949350505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015613aa057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015613a71573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613a959190615d07565b6001600160a01b0316145b613b2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016119d6565b82609d548114613b68576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613b7384600161590a565b609d555f805b83811015613ed257609b54609f5f878785818110613b9957613b99615c5e565b9050602002016020810190613bae91906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f205411613bd857600191505b5f609f5f878785818110613bee57613bee615c5e565b9050602002016020810190613c0391906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115613e54575f6001609f5f888886818110613c4157613c41615c5e565b9050602002016020810190613c5691906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f2054613c809190615c4b565b90505b609e54613c9290600190615c4b565b811015613d6457609e613ca682600161590a565b81548110613cb657613cb6615c5e565b5f91825260209091200154609e80546001600160a01b039092169183908110613ce157613ce1615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609f5f609e8481548110613d2457613d24615c5e565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190613d57908490615c4b565b9091555050600101613c83565b50609e805480613d7657613d76615d22565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609f90868684818110613dbb57613dbb615c5e565b9050602002016020810190613dd091906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a35f878785818110613e0857613e08615c5e565b9050602002016020810190613e1d91906154c4565b6001600160a01b0316815260208101919091526040015f20541115613e54576001609c5f828254613e4e9190615c4b565b90915550505b60a05f868684818110613e6957613e69615c5e565b9050602002016020810190613e7e91906154c4565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590613ec8600283018261546a565b5050600101613b79565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618484604051613f04929190615d4f565b60405180910390a1801561303e5761303e6146ce565b5f6060835f03613f56576040517f89076b3900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385165f90815260a260205260409020613f7690614651565b91508367ffffffffffffffff811115613f9157613f9161597e565b604051908082528060200260200182016040528015613fba578160200160208202803683370190505b5090505f613fc88486615bf4565b90505f6001613fd7868261590a565b613fe19088615bf4565b613feb9190615c4b565b9050613ff8600185615c4b565b81111561400d5761400a600185615c4b565b90505b815f5b828211614086576140448261402481615ca0565b6001600160a01b038c165f90815260a26020526040902090945090615117565b858261404f81615ca0565b93508151811061406157614061615c5e565b60200260200101906001600160a01b031690816001600160a01b031681525050614010565b50505050935093915050565b61409a61465a565b6001600160a01b038116614130576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016119d6565b61413981614fa6565b50565b61414461484e565b335f90815260a16020526040812060010154900361418e576040517f5426dfcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260a1602052604081206001018054919055906141ae906113de565b60405181815233907f8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e4119060200160405180910390a2506131ca6001606555565b6141f661465a565b82609d548114614232576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61423d84600161590a565b609d555f805b83811015613ed257609b54609f5f87878581811061426357614263615c5e565b905060200201602081019061427891906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f2054116142a257600191505b5f609f5f8787858181106142b8576142b8615c5e565b90506020020160208101906142cd91906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f2054111561451e575f6001609f5f88888681811061430b5761430b615c5e565b905060200201602081019061432091906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f205461434a9190615c4b565b90505b609e5461435c90600190615c4b565b81101561442e57609e61437082600161590a565b8154811061438057614380615c5e565b5f91825260209091200154609e80546001600160a01b0390921691839081106143ab576143ab615c5e565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609f5f609e84815481106143ee576143ee615c5e565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190614421908490615c4b565b909155505060010161434d565b50609e80548061444057614440615d22565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609f9086868481811061448557614485615c5e565b905060200201602081019061449a91906154c4565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a35f8787858181106144d2576144d2615c5e565b90506020020160208101906144e791906154c4565b6001600160a01b0316815260208101919091526040015f2054111561451e576001609c5f8282546145189190615c4b565b90915550505b60a05f86868481811061453357614533615c5e565b905060200201602081019061454891906154c4565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590614592600283018261546a565b5050600101614243565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146145fe576040517f52d033bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61460960a8826148c1565b50600160aa5f82825461461c919061590a565b90915550506001600160a01b0381165f90815260ab6020526040812080546001929061464990849061590a565b909155505050565b5f610822825490565b6033546001600160a01b031633146131ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016119d6565b60995460975460ff16156146f257609954609c5410156146ed5750609c545b614703565b609954609e5410156147035750609e545b5f8167ffffffffffffffff81111561471d5761471d61597e565b604051908082528060200260200182016040528015614746578160200160208202803683370190505b5090505f5b828110156147b357609e818154811061476657614766615c5e565b905f5260205f20015f9054906101000a90046001600160a01b031682828151811061479357614793615c5e565b6001600160a01b039092166020928302919091019091015260010161474b565b506040517f9b8201a40000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b8201a490614819908490600401615d9c565b5f604051808303815f87803b158015614830575f80fd5b505af1158015614842573d5f803e3d5ffd5b50509151609b55505050565b6002606554036148ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016119d6565b6002606555565b5f613818836001600160a01b038416615136565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614956573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061497a9190615dae565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015614a0c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614a309190615dc5565b614a66576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614ae7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614b0b9190615dae565b9050821580614b23575082614b208383615c4b565b14155b1561303e576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001606555565b5f80614b83614b6f84615182565b8554614b7e9190600f0b615de4565b615237565b84549091507001000000000000000000000000000000009004600f90810b9082900b12614bdc576040517fb4120f1400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f0b5f9081526001939093016020525050604090205490565b5f614c1d8254600f81810b700100000000000000000000000000000000909204900b131590565b15614c54576040517f3db2a12a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b508054600f0b5f9081526001909101602052604090205490565b5f614c958254600f81810b700100000000000000000000000000000000909204900b131590565b15614ccc576040517f3db2a12a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b508054600f0b5f818152600180840160205260408220805492905583547fffffffffffffffffffffffffffffffff000000000000000000000000000000001692016fffffffffffffffffffffffffffffffff169190911790915590565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614daa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614dce9190615dae565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015614e58573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614e7c9190615dc5565b614eb2576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614f33573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614f579190615dae565b9050821580614f6f575082614f6c8383615c4b565b14155b15611090576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff1661509a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016119d6565b6131ca6152cb565b6001600160a01b038083165f81815260a360208181526040808420600181015460a48452828620978916865296835290842054948452919052549092916150e891615bf4565b6138189190615c38565b6001600160a01b0381165f90815260a760205260409020805460018101825590611911565b5f6138188383615361565b5f613818836001600160a01b038416615387565b5f81815260018301602052604081205461517b57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610822565b505f610822565b5f7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821115615233576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e206160448201527f6e20696e7432353600000000000000000000000000000000000000000000000060648201526084016119d6565b5090565b80600f81900b81146113f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f323820626974730000000000000000000000000000000000000000000000000060648201526084016119d6565b5f54610100900460ff16614b5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016119d6565b5f825f01828154811061537657615376615c5e565b905f5260205f200154905092915050565b5f8181526001830160205260408120548015615461575f6153a9600183615c4b565b85549091505f906153bc90600190615c4b565b905081811461541b575f865f0182815481106153da576153da615c5e565b905f5260205f200154905080875f0184815481106153fa576153fa615c5e565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061542c5761542c615d22565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610822565b5f915050610822565b508054615476906159ab565b5f825580601f10615485575050565b601f0160209004905f5260205f209081019061413991905b80821115615233575f815560010161549d565b6001600160a01b0381168114614139575f80fd5b5f602082840312156154d4575f80fd5b8135613818816154b0565b5f80604083850312156154f0575f80fd5b82359150602083013567ffffffffffffffff81111561550d575f80fd5b83016060818603121561551e575f80fd5b809150509250929050565b5f806040838503121561553a575f80fd5b8235615545816154b0565b946020939093013593505050565b5f60208284031215615563575f80fd5b5035919050565b5f8083601f84011261557a575f80fd5b50813567ffffffffffffffff811115615591575f80fd5b6020830191508360208260051b85010111156155ab575f80fd5b9250929050565b5f80602083850312156155c3575f80fd5b823567ffffffffffffffff8111156155d9575f80fd5b6155e58582860161556a565b90969095509350505050565b5f81518084525f5b81811015615615576020818501810151868301820152016155f9565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b838110156156ea578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b03168452878101518885015286015160608785018190526156d6818601836155f1565b968901969450505090860190600101615679565b509098975050505050505050565b5f8060408385031215615709575f80fd5b8235615714816154b0565b9150602083013561551e816154b0565b5f805f805f8060a08789031215615739575f80fd5b8635615744816154b0565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115615774575f80fd5b61578089828a0161556a565b979a9699509497509295939492505050565b5f805f606084860312156157a4575f80fd5b83356157af816154b0565b925060208401356157bf816154b0565b929592945050506040919091013590565b6001600160a01b0384168152826020820152606060408201525f6157f760608301846155f1565b95945050505050565b5f805f60408486031215615812575f80fd5b83359250602084013567ffffffffffffffff81111561582f575f80fd5b61583b8682870161556a565b9497909650939450505050565b5f805f6060848603121561585a575f80fd5b8335615865816154b0565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b838110156158b25781516001600160a01b03168752958201959082019060010161588d565b509495945050505050565b828152604060208201525f6158d5604083018461587a565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610822576108226158dd565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615950575f80fd5b83018035915067ffffffffffffffff82111561596a575f80fd5b6020019150368190038213156155ab575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c908216806159bf57607f821691505b602082108103611911577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f8211156109e657805f5260205f20601f840160051c81016020851015615a1b5750805b601f840160051c820191505b8181101561303e575f8155600101615a27565b8135615a45816154b0565b6001600160a01b03811673ffffffffffffffffffffffffffffffffffffffff1983541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112615ab1575f80fd5b8501803567ffffffffffffffff811115615ac9575f80fd5b8036038483011315615ad9575f80fd5b615aed81615ae785546159ab565b856159f6565b5f601f821160018114615b20575f8315615b0957508382018601355b5f19600385901b1c1916600184901b178555615b96565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015615b6c57868501890135825593880193908901908801615b4d565b5084821015615b8a575f1960f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b8082028115828204841417610822576108226158dd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82615c4657615c46615c0b565b500490565b81810381811115610822576108226158dd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81615c9957615c996158dd565b505f190190565b5f5f198203615cb157615cb16158dd565b5060010190565b5f82615cc657615cc6615c0b565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615cfd575f80fd5b9190910192915050565b5f60208284031215615d17575f80fd5b8151613818816154b0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b86811015615d91578235615d76816154b0565b6001600160a01b031682529183019190830190600101615d63565b509695505050505050565b602081525f613818602083018461587a565b5f60208284031215615dbe575f80fd5b5051919050565b5f60208284031215615dd5575f80fd5b81518015158114613818575f80fd5b8082018281125f831280158216821582161715615e0357615e036158dd565b50509291505056fea164736f6c6343000818000a", } // L2StakingABI is the input ABI used to generate the binding from. @@ -216,37 +215,6 @@ func (_L2Staking *L2StakingTransactorRaw) Transact(opts *bind.TransactOpts, meth return _L2Staking.Contract.contract.Transact(opts, method, params...) } -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_L2Staking *L2StakingCaller) DISTRIBUTECONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _L2Staking.contract.Call(opts, &out, "DISTRIBUTE_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_L2Staking *L2StakingSession) DISTRIBUTECONTRACT() (common.Address, error) { - return _L2Staking.Contract.DISTRIBUTECONTRACT(&_L2Staking.CallOpts) -} - -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_L2Staking *L2StakingCallerSession) DISTRIBUTECONTRACT() (common.Address, error) { - return _L2Staking.Contract.DISTRIBUTECONTRACT(&_L2Staking.CallOpts) -} - // MESSENGER is a free data retrieval call binding the contract method 0x927ede2d. // // Solidity: function MESSENGER() view returns(address) @@ -371,6 +339,37 @@ func (_L2Staking *L2StakingCallerSession) SEQUENCERCONTRACT() (common.Address, e return _L2Staking.Contract.SEQUENCERCONTRACT(&_L2Staking.CallOpts) } +// SYSTEMADDRESS is a free data retrieval call binding the contract method 0x3434735f. +// +// Solidity: function SYSTEM_ADDRESS() view returns(address) +func (_L2Staking *L2StakingCaller) SYSTEMADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L2Staking.contract.Call(opts, &out, "SYSTEM_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// SYSTEMADDRESS is a free data retrieval call binding the contract method 0x3434735f. +// +// Solidity: function SYSTEM_ADDRESS() view returns(address) +func (_L2Staking *L2StakingSession) SYSTEMADDRESS() (common.Address, error) { + return _L2Staking.Contract.SYSTEMADDRESS(&_L2Staking.CallOpts) +} + +// SYSTEMADDRESS is a free data retrieval call binding the contract method 0x3434735f. +// +// Solidity: function SYSTEM_ADDRESS() view returns(address) +func (_L2Staking *L2StakingCallerSession) SYSTEMADDRESS() (common.Address, error) { + return _L2Staking.Contract.SYSTEMADDRESS(&_L2Staking.CallOpts) +} + // CandidateNumber is a free data retrieval call binding the contract method 0x3b802421. // // Solidity: function candidateNumber() view returns(uint256) @@ -402,12 +401,12 @@ func (_L2Staking *L2StakingCallerSession) CandidateNumber() (*big.Int, error) { return _L2Staking.Contract.CandidateNumber(&_L2Staking.CallOpts) } -// Commissions is a free data retrieval call binding the contract method 0x7b05afb5. +// ClaimableUndelegateRequest is a free data retrieval call binding the contract method 0x13f22527. // -// Solidity: function commissions(address staker) view returns(uint256 amount) -func (_L2Staking *L2StakingCaller) Commissions(opts *bind.CallOpts, staker common.Address) (*big.Int, error) { +// Solidity: function claimableUndelegateRequest(address delegator) view returns(uint256) +func (_L2Staking *L2StakingCaller) ClaimableUndelegateRequest(opts *bind.CallOpts, delegator common.Address) (*big.Int, error) { var out []interface{} - err := _L2Staking.contract.Call(opts, &out, "commissions", staker) + err := _L2Staking.contract.Call(opts, &out, "claimableUndelegateRequest", delegator) if err != nil { return *new(*big.Int), err @@ -419,17 +418,62 @@ func (_L2Staking *L2StakingCaller) Commissions(opts *bind.CallOpts, staker commo } +// ClaimableUndelegateRequest is a free data retrieval call binding the contract method 0x13f22527. +// +// Solidity: function claimableUndelegateRequest(address delegator) view returns(uint256) +func (_L2Staking *L2StakingSession) ClaimableUndelegateRequest(delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.ClaimableUndelegateRequest(&_L2Staking.CallOpts, delegator) +} + +// ClaimableUndelegateRequest is a free data retrieval call binding the contract method 0x13f22527. +// +// Solidity: function claimableUndelegateRequest(address delegator) view returns(uint256) +func (_L2Staking *L2StakingCallerSession) ClaimableUndelegateRequest(delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.ClaimableUndelegateRequest(&_L2Staking.CallOpts, delegator) +} + // Commissions is a free data retrieval call binding the contract method 0x7b05afb5. // -// Solidity: function commissions(address staker) view returns(uint256 amount) -func (_L2Staking *L2StakingSession) Commissions(staker common.Address) (*big.Int, error) { +// Solidity: function commissions(address staker) view returns(uint256 rate, uint256 amount) +func (_L2Staking *L2StakingCaller) Commissions(opts *bind.CallOpts, staker common.Address) (struct { + Rate *big.Int + Amount *big.Int +}, error) { + var out []interface{} + err := _L2Staking.contract.Call(opts, &out, "commissions", staker) + + outstruct := new(struct { + Rate *big.Int + Amount *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Rate = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Amount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// Commissions is a free data retrieval call binding the contract method 0x7b05afb5. +// +// Solidity: function commissions(address staker) view returns(uint256 rate, uint256 amount) +func (_L2Staking *L2StakingSession) Commissions(staker common.Address) (struct { + Rate *big.Int + Amount *big.Int +}, error) { return _L2Staking.Contract.Commissions(&_L2Staking.CallOpts, staker) } // Commissions is a free data retrieval call binding the contract method 0x7b05afb5. // -// Solidity: function commissions(address staker) view returns(uint256 amount) -func (_L2Staking *L2StakingCallerSession) Commissions(staker common.Address) (*big.Int, error) { +// Solidity: function commissions(address staker) view returns(uint256 rate, uint256 amount) +func (_L2Staking *L2StakingCallerSession) Commissions(staker common.Address) (struct { + Rate *big.Int + Amount *big.Int +}, error) { return _L2Staking.Contract.Commissions(&_L2Staking.CallOpts, staker) } @@ -464,12 +508,57 @@ func (_L2Staking *L2StakingCallerSession) CurrentEpoch() (*big.Int, error) { return _L2Staking.Contract.CurrentEpoch(&_L2Staking.CallOpts) } -// Delegations is a free data retrieval call binding the contract method 0xc64814dd. +// DelegateeDelegations is a free data retrieval call binding the contract method 0x1d5611b8. +// +// Solidity: function delegateeDelegations(address staker) view returns(uint256 amount, uint256 share) +func (_L2Staking *L2StakingCaller) DelegateeDelegations(opts *bind.CallOpts, staker common.Address) (struct { + Amount *big.Int + Share *big.Int +}, error) { + var out []interface{} + err := _L2Staking.contract.Call(opts, &out, "delegateeDelegations", staker) + + outstruct := new(struct { + Amount *big.Int + Share *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Share = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// DelegateeDelegations is a free data retrieval call binding the contract method 0x1d5611b8. +// +// Solidity: function delegateeDelegations(address staker) view returns(uint256 amount, uint256 share) +func (_L2Staking *L2StakingSession) DelegateeDelegations(staker common.Address) (struct { + Amount *big.Int + Share *big.Int +}, error) { + return _L2Staking.Contract.DelegateeDelegations(&_L2Staking.CallOpts, staker) +} + +// DelegateeDelegations is a free data retrieval call binding the contract method 0x1d5611b8. +// +// Solidity: function delegateeDelegations(address staker) view returns(uint256 amount, uint256 share) +func (_L2Staking *L2StakingCallerSession) DelegateeDelegations(staker common.Address) (struct { + Amount *big.Int + Share *big.Int +}, error) { + return _L2Staking.Contract.DelegateeDelegations(&_L2Staking.CallOpts, staker) +} + +// DelegatorDelegations is a free data retrieval call binding the contract method 0x3b2713c5. // -// Solidity: function delegations(address staker, address delegator) view returns(uint256 amount) -func (_L2Staking *L2StakingCaller) Delegations(opts *bind.CallOpts, staker common.Address, delegator common.Address) (*big.Int, error) { +// Solidity: function delegatorDelegations(address staker, address delegator) view returns(uint256 share) +func (_L2Staking *L2StakingCaller) DelegatorDelegations(opts *bind.CallOpts, staker common.Address, delegator common.Address) (*big.Int, error) { var out []interface{} - err := _L2Staking.contract.Call(opts, &out, "delegations", staker, delegator) + err := _L2Staking.contract.Call(opts, &out, "delegatorDelegations", staker, delegator) if err != nil { return *new(*big.Int), err @@ -481,18 +570,18 @@ func (_L2Staking *L2StakingCaller) Delegations(opts *bind.CallOpts, staker commo } -// Delegations is a free data retrieval call binding the contract method 0xc64814dd. +// DelegatorDelegations is a free data retrieval call binding the contract method 0x3b2713c5. // -// Solidity: function delegations(address staker, address delegator) view returns(uint256 amount) -func (_L2Staking *L2StakingSession) Delegations(staker common.Address, delegator common.Address) (*big.Int, error) { - return _L2Staking.Contract.Delegations(&_L2Staking.CallOpts, staker, delegator) +// Solidity: function delegatorDelegations(address staker, address delegator) view returns(uint256 share) +func (_L2Staking *L2StakingSession) DelegatorDelegations(staker common.Address, delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.DelegatorDelegations(&_L2Staking.CallOpts, staker, delegator) } -// Delegations is a free data retrieval call binding the contract method 0xc64814dd. +// DelegatorDelegations is a free data retrieval call binding the contract method 0x3b2713c5. // -// Solidity: function delegations(address staker, address delegator) view returns(uint256 amount) -func (_L2Staking *L2StakingCallerSession) Delegations(staker common.Address, delegator common.Address) (*big.Int, error) { - return _L2Staking.Contract.Delegations(&_L2Staking.CallOpts, staker, delegator) +// Solidity: function delegatorDelegations(address staker, address delegator) view returns(uint256 share) +func (_L2Staking *L2StakingCallerSession) DelegatorDelegations(staker common.Address, delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.DelegatorDelegations(&_L2Staking.CallOpts, staker, delegator) } // GetAllDelegatorsInPagination is a free data retrieval call binding the contract method 0xd31d83d9. @@ -664,37 +753,6 @@ func (_L2Staking *L2StakingCallerSession) GetStakesInfo(_stakerAddresses []commo return _L2Staking.Contract.GetStakesInfo(&_L2Staking.CallOpts, _stakerAddresses) } -// GetUndelegations is a free data retrieval call binding the contract method 0xed70b343. -// -// Solidity: function getUndelegations(address delegator) view returns((address,uint256,uint256)[]) -func (_L2Staking *L2StakingCaller) GetUndelegations(opts *bind.CallOpts, delegator common.Address) ([]IL2StakingUndelegation, error) { - var out []interface{} - err := _L2Staking.contract.Call(opts, &out, "getUndelegations", delegator) - - if err != nil { - return *new([]IL2StakingUndelegation), err - } - - out0 := *abi.ConvertType(out[0], new([]IL2StakingUndelegation)).(*[]IL2StakingUndelegation) - - return out0, err - -} - -// GetUndelegations is a free data retrieval call binding the contract method 0xed70b343. -// -// Solidity: function getUndelegations(address delegator) view returns((address,uint256,uint256)[]) -func (_L2Staking *L2StakingSession) GetUndelegations(delegator common.Address) ([]IL2StakingUndelegation, error) { - return _L2Staking.Contract.GetUndelegations(&_L2Staking.CallOpts, delegator) -} - -// GetUndelegations is a free data retrieval call binding the contract method 0xed70b343. -// -// Solidity: function getUndelegations(address delegator) view returns((address,uint256,uint256)[]) -func (_L2Staking *L2StakingCallerSession) GetUndelegations(delegator common.Address) ([]IL2StakingUndelegation, error) { - return _L2Staking.Contract.GetUndelegations(&_L2Staking.CallOpts, delegator) -} - // IsStakingTo is a free data retrieval call binding the contract method 0x84d7d1d4. // // Solidity: function isStakingTo(address staker) view returns(bool) @@ -757,6 +815,37 @@ func (_L2Staking *L2StakingCallerSession) LatestSequencerSetSize() (*big.Int, er return _L2Staking.Contract.LatestSequencerSetSize(&_L2Staking.CallOpts) } +// LockedAmount is a free data retrieval call binding the contract method 0xa61bb764. +// +// Solidity: function lockedAmount(address delegator, uint256 number) view returns(uint256) +func (_L2Staking *L2StakingCaller) LockedAmount(opts *bind.CallOpts, delegator common.Address, number *big.Int) (*big.Int, error) { + var out []interface{} + err := _L2Staking.contract.Call(opts, &out, "lockedAmount", delegator, number) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LockedAmount is a free data retrieval call binding the contract method 0xa61bb764. +// +// Solidity: function lockedAmount(address delegator, uint256 number) view returns(uint256) +func (_L2Staking *L2StakingSession) LockedAmount(delegator common.Address, number *big.Int) (*big.Int, error) { + return _L2Staking.Contract.LockedAmount(&_L2Staking.CallOpts, delegator, number) +} + +// LockedAmount is a free data retrieval call binding the contract method 0xa61bb764. +// +// Solidity: function lockedAmount(address delegator, uint256 number) view returns(uint256) +func (_L2Staking *L2StakingCallerSession) LockedAmount(delegator common.Address, number *big.Int) (*big.Int, error) { + return _L2Staking.Contract.LockedAmount(&_L2Staking.CallOpts, delegator, number) +} + // Messenger is a free data retrieval call binding the contract method 0x3cb747bf. // // Solidity: function messenger() view returns(address) @@ -850,6 +939,99 @@ func (_L2Staking *L2StakingCallerSession) Owner() (common.Address, error) { return _L2Staking.Contract.Owner(&_L2Staking.CallOpts) } +// PendingUndelegateRequest is a free data retrieval call binding the contract method 0x0321731c. +// +// Solidity: function pendingUndelegateRequest(address delegator) view returns(uint256) +func (_L2Staking *L2StakingCaller) PendingUndelegateRequest(opts *bind.CallOpts, delegator common.Address) (*big.Int, error) { + var out []interface{} + err := _L2Staking.contract.Call(opts, &out, "pendingUndelegateRequest", delegator) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PendingUndelegateRequest is a free data retrieval call binding the contract method 0x0321731c. +// +// Solidity: function pendingUndelegateRequest(address delegator) view returns(uint256) +func (_L2Staking *L2StakingSession) PendingUndelegateRequest(delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.PendingUndelegateRequest(&_L2Staking.CallOpts, delegator) +} + +// PendingUndelegateRequest is a free data retrieval call binding the contract method 0x0321731c. +// +// Solidity: function pendingUndelegateRequest(address delegator) view returns(uint256) +func (_L2Staking *L2StakingCallerSession) PendingUndelegateRequest(delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.PendingUndelegateRequest(&_L2Staking.CallOpts, delegator) +} + +// QueryDelegationAmount is a free data retrieval call binding the contract method 0x9d51c3b9. +// +// Solidity: function queryDelegationAmount(address delegatee, address delegator) view returns(uint256 amount) +func (_L2Staking *L2StakingCaller) QueryDelegationAmount(opts *bind.CallOpts, delegatee common.Address, delegator common.Address) (*big.Int, error) { + var out []interface{} + err := _L2Staking.contract.Call(opts, &out, "queryDelegationAmount", delegatee, delegator) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// QueryDelegationAmount is a free data retrieval call binding the contract method 0x9d51c3b9. +// +// Solidity: function queryDelegationAmount(address delegatee, address delegator) view returns(uint256 amount) +func (_L2Staking *L2StakingSession) QueryDelegationAmount(delegatee common.Address, delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.QueryDelegationAmount(&_L2Staking.CallOpts, delegatee, delegator) +} + +// QueryDelegationAmount is a free data retrieval call binding the contract method 0x9d51c3b9. +// +// Solidity: function queryDelegationAmount(address delegatee, address delegator) view returns(uint256 amount) +func (_L2Staking *L2StakingCallerSession) QueryDelegationAmount(delegatee common.Address, delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.QueryDelegationAmount(&_L2Staking.CallOpts, delegatee, delegator) +} + +// QueryUnclaimedCommission is a free data retrieval call binding the contract method 0xbf2dca0a. +// +// Solidity: function queryUnclaimedCommission(address delegatee) view returns(uint256 amount) +func (_L2Staking *L2StakingCaller) QueryUnclaimedCommission(opts *bind.CallOpts, delegatee common.Address) (*big.Int, error) { + var out []interface{} + err := _L2Staking.contract.Call(opts, &out, "queryUnclaimedCommission", delegatee) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// QueryUnclaimedCommission is a free data retrieval call binding the contract method 0xbf2dca0a. +// +// Solidity: function queryUnclaimedCommission(address delegatee) view returns(uint256 amount) +func (_L2Staking *L2StakingSession) QueryUnclaimedCommission(delegatee common.Address) (*big.Int, error) { + return _L2Staking.Contract.QueryUnclaimedCommission(&_L2Staking.CallOpts, delegatee) +} + +// QueryUnclaimedCommission is a free data retrieval call binding the contract method 0xbf2dca0a. +// +// Solidity: function queryUnclaimedCommission(address delegatee) view returns(uint256 amount) +func (_L2Staking *L2StakingCallerSession) QueryUnclaimedCommission(delegatee common.Address) (*big.Int, error) { + return _L2Staking.Contract.QueryUnclaimedCommission(&_L2Staking.CallOpts, delegatee) +} + // RewardStartTime is a free data retrieval call binding the contract method 0x2cc138be. // // Solidity: function rewardStartTime() view returns(uint256) @@ -974,37 +1156,6 @@ func (_L2Staking *L2StakingCallerSession) StakerAddresses(arg0 *big.Int) (common return _L2Staking.Contract.StakerAddresses(&_L2Staking.CallOpts, arg0) } -// StakerDelegations is a free data retrieval call binding the contract method 0x91bd43a4. -// -// Solidity: function stakerDelegations(address staker) view returns(uint256 totalDelegationAmount) -func (_L2Staking *L2StakingCaller) StakerDelegations(opts *bind.CallOpts, staker common.Address) (*big.Int, error) { - var out []interface{} - err := _L2Staking.contract.Call(opts, &out, "stakerDelegations", staker) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// StakerDelegations is a free data retrieval call binding the contract method 0x91bd43a4. -// -// Solidity: function stakerDelegations(address staker) view returns(uint256 totalDelegationAmount) -func (_L2Staking *L2StakingSession) StakerDelegations(staker common.Address) (*big.Int, error) { - return _L2Staking.Contract.StakerDelegations(&_L2Staking.CallOpts, staker) -} - -// StakerDelegations is a free data retrieval call binding the contract method 0x91bd43a4. -// -// Solidity: function stakerDelegations(address staker) view returns(uint256 totalDelegationAmount) -func (_L2Staking *L2StakingCallerSession) StakerDelegations(staker common.Address) (*big.Int, error) { - return _L2Staking.Contract.StakerDelegations(&_L2Staking.CallOpts, staker) -} - // StakerRankings is a free data retrieval call binding the contract method 0xb5d2e0dc. // // Solidity: function stakerRankings(address staker) view returns(uint256 ranking) @@ -1117,54 +1268,66 @@ func (_L2Staking *L2StakingCallerSession) UndelegateLockEpochs() (*big.Int, erro return _L2Staking.Contract.UndelegateLockEpochs(&_L2Staking.CallOpts) } -// Undelegations is a free data retrieval call binding the contract method 0x0f3b7059. +// UndelegateRequest is a free data retrieval call binding the contract method 0xb7a587bf. // -// Solidity: function undelegations(address delegator, uint256 ) view returns(address delegatee, uint256 amount, uint256 unlockEpoch) -func (_L2Staking *L2StakingCaller) Undelegations(opts *bind.CallOpts, delegator common.Address, arg1 *big.Int) (struct { - Delegatee common.Address - Amount *big.Int - UnlockEpoch *big.Int -}, error) { +// Solidity: function undelegateRequest(address delegator, uint256 _index) view returns((uint256,uint256)) +func (_L2Staking *L2StakingCaller) UndelegateRequest(opts *bind.CallOpts, delegator common.Address, _index *big.Int) (IL2StakingUndelegateRequest, error) { var out []interface{} - err := _L2Staking.contract.Call(opts, &out, "undelegations", delegator, arg1) + err := _L2Staking.contract.Call(opts, &out, "undelegateRequest", delegator, _index) - outstruct := new(struct { - Delegatee common.Address - Amount *big.Int - UnlockEpoch *big.Int - }) if err != nil { - return *outstruct, err + return *new(IL2StakingUndelegateRequest), err } - outstruct.Delegatee = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.Amount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.UnlockEpoch = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + out0 := *abi.ConvertType(out[0], new(IL2StakingUndelegateRequest)).(*IL2StakingUndelegateRequest) - return *outstruct, err + return out0, err } -// Undelegations is a free data retrieval call binding the contract method 0x0f3b7059. +// UndelegateRequest is a free data retrieval call binding the contract method 0xb7a587bf. // -// Solidity: function undelegations(address delegator, uint256 ) view returns(address delegatee, uint256 amount, uint256 unlockEpoch) -func (_L2Staking *L2StakingSession) Undelegations(delegator common.Address, arg1 *big.Int) (struct { - Delegatee common.Address - Amount *big.Int - UnlockEpoch *big.Int -}, error) { - return _L2Staking.Contract.Undelegations(&_L2Staking.CallOpts, delegator, arg1) +// Solidity: function undelegateRequest(address delegator, uint256 _index) view returns((uint256,uint256)) +func (_L2Staking *L2StakingSession) UndelegateRequest(delegator common.Address, _index *big.Int) (IL2StakingUndelegateRequest, error) { + return _L2Staking.Contract.UndelegateRequest(&_L2Staking.CallOpts, delegator, _index) } -// Undelegations is a free data retrieval call binding the contract method 0x0f3b7059. +// UndelegateRequest is a free data retrieval call binding the contract method 0xb7a587bf. // -// Solidity: function undelegations(address delegator, uint256 ) view returns(address delegatee, uint256 amount, uint256 unlockEpoch) -func (_L2Staking *L2StakingCallerSession) Undelegations(delegator common.Address, arg1 *big.Int) (struct { - Delegatee common.Address - Amount *big.Int - UnlockEpoch *big.Int -}, error) { - return _L2Staking.Contract.Undelegations(&_L2Staking.CallOpts, delegator, arg1) +// Solidity: function undelegateRequest(address delegator, uint256 _index) view returns((uint256,uint256)) +func (_L2Staking *L2StakingCallerSession) UndelegateRequest(delegator common.Address, _index *big.Int) (IL2StakingUndelegateRequest, error) { + return _L2Staking.Contract.UndelegateRequest(&_L2Staking.CallOpts, delegator, _index) +} + +// UndelegateSequence is a free data retrieval call binding the contract method 0x7c7e8bd2. +// +// Solidity: function undelegateSequence(address delegator) view returns(uint256) +func (_L2Staking *L2StakingCaller) UndelegateSequence(opts *bind.CallOpts, delegator common.Address) (*big.Int, error) { + var out []interface{} + err := _L2Staking.contract.Call(opts, &out, "undelegateSequence", delegator) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// UndelegateSequence is a free data retrieval call binding the contract method 0x7c7e8bd2. +// +// Solidity: function undelegateSequence(address delegator) view returns(uint256) +func (_L2Staking *L2StakingSession) UndelegateSequence(delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.UndelegateSequence(&_L2Staking.CallOpts, delegator) +} + +// UndelegateSequence is a free data retrieval call binding the contract method 0x7c7e8bd2. +// +// Solidity: function undelegateSequence(address delegator) view returns(uint256) +func (_L2Staking *L2StakingCallerSession) UndelegateSequence(delegator common.Address) (*big.Int, error) { + return _L2Staking.Contract.UndelegateSequence(&_L2Staking.CallOpts, delegator) } // AddStaker is a paid mutator transaction binding the contract method 0x7046529b. @@ -1209,67 +1372,67 @@ func (_L2Staking *L2StakingTransactorSession) ClaimCommission() (*types.Transact return _L2Staking.Contract.ClaimCommission(&_L2Staking.TransactOpts) } -// ClaimReward is a paid mutator transaction binding the contract method 0x174e31c4. +// ClaimUndelegation is a paid mutator transaction binding the contract method 0x201018fb. // -// Solidity: function claimReward(address delegatee, uint256 targetEpochIndex) returns() -func (_L2Staking *L2StakingTransactor) ClaimReward(opts *bind.TransactOpts, delegatee common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _L2Staking.contract.Transact(opts, "claimReward", delegatee, targetEpochIndex) +// Solidity: function claimUndelegation(uint256 number) returns(uint256) +func (_L2Staking *L2StakingTransactor) ClaimUndelegation(opts *bind.TransactOpts, number *big.Int) (*types.Transaction, error) { + return _L2Staking.contract.Transact(opts, "claimUndelegation", number) } -// ClaimReward is a paid mutator transaction binding the contract method 0x174e31c4. +// ClaimUndelegation is a paid mutator transaction binding the contract method 0x201018fb. // -// Solidity: function claimReward(address delegatee, uint256 targetEpochIndex) returns() -func (_L2Staking *L2StakingSession) ClaimReward(delegatee common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _L2Staking.Contract.ClaimReward(&_L2Staking.TransactOpts, delegatee, targetEpochIndex) +// Solidity: function claimUndelegation(uint256 number) returns(uint256) +func (_L2Staking *L2StakingSession) ClaimUndelegation(number *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.ClaimUndelegation(&_L2Staking.TransactOpts, number) } -// ClaimReward is a paid mutator transaction binding the contract method 0x174e31c4. +// ClaimUndelegation is a paid mutator transaction binding the contract method 0x201018fb. // -// Solidity: function claimReward(address delegatee, uint256 targetEpochIndex) returns() -func (_L2Staking *L2StakingTransactorSession) ClaimReward(delegatee common.Address, targetEpochIndex *big.Int) (*types.Transaction, error) { - return _L2Staking.Contract.ClaimReward(&_L2Staking.TransactOpts, delegatee, targetEpochIndex) +// Solidity: function claimUndelegation(uint256 number) returns(uint256) +func (_L2Staking *L2StakingTransactorSession) ClaimUndelegation(number *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.ClaimUndelegation(&_L2Staking.TransactOpts, number) } -// ClaimUndelegation is a paid mutator transaction binding the contract method 0xe10911b1. +// Delegate is a paid mutator transaction binding the contract method 0x026e402b. // -// Solidity: function claimUndelegation() returns() -func (_L2Staking *L2StakingTransactor) ClaimUndelegation(opts *bind.TransactOpts) (*types.Transaction, error) { - return _L2Staking.contract.Transact(opts, "claimUndelegation") +// Solidity: function delegate(address delegatee, uint256 amount) returns() +func (_L2Staking *L2StakingTransactor) Delegate(opts *bind.TransactOpts, delegatee common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.contract.Transact(opts, "delegate", delegatee, amount) } -// ClaimUndelegation is a paid mutator transaction binding the contract method 0xe10911b1. +// Delegate is a paid mutator transaction binding the contract method 0x026e402b. // -// Solidity: function claimUndelegation() returns() -func (_L2Staking *L2StakingSession) ClaimUndelegation() (*types.Transaction, error) { - return _L2Staking.Contract.ClaimUndelegation(&_L2Staking.TransactOpts) +// Solidity: function delegate(address delegatee, uint256 amount) returns() +func (_L2Staking *L2StakingSession) Delegate(delegatee common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.Delegate(&_L2Staking.TransactOpts, delegatee, amount) } -// ClaimUndelegation is a paid mutator transaction binding the contract method 0xe10911b1. +// Delegate is a paid mutator transaction binding the contract method 0x026e402b. // -// Solidity: function claimUndelegation() returns() -func (_L2Staking *L2StakingTransactorSession) ClaimUndelegation() (*types.Transaction, error) { - return _L2Staking.Contract.ClaimUndelegation(&_L2Staking.TransactOpts) +// Solidity: function delegate(address delegatee, uint256 amount) returns() +func (_L2Staking *L2StakingTransactorSession) Delegate(delegatee common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.Delegate(&_L2Staking.TransactOpts, delegatee, amount) } -// DelegateStake is a paid mutator transaction binding the contract method 0x3c323a1b. +// Distribute is a paid mutator transaction binding the contract method 0x91c05b0b. // -// Solidity: function delegateStake(address delegatee, uint256 amount) returns() -func (_L2Staking *L2StakingTransactor) DelegateStake(opts *bind.TransactOpts, delegatee common.Address, amount *big.Int) (*types.Transaction, error) { - return _L2Staking.contract.Transact(opts, "delegateStake", delegatee, amount) +// Solidity: function distribute(uint256 amount) returns() +func (_L2Staking *L2StakingTransactor) Distribute(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.contract.Transact(opts, "distribute", amount) } -// DelegateStake is a paid mutator transaction binding the contract method 0x3c323a1b. +// Distribute is a paid mutator transaction binding the contract method 0x91c05b0b. // -// Solidity: function delegateStake(address delegatee, uint256 amount) returns() -func (_L2Staking *L2StakingSession) DelegateStake(delegatee common.Address, amount *big.Int) (*types.Transaction, error) { - return _L2Staking.Contract.DelegateStake(&_L2Staking.TransactOpts, delegatee, amount) +// Solidity: function distribute(uint256 amount) returns() +func (_L2Staking *L2StakingSession) Distribute(amount *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.Distribute(&_L2Staking.TransactOpts, amount) } -// DelegateStake is a paid mutator transaction binding the contract method 0x3c323a1b. +// Distribute is a paid mutator transaction binding the contract method 0x91c05b0b. // -// Solidity: function delegateStake(address delegatee, uint256 amount) returns() -func (_L2Staking *L2StakingTransactorSession) DelegateStake(delegatee common.Address, amount *big.Int) (*types.Transaction, error) { - return _L2Staking.Contract.DelegateStake(&_L2Staking.TransactOpts, delegatee, amount) +// Solidity: function distribute(uint256 amount) returns() +func (_L2Staking *L2StakingTransactorSession) Distribute(amount *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.Distribute(&_L2Staking.TransactOpts, amount) } // EmergencyAddStaker is a paid mutator transaction binding the contract method 0x009c6f0c. @@ -1335,6 +1498,48 @@ func (_L2Staking *L2StakingTransactorSession) Initialize(_owner common.Address, return _L2Staking.Contract.Initialize(&_L2Staking.TransactOpts, _owner, _sequencersMaxSize, _undelegateLockEpochs, _rewardStartTime, _stakers) } +// RecordBlocks is a paid mutator transaction binding the contract method 0xff4840cd. +// +// Solidity: function recordBlocks(address sequencerAddr) returns() +func (_L2Staking *L2StakingTransactor) RecordBlocks(opts *bind.TransactOpts, sequencerAddr common.Address) (*types.Transaction, error) { + return _L2Staking.contract.Transact(opts, "recordBlocks", sequencerAddr) +} + +// RecordBlocks is a paid mutator transaction binding the contract method 0xff4840cd. +// +// Solidity: function recordBlocks(address sequencerAddr) returns() +func (_L2Staking *L2StakingSession) RecordBlocks(sequencerAddr common.Address) (*types.Transaction, error) { + return _L2Staking.Contract.RecordBlocks(&_L2Staking.TransactOpts, sequencerAddr) +} + +// RecordBlocks is a paid mutator transaction binding the contract method 0xff4840cd. +// +// Solidity: function recordBlocks(address sequencerAddr) returns() +func (_L2Staking *L2StakingTransactorSession) RecordBlocks(sequencerAddr common.Address) (*types.Transaction, error) { + return _L2Staking.Contract.RecordBlocks(&_L2Staking.TransactOpts, sequencerAddr) +} + +// Redelegate is a paid mutator transaction binding the contract method 0x6bd8f804. +// +// Solidity: function redelegate(address delegateeFrom, address delegateeTo, uint256 amount) returns() +func (_L2Staking *L2StakingTransactor) Redelegate(opts *bind.TransactOpts, delegateeFrom common.Address, delegateeTo common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.contract.Transact(opts, "redelegate", delegateeFrom, delegateeTo, amount) +} + +// Redelegate is a paid mutator transaction binding the contract method 0x6bd8f804. +// +// Solidity: function redelegate(address delegateeFrom, address delegateeTo, uint256 amount) returns() +func (_L2Staking *L2StakingSession) Redelegate(delegateeFrom common.Address, delegateeTo common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.Redelegate(&_L2Staking.TransactOpts, delegateeFrom, delegateeTo, amount) +} + +// Redelegate is a paid mutator transaction binding the contract method 0x6bd8f804. +// +// Solidity: function redelegate(address delegateeFrom, address delegateeTo, uint256 amount) returns() +func (_L2Staking *L2StakingTransactorSession) Redelegate(delegateeFrom common.Address, delegateeTo common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.Redelegate(&_L2Staking.TransactOpts, delegateeFrom, delegateeTo, amount) +} + // RemoveStakers is a paid mutator transaction binding the contract method 0xcce6cf9f. // // Solidity: function removeStakers(uint256 _nonce, address[] remove) returns() @@ -1379,23 +1584,23 @@ func (_L2Staking *L2StakingTransactorSession) RenounceOwnership() (*types.Transa // SetCommissionRate is a paid mutator transaction binding the contract method 0x19fac8fd. // -// Solidity: function setCommissionRate(uint256 commission) returns() -func (_L2Staking *L2StakingTransactor) SetCommissionRate(opts *bind.TransactOpts, commission *big.Int) (*types.Transaction, error) { - return _L2Staking.contract.Transact(opts, "setCommissionRate", commission) +// Solidity: function setCommissionRate(uint256 rate) returns() +func (_L2Staking *L2StakingTransactor) SetCommissionRate(opts *bind.TransactOpts, rate *big.Int) (*types.Transaction, error) { + return _L2Staking.contract.Transact(opts, "setCommissionRate", rate) } // SetCommissionRate is a paid mutator transaction binding the contract method 0x19fac8fd. // -// Solidity: function setCommissionRate(uint256 commission) returns() -func (_L2Staking *L2StakingSession) SetCommissionRate(commission *big.Int) (*types.Transaction, error) { - return _L2Staking.Contract.SetCommissionRate(&_L2Staking.TransactOpts, commission) +// Solidity: function setCommissionRate(uint256 rate) returns() +func (_L2Staking *L2StakingSession) SetCommissionRate(rate *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.SetCommissionRate(&_L2Staking.TransactOpts, rate) } // SetCommissionRate is a paid mutator transaction binding the contract method 0x19fac8fd. // -// Solidity: function setCommissionRate(uint256 commission) returns() -func (_L2Staking *L2StakingTransactorSession) SetCommissionRate(commission *big.Int) (*types.Transaction, error) { - return _L2Staking.Contract.SetCommissionRate(&_L2Staking.TransactOpts, commission) +// Solidity: function setCommissionRate(uint256 rate) returns() +func (_L2Staking *L2StakingTransactorSession) SetCommissionRate(rate *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.SetCommissionRate(&_L2Staking.TransactOpts, rate) } // StartReward is a paid mutator transaction binding the contract method 0x746c8ae1. @@ -1440,25 +1645,25 @@ func (_L2Staking *L2StakingTransactorSession) TransferOwnership(newOwner common. return _L2Staking.Contract.TransferOwnership(&_L2Staking.TransactOpts, newOwner) } -// UndelegateStake is a paid mutator transaction binding the contract method 0x3385ccc2. +// Undelegate is a paid mutator transaction binding the contract method 0x4d99dd16. // -// Solidity: function undelegateStake(address delegatee) returns() -func (_L2Staking *L2StakingTransactor) UndelegateStake(opts *bind.TransactOpts, delegatee common.Address) (*types.Transaction, error) { - return _L2Staking.contract.Transact(opts, "undelegateStake", delegatee) +// Solidity: function undelegate(address delegatee, uint256 amount) returns() +func (_L2Staking *L2StakingTransactor) Undelegate(opts *bind.TransactOpts, delegatee common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.contract.Transact(opts, "undelegate", delegatee, amount) } -// UndelegateStake is a paid mutator transaction binding the contract method 0x3385ccc2. +// Undelegate is a paid mutator transaction binding the contract method 0x4d99dd16. // -// Solidity: function undelegateStake(address delegatee) returns() -func (_L2Staking *L2StakingSession) UndelegateStake(delegatee common.Address) (*types.Transaction, error) { - return _L2Staking.Contract.UndelegateStake(&_L2Staking.TransactOpts, delegatee) +// Solidity: function undelegate(address delegatee, uint256 amount) returns() +func (_L2Staking *L2StakingSession) Undelegate(delegatee common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.Undelegate(&_L2Staking.TransactOpts, delegatee, amount) } -// UndelegateStake is a paid mutator transaction binding the contract method 0x3385ccc2. +// Undelegate is a paid mutator transaction binding the contract method 0x4d99dd16. // -// Solidity: function undelegateStake(address delegatee) returns() -func (_L2Staking *L2StakingTransactorSession) UndelegateStake(delegatee common.Address) (*types.Transaction, error) { - return _L2Staking.Contract.UndelegateStake(&_L2Staking.TransactOpts, delegatee) +// Solidity: function undelegate(address delegatee, uint256 amount) returns() +func (_L2Staking *L2StakingTransactorSession) Undelegate(delegatee common.Address, amount *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.Undelegate(&_L2Staking.TransactOpts, delegatee, amount) } // UpdateRewardStartTime is a paid mutator transaction binding the contract method 0x40b5c837. @@ -1496,11 +1701,156 @@ func (_L2Staking *L2StakingSession) UpdateSequencerSetMaxSize(_sequencerSetMaxSi return _L2Staking.Contract.UpdateSequencerSetMaxSize(&_L2Staking.TransactOpts, _sequencerSetMaxSize) } -// UpdateSequencerSetMaxSize is a paid mutator transaction binding the contract method 0x0eb573af. +// UpdateSequencerSetMaxSize is a paid mutator transaction binding the contract method 0x0eb573af. +// +// Solidity: function updateSequencerSetMaxSize(uint256 _sequencerSetMaxSize) returns() +func (_L2Staking *L2StakingTransactorSession) UpdateSequencerSetMaxSize(_sequencerSetMaxSize *big.Int) (*types.Transaction, error) { + return _L2Staking.Contract.UpdateSequencerSetMaxSize(&_L2Staking.TransactOpts, _sequencerSetMaxSize) +} + +// L2StakingCommissionClaimedIterator is returned from FilterCommissionClaimed and is used to iterate over the raw logs and unpacked data for CommissionClaimed events raised by the L2Staking contract. +type L2StakingCommissionClaimedIterator struct { + Event *L2StakingCommissionClaimed // 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 *L2StakingCommissionClaimedIterator) 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(L2StakingCommissionClaimed) + 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(L2StakingCommissionClaimed) + 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 *L2StakingCommissionClaimedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2StakingCommissionClaimedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2StakingCommissionClaimed represents a CommissionClaimed event raised by the L2Staking contract. +type L2StakingCommissionClaimed struct { + Delegatee common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCommissionClaimed is a free log retrieval operation binding the contract event 0x8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e411. +// +// Solidity: event CommissionClaimed(address indexed delegatee, uint256 amount) +func (_L2Staking *L2StakingFilterer) FilterCommissionClaimed(opts *bind.FilterOpts, delegatee []common.Address) (*L2StakingCommissionClaimedIterator, error) { + + var delegateeRule []interface{} + for _, delegateeItem := range delegatee { + delegateeRule = append(delegateeRule, delegateeItem) + } + + logs, sub, err := _L2Staking.contract.FilterLogs(opts, "CommissionClaimed", delegateeRule) + if err != nil { + return nil, err + } + return &L2StakingCommissionClaimedIterator{contract: _L2Staking.contract, event: "CommissionClaimed", logs: logs, sub: sub}, nil +} + +// WatchCommissionClaimed is a free log subscription operation binding the contract event 0x8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e411. +// +// Solidity: event CommissionClaimed(address indexed delegatee, uint256 amount) +func (_L2Staking *L2StakingFilterer) WatchCommissionClaimed(opts *bind.WatchOpts, sink chan<- *L2StakingCommissionClaimed, delegatee []common.Address) (event.Subscription, error) { + + var delegateeRule []interface{} + for _, delegateeItem := range delegatee { + delegateeRule = append(delegateeRule, delegateeItem) + } + + logs, sub, err := _L2Staking.contract.WatchLogs(opts, "CommissionClaimed", delegateeRule) + 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(L2StakingCommissionClaimed) + if err := _L2Staking.contract.UnpackLog(event, "CommissionClaimed", 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 +} + +// ParseCommissionClaimed is a log parse operation binding the contract event 0x8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e411. // -// Solidity: function updateSequencerSetMaxSize(uint256 _sequencerSetMaxSize) returns() -func (_L2Staking *L2StakingTransactorSession) UpdateSequencerSetMaxSize(_sequencerSetMaxSize *big.Int) (*types.Transaction, error) { - return _L2Staking.Contract.UpdateSequencerSetMaxSize(&_L2Staking.TransactOpts, _sequencerSetMaxSize) +// Solidity: event CommissionClaimed(address indexed delegatee, uint256 amount) +func (_L2Staking *L2StakingFilterer) ParseCommissionClaimed(log types.Log) (*L2StakingCommissionClaimed, error) { + event := new(L2StakingCommissionClaimed) + if err := _L2Staking.contract.UnpackLog(event, "CommissionClaimed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil } // L2StakingCommissionUpdatedIterator is returned from FilterCommissionUpdated and is used to iterate over the raw logs and unpacked data for CommissionUpdated events raised by the L2Staking contract. @@ -1572,15 +1922,15 @@ func (it *L2StakingCommissionUpdatedIterator) Close() error { // L2StakingCommissionUpdated represents a CommissionUpdated event raised by the L2Staking contract. type L2StakingCommissionUpdated struct { - Staker common.Address - Percentage *big.Int - EpochEffective *big.Int - Raw types.Log // Blockchain specific contextual infos + Staker common.Address + OldRate *big.Int + NewRate *big.Int + Raw types.Log // Blockchain specific contextual infos } // FilterCommissionUpdated is a free log retrieval operation binding the contract event 0x6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5. // -// Solidity: event CommissionUpdated(address indexed staker, uint256 percentage, uint256 epochEffective) +// Solidity: event CommissionUpdated(address indexed staker, uint256 oldRate, uint256 newRate) func (_L2Staking *L2StakingFilterer) FilterCommissionUpdated(opts *bind.FilterOpts, staker []common.Address) (*L2StakingCommissionUpdatedIterator, error) { var stakerRule []interface{} @@ -1597,7 +1947,7 @@ func (_L2Staking *L2StakingFilterer) FilterCommissionUpdated(opts *bind.FilterOp // WatchCommissionUpdated is a free log subscription operation binding the contract event 0x6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5. // -// Solidity: event CommissionUpdated(address indexed staker, uint256 percentage, uint256 epochEffective) +// Solidity: event CommissionUpdated(address indexed staker, uint256 oldRate, uint256 newRate) func (_L2Staking *L2StakingFilterer) WatchCommissionUpdated(opts *bind.WatchOpts, sink chan<- *L2StakingCommissionUpdated, staker []common.Address) (event.Subscription, error) { var stakerRule []interface{} @@ -1639,7 +1989,7 @@ func (_L2Staking *L2StakingFilterer) WatchCommissionUpdated(opts *bind.WatchOpts // ParseCommissionUpdated is a log parse operation binding the contract event 0x6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5. // -// Solidity: event CommissionUpdated(address indexed staker, uint256 percentage, uint256 epochEffective) +// Solidity: event CommissionUpdated(address indexed staker, uint256 oldRate, uint256 newRate) func (_L2Staking *L2StakingFilterer) ParseCommissionUpdated(log types.Log) (*L2StakingCommissionUpdated, error) { event := new(L2StakingCommissionUpdated) if err := _L2Staking.contract.UnpackLog(event, "CommissionUpdated", log); err != nil { @@ -1718,17 +2068,16 @@ func (it *L2StakingDelegatedIterator) Close() error { // L2StakingDelegated represents a Delegated event raised by the L2Staking contract. type L2StakingDelegated struct { - Delegatee common.Address - Delegator common.Address - Amount *big.Int - StakeAmount *big.Int - EffectiveEpoch *big.Int - Raw types.Log // Blockchain specific contextual infos + Delegatee common.Address + Delegator common.Address + Amount *big.Int + DelegateeAmount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterDelegated is a free log retrieval operation binding the contract event 0xc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d0. +// FilterDelegated is a free log retrieval operation binding the contract event 0x24d7bda8602b916d64417f0dbfe2e2e88ec9b1157bd9f596dfdb91ba26624e04. // -// Solidity: event Delegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 stakeAmount, uint256 effectiveEpoch) +// Solidity: event Delegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 delegateeAmount) func (_L2Staking *L2StakingFilterer) FilterDelegated(opts *bind.FilterOpts, delegatee []common.Address, delegator []common.Address) (*L2StakingDelegatedIterator, error) { var delegateeRule []interface{} @@ -1747,9 +2096,9 @@ func (_L2Staking *L2StakingFilterer) FilterDelegated(opts *bind.FilterOpts, dele return &L2StakingDelegatedIterator{contract: _L2Staking.contract, event: "Delegated", logs: logs, sub: sub}, nil } -// WatchDelegated is a free log subscription operation binding the contract event 0xc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d0. +// WatchDelegated is a free log subscription operation binding the contract event 0x24d7bda8602b916d64417f0dbfe2e2e88ec9b1157bd9f596dfdb91ba26624e04. // -// Solidity: event Delegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 stakeAmount, uint256 effectiveEpoch) +// Solidity: event Delegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 delegateeAmount) func (_L2Staking *L2StakingFilterer) WatchDelegated(opts *bind.WatchOpts, sink chan<- *L2StakingDelegated, delegatee []common.Address, delegator []common.Address) (event.Subscription, error) { var delegateeRule []interface{} @@ -1793,9 +2142,9 @@ func (_L2Staking *L2StakingFilterer) WatchDelegated(opts *bind.WatchOpts, sink c }), nil } -// ParseDelegated is a log parse operation binding the contract event 0xc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d0. +// ParseDelegated is a log parse operation binding the contract event 0x24d7bda8602b916d64417f0dbfe2e2e88ec9b1157bd9f596dfdb91ba26624e04. // -// Solidity: event Delegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 stakeAmount, uint256 effectiveEpoch) +// Solidity: event Delegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 delegateeAmount) func (_L2Staking *L2StakingFilterer) ParseDelegated(log types.Log) (*L2StakingDelegated, error) { event := new(L2StakingDelegated) if err := _L2Staking.contract.UnpackLog(event, "Delegated", log); err != nil { @@ -1805,6 +2154,152 @@ func (_L2Staking *L2StakingFilterer) ParseDelegated(log types.Log) (*L2StakingDe return event, nil } +// L2StakingDistributedIterator is returned from FilterDistributed and is used to iterate over the raw logs and unpacked data for Distributed events raised by the L2Staking contract. +type L2StakingDistributedIterator struct { + Event *L2StakingDistributed // 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 *L2StakingDistributedIterator) 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(L2StakingDistributed) + 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(L2StakingDistributed) + 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 *L2StakingDistributedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2StakingDistributedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2StakingDistributed represents a Distributed event raised by the L2Staking contract. +type L2StakingDistributed struct { + Sequencer common.Address + DelegatorReward *big.Int + CommissionAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDistributed is a free log retrieval operation binding the contract event 0x60ce3cc2d133631eac66a476f14997a9fa682bd05a60dd993cf02285822d78d8. +// +// Solidity: event Distributed(address indexed sequencer, uint256 delegatorReward, uint256 commissionAmount) +func (_L2Staking *L2StakingFilterer) FilterDistributed(opts *bind.FilterOpts, sequencer []common.Address) (*L2StakingDistributedIterator, error) { + + var sequencerRule []interface{} + for _, sequencerItem := range sequencer { + sequencerRule = append(sequencerRule, sequencerItem) + } + + logs, sub, err := _L2Staking.contract.FilterLogs(opts, "Distributed", sequencerRule) + if err != nil { + return nil, err + } + return &L2StakingDistributedIterator{contract: _L2Staking.contract, event: "Distributed", logs: logs, sub: sub}, nil +} + +// WatchDistributed is a free log subscription operation binding the contract event 0x60ce3cc2d133631eac66a476f14997a9fa682bd05a60dd993cf02285822d78d8. +// +// Solidity: event Distributed(address indexed sequencer, uint256 delegatorReward, uint256 commissionAmount) +func (_L2Staking *L2StakingFilterer) WatchDistributed(opts *bind.WatchOpts, sink chan<- *L2StakingDistributed, sequencer []common.Address) (event.Subscription, error) { + + var sequencerRule []interface{} + for _, sequencerItem := range sequencer { + sequencerRule = append(sequencerRule, sequencerItem) + } + + logs, sub, err := _L2Staking.contract.WatchLogs(opts, "Distributed", sequencerRule) + 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(L2StakingDistributed) + if err := _L2Staking.contract.UnpackLog(event, "Distributed", 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 +} + +// ParseDistributed is a log parse operation binding the contract event 0x60ce3cc2d133631eac66a476f14997a9fa682bd05a60dd993cf02285822d78d8. +// +// Solidity: event Distributed(address indexed sequencer, uint256 delegatorReward, uint256 commissionAmount) +func (_L2Staking *L2StakingFilterer) ParseDistributed(log types.Log) (*L2StakingDistributed, error) { + event := new(L2StakingDistributed) + if err := _L2Staking.contract.UnpackLog(event, "Distributed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // L2StakingInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L2Staking contract. type L2StakingInitializedIterator struct { Event *L2StakingInitialized // Event containing the contract specifics and raw log @@ -2092,6 +2587,171 @@ func (_L2Staking *L2StakingFilterer) ParseOwnershipTransferred(log types.Log) (* return event, nil } +// L2StakingRedelegatedIterator is returned from FilterRedelegated and is used to iterate over the raw logs and unpacked data for Redelegated events raised by the L2Staking contract. +type L2StakingRedelegatedIterator struct { + Event *L2StakingRedelegated // 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 *L2StakingRedelegatedIterator) 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(L2StakingRedelegated) + 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(L2StakingRedelegated) + 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 *L2StakingRedelegatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2StakingRedelegatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2StakingRedelegated represents a Redelegated event raised by the L2Staking contract. +type L2StakingRedelegated struct { + DelegateeFrom common.Address + DelegateeTo common.Address + Delegator common.Address + Amount *big.Int + DelegateeAmountFrom *big.Int + DelegateeAmountTo *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRedelegated is a free log retrieval operation binding the contract event 0xfdac6e81913996d95abcc289e90f2d8bd235487ce6fe6f821e7d21002a1915b4. +// +// Solidity: event Redelegated(address indexed delegateeFrom, address indexed delegateeTo, address indexed delegator, uint256 amount, uint256 delegateeAmountFrom, uint256 delegateeAmountTo) +func (_L2Staking *L2StakingFilterer) FilterRedelegated(opts *bind.FilterOpts, delegateeFrom []common.Address, delegateeTo []common.Address, delegator []common.Address) (*L2StakingRedelegatedIterator, error) { + + var delegateeFromRule []interface{} + for _, delegateeFromItem := range delegateeFrom { + delegateeFromRule = append(delegateeFromRule, delegateeFromItem) + } + var delegateeToRule []interface{} + for _, delegateeToItem := range delegateeTo { + delegateeToRule = append(delegateeToRule, delegateeToItem) + } + var delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) + } + + logs, sub, err := _L2Staking.contract.FilterLogs(opts, "Redelegated", delegateeFromRule, delegateeToRule, delegatorRule) + if err != nil { + return nil, err + } + return &L2StakingRedelegatedIterator{contract: _L2Staking.contract, event: "Redelegated", logs: logs, sub: sub}, nil +} + +// WatchRedelegated is a free log subscription operation binding the contract event 0xfdac6e81913996d95abcc289e90f2d8bd235487ce6fe6f821e7d21002a1915b4. +// +// Solidity: event Redelegated(address indexed delegateeFrom, address indexed delegateeTo, address indexed delegator, uint256 amount, uint256 delegateeAmountFrom, uint256 delegateeAmountTo) +func (_L2Staking *L2StakingFilterer) WatchRedelegated(opts *bind.WatchOpts, sink chan<- *L2StakingRedelegated, delegateeFrom []common.Address, delegateeTo []common.Address, delegator []common.Address) (event.Subscription, error) { + + var delegateeFromRule []interface{} + for _, delegateeFromItem := range delegateeFrom { + delegateeFromRule = append(delegateeFromRule, delegateeFromItem) + } + var delegateeToRule []interface{} + for _, delegateeToItem := range delegateeTo { + delegateeToRule = append(delegateeToRule, delegateeToItem) + } + var delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) + } + + logs, sub, err := _L2Staking.contract.WatchLogs(opts, "Redelegated", delegateeFromRule, delegateeToRule, delegatorRule) + 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(L2StakingRedelegated) + if err := _L2Staking.contract.UnpackLog(event, "Redelegated", 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 +} + +// ParseRedelegated is a log parse operation binding the contract event 0xfdac6e81913996d95abcc289e90f2d8bd235487ce6fe6f821e7d21002a1915b4. +// +// Solidity: event Redelegated(address indexed delegateeFrom, address indexed delegateeTo, address indexed delegator, uint256 amount, uint256 delegateeAmountFrom, uint256 delegateeAmountTo) +func (_L2Staking *L2StakingFilterer) ParseRedelegated(log types.Log) (*L2StakingRedelegated, error) { + event := new(L2StakingRedelegated) + if err := _L2Staking.contract.UnpackLog(event, "Redelegated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // L2StakingRewardStartTimeUpdatedIterator is returned from FilterRewardStartTimeUpdated and is used to iterate over the raw logs and unpacked data for RewardStartTimeUpdated events raised by the L2Staking contract. type L2StakingRewardStartTimeUpdatedIterator struct { Event *L2StakingRewardStartTimeUpdated // Event containing the contract specifics and raw log @@ -2711,17 +3371,17 @@ func (it *L2StakingUndelegatedIterator) Close() error { // L2StakingUndelegated represents a Undelegated event raised by the L2Staking contract. type L2StakingUndelegated struct { - Delegatee common.Address - Delegator common.Address - Amount *big.Int - EffectiveEpoch *big.Int - UnlockEpoch *big.Int - Raw types.Log // Blockchain specific contextual infos + Delegatee common.Address + Delegator common.Address + Amount *big.Int + DelegateeAmount *big.Int + UnlockEpoch *big.Int + Raw types.Log // Blockchain specific contextual infos } // FilterUndelegated is a free log retrieval operation binding the contract event 0x92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c. // -// Solidity: event Undelegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 effectiveEpoch, uint256 unlockEpoch) +// Solidity: event Undelegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 delegateeAmount, uint256 unlockEpoch) func (_L2Staking *L2StakingFilterer) FilterUndelegated(opts *bind.FilterOpts, delegatee []common.Address, delegator []common.Address) (*L2StakingUndelegatedIterator, error) { var delegateeRule []interface{} @@ -2742,7 +3402,7 @@ func (_L2Staking *L2StakingFilterer) FilterUndelegated(opts *bind.FilterOpts, de // WatchUndelegated is a free log subscription operation binding the contract event 0x92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c. // -// Solidity: event Undelegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 effectiveEpoch, uint256 unlockEpoch) +// Solidity: event Undelegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 delegateeAmount, uint256 unlockEpoch) func (_L2Staking *L2StakingFilterer) WatchUndelegated(opts *bind.WatchOpts, sink chan<- *L2StakingUndelegated, delegatee []common.Address, delegator []common.Address) (event.Subscription, error) { var delegateeRule []interface{} @@ -2788,7 +3448,7 @@ func (_L2Staking *L2StakingFilterer) WatchUndelegated(opts *bind.WatchOpts, sink // ParseUndelegated is a log parse operation binding the contract event 0x92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c. // -// Solidity: event Undelegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 effectiveEpoch, uint256 unlockEpoch) +// Solidity: event Undelegated(address indexed delegatee, address indexed delegator, uint256 amount, uint256 delegateeAmount, uint256 unlockEpoch) func (_L2Staking *L2StakingFilterer) ParseUndelegated(log types.Log) (*L2StakingUndelegated, error) { event := new(L2StakingUndelegated) if err := _L2Staking.contract.UnpackLog(event, "Undelegated", log); err != nil { diff --git a/bindings/bindings/l2staking_more.go b/bindings/bindings/l2staking_more.go index c2af631bf..796faa37d 100644 --- a/bindings/bindings/l2staking_more.go +++ b/bindings/bindings/l2staking_more.go @@ -9,11 +9,11 @@ import ( "morph-l2/bindings/solc" ) -const L2StakingStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1023_storage\"},{\"astId\":1003,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1022_storage\"},{\"astId\":1005,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_status\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)1022_storage\"},{\"astId\":1007,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"rewardStarted\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_bool\"},{\"astId\":1008,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"rewardStartTime\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_uint256\"},{\"astId\":1009,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"sequencerSetMaxSize\",\"offset\":0,\"slot\":\"153\",\"type\":\"t_uint256\"},{\"astId\":1010,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"undelegateLockEpochs\",\"offset\":0,\"slot\":\"154\",\"type\":\"t_uint256\"},{\"astId\":1011,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"latestSequencerSetSize\",\"offset\":0,\"slot\":\"155\",\"type\":\"t_uint256\"},{\"astId\":1012,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"candidateNumber\",\"offset\":0,\"slot\":\"156\",\"type\":\"t_uint256\"},{\"astId\":1013,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"stakerAddresses\",\"offset\":0,\"slot\":\"157\",\"type\":\"t_array(t_address)dyn_storage\"},{\"astId\":1014,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"stakerRankings\",\"offset\":0,\"slot\":\"158\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1015,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"stakers\",\"offset\":0,\"slot\":\"159\",\"type\":\"t_mapping(t_address,t_struct(StakerInfo)1026_storage)\"},{\"astId\":1016,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"commissions\",\"offset\":0,\"slot\":\"160\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1017,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"stakerDelegations\",\"offset\":0,\"slot\":\"161\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1018,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"delegators\",\"offset\":0,\"slot\":\"162\",\"type\":\"t_mapping(t_address,t_struct(AddressSet)1024_storage)\"},{\"astId\":1019,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"delegations\",\"offset\":0,\"slot\":\"163\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":1020,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"undelegations\",\"offset\":0,\"slot\":\"164\",\"type\":\"t_mapping(t_address,t_array(t_struct(Undelegation)1027_storage)dyn_storage)\"},{\"astId\":1021,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"nonce\",\"offset\":0,\"slot\":\"165\",\"type\":\"t_uint256\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_address)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"address[]\",\"numberOfBytes\":\"32\"},\"t_array(t_bytes32)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"bytes32[]\",\"numberOfBytes\":\"32\"},\"t_array(t_struct(Undelegation)1027_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IL2Staking.Undelegation[]\",\"numberOfBytes\":\"32\"},\"t_array(t_uint256)1022_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1023_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_bytes_storage\":{\"encoding\":\"bytes\",\"label\":\"bytes\",\"numberOfBytes\":\"32\"},\"t_mapping(t_address,t_array(t_struct(Undelegation)1027_storage)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct IL2Staking.Undelegation[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_struct(Undelegation)1027_storage)dyn_storage\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_struct(AddressSet)1024_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct EnumerableSetUpgradeable.AddressSet)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(AddressSet)1024_storage\"},\"t_mapping(t_address,t_struct(StakerInfo)1026_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Types.StakerInfo)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(StakerInfo)1026_storage\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_mapping(t_bytes32,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_uint256\"},\"t_struct(AddressSet)1024_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSetUpgradeable.AddressSet\",\"numberOfBytes\":\"64\"},\"t_struct(Set)1025_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSetUpgradeable.Set\",\"numberOfBytes\":\"64\"},\"t_struct(StakerInfo)1026_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Types.StakerInfo\",\"numberOfBytes\":\"96\"},\"t_struct(Undelegation)1027_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IL2Staking.Undelegation\",\"numberOfBytes\":\"96\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" +const L2StakingStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1028_storage\"},{\"astId\":1003,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1027_storage\"},{\"astId\":1005,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_status\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)1027_storage\"},{\"astId\":1007,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"rewardStarted\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_bool\"},{\"astId\":1008,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"rewardStartTime\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_uint256\"},{\"astId\":1009,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"sequencerSetMaxSize\",\"offset\":0,\"slot\":\"153\",\"type\":\"t_uint256\"},{\"astId\":1010,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"undelegateLockEpochs\",\"offset\":0,\"slot\":\"154\",\"type\":\"t_uint256\"},{\"astId\":1011,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"latestSequencerSetSize\",\"offset\":0,\"slot\":\"155\",\"type\":\"t_uint256\"},{\"astId\":1012,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"candidateNumber\",\"offset\":0,\"slot\":\"156\",\"type\":\"t_uint256\"},{\"astId\":1013,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"nonce\",\"offset\":0,\"slot\":\"157\",\"type\":\"t_uint256\"},{\"astId\":1014,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"stakerAddresses\",\"offset\":0,\"slot\":\"158\",\"type\":\"t_array(t_address)dyn_storage\"},{\"astId\":1015,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"stakerRankings\",\"offset\":0,\"slot\":\"159\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1016,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"stakers\",\"offset\":0,\"slot\":\"160\",\"type\":\"t_mapping(t_address,t_struct(StakerInfo)1035_storage)\"},{\"astId\":1017,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"commissions\",\"offset\":0,\"slot\":\"161\",\"type\":\"t_mapping(t_address,t_struct(Commission)1031_storage)\"},{\"astId\":1018,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"delegators\",\"offset\":0,\"slot\":\"162\",\"type\":\"t_mapping(t_address,t_struct(AddressSet)1029_storage)\"},{\"astId\":1019,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"delegateeDelegations\",\"offset\":0,\"slot\":\"163\",\"type\":\"t_mapping(t_address,t_struct(DelegateeDelegation)1033_storage)\"},{\"astId\":1020,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"delegatorDelegations\",\"offset\":0,\"slot\":\"164\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_uint256))\"},{\"astId\":1021,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_undelegateRequests\",\"offset\":0,\"slot\":\"165\",\"type\":\"t_mapping(t_bytes32,t_struct(UndelegateRequest)1036_storage)\"},{\"astId\":1022,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_undelegateRequestsQueue\",\"offset\":0,\"slot\":\"166\",\"type\":\"t_mapping(t_address,t_struct(Bytes32Deque)1030_storage)\"},{\"astId\":1023,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"_undelegateSequence\",\"offset\":0,\"slot\":\"167\",\"type\":\"t_mapping(t_address,t_struct(Counter)1032_storage)\"},{\"astId\":1024,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"epochSequencers\",\"offset\":0,\"slot\":\"168\",\"type\":\"t_struct(AddressSet)1029_storage\"},{\"astId\":1025,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"epochTotalBlocks\",\"offset\":0,\"slot\":\"170\",\"type\":\"t_uint256\"},{\"astId\":1026,\"contract\":\"contracts/l2/staking/L2Staking.sol:L2Staking\",\"label\":\"epochSequencerBlocks\",\"offset\":0,\"slot\":\"171\",\"type\":\"t_mapping(t_address,t_uint256)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_address)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"address[]\",\"numberOfBytes\":\"32\"},\"t_array(t_bytes32)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"bytes32[]\",\"numberOfBytes\":\"32\"},\"t_array(t_uint256)1027_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1028_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_bytes_storage\":{\"encoding\":\"bytes\",\"label\":\"bytes\",\"numberOfBytes\":\"32\"},\"t_int128\":{\"encoding\":\"inplace\",\"label\":\"int128\",\"numberOfBytes\":\"16\"},\"t_mapping(t_address,t_mapping(t_address,t_uint256))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e uint256))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_uint256)\"},\"t_mapping(t_address,t_struct(AddressSet)1029_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct EnumerableSetUpgradeable.AddressSet)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(AddressSet)1029_storage\"},\"t_mapping(t_address,t_struct(Bytes32Deque)1030_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct DoubleEndedQueueUpgradeable.Bytes32Deque)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Bytes32Deque)1030_storage\"},\"t_mapping(t_address,t_struct(Commission)1031_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct IL2Staking.Commission)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Commission)1031_storage\"},\"t_mapping(t_address,t_struct(Counter)1032_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct CountersUpgradeable.Counter)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(Counter)1032_storage\"},\"t_mapping(t_address,t_struct(DelegateeDelegation)1033_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct IL2Staking.DelegateeDelegation)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(DelegateeDelegation)1033_storage\"},\"t_mapping(t_address,t_struct(StakerInfo)1035_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct Types.StakerInfo)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(StakerInfo)1035_storage\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_mapping(t_bytes32,t_struct(UndelegateRequest)1036_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e struct IL2Staking.UndelegateRequest)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_struct(UndelegateRequest)1036_storage\"},\"t_mapping(t_bytes32,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_uint256\"},\"t_mapping(t_int128,t_bytes32)\":{\"encoding\":\"mapping\",\"label\":\"mapping(int128 =\u003e bytes32)\",\"numberOfBytes\":\"32\",\"key\":\"t_int128\",\"value\":\"t_bytes32\"},\"t_struct(AddressSet)1029_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSetUpgradeable.AddressSet\",\"numberOfBytes\":\"64\"},\"t_struct(Bytes32Deque)1030_storage\":{\"encoding\":\"inplace\",\"label\":\"struct DoubleEndedQueueUpgradeable.Bytes32Deque\",\"numberOfBytes\":\"64\"},\"t_struct(Commission)1031_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IL2Staking.Commission\",\"numberOfBytes\":\"64\"},\"t_struct(Counter)1032_storage\":{\"encoding\":\"inplace\",\"label\":\"struct CountersUpgradeable.Counter\",\"numberOfBytes\":\"32\"},\"t_struct(DelegateeDelegation)1033_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IL2Staking.DelegateeDelegation\",\"numberOfBytes\":\"64\"},\"t_struct(Set)1034_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSetUpgradeable.Set\",\"numberOfBytes\":\"64\"},\"t_struct(StakerInfo)1035_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Types.StakerInfo\",\"numberOfBytes\":\"96\"},\"t_struct(UndelegateRequest)1036_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IL2Staking.UndelegateRequest\",\"numberOfBytes\":\"64\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" var L2StakingStorageLayout = new(solc.StorageLayout) -var L2StakingDeployedBin = "0x608060405234801561000f575f80fd5b50600436106102ec575f3560e01c8063746c8ae111610192578063affed0e0116100e8578063e10911b111610093578063f2fde38b1161006e578063f2fde38b146106f6578063fad99f9814610709578063fc6facc614610711575f80fd5b8063e10911b1146106c5578063ed70b343146106cd578063f0261bc2146106ed575f80fd5b8063cce6cf9f116100c3578063cce6cf9f1461066a578063d31d83d91461067d578063d55771411461069e575f80fd5b8063affed0e014610618578063b5d2e0dc14610621578063c64814dd14610640575f80fd5b80638da5cb5b1161014857806391bd43a41161012357806391bd43a4146105c5578063927ede2d146105e457806396ab994d1461060b575f80fd5b80638da5cb5b1461055e5780638e21d5fb1461057c5780639168ae72146105a3575f80fd5b80637b05afb5116101785780637b05afb5146104f5578063831cfb581461051457806384d7d1d41461053b575f80fd5b8063746c8ae1146104e557806376671808146104ed575f80fd5b80633b8024211161024757806343352d61116101fd57806346cdc18a116101d857806346cdc18a146104c25780637046529b146104ca578063715018a6146104dd575f80fd5b806343352d6114610494578063439162b51461049c578063459598a2146104af575f80fd5b80633cb747bf1161022d5780633cb747bf146104135780633d9353fe1461045a57806340b5c83714610481575f80fd5b80633b802421146103f75780633c323a1b14610400575f80fd5b8063174e31c4116102a75780632e787be3116102825780632e787be3146103bb57806330158eea146103c45780633385ccc2146103e4575f80fd5b8063174e31c41461038c57806319fac8fd1461039f5780632cc138be146103b2575f80fd5b80630eb573af116102d75780630eb573af1461032b5780630f3b70591461033e57806312a3e94714610383575f80fd5b806243b758146102f05780629c6f0c14610316575b5f80fd5b6103036102fe36600461521e565b610724565b6040519081526020015b60405180910390f35b610329610324366004615239565b610757565b005b610329610339366004615283565b6109a8565b61035161034c36600461529a565b610ad5565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845260208401929092529082015260600161030d565b610303609a5481565b61032961039a36600461529a565b610b2a565b6103296103ad366004615283565b610ce3565b61030360985481565b61030360995481565b6103d76103d236600461530c565b610e39565b60405161030d91906153ac565b6103296103f236600461521e565b6110a1565b610303609c5481565b61032961040e36600461529a565b61181a565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030d565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b61032961048f366004615283565b61202d565b6103d7612174565b6103296104aa36600461545f565b6123d1565b6104356104bd366004615283565b6129dd565b609d54610303565b6103296104d8366004615239565b612a12565b610329612bba565b610329612bcd565b610303612f80565b61030361050336600461521e565b60a06020525f908152604090205481565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b61054e61054936600461521e565b61300e565b604051901515815260200161030d565b60335473ffffffffffffffffffffffffffffffffffffffff16610435565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b6105b66105b136600461521e565b613045565b60405161030d939291906154cd565b6103036105d336600461521e565b60a16020525f908152604090205481565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b60975461054e9060ff1681565b61030360a55481565b61030361062f36600461521e565b609e6020525f908152604090205481565b61030361064e36600461550a565b60a360209081525f928352604080842090915290825290205481565b610329610678366004615536565b613104565b61069061068b36600461557e565b6137d0565b60405161030d929190615600565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b6103296139ac565b6106e06106db36600461521e565b613df4565b60405161030d9190615620565b610303609b5481565b61032961070436600461521e565b613ea4565b610329613f58565b61032961071f366004615536565b614020565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a260205260408120610751906144fd565b92915050565b61075f614506565b8160a55481146107d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064015b60405180910390fd5b6107db8360016156bb565b60a555609e5f6107ee602085018561521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20545f036108cf57609d61083d602084018461521e565b81546001810183555f928352602080842090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9390931692909217909155609d5491609e916108a89086018661521e565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f20555b81609f5f6108e0602084018461521e565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2061090f82826157eb565b5061091f9050602083018361521e565b73ffffffffffffffffffffffffffffffffffffffff167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d602084013561096860408601866156ce565b604051610977939291906159a8565b60405180910390a260975460ff161580156109965750609954609d5411155b156109a3576109a3614587565b505050565b6109b0614506565b5f811180156109c157506099548114155b610a4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a6500000000000000000000000000000000000000000000000000000000000060648201526084016107c7565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff16610aa257609d54610aa6565b609c545b90505f6099548210610aba57609954610abc565b815b9050609b548114610acf57610acf614587565b50505050565b60a4602052815f5260405f208181548110610aee575f80fd5b5f91825260209091206003909102018054600182015460029092015473ffffffffffffffffffffffffffffffffffffffff909116935090915083565b610b3261472e565b73ffffffffffffffffffffffffffffffffffffffff8216610c0f5773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044015f604051808303815f87803b158015610bf4575f80fd5b505af1158015610c06573d5f803e3d5ffd5b50505050610cd5565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604481018490526064015f604051808303815f87803b158015610cbe575f80fd5b505af1158015610cd0573d5f803e3d5ffd5b505050505b610cdf6001606555565b5050565b335f908152609e6020526040902054610d58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f7765640000000000000000000000000060448201526064016107c7565b6014811115610dc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e000000000000000000000000000060448201526064016107c7565b335f90815260a06020526040812082905560975460ff16610de4575f610df7565b610dec612f80565b610df79060016156bb565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff811115610e5557610e5561572f565b604051908082528060200260200182016040528015610ea157816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081610e735790505b5090505f5b83811015611099576040518060600160405280609f5f888886818110610ece57610ece6159fb565b9050602002016020810190610ee3919061521e565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409091015f908120549091168352910190609f90888886818110610f2d57610f2d6159fb565b9050602002016020810190610f42919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101548152602001609f5f888886818110610f9957610f996159fb565b9050602002016020810190610fae919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206002018054610ff59061575c565b80601f01602080910402602001604051908101604052809291908181526020018280546110219061575c565b801561106c5780601f106110435761010080835404028352916020019161106c565b820191905f5260205f20905b81548152906001019060200180831161104f57829003601f168201915b5050505050815250828281518110611086576110866159fb565b6020908102919091010152600101610ea6565b509392505050565b6110a961472e565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a36020908152604080832033845290915290205461113f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f0000000000000000000060448201526064016107c7565b73ffffffffffffffffffffffffffffffffffffffff81165f908152609e60205260408120546097549015919060ff16611178575f61118b565b611180612f80565b61118b9060016156bb565b6097549091505f9060ff1680156111a0575082155b6111aa57816111b7565b609a546111b790836156bb565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff8781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c5160039092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909b16178a558251908a015551600290980197909755908452908252829055925191815260a190925292812080549495509193611286908490615a28565b909155505073ffffffffffffffffffffffffffffffffffffffff85165f90815260a2602052604090206112b990336147a8565b5073ffffffffffffffffffffffffffffffffffffffff85165f908152609e6020526040902054841580156112ef575060975460ff165b80156112fc5750609c5481105b156115e85773ffffffffffffffffffffffffffffffffffffffff86165f908152609e602052604081205461133290600190615a28565b90505b6001609c546113449190615a28565b8110156115e65760a15f609d8381548110611361576113616159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120549060a190609d6113a38560016156bb565b815481106113b3576113b36159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205411156115de575f609d82815481106113fe576113fe6159fb565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050609d61142e8360016156bb565b8154811061143e5761143e6159fb565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff9092169184908110611476576114766159fb565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905580609d6114d18460016156bb565b815481106114e1576114e16159fb565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556115398260016156bb565b609e5f609d858154811061154f5761154f6159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205561158b8260026156bb565b609e5f609d61159b8660016156bb565b815481106115ab576115ab6159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b600101611335565b505b84158015611618575073ffffffffffffffffffffffffffffffffffffffff86165f90815260a16020526040902054155b15611635576001609c5f82825461162f9190615a28565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b1580156116e3575f80fd5b505af11580156116f5573d5f803e3d5ffd5b505050506117003390565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c84602001518787604051611775939291909283526020830191909152604082015260600190565b60405180910390a38415801561178d575060975460ff165b801561179b5750609b548111155b80156117fb5750609b5473ffffffffffffffffffffffffffffffffffffffff87165f908152609e602052604090205411806117fb5750609c5473ffffffffffffffffffffffffffffffffffffffff87165f908152609e6020526040902054115b1561180857611808614587565b50505050506118176001606555565b50565b73ffffffffffffffffffffffffffffffffffffffff82165f908152609e602052604090205482906118a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b65720000000000000000000000000000000000000000000060448201526064016107c7565b6118af61472e565b5f8211611918576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e7400000000000000000000000060448201526064016107c7565b61192233846147d0565b15611989576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d65640000000000000000000060448201526064016107c7565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260a360209081526040808320338452909152902054611a2e576119c73384614880565b15611a2e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f72657761726420756e636c61696d65640000000000000000000000000000000060448201526064016107c7565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260a1602052604081208054849290611a629084906156bb565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f90815260a36020908152604080832033845290915281208054849290611aa69084906156bb565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f90815260a260205260409020611ad99033614942565b5073ffffffffffffffffffffffffffffffffffffffff83165f90815260a16020526040902054829003611b1e576001609c5f828254611b1891906156bb565b90915550505b73ffffffffffffffffffffffffffffffffffffffff83165f908152609e602052604090205460975460ff168015611b555750600181115b15611e35575f611b66600183615a28565b90505b8015611e335760a15f609d611b7f600185615a28565b81548110611b8f57611b8f6159fb565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205460a15f609d8481548110611c0757611c076159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115611e21575f609d611c4c600184615a28565b81548110611c5c57611c5c6159fb565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff90921692509083908110611c9657611c966159fb565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16609d611cc4600185615a28565b81548110611cd457611cd46159fb565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609d8381548110611d2d57611d2d6159fb565b5f918252602082200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff93909316929092179091558290609e90609d611d8c600185615a28565b81548110611d9c57611d9c6159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055611dd88260016156bb565b609e5f609d8581548110611dee57611dee6159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b80611e2b81615a3b565b915050611b69565b505b6097545f9060ff16611e47575f611e5a565b611e4f612f80565b611e5a9060016156bb565b73ffffffffffffffffffffffffffffffffffffffff86165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a373ffffffffffffffffffffffffffffffffffffffff8581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b158015611fa8575f80fd5b505af1158015611fba573d5f803e3d5ffd5b50505050611fcf611fc83390565b3086614963565b60975460ff168015611fe25750609b5482115b8015612014575060995473ffffffffffffffffffffffffffffffffffffffff86165f908152609e602052604090205411155b1561202157612021614587565b50506109a36001606555565b612035614506565b60975460ff16156120a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f72657761726420616c726561647920737461727465640000000000000000000060448201526064016107c7565b42811180156120bb57506120b96201518082615a9c565b155b80156120c957506098548114155b61212f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d650000000000000060448201526064016107c7565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff8111156121945761219461572f565b6040519080825280602002602001820160405280156121e057816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816121b25790505b5090505f5b609d548110156123cb576040518060600160405280609f5f609d8581548110612210576122106159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409092018120549092168352609d80549390910192609f92919086908110612269576122696159fb565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101548152602001609f5f609d85815481106122e9576122e96159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902060020180546123279061575c565b80601f01602080910402602001604051908101604052809291908181526020018280546123539061575c565b801561239e5780601f106123755761010080835404028352916020019161239e565b820191905f5260205f20905b81548152906001019060200180831161238157829003601f168201915b50505050508152508282815181106123b8576123b86159fb565b60209081029190910101526001016121e5565b50919050565b5f54610100900460ff16158080156123ef57505f54600160ff909116105b806124085750303b15801561240857505f5460ff166001145b612494576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107c7565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156124f0575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff871661256d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e76616c6964206f776e65722061646472657373000000000000000000000060448201526064016107c7565b5f86116125fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f203000000000000000000000000000000000000000000000000000000000000060648201526084016107c7565b5f8511612665576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f6368730000000060448201526064016107c7565b428411801561267e575061267c6201518085615a9c565b155b6126e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d650000000000000060448201526064016107c7565b8161274b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f696e76616c696420696e697469616c207374616b65727300000000000000000060448201526064016107c7565b61275487614c0a565b61275c614c80565b6099869055609a8590556098849055609b8290555f5b609b548110156128ff5783838281811061278e5761278e6159fb565b90506020028101906127a09190615aaf565b609f5f8686858181106127b5576127b56159fb565b90506020028101906127c79190615aaf565b6127d590602081019061521e565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2061280482826157eb565b905050609d84848381811061281b5761281b6159fb565b905060200281019061282d9190615aaf565b61283b90602081019061521e565b8154600180820184555f93845260209093200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905561289c9082906156bb565b609e5f8686858181106128b1576128b16159fb565b90506020028101906128c39190615aaf565b6128d190602081019061521e565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2055600101612772565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a180156129d4575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d81815481106129ec575f80fd5b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015612b2e57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612af2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b169190615aeb565b73ffffffffffffffffffffffffffffffffffffffff16145b61075f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016107c7565b612bc2614506565b612bcb5f614c0a565b565b612bd5614506565b609854421015612c66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d650000000000000000000000000000000000000000000000000000000060648201526084016107c7565b5f609c5411612cd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f6e652063616e64696461746500000000000000000000000000000000000060448201526064016107c7565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d54811015612f10575f5b81811015612f075760a15f609d8381548110612d2a57612d2a6159fb565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205460a15f609d8581548110612da257612da26159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115612eff575f609d8281548110612ded57612ded6159fb565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff90921692509084908110612e2757612e276159fb565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff9092169184908110612e5f57612e5f6159fb565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609d8481548110612eb857612eb86159fb565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b600101612d0c565b50600101612d00565b505f5b609d54811015612f7757612f288160016156bb565b609e5f609d8481548110612f3e57612f3e6159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055600101612f13565b50612bcb614587565b5f609854421015612fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f726577617264206973206e6f742073746172746564207965740000000000000060448201526064016107c7565b6201518060985442612fff9190615a28565b6130099190615b06565b905090565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a3602090815260408083203384529091528120541515610751565b609f6020525f908152604090208054600182015460028301805473ffffffffffffffffffffffffffffffffffffffff9093169391926130839061575c565b80601f01602080910402602001604051908101604052809291908181526020018280546130af9061575c565b80156130fa5780601f106130d1576101008083540402835291602001916130fa565b820191905f5260205f20905b8154815290600101906020018083116130dd57829003601f168201915b5050505050905083565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561322057507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156131e4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132089190615aeb565b73ffffffffffffffffffffffffffffffffffffffff16145b6132ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016107c7565b8260a5548114613318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064016107c7565b6133238460016156bb565b60a5555f805b8381101561378157609b54609e5f878785818110613349576133496159fb565b905060200201602081019061335e919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054116133a257600191505b5f609e5f8787858181106133b8576133b86159fb565b90506020020160208101906133cd919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205411156136eb575f6001609e5f888886818110613425576134256159fb565b905060200201602081019061343a919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461347e9190615a28565b90505b609d5461349090600190615a28565b81101561359657609d6134a48260016156bb565b815481106134b4576134b46159fb565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff90921691839081106134ec576134ec6159fb565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001609e5f609d8481548110613549576135496159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181208054909190613589908490615a28565b9091555050600101613481565b50609d8054806135a8576135a8615b19565b5f8281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609e90868684818110613617576136176159fb565b905060200201602081019061362c919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f90555f60a15f87878581811061367e5761367e6159fb565b9050602002016020810190613693919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205411156136eb576001609c5f8282546136e59190615a28565b90915550505b609f5f868684818110613700576137006159fb565b9050602002016020810190613715919061521e565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f90812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018290559061377760028301826151b3565b5050600101613329565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f6184846040516137b3929190615b46565b60405180910390a180156137c9576137c9614587565b5050505050565b5f60605f841161383c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f696e76616c696420706167652073697a6500000000000000000000000000000060448201526064016107c7565b73ffffffffffffffffffffffffffffffffffffffff85165f90815260a260205260409020613869906144fd565b91508367ffffffffffffffff8111156138845761388461572f565b6040519080825280602002602001820160405280156138ad578160200160208202803683370190505b5090505f6138bb8486615ba0565b90505f60016138ca86826156bb565b6138d49088615ba0565b6138de9190615a28565b90506138eb600185615a28565b811115613900576138fd600185615a28565b90505b815f5b8282116139a0576139448261391781615bb7565b73ffffffffffffffffffffffffffffffffffffffff8c165f90815260a26020526040902090945090614d1e565b858261394f81615bb7565b935081518110613961576139616159fb565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050613903565b50505050935093915050565b6139b461472e565b335f90815260a46020526040812054815b81811015613d745760975460ff161580613a1557506139e2612f80565b335f90815260a460205260409020805483908110613a0257613a026159fb565b905f5260205f2090600302016002015411155b15613d6257335f90815260a460205260409020805482908110613a3a57613a3a6159fb565b905f5260205f2090600302016001015483613a5591906156bb565b335f90815260a4602052604081208054929550909183908110613a7a57613a7a6159fb565b5f918252602082206003909102015473ffffffffffffffffffffffffffffffffffffffff16915060a481613aab3390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208381548110613af557613af56159fb565b905f5260205f2090600302016002015490505f60a45f613b123390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208481548110613b5c57613b5c6159fb565b905f5260205f209060030201600101549050600185613b7b9190615a28565b841015613c7257335f90815260a460205260409020613b9b600187615a28565b81548110613bab57613bab6159fb565b905f5260205f20906003020160a45f613bc13390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208581548110613c0b57613c0b6159fb565b5f9182526020909120825460039092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091178155600180830154908201556002918201549101555b335f90815260a460205260409020805480613c8f57613c8f615b19565b5f8281526020812060037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020180547fffffffffffffffffffffffff000000000000000000000000000000000000000016815560018181018390556002909101919091559155613d049086615a28565b6040805184815260208101849052919650339173ffffffffffffffffffffffffffffffffffffffff8616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a35050506139c5565b613d6d8160016156bb565b90506139c5565b505f8211613dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d00000000000000000060448201526064016107c7565b613de83383614d29565b5050612bcb6001606555565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613e99575f8481526020908190206040805160608101825260038602909201805473ffffffffffffffffffffffffffffffffffffffff16835260018082015484860152600290910154918301919091529083529092019101613e38565b505050509050919050565b613eac614506565b73ffffffffffffffffffffffffffffffffffffffff8116613f4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107c7565b61181781614c0a565b613f6061472e565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024015f604051808303815f87803b158015614000575f80fd5b505af1158015614012573d5f803e3d5ffd5b50505050612bcb6001606555565b614028614506565b8260a5548114614094576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064016107c7565b61409f8460016156bb565b60a5555f805b8381101561378157609b54609e5f8787858181106140c5576140c56159fb565b90506020020160208101906140da919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541161411e57600191505b5f609e5f878785818110614134576141346159fb565b9050602002016020810190614149919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541115614467575f6001609e5f8888868181106141a1576141a16159fb565b90506020020160208101906141b6919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546141fa9190615a28565b90505b609d5461420c90600190615a28565b81101561431257609d6142208260016156bb565b81548110614230576142306159fb565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff9092169183908110614268576142686159fb565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001609e5f609d84815481106142c5576142c56159fb565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181208054909190614305908490615a28565b90915550506001016141fd565b50609d80548061432457614324615b19565b5f8281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609e90868684818110614393576143936159fb565b90506020020160208101906143a8919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f90555f60a15f8787858181106143fa576143fa6159fb565b905060200201602081019061440f919061521e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541115614467576001609c5f8282546144619190615a28565b90915550505b609f5f86868481811061447c5761447c6159fb565b9050602002016020810190614491919061521e565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f90812080547fffffffffffffffffffffffff000000000000000000000000000000000000000016815560018101829055906144f360028301826151b3565b50506001016140a5565b5f610751825490565b60335473ffffffffffffffffffffffffffffffffffffffff163314612bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c7565b60995460975460ff16156145ab57609954609c5410156145a65750609c545b6145bc565b609954609d5410156145bc5750609d545b5f8167ffffffffffffffff8111156145d6576145d661572f565b6040519080825280602002602001820160405280156145ff578160200160208202803683370190505b5090505f5b8281101561468657609d818154811061461f5761461f6159fb565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110614659576146596159fb565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101614604565b506040517f9b8201a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639b8201a4906146f9908490600401615bee565b5f604051808303815f87803b158015614710575f80fd5b505af1158015614722573d5f803e3d5ffd5b50509151609b55505050565b60026065540361479a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107c7565b6002606555565b6001606555565b5f6147c98373ffffffffffffffffffffffffffffffffffffffff8416614fc8565b9392505050565b5f805b73ffffffffffffffffffffffffffffffffffffffff84165f90815260a460205260409020548110156148775773ffffffffffffffffffffffffffffffffffffffff8481165f90815260a4602052604090208054918516918390811061483a5761483a6159fb565b5f91825260209091206003909102015473ffffffffffffffffffffffffffffffffffffffff160361486f576001915050610751565b6001016147d3565b505f9392505050565b6040517fde6ac93300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa158015614916573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061493a9190615c00565b159392505050565b5f6147c98373ffffffffffffffffffffffffffffffffffffffff84166150ab565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156149f1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614a159190615c1f565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015614ab4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614ad89190615c00565b506040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614b67573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614b8b9190615c1f565b90505f83118015614ba4575082614ba28383615a28565b145b6137c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c6564000000000060448201526064016107c7565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff16614d16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107c7565b612bcb6150f7565b5f6147c9838361518d565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614db7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614ddb9190615c1f565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015614e72573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614e969190615c00565b506040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614f25573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614f499190615c1f565b90505f83118015614f62575082614f608383615a28565b145b610acf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c6564000000000060448201526064016107c7565b5f81815260018301602052604081205480156150a2575f614fea600183615a28565b85549091505f90614ffd90600190615a28565b905081811461505c575f865f01828154811061501b5761501b6159fb565b905f5260205f200154905080875f01848154811061503b5761503b6159fb565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061506d5761506d615b19565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610751565b5f915050610751565b5f8181526001830160205260408120546150f057508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610751565b505f610751565b5f54610100900460ff166147a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107c7565b5f825f0182815481106151a2576151a26159fb565b905f5260205f200154905092915050565b5080546151bf9061575c565b5f825580601f106151ce575050565b601f0160209004905f5260205f209081019061181791905b808211156151f9575f81556001016151e6565b5090565b73ffffffffffffffffffffffffffffffffffffffff81168114611817575f80fd5b5f6020828403121561522e575f80fd5b81356147c9816151fd565b5f806040838503121561524a575f80fd5b82359150602083013567ffffffffffffffff811115615267575f80fd5b830160608186031215615278575f80fd5b809150509250929050565b5f60208284031215615293575f80fd5b5035919050565b5f80604083850312156152ab575f80fd5b82356152b6816151fd565b946020939093013593505050565b5f8083601f8401126152d4575f80fd5b50813567ffffffffffffffff8111156152eb575f80fd5b6020830191508360208260051b8501011115615305575f80fd5b9250929050565b5f806020838503121561531d575f80fd5b823567ffffffffffffffff811115615333575f80fd5b61533f858286016152c4565b90969095509350505050565b5f81518084525f5b8181101561536f57602081850181015186830182015201615353565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b83811015615451578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff1684528781015188850152860151606087850181905261543d8186018361534b565b9689019694505050908601906001016153d3565b509098975050505050505050565b5f805f805f8060a08789031215615474575f80fd5b863561547f816151fd565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff8111156154af575f80fd5b6154bb89828a016152c4565b979a9699509497509295939492505050565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201525f615501606083018461534b565b95945050505050565b5f806040838503121561551b575f80fd5b8235615526816151fd565b91506020830135615278816151fd565b5f805f60408486031215615548575f80fd5b83359250602084013567ffffffffffffffff811115615565575f80fd5b615571868287016152c4565b9497909650939450505050565b5f805f60608486031215615590575f80fd5b833561559b816151fd565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b838110156155f557815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016155c3565b509495945050505050565b828152604060208201525f61561860408301846155b0565b949350505050565b602080825282518282018190525f919060409081850190868401855b82811015615681578151805173ffffffffffffffffffffffffffffffffffffffff1685528681015187860152850151858501526060909301929085019060010161563c565b5091979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156107515761075161568e565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615701575f80fd5b83018035915067ffffffffffffffff82111561571b575f80fd5b602001915036819003821315615305575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c9082168061577057607f821691505b6020821081036123cb577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f8211156109a357805f5260205f20601f840160051c810160208510156157cc5750805b601f840160051c820191505b818110156137c9575f81556001016157d8565b81356157f6816151fd565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe186360301811261587a575f80fd5b8501803567ffffffffffffffff811115615892575f80fd5b80360384830113156158a2575f80fd5b6158b6816158b0855461575c565b856157a7565b5f601f821160018114615908575f83156158d257508382018601355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b17855561599d565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b8281101561595457868501890135825593880193908901908801615935565b5084821015615991577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b818103818111156107515761075161568e565b5f81615a4957615a4961568e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82615aaa57615aaa615a6f565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615ae1575f80fd5b9190910192915050565b5f60208284031215615afb575f80fd5b81516147c9816151fd565b5f82615b1457615b14615a6f565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b86811015615b95578235615b6d816151fd565b73ffffffffffffffffffffffffffffffffffffffff1682529183019190830190600101615b5a565b509695505050505050565b80820281158282048414176107515761075161568e565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615be757615be761568e565b5060010190565b602081525f6147c960208301846155b0565b5f60208284031215615c10575f80fd5b815180151581146147c9575f80fd5b5f60208284031215615c2f575f80fd5b505191905056fea164736f6c6343000818000a" +var L2StakingDeployedBin = "0x608060405234801561000f575f80fd5b5060043610610339575f3560e01c8063746c8ae1116101b3578063a61bb764116100f3578063d31d83d91161009e578063f2fde38b11610079578063f2fde38b146107e8578063fad99f98146107fb578063fc6facc614610803578063ff4840cd14610816575f80fd5b8063d31d83d914610797578063d5577141146107b8578063f0261bc2146107df575f80fd5b8063b7a587bf116100ce578063b7a587bf1461071e578063bf2dca0a1461074c578063cce6cf9f14610784575f80fd5b8063a61bb764146106e3578063affed0e0146106f6578063b5d2e0dc146106ff575f80fd5b80638da5cb5b1161015e57806391c05b0b1161013957806391c05b0b14610689578063927ede2d1461069c57806396ab994d146106c35780639d51c3b9146106d0575f80fd5b80638da5cb5b146106225780638e21d5fb146106405780639168ae7214610667575f80fd5b80637c7e8bd21161018e5780637c7e8bd2146105c5578063831cfb58146105d857806384d7d1d4146105ff575f80fd5b8063746c8ae11461058f57806376671808146105975780637b05afb51461059f575f80fd5b80633434735f1161027e578063439162b5116102295780634d99dd16116102045780634d99dd161461054e5780636bd8f804146105615780637046529b14610574578063715018a614610587575f80fd5b8063439162b514610520578063459598a21461053357806346cdc18a14610546575f80fd5b80633cb747bf116102595780633cb747bf146104df57806340b5c8371461050557806343352d6114610518575f80fd5b80633434735f146104605780633b2713c5146104ac5780633b802421146104d6575f80fd5b806313f22527116102e9578063201018fb116102c4578063201018fb1461041b5780632cc138be1461042e5780632e787be31461043757806330158eea14610440575f80fd5b806313f22527146103ba57806319fac8fd146103cd5780631d5611b8146103e0575f80fd5b80630321731c116103195780630321731c1461038b5780630eb573af1461039e57806312a3e947146103b1575f80fd5b806243b7581461033d5780629c6f0c14610363578063026e402b14610378575b5f80fd5b61035061034b366004615f78565b610829565b6040519081526020015b60405180910390f35b610376610371366004615f93565b61085c565b005b610376610386366004615fdd565b610a78565b610350610399366004615f78565b611130565b6103766103ac366004616007565b611177565b610350609a5481565b6103506103c8366004615f78565b61124c565b6103766103db366004616007565b611328565b6104066103ee366004615f78565b60a36020525f90815260409020805460019091015482565b6040805192835260208301919091520161035a565b610350610429366004616007565b611421565b61035060985481565b61035060995481565b61045361044e366004616066565b6115df565b60405161035a9190616106565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161035a565b6103506104ba3660046161b9565b60a460209081525f928352604080842090915290825290205481565b610350609c5481565b7f0000000000000000000000000000000000000000000000000000000000000000610487565b610376610513366004616007565b61183f565b610453611926565b61037661052e3660046161e5565b611b83565b610487610541366004616007565b612083565b609e54610350565b61037661055c366004615fdd565b6120b8565b61037661056f366004616253565b612940565b610376610582366004615f93565b613633565b6103766137db565b6103766137ee565b610350613af1565b6104066105ad366004615f78565b60a16020525f90815260409020805460019091015482565b6103506105d3366004615f78565b613b4f565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b61061261060d366004615f78565b613b79565b604051901515815260200161035a565b60335473ffffffffffffffffffffffffffffffffffffffff16610487565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b61067a610675366004615f78565b613bb0565b60405161035a93929190616291565b610376610697366004616007565b613c6f565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6097546106129060ff1681565b6103506106de3660046161b9565b613f40565b6103506106f1366004615fdd565b613f52565b610350609d5481565b61035061070d366004615f78565b609f6020525f908152604090205481565b61073161072c366004615fdd565b6140be565b6040805182518152602092830151928101929092520161035a565b61035061075a366004615f78565b73ffffffffffffffffffffffffffffffffffffffff165f90815260a1602052604090206001015490565b6103766107923660046162ce565b61412c565b6107aa6107a5366004616316565b6147ad565b60405161035a929190616398565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b610350609b5481565b6103766107f6366004615f78565b614959565b610376614a10565b6103766108113660046162ce565b614ac2565b610376610824366004615f78565b614f5b565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a2602052604081206108569061502a565b92915050565b610864615033565b81609d5481146108a0576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108ab8360016163e5565b609d55609f5f6108be6020850185615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20545f0361099f57609e61090d6020840184615f78565b81546001810183555f928352602080842090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9390931692909217909155609e5491609f9161097890860186615f78565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f20555b8160a05f6109b06020840184615f78565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f206109df8282616515565b506109ef90506020830183615f78565b73ffffffffffffffffffffffffffffffffffffffff167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d6020840135610a3860408601866163f8565b604051610a47939291906166d2565b60405180910390a260975460ff16158015610a665750609954609e5411155b15610a7357610a736150b4565b505050565b335f908152609f6020526040812054839103610ac0576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac861525b565b815f03610b01576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2f3373ffffffffffffffffffffffffffffffffffffffff85165f90815260a260205260409020906152ce565b5060975460ff16610be45773ffffffffffffffffffffffffffffffffffffffff83165f90815260a46020908152604080832033845290915281208054849290610b799084906163e5565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f90815260a3602052604081208054849290610bb29084906163e5565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f90815260a36020526040902080546001909101555b73ffffffffffffffffffffffffffffffffffffffff83165f90815260a3602090815260408083206001810154905460a48452828520338652909352908320549092829003610c755773ffffffffffffffffffffffffffffffffffffffff86165f81815260a460209081526040808320338452825280832089905592825260a390522060018101869055859055610d30565b81610c808487616725565b610c8a9190616769565b610c9490826163e5565b73ffffffffffffffffffffffffffffffffffffffff87165f81815260a46020908152604080832033845282528083209490945591815260a39091529081208054879290610ce29084906163e5565b90915550829050610cf38487616725565b610cfd9190616769565b610d0790846163e5565b73ffffffffffffffffffffffffffffffffffffffff87165f90815260a360205260409020600101555b73ffffffffffffffffffffffffffffffffffffffff86165f90815260a36020526040902054859003610d74576001609c5f828254610d6e91906163e5565b90915550505b73ffffffffffffffffffffffffffffffffffffffff86165f908152609f602052604090205460975460ff168015610dab5750600181115b15611060575f610dbc60018361677c565b90505b801561105e5760a35f609e610dd560018561677c565b81548110610de557610de561678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001812054609e8054919260a39290919085908110610e3257610e3261678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902054111561104c575f609e610e7760018461677c565b81548110610e8757610e8761678f565b5f91825260209091200154609e805473ffffffffffffffffffffffffffffffffffffffff90921692509083908110610ec157610ec161678f565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16609e610eef60018561677c565b81548110610eff57610eff61678f565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609e8381548110610f5857610f5861678f565b5f918252602082200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff93909316929092179091558290609f90609e610fb760018561677c565b81548110610fc757610fc761678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020556110038260016163e5565b609f5f609e85815481106110195761101961678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b80611056816167bc565b915050610dbf565b505b73ffffffffffffffffffffffffffffffffffffffff87165f81815260a360209081526040918290205482518a815291820181905292339290917f24d7bda8602b916d64417f0dbfe2e2e88ec9b1157bd9f596dfdb91ba26624e04910160405180910390a36110cf3330896152ef565b60975460ff1680156110e25750609b5482115b8015611114575060995473ffffffffffffffffffffffffffffffffffffffff89165f908152609f602052604090205411155b15611121576111216150b4565b5050505050610a736001606555565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b03610856565b61117f615033565b80158061118d575060995481145b156111c4576040517f383a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff1661121957609e5461121d565b609c545b90505f609954821061123157609954611233565b815b9050609b548114611246576112466150b4565b50505050565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b0381805b828110156113205773ffffffffffffffffffffffffffffffffffffffff85165f90815260a6602052604081206112c790836155a2565b5f81815260a5602090815260409182902082518084019093528054835260010154908201819052919250906112fa613af1565b1061130f57611308846167f0565b9350611316565b5050611320565b5050600101611291565b509392505050565b335f818152609f6020526040812054900361136f576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60148211156113aa576040517f6e11528c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260a1602081815260408084208054825180840184528981526001830180548287019081529789905295855251909155935190925581518681529081018390529192917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a2505050565b5f61142a61525b565b61148c60a65f335b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054600f81810b700100000000000000000000000000000000909204900b0390565b5f036114c4576040517f5f013ef800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8115806114db57506114d860a65f33611432565b82115b6114e557816114f1565b6114f160a65f33611432565b91505f5b821561158a57335f90815260a66020526040812061151290615637565b5f81815260a560209081526040918290208251808401909352805483526001015490820181905291925090611545613af1565b101561155257505061158a565b335f90815260a660205260409020611569906156af565b50805161157690846163e5565b9250611581856167bc565b945050506114f5565b805f036115c3576040517f3cc5dedc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6115ce335b8261576a565b90506115da6001606555565b919050565b60605f8267ffffffffffffffff8111156115fb576115fb616459565b60405190808252806020026020018201604052801561164757816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816116195790505b5090505f5b8381101561132057604051806060016040528060a05f8888868181106116745761167461678f565b90506020020160208101906116899190615f78565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409091015f90812054909116835291019060a0908888868181106116d3576116d361678f565b90506020020160208101906116e89190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060010154815260200160a05f88888681811061173f5761173f61678f565b90506020020160208101906117549190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600201805461179b90616486565b80601f01602080910402602001604051908101604052809291908181526020018280546117c790616486565b80156118125780601f106117e957610100808354040283529160200191611812565b820191905f5260205f20905b8154815290600101906020018083116117f557829003601f168201915b505050505081525082828151811061182c5761182c61678f565b602090810291909101015260010161164c565b611847615033565b60975460ff1615611884576040517fbd51da0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b428111158061189e575061189b6201518082616827565b15155b806118aa575060985481145b156118e1576040517fde16b26100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609e546060905f9067ffffffffffffffff81111561194657611946616459565b60405190808252806020026020018201604052801561199257816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816119645790505b5090505f5b609e54811015611b7d57604051806060016040528060a05f609e85815481106119c2576119c261678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409092018120549092168352609e8054939091019260a092919086908110611a1b57611a1b61678f565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060010154815260200160a05f609e8581548110611a9b57611a9b61678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190206002018054611ad990616486565b80601f0160208091040260200160405190810160405280929190818152602001828054611b0590616486565b8015611b505780601f10611b2757610100808354040283529160200191611b50565b820191905f5260205f20905b815481529060010190602001808311611b3357829003601f168201915b5050505050815250828281518110611b6a57611b6a61678f565b6020908102919091010152600101611997565b50919050565b5f54610100900460ff1615808015611ba157505f54600160ff909116105b80611bba5750303b158015611bba57505f5460ff166001145b611c4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611ca7575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff8716611cf4576040517fee77070400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855f03611d2d576040517f2da55d0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845f03611d66576040517f7d8ad8a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4284111580611d805750611d7d6201518085616827565b15155b15611db7576040517fde16b26100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f829003611df1576040517fbb01aad100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611dfa87615a0e565b611e02615a84565b6099869055609a8590556098849055609b8290555f5b609b54811015611fa557838382818110611e3457611e3461678f565b9050602002810190611e46919061683a565b60a05f868685818110611e5b57611e5b61678f565b9050602002810190611e6d919061683a565b611e7b906020810190615f78565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f20611eaa8282616515565b905050609e848483818110611ec157611ec161678f565b9050602002810190611ed3919061683a565b611ee1906020810190615f78565b8154600180820184555f93845260209093200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055611f429082906163e5565b609f5f868685818110611f5757611f5761678f565b9050602002810190611f69919061683a565b611f77906020810190615f78565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2055600101611e18565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a1801561207a575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609e8181548110612092575f80fd5b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6120c061525b565b805f036120f9576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6121038233615b22565b5f0361213b576040517f857ad50500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806121468333615b22565b101561217e576040517f08c2348a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f908152609f60205260408120546097549015919060ff166121b7575f6121c5565b609a546121c59060016163e5565b60408051808201909152848152602081018290529091505f336121e733615b7f565b60405160609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208301526034820152605401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301205f81815260a59093529120549091501561229b576040517fdeeb052700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81815260a560209081526040808320855181558583015160019182015533845260a68352818420805470010000000000000000000000000000000090819004600f0b8087528284019095529290942085905583546fffffffffffffffffffffffffffffffff90811693909101160217905560975460ff166123c15773ffffffffffffffffffffffffffffffffffffffff86165f90815260a4602090815260408083203384529091528120805487929061235690849061677c565b909155505073ffffffffffffffffffffffffffffffffffffffff86165f90815260a360205260408120805487929061238f90849061677c565b909155505073ffffffffffffffffffffffffffffffffffffffff86165f90815260a36020526040902080546001909101555b73ffffffffffffffffffffffffffffffffffffffff86165f90815260a3602090815260408083206001810154905460a484528285203386529093529220548161240a848a616725565b6124149190616769565b61241e908261677c565b73ffffffffffffffffffffffffffffffffffffffff8a165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548a929061246c90849061677c565b9091555082905061247d848a616725565b6124879190616769565b612491908461677c565b73ffffffffffffffffffffffffffffffffffffffff8a165f90815260a36020908152604080832060010193909355609f90522054871580156124d5575060975460ff165b80156124e25750609c5481105b156127ce5773ffffffffffffffffffffffffffffffffffffffff8a165f908152609f60205260408120546125189060019061677c565b90505b6001609c5461252a919061677c565b8110156127cc5760a35f609e83815481106125475761254761678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120549060a390609e6125898560016163e5565b815481106125995761259961678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205411156127c4575f609e82815481106125e4576125e461678f565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050609e6126148360016163e5565b815481106126245761262461678f565b5f91825260209091200154609e805473ffffffffffffffffffffffffffffffffffffffff909216918490811061265c5761265c61678f565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905580609e6126b78460016163e5565b815481106126c7576126c761678f565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905561271f8260016163e5565b609f5f609e85815481106127355761273561678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020556127718260026163e5565b609f5f609e6127818660016163e5565b815481106127915761279161678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b60010161251b565b505b871580156127fe575073ffffffffffffffffffffffffffffffffffffffff8a165f90815260a36020526040902054155b1561281b576001609c5f828254612815919061677c565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8a165f90815260a3602052604090205433604080518c8152602081018490529081018a905273ffffffffffffffffffffffffffffffffffffffff918216918d16907f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c9060600160405180910390a3881580156128ae575060975460ff165b80156128bc5750609b548211155b801561291c5750609b5473ffffffffffffffffffffffffffffffffffffffff8c165f908152609f6020526040902054118061291c5750609c5473ffffffffffffffffffffffffffffffffffffffff8c165f908152609f6020526040902054115b15612929576129296150b4565b50505050505050505061293c6001606555565b5050565b335f908152609f6020526040812054849103612988576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f908152609f60205260408120548491036129d0576040517f3efa0ab900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6129d861525b565b825f03612a11576040517f608294ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612a1b8533615b22565b5f03612a53576040517f857ad50500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82612a5e8633615b22565b1015612a96576040517f08c2348a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85165f908152609f602052604081205460975490159060ff16612b725773ffffffffffffffffffffffffffffffffffffffff87165f90815260a46020908152604080832033845290915281208054879290612b0790849061677c565b909155505073ffffffffffffffffffffffffffffffffffffffff87165f90815260a3602052604081208054879290612b4090849061677c565b909155505073ffffffffffffffffffffffffffffffffffffffff87165f90815260a36020526040902080546001909101555b73ffffffffffffffffffffffffffffffffffffffff87165f90815260a3602090815260408083206001810154905460a4845282852033865290935292205481612bbb848a616725565b612bc59190616769565b612bcf908261677c565b73ffffffffffffffffffffffffffffffffffffffff8b165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548a9290612c1d90849061677c565b90915550829050612c2e848a616725565b612c389190616769565b612c42908461677c565b73ffffffffffffffffffffffffffffffffffffffff8b165f90815260a36020908152604080832060010193909355609f9052205484158015612c86575060975460ff165b8015612c935750609c5481105b15612f7f5773ffffffffffffffffffffffffffffffffffffffff8b165f908152609f6020526040812054612cc99060019061677c565b90505b6001609c54612cdb919061677c565b811015612f7d5760a35f609e8381548110612cf857612cf861678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120549060a390609e612d3a8560016163e5565b81548110612d4a57612d4a61678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115612f75575f609e8281548110612d9557612d9561678f565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050609e612dc58360016163e5565b81548110612dd557612dd561678f565b5f91825260209091200154609e805473ffffffffffffffffffffffffffffffffffffffff9092169184908110612e0d57612e0d61678f565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905580609e612e688460016163e5565b81548110612e7857612e7861678f565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612ed08260016163e5565b609f5f609e8581548110612ee657612ee661678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055612f228260026163e5565b609f5f609e612f328660016163e5565b81548110612f4257612f4261678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b600101612ccc565b505b84158015612faf575073ffffffffffffffffffffffffffffffffffffffff8b165f90815260a36020526040902054155b15612fcc576001609c5f828254612fc6919061677c565b90915550505b84158015612fdc575060975460ff165b8015612fea5750609b548111155b801561304a5750609b5473ffffffffffffffffffffffffffffffffffffffff8c165f908152609f6020526040902054118061304a5750609c5473ffffffffffffffffffffffffffffffffffffffff8c165f908152609f6020526040902054115b1561305457600195505b6130823373ffffffffffffffffffffffffffffffffffffffff8c165f90815260a260205260409020906152ce565b5060975460ff166131375773ffffffffffffffffffffffffffffffffffffffff8a165f90815260a460209081526040808320338452909152812080548b92906130cc9084906163e5565b909155505073ffffffffffffffffffffffffffffffffffffffff8a165f90815260a36020526040812080548b92906131059084906163e5565b909155505073ffffffffffffffffffffffffffffffffffffffff8a165f90815260a36020526040902080546001909101555b73ffffffffffffffffffffffffffffffffffffffff8a165f90815260a3602090815260408083206001810154905460a484528285203386529093529220549195509350915082613187858b616725565b6131919190616769565b61319b90836163e5565b73ffffffffffffffffffffffffffffffffffffffff8b165f81815260a46020908152604080832033845282528083209490945591815260a390915290812080548b92906131e99084906163e5565b909155508390506131fa858b616725565b6132049190616769565b61320e90856163e5565b73ffffffffffffffffffffffffffffffffffffffff8b165f90815260a36020526040902060018101919091555489900361325a576001609c5f82825461325491906163e5565b90915550505b5073ffffffffffffffffffffffffffffffffffffffff89165f908152609f602052604090205460975460ff1680156132925750600181115b15613547575f6132a360018361677c565b90505b80156135455760a35f609e6132bc60018561677c565b815481106132cc576132cc61678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001812054609e8054919260a392909190859081106133195761331961678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115613533575f609e61335e60018461677c565b8154811061336e5761336e61678f565b5f91825260209091200154609e805473ffffffffffffffffffffffffffffffffffffffff909216925090839081106133a8576133a861678f565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16609e6133d660018561677c565b815481106133e6576133e661678f565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609e838154811061343f5761343f61678f565b5f918252602082200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff93909316929092179091558290609f90609e61349e60018561677c565b815481106134ae576134ae61678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020556134ea8260016163e5565b609f5f609e85815481106135005761350061678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b8061353d816167bc565b9150506132a6565b505b60975460ff16801561355a5750609b5481115b801561358c575060995473ffffffffffffffffffffffffffffffffffffffff8b165f908152609f602052604090205411155b1561359657600195505b85156135a4576135a46150b4565b73ffffffffffffffffffffffffffffffffffffffff8b81165f81815260a36020908152604080832054948f16808452928190205481518f8152928301869052908201819052923392917ffdac6e81913996d95abcc289e90f2d8bd235487ce6fe6f821e7d21002a1915b49060600160405180910390a4505050505050505061362c6001606555565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561374f57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015613713573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906137379190616876565b73ffffffffffffffffffffffffffffffffffffffff16145b610864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401611c42565b6137e3615033565b6137ec5f615a0e565b565b6137f6615033565b609854421015613832576040517f080bb11a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609c545f0361386d576040517fd7d776cb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609e54811015613a81575f5b81811015613a785760a35f609e83815481106138c6576138c661678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001812054609e8054919260a392909190869081106139135761391361678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115613a70575f609e828154811061395e5761395e61678f565b5f91825260209091200154609e805473ffffffffffffffffffffffffffffffffffffffff909216925090849081106139985761399861678f565b5f91825260209091200154609e805473ffffffffffffffffffffffffffffffffffffffff90921691849081106139d0576139d061678f565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609e8481548110613a2957613a2961678f565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b6001016138a8565b5060010161389c565b505f5b609e54811015613ae857613a998160016163e5565b609f5f609e8481548110613aaf57613aaf61678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055600101613a84565b506137ec6150b4565b5f609854421015613b2e576040517fd021716f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6201518060985442613b40919061677c565b613b4a9190616769565b905090565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a76020526040812054610856565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a4602090815260408083203384529091528120541515610856565b60a06020525f908152604090208054600182015460028301805473ffffffffffffffffffffffffffffffffffffffff909316939192613bee90616486565b80601f0160208091040260200160405190810160405280929190818152602001828054613c1a90616486565b8015613c655780601f10613c3c57610100808354040283529160200191613c65565b820191905f5260205f20905b815481529060010190602001808311613c4857829003601f168201915b5050505050905083565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614613cde576040517f4032cbb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60aa5415613ed8575f5b613cf260a861502a565b811015613ed6575f60a181613d0860a885615bb1565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f9081205460aa5490925060ab82613d4460a887615bb1565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2054613d749086616725565b613d7e9190616769565b90505f6064613d8d8484616725565b613d979190616769565b90505f613da4828461677c565b90508160a15f613db560a889615bb1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f828254613dff91906163e5565b9091555081905060a35f613e1460a889615bb1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f828254613e5d91906163e5565b90915550613e6e905060a886615bb1565b73ffffffffffffffffffffffffffffffffffffffff167f60ce3cc2d133631eac66a476f14997a9fa682bd05a60dd993cf02285822d78d88284604051613ebe929190918252602082015260400190565b60405180910390a2505060019092019150613ce89050565b505b5f5b613ee460a861502a565b81101561293c5760ab5f613ef960a884615bb1565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f90812055613f37613f2f60a883615bb1565b60a890615bbc565b50600101613eda565b5f613f4b8383615b22565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260a66020526040812054600f81810b700100000000000000000000000000000000909204900b035f03613fa157505f610856565b811580613fee575073ffffffffffffffffffffffffffffffffffffffff83165f90815260a66020526040902054600f81810b700100000000000000000000000000000000909204900b0382115b613ff8578161403b565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260a66020526040902054600f81810b700100000000000000000000000000000000909204900b035b91505f805b838110156113205773ffffffffffffffffffffffffffffffffffffffff85165f90815260a66020526040812061407690836155a2565b5f81815260a560209081526040918290208251808401909352805480845260019091015491830191909152919250906140af90856163e5565b93505050806001019050614040565b604080518082019091525f808252602082015273ffffffffffffffffffffffffffffffffffffffff83165f90815260a6602052604081206140ff90846155a2565b5f90815260a560209081526040918290208251808401909352805483526001015490820152949350505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561424857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561420c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142309190616876565b73ffffffffffffffffffffffffffffffffffffffff16145b6142d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401611c42565b82609d548114614310576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61431b8460016163e5565b609d555f805b8381101561476557609b54609f5f8787858181106143415761434161678f565b90506020020160208101906143569190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541161439a57600191505b5f609f5f8787858181106143b0576143b061678f565b90506020020160208101906143c59190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205411156146cf575f6001609f5f88888681811061441d5761441d61678f565b90506020020160208101906144329190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054614476919061677c565b90505b609e546144889060019061677c565b81101561458e57609e61449c8260016163e5565b815481106144ac576144ac61678f565b5f91825260209091200154609e805473ffffffffffffffffffffffffffffffffffffffff90921691839081106144e4576144e461678f565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001609f5f609e84815481106145415761454161678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120805490919061458190849061677c565b9091555050600101614479565b50609e8054806145a0576145a0616891565b5f8281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609f9086868481811061460f5761460f61678f565b90506020020160208101906146249190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f90555f60a35f8787858181106146765761467661678f565b905060200201602081019061468b9190615f78565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f205411156146cf576001609c5f8282546146c9919061677c565b90915550505b60a05f8686848181106146e4576146e461678f565b90506020020160208101906146f99190615f78565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f90812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018290559061475b6002830182615f11565b5050600101614321565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f6184846040516147979291906168be565b60405180910390a1801561362c5761362c6150b4565b5f6060835f036147e9576040517f89076b3900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85165f90815260a2602052604090206148169061502a565b91508367ffffffffffffffff81111561483157614831616459565b60405190808252806020026020018201604052801561485a578160200160208202803683370190505b5090505f6148688486616725565b90505f600161487786826163e5565b6148819088616725565b61488b919061677c565b905061489860018561677c565b8111156148ad576148aa60018561677c565b90505b815f5b82821161494d576148f1826148c4816167f0565b73ffffffffffffffffffffffffffffffffffffffff8c165f90815260a26020526040902090945090615bb1565b85826148fc816167f0565b93508151811061490e5761490e61678f565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506148b0565b50505050935093915050565b614961615033565b73ffffffffffffffffffffffffffffffffffffffff8116614a04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611c42565b614a0d81615a0e565b50565b614a1861525b565b335f90815260a160205260408120600101549003614a62576040517f5426dfcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260a160205260408120600101805491905590614a82906115c8565b60405181815233907f8e14daa5332205b1634040e1054e93d1f5396ec8bf0115d133b7fbaf4a52e4119060200160405180910390a2506137ec6001606555565b614aca615033565b82609d548114614b06576040517f2f0fd70500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b614b118460016163e5565b609d555f805b8381101561476557609b54609f5f878785818110614b3757614b3761678f565b9050602002016020810190614b4c9190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205411614b9057600191505b5f609f5f878785818110614ba657614ba661678f565b9050602002016020810190614bbb9190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541115614ec5575f6001609f5f888886818110614c1357614c1361678f565b9050602002016020810190614c289190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054614c6c919061677c565b90505b609e54614c7e9060019061677c565b811015614d8457609e614c928260016163e5565b81548110614ca257614ca261678f565b5f91825260209091200154609e805473ffffffffffffffffffffffffffffffffffffffff9092169183908110614cda57614cda61678f565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001609f5f609e8481548110614d3757614d3761678f565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181208054909190614d7790849061677c565b9091555050600101614c6f565b50609e805480614d9657614d96616891565b5f8281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609f90868684818110614e0557614e0561678f565b9050602002016020810190614e1a9190615f78565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f90555f60a35f878785818110614e6c57614e6c61678f565b9050602002016020810190614e819190615f78565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f20541115614ec5576001609c5f828254614ebf919061677c565b90915550505b60a05f868684818110614eda57614eda61678f565b9050602002016020810190614eef9190615f78565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f90812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001810182905590614f516002830182615f11565b5050600101614b17565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614614fca576040517f52d033bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b614fd560a8826152ce565b50600160aa5f828254614fe891906163e5565b909155505073ffffffffffffffffffffffffffffffffffffffff81165f90815260ab602052604081208054600192906150229084906163e5565b909155505050565b5f610856825490565b60335473ffffffffffffffffffffffffffffffffffffffff1633146137ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611c42565b60995460975460ff16156150d857609954609c5410156150d35750609c545b6150e9565b609954609e5410156150e95750609e545b5f8167ffffffffffffffff81111561510357615103616459565b60405190808252806020026020018201604052801561512c578160200160208202803683370190505b5090505f5b828110156151b357609e818154811061514c5761514c61678f565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168282815181106151865761518661678f565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101615131565b506040517f9b8201a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639b8201a490615226908490600401616918565b5f604051808303815f87803b15801561523d575f80fd5b505af115801561524f573d5f803e3d5ffd5b50509151609b55505050565b6002606554036152c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611c42565b6002606555565b5f613f4b8373ffffffffffffffffffffffffffffffffffffffff8416615bdd565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561537d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906153a1919061692a565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015615440573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906154649190616941565b61549a576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015615528573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061554c919061692a565b9050821580615564575082615561838361677c565b14155b1561362c576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001606555565b5f806155c46155b084615c29565b85546155bf9190600f0b616960565b615cde565b84549091507001000000000000000000000000000000009004600f90810b9082900b1261561d576040517fb4120f1400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f0b5f9081526001939093016020525050604090205490565b5f61565e8254600f81810b700100000000000000000000000000000000909204900b131590565b15615695576040517f3db2a12a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b508054600f0b5f9081526001909101602052604090205490565b5f6156d68254600f81810b700100000000000000000000000000000000909204900b131590565b1561570d576040517f3db2a12a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b508054600f0b5f818152600180840160205260408220805492905583547fffffffffffffffffffffffffffffffff000000000000000000000000000000001692016fffffffffffffffffffffffffffffffff169190911790915590565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156157f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061581c919061692a565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af11580156158b3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906158d79190616941565b61590d576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561599b573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906159bf919061692a565b90508215806159d75750826159d4838361677c565b14155b15611246576040517f9a7058e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff16615b1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611c42565b6137ec615d72565b73ffffffffffffffffffffffffffffffffffffffff8083165f81815260a360208181526040808420600181015460a4845282862097891686529683529084205494845291905254909291615b7591616725565b613f4b9190616769565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a760205260409020805460018101825590611b7d565b5f613f4b8383615e08565b5f613f4b8373ffffffffffffffffffffffffffffffffffffffff8416615e2e565b5f818152600183016020526040812054615c2257508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610856565b505f610856565b5f7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821115615cda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e206160448201527f6e20696e743235360000000000000000000000000000000000000000000000006064820152608401611c42565b5090565b80600f81900b81146115da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401611c42565b5f54610100900460ff1661559b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611c42565b5f825f018281548110615e1d57615e1d61678f565b905f5260205f200154905092915050565b5f8181526001830160205260408120548015615f08575f615e5060018361677c565b85549091505f90615e639060019061677c565b9050818114615ec2575f865f018281548110615e8157615e8161678f565b905f5260205f200154905080875f018481548110615ea157615ea161678f565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080615ed357615ed3616891565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610856565b5f915050610856565b508054615f1d90616486565b5f825580601f10615f2c575050565b601f0160209004905f5260205f2090810190614a0d91905b80821115615cda575f8155600101615f44565b73ffffffffffffffffffffffffffffffffffffffff81168114614a0d575f80fd5b5f60208284031215615f88575f80fd5b8135613f4b81615f57565b5f8060408385031215615fa4575f80fd5b82359150602083013567ffffffffffffffff811115615fc1575f80fd5b830160608186031215615fd2575f80fd5b809150509250929050565b5f8060408385031215615fee575f80fd5b8235615ff981615f57565b946020939093013593505050565b5f60208284031215616017575f80fd5b5035919050565b5f8083601f84011261602e575f80fd5b50813567ffffffffffffffff811115616045575f80fd5b6020830191508360208260051b850101111561605f575f80fd5b9250929050565b5f8060208385031215616077575f80fd5b823567ffffffffffffffff81111561608d575f80fd5b6160998582860161601e565b90969095509350505050565b5f81518084525f5b818110156160c9576020818501810151868301820152016160ad565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b838110156161ab578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff16845287810151888501528601516060878501819052616197818601836160a5565b96890196945050509086019060010161612d565b509098975050505050505050565b5f80604083850312156161ca575f80fd5b82356161d581615f57565b91506020830135615fd281615f57565b5f805f805f8060a087890312156161fa575f80fd5b863561620581615f57565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115616235575f80fd5b61624189828a0161601e565b979a9699509497509295939492505050565b5f805f60608486031215616265575f80fd5b833561627081615f57565b9250602084013561628081615f57565b929592945050506040919091013590565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201525f6162c560608301846160a5565b95945050505050565b5f805f604084860312156162e0575f80fd5b83359250602084013567ffffffffffffffff8111156162fd575f80fd5b6163098682870161601e565b9497909650939450505050565b5f805f60608486031215616328575f80fd5b833561633381615f57565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b8381101561638d57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161635b565b509495945050505050565b828152604060208201525f6163b06040830184616348565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610856576108566163b8565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261642b575f80fd5b83018035915067ffffffffffffffff821115616445575f80fd5b60200191503681900382131561605f575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c9082168061649a57607f821691505b602082108103611b7d577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f821115610a7357805f5260205f20601f840160051c810160208510156164f65750805b601f840160051c820191505b8181101561362c575f8155600101616502565b813561652081615f57565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18636030181126165a4575f80fd5b8501803567ffffffffffffffff8111156165bc575f80fd5b80360384830113156165cc575f80fd5b6165e0816165da8554616486565b856164d1565b5f601f821160018114616632575f83156165fc57508382018601355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1785556166c7565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b8281101561667e5786850189013582559388019390890190880161665f565b50848210156166bb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b8082028115828204841417610856576108566163b8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f826167775761677761673c565b500490565b81810381811115610856576108566163b8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f816167ca576167ca6163b8565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203616820576168206163b8565b5060010190565b5f826168355761683561673c565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301811261686c575f80fd5b9190910192915050565b5f60208284031215616886575f80fd5b8151613f4b81615f57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b8681101561690d5782356168e581615f57565b73ffffffffffffffffffffffffffffffffffffffff16825291830191908301906001016168d2565b509695505050505050565b602081525f613f4b6020830184616348565b5f6020828403121561693a575f80fd5b5051919050565b5f60208284031215616951575f80fd5b81518015158114613f4b575f80fd5b8082018281125f83128015821682158216171561697f5761697f6163b8565b50509291505056fea164736f6c6343000818000a" func init() { if err := json.Unmarshal([]byte(L2StakingStorageLayoutJSON), L2StakingStorageLayout); err != nil { diff --git a/bindings/bindings/morphtoken.go b/bindings/bindings/morphtoken.go index 16d4e117d..cbc2d9942 100644 --- a/bindings/bindings/morphtoken.go +++ b/bindings/bindings/morphtoken.go @@ -37,8 +37,8 @@ type IMorphTokenEpochInflationRate struct { // MorphTokenMetaData contains all meta data concerning the MorphToken contract. var MorphTokenMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InflationMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"effectiveEpochIndex\",\"type\":\"uint256\"}],\"name\":\"UpdateEpochInflationRate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DISTRIBUTE_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_STAKING_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RECORD_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"epochInflationRates\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"effectiveEpochIndex\",\"type\":\"uint256\"}],\"internalType\":\"structIMorphToken.EpochInflationRate\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epochIndex\",\"type\":\"uint256\"}],\"name\":\"inflation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inflationMintedEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inflationRatesCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dailyInflationRate_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upToEpochIndex\",\"type\":\"uint256\"}],\"name\":\"mintInflations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"effectiveEpochIndex\",\"type\":\"uint256\"}],\"name\":\"updateRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e060405234801561000f575f80fd5b5073530000000000000000000000000000000000001560805273530000000000000000000000000000000000001460a05273530000000000000000000000000000000000001260c05260805160a05160c051611bb76100975f395f81816103d20152610a7a01525f81816102330152610d3501525f81816103250152610aff0152611bb75ff3fe608060405234801561000f575f80fd5b506004361061019a575f3560e01c8063715018a6116100e8578063a29bfb2c11610093578063c553f7b31161006e578063c553f7b3146103c5578063cd4281d0146103cd578063dd62ed3e146103f4578063f2fde38b14610439575f80fd5b8063a29bfb2c1461038c578063a457c2d71461039f578063a9059cbb146103b2575f80fd5b80638da5cb5b116100c35780638da5cb5b14610347578063944fa7461461036557806395d89b4114610384575f80fd5b8063715018a614610305578063748231321461030d578063807de44314610320575f80fd5b8063395093511161014857806342966c681161012357806342966c681461028f5780636d0c4a26146102a257806370a08231146102d0575f80fd5b8063395093511461021b5780633d9353fe1461022e578063405abb411461027a575f80fd5b806318160ddd1161017857806318160ddd146101f157806323b872dd146101f9578063313ce5671461020c575f80fd5b806306fdde031461019e578063095ea7b3146101bc5780630b88a984146101df575b5f80fd5b6101a661044c565b6040516101b391906115d5565b60405180910390f35b6101cf6101ca366004611667565b6104dc565b60405190151581526020016101b3565b606c545b6040519081526020016101b3565b6067546101e3565b6101cf61020736600461168f565b6104f5565b604051601281526020016101b3565b6101cf610229366004611667565b610518565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b3565b61028d6102883660046116c8565b610563565b005b61028d61029d3660046116e8565b61075e565b6102b56102b03660046116e8565b6107c2565b604080518251815260209283015192810192909252016101b3565b6101e36102de3660046116ff565b73ffffffffffffffffffffffffffffffffffffffff165f9081526068602052604090205490565b61028d610819565b61028d61031b3660046117f3565b61082c565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff16610255565b6101e36103733660046116e8565b5f908152606b602052604090205490565b6101a6610a68565b61028d61039a3660046116e8565b610a77565b6101cf6103ad366004611667565b610dbb565b6101cf6103c0366004611667565b610e4b565b606a546101e3565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b6101e3610402366004611873565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260696020908152604080832093909416825291909152205490565b61028d6104473660046116ff565b610e58565b60606065805461045b906118a4565b80601f0160208091040260200160405190810160405280929190818152602001828054610487906118a4565b80156104d25780601f106104a9576101008083540402835291602001916104d2565b820191905f5260205f20905b8154815290600101906020018083116104b557829003601f168201915b5050505050905090565b5f336104e9818585610ef2565b60019150505b92915050565b5f33610502858285611026565b61050d8585856110e2565b506001949350505050565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104e9908290869061055e908790611922565b610ef2565b61056b611297565b606a805483919061057e90600190611935565b8154811061058e5761058e611948565b905f5260205f2090600202015f0154036106155760405162461bcd60e51b815260206004820152602760248201527f6e65772072617465206973207468652073616d6520617320746865206c61746560448201527f737420726174650000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606a805461062590600190611935565b8154811061063557610635611948565b905f5260205f2090600202016001015481116106b95760405162461bcd60e51b815260206004820152603260248201527f6566666563746976652065706f636873206166746572206d757374206265206760448201527f726561746572207468616e206265666f72650000000000000000000000000000606482015260840161060c565b60408051808201825283815260208101838152606a80546001810182555f91825292517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029094029384015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909201919091559051829184917fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f49190a35050565b610766611297565b5f81116107b55760405162461bcd60e51b815260206004820152601660248201527f616d6f756e7420746f206275726e206973207a65726f00000000000000000000604482015260640161060c565b6107bf33826112fe565b50565b604080518082019091525f8082526020820152606a82815481106107e8576107e8611948565b905f5260205f2090600202016040518060400160405290815f82015481526020016001820154815250509050919050565b610821611297565b61082a5f611486565b565b5f54610100900460ff161580801561084a57505f54600160ff909116105b806108635750303b15801561086357505f5460ff166001145b6108d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161060c565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610931575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606561093d87826119c1565b50606661094a86826119c1565b5061095584846114fc565b604080518082019091528281525f60208201818152606a8054600181018255925291517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029092029182015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909101556109d284611486565b6040515f9083907fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f4908390a38015610a60575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b60606066805461045b906118a4565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610afc5760405162461bcd60e51b815260206004820152601c60248201527f6f6e6c79207265636f726420636f6e747261637420616c6c6f77656400000000604482015260640161060c565b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b66573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611ad9565b11610bfd5760405162461bcd60e51b815260206004820152602b60248201527f746865207370656369666965642074696d6520686173206e6f7420796574206260448201527f65656e2072656163686564000000000000000000000000000000000000000000606482015260840161060c565b606c54811015610c4f5760405162461bcd60e51b815260206004820152601560248201527f616c6c20696e666c6174696f6e73206d696e7465640000000000000000000000604482015260640161060c565b606c545b818111610da9575f606a5f81548110610c6e57610c6e611948565b5f9182526020822060029091020154606a54909250610c8f90600190611935565b90505b8015610cfc5782606a8281548110610cac57610cac611948565b905f5260205f2090600202016001015411610cea57606a8181548110610cd457610cd4611948565b905f5260205f2090600202015f01549150610cfc565b80610cf481611af0565b915050610c92565b505f662386f26fc1000082606754610d149190611b24565b610d1e9190611b3b565b5f848152606b602052604090208190559050610d5a7f0000000000000000000000000000000000000000000000000000000000000000826114fc565b827f0d82c0920038b8dc7f633e18585f37092ba957b84876fcf833d6841f69eaa32782604051610d8c91815260200190565b60405180910390a250508080610da190611b73565b915050610c53565b50610db5816001611922565b606c5550565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610e3e5760405162461bcd60e51b815260206004820152601e60248201527f64656372656173656420616c6c6f77616e63652062656c6f77207a65726f0000604482015260640161060c565b61050d8286868403610ef2565b5f336104e98185856110e2565b610e60611297565b73ffffffffffffffffffffffffffffffffffffffff8116610ee95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161060c565b6107bf81611486565b73ffffffffffffffffffffffffffffffffffffffff8316610f555760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f2061646472657373000000604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff8216610fb85760405162461bcd60e51b815260206004820152601b60248201527f617070726f766520746f20746865207a65726f20616464726573730000000000604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181526069602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f908152606960209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146110dc57818110156110cf5760405162461bcd60e51b815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e636500000000000000000000604482015260640161060c565b6110dc8484848403610ef2565b50505050565b73ffffffffffffffffffffffffffffffffffffffff83166111455760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f20616464726573730000604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff82166111a85760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f206164647265737300000000604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff83165f908152606860205260409020548181101561121d5760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e636500604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526068602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112899086815260200190565b60405180910390a350505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461082a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161060c565b73ffffffffffffffffffffffffffffffffffffffff82166113875760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161060c565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260686020526040902054818110156114225760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161060c565b73ffffffffffffffffffffffffffffffffffffffff83165f8181526068602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611019565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b73ffffffffffffffffffffffffffffffffffffffff821661155f5760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f20616464726573730000000000000000604482015260640161060c565b8060675f8282546115709190611922565b909155505073ffffffffffffffffffffffffffffffffffffffff82165f818152606860209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b81811015611601578581018301518582016040015282016115e5565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611662575f80fd5b919050565b5f8060408385031215611678575f80fd5b6116818361163f565b946020939093013593505050565b5f805f606084860312156116a1575f80fd5b6116aa8461163f565b92506116b86020850161163f565b9150604084013590509250925092565b5f80604083850312156116d9575f80fd5b50508035926020909101359150565b5f602082840312156116f8575f80fd5b5035919050565b5f6020828403121561170f575f80fd5b6117188261163f565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261175b575f80fd5b813567ffffffffffffffff808211156117765761177661171f565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156117bc576117bc61171f565b816040528381528660208588010111156117d4575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a08688031215611807575f80fd5b853567ffffffffffffffff8082111561181e575f80fd5b61182a89838a0161174c565b9650602088013591508082111561183f575f80fd5b5061184c8882890161174c565b94505061185b6040870161163f565b94979396509394606081013594506080013592915050565b5f8060408385031215611884575f80fd5b61188d8361163f565b915061189b6020840161163f565b90509250929050565b600181811c908216806118b857607f821691505b6020821081036118ef577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156104ef576104ef6118f5565b818103818111156104ef576104ef6118f5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f8211156119bc57805f5260205f20601f840160051c8101602085101561199a5750805b601f840160051c820191505b818110156119b9575f81556001016119a6565b50505b505050565b815167ffffffffffffffff8111156119db576119db61171f565b6119ef816119e984546118a4565b84611975565b602080601f831160018114611a41575f8415611a0b5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610a60565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611a8d57888601518255948401946001909101908401611a6e565b5085821015611ac957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215611ae9575f80fd5b5051919050565b5f81611afe57611afe6118f5565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b80820281158282048414176104ef576104ef6118f5565b5f82611b6e577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ba357611ba36118f5565b506001019056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InflationMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"effectiveEpochIndex\",\"type\":\"uint256\"}],\"name\":\"UpdateEpochInflationRate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"L2_STAKING_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SYSTEM_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"epochInflationRates\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"effectiveEpochIndex\",\"type\":\"uint256\"}],\"internalType\":\"structIMorphToken.EpochInflationRate\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epochIndex\",\"type\":\"uint256\"}],\"name\":\"inflation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inflationMintedEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inflationRatesCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dailyInflationRate_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"upToEpochIndex\",\"type\":\"uint256\"}],\"name\":\"mintInflations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"effectiveEpochIndex\",\"type\":\"uint256\"}],\"name\":\"updateRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60c060405234801561000f575f80fd5b5073530000000000000000000000000000000000001560805273530000000000000000000000000000000000002160a05260805160a051611c2061007d5f395f81816102150152610a4801525f818161031a01528181610acd01528181610d030152610d570152611c205ff3fe608060405234801561000f575f80fd5b506004361061018f575f3560e01c8063715018a6116100dd578063a29bfb2c11610088578063c553f7b311610063578063c553f7b3146103ba578063dd62ed3e146103c2578063f2fde38b14610407575f80fd5b8063a29bfb2c14610381578063a457c2d714610394578063a9059cbb146103a7575f80fd5b80638da5cb5b116100b85780638da5cb5b1461033c578063944fa7461461035a57806395d89b4114610379575f80fd5b8063715018a6146102fa5780637482313214610302578063807de44314610315575f80fd5b80633434735f1161013d57806342966c681161011857806342966c68146102845780636d0c4a261461029757806370a08231146102c5575f80fd5b80633434735f14610210578063395093511461025c578063405abb411461026f575f80fd5b806318160ddd1161016d57806318160ddd146101e657806323b872dd146101ee578063313ce56714610201575f80fd5b806306fdde0314610193578063095ea7b3146101b15780630b88a984146101d4575b5f80fd5b61019b61041a565b6040516101a8919061163e565b60405180910390f35b6101c46101bf3660046116d0565b6104aa565b60405190151581526020016101a8565b606c545b6040519081526020016101a8565b6067546101d8565b6101c46101fc3660046116f8565b6104c3565b604051601281526020016101a8565b6102377f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a8565b6101c461026a3660046116d0565b6104e6565b61028261027d366004611731565b610531565b005b610282610292366004611751565b61072c565b6102aa6102a5366004611751565b610790565b604080518251815260209283015192810192909252016101a8565b6101d86102d3366004611768565b73ffffffffffffffffffffffffffffffffffffffff165f9081526068602052604090205490565b6102826107e7565b61028261031036600461185c565b6107fa565b6102377f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff16610237565b6101d8610368366004611751565b5f908152606b602052604090205490565b61019b610a36565b61028261038f366004611751565b610a45565b6101c46103a23660046116d0565b610e24565b6101c46103b53660046116d0565b610eb4565b606a546101d8565b6101d86103d03660046118dc565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260696020908152604080832093909416825291909152205490565b610282610415366004611768565b610ec1565b6060606580546104299061190d565b80601f01602080910402602001604051908101604052809291908181526020018280546104559061190d565b80156104a05780601f10610477576101008083540402835291602001916104a0565b820191905f5260205f20905b81548152906001019060200180831161048357829003601f168201915b5050505050905090565b5f336104b7818585610f5b565b60019150505b92915050565b5f336104d085828561108f565b6104db85858561114b565b506001949350505050565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104b7908290869061052c90879061198b565b610f5b565b610539611300565b606a805483919061054c9060019061199e565b8154811061055c5761055c6119b1565b905f5260205f2090600202015f0154036105e35760405162461bcd60e51b815260206004820152602760248201527f6e65772072617465206973207468652073616d6520617320746865206c61746560448201527f737420726174650000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606a80546105f39060019061199e565b81548110610603576106036119b1565b905f5260205f2090600202016001015481116106875760405162461bcd60e51b815260206004820152603260248201527f6566666563746976652065706f636873206166746572206d757374206265206760448201527f726561746572207468616e206265666f7265000000000000000000000000000060648201526084016105da565b60408051808201825283815260208101838152606a80546001810182555f91825292517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029094029384015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909201919091559051829184917fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f49190a35050565b610734611300565b5f81116107835760405162461bcd60e51b815260206004820152601660248201527f616d6f756e7420746f206275726e206973207a65726f0000000000000000000060448201526064016105da565b61078d3382611367565b50565b604080518082019091525f8082526020820152606a82815481106107b6576107b66119b1565b905f5260205f2090600202016040518060400160405290815f82015481526020016001820154815250509050919050565b6107ef611300565b6107f85f6114ef565b565b5f54610100900460ff161580801561081857505f54600160ff909116105b806108315750303b15801561083157505f5460ff166001145b6108a35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016105da565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156108ff575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606561090b8782611a2a565b5060666109188682611a2a565b506109238484611565565b604080518082019091528281525f60208201818152606a8054600181018255925291517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029092029182015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909101556109a0846114ef565b6040515f9083907fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f4908390a38015610a2e575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6060606680546104299061190d565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610aca5760405162461bcd60e51b815260206004820152601c60248201527f6f6e6c792073797374656d20636f6e747261637420616c6c6f7765640000000060448201526064016105da565b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b34573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b589190611b42565b11610bcb5760405162461bcd60e51b815260206004820152602b60248201527f746865207370656369666965642074696d6520686173206e6f7420796574206260448201527f65656e207265616368656400000000000000000000000000000000000000000060648201526084016105da565b606c54811015610c1d5760405162461bcd60e51b815260206004820152601560248201527f616c6c20696e666c6174696f6e73206d696e746564000000000000000000000060448201526064016105da565b606c545b818111610e12575f606a5f81548110610c3c57610c3c6119b1565b5f9182526020822060029091020154606a54909250610c5d9060019061199e565b90505b8015610cca5782606a8281548110610c7a57610c7a6119b1565b905f5260205f2090600202016001015411610cb857606a8181548110610ca257610ca26119b1565b905f5260205f2090600202015f01549150610cca565b80610cc281611b59565b915050610c60565b505f662386f26fc1000082606754610ce29190611b8d565b610cec9190611ba4565b5f848152606b602052604090208190559050610d287f000000000000000000000000000000000000000000000000000000000000000082611565565b6040517f91c05b0b000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906391c05b0b906024015f604051808303815f87803b158015610dad575f80fd5b505af1158015610dbf573d5f803e3d5ffd5b50505050827f0d82c0920038b8dc7f633e18585f37092ba957b84876fcf833d6841f69eaa32782604051610df591815260200190565b60405180910390a250508080610e0a90611bdc565b915050610c21565b50610e1e81600161198b565b606c5550565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610ea75760405162461bcd60e51b815260206004820152601e60248201527f64656372656173656420616c6c6f77616e63652062656c6f77207a65726f000060448201526064016105da565b6104db8286868403610f5b565b5f336104b781858561114b565b610ec9611300565b73ffffffffffffffffffffffffffffffffffffffff8116610f525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105da565b61078d816114ef565b73ffffffffffffffffffffffffffffffffffffffff8316610fbe5760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f206164647265737300000060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff82166110215760405162461bcd60e51b815260206004820152601b60248201527f617070726f766520746f20746865207a65726f2061646472657373000000000060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181526069602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f908152606960209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461114557818110156111385760405162461bcd60e51b815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e63650000000000000000000060448201526064016105da565b6111458484848403610f5b565b50505050565b73ffffffffffffffffffffffffffffffffffffffff83166111ae5760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff82166112115760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260686020526040902054818110156112865760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526068602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112f29086815260200190565b60405180910390a350505050565b60335473ffffffffffffffffffffffffffffffffffffffff1633146107f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105da565b73ffffffffffffffffffffffffffffffffffffffff82166113f05760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016105da565b73ffffffffffffffffffffffffffffffffffffffff82165f908152606860205260409020548181101561148b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105da565b73ffffffffffffffffffffffffffffffffffffffff83165f8181526068602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611082565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b73ffffffffffffffffffffffffffffffffffffffff82166115c85760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f2061646472657373000000000000000060448201526064016105da565b8060675f8282546115d9919061198b565b909155505073ffffffffffffffffffffffffffffffffffffffff82165f818152606860209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b8181101561166a5785810183015185820160400152820161164e565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116cb575f80fd5b919050565b5f80604083850312156116e1575f80fd5b6116ea836116a8565b946020939093013593505050565b5f805f6060848603121561170a575f80fd5b611713846116a8565b9250611721602085016116a8565b9150604084013590509250925092565b5f8060408385031215611742575f80fd5b50508035926020909101359150565b5f60208284031215611761575f80fd5b5035919050565b5f60208284031215611778575f80fd5b611781826116a8565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126117c4575f80fd5b813567ffffffffffffffff808211156117df576117df611788565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561182557611825611788565b8160405283815286602085880101111561183d575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a08688031215611870575f80fd5b853567ffffffffffffffff80821115611887575f80fd5b61189389838a016117b5565b965060208801359150808211156118a8575f80fd5b506118b5888289016117b5565b9450506118c4604087016116a8565b94979396509394606081013594506080013592915050565b5f80604083850312156118ed575f80fd5b6118f6836116a8565b9150611904602084016116a8565b90509250929050565b600181811c9082168061192157607f821691505b602082108103611958577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156104bd576104bd61195e565b818103818111156104bd576104bd61195e565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f821115611a2557805f5260205f20601f840160051c81016020851015611a035750805b601f840160051c820191505b81811015611a22575f8155600101611a0f565b50505b505050565b815167ffffffffffffffff811115611a4457611a44611788565b611a5881611a52845461190d565b846119de565b602080601f831160018114611aaa575f8415611a745750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610a2e565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611af657888601518255948401946001909101908401611ad7565b5085821015611b3257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215611b52575f80fd5b5051919050565b5f81611b6757611b6761195e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b80820281158282048414176104bd576104bd61195e565b5f82611bd7577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611c0c57611c0c61195e565b506001019056fea164736f6c6343000818000a", } // MorphTokenABI is the input ABI used to generate the binding from. @@ -208,37 +208,6 @@ func (_MorphToken *MorphTokenTransactorRaw) Transact(opts *bind.TransactOpts, me return _MorphToken.Contract.contract.Transact(opts, method, params...) } -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_MorphToken *MorphTokenCaller) DISTRIBUTECONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _MorphToken.contract.Call(opts, &out, "DISTRIBUTE_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_MorphToken *MorphTokenSession) DISTRIBUTECONTRACT() (common.Address, error) { - return _MorphToken.Contract.DISTRIBUTECONTRACT(&_MorphToken.CallOpts) -} - -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_MorphToken *MorphTokenCallerSession) DISTRIBUTECONTRACT() (common.Address, error) { - return _MorphToken.Contract.DISTRIBUTECONTRACT(&_MorphToken.CallOpts) -} - // L2STAKINGCONTRACT is a free data retrieval call binding the contract method 0x807de443. // // Solidity: function L2_STAKING_CONTRACT() view returns(address) @@ -270,12 +239,12 @@ func (_MorphToken *MorphTokenCallerSession) L2STAKINGCONTRACT() (common.Address, return _MorphToken.Contract.L2STAKINGCONTRACT(&_MorphToken.CallOpts) } -// RECORDCONTRACT is a free data retrieval call binding the contract method 0xcd4281d0. +// SYSTEMADDRESS is a free data retrieval call binding the contract method 0x3434735f. // -// Solidity: function RECORD_CONTRACT() view returns(address) -func (_MorphToken *MorphTokenCaller) RECORDCONTRACT(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function SYSTEM_ADDRESS() view returns(address) +func (_MorphToken *MorphTokenCaller) SYSTEMADDRESS(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _MorphToken.contract.Call(opts, &out, "RECORD_CONTRACT") + err := _MorphToken.contract.Call(opts, &out, "SYSTEM_ADDRESS") if err != nil { return *new(common.Address), err @@ -287,18 +256,18 @@ func (_MorphToken *MorphTokenCaller) RECORDCONTRACT(opts *bind.CallOpts) (common } -// RECORDCONTRACT is a free data retrieval call binding the contract method 0xcd4281d0. +// SYSTEMADDRESS is a free data retrieval call binding the contract method 0x3434735f. // -// Solidity: function RECORD_CONTRACT() view returns(address) -func (_MorphToken *MorphTokenSession) RECORDCONTRACT() (common.Address, error) { - return _MorphToken.Contract.RECORDCONTRACT(&_MorphToken.CallOpts) +// Solidity: function SYSTEM_ADDRESS() view returns(address) +func (_MorphToken *MorphTokenSession) SYSTEMADDRESS() (common.Address, error) { + return _MorphToken.Contract.SYSTEMADDRESS(&_MorphToken.CallOpts) } -// RECORDCONTRACT is a free data retrieval call binding the contract method 0xcd4281d0. +// SYSTEMADDRESS is a free data retrieval call binding the contract method 0x3434735f. // -// Solidity: function RECORD_CONTRACT() view returns(address) -func (_MorphToken *MorphTokenCallerSession) RECORDCONTRACT() (common.Address, error) { - return _MorphToken.Contract.RECORDCONTRACT(&_MorphToken.CallOpts) +// Solidity: function SYSTEM_ADDRESS() view returns(address) +func (_MorphToken *MorphTokenCallerSession) SYSTEMADDRESS() (common.Address, error) { + return _MorphToken.Contract.SYSTEMADDRESS(&_MorphToken.CallOpts) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. diff --git a/bindings/bindings/morphtoken_more.go b/bindings/bindings/morphtoken_more.go index 66baacc67..33af4177a 100644 --- a/bindings/bindings/morphtoken_more.go +++ b/bindings/bindings/morphtoken_more.go @@ -13,7 +13,7 @@ const MorphTokenStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\": var MorphTokenStorageLayout = new(solc.StorageLayout) -var MorphTokenDeployedBin = "0x608060405234801561000f575f80fd5b506004361061019a575f3560e01c8063715018a6116100e8578063a29bfb2c11610093578063c553f7b31161006e578063c553f7b3146103c5578063cd4281d0146103cd578063dd62ed3e146103f4578063f2fde38b14610439575f80fd5b8063a29bfb2c1461038c578063a457c2d71461039f578063a9059cbb146103b2575f80fd5b80638da5cb5b116100c35780638da5cb5b14610347578063944fa7461461036557806395d89b4114610384575f80fd5b8063715018a614610305578063748231321461030d578063807de44314610320575f80fd5b8063395093511161014857806342966c681161012357806342966c681461028f5780636d0c4a26146102a257806370a08231146102d0575f80fd5b8063395093511461021b5780633d9353fe1461022e578063405abb411461027a575f80fd5b806318160ddd1161017857806318160ddd146101f157806323b872dd146101f9578063313ce5671461020c575f80fd5b806306fdde031461019e578063095ea7b3146101bc5780630b88a984146101df575b5f80fd5b6101a661044c565b6040516101b391906117c3565b60405180910390f35b6101cf6101ca366004611855565b6104dc565b60405190151581526020016101b3565b606c545b6040519081526020016101b3565b6067546101e3565b6101cf61020736600461187d565b6104f5565b604051601281526020016101b3565b6101cf610229366004611855565b610518565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b3565b61028d6102883660046118b6565b610563565b005b61028d61029d3660046118d6565b610792565b6102b56102b03660046118d6565b610810565b604080518251815260209283015192810192909252016101b3565b6101e36102de3660046118ed565b73ffffffffffffffffffffffffffffffffffffffff165f9081526068602052604090205490565b61028d610867565b61028d61031b3660046119e1565b61087a565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff16610255565b6101e36103733660046118d6565b5f908152606b602052604090205490565b6101a6610ad0565b61028d61039a3660046118d6565b610adf565b6101cf6103ad366004611855565b610e71565b6101cf6103c0366004611855565b610f1b565b606a546101e3565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b6101e3610402366004611a61565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260696020908152604080832093909416825291909152205490565b61028d6104473660046118ed565b610f28565b60606065805461045b90611a92565b80601f016020809104026020016040519081016040528092919081815260200182805461048790611a92565b80156104d25780601f106104a9576101008083540402835291602001916104d2565b820191905f5260205f20905b8154815290600101906020018083116104b557829003601f168201915b5050505050905090565b5f336104e9818585610fdc565b60019150505b92915050565b5f33610502858285611144565b61050d85858561121a565b506001949350505050565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104e9908290869061055e908790611b10565b610fdc565b61056b61141d565b606a805483919061057e90600190611b23565b8154811061058e5761058e611b36565b905f5260205f2090600202015f01540361062f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f6e65772072617465206973207468652073616d6520617320746865206c61746560448201527f737420726174650000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606a805461063f90600190611b23565b8154811061064f5761064f611b36565b905f5260205f2090600202016001015481116106ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f6566666563746976652065706f636873206166746572206d757374206265206760448201527f726561746572207468616e206265666f726500000000000000000000000000006064820152608401610626565b60408051808201825283815260208101838152606a80546001810182555f91825292517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029094029384015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909201919091559051829184917fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f49190a35050565b61079a61141d565b5f8111610803576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f616d6f756e7420746f206275726e206973207a65726f000000000000000000006044820152606401610626565b61080d338261149e565b50565b604080518082019091525f8082526020820152606a828154811061083657610836611b36565b905f5260205f2090600202016040518060400160405290815f82015481526020016001820154815250509050919050565b61086f61141d565b6108785f61165a565b565b5f54610100900460ff161580801561089857505f54600160ff909116105b806108b15750303b1580156108b157505f5460ff166001145b61093d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610626565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610999575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b60656109a58782611baf565b5060666109b28682611baf565b506109bd84846116d0565b604080518082019091528281525f60208201818152606a8054600181018255925291517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029092029182015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5290910155610a3a8461165a565b6040515f9083907fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f4908390a38015610ac8575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b60606066805461045b90611a92565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610b7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6f6e6c79207265636f726420636f6e747261637420616c6c6f776564000000006044820152606401610626565b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa158015610be8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c0c9190611cc7565b11610c99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f746865207370656369666965642074696d6520686173206e6f7420796574206260448201527f65656e20726561636865640000000000000000000000000000000000000000006064820152608401610626565b606c54811015610d05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616c6c20696e666c6174696f6e73206d696e74656400000000000000000000006044820152606401610626565b606c545b818111610e5f575f606a5f81548110610d2457610d24611b36565b5f9182526020822060029091020154606a54909250610d4590600190611b23565b90505b8015610db25782606a8281548110610d6257610d62611b36565b905f5260205f2090600202016001015411610da057606a8181548110610d8a57610d8a611b36565b905f5260205f2090600202015f01549150610db2565b80610daa81611cde565b915050610d48565b505f662386f26fc1000082606754610dca9190611d12565b610dd49190611d29565b5f848152606b602052604090208190559050610e107f0000000000000000000000000000000000000000000000000000000000000000826116d0565b827f0d82c0920038b8dc7f633e18585f37092ba957b84876fcf833d6841f69eaa32782604051610e4291815260200190565b60405180910390a250508080610e5790611d61565b915050610d09565b50610e6b816001611b10565b606c5550565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610f0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f64656372656173656420616c6c6f77616e63652062656c6f77207a65726f00006044820152606401610626565b61050d8286868403610fdc565b5f336104e981858561121a565b610f3061141d565b73ffffffffffffffffffffffffffffffffffffffff8116610fd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610626565b61080d8161165a565b73ffffffffffffffffffffffffffffffffffffffff8316611059576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f20616464726573730000006044820152606401610626565b73ffffffffffffffffffffffffffffffffffffffff82166110d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f617070726f766520746f20746865207a65726f206164647265737300000000006044820152606401610626565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181526069602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f908152606960209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146112145781811015611207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e6365000000000000000000006044820152606401610626565b6112148484848403610fdc565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f206164647265737300006044820152606401610626565b73ffffffffffffffffffffffffffffffffffffffff8216611314576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f2061646472657373000000006044820152606401610626565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260686020526040902054818110156113a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e6365006044820152606401610626565b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526068602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061140f9086815260200190565b60405180910390a350505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610626565b73ffffffffffffffffffffffffffffffffffffffff8216611541576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610626565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260686020526040902054818110156115f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610626565b73ffffffffffffffffffffffffffffffffffffffff83165f8181526068602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611137565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b73ffffffffffffffffffffffffffffffffffffffff821661174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6d696e7420746f20746865207a65726f206164647265737300000000000000006044820152606401610626565b8060675f82825461175e9190611b10565b909155505073ffffffffffffffffffffffffffffffffffffffff82165f818152606860209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b818110156117ef578581018301518582016040015282016117d3565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611850575f80fd5b919050565b5f8060408385031215611866575f80fd5b61186f8361182d565b946020939093013593505050565b5f805f6060848603121561188f575f80fd5b6118988461182d565b92506118a66020850161182d565b9150604084013590509250925092565b5f80604083850312156118c7575f80fd5b50508035926020909101359150565b5f602082840312156118e6575f80fd5b5035919050565b5f602082840312156118fd575f80fd5b6119068261182d565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f830112611949575f80fd5b813567ffffffffffffffff808211156119645761196461190d565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156119aa576119aa61190d565b816040528381528660208588010111156119c2575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a086880312156119f5575f80fd5b853567ffffffffffffffff80821115611a0c575f80fd5b611a1889838a0161193a565b96506020880135915080821115611a2d575f80fd5b50611a3a8882890161193a565b945050611a496040870161182d565b94979396509394606081013594506080013592915050565b5f8060408385031215611a72575f80fd5b611a7b8361182d565b9150611a896020840161182d565b90509250929050565b600181811c90821680611aa657607f821691505b602082108103611add577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156104ef576104ef611ae3565b818103818111156104ef576104ef611ae3565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f821115611baa57805f5260205f20601f840160051c81016020851015611b885750805b601f840160051c820191505b81811015611ba7575f8155600101611b94565b50505b505050565b815167ffffffffffffffff811115611bc957611bc961190d565b611bdd81611bd78454611a92565b84611b63565b602080601f831160018114611c2f575f8415611bf95750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610ac8565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611c7b57888601518255948401946001909101908401611c5c565b5085821015611cb757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215611cd7575f80fd5b5051919050565b5f81611cec57611cec611ae3565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b80820281158282048414176104ef576104ef611ae3565b5f82611d5c577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d9157611d91611ae3565b506001019056fea164736f6c6343000818000a" +var MorphTokenDeployedBin = "0x608060405234801561000f575f80fd5b506004361061018f575f3560e01c8063715018a6116100dd578063a29bfb2c11610088578063c553f7b311610063578063c553f7b3146103ba578063dd62ed3e146103c2578063f2fde38b14610407575f80fd5b8063a29bfb2c14610381578063a457c2d714610394578063a9059cbb146103a7575f80fd5b80638da5cb5b116100b85780638da5cb5b1461033c578063944fa7461461035a57806395d89b4114610379575f80fd5b8063715018a6146102fa5780637482313214610302578063807de44314610315575f80fd5b80633434735f1161013d57806342966c681161011857806342966c68146102845780636d0c4a261461029757806370a08231146102c5575f80fd5b80633434735f14610210578063395093511461025c578063405abb411461026f575f80fd5b806318160ddd1161016d57806318160ddd146101e657806323b872dd146101ee578063313ce56714610201575f80fd5b806306fdde0314610193578063095ea7b3146101b15780630b88a984146101d4575b5f80fd5b61019b61041a565b6040516101a8919061182c565b60405180910390f35b6101c46101bf3660046118be565b6104aa565b60405190151581526020016101a8565b606c545b6040519081526020016101a8565b6067546101d8565b6101c46101fc3660046118e6565b6104c3565b604051601281526020016101a8565b6102377f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a8565b6101c461026a3660046118be565b6104e6565b61028261027d36600461191f565b610531565b005b61028261029236600461193f565b610760565b6102aa6102a536600461193f565b6107de565b604080518251815260209283015192810192909252016101a8565b6101d86102d3366004611956565b73ffffffffffffffffffffffffffffffffffffffff165f9081526068602052604090205490565b610282610835565b610282610310366004611a4a565b610848565b6102377f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff16610237565b6101d861036836600461193f565b5f908152606b602052604090205490565b61019b610a9e565b61028261038f36600461193f565b610aad565b6101c46103a23660046118be565b610eda565b6101c46103b53660046118be565b610f84565b606a546101d8565b6101d86103d0366004611aca565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260696020908152604080832093909416825291909152205490565b610282610415366004611956565b610f91565b60606065805461042990611afb565b80601f016020809104026020016040519081016040528092919081815260200182805461045590611afb565b80156104a05780601f10610477576101008083540402835291602001916104a0565b820191905f5260205f20905b81548152906001019060200180831161048357829003601f168201915b5050505050905090565b5f336104b7818585611045565b60019150505b92915050565b5f336104d08582856111ad565b6104db858585611283565b506001949350505050565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104b7908290869061052c908790611b79565b611045565b610539611486565b606a805483919061054c90600190611b8c565b8154811061055c5761055c611b9f565b905f5260205f2090600202015f0154036105fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f6e65772072617465206973207468652073616d6520617320746865206c61746560448201527f737420726174650000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606a805461060d90600190611b8c565b8154811061061d5761061d611b9f565b905f5260205f2090600202016001015481116106bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f6566666563746976652065706f636873206166746572206d757374206265206760448201527f726561746572207468616e206265666f7265000000000000000000000000000060648201526084016105f4565b60408051808201825283815260208101838152606a80546001810182555f91825292517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029094029384015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a52909201919091559051829184917fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f49190a35050565b610768611486565b5f81116107d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f616d6f756e7420746f206275726e206973207a65726f0000000000000000000060448201526064016105f4565b6107db3382611507565b50565b604080518082019091525f8082526020820152606a828154811061080457610804611b9f565b905f5260205f2090600202016040518060400160405290815f82015481526020016001820154815250509050919050565b61083d611486565b6108465f6116c3565b565b5f54610100900460ff161580801561086657505f54600160ff909116105b8061087f5750303b15801561087f57505f5460ff166001145b61090b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016105f4565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610967575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b60656109738782611c18565b5060666109808682611c18565b5061098b8484611739565b604080518082019091528281525f60208201818152606a8054600181018255925291517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5160029092029182015590517f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5290910155610a08846116c3565b6040515f9083907fbe80a5653ecb34691beafb0fb70004d50f9032b798f68a2f73a137c4f98ab3f4908390a38015610a96575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b60606066805461042990611afb565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610b4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6f6e6c792073797374656d20636f6e747261637420616c6c6f7765640000000060448201526064016105f4565b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bb6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bda9190611d30565b11610c67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f746865207370656369666965642074696d6520686173206e6f7420796574206260448201527f65656e207265616368656400000000000000000000000000000000000000000060648201526084016105f4565b606c54811015610cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616c6c20696e666c6174696f6e73206d696e746564000000000000000000000060448201526064016105f4565b606c545b818111610ec8575f606a5f81548110610cf257610cf2611b9f565b5f9182526020822060029091020154606a54909250610d1390600190611b8c565b90505b8015610d805782606a8281548110610d3057610d30611b9f565b905f5260205f2090600202016001015411610d6e57606a8181548110610d5857610d58611b9f565b905f5260205f2090600202015f01549150610d80565b80610d7881611d47565b915050610d16565b505f662386f26fc1000082606754610d989190611d7b565b610da29190611d92565b5f848152606b602052604090208190559050610dde7f000000000000000000000000000000000000000000000000000000000000000082611739565b6040517f91c05b0b000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906391c05b0b906024015f604051808303815f87803b158015610e63575f80fd5b505af1158015610e75573d5f803e3d5ffd5b50505050827f0d82c0920038b8dc7f633e18585f37092ba957b84876fcf833d6841f69eaa32782604051610eab91815260200190565b60405180910390a250508080610ec090611dca565b915050610cd7565b50610ed4816001611b79565b606c5550565b335f81815260696020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610f77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f64656372656173656420616c6c6f77616e63652062656c6f77207a65726f000060448201526064016105f4565b6104db8286868403611045565b5f336104b7818585611283565b610f99611486565b73ffffffffffffffffffffffffffffffffffffffff811661103c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105f4565b6107db816116c3565b73ffffffffffffffffffffffffffffffffffffffff83166110c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f206164647265737300000060448201526064016105f4565b73ffffffffffffffffffffffffffffffffffffffff821661113f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f617070726f766520746f20746865207a65726f2061646472657373000000000060448201526064016105f4565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181526069602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f908152606960209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461127d5781811015611270576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e63650000000000000000000060448201526064016105f4565b61127d8484848403611045565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316611300576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016105f4565b73ffffffffffffffffffffffffffffffffffffffff821661137d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016105f4565b73ffffffffffffffffffffffffffffffffffffffff83165f908152606860205260409020548181101561140c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016105f4565b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526068602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906114789086815260200190565b60405180910390a350505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610846576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f4565b73ffffffffffffffffffffffffffffffffffffffff82166115aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016105f4565b73ffffffffffffffffffffffffffffffffffffffff82165f908152606860205260409020548181101561165f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105f4565b73ffffffffffffffffffffffffffffffffffffffff83165f8181526068602090815260408083208686039055606780548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016111a0565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b73ffffffffffffffffffffffffffffffffffffffff82166117b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6d696e7420746f20746865207a65726f2061646472657373000000000000000060448201526064016105f4565b8060675f8282546117c79190611b79565b909155505073ffffffffffffffffffffffffffffffffffffffff82165f818152606860209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b818110156118585785810183015185820160400152820161183c565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146118b9575f80fd5b919050565b5f80604083850312156118cf575f80fd5b6118d883611896565b946020939093013593505050565b5f805f606084860312156118f8575f80fd5b61190184611896565b925061190f60208501611896565b9150604084013590509250925092565b5f8060408385031215611930575f80fd5b50508035926020909101359150565b5f6020828403121561194f575f80fd5b5035919050565b5f60208284031215611966575f80fd5b61196f82611896565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126119b2575f80fd5b813567ffffffffffffffff808211156119cd576119cd611976565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611a1357611a13611976565b81604052838152866020858801011115611a2b575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a08688031215611a5e575f80fd5b853567ffffffffffffffff80821115611a75575f80fd5b611a8189838a016119a3565b96506020880135915080821115611a96575f80fd5b50611aa3888289016119a3565b945050611ab260408701611896565b94979396509394606081013594506080013592915050565b5f8060408385031215611adb575f80fd5b611ae483611896565b9150611af260208401611896565b90509250929050565b600181811c90821680611b0f57607f821691505b602082108103611b46577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156104bd576104bd611b4c565b818103818111156104bd576104bd611b4c565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f821115611c1357805f5260205f20601f840160051c81016020851015611bf15750805b601f840160051c820191505b81811015611c10575f8155600101611bfd565b50505b505050565b815167ffffffffffffffff811115611c3257611c32611976565b611c4681611c408454611afb565b84611bcc565b602080601f831160018114611c98575f8415611c625750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610a96565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611ce457888601518255948401946001909101908401611cc5565b5085821015611d2057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215611d40575f80fd5b5051919050565b5f81611d5557611d55611b4c565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b80820281158282048414176104bd576104bd611b4c565b5f82611dc5577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611dfa57611dfa611b4c565b506001019056fea164736f6c6343000818000a" func init() { if err := json.Unmarshal([]byte(MorphTokenStorageLayoutJSON), MorphTokenStorageLayout); err != nil { diff --git a/bindings/bindings/record.go b/bindings/bindings/record.go deleted file mode 100644 index 606145dfd..000000000 --- a/bindings/bindings/record.go +++ /dev/null @@ -1,1726 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package bindings - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/morph-l2/go-ethereum" - "github.com/morph-l2/go-ethereum/accounts/abi" - "github.com/morph-l2/go-ethereum/accounts/abi/bind" - "github.com/morph-l2/go-ethereum/common" - "github.com/morph-l2/go-ethereum/core/types" - "github.com/morph-l2/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 -) - -// IRecordBatchSubmission is an auto generated low-level Go binding around an user-defined struct. -type IRecordBatchSubmission struct { - Index *big.Int - Submitter common.Address - StartBlock *big.Int - EndBlock *big.Int - RollupTime *big.Int - RollupBlock *big.Int -} - -// IRecordRewardEpochInfo is an auto generated low-level Go binding around an user-defined struct. -type IRecordRewardEpochInfo struct { - Index *big.Int - BlockCount *big.Int - Sequencers []common.Address - SequencerBlocks []*big.Int - SequencerRatios []*big.Int - SequencerCommissions []*big.Int -} - -// IRecordRollupEpochInfo is an auto generated low-level Go binding around an user-defined struct. -type IRecordRollupEpochInfo struct { - Index *big.Int - Submitter common.Address - StartTime *big.Int - EndTime *big.Int - EndBlock *big.Int -} - -// RecordMetaData contains all meta data concerning the Record contract. -var RecordMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dataLength\",\"type\":\"uint256\"}],\"name\":\"BatchSubmissionsUploaded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dataLength\",\"type\":\"uint256\"}],\"name\":\"RewardEpochsUploaded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dataLength\",\"type\":\"uint256\"}],\"name\":\"RollupEpochsUploaded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DISTRIBUTE_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOV_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_STAKING_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MORPH_TOKEN_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SEQUENCER_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchSubmissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rollupTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rollupBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"getBatchSubmissions\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rollupTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rollupBlock\",\"type\":\"uint256\"}],\"internalType\":\"structIRecord.BatchSubmission[]\",\"name\":\"res\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"getRewardEpochs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockCount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"sequencers\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sequencerBlocks\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sequencerRatios\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sequencerCommissions\",\"type\":\"uint256[]\"}],\"internalType\":\"structIRecord.RewardEpochInfo[]\",\"name\":\"res\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"getRollupEpochs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"}],\"internalType\":\"structIRecord.RollupEpochInfo[]\",\"name\":\"res\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_nextBatchSubmissionIndex\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestRewardEpochBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextBatchSubmissionIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextRewardEpochIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextRollupEpochIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rollupTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rollupBlock\",\"type\":\"uint256\"}],\"internalType\":\"structIRecord.BatchSubmission[]\",\"name\":\"_batchSubmissions\",\"type\":\"tuple[]\"}],\"name\":\"recordFinalizedBatchSubmissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockCount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"sequencers\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sequencerBlocks\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sequencerRatios\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sequencerCommissions\",\"type\":\"uint256[]\"}],\"internalType\":\"structIRecord.RewardEpochInfo[]\",\"name\":\"_rewardEpochs\",\"type\":\"tuple[]\"}],\"name\":\"recordRewardEpochs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"}],\"internalType\":\"structIRecord.RollupEpochInfo[]\",\"name\":\"_rollupEpochs\",\"type\":\"tuple[]\"}],\"name\":\"recordRollupEpochs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rewardEpochIndex\",\"type\":\"uint256\"}],\"name\":\"rewardEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rollupEpochIndex\",\"type\":\"uint256\"}],\"name\":\"rollupEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_latestBlock\",\"type\":\"uint256\"}],\"name\":\"setLatestRewardEpochBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"setOracleAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x61012060405234801562000011575f80fd5b5073530000000000000000000000000000000000001360805273530000000000000000000000000000000000001560a05273530000000000000000000000000000000000001760c05273530000000000000000000000000000000000001460e05273530000000000000000000000000000000000000461010052620000956200009b565b62000159565b5f54610100900460ff1615620001075760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161462000157575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805160a05160c05160e05161010051612c94620001b35f395f6102cf01525f81816101f90152611c5e01525f6103f601525f81816103b101526111b301525f8181610508015281816112cd01526118050152612c945ff3fe608060405234801561000f575f80fd5b506004361061019a575f3560e01c8063715018a6116100e85780638e21d5fb11610093578063cb6293e81161006e578063cb6293e8146104e3578063d557714114610503578063f2fde38b1461052a578063fe49dbc91461053d575f80fd5b80638e21d5fb146103f1578063a24231e814610418578063a795f409146104a8575f80fd5b80637dc0d1d0116100c35780637dc0d1d01461038c578063807de443146103ac5780638da5cb5b146103d3575f80fd5b8063715018a6146102c25780637828a905146102ca57806378f908e1146102f1575f80fd5b806341ed047f116101485780634e3ca406116101235780634e3ca4061461026f57806364b4abe31461028f5780636ea0396e146102af575f80fd5b806341ed047f14610240578063484f8d0f146102535780634c69c00f1461025c575f80fd5b80631794bb3c116101785780631794bb3c146101d85780632fbf6487146101eb5780633d9353fe146101f4575f80fd5b80630776c0f71461019e57806310c9873f146101ba5780631511e1b1146101cf575b5f80fd5b6101a7606c5481565b6040519081526020015b60405180910390f35b6101cd6101c83660046125b9565b610550565b005b6101a760695481565b6101cd6101e63660046125f8565b610676565b6101a7606b5481565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b1565b6101cd61024e366004612631565b61096c565b6101a7606a5481565b6101cd61026a3660046126a0565b610cab565b61028261027d3660046126c0565b610d5d565b6040516101b191906126e0565b6102a261029d3660046126c0565b610ef5565b6040516101b19190612763565b6101cd6102bd3660046127e3565b611096565b6101cd611d98565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b61034a6102ff3660046125b9565b60666020525f9081526040902080546001820154600283015460038401546004850154600590950154939473ffffffffffffffffffffffffffffffffffffffff909316939192909186565b6040805196875273ffffffffffffffffffffffffffffffffffffffff9095166020870152938501929092526060840152608083015260a082015260c0016101b1565b60655461021b9073ffffffffffffffffffffffffffffffffffffffff1681565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff1661021b565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b61046b6104263660046125b9565b60676020525f908152604090208054600182015460028301546003840154600490940154929373ffffffffffffffffffffffffffffffffffffffff9092169290919085565b6040805195865273ffffffffffffffffffffffffffffffffffffffff9094166020860152928401919091526060830152608082015260a0016101b1565b6104ce6104b63660046125b9565b60686020525f90815260409020805460019091015482565b604080519283526020830191909152016101b1565b6104f66104f13660046126c0565b611dab565b6040516101b1919061287a565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b6101cd6105383660046126a0565b61205f565b6101cd61054b3660046129a8565b6120fc565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105d25760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064015b60405180910390fd5b606c54156106225760405162461bcd60e51b815260206004820152600b60248201527f616c72656164792073657400000000000000000000000000000000000000000060448201526064016105c9565b5f81116106715760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206c617465737420626c6f636b00000000000000000000000060448201526064016105c9565b606c55565b5f54610100900460ff161580801561069457505f54600160ff909116105b806106ad5750303b1580156106ad57505f5460ff166001145b61071f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016105c9565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561077b575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff84166107de5760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e65722061646472657373000000000000000000000060448201526064016105c9565b815f036108535760405162461bcd60e51b815260206004820152602360248201527f696e76616c6964206e657874206261746368207375626d697373696f6e20696e60448201527f646578000000000000000000000000000000000000000000000000000000000060648201526084016105c9565b73ffffffffffffffffffffffffffffffffffffffff83166108b65760405162461bcd60e51b815260206004820152601660248201527f696e76616c6964206f7261636c6520616464726573730000000000000000000060448201526064016105c9565b6108bf84612407565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851617905560698290558015610966575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109e95760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105c9565b80610a365760405162461bcd60e51b815260206004820152601760248201527f656d707479206261746368207375626d697373696f6e7300000000000000000060448201526064016105c9565b5f5b81811015610c575780606954610a4e9190612a32565b838383818110610a6057610a60612a4b565b905060c002015f013514610ab65760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b6040518060c00160405280848484818110610ad357610ad3612a4b565b905060c002015f01358152602001848484818110610af357610af3612a4b565b905060c002016020016020810190610b0b91906126a0565b73ffffffffffffffffffffffffffffffffffffffff168152602001848484818110610b3857610b38612a4b565b905060c00201604001358152602001848484818110610b5957610b59612a4b565b905060c00201606001358152602001848484818110610b7a57610b7a612a4b565b905060c00201608001358152602001848484818110610b9b57610b9b612a4b565b905060c0020160a0013581525060665f858585818110610bbd57610bbd612a4b565b60c002919091013582525060208082019290925260409081015f208351815591830151600180840180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155908301516002830155606083015160038301556080830151600483015560a09092015160059091015501610a38565b506069546040518281527f1c517c9850aa84483b0b2434e58bab4c7967f0b1a34d8b18a6ad22436add010e9060200160405180910390a28181905060695f828254610ca29190612a32565b90915550505050565b610cb361247d565b73ffffffffffffffffffffffffffffffffffffffff8116610d165760405162461bcd60e51b815260206004820152601660248201527f696e76616c6964206f7261636c6520616464726573730000000000000000000060448201526064016105c9565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606082821015610daf5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b610db98383612a78565b610dc4906001612a32565b67ffffffffffffffff811115610ddc57610ddc612a8b565b604051908082528060200260200182016040528015610e5057816020015b610e3d6040518060a001604052805f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81525090565b815260200190600190039081610dfa5790505b509050825b828111610eee575f81815260676020908152604091829020825160a08101845281548152600182015473ffffffffffffffffffffffffffffffffffffffff16928101929092526002810154928201929092526003820154606082015260049091015460808201528251839083908110610ed057610ed0612a4b565b60200260200101819052508080610ee690612ab8565b915050610e55565b5092915050565b606082821015610f475760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b610f518383612a78565b610f5c906001612a32565b67ffffffffffffffff811115610f7457610f74612a8b565b604051908082528060200260200182016040528015610fee57816020015b610fdb6040518060c001604052805f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81526020015f81525090565b815260200190600190039081610f925790505b509050825b828111610eee575f81815260666020908152604091829020825160c08101845281548152600182015473ffffffffffffffffffffffffffffffffffffffff1692810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460a0820152825183908390811061107857611078612a4b565b6020026020010181905250808061108e90612ab8565b915050610ff3565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111135760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105c9565b806111605760405162461bcd60e51b815260206004820152601360248201527f656d707479207265776172642065706f6368730000000000000000000000000060448201526064016105c9565b5f606c54116111b15760405162461bcd60e51b815260206004820152601960248201527f737461727420626c6f636b2073686f756c64206265207365740000000000000060448201526064016105c9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa15801561121a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061123e9190612aef565b606b5460019061124f908490612a32565b6112599190612a78565b106112cb5760405162461bcd60e51b8152602060048201526024808201527f756e66696e69736865642065706f6368732063616e6e6f742062652075706c6f60448201527f616465640000000000000000000000000000000000000000000000000000000060648201526084016105c9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a29bfb2c600184849050606b5461131a9190612a32565b6113249190612a78565b6040518263ffffffff1660e01b815260040161134291815260200190565b5f604051808303815f87803b158015611359575f80fd5b505af115801561136b573d5f803e3d5ffd5b505f9250829150505b82811015611d2d575f84848381811061138f5761138f612a4b565b90506020028101906113a19190612b06565b6113af906040810190612b42565b905090505f8585848181106113c6576113c6612a4b565b90506020028101906113d89190612b06565b606b54903591506113ea908490612a32565b81146114385760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642065706f636820696e6465780000000000000000000000000060448201526064016105c9565b8186868581811061144b5761144b612a4b565b905060200281019061145d9190612b06565b61146b906060810190612b42565b90501480156114ac57508186868581811061148857611488612a4b565b905060200281019061149a9190612b06565b6114a8906080810190612b42565b9050145b80156114ea5750818686858181106114c6576114c6612a4b565b90506020028101906114d89190612b06565b6114e69060a0810190612b42565b9050145b6115365760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642064617461206c656e6774680000000000000000000000000060448201526064016105c9565b85858481811061154857611548612a4b565b905060200281019061155a9190612b06565b611568906020013585612a32565b93506040518060c0016040528082815260200187878681811061158d5761158d612a4b565b905060200281019061159f9190612b06565b6020013581526020018787868181106115ba576115ba612a4b565b90506020028101906115cc9190612b06565b6115da906040810190612b42565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525050509082525060200187878681811061162257611622612a4b565b90506020028101906116349190612b06565b611642906060810190612b42565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525050509082525060200187878681811061168a5761168a612a4b565b905060200281019061169c9190612b06565b6116aa906080810190612b42565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152505050908252506020018787868181106116f2576116f2612a4b565b90506020028101906117049190612b06565b6117129060a0810190612b42565b808060200260200160405190810160405280939291908181526020018383602002808284375f920182905250939094525050838152606860209081526040918290208451815584820151600182015591840151805192935061177d92600285019291909101906124e4565b506060820151805161179991600384019160209091019061256c565b50608082015180516117b591600484019160209091019061256c565b5060a082015180516117d191600584019160209091019061256c565b50506040517f944fa746000000000000000000000000000000000000000000000000000000008152600481018390525f91507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063944fa74690602401602060405180830381865afa15801561185f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118839190612aef565b90505f805f8567ffffffffffffffff8111156118a1576118a1612a8b565b6040519080825280602002602001820160405280156118ca578160200160208202803683370190505b5090505f8667ffffffffffffffff8111156118e7576118e7612a8b565b604051908082528060200260200182016040528015611910578160200160208202803683370190505b5090505f5b87811015611b915760148c8c8b81811061193157611931612a4b565b90506020028101906119439190612b06565b6119519060a0810190612b42565b8381811061196157611961612a4b565b9050602002013511156119b65760405162461bcd60e51b815260206004820152601d60248201527f696e76616c69642073657175656e6365727320636f6d6d697373696f6e00000060448201526064016105c9565b8b8b8a8181106119c8576119c8612a4b565b90506020028101906119da9190612b06565b6119e8906080810190612b42565b828181106119f8576119f8612a4b565b9050602002013584611a0a9190612a32565b93508b8b8a818110611a1e57611a1e612a4b565b9050602002810190611a309190612b06565b611a3e906060810190612b42565b82818110611a4e57611a4e612a4b565b9050602002013585611a609190612a32565b94505f6305f5e1008d8d8c818110611a7a57611a7a612a4b565b9050602002810190611a8c9190612b06565b611a9a906080810190612b42565b84818110611aaa57611aaa612a4b565b9050602002013588611abc9190612bad565b611ac69190612bc4565b905060648d8d8c818110611adc57611adc612a4b565b9050602002810190611aee9190612b06565b611afc9060a0810190612b42565b84818110611b0c57611b0c612a4b565b9050602002013582611b1e9190612bad565b611b289190612bc4565b838381518110611b3a57611b3a612a4b565b602002602001018181525050828281518110611b5857611b58612a4b565b602002602001015181611b6b9190612a78565b848381518110611b7d57611b7d612a4b565b602090810291909101015250600101611915565b508a8a89818110611ba457611ba4612a4b565b9050602002810190611bb69190612b06565b602001358414611c085760405162461bcd60e51b815260206004820152601960248201527f696e76616c69642073657175656e6365727320626c6f636b730000000000000060448201526064016105c9565b6305f5e100831115611c5c5760405162461bcd60e51b815260206004820152601960248201527f696e76616c69642073657175656e6365727320726174696f730000000000000060448201526064016105c9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cdd0c50e878d8d8c818110611cab57611cab612a4b565b9050602002810190611cbd9190612b06565b611ccb906040810190612b42565b86866040518663ffffffff1660e01b8152600401611ced959493929190612bfc565b5f604051808303815f87803b158015611d04575f80fd5b505af1158015611d16573d5f803e3d5ffd5b505060019099019850611374975050505050505050565b50606b546040518381527f4aa68efd05426e59a9d43654a55a2a74c3e8840894d6e291f8f83085e3a6d1ea9060200160405180910390a280606c5f828254611d759190612a32565b9091555050606b80548391905f90611d8e908490612a32565b9091555050505050565b611da061247d565b611da95f612407565b565b606082821015611dfd5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b611e078383612a78565b611e12906001612a32565b67ffffffffffffffff811115611e2a57611e2a612a8b565b604051908082528060200260200182016040528015611e9257816020015b611e7f6040518060c001604052805f81526020015f8152602001606081526020016060815260200160608152602001606081525090565b815260200190600190039081611e485790505b509050825b828111610eee575f81815260686020908152604091829020825160c0810184528154815260018201548184015260028201805485518186028101860187528181529295939493860193830182828015611f2457602002820191905f5260205f20905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611ef9575b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015611f7a57602002820191905f5260205f20905b815481526020019060010190808311611f66575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015611fd057602002820191905f5260205f20905b815481526020019060010190808311611fbc575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561202657602002820191905f5260205f20905b815481526020019060010190808311612012575b50505050508152505082828151811061204157612041612a4b565b6020026020010181905250808061205790612ab8565b915050611e97565b61206761247d565b73ffffffffffffffffffffffffffffffffffffffff81166120f05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105c9565b6120f981612407565b50565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146121795760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105c9565b806121c65760405162461bcd60e51b815260206004820152601360248201527f656d70747920726f6c6c75702065706f6368730000000000000000000000000060448201526064016105c9565b5f5b818110156123bc5780606a546121de9190612a32565b8383838181106121f0576121f0612a4b565b905060a002015f0135146122465760405162461bcd60e51b815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105c9565b6040518060a0016040528084848481811061226357612263612a4b565b905060a002015f0135815260200184848481811061228357612283612a4b565b905060a00201602001602081019061229b91906126a0565b73ffffffffffffffffffffffffffffffffffffffff1681526020018484848181106122c8576122c8612a4b565b905060a002016040013581526020018484848181106122e9576122e9612a4b565b905060a0020160600135815260200184848481811061230a5761230a612a4b565b905060a002016080013581525060675f85858581811061232c5761232c612a4b565b60a002919091013582525060208082019290925260409081015f208351815591830151600180840180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9093169290921790915590830151600283015560608301516003830155608090920151600490910155016121c8565b50606a546040518281527f0c53377f3eed25c9883c67adabc3f817b4fdcde29f550a6a26c0676ed29929299060200160405180910390a281819050606a5f828254610ca29190612a32565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60335473ffffffffffffffffffffffffffffffffffffffff163314611da95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105c9565b828054828255905f5260205f2090810192821561255c579160200282015b8281111561255c57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190612502565b506125689291506125a5565b5090565b828054828255905f5260205f2090810192821561255c579160200282015b8281111561255c57825182559160200191906001019061258a565b5b80821115612568575f81556001016125a6565b5f602082840312156125c9575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146125f3575f80fd5b919050565b5f805f6060848603121561260a575f80fd5b612613846125d0565b9250612621602085016125d0565b9150604084013590509250925092565b5f8060208385031215612642575f80fd5b823567ffffffffffffffff80821115612659575f80fd5b818501915085601f83011261266c575f80fd5b81358181111561267a575f80fd5b86602060c08302850101111561268e575f80fd5b60209290920196919550909350505050565b5f602082840312156126b0575f80fd5b6126b9826125d0565b9392505050565b5f80604083850312156126d1575f80fd5b50508035926020909101359150565b602080825282518282018190525f919060409081850190868401855b82811015612756578151805185528681015173ffffffffffffffffffffffffffffffffffffffff16878601528581015186860152606080820151908601526080908101519085015260a090930192908501906001016126fc565b5091979650505050505050565b602080825282518282018190525f919060409081850190868401855b82811015612756578151805185528681015173ffffffffffffffffffffffffffffffffffffffff16878601528581015186860152606080820151908601526080808201519086015260a0908101519085015260c0909301929085019060010161277f565b5f80602083850312156127f4575f80fd5b823567ffffffffffffffff8082111561280b575f80fd5b818501915085601f83011261281e575f80fd5b81358181111561282c575f80fd5b8660208260051b850101111561268e575f80fd5b5f815180845260208085019450602084015f5b8381101561286f57815187529582019590820190600101612853565b509495945050505050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b8381101561299a578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc001855281518051845287810151888501528681015160c0888601819052815190860181905260e08601918a01905f905b8082101561293357825173ffffffffffffffffffffffffffffffffffffffff168452928b0192918b0191600191909101906128fd565b5050506060808301518683038288015261294d8382612840565b92505050608080830151868303828801526129688382612840565b9250505060a080830151925085820381870152506129868183612840565b9689019694505050908601906001016128a1565b509098975050505050505050565b5f80602083850312156129b9575f80fd5b823567ffffffffffffffff808211156129d0575f80fd5b818501915085601f8301126129e3575f80fd5b8135818111156129f1575f80fd5b86602060a08302850101111561268e575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115612a4557612a45612a05565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81810381811115612a4557612a45612a05565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ae857612ae8612a05565b5060010190565b5f60208284031215612aff575f80fd5b5051919050565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41833603018112612b38575f80fd5b9190910192915050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612b75575f80fd5b83018035915067ffffffffffffffff821115612b8f575f80fd5b6020019150600581901b3603821315612ba6575f80fd5b9250929050565b8082028115828204841417612a4557612a45612a05565b5f82612bf7577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b858152608060208083018290529082018590525f90869060a08401835b88811015612c525773ffffffffffffffffffffffffffffffffffffffff612c3f856125d0565b1682529282019290820190600101612c19565b508481036040860152612c658188612840565b925050508281036060840152612c7b8185612840565b9897505050505050505056fea164736f6c6343000818000a", -} - -// RecordABI is the input ABI used to generate the binding from. -// Deprecated: Use RecordMetaData.ABI instead. -var RecordABI = RecordMetaData.ABI - -// RecordBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use RecordMetaData.Bin instead. -var RecordBin = RecordMetaData.Bin - -// DeployRecord deploys a new Ethereum contract, binding an instance of Record to it. -func DeployRecord(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Record, error) { - parsed, err := RecordMetaData.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(RecordBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Record{RecordCaller: RecordCaller{contract: contract}, RecordTransactor: RecordTransactor{contract: contract}, RecordFilterer: RecordFilterer{contract: contract}}, nil -} - -// Record is an auto generated Go binding around an Ethereum contract. -type Record struct { - RecordCaller // Read-only binding to the contract - RecordTransactor // Write-only binding to the contract - RecordFilterer // Log filterer for contract events -} - -// RecordCaller is an auto generated read-only Go binding around an Ethereum contract. -type RecordCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// RecordTransactor is an auto generated write-only Go binding around an Ethereum contract. -type RecordTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// RecordFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type RecordFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// RecordSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type RecordSession struct { - Contract *Record // 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 -} - -// RecordCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type RecordCallerSession struct { - Contract *RecordCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// RecordTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type RecordTransactorSession struct { - Contract *RecordTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// RecordRaw is an auto generated low-level Go binding around an Ethereum contract. -type RecordRaw struct { - Contract *Record // Generic contract binding to access the raw methods on -} - -// RecordCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type RecordCallerRaw struct { - Contract *RecordCaller // Generic read-only contract binding to access the raw methods on -} - -// RecordTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type RecordTransactorRaw struct { - Contract *RecordTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewRecord creates a new instance of Record, bound to a specific deployed contract. -func NewRecord(address common.Address, backend bind.ContractBackend) (*Record, error) { - contract, err := bindRecord(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Record{RecordCaller: RecordCaller{contract: contract}, RecordTransactor: RecordTransactor{contract: contract}, RecordFilterer: RecordFilterer{contract: contract}}, nil -} - -// NewRecordCaller creates a new read-only instance of Record, bound to a specific deployed contract. -func NewRecordCaller(address common.Address, caller bind.ContractCaller) (*RecordCaller, error) { - contract, err := bindRecord(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &RecordCaller{contract: contract}, nil -} - -// NewRecordTransactor creates a new write-only instance of Record, bound to a specific deployed contract. -func NewRecordTransactor(address common.Address, transactor bind.ContractTransactor) (*RecordTransactor, error) { - contract, err := bindRecord(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &RecordTransactor{contract: contract}, nil -} - -// NewRecordFilterer creates a new log filterer instance of Record, bound to a specific deployed contract. -func NewRecordFilterer(address common.Address, filterer bind.ContractFilterer) (*RecordFilterer, error) { - contract, err := bindRecord(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &RecordFilterer{contract: contract}, nil -} - -// bindRecord binds a generic wrapper to an already deployed contract. -func bindRecord(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := RecordMetaData.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 (_Record *RecordRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Record.Contract.RecordCaller.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 (_Record *RecordRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Record.Contract.RecordTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Record *RecordRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Record.Contract.RecordTransactor.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 (_Record *RecordCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Record.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 (_Record *RecordTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Record.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Record *RecordTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Record.Contract.contract.Transact(opts, method, params...) -} - -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_Record *RecordCaller) DISTRIBUTECONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "DISTRIBUTE_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_Record *RecordSession) DISTRIBUTECONTRACT() (common.Address, error) { - return _Record.Contract.DISTRIBUTECONTRACT(&_Record.CallOpts) -} - -// DISTRIBUTECONTRACT is a free data retrieval call binding the contract method 0x3d9353fe. -// -// Solidity: function DISTRIBUTE_CONTRACT() view returns(address) -func (_Record *RecordCallerSession) DISTRIBUTECONTRACT() (common.Address, error) { - return _Record.Contract.DISTRIBUTECONTRACT(&_Record.CallOpts) -} - -// GOVCONTRACT is a free data retrieval call binding the contract method 0x7828a905. -// -// Solidity: function GOV_CONTRACT() view returns(address) -func (_Record *RecordCaller) GOVCONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "GOV_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GOVCONTRACT is a free data retrieval call binding the contract method 0x7828a905. -// -// Solidity: function GOV_CONTRACT() view returns(address) -func (_Record *RecordSession) GOVCONTRACT() (common.Address, error) { - return _Record.Contract.GOVCONTRACT(&_Record.CallOpts) -} - -// GOVCONTRACT is a free data retrieval call binding the contract method 0x7828a905. -// -// Solidity: function GOV_CONTRACT() view returns(address) -func (_Record *RecordCallerSession) GOVCONTRACT() (common.Address, error) { - return _Record.Contract.GOVCONTRACT(&_Record.CallOpts) -} - -// L2STAKINGCONTRACT is a free data retrieval call binding the contract method 0x807de443. -// -// Solidity: function L2_STAKING_CONTRACT() view returns(address) -func (_Record *RecordCaller) L2STAKINGCONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "L2_STAKING_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// L2STAKINGCONTRACT is a free data retrieval call binding the contract method 0x807de443. -// -// Solidity: function L2_STAKING_CONTRACT() view returns(address) -func (_Record *RecordSession) L2STAKINGCONTRACT() (common.Address, error) { - return _Record.Contract.L2STAKINGCONTRACT(&_Record.CallOpts) -} - -// L2STAKINGCONTRACT is a free data retrieval call binding the contract method 0x807de443. -// -// Solidity: function L2_STAKING_CONTRACT() view returns(address) -func (_Record *RecordCallerSession) L2STAKINGCONTRACT() (common.Address, error) { - return _Record.Contract.L2STAKINGCONTRACT(&_Record.CallOpts) -} - -// MORPHTOKENCONTRACT is a free data retrieval call binding the contract method 0xd5577141. -// -// Solidity: function MORPH_TOKEN_CONTRACT() view returns(address) -func (_Record *RecordCaller) MORPHTOKENCONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "MORPH_TOKEN_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// MORPHTOKENCONTRACT is a free data retrieval call binding the contract method 0xd5577141. -// -// Solidity: function MORPH_TOKEN_CONTRACT() view returns(address) -func (_Record *RecordSession) MORPHTOKENCONTRACT() (common.Address, error) { - return _Record.Contract.MORPHTOKENCONTRACT(&_Record.CallOpts) -} - -// MORPHTOKENCONTRACT is a free data retrieval call binding the contract method 0xd5577141. -// -// Solidity: function MORPH_TOKEN_CONTRACT() view returns(address) -func (_Record *RecordCallerSession) MORPHTOKENCONTRACT() (common.Address, error) { - return _Record.Contract.MORPHTOKENCONTRACT(&_Record.CallOpts) -} - -// SEQUENCERCONTRACT is a free data retrieval call binding the contract method 0x8e21d5fb. -// -// Solidity: function SEQUENCER_CONTRACT() view returns(address) -func (_Record *RecordCaller) SEQUENCERCONTRACT(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "SEQUENCER_CONTRACT") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// SEQUENCERCONTRACT is a free data retrieval call binding the contract method 0x8e21d5fb. -// -// Solidity: function SEQUENCER_CONTRACT() view returns(address) -func (_Record *RecordSession) SEQUENCERCONTRACT() (common.Address, error) { - return _Record.Contract.SEQUENCERCONTRACT(&_Record.CallOpts) -} - -// SEQUENCERCONTRACT is a free data retrieval call binding the contract method 0x8e21d5fb. -// -// Solidity: function SEQUENCER_CONTRACT() view returns(address) -func (_Record *RecordCallerSession) SEQUENCERCONTRACT() (common.Address, error) { - return _Record.Contract.SEQUENCERCONTRACT(&_Record.CallOpts) -} - -// BatchSubmissions is a free data retrieval call binding the contract method 0x78f908e1. -// -// Solidity: function batchSubmissions(uint256 batchIndex) view returns(uint256 index, address submitter, uint256 startBlock, uint256 endBlock, uint256 rollupTime, uint256 rollupBlock) -func (_Record *RecordCaller) BatchSubmissions(opts *bind.CallOpts, batchIndex *big.Int) (struct { - Index *big.Int - Submitter common.Address - StartBlock *big.Int - EndBlock *big.Int - RollupTime *big.Int - RollupBlock *big.Int -}, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "batchSubmissions", batchIndex) - - outstruct := new(struct { - Index *big.Int - Submitter common.Address - StartBlock *big.Int - EndBlock *big.Int - RollupTime *big.Int - RollupBlock *big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Index = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.Submitter = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.StartBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.EndBlock = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.RollupTime = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - outstruct.RollupBlock = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -// BatchSubmissions is a free data retrieval call binding the contract method 0x78f908e1. -// -// Solidity: function batchSubmissions(uint256 batchIndex) view returns(uint256 index, address submitter, uint256 startBlock, uint256 endBlock, uint256 rollupTime, uint256 rollupBlock) -func (_Record *RecordSession) BatchSubmissions(batchIndex *big.Int) (struct { - Index *big.Int - Submitter common.Address - StartBlock *big.Int - EndBlock *big.Int - RollupTime *big.Int - RollupBlock *big.Int -}, error) { - return _Record.Contract.BatchSubmissions(&_Record.CallOpts, batchIndex) -} - -// BatchSubmissions is a free data retrieval call binding the contract method 0x78f908e1. -// -// Solidity: function batchSubmissions(uint256 batchIndex) view returns(uint256 index, address submitter, uint256 startBlock, uint256 endBlock, uint256 rollupTime, uint256 rollupBlock) -func (_Record *RecordCallerSession) BatchSubmissions(batchIndex *big.Int) (struct { - Index *big.Int - Submitter common.Address - StartBlock *big.Int - EndBlock *big.Int - RollupTime *big.Int - RollupBlock *big.Int -}, error) { - return _Record.Contract.BatchSubmissions(&_Record.CallOpts, batchIndex) -} - -// GetBatchSubmissions is a free data retrieval call binding the contract method 0x64b4abe3. -// -// Solidity: function getBatchSubmissions(uint256 start, uint256 end) view returns((uint256,address,uint256,uint256,uint256,uint256)[] res) -func (_Record *RecordCaller) GetBatchSubmissions(opts *bind.CallOpts, start *big.Int, end *big.Int) ([]IRecordBatchSubmission, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "getBatchSubmissions", start, end) - - if err != nil { - return *new([]IRecordBatchSubmission), err - } - - out0 := *abi.ConvertType(out[0], new([]IRecordBatchSubmission)).(*[]IRecordBatchSubmission) - - return out0, err - -} - -// GetBatchSubmissions is a free data retrieval call binding the contract method 0x64b4abe3. -// -// Solidity: function getBatchSubmissions(uint256 start, uint256 end) view returns((uint256,address,uint256,uint256,uint256,uint256)[] res) -func (_Record *RecordSession) GetBatchSubmissions(start *big.Int, end *big.Int) ([]IRecordBatchSubmission, error) { - return _Record.Contract.GetBatchSubmissions(&_Record.CallOpts, start, end) -} - -// GetBatchSubmissions is a free data retrieval call binding the contract method 0x64b4abe3. -// -// Solidity: function getBatchSubmissions(uint256 start, uint256 end) view returns((uint256,address,uint256,uint256,uint256,uint256)[] res) -func (_Record *RecordCallerSession) GetBatchSubmissions(start *big.Int, end *big.Int) ([]IRecordBatchSubmission, error) { - return _Record.Contract.GetBatchSubmissions(&_Record.CallOpts, start, end) -} - -// GetRewardEpochs is a free data retrieval call binding the contract method 0xcb6293e8. -// -// Solidity: function getRewardEpochs(uint256 start, uint256 end) view returns((uint256,uint256,address[],uint256[],uint256[],uint256[])[] res) -func (_Record *RecordCaller) GetRewardEpochs(opts *bind.CallOpts, start *big.Int, end *big.Int) ([]IRecordRewardEpochInfo, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "getRewardEpochs", start, end) - - if err != nil { - return *new([]IRecordRewardEpochInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IRecordRewardEpochInfo)).(*[]IRecordRewardEpochInfo) - - return out0, err - -} - -// GetRewardEpochs is a free data retrieval call binding the contract method 0xcb6293e8. -// -// Solidity: function getRewardEpochs(uint256 start, uint256 end) view returns((uint256,uint256,address[],uint256[],uint256[],uint256[])[] res) -func (_Record *RecordSession) GetRewardEpochs(start *big.Int, end *big.Int) ([]IRecordRewardEpochInfo, error) { - return _Record.Contract.GetRewardEpochs(&_Record.CallOpts, start, end) -} - -// GetRewardEpochs is a free data retrieval call binding the contract method 0xcb6293e8. -// -// Solidity: function getRewardEpochs(uint256 start, uint256 end) view returns((uint256,uint256,address[],uint256[],uint256[],uint256[])[] res) -func (_Record *RecordCallerSession) GetRewardEpochs(start *big.Int, end *big.Int) ([]IRecordRewardEpochInfo, error) { - return _Record.Contract.GetRewardEpochs(&_Record.CallOpts, start, end) -} - -// GetRollupEpochs is a free data retrieval call binding the contract method 0x4e3ca406. -// -// Solidity: function getRollupEpochs(uint256 start, uint256 end) view returns((uint256,address,uint256,uint256,uint256)[] res) -func (_Record *RecordCaller) GetRollupEpochs(opts *bind.CallOpts, start *big.Int, end *big.Int) ([]IRecordRollupEpochInfo, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "getRollupEpochs", start, end) - - if err != nil { - return *new([]IRecordRollupEpochInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IRecordRollupEpochInfo)).(*[]IRecordRollupEpochInfo) - - return out0, err - -} - -// GetRollupEpochs is a free data retrieval call binding the contract method 0x4e3ca406. -// -// Solidity: function getRollupEpochs(uint256 start, uint256 end) view returns((uint256,address,uint256,uint256,uint256)[] res) -func (_Record *RecordSession) GetRollupEpochs(start *big.Int, end *big.Int) ([]IRecordRollupEpochInfo, error) { - return _Record.Contract.GetRollupEpochs(&_Record.CallOpts, start, end) -} - -// GetRollupEpochs is a free data retrieval call binding the contract method 0x4e3ca406. -// -// Solidity: function getRollupEpochs(uint256 start, uint256 end) view returns((uint256,address,uint256,uint256,uint256)[] res) -func (_Record *RecordCallerSession) GetRollupEpochs(start *big.Int, end *big.Int) ([]IRecordRollupEpochInfo, error) { - return _Record.Contract.GetRollupEpochs(&_Record.CallOpts, start, end) -} - -// LatestRewardEpochBlock is a free data retrieval call binding the contract method 0x0776c0f7. -// -// Solidity: function latestRewardEpochBlock() view returns(uint256) -func (_Record *RecordCaller) LatestRewardEpochBlock(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "latestRewardEpochBlock") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// LatestRewardEpochBlock is a free data retrieval call binding the contract method 0x0776c0f7. -// -// Solidity: function latestRewardEpochBlock() view returns(uint256) -func (_Record *RecordSession) LatestRewardEpochBlock() (*big.Int, error) { - return _Record.Contract.LatestRewardEpochBlock(&_Record.CallOpts) -} - -// LatestRewardEpochBlock is a free data retrieval call binding the contract method 0x0776c0f7. -// -// Solidity: function latestRewardEpochBlock() view returns(uint256) -func (_Record *RecordCallerSession) LatestRewardEpochBlock() (*big.Int, error) { - return _Record.Contract.LatestRewardEpochBlock(&_Record.CallOpts) -} - -// NextBatchSubmissionIndex is a free data retrieval call binding the contract method 0x1511e1b1. -// -// Solidity: function nextBatchSubmissionIndex() view returns(uint256) -func (_Record *RecordCaller) NextBatchSubmissionIndex(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "nextBatchSubmissionIndex") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// NextBatchSubmissionIndex is a free data retrieval call binding the contract method 0x1511e1b1. -// -// Solidity: function nextBatchSubmissionIndex() view returns(uint256) -func (_Record *RecordSession) NextBatchSubmissionIndex() (*big.Int, error) { - return _Record.Contract.NextBatchSubmissionIndex(&_Record.CallOpts) -} - -// NextBatchSubmissionIndex is a free data retrieval call binding the contract method 0x1511e1b1. -// -// Solidity: function nextBatchSubmissionIndex() view returns(uint256) -func (_Record *RecordCallerSession) NextBatchSubmissionIndex() (*big.Int, error) { - return _Record.Contract.NextBatchSubmissionIndex(&_Record.CallOpts) -} - -// NextRewardEpochIndex is a free data retrieval call binding the contract method 0x2fbf6487. -// -// Solidity: function nextRewardEpochIndex() view returns(uint256) -func (_Record *RecordCaller) NextRewardEpochIndex(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "nextRewardEpochIndex") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// NextRewardEpochIndex is a free data retrieval call binding the contract method 0x2fbf6487. -// -// Solidity: function nextRewardEpochIndex() view returns(uint256) -func (_Record *RecordSession) NextRewardEpochIndex() (*big.Int, error) { - return _Record.Contract.NextRewardEpochIndex(&_Record.CallOpts) -} - -// NextRewardEpochIndex is a free data retrieval call binding the contract method 0x2fbf6487. -// -// Solidity: function nextRewardEpochIndex() view returns(uint256) -func (_Record *RecordCallerSession) NextRewardEpochIndex() (*big.Int, error) { - return _Record.Contract.NextRewardEpochIndex(&_Record.CallOpts) -} - -// NextRollupEpochIndex is a free data retrieval call binding the contract method 0x484f8d0f. -// -// Solidity: function nextRollupEpochIndex() view returns(uint256) -func (_Record *RecordCaller) NextRollupEpochIndex(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "nextRollupEpochIndex") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// NextRollupEpochIndex is a free data retrieval call binding the contract method 0x484f8d0f. -// -// Solidity: function nextRollupEpochIndex() view returns(uint256) -func (_Record *RecordSession) NextRollupEpochIndex() (*big.Int, error) { - return _Record.Contract.NextRollupEpochIndex(&_Record.CallOpts) -} - -// NextRollupEpochIndex is a free data retrieval call binding the contract method 0x484f8d0f. -// -// Solidity: function nextRollupEpochIndex() view returns(uint256) -func (_Record *RecordCallerSession) NextRollupEpochIndex() (*big.Int, error) { - return _Record.Contract.NextRollupEpochIndex(&_Record.CallOpts) -} - -// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0. -// -// Solidity: function oracle() view returns(address) -func (_Record *RecordCaller) Oracle(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "oracle") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0. -// -// Solidity: function oracle() view returns(address) -func (_Record *RecordSession) Oracle() (common.Address, error) { - return _Record.Contract.Oracle(&_Record.CallOpts) -} - -// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0. -// -// Solidity: function oracle() view returns(address) -func (_Record *RecordCallerSession) Oracle() (common.Address, error) { - return _Record.Contract.Oracle(&_Record.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Record *RecordCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Record.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 (_Record *RecordSession) Owner() (common.Address, error) { - return _Record.Contract.Owner(&_Record.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Record *RecordCallerSession) Owner() (common.Address, error) { - return _Record.Contract.Owner(&_Record.CallOpts) -} - -// RewardEpochs is a free data retrieval call binding the contract method 0xa795f409. -// -// Solidity: function rewardEpochs(uint256 rewardEpochIndex) view returns(uint256 index, uint256 blockCount) -func (_Record *RecordCaller) RewardEpochs(opts *bind.CallOpts, rewardEpochIndex *big.Int) (struct { - Index *big.Int - BlockCount *big.Int -}, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "rewardEpochs", rewardEpochIndex) - - outstruct := new(struct { - Index *big.Int - BlockCount *big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Index = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.BlockCount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -// RewardEpochs is a free data retrieval call binding the contract method 0xa795f409. -// -// Solidity: function rewardEpochs(uint256 rewardEpochIndex) view returns(uint256 index, uint256 blockCount) -func (_Record *RecordSession) RewardEpochs(rewardEpochIndex *big.Int) (struct { - Index *big.Int - BlockCount *big.Int -}, error) { - return _Record.Contract.RewardEpochs(&_Record.CallOpts, rewardEpochIndex) -} - -// RewardEpochs is a free data retrieval call binding the contract method 0xa795f409. -// -// Solidity: function rewardEpochs(uint256 rewardEpochIndex) view returns(uint256 index, uint256 blockCount) -func (_Record *RecordCallerSession) RewardEpochs(rewardEpochIndex *big.Int) (struct { - Index *big.Int - BlockCount *big.Int -}, error) { - return _Record.Contract.RewardEpochs(&_Record.CallOpts, rewardEpochIndex) -} - -// RollupEpochs is a free data retrieval call binding the contract method 0xa24231e8. -// -// Solidity: function rollupEpochs(uint256 rollupEpochIndex) view returns(uint256 index, address submitter, uint256 startTime, uint256 endTime, uint256 endBlock) -func (_Record *RecordCaller) RollupEpochs(opts *bind.CallOpts, rollupEpochIndex *big.Int) (struct { - Index *big.Int - Submitter common.Address - StartTime *big.Int - EndTime *big.Int - EndBlock *big.Int -}, error) { - var out []interface{} - err := _Record.contract.Call(opts, &out, "rollupEpochs", rollupEpochIndex) - - outstruct := new(struct { - Index *big.Int - Submitter common.Address - StartTime *big.Int - EndTime *big.Int - EndBlock *big.Int - }) - if err != nil { - return *outstruct, err - } - - outstruct.Index = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.Submitter = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.StartTime = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.EndTime = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.EndBlock = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -// RollupEpochs is a free data retrieval call binding the contract method 0xa24231e8. -// -// Solidity: function rollupEpochs(uint256 rollupEpochIndex) view returns(uint256 index, address submitter, uint256 startTime, uint256 endTime, uint256 endBlock) -func (_Record *RecordSession) RollupEpochs(rollupEpochIndex *big.Int) (struct { - Index *big.Int - Submitter common.Address - StartTime *big.Int - EndTime *big.Int - EndBlock *big.Int -}, error) { - return _Record.Contract.RollupEpochs(&_Record.CallOpts, rollupEpochIndex) -} - -// RollupEpochs is a free data retrieval call binding the contract method 0xa24231e8. -// -// Solidity: function rollupEpochs(uint256 rollupEpochIndex) view returns(uint256 index, address submitter, uint256 startTime, uint256 endTime, uint256 endBlock) -func (_Record *RecordCallerSession) RollupEpochs(rollupEpochIndex *big.Int) (struct { - Index *big.Int - Submitter common.Address - StartTime *big.Int - EndTime *big.Int - EndBlock *big.Int -}, error) { - return _Record.Contract.RollupEpochs(&_Record.CallOpts, rollupEpochIndex) -} - -// Initialize is a paid mutator transaction binding the contract method 0x1794bb3c. -// -// Solidity: function initialize(address _owner, address _oracle, uint256 _nextBatchSubmissionIndex) returns() -func (_Record *RecordTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address, _oracle common.Address, _nextBatchSubmissionIndex *big.Int) (*types.Transaction, error) { - return _Record.contract.Transact(opts, "initialize", _owner, _oracle, _nextBatchSubmissionIndex) -} - -// Initialize is a paid mutator transaction binding the contract method 0x1794bb3c. -// -// Solidity: function initialize(address _owner, address _oracle, uint256 _nextBatchSubmissionIndex) returns() -func (_Record *RecordSession) Initialize(_owner common.Address, _oracle common.Address, _nextBatchSubmissionIndex *big.Int) (*types.Transaction, error) { - return _Record.Contract.Initialize(&_Record.TransactOpts, _owner, _oracle, _nextBatchSubmissionIndex) -} - -// Initialize is a paid mutator transaction binding the contract method 0x1794bb3c. -// -// Solidity: function initialize(address _owner, address _oracle, uint256 _nextBatchSubmissionIndex) returns() -func (_Record *RecordTransactorSession) Initialize(_owner common.Address, _oracle common.Address, _nextBatchSubmissionIndex *big.Int) (*types.Transaction, error) { - return _Record.Contract.Initialize(&_Record.TransactOpts, _owner, _oracle, _nextBatchSubmissionIndex) -} - -// RecordFinalizedBatchSubmissions is a paid mutator transaction binding the contract method 0x41ed047f. -// -// Solidity: function recordFinalizedBatchSubmissions((uint256,address,uint256,uint256,uint256,uint256)[] _batchSubmissions) returns() -func (_Record *RecordTransactor) RecordFinalizedBatchSubmissions(opts *bind.TransactOpts, _batchSubmissions []IRecordBatchSubmission) (*types.Transaction, error) { - return _Record.contract.Transact(opts, "recordFinalizedBatchSubmissions", _batchSubmissions) -} - -// RecordFinalizedBatchSubmissions is a paid mutator transaction binding the contract method 0x41ed047f. -// -// Solidity: function recordFinalizedBatchSubmissions((uint256,address,uint256,uint256,uint256,uint256)[] _batchSubmissions) returns() -func (_Record *RecordSession) RecordFinalizedBatchSubmissions(_batchSubmissions []IRecordBatchSubmission) (*types.Transaction, error) { - return _Record.Contract.RecordFinalizedBatchSubmissions(&_Record.TransactOpts, _batchSubmissions) -} - -// RecordFinalizedBatchSubmissions is a paid mutator transaction binding the contract method 0x41ed047f. -// -// Solidity: function recordFinalizedBatchSubmissions((uint256,address,uint256,uint256,uint256,uint256)[] _batchSubmissions) returns() -func (_Record *RecordTransactorSession) RecordFinalizedBatchSubmissions(_batchSubmissions []IRecordBatchSubmission) (*types.Transaction, error) { - return _Record.Contract.RecordFinalizedBatchSubmissions(&_Record.TransactOpts, _batchSubmissions) -} - -// RecordRewardEpochs is a paid mutator transaction binding the contract method 0x6ea0396e. -// -// Solidity: function recordRewardEpochs((uint256,uint256,address[],uint256[],uint256[],uint256[])[] _rewardEpochs) returns() -func (_Record *RecordTransactor) RecordRewardEpochs(opts *bind.TransactOpts, _rewardEpochs []IRecordRewardEpochInfo) (*types.Transaction, error) { - return _Record.contract.Transact(opts, "recordRewardEpochs", _rewardEpochs) -} - -// RecordRewardEpochs is a paid mutator transaction binding the contract method 0x6ea0396e. -// -// Solidity: function recordRewardEpochs((uint256,uint256,address[],uint256[],uint256[],uint256[])[] _rewardEpochs) returns() -func (_Record *RecordSession) RecordRewardEpochs(_rewardEpochs []IRecordRewardEpochInfo) (*types.Transaction, error) { - return _Record.Contract.RecordRewardEpochs(&_Record.TransactOpts, _rewardEpochs) -} - -// RecordRewardEpochs is a paid mutator transaction binding the contract method 0x6ea0396e. -// -// Solidity: function recordRewardEpochs((uint256,uint256,address[],uint256[],uint256[],uint256[])[] _rewardEpochs) returns() -func (_Record *RecordTransactorSession) RecordRewardEpochs(_rewardEpochs []IRecordRewardEpochInfo) (*types.Transaction, error) { - return _Record.Contract.RecordRewardEpochs(&_Record.TransactOpts, _rewardEpochs) -} - -// RecordRollupEpochs is a paid mutator transaction binding the contract method 0xfe49dbc9. -// -// Solidity: function recordRollupEpochs((uint256,address,uint256,uint256,uint256)[] _rollupEpochs) returns() -func (_Record *RecordTransactor) RecordRollupEpochs(opts *bind.TransactOpts, _rollupEpochs []IRecordRollupEpochInfo) (*types.Transaction, error) { - return _Record.contract.Transact(opts, "recordRollupEpochs", _rollupEpochs) -} - -// RecordRollupEpochs is a paid mutator transaction binding the contract method 0xfe49dbc9. -// -// Solidity: function recordRollupEpochs((uint256,address,uint256,uint256,uint256)[] _rollupEpochs) returns() -func (_Record *RecordSession) RecordRollupEpochs(_rollupEpochs []IRecordRollupEpochInfo) (*types.Transaction, error) { - return _Record.Contract.RecordRollupEpochs(&_Record.TransactOpts, _rollupEpochs) -} - -// RecordRollupEpochs is a paid mutator transaction binding the contract method 0xfe49dbc9. -// -// Solidity: function recordRollupEpochs((uint256,address,uint256,uint256,uint256)[] _rollupEpochs) returns() -func (_Record *RecordTransactorSession) RecordRollupEpochs(_rollupEpochs []IRecordRollupEpochInfo) (*types.Transaction, error) { - return _Record.Contract.RecordRollupEpochs(&_Record.TransactOpts, _rollupEpochs) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Record *RecordTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Record.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Record *RecordSession) RenounceOwnership() (*types.Transaction, error) { - return _Record.Contract.RenounceOwnership(&_Record.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Record *RecordTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Record.Contract.RenounceOwnership(&_Record.TransactOpts) -} - -// SetLatestRewardEpochBlock is a paid mutator transaction binding the contract method 0x10c9873f. -// -// Solidity: function setLatestRewardEpochBlock(uint256 _latestBlock) returns() -func (_Record *RecordTransactor) SetLatestRewardEpochBlock(opts *bind.TransactOpts, _latestBlock *big.Int) (*types.Transaction, error) { - return _Record.contract.Transact(opts, "setLatestRewardEpochBlock", _latestBlock) -} - -// SetLatestRewardEpochBlock is a paid mutator transaction binding the contract method 0x10c9873f. -// -// Solidity: function setLatestRewardEpochBlock(uint256 _latestBlock) returns() -func (_Record *RecordSession) SetLatestRewardEpochBlock(_latestBlock *big.Int) (*types.Transaction, error) { - return _Record.Contract.SetLatestRewardEpochBlock(&_Record.TransactOpts, _latestBlock) -} - -// SetLatestRewardEpochBlock is a paid mutator transaction binding the contract method 0x10c9873f. -// -// Solidity: function setLatestRewardEpochBlock(uint256 _latestBlock) returns() -func (_Record *RecordTransactorSession) SetLatestRewardEpochBlock(_latestBlock *big.Int) (*types.Transaction, error) { - return _Record.Contract.SetLatestRewardEpochBlock(&_Record.TransactOpts, _latestBlock) -} - -// SetOracleAddress is a paid mutator transaction binding the contract method 0x4c69c00f. -// -// Solidity: function setOracleAddress(address _oracle) returns() -func (_Record *RecordTransactor) SetOracleAddress(opts *bind.TransactOpts, _oracle common.Address) (*types.Transaction, error) { - return _Record.contract.Transact(opts, "setOracleAddress", _oracle) -} - -// SetOracleAddress is a paid mutator transaction binding the contract method 0x4c69c00f. -// -// Solidity: function setOracleAddress(address _oracle) returns() -func (_Record *RecordSession) SetOracleAddress(_oracle common.Address) (*types.Transaction, error) { - return _Record.Contract.SetOracleAddress(&_Record.TransactOpts, _oracle) -} - -// SetOracleAddress is a paid mutator transaction binding the contract method 0x4c69c00f. -// -// Solidity: function setOracleAddress(address _oracle) returns() -func (_Record *RecordTransactorSession) SetOracleAddress(_oracle common.Address) (*types.Transaction, error) { - return _Record.Contract.SetOracleAddress(&_Record.TransactOpts, _oracle) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Record *RecordTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Record.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Record *RecordSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Record.Contract.TransferOwnership(&_Record.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Record *RecordTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Record.Contract.TransferOwnership(&_Record.TransactOpts, newOwner) -} - -// RecordBatchSubmissionsUploadedIterator is returned from FilterBatchSubmissionsUploaded and is used to iterate over the raw logs and unpacked data for BatchSubmissionsUploaded events raised by the Record contract. -type RecordBatchSubmissionsUploadedIterator struct { - Event *RecordBatchSubmissionsUploaded // 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 *RecordBatchSubmissionsUploadedIterator) 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(RecordBatchSubmissionsUploaded) - 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(RecordBatchSubmissionsUploaded) - 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 *RecordBatchSubmissionsUploadedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RecordBatchSubmissionsUploadedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RecordBatchSubmissionsUploaded represents a BatchSubmissionsUploaded event raised by the Record contract. -type RecordBatchSubmissionsUploaded struct { - StartIndex *big.Int - DataLength *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBatchSubmissionsUploaded is a free log retrieval operation binding the contract event 0x1c517c9850aa84483b0b2434e58bab4c7967f0b1a34d8b18a6ad22436add010e. -// -// Solidity: event BatchSubmissionsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) FilterBatchSubmissionsUploaded(opts *bind.FilterOpts, startIndex []*big.Int) (*RecordBatchSubmissionsUploadedIterator, error) { - - var startIndexRule []interface{} - for _, startIndexItem := range startIndex { - startIndexRule = append(startIndexRule, startIndexItem) - } - - logs, sub, err := _Record.contract.FilterLogs(opts, "BatchSubmissionsUploaded", startIndexRule) - if err != nil { - return nil, err - } - return &RecordBatchSubmissionsUploadedIterator{contract: _Record.contract, event: "BatchSubmissionsUploaded", logs: logs, sub: sub}, nil -} - -// WatchBatchSubmissionsUploaded is a free log subscription operation binding the contract event 0x1c517c9850aa84483b0b2434e58bab4c7967f0b1a34d8b18a6ad22436add010e. -// -// Solidity: event BatchSubmissionsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) WatchBatchSubmissionsUploaded(opts *bind.WatchOpts, sink chan<- *RecordBatchSubmissionsUploaded, startIndex []*big.Int) (event.Subscription, error) { - - var startIndexRule []interface{} - for _, startIndexItem := range startIndex { - startIndexRule = append(startIndexRule, startIndexItem) - } - - logs, sub, err := _Record.contract.WatchLogs(opts, "BatchSubmissionsUploaded", startIndexRule) - 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(RecordBatchSubmissionsUploaded) - if err := _Record.contract.UnpackLog(event, "BatchSubmissionsUploaded", 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 -} - -// ParseBatchSubmissionsUploaded is a log parse operation binding the contract event 0x1c517c9850aa84483b0b2434e58bab4c7967f0b1a34d8b18a6ad22436add010e. -// -// Solidity: event BatchSubmissionsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) ParseBatchSubmissionsUploaded(log types.Log) (*RecordBatchSubmissionsUploaded, error) { - event := new(RecordBatchSubmissionsUploaded) - if err := _Record.contract.UnpackLog(event, "BatchSubmissionsUploaded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RecordInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Record contract. -type RecordInitializedIterator struct { - Event *RecordInitialized // 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 *RecordInitializedIterator) 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(RecordInitialized) - 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(RecordInitialized) - 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 *RecordInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RecordInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RecordInitialized represents a Initialized event raised by the Record contract. -type RecordInitialized 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 (_Record *RecordFilterer) FilterInitialized(opts *bind.FilterOpts) (*RecordInitializedIterator, error) { - - logs, sub, err := _Record.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &RecordInitializedIterator{contract: _Record.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 (_Record *RecordFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *RecordInitialized) (event.Subscription, error) { - - logs, sub, err := _Record.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(RecordInitialized) - if err := _Record.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 (_Record *RecordFilterer) ParseInitialized(log types.Log) (*RecordInitialized, error) { - event := new(RecordInitialized) - if err := _Record.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RecordOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Record contract. -type RecordOwnershipTransferredIterator struct { - Event *RecordOwnershipTransferred // 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 *RecordOwnershipTransferredIterator) 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(RecordOwnershipTransferred) - 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(RecordOwnershipTransferred) - 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 *RecordOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RecordOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RecordOwnershipTransferred represents a OwnershipTransferred event raised by the Record contract. -type RecordOwnershipTransferred 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 (_Record *RecordFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*RecordOwnershipTransferredIterator, 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 := _Record.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &RecordOwnershipTransferredIterator{contract: _Record.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 (_Record *RecordFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *RecordOwnershipTransferred, 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 := _Record.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(RecordOwnershipTransferred) - if err := _Record.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 (_Record *RecordFilterer) ParseOwnershipTransferred(log types.Log) (*RecordOwnershipTransferred, error) { - event := new(RecordOwnershipTransferred) - if err := _Record.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RecordRewardEpochsUploadedIterator is returned from FilterRewardEpochsUploaded and is used to iterate over the raw logs and unpacked data for RewardEpochsUploaded events raised by the Record contract. -type RecordRewardEpochsUploadedIterator struct { - Event *RecordRewardEpochsUploaded // 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 *RecordRewardEpochsUploadedIterator) 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(RecordRewardEpochsUploaded) - 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(RecordRewardEpochsUploaded) - 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 *RecordRewardEpochsUploadedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RecordRewardEpochsUploadedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RecordRewardEpochsUploaded represents a RewardEpochsUploaded event raised by the Record contract. -type RecordRewardEpochsUploaded struct { - StartIndex *big.Int - DataLength *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRewardEpochsUploaded is a free log retrieval operation binding the contract event 0x4aa68efd05426e59a9d43654a55a2a74c3e8840894d6e291f8f83085e3a6d1ea. -// -// Solidity: event RewardEpochsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) FilterRewardEpochsUploaded(opts *bind.FilterOpts, startIndex []*big.Int) (*RecordRewardEpochsUploadedIterator, error) { - - var startIndexRule []interface{} - for _, startIndexItem := range startIndex { - startIndexRule = append(startIndexRule, startIndexItem) - } - - logs, sub, err := _Record.contract.FilterLogs(opts, "RewardEpochsUploaded", startIndexRule) - if err != nil { - return nil, err - } - return &RecordRewardEpochsUploadedIterator{contract: _Record.contract, event: "RewardEpochsUploaded", logs: logs, sub: sub}, nil -} - -// WatchRewardEpochsUploaded is a free log subscription operation binding the contract event 0x4aa68efd05426e59a9d43654a55a2a74c3e8840894d6e291f8f83085e3a6d1ea. -// -// Solidity: event RewardEpochsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) WatchRewardEpochsUploaded(opts *bind.WatchOpts, sink chan<- *RecordRewardEpochsUploaded, startIndex []*big.Int) (event.Subscription, error) { - - var startIndexRule []interface{} - for _, startIndexItem := range startIndex { - startIndexRule = append(startIndexRule, startIndexItem) - } - - logs, sub, err := _Record.contract.WatchLogs(opts, "RewardEpochsUploaded", startIndexRule) - 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(RecordRewardEpochsUploaded) - if err := _Record.contract.UnpackLog(event, "RewardEpochsUploaded", 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 -} - -// ParseRewardEpochsUploaded is a log parse operation binding the contract event 0x4aa68efd05426e59a9d43654a55a2a74c3e8840894d6e291f8f83085e3a6d1ea. -// -// Solidity: event RewardEpochsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) ParseRewardEpochsUploaded(log types.Log) (*RecordRewardEpochsUploaded, error) { - event := new(RecordRewardEpochsUploaded) - if err := _Record.contract.UnpackLog(event, "RewardEpochsUploaded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RecordRollupEpochsUploadedIterator is returned from FilterRollupEpochsUploaded and is used to iterate over the raw logs and unpacked data for RollupEpochsUploaded events raised by the Record contract. -type RecordRollupEpochsUploadedIterator struct { - Event *RecordRollupEpochsUploaded // 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 *RecordRollupEpochsUploadedIterator) 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(RecordRollupEpochsUploaded) - 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(RecordRollupEpochsUploaded) - 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 *RecordRollupEpochsUploadedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RecordRollupEpochsUploadedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RecordRollupEpochsUploaded represents a RollupEpochsUploaded event raised by the Record contract. -type RecordRollupEpochsUploaded struct { - StartIndex *big.Int - DataLength *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRollupEpochsUploaded is a free log retrieval operation binding the contract event 0x0c53377f3eed25c9883c67adabc3f817b4fdcde29f550a6a26c0676ed2992929. -// -// Solidity: event RollupEpochsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) FilterRollupEpochsUploaded(opts *bind.FilterOpts, startIndex []*big.Int) (*RecordRollupEpochsUploadedIterator, error) { - - var startIndexRule []interface{} - for _, startIndexItem := range startIndex { - startIndexRule = append(startIndexRule, startIndexItem) - } - - logs, sub, err := _Record.contract.FilterLogs(opts, "RollupEpochsUploaded", startIndexRule) - if err != nil { - return nil, err - } - return &RecordRollupEpochsUploadedIterator{contract: _Record.contract, event: "RollupEpochsUploaded", logs: logs, sub: sub}, nil -} - -// WatchRollupEpochsUploaded is a free log subscription operation binding the contract event 0x0c53377f3eed25c9883c67adabc3f817b4fdcde29f550a6a26c0676ed2992929. -// -// Solidity: event RollupEpochsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) WatchRollupEpochsUploaded(opts *bind.WatchOpts, sink chan<- *RecordRollupEpochsUploaded, startIndex []*big.Int) (event.Subscription, error) { - - var startIndexRule []interface{} - for _, startIndexItem := range startIndex { - startIndexRule = append(startIndexRule, startIndexItem) - } - - logs, sub, err := _Record.contract.WatchLogs(opts, "RollupEpochsUploaded", startIndexRule) - 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(RecordRollupEpochsUploaded) - if err := _Record.contract.UnpackLog(event, "RollupEpochsUploaded", 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 -} - -// ParseRollupEpochsUploaded is a log parse operation binding the contract event 0x0c53377f3eed25c9883c67adabc3f817b4fdcde29f550a6a26c0676ed2992929. -// -// Solidity: event RollupEpochsUploaded(uint256 indexed startIndex, uint256 dataLength) -func (_Record *RecordFilterer) ParseRollupEpochsUploaded(log types.Log) (*RecordRollupEpochsUploaded, error) { - event := new(RecordRollupEpochsUploaded) - if err := _Record.contract.UnpackLog(event, "RollupEpochsUploaded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/bindings/bindings/record_more.go b/bindings/bindings/record_more.go deleted file mode 100644 index 785e2a0cb..000000000 --- a/bindings/bindings/record_more.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package bindings - -import ( - "encoding/json" - - "morph-l2/bindings/solc" -) - -const RecordStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1014_storage\"},{\"astId\":1003,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1013_storage\"},{\"astId\":1005,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"oracle\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_address\"},{\"astId\":1006,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"batchSubmissions\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_mapping(t_uint256,t_struct(BatchSubmission)1015_storage)\"},{\"astId\":1007,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"rollupEpochs\",\"offset\":0,\"slot\":\"103\",\"type\":\"t_mapping(t_uint256,t_struct(RollupEpochInfo)1017_storage)\"},{\"astId\":1008,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"rewardEpochs\",\"offset\":0,\"slot\":\"104\",\"type\":\"t_mapping(t_uint256,t_struct(RewardEpochInfo)1016_storage)\"},{\"astId\":1009,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"nextBatchSubmissionIndex\",\"offset\":0,\"slot\":\"105\",\"type\":\"t_uint256\"},{\"astId\":1010,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"nextRollupEpochIndex\",\"offset\":0,\"slot\":\"106\",\"type\":\"t_uint256\"},{\"astId\":1011,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"nextRewardEpochIndex\",\"offset\":0,\"slot\":\"107\",\"type\":\"t_uint256\"},{\"astId\":1012,\"contract\":\"contracts/l2/staking/Record.sol:Record\",\"label\":\"latestRewardEpochBlock\",\"offset\":0,\"slot\":\"108\",\"type\":\"t_uint256\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_address)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"address[]\",\"numberOfBytes\":\"32\"},\"t_array(t_uint256)1013_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1014_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_array(t_uint256)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"uint256[]\",\"numberOfBytes\":\"32\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_mapping(t_uint256,t_struct(BatchSubmission)1015_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IRecord.BatchSubmission)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(BatchSubmission)1015_storage\"},\"t_mapping(t_uint256,t_struct(RewardEpochInfo)1016_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IRecord.RewardEpochInfo)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(RewardEpochInfo)1016_storage\"},\"t_mapping(t_uint256,t_struct(RollupEpochInfo)1017_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IRecord.RollupEpochInfo)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(RollupEpochInfo)1017_storage\"},\"t_struct(BatchSubmission)1015_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IRecord.BatchSubmission\",\"numberOfBytes\":\"192\"},\"t_struct(RewardEpochInfo)1016_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IRecord.RewardEpochInfo\",\"numberOfBytes\":\"192\"},\"t_struct(RollupEpochInfo)1017_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IRecord.RollupEpochInfo\",\"numberOfBytes\":\"160\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" - -var RecordStorageLayout = new(solc.StorageLayout) - -var RecordDeployedBin = "0x608060405234801561000f575f80fd5b506004361061019a575f3560e01c8063715018a6116100e85780638e21d5fb11610093578063cb6293e81161006e578063cb6293e8146104e3578063d557714114610503578063f2fde38b1461052a578063fe49dbc91461053d575f80fd5b80638e21d5fb146103f1578063a24231e814610418578063a795f409146104a8575f80fd5b80637dc0d1d0116100c35780637dc0d1d01461038c578063807de443146103ac5780638da5cb5b146103d3575f80fd5b8063715018a6146102c25780637828a905146102ca57806378f908e1146102f1575f80fd5b806341ed047f116101485780634e3ca406116101235780634e3ca4061461026f57806364b4abe31461028f5780636ea0396e146102af575f80fd5b806341ed047f14610240578063484f8d0f146102535780634c69c00f1461025c575f80fd5b80631794bb3c116101785780631794bb3c146101d85780632fbf6487146101eb5780633d9353fe146101f4575f80fd5b80630776c0f71461019e57806310c9873f146101ba5780631511e1b1146101cf575b5f80fd5b6101a7606c5481565b6040519081526020015b60405180910390f35b6101cd6101c8366004612891565b610550565b005b6101a760695481565b6101cd6101e63660046128d0565b6106c4565b6101a7606b5481565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b1565b6101cd61024e366004612909565b610a22565b6101a7606a5481565b6101cd61026a366004612978565b610daf565b61028261027d366004612998565b610e7b565b6040516101b191906129b8565b6102a261029d366004612998565b61102d565b6040516101b19190612a3b565b6101cd6102bd366004612abb565b6111e8565b6101cd611fd4565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b61034a6102ff366004612891565b60666020525f9081526040902080546001820154600283015460038401546004850154600590950154939473ffffffffffffffffffffffffffffffffffffffff909316939192909186565b6040805196875273ffffffffffffffffffffffffffffffffffffffff9095166020870152938501929092526060840152608083015260a082015260c0016101b1565b60655461021b9073ffffffffffffffffffffffffffffffffffffffff1681565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff1661021b565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b61046b610426366004612891565b60676020525f908152604090208054600182015460028301546003840154600490940154929373ffffffffffffffffffffffffffffffffffffffff9092169290919085565b6040805195865273ffffffffffffffffffffffffffffffffffffffff9094166020860152928401919091526060830152608082015260a0016101b1565b6104ce6104b6366004612891565b60686020525f90815260409020805460019091015482565b604080519283526020830191909152016101b1565b6104f66104f1366004612998565b611fe7565b6040516101b19190612b52565b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b6101cd610538366004612978565b6122b5565b6101cd61054b366004612c80565b61236c565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064015b60405180910390fd5b606c5415610656576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f616c72656164792073657400000000000000000000000000000000000000000060448201526064016105e3565b5f81116106bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f696e76616c6964206c617465737420626c6f636b00000000000000000000000060448201526064016105e3565b606c55565b5f54610100900460ff16158080156106e257505f54600160ff909116105b806106fb5750303b1580156106fb57505f5460ff166001145b610787576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016105e3565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156107e3575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff8416610860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e76616c6964206f776e65722061646472657373000000000000000000000060448201526064016105e3565b815f036108ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f696e76616c6964206e657874206261746368207375626d697373696f6e20696e60448201527f646578000000000000000000000000000000000000000000000000000000000060648201526084016105e3565b73ffffffffffffffffffffffffffffffffffffffff831661096c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f696e76616c6964206f7261636c6520616464726573730000000000000000000060448201526064016105e3565b610975846126c5565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851617905560698290558015610a1c575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105e3565b80610b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f656d707479206261746368207375626d697373696f6e7300000000000000000060448201526064016105e3565b5f5b81811015610d5b5780606954610b389190612d0a565b838383818110610b4a57610b4a612d23565b905060c002015f013514610bba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105e3565b6040518060c00160405280848484818110610bd757610bd7612d23565b905060c002015f01358152602001848484818110610bf757610bf7612d23565b905060c002016020016020810190610c0f9190612978565b73ffffffffffffffffffffffffffffffffffffffff168152602001848484818110610c3c57610c3c612d23565b905060c00201604001358152602001848484818110610c5d57610c5d612d23565b905060c00201606001358152602001848484818110610c7e57610c7e612d23565b905060c00201608001358152602001848484818110610c9f57610c9f612d23565b905060c0020160a0013581525060665f858585818110610cc157610cc1612d23565b60c002919091013582525060208082019290925260409081015f208351815591830151600180840180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155908301516002830155606083015160038301556080830151600483015560a09092015160059091015501610b22565b506069546040518281527f1c517c9850aa84483b0b2434e58bab4c7967f0b1a34d8b18a6ad22436add010e9060200160405180910390a28181905060695f828254610da69190612d0a565b90915550505050565b610db761273b565b73ffffffffffffffffffffffffffffffffffffffff8116610e34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f696e76616c6964206f7261636c6520616464726573730000000000000000000060448201526064016105e3565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606082821015610ee7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105e3565b610ef18383612d50565b610efc906001612d0a565b67ffffffffffffffff811115610f1457610f14612d63565b604051908082528060200260200182016040528015610f8857816020015b610f756040518060a001604052805f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81525090565b815260200190600190039081610f325790505b509050825b828111611026575f81815260676020908152604091829020825160a08101845281548152600182015473ffffffffffffffffffffffffffffffffffffffff1692810192909252600281015492820192909252600382015460608201526004909101546080820152825183908390811061100857611008612d23565b6020026020010181905250808061101e90612d90565b915050610f8d565b5092915050565b606082821015611099576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105e3565b6110a38383612d50565b6110ae906001612d0a565b67ffffffffffffffff8111156110c6576110c6612d63565b60405190808252806020026020018201604052801561114057816020015b61112d6040518060c001604052805f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81526020015f81525090565b8152602001906001900390816110e45790505b509050825b828111611026575f81815260666020908152604091829020825160c08101845281548152600182015473ffffffffffffffffffffffffffffffffffffffff1692810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460a082015282518390839081106111ca576111ca612d23565b602002602001018190525080806111e090612d90565b915050611145565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461127f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105e3565b806112e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f656d707479207265776172642065706f6368730000000000000000000000000060448201526064016105e3565b5f606c5411611351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f737461727420626c6f636b2073686f756c64206265207365740000000000000060448201526064016105e3565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ba573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113de9190612dc7565b606b546001906113ef908490612d0a565b6113f99190612d50565b10611485576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f756e66696e69736865642065706f6368732063616e6e6f742062652075706c6f60448201527f616465640000000000000000000000000000000000000000000000000000000060648201526084016105e3565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a29bfb2c600184849050606b546114d49190612d0a565b6114de9190612d50565b6040518263ffffffff1660e01b81526004016114fc91815260200190565b5f604051808303815f87803b158015611513575f80fd5b505af1158015611525573d5f803e3d5ffd5b505f9250829150505b82811015611f69575f84848381811061154957611549612d23565b905060200281019061155b9190612dde565b611569906040810190612e1a565b905090505f85858481811061158057611580612d23565b90506020028101906115929190612dde565b606b54903591506115a4908490612d0a565b811461160c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642065706f636820696e6465780000000000000000000000000060448201526064016105e3565b8186868581811061161f5761161f612d23565b90506020028101906116319190612dde565b61163f906060810190612e1a565b905014801561168057508186868581811061165c5761165c612d23565b905060200281019061166e9190612dde565b61167c906080810190612e1a565b9050145b80156116be57508186868581811061169a5761169a612d23565b90506020028101906116ac9190612dde565b6116ba9060a0810190612e1a565b9050145b611724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642064617461206c656e6774680000000000000000000000000060448201526064016105e3565b85858481811061173657611736612d23565b90506020028101906117489190612dde565b611756906020013585612d0a565b93506040518060c0016040528082815260200187878681811061177b5761177b612d23565b905060200281019061178d9190612dde565b6020013581526020018787868181106117a8576117a8612d23565b90506020028101906117ba9190612dde565b6117c8906040810190612e1a565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525050509082525060200187878681811061181057611810612d23565b90506020028101906118229190612dde565b611830906060810190612e1a565b808060200260200160405190810160405280939291908181526020018383602002808284375f9201919091525050509082525060200187878681811061187857611878612d23565b905060200281019061188a9190612dde565b611898906080810190612e1a565b808060200260200160405190810160405280939291908181526020018383602002808284375f920191909152505050908252506020018787868181106118e0576118e0612d23565b90506020028101906118f29190612dde565b6119009060a0810190612e1a565b808060200260200160405190810160405280939291908181526020018383602002808284375f920182905250939094525050838152606860209081526040918290208451815584820151600182015591840151805192935061196b92600285019291909101906127bc565b5060608201518051611987916003840191602090910190612844565b50608082015180516119a3916004840191602090910190612844565b5060a082015180516119bf916005840191602090910190612844565b50506040517f944fa746000000000000000000000000000000000000000000000000000000008152600481018390525f91507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063944fa74690602401602060405180830381865afa158015611a4d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a719190612dc7565b90505f805f8567ffffffffffffffff811115611a8f57611a8f612d63565b604051908082528060200260200182016040528015611ab8578160200160208202803683370190505b5090505f8667ffffffffffffffff811115611ad557611ad5612d63565b604051908082528060200260200182016040528015611afe578160200160208202803683370190505b5090505f5b87811015611d995760148c8c8b818110611b1f57611b1f612d23565b9050602002810190611b319190612dde565b611b3f9060a0810190612e1a565b83818110611b4f57611b4f612d23565b905060200201351115611bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f696e76616c69642073657175656e6365727320636f6d6d697373696f6e00000060448201526064016105e3565b8b8b8a818110611bd057611bd0612d23565b9050602002810190611be29190612dde565b611bf0906080810190612e1a565b82818110611c0057611c00612d23565b9050602002013584611c129190612d0a565b93508b8b8a818110611c2657611c26612d23565b9050602002810190611c389190612dde565b611c46906060810190612e1a565b82818110611c5657611c56612d23565b9050602002013585611c689190612d0a565b94505f6305f5e1008d8d8c818110611c8257611c82612d23565b9050602002810190611c949190612dde565b611ca2906080810190612e1a565b84818110611cb257611cb2612d23565b9050602002013588611cc49190612e85565b611cce9190612e9c565b905060648d8d8c818110611ce457611ce4612d23565b9050602002810190611cf69190612dde565b611d049060a0810190612e1a565b84818110611d1457611d14612d23565b9050602002013582611d269190612e85565b611d309190612e9c565b838381518110611d4257611d42612d23565b602002602001018181525050828281518110611d6057611d60612d23565b602002602001015181611d739190612d50565b848381518110611d8557611d85612d23565b602090810291909101015250600101611b03565b508a8a89818110611dac57611dac612d23565b9050602002810190611dbe9190612dde565b602001358414611e2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e76616c69642073657175656e6365727320626c6f636b730000000000000060448201526064016105e3565b6305f5e100831115611e98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e76616c69642073657175656e6365727320726174696f730000000000000060448201526064016105e3565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cdd0c50e878d8d8c818110611ee757611ee7612d23565b9050602002810190611ef99190612dde565b611f07906040810190612e1a565b86866040518663ffffffff1660e01b8152600401611f29959493929190612ed4565b5f604051808303815f87803b158015611f40575f80fd5b505af1158015611f52573d5f803e3d5ffd5b50506001909901985061152e975050505050505050565b50606b546040518381527f4aa68efd05426e59a9d43654a55a2a74c3e8840894d6e291f8f83085e3a6d1ea9060200160405180910390a280606c5f828254611fb19190612d0a565b9091555050606b80548391905f90611fca908490612d0a565b9091555050505050565b611fdc61273b565b611fe55f6126c5565b565b606082821015612053576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105e3565b61205d8383612d50565b612068906001612d0a565b67ffffffffffffffff81111561208057612080612d63565b6040519080825280602002602001820160405280156120e857816020015b6120d56040518060c001604052805f81526020015f8152602001606081526020016060815260200160608152602001606081525090565b81526020019060019003908161209e5790505b509050825b828111611026575f81815260686020908152604091829020825160c081018452815481526001820154818401526002820180548551818602810186018752818152929593949386019383018282801561217a57602002820191905f5260205f20905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161214f575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156121d057602002820191905f5260205f20905b8154815260200190600101908083116121bc575b505050505081526020016004820180548060200260200160405190810160405280929190818152602001828054801561222657602002820191905f5260205f20905b815481526020019060010190808311612212575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561227c57602002820191905f5260205f20905b815481526020019060010190808311612268575b50505050508152505082828151811061229757612297612d23565b602002602001018190525080806122ad90612d90565b9150506120ed565b6122bd61273b565b73ffffffffffffffffffffffffffffffffffffffff8116612360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105e3565b612369816126c5565b50565b60655473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612403576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79206f7261636c6520616c6c6f7765640000000000000000000000000060448201526064016105e3565b8061246a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f656d70747920726f6c6c75702065706f6368730000000000000000000000000060448201526064016105e3565b5f5b8181101561267a5780606a546124829190612d0a565b83838381811061249457612494612d23565b905060a002015f013514612504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c696420696e6465780000000000000000000000000000000000000060448201526064016105e3565b6040518060a0016040528084848481811061252157612521612d23565b905060a002015f0135815260200184848481811061254157612541612d23565b905060a0020160200160208101906125599190612978565b73ffffffffffffffffffffffffffffffffffffffff16815260200184848481811061258657612586612d23565b905060a002016040013581526020018484848181106125a7576125a7612d23565b905060a002016060013581526020018484848181106125c8576125c8612d23565b905060a002016080013581525060675f8585858181106125ea576125ea612d23565b60a002919091013582525060208082019290925260409081015f208351815591830151600180840180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90931692909217909155908301516002830155606083015160038301556080909201516004909101550161246c565b50606a546040518281527f0c53377f3eed25c9883c67adabc3f817b4fdcde29f550a6a26c0676ed29929299060200160405180910390a281819050606a5f828254610da69190612d0a565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60335473ffffffffffffffffffffffffffffffffffffffff163314611fe5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e3565b828054828255905f5260205f20908101928215612834579160200282015b8281111561283457825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906127da565b5061284092915061287d565b5090565b828054828255905f5260205f20908101928215612834579160200282015b82811115612834578251825591602001919060010190612862565b5b80821115612840575f815560010161287e565b5f602082840312156128a1575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146128cb575f80fd5b919050565b5f805f606084860312156128e2575f80fd5b6128eb846128a8565b92506128f9602085016128a8565b9150604084013590509250925092565b5f806020838503121561291a575f80fd5b823567ffffffffffffffff80821115612931575f80fd5b818501915085601f830112612944575f80fd5b813581811115612952575f80fd5b86602060c083028501011115612966575f80fd5b60209290920196919550909350505050565b5f60208284031215612988575f80fd5b612991826128a8565b9392505050565b5f80604083850312156129a9575f80fd5b50508035926020909101359150565b602080825282518282018190525f919060409081850190868401855b82811015612a2e578151805185528681015173ffffffffffffffffffffffffffffffffffffffff16878601528581015186860152606080820151908601526080908101519085015260a090930192908501906001016129d4565b5091979650505050505050565b602080825282518282018190525f919060409081850190868401855b82811015612a2e578151805185528681015173ffffffffffffffffffffffffffffffffffffffff16878601528581015186860152606080820151908601526080808201519086015260a0908101519085015260c09093019290850190600101612a57565b5f8060208385031215612acc575f80fd5b823567ffffffffffffffff80821115612ae3575f80fd5b818501915085601f830112612af6575f80fd5b813581811115612b04575f80fd5b8660208260051b8501011115612966575f80fd5b5f815180845260208085019450602084015f5b83811015612b4757815187529582019590820190600101612b2b565b509495945050505050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b83811015612c72578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc001855281518051845287810151888501528681015160c0888601819052815190860181905260e08601918a01905f905b80821015612c0b57825173ffffffffffffffffffffffffffffffffffffffff168452928b0192918b019160019190910190612bd5565b50505060608083015186830382880152612c258382612b18565b9250505060808083015186830382880152612c408382612b18565b9250505060a08083015192508582038187015250612c5e8183612b18565b968901969450505090860190600101612b79565b509098975050505050505050565b5f8060208385031215612c91575f80fd5b823567ffffffffffffffff80821115612ca8575f80fd5b818501915085601f830112612cbb575f80fd5b813581811115612cc9575f80fd5b86602060a083028501011115612966575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115612d1d57612d1d612cdd565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b81810381811115612d1d57612d1d612cdd565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612dc057612dc0612cdd565b5060010190565b5f60208284031215612dd7575f80fd5b5051919050565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41833603018112612e10575f80fd5b9190910192915050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612e4d575f80fd5b83018035915067ffffffffffffffff821115612e67575f80fd5b6020019150600581901b3603821315612e7e575f80fd5b9250929050565b8082028115828204841417612d1d57612d1d612cdd565b5f82612ecf577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b858152608060208083018290529082018590525f90869060a08401835b88811015612f2a5773ffffffffffffffffffffffffffffffffffffffff612f17856128a8565b1682529282019290820190600101612ef1565b508481036040860152612f3d8188612b18565b925050508281036060840152612f538185612b18565b9897505050505050505056fea164736f6c6343000818000a" - -func init() { - if err := json.Unmarshal([]byte(RecordStorageLayoutJSON), RecordStorageLayout); err != nil { - panic(err) - } - - layouts["Record"] = RecordStorageLayout - deployedBytecodes["Record"] = RecordDeployedBin -} diff --git a/bindings/predeploys/addresses.go b/bindings/predeploys/addresses.go index dc8a1b39b..469e51c76 100644 --- a/bindings/predeploys/addresses.go +++ b/bindings/predeploys/addresses.go @@ -20,15 +20,16 @@ const ( GasPriceOracle = "0x530000000000000000000000000000000000000F" L2WETHGateway = "0x5300000000000000000000000000000000000010" L2WETH = "0x5300000000000000000000000000000000000011" - Record = "0x5300000000000000000000000000000000000012" + _ = "0x5300000000000000000000000000000000000012" MorphToken = "0x5300000000000000000000000000000000000013" - Distribute = "0x5300000000000000000000000000000000000014" + _ = "0x5300000000000000000000000000000000000014" L2Staking = "0x5300000000000000000000000000000000000015" L2CustomERC20Gateway = "0x5300000000000000000000000000000000000016" Sequencer = "0x5300000000000000000000000000000000000017" L2ReverseCustomGateway = "0x5300000000000000000000000000000000000018" L2WithdrawLockERC20Gateway = "0x5300000000000000000000000000000000000019" L2USDCGateway = "0x5300000000000000000000000000000000000020" + System = "0x5300000000000000000000000000000000000021" ) var ( @@ -48,14 +49,13 @@ var ( MorphStandardERC20FactoryAddr = common.HexToAddress(MorphStandardERC20Factory) L2WETHGatewayAddr = common.HexToAddress(L2WETHGateway) L2WETHAddr = common.HexToAddress(L2WETH) - RecordAddr = common.HexToAddress(Record) MorphTokenAddr = common.HexToAddress(MorphToken) - DistributeAddr = common.HexToAddress(Distribute) L2StakingAddr = common.HexToAddress(L2Staking) L2CustomERC20GatewayAddr = common.HexToAddress(L2CustomERC20Gateway) L2ReverseCustomGatewayAddr = common.HexToAddress(L2ReverseCustomGateway) L2WithdrawLockERC20GatewayAddr = common.HexToAddress(L2WithdrawLockERC20Gateway) L2USDCGatewayAddr = common.HexToAddress(L2USDCGateway) + SystemAddr = common.HexToAddress(System) Predeploys = make(map[string]*common.Address) ) @@ -67,7 +67,6 @@ func init() { Predeploys["ProxyAdmin"] = &ProxyAdminAddr Predeploys["Sequencer"] = &SequencerAddr Predeploys["Gov"] = &GovAddr - Predeploys["Record"] = &RecordAddr Predeploys["L2GatewayRouter"] = &L2GatewayRouterAddr Predeploys["L2ETHGateway"] = &L2ETHGatewayAddr Predeploys["L2StandardERC20Gateway"] = &L2StandardERC20GatewayAddr @@ -76,7 +75,6 @@ func init() { Predeploys["MorphStandardERC20"] = &MorphStandardERC20Addr Predeploys["MorphStandardERC20Factory"] = &MorphStandardERC20FactoryAddr Predeploys["MorphToken"] = &MorphTokenAddr - Predeploys["Distribute"] = &DistributeAddr Predeploys["L2Staking"] = &L2StakingAddr Predeploys["L2TxFeeVault"] = &L2TxFeeVaultAddr Predeploys["L2WETHGateway"] = &L2WETHGatewayAddr @@ -85,4 +83,5 @@ func init() { Predeploys["L2ReverseCustomGateway"] = &L2ReverseCustomGatewayAddr Predeploys["L2WithdrawLockERC20Gateway"] = &L2WithdrawLockERC20GatewayAddr Predeploys["L2USDCGateway"] = &L2USDCGatewayAddr + Predeploys["SYSTEM"] = &SystemAddr }