Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x6101e060 | 18936640 | 238 days ago | IN | 0 ETH | 0.09244839 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xAfa1322A...d193AE743 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
TACoApplication
Compiler Version
v0.8.23+commit.f704f362
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity ^0.8.0; import "Math.sol"; import "SafeCast.sol"; import "SafeERC20.sol"; import "IERC20.sol"; import "OwnableUpgradeable.sol"; import "IApplicationWithOperator.sol"; import "IApplicationWithDecreaseDelay.sol"; import "IStaking.sol"; import "ITACoRootToChild.sol"; import "ITACoChildToRoot.sol"; /** * @title TACo Application * @notice Contract distributes rewards for participating in app and slashes for violating rules */ contract TACoApplication is IApplicationWithDecreaseDelay, IApplicationWithOperator, ITACoChildToRoot, OwnableUpgradeable { using SafeERC20 for IERC20; using SafeCast for uint256; /** * @notice Signals that distributor role was set * @param distributor Address of reward distributor */ event RewardDistributorSet(address indexed distributor); /** * @notice Signals that reward was added * @param reward Amount of reward */ event RewardAdded(uint256 reward); /** * @notice Signals that the beneficiary related to the staking provider received reward * @param stakingProvider Staking provider address * @param beneficiary Beneficiary address * @param reward Amount of reward */ event RewardPaid(address indexed stakingProvider, address indexed beneficiary, uint256 reward); /** * @notice Signals that authorization was increased for the staking provider * @param stakingProvider Staking provider address * @param fromAmount Previous amount of increased authorization * @param toAmount New amount of increased authorization */ event AuthorizationIncreased( address indexed stakingProvider, uint96 fromAmount, uint96 toAmount ); /** * @notice Signals that authorization was decreased involuntary * @param stakingProvider Staking provider address * @param fromAmount Previous amount of authorized tokens * @param toAmount Amount of authorized tokens to decrease */ event AuthorizationInvoluntaryDecreased( address indexed stakingProvider, uint96 fromAmount, uint96 toAmount ); /** * @notice Signals that authorization decrease was requested for the staking provider * @param stakingProvider Staking provider address * @param fromAmount Current amount of authorized tokens * @param toAmount Amount of authorization to decrease */ event AuthorizationDecreaseRequested( address indexed stakingProvider, uint96 fromAmount, uint96 toAmount ); /** * @notice Signals that authorization decrease was approved for the staking provider * @param stakingProvider Staking provider address * @param fromAmount Previous amount of authorized tokens * @param toAmount Decreased amount of authorized tokens */ event AuthorizationDecreaseApproved( address indexed stakingProvider, uint96 fromAmount, uint96 toAmount ); /** * @notice Signals that authorization was resynchronized with Threshold staking contract * @param stakingProvider Staking provider address * @param fromAmount Previous amount of authorized tokens * @param toAmount Resynchronized amount of authorized tokens */ event AuthorizationReSynchronized( address indexed stakingProvider, uint96 fromAmount, uint96 toAmount ); /** * @notice Signals that the staking provider was slashed * @param stakingProvider Staking provider address * @param penalty Slashing penalty * @param investigator Investigator address * @param reward Value of reward provided to investigator (in units of T) */ event Slashed( address indexed stakingProvider, uint256 penalty, address indexed investigator, uint256 reward ); /** * @notice Signals that an operator was bonded to the staking provider * @param stakingProvider Staking provider address * @param operator Operator address * @param previousOperator Previous operator address * @param startTimestamp Timestamp bonding occurred */ event OperatorBonded( address indexed stakingProvider, address indexed operator, address indexed previousOperator, uint256 startTimestamp ); /** * @notice Signals that a staking provider made a commitment * @param stakingProvider Staking provider address * @param endCommitment End of commitment */ event CommitmentMade(address indexed stakingProvider, uint256 endCommitment); /** * @notice Signals that manual child synchronization was called * @param stakingProvider Staking provider address * @param authorized Amount of authorized tokens to synchronize * @param operator Operator address to synchronize */ event ManualChildSynchronizationSent( address indexed stakingProvider, uint96 authorized, address operator ); struct StakingProviderInfo { address operator; bool operatorConfirmed; uint64 operatorStartTimestamp; uint96 authorized; uint96 deauthorizing; // TODO real usage only in getActiveStakingProviders, maybe remove? uint64 endDeauthorization; uint96 tReward; uint160 rewardPerTokenPaid; uint64 endCommitment; } uint256 public constant REWARD_PER_TOKEN_MULTIPLIER = 10 ** 3; uint256 internal constant FLOATING_POINT_DIVISOR = REWARD_PER_TOKEN_MULTIPLIER * 10 ** 18; uint96 public immutable minimumAuthorization; uint256 public immutable minOperatorSeconds; uint256 public immutable rewardDuration; uint256 public immutable deauthorizationDuration; uint64 public immutable commitmentDurationOption1; uint64 public immutable commitmentDurationOption2; uint64 public immutable commitmentDurationOption3; uint64 public immutable commitmentDurationOption4; uint64 public immutable commitmentDeadline; IStaking public immutable tStaking; IERC20 public immutable token; ITACoRootToChild public childApplication; address public adjudicator; mapping(address => StakingProviderInfo) public stakingProviderInfo; address[] public stakingProviders; mapping(address => address) internal _stakingProviderFromOperator; address public rewardDistributor; uint256 public periodFinish; uint256 public rewardRateDecimals; uint256 public lastUpdateTime; uint160 public rewardPerTokenStored; uint96 public authorizedOverall; /** * @notice Constructor sets address of token contract and parameters for staking * @param _token T token contract * @param _tStaking T token staking contract * @param _minimumAuthorization Amount of minimum allowable authorization * @param _minOperatorSeconds Min amount of seconds while an operator can't be changed * @param _rewardDuration Duration of one reward cycle in seconds * @param _deauthorizationDuration Duration of decreasing authorization in seconds * @param _commitmentDurationOptions Options for commitment duration * @param _commitmentDeadline Last date to make a commitment */ constructor( IERC20 _token, IStaking _tStaking, uint96 _minimumAuthorization, uint256 _minOperatorSeconds, uint256 _rewardDuration, uint256 _deauthorizationDuration, uint64[] memory _commitmentDurationOptions, uint64 _commitmentDeadline ) { uint256 totalSupply = _token.totalSupply(); require( _rewardDuration != 0 && _tStaking.authorizedStake(address(this), address(this)) == 0 && totalSupply > 0 && _commitmentDurationOptions.length >= 1 && _commitmentDurationOptions.length <= 4, "Wrong input parameters" ); // This require is only to check potential overflow for 10% reward require( (totalSupply / 10) * FLOATING_POINT_DIVISOR <= type(uint160).max && _minimumAuthorization >= 10 ** 18 && _rewardDuration >= 1 days, "Potential overflow" ); rewardDuration = _rewardDuration; deauthorizationDuration = _deauthorizationDuration; minimumAuthorization = _minimumAuthorization; token = _token; tStaking = _tStaking; minOperatorSeconds = _minOperatorSeconds; commitmentDurationOption1 = _commitmentDurationOptions[0]; commitmentDurationOption2 = _commitmentDurationOptions.length >= 2 ? _commitmentDurationOptions[1] : 0; commitmentDurationOption3 = _commitmentDurationOptions.length >= 3 ? _commitmentDurationOptions[2] : 0; commitmentDurationOption4 = _commitmentDurationOptions.length >= 4 ? _commitmentDurationOptions[3] : 0; commitmentDeadline = _commitmentDeadline; _disableInitializers(); } /** * @dev Update reward for the specified staking provider */ modifier updateReward(address _stakingProvider) { updateRewardInternal(_stakingProvider); _; } /** * @dev Checks caller is T staking contract */ modifier onlyStakingContract() { require(msg.sender == address(tStaking), "Caller must be the T staking contract"); _; } /** * @dev Checks caller is a staking provider or stake owner */ modifier onlyOwnerOrStakingProvider(address _stakingProvider) { require(isAuthorized(_stakingProvider), "Not owner or provider"); if (_stakingProvider != msg.sender) { (address owner, , ) = tStaking.rolesOf(_stakingProvider); require(owner == msg.sender, "Not owner or provider"); } _; } /** * @notice Initialize function for using with OpenZeppelin proxy */ function initialize() external initializer { __Ownable_init(msg.sender); } /** * @notice Set contract for multi-chain interactions */ function setChildApplication(ITACoRootToChild _childApplication) external onlyOwner { require(address(_childApplication).code.length > 0, "Child app must be contract"); childApplication = _childApplication; } /** * @notice Set adjudicator contract. If zero then slashing is disabled */ function setAdjudicator(address _adjudicator) external onlyOwner { require( address(_adjudicator) != address(adjudicator), "New address must not be equal to the current one" ); adjudicator = _adjudicator; } /** * @notice Returns authorization-related parameters of the application. * @dev The minimum authorization is also returned by `minimumAuthorization()` * function, as a requirement of `IApplication` interface. * @return _minimumAuthorization The minimum authorization amount required * so that operator can participate in the application. * @return authorizationDecreaseDelay Delay in seconds that needs to pass * between the time authorization decrease is requested and the * time that request gets approved. Protects against free-riders * earning rewards and not being active in the network. * @return authorizationDecreaseChangePeriod Authorization decrease change * period in seconds. It is the time, before authorization decrease * delay end, during which the pending authorization decrease * request can be overwritten. * If set to 0, pending authorization decrease request can not be * overwritten until the entire `authorizationDecreaseDelay` ends. * If set to value equal `authorizationDecreaseDelay`, request can * always be overwritten. */ function authorizationParameters() external view override returns ( uint96 _minimumAuthorization, uint64 authorizationDecreaseDelay, uint64 authorizationDecreaseChangePeriod ) { return ( minimumAuthorization, uint64(deauthorizationDuration), uint64(deauthorizationDuration) ); } //------------------------Reward------------------------------ /** * @notice Set reward distributor address */ function setRewardDistributor(address _rewardDistributor) external onlyOwner { rewardDistributor = _rewardDistributor; emit RewardDistributorSet(_rewardDistributor); } /** * @notice Update reward for the specified staking provider * @param _stakingProvider Staking provider address */ function updateRewardInternal(address _stakingProvider) internal { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (_stakingProvider != address(0)) { StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; info.tReward = availableRewards(_stakingProvider); info.rewardPerTokenPaid = rewardPerTokenStored; } } /** * @notice Returns last time when reward was applicable */ function lastTimeRewardApplicable() public view returns (uint256) { return Math.min(block.timestamp, periodFinish); } /** * @notice Returns current value of reward per token * multiplier */ function rewardPerToken() public view returns (uint160) { if (authorizedOverall == 0) { return rewardPerTokenStored; } uint256 result = rewardPerTokenStored + ((lastTimeRewardApplicable() - lastUpdateTime) * rewardRateDecimals) / authorizedOverall; return result.toUint160(); } /** * @notice Returns amount of reward in T units for the staking provider * @param _stakingProvider Staking provider address */ function availableRewards(address _stakingProvider) public view returns (uint96) { StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; if (!info.operatorConfirmed) { return info.tReward; } uint256 result = (uint256(info.authorized) * (rewardPerToken() - info.rewardPerTokenPaid)) / FLOATING_POINT_DIVISOR + info.tReward; return result.toUint96(); } /** * @notice Transfer reward for the next period. Can be called only by distributor * @param _reward Amount of reward */ function pushReward(uint96 _reward) external updateReward(address(0)) { require(msg.sender == rewardDistributor, "Only distributor can push rewards"); require(_reward > 0, "Reward must be specified"); require(authorizedOverall > 0, "No active staking providers"); if (block.timestamp >= periodFinish) { rewardRateDecimals = (uint256(_reward) * FLOATING_POINT_DIVISOR) / rewardDuration; } else { uint256 remaining = periodFinish - block.timestamp; uint256 leftover = remaining * rewardRateDecimals; rewardRateDecimals = (uint256(_reward) * FLOATING_POINT_DIVISOR + leftover) / rewardDuration; } lastUpdateTime = block.timestamp; periodFinish = block.timestamp + rewardDuration; emit RewardAdded(_reward); token.safeTransferFrom(msg.sender, address(this), _reward); } /** * @notice Withdraw available amount of T reward to beneficiary. Can be called only by beneficiary * @param _stakingProvider Staking provider address */ function withdrawRewards(address _stakingProvider) external updateReward(_stakingProvider) { address beneficiary = getBeneficiary(_stakingProvider); require(msg.sender == beneficiary, "Caller must be beneficiary"); StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; uint96 value = info.tReward; require(value > 0, "No reward to withdraw"); info.tReward = 0; emit RewardPaid(_stakingProvider, beneficiary, value); token.safeTransfer(beneficiary, value); } //------------------------Authorization------------------------------ /** * @notice Recalculate `authorizedOverall` if desync happened */ function resynchronizeAuthorizedOverall( StakingProviderInfo storage _info, uint96 _properAmount ) internal { if (_info.authorized != _properAmount) { authorizedOverall -= _info.authorized - _properAmount; } } /** * @notice Recalculate reward and save increased authorization. Can be called only by staking contract * @param _stakingProvider Address of staking provider * @param _fromAmount Amount of previously authorized tokens to TACo application by staking provider * @param _toAmount Amount of authorized tokens to TACo application by staking provider */ function authorizationIncreased( address _stakingProvider, uint96 _fromAmount, uint96 _toAmount ) external override onlyStakingContract updateReward(_stakingProvider) { require( _stakingProvider != address(0) && _toAmount > 0, "Input parameters must be specified" ); require(_toAmount >= minimumAuthorization, "Authorization must be greater than minimum"); StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; require( _stakingProviderFromOperator[_stakingProvider] == address(0) || _stakingProviderFromOperator[_stakingProvider] == _stakingProvider, "A provider can't be an operator for another provider" ); if (info.operatorConfirmed) { resynchronizeAuthorizedOverall(info, _fromAmount); authorizedOverall += _toAmount - _fromAmount; } info.authorized = _toAmount; emit AuthorizationIncreased(_stakingProvider, _fromAmount, _toAmount); _updateAuthorization(_stakingProvider, info); } /** * @notice Immediately decrease authorization. Can be called only by staking contract * @param _stakingProvider Address of staking provider * @param _fromAmount Previous amount of authorized tokens * @param _toAmount Amount of authorized tokens to decrease */ function involuntaryAuthorizationDecrease( address _stakingProvider, uint96 _fromAmount, uint96 _toAmount ) external override onlyStakingContract updateReward(_stakingProvider) { StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; if (info.operatorConfirmed) { resynchronizeAuthorizedOverall(info, _fromAmount); authorizedOverall -= _fromAmount - _toAmount; } info.authorized = _toAmount; if (info.authorized < info.deauthorizing) { info.deauthorizing = info.authorized; } emit AuthorizationInvoluntaryDecreased(_stakingProvider, _fromAmount, _toAmount); if (info.authorized == 0) { _releaseOperator(_stakingProvider); } _updateAuthorization(_stakingProvider, info); } /** * @notice Register request of decreasing authorization. Can be called only by staking contract * @param _stakingProvider Address of staking provider * @param _fromAmount Current amount of authorized tokens * @param _toAmount Amount of authorized tokens to decrease */ function authorizationDecreaseRequested( address _stakingProvider, uint96 _fromAmount, uint96 _toAmount ) external override onlyStakingContract updateReward(_stakingProvider) { StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; require(_toAmount <= info.authorized, "Amount to decrease greater than authorized"); require( _toAmount == 0 || _toAmount >= minimumAuthorization, "Resulting authorization will be less than minimum" ); require( info.endCommitment <= block.timestamp, "Can't request deauthorization before end of commitment" ); if (info.operatorConfirmed) { resynchronizeAuthorizedOverall(info, _fromAmount); } info.authorized = _fromAmount; info.deauthorizing = _fromAmount - _toAmount; info.endDeauthorization = uint64(block.timestamp + deauthorizationDuration); emit AuthorizationDecreaseRequested(_stakingProvider, _fromAmount, _toAmount); _updateAuthorization(_stakingProvider, info); } /** * @notice Approve request of decreasing authorization. Can be called by anyone * @param _stakingProvider Address of staking provider */ function approveAuthorizationDecrease( address _stakingProvider ) external updateReward(_stakingProvider) { StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; require(info.deauthorizing > 0, "There is no deauthorizing in process"); require( info.endDeauthorization <= block.timestamp, "Authorization decrease has not finished yet" ); uint96 toAmount = tStaking.approveAuthorizationDecrease(_stakingProvider); if (info.operatorConfirmed) { authorizedOverall -= info.authorized - toAmount; } emit AuthorizationDecreaseApproved(_stakingProvider, info.authorized, toAmount); info.authorized = toAmount; info.deauthorizing = 0; info.endDeauthorization = 0; if (info.authorized == 0) { _releaseOperator(_stakingProvider); } _updateAuthorization(_stakingProvider, info); } /** * @notice Read authorization from staking contract and store it. Can be called by anyone * @param _stakingProvider Address of staking provider */ function resynchronizeAuthorization( address _stakingProvider ) external updateReward(_stakingProvider) { StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; uint96 newAuthorized = tStaking.authorizedStake(_stakingProvider, address(this)); require(info.authorized > newAuthorized, "Nothing to synchronize"); if (info.operatorConfirmed) { authorizedOverall -= info.authorized - newAuthorized; } emit AuthorizationReSynchronized(_stakingProvider, info.authorized, newAuthorized); info.authorized = newAuthorized; if (info.authorized < info.deauthorizing) { info.deauthorizing = info.authorized; } if (info.authorized == 0) { _releaseOperator(_stakingProvider); } _updateAuthorization(_stakingProvider, info); } /** * @notice Make a commitment to not request authorization decrease for specified duration * @param _stakingProvider Staking provider address * @param _commitmentDuration Duration of commitment */ function makeCommitment( address _stakingProvider, uint64 _commitmentDuration ) external onlyOwnerOrStakingProvider(_stakingProvider) { require(block.timestamp < commitmentDeadline, "Commitment window closed"); require( _commitmentDuration > 0 && (_commitmentDuration == commitmentDurationOption1 || _commitmentDuration == commitmentDurationOption2 || _commitmentDuration == commitmentDurationOption3 || _commitmentDuration == commitmentDurationOption4), "Commitment duration must be equal to one of options" ); StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; require(info.endDeauthorization == 0, "Commitment can't be made during deauthorization"); require(info.endCommitment == 0, "Commitment already made"); info.endCommitment = uint64(block.timestamp) + _commitmentDuration; emit CommitmentMade(_stakingProvider, info.endCommitment); } //-------------------------Main------------------------- /** * @notice Returns staking provider for specified operator */ function operatorToStakingProvider(address _operator) external view returns (address) { return _stakingProviderFromOperator[_operator]; } /** * @notice Returns operator for specified staking provider */ function stakingProviderToOperator(address _stakingProvider) external view returns (address) { return stakingProviderInfo[_stakingProvider].operator; } /** * @notice Get all tokens delegated to the staking provider */ function authorizedStake(address _stakingProvider) external view returns (uint96) { return stakingProviderInfo[_stakingProvider].authorized; } /** * @notice Get all tokens delegated to the staking provider */ function getEligibleAmount(StakingProviderInfo storage _info) internal view returns (uint96) { return _info.authorized - _info.deauthorizing; } /** * @notice Returns the amount of stake that is pending authorization * decrease for the given staking provider. If no authorization * decrease has been requested, returns zero. */ function pendingAuthorizationDecrease( address _stakingProvider ) external view override returns (uint96) { return stakingProviderInfo[_stakingProvider].deauthorizing; } /** * @notice Returns the remaining time in seconds that needs to pass before * the requested authorization decrease can be approved. */ function remainingAuthorizationDecreaseDelay( address _stakingProvider ) external view override returns (uint64) { uint256 endDeauthorization = stakingProviderInfo[_stakingProvider].endDeauthorization; if (endDeauthorization <= block.timestamp) { return 0; } return uint64(endDeauthorization - block.timestamp); } /** * @notice Get the value of authorized tokens for active providers as well as providers and their authorized tokens * @param _startIndex Start index for looking in providers array * @param _maxStakingProviders Max providers for looking, if set 0 then all will be used * @return allAuthorizedTokens Sum of authorized tokens for active providers * @return activeStakingProviders Array of providers and their authorized tokens. * Providers addresses stored together with amounts as bytes32 * @dev Note that activeStakingProviders is an array of bytes32, but you want addresses and amounts. * Careful when used directly! */ function getActiveStakingProviders( uint256 _startIndex, uint256 _maxStakingProviders ) external view returns (uint256 allAuthorizedTokens, bytes32[] memory activeStakingProviders) { uint256 endIndex = stakingProviders.length; require(_startIndex < endIndex, "Wrong start index"); if (_maxStakingProviders != 0 && _startIndex + _maxStakingProviders < endIndex) { endIndex = _startIndex + _maxStakingProviders; } activeStakingProviders = new bytes32[](endIndex - _startIndex); allAuthorizedTokens = 0; uint256 resultIndex = 0; for (uint256 i = _startIndex; i < endIndex; i++) { address stakingProvider = stakingProviders[i]; StakingProviderInfo storage info = stakingProviderInfo[stakingProvider]; uint256 eligibleAmount = getEligibleAmount(info); if (eligibleAmount < minimumAuthorization || !info.operatorConfirmed) { continue; } // bytes20 -> bytes32 adds padding after address: <address><12 zeros> // uint96 -> uint256 adds padding before uint96: <20 zeros><amount> activeStakingProviders[resultIndex++] = bytes32(bytes20(stakingProvider)) | bytes32(uint256(eligibleAmount)); allAuthorizedTokens += eligibleAmount; } assembly { mstore(activeStakingProviders, resultIndex) } } /** * @notice Returns beneficiary related to the staking provider */ function getBeneficiary( address _stakingProvider ) public view returns (address payable beneficiary) { (, beneficiary, ) = tStaking.rolesOf(_stakingProvider); } /** * @notice Returns true if staking provider has authorized stake to this application */ function isAuthorized(address _stakingProvider) public view returns (bool) { return stakingProviderInfo[_stakingProvider].authorized > 0; } /** * @notice Returns true if operator has confirmed address */ // TODO maybe _stakingProvider instead of _operator as input? function isOperatorConfirmed(address _operator) public view returns (bool) { address stakingProvider = _stakingProviderFromOperator[_operator]; StakingProviderInfo storage info = stakingProviderInfo[stakingProvider]; return info.operatorConfirmed; } /** * @notice Return the length of the array of staking providers */ function getStakingProvidersLength() external view returns (uint256) { return stakingProviders.length; } /** * @notice Used by staking provider to set operator address that will * operate a node. The operator address must be unique. * Reverts if the operator is already set for the staking provider * or if the operator address is already in use. */ function registerOperator(address _operator) external override { bondOperator(msg.sender, _operator); } /** * @notice Bond operator * @param _stakingProvider Staking provider address * @param _operator Operator address. Must be an EOA, not a contract address */ function bondOperator( address _stakingProvider, address _operator ) public onlyOwnerOrStakingProvider(_stakingProvider) updateReward(_stakingProvider) { StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; address previousOperator = info.operator; require( _operator != previousOperator, "Specified operator is already bonded with this provider" ); // If this staker had a operator ... if (previousOperator != address(0)) { require( !info.operatorConfirmed || block.timestamp >= uint256(info.operatorStartTimestamp) + minOperatorSeconds, "Not enough time passed to change operator" ); // Remove the old relation "operator->stakingProvider" _stakingProviderFromOperator[previousOperator] = address(0); } if (_operator != address(0)) { require( _stakingProviderFromOperator[_operator] == address(0), "Specified operator is already in use" ); require( _operator == _stakingProvider || getBeneficiary(_operator) == address(0), "Specified operator is a provider" ); // Set new operator->stakingProvider relation _stakingProviderFromOperator[_operator] = _stakingProvider; } if (info.operatorStartTimestamp == 0) { stakingProviders.push(_stakingProvider); } if (info.operatorConfirmed) { authorizedOverall -= info.authorized; } // Bond new operator (or unbond if _operator == address(0)) info.operator = _operator; info.operatorStartTimestamp = uint64(block.timestamp); emit OperatorBonded(_stakingProvider, _operator, previousOperator, block.timestamp); info.operatorConfirmed = false; childApplication.updateOperator(_stakingProvider, _operator); } /** * @notice Make a confirmation by operator */ function confirmOperatorAddress(address _operator) external override { require( msg.sender == address(childApplication), "Only child application allowed to confirm operator" ); address stakingProvider = _stakingProviderFromOperator[_operator]; // TODO only in case of desync, maybe just exit? // require(stakingProvider != address(0), "Operator has no bond with staking provider"); if (stakingProvider == address(0)) { return; } StakingProviderInfo storage info = stakingProviderInfo[stakingProvider]; if (!info.operatorConfirmed) { updateRewardInternal(stakingProvider); info.operatorConfirmed = true; authorizedOverall += info.authorized; emit OperatorConfirmed(stakingProvider, _operator); } } //-------------------------XChain------------------------- /** * @notice Resets operator confirmation */ function _releaseOperator(address _stakingProvider) internal { StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; _stakingProviderFromOperator[info.operator] = address(0); info.operator = address(0); info.operatorConfirmed = false; info.endDeauthorization = 0; info.endCommitment = 0; childApplication.updateOperator(_stakingProvider, address(0)); } /** * @notice Send updated authorized amount to xchain contract */ function _updateAuthorization( address _stakingProvider, StakingProviderInfo storage _info ) internal { // TODO send both authorized and eligible amounts in case of slashing from child app uint96 eligibleAmount = getEligibleAmount(_info); childApplication.updateAuthorization(_stakingProvider, eligibleAmount); } /** * @notice Manual signal to the bridge with the current state of the specified staking provider * @dev This method is useful only in case of issues with the bridge */ function manualChildSynchronization(address _stakingProvider) external { require(_stakingProvider != address(0), "Staking provider must be specified"); StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider]; emit ManualChildSynchronizationSent(_stakingProvider, info.authorized, info.operator); _updateAuthorization(_stakingProvider, info); childApplication.updateOperator(_stakingProvider, info.operator); } //-------------------------Slashing------------------------- /** * @notice Slash the provider's stake and reward the investigator * @param _stakingProvider Staking provider address * @param _penalty Penalty * @param _investigator Investigator */ function slash(address _stakingProvider, uint96 _penalty, address _investigator) external { require(msg.sender == adjudicator, "Only adjudicator allowed to slash"); address[] memory stakingProviderWrapper = new address[](1); stakingProviderWrapper[0] = _stakingProvider; tStaking.seize(_penalty, 100, _investigator, stakingProviderWrapper); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: GPL-3.0-or-later // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ pragma solidity ^0.8.9; /// @title Application interface for Threshold Network applications /// @notice Generic interface for an application. Application is an external /// smart contract or a set of smart contracts utilizing functionalities /// offered by Threshold Network. Applications authorized for the given /// staking provider are eligible to slash the stake delegated to that /// staking provider. interface IApplication { /// @dev Event emitted by `withdrawRewards` function. event RewardsWithdrawn(address indexed stakingProvider, uint96 amount); /// @notice Withdraws application rewards for the given staking provider. /// Rewards are withdrawn to the staking provider's beneficiary /// address set in the staking contract. /// @dev Emits `RewardsWithdrawn` event. function withdrawRewards(address stakingProvider) external; /// @notice Used by T staking contract to inform the application that the /// authorized amount for the given staking provider increased. /// The application may do any necessary housekeeping. The /// application must revert the transaction in case the /// authorization is below the minimum required. function authorizationIncreased( address stakingProvider, uint96 fromAmount, uint96 toAmount ) external; /// @notice Used by T staking contract to inform the application that the /// authorization decrease for the given staking provider has been /// requested. The application should mark the authorization as /// pending decrease and respond to the staking contract with /// `approveAuthorizationDecrease` at its discretion. It may /// happen right away but it also may happen several months later. /// If there is already a pending authorization decrease request /// for the application, and the application does not agree for /// overwriting it, the function should revert. function authorizationDecreaseRequested( address stakingProvider, uint96 fromAmount, uint96 toAmount ) external; /// @notice Used by T staking contract to inform the application the /// authorization has been decreased for the given staking provider /// involuntarily, as a result of slashing. Lets the application to /// do any housekeeping neccessary. Called with 250k gas limit and /// does not revert the transaction if /// `involuntaryAuthorizationDecrease` call failed. function involuntaryAuthorizationDecrease( address stakingProvider, uint96 fromAmount, uint96 toAmount ) external; /// @notice Returns the amount of application rewards available for /// withdrawal for the given staking provider. function availableRewards(address stakingProvider) external view returns (uint96); /// @notice The minimum authorization amount required for the staking /// provider so that they can participate in the application. function minimumAuthorization() external view returns (uint96); }
// SPDX-License-Identifier: GPL-3.0-or-later // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ pragma solidity ^0.8.9; import "IApplication.sol"; /// @title Interface for Threshold Network applications with delay after decrease request interface IApplicationWithDecreaseDelay is IApplication { /// @notice Returns authorization-related parameters of the application. /// @dev The minimum authorization is also returned by `minimumAuthorization()` /// function, as a requirement of `IApplication` interface. /// @return _minimumAuthorization The minimum authorization amount required /// so that operator can participate in the application. /// @return authorizationDecreaseDelay Delay in seconds that needs to pass /// between the time authorization decrease is requested and the /// time that request gets approved. Protects against free-riders /// earning rewards and not being active in the network. /// @return authorizationDecreaseChangePeriod Authorization decrease change /// period in seconds. It is the time, before authorization decrease /// delay end, during which the pending authorization decrease /// request can be overwritten. /// If set to 0, pending authorization decrease request can not be /// overwritten until the entire `authorizationDecreaseDelay` ends. /// If set to value equal `authorizationDecreaseDelay`, request can /// always be overwritten. function authorizationParameters() external view returns ( uint96 _minimumAuthorization, uint64 authorizationDecreaseDelay, uint64 authorizationDecreaseChangePeriod ); /// @notice Returns the amount of stake that is pending authorization /// decrease for the given staking provider. If no authorization /// decrease has been requested, returns zero. function pendingAuthorizationDecrease(address _stakingProvider) external view returns (uint96); /// @notice Returns the remaining time in seconds that needs to pass before /// the requested authorization decrease can be approved. function remainingAuthorizationDecreaseDelay( address stakingProvider ) external view returns (uint64); /// @notice Approves the previously registered authorization decrease /// request. Reverts if authorization decrease delay has not passed /// yet or if the authorization decrease was not requested for the /// given staking provider. function approveAuthorizationDecrease(address stakingProvider) external; }
// SPDX-License-Identifier: GPL-3.0-or-later // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ pragma solidity ^0.8.9; import "IApplication.sol"; /// @title Interface for Threshold Network applications with operator role interface IApplicationWithOperator is IApplication { /// @notice Returns operator registered for the given staking provider. function stakingProviderToOperator(address stakingProvider) external view returns (address); /// @notice Returns staking provider of the given operator. function operatorToStakingProvider(address operator) external view returns (address); /// @notice Used by staking provider to set operator address that will /// operate a node. The operator addressmust be unique. /// Reverts if the operator is already set for the staking provider /// or if the operator address is already in use. /// @dev Depending on application the given staking provider can set operator /// address only one or multiple times. Besides that application can decide /// if function reverts if there is a pending authorization decrease for /// the staking provider. function registerOperator(address operator) external; // TODO consider that? // /// @notice Used by additional role (owner for example) to set operator address that will // /// operate a node for the specified staking provider. // function registerOperator(address stakingProvider, address operator) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: GPL-3.0-or-later // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ██████████████ ▐████▌ ██████████████ // ██████████████ ▐████▌ ██████████████ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ // ▐████▌ ▐████▌ pragma solidity ^0.8.9; /// @title Interface of Threshold Network staking contract /// @notice The staking contract enables T owners to have their wallets offline /// and their stake managed by staking providers on their behalf. /// The staking contract does not define operator role. The operator /// responsible for running off-chain client software is appointed by /// the staking provider in the particular application utilizing the /// staking contract. All off-chain client software should be able /// to run without exposing operator's or staking provider’s private /// key and should not require any owner’s keys at all. The stake /// delegation optimizes the network throughput without compromising the /// security of the owners’ stake. interface IStaking { enum StakeType { NU, KEEP, T } // // // Delegating a stake // // /// @notice Creates a delegation with `msg.sender` owner with the given /// staking provider, beneficiary, and authorizer. Transfers the /// given amount of T to the staking contract. /// @dev The owner of the delegation needs to have the amount approved to /// transfer to the staking contract. function stake( address stakingProvider, address payable beneficiary, address authorizer, uint96 amount ) external; /// @notice Allows the Governance to set the minimum required stake amount. /// This amount is required to protect against griefing the staking /// contract and individual applications are allowed to require /// higher minimum stakes if necessary. function setMinimumStakeAmount(uint96 amount) external; // // // Authorizing an application // // /// @notice Allows the Governance to approve the particular application /// before individual stake authorizers are able to authorize it. function approveApplication(address application) external; /// @notice Increases the authorization of the given staking provider for /// the given application by the given amount. Can only be called by /// the authorizer for that staking provider. /// @dev Calls `authorizationIncreased(address stakingProvider, uint256 amount)` /// on the given application to notify the application about /// authorization change. See `IApplication`. function increaseAuthorization( address stakingProvider, address application, uint96 amount ) external; /// @notice Requests decrease of the authorization for the given staking /// provider on the given application by the provided amount. /// It may not change the authorized amount immediatelly. When /// it happens depends on the application. Can only be called by the /// given staking provider’s authorizer. Overwrites pending /// authorization decrease for the given staking provider and /// application if the application agrees for that. If the /// application does not agree for overwriting, the function /// reverts. /// @dev Calls `authorizationDecreaseRequested(address stakingProvider, uint256 amount)` /// on the given application. See `IApplication`. function requestAuthorizationDecrease( address stakingProvider, address application, uint96 amount ) external; /// @notice Requests decrease of all authorizations for the given staking /// provider on all applications by all authorized amount. /// It may not change the authorized amount immediatelly. When /// it happens depends on the application. Can only be called by the /// given staking provider’s authorizer. Overwrites pending /// authorization decrease for the given staking provider and /// application. /// @dev Calls `authorizationDecreaseRequested(address stakingProvider, uint256 amount)` /// for each authorized application. See `IApplication`. function requestAuthorizationDecrease(address stakingProvider) external; /// @notice Called by the application at its discretion to approve the /// previously requested authorization decrease request. Can only be /// called by the application that was previously requested to /// decrease the authorization for that staking provider. /// Returns resulting authorized amount for the application. function approveAuthorizationDecrease(address stakingProvider) external returns (uint96); /// @notice Decreases the authorization for the given `stakingProvider` on /// the given disabled `application`, for all authorized amount. /// Can be called by anyone. function forceDecreaseAuthorization( address stakingProvider, address application ) external; /// @notice Pauses the given application’s eligibility to slash stakes. /// Besides that stakers can't change authorization to the application. /// Can be called only by the Panic Button of the particular /// application. The paused application can not slash stakes until /// it is approved again by the Governance using `approveApplication` /// function. Should be used only in case of an emergency. function pauseApplication(address application) external; /// @notice Disables the given application. The disabled application can't /// slash stakers. Also stakers can't increase authorization to that /// application but can decrease without waiting by calling /// `requestAuthorizationDecrease` at any moment. Can be called only /// by the governance. The disabled application can't be approved /// again. Should be used only in case of an emergency. function disableApplication(address application) external; /// @notice Sets the Panic Button role for the given application to the /// provided address. Can only be called by the Governance. If the /// Panic Button for the given application should be disabled, the /// role address should be set to 0x0 address. function setPanicButton(address application, address panicButton) external; /// @notice Sets the maximum number of applications one staking provider can /// have authorized. Used to protect against DoSing slashing queue. /// Can only be called by the Governance. function setAuthorizationCeiling(uint256 ceiling) external; // // // Stake top-up // // /// @notice Increases the amount of the stake for the given staking provider. /// If `autoIncrease` flag is true then the amount will be added for /// all authorized applications. /// @dev The sender of this transaction needs to have the amount approved to /// transfer to the staking contract. function topUp(address stakingProvider, uint96 amount) external; /// @notice Toggle `autoIncrease` flag. If true then the complete amount /// in top-up will be added to already authorized applications. function toggleAutoAuthorizationIncrease(address stakingProvider) external; // // // Undelegating a stake (unstaking) // // /// @notice Reduces the liquid T stake amount by the provided amount and /// withdraws T to the owner. Reverts if there is at least one /// authorization higher than the sum of the legacy stake and /// remaining liquid T stake or if the unstake amount is higher than /// the liquid T stake amount. Can be called only by the delegation /// owner or the staking provider. function unstakeT(address stakingProvider, uint96 amount) external; /// @notice Sets the legacy KEEP staking contract active stake amount cached /// in T staking contract to 0. Reverts if the amount of liquid T /// staked in T staking contract is lower than the highest /// application authorization. This function allows to unstake from /// KEEP staking contract and still being able to operate in T /// network and earning rewards based on the liquid T staked. Can be /// called only by the delegation owner or the staking provider. function unstakeKeep(address stakingProvider) external; /// @notice Sets to 0 the amount of T that is cached from the legacy /// NU staking contract. Reverts if there is at least one /// authorization higher than the sum of remaining legacy NU stake /// and native T stake for that staking provider or if the unstaked /// amount is higher than the cached legacy stake amount. If succeeded, /// the legacy NU stake can be partially or fully undelegated on /// the legacy NU staking contract. This function allows to unstake /// from NU staking contract while still being able to operate in /// T network and earning rewards based on the native T staked. /// Can be called only by the stake owner or the staking provider. function unstakeNu(address stakingProvider) external; /// @notice Sets cached legacy stake amount to 0, sets the liquid T stake /// amount to 0 and withdraws all liquid T from the stake to the /// owner. Reverts if there is at least one non-zero authorization. /// Can be called only by the delegation owner or the staking /// provider. function unstakeAll(address stakingProvider) external; // // // Keeping information in sync // // /// @notice Sets reward in T tokens for notification of misbehaviour /// of one staking provider. Can only be called by the governance. function setNotificationReward(uint96 reward) external; /// @notice Transfer some amount of T tokens as reward for notifications /// of misbehaviour function pushNotificationReward(uint96 reward) external; /// @notice Withdraw some amount of T tokens from notifiers treasury. /// Can only be called by the governance. function withdrawNotificationReward(address recipient, uint96 amount) external; /// @notice Adds staking providers to the slashing queue along with the /// amount that should be slashed from each one of them. Can only be /// called by application authorized for all staking providers in /// the array. function slash(uint96 amount, address[] memory stakingProviders) external; /// @notice Adds staking providers to the slashing queue along with the /// amount. The notifier will receive reward per each staking /// provider from notifiers treasury. Can only be called by /// application authorized for all staking providers in the array. function seize( uint96 amount, uint256 rewardMultipier, address notifier, address[] memory stakingProviders ) external; /// @notice Takes the given number of queued slashing operations and /// processes them. Receives 5% of the slashed amount. /// Executes `involuntaryAllocationDecrease` function on each /// affected application. function processSlashing(uint256 count) external; // // // Auxiliary functions // // /// @notice Returns the authorized stake amount of the staking provider for /// the application. function authorizedStake(address stakingProvider, address application) external view returns (uint96); /// @notice Returns staked amount of T, Keep and Nu for the specified /// staking provider. /// @dev All values are in T denomination function stakes(address stakingProvider) external view returns ( uint96 tStake, uint96 keepInTStake, uint96 nuInTStake ); /// @notice Returns start staking timestamp. /// @dev This value is set at most once. function getStartStakingTimestamp(address stakingProvider) external view returns (uint256); /// @notice Returns auto-increase flag. function getAutoIncreaseFlag(address stakingProvider) external view returns (bool); /// @notice Returns staked amount of NU for the specified staking provider. function stakedNu(address stakingProvider) external view returns (uint256); /// @notice Gets the stake owner, the beneficiary and the authorizer /// for the specified staking provider address. /// @return owner Stake owner address. /// @return beneficiary Beneficiary address. /// @return authorizer Authorizer address. function rolesOf(address stakingProvider) external view returns ( address owner, address payable beneficiary, address authorizer ); /// @notice Returns length of application array function getApplicationsLength() external view returns (uint256); /// @notice Returns length of slashing queue function getSlashingQueueLength() external view returns (uint256); /// @notice Returns minimum possible stake for T, KEEP or NU in T /// denomination. /// @dev For example, suppose the given staking provider has 10 T, 20 T worth /// of KEEP, and 30 T worth of NU all staked, and the maximum /// application authorization is 40 T, then `getMinStaked` for /// that staking provider returns: /// * 0 T if KEEP stake type specified i.e. /// min = 40 T max - (10 T) = 30 T /// * 10 T if NU stake type specified i.e. /// min = 40 T max - (10 T) = 30 T /// * 0 T if T stake type specified i.e. /// min = 40 T max = 40 T /// In other words, the minimum stake amount for the specified /// stake type is the minimum amount of stake of the given type /// needed to satisfy the maximum application authorization given /// the staked amounts of the T stake types for that staking provider. function getMinStaked(address stakingProvider, StakeType stakeTypes) external view returns (uint96); /// @notice Returns available amount to authorize for the specified application function getAvailableToAuthorize( address stakingProvider, address application ) external view returns (uint96); }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity ^0.8.0; /** * @title ITACoChildToRoot * @notice Interface for x-chain interactions from coordinator to application */ interface ITACoChildToRoot { /** * @notice Signals that an operator address is confirmed * @param stakingProvider Staking provider address * @param operator Operator address */ event OperatorConfirmed(address indexed stakingProvider, address indexed operator); function confirmOperatorAddress(address operator) external; }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity ^0.8.0; /** * @title ITACoRootToChild * @notice Interface for x-chain interactions from application to coordinator */ interface ITACoRootToChild { event OperatorUpdated(address indexed stakingProvider, address indexed operator); event AuthorizationUpdated(address indexed stakingProvider, uint96 amount); function updateOperator(address stakingProvider, address operator) external; function updateAuthorization(address stakingProvider, uint96 amount) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "ContextUpgradeable.sol"; import {Initializable} from "Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "IERC20.sol"; import {IERC20Permit} from "IERC20Permit.sol"; import {Address} from "Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"contract IStaking","name":"_tStaking","type":"address"},{"internalType":"uint96","name":"_minimumAuthorization","type":"uint96"},{"internalType":"uint256","name":"_minOperatorSeconds","type":"uint256"},{"internalType":"uint256","name":"_rewardDuration","type":"uint256"},{"internalType":"uint256","name":"_deauthorizationDuration","type":"uint256"},{"internalType":"uint64[]","name":"_commitmentDurationOptions","type":"uint64[]"},{"internalType":"uint64","name":"_commitmentDeadline","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint96","name":"fromAmount","type":"uint96"},{"indexed":false,"internalType":"uint96","name":"toAmount","type":"uint96"}],"name":"AuthorizationDecreaseApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint96","name":"fromAmount","type":"uint96"},{"indexed":false,"internalType":"uint96","name":"toAmount","type":"uint96"}],"name":"AuthorizationDecreaseRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint96","name":"fromAmount","type":"uint96"},{"indexed":false,"internalType":"uint96","name":"toAmount","type":"uint96"}],"name":"AuthorizationIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint96","name":"fromAmount","type":"uint96"},{"indexed":false,"internalType":"uint96","name":"toAmount","type":"uint96"}],"name":"AuthorizationInvoluntaryDecreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint96","name":"fromAmount","type":"uint96"},{"indexed":false,"internalType":"uint96","name":"toAmount","type":"uint96"}],"name":"AuthorizationReSynchronized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint256","name":"endCommitment","type":"uint256"}],"name":"CommitmentMade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint96","name":"authorized","type":"uint96"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"ManualChildSynchronizationSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTimestamp","type":"uint256"}],"name":"OperatorBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"OperatorConfirmed","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":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"distributor","type":"address"}],"name":"RewardDistributorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint96","name":"amount","type":"uint96"}],"name":"RewardsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakingProvider","type":"address"},{"indexed":false,"internalType":"uint256","name":"penalty","type":"uint256"},{"indexed":true,"internalType":"address","name":"investigator","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Slashed","type":"event"},{"inputs":[],"name":"REWARD_PER_TOKEN_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adjudicator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"approveAuthorizationDecrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"},{"internalType":"uint96","name":"_fromAmount","type":"uint96"},{"internalType":"uint96","name":"_toAmount","type":"uint96"}],"name":"authorizationDecreaseRequested","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"},{"internalType":"uint96","name":"_fromAmount","type":"uint96"},{"internalType":"uint96","name":"_toAmount","type":"uint96"}],"name":"authorizationIncreased","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"authorizationParameters","outputs":[{"internalType":"uint96","name":"_minimumAuthorization","type":"uint96"},{"internalType":"uint64","name":"authorizationDecreaseDelay","type":"uint64"},{"internalType":"uint64","name":"authorizationDecreaseChangePeriod","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"authorizedOverall","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"authorizedStake","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"availableRewards","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"bondOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"childApplication","outputs":[{"internalType":"contract ITACoRootToChild","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitmentDeadline","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitmentDurationOption1","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitmentDurationOption2","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitmentDurationOption3","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitmentDurationOption4","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"confirmOperatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deauthorizationDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startIndex","type":"uint256"},{"internalType":"uint256","name":"_maxStakingProviders","type":"uint256"}],"name":"getActiveStakingProviders","outputs":[{"internalType":"uint256","name":"allAuthorizedTokens","type":"uint256"},{"internalType":"bytes32[]","name":"activeStakingProviders","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"getBeneficiary","outputs":[{"internalType":"address payable","name":"beneficiary","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakingProvidersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"},{"internalType":"uint96","name":"_fromAmount","type":"uint96"},{"internalType":"uint96","name":"_toAmount","type":"uint96"}],"name":"involuntaryAuthorizationDecrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"isOperatorConfirmed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"},{"internalType":"uint64","name":"_commitmentDuration","type":"uint64"}],"name":"makeCommitment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"manualChildSynchronization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minOperatorSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumAuthorization","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"operatorToStakingProvider","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"pendingAuthorizationDecrease","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint96","name":"_reward","type":"uint96"}],"name":"pushReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"registerOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"remainingAuthorizationDecreaseDelay","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"resynchronizeAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDistributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint160","name":"","type":"uint160"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint160","name":"","type":"uint160"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRateDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adjudicator","type":"address"}],"name":"setAdjudicator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITACoRootToChild","name":"_childApplication","type":"address"}],"name":"setChildApplication","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardDistributor","type":"address"}],"name":"setRewardDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"},{"internalType":"uint96","name":"_penalty","type":"uint96"},{"internalType":"address","name":"_investigator","type":"address"}],"name":"slash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingProviderInfo","outputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"operatorConfirmed","type":"bool"},{"internalType":"uint64","name":"operatorStartTimestamp","type":"uint64"},{"internalType":"uint96","name":"authorized","type":"uint96"},{"internalType":"uint96","name":"deauthorizing","type":"uint96"},{"internalType":"uint64","name":"endDeauthorization","type":"uint64"},{"internalType":"uint96","name":"tReward","type":"uint96"},{"internalType":"uint160","name":"rewardPerTokenPaid","type":"uint160"},{"internalType":"uint64","name":"endCommitment","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"stakingProviderToOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakingProviders","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tStaking","outputs":[{"internalType":"contract IStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingProvider","type":"address"}],"name":"withdrawRewards","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103785760003560e01c806397b486e9116101d3578063d8dfde5611610104578063f0820c92116100a2578063f854a27f1161007c578063f854a27f14610a22578063fc0c546a14610a35578063fd2a478814610a5c578063fe9fbb8014610a9857600080fd5b8063f0820c92146109c1578063f2fde38b146109e8578063f520e7e5146109fb57600080fd5b8063df136d65116100de578063df136d6514610971578063e58e018e14610984578063ea0ffa4d146109a5578063ebe2b12b146109b857600080fd5b8063d8dfde5614610904578063dbaa0fc61461091e578063ded56d451461094557600080fd5b8063ba7e5b2b11610171578063c7c49c981161014b578063c7c49c98146108b4578063c8f33c91146108e0578063c9bacaad146108e9578063cd3daf9d146108fc57600080fd5b8063ba7e5b2b14610841578063bb42895114610854578063c4903d5b1461086757600080fd5b8063a1809b95116101ad578063a1809b95146107e1578063a48d2d41146107f4578063ab6ba2d014610807578063acc2166a1461082e57600080fd5b806397b486e9146107945780639c9de028146107bb5780639cafa103146107ce57600080fd5b80636a7f7a90116102ad57806380faa57d1161024b5780638d0853c1116102255780638d0853c1146107035780638da5cb5b1461072a5780638fa990e31461075a578063967c41991461078157600080fd5b806380faa57d146106eb5780638129fc1c146106f357806386f69014146106fb57600080fd5b806375e0ae5a1161028757806375e0ae5a1461060c578063796bb62b1461061f5780637b14729e146106285780637dbee7a31461069857600080fd5b80636a7f7a90146105de578063715018a6146105f157806373761605146105f957600080fd5b806342d866931161031a5780634cc20b11116102f45780634cc20b1114610552578063505a1b311461057957806353c2ed8e146105a457806369bdf9e4146105b757600080fd5b806342d86693146104ed578063495a507a146105005780634bae3b321461053f57600080fd5b806314a854741161035657806314a854741461049d5780633032398f146104b0578063334987ab146104c75780633682a450146104da57600080fd5b806302132c011461037d5780630ceff8c814610392578063104953bf1461048a575b600080fd5b61039061038b36600461367b565b610aab565b005b61041b6103a03660046136b4565b600260208190526000918252604090912080546001820154928201546003909201546001600160a01b038083169460ff600160a01b850416946001600160401b03600160a81b9095048516946001600160601b0380841695600160601b808604831696600160c01b9096048416959285169404909116911689565b604080516001600160a01b039a8b16815298151560208a01526001600160401b03978816908901526001600160601b039586166060890152938516608088015291851660a08701529290921660c0850152931660e0830152909116610100820152610120015b60405180910390f35b6103906104983660046136b4565b611019565b6103906104ab3660046136e6565b61109d565b6104b96103e881565b604051908152602001610481565b6103906104d53660046136b4565b61124c565b6103906104e83660046136b4565b6112ed565b6103906104fb3660046136b4565b6112fa565b6105277f000000000000000000000000000000000000000000000000000000000077f88081565b6040516001600160401b039091168152602001610481565b61039061054d3660046136b4565b611471565b6105277f0000000000000000000000000000000000000000000000000000000000eff10081565b61058c6105873660046136b4565b6115e1565b6040516001600160a01b039091168152602001610481565b60015461058c906001600160a01b031681565b6104b97f000000000000000000000000000000000000000000000000000000000001518081565b6103906105ec3660046136e6565b611678565b61039061199d565b610390610607366004613731565b6119b1565b61039061061a3660046136b4565b611c74565b6104b960075481565b604080516001600160601b037f000000000000000000000000000000000000000000000878678326eac90000001681526001600160401b037f0000000000000000000000000000000000000000000000000000000000eff100166020820181905291810191909152606001610481565b6106db6106a63660046136b4565b6001600160a01b039081166000908152600460209081526040808320549093168252600290522054600160a01b900460ff1690565b6040519015158152602001610481565b6104b9611f06565b610390611f19565b6003546104b9565b6104b97f0000000000000000000000000000000000000000000000000000000000eff10081565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661058c565b6105277f0000000000000000000000000000000000000000000000000000000065a5c6ff81565b60005461058c906001600160a01b031681565b6105277f0000000000000000000000000000000000000000000000000000000001dfe20081565b6105276107c93660046136b4565b612025565b61058c6107dc36600461374e565b612072565b6103906107ef3660046136b4565b61209c565b6103906108023660046136b4565b6120ee565b6105277f0000000000000000000000000000000000000000000000000000000002cfd30081565b60055461058c906001600160a01b031681565b61039061084f366004613767565b612338565b6103906108623660046136b4565b612766565b61089c6108753660046136b4565b6001600160a01b03166000908152600260205260409020600101546001600160601b031690565b6040516001600160601b039091168152602001610481565b61058c6108c23660046136b4565b6001600160a01b039081166000908152600260205260409020541690565b6104b960085481565b6103906108f73660046136e6565b6128a7565b61058c612b8e565b60095461089c90600160a01b90046001600160601b031681565b61058c7f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd781565b61058c6109533660046136b4565b6001600160a01b039081166000908152600460205260409020541690565b60095461058c906001600160a01b031681565b6109976109923660046137a1565b612c25565b6040516104819291906137c3565b6103906109b3366004613813565b612df1565b6104b960065481565b61089c7f000000000000000000000000000000000000000000000878678326eac900000081565b6103906109f63660046136b4565b612f26565b6104b97f00000000000000000000000000000000000000000000000000000000002819a081565b61089c610a303660046136b4565b612f61565b61058c7f000000000000000000000000cdf7028ceab81fa0c6971208e83fa7872994bee581565b61089c610a6a3660046136b4565b6001600160a01b0316600090815260026020526040902060010154600160601b90046001600160601b031690565b6106db610aa63660046136b4565b613030565b81610ab581613030565b610ada5760405162461bcd60e51b8152600401610ad190613853565b60405180910390fd5b6001600160a01b0381163314610ba857604051632de9480760e01b81526001600160a01b0382811660048301526000917f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd790911690632de9480790602401606060405180830381865afa158015610b55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b799190613882565b50909150506001600160a01b0381163314610ba65760405162461bcd60e51b8152600401610ad190613853565b505b82610bb281613059565b6001600160a01b03808516600090815260026020526040902080549091908116908516819003610c4a5760405162461bcd60e51b815260206004820152603760248201527f537065636966696564206f70657261746f7220697320616c726561647920626f60448201527f6e646564207769746820746869732070726f76696465720000000000000000006064820152608401610ad1565b6001600160a01b03811615610d32578154600160a01b900460ff161580610cad57508154610ca9907f000000000000000000000000000000000000000000000000000000000001518090600160a81b90046001600160401b03166138da565b4210155b610d0b5760405162461bcd60e51b815260206004820152602960248201527f4e6f7420656e6f7567682074696d652070617373656420746f206368616e67656044820152681037b832b930ba37b960b91b6064820152608401610ad1565b6001600160a01b038116600090815260046020526040902080546001600160a01b03191690555b6001600160a01b03851615610e61576001600160a01b038581166000908152600460205260409020541615610db55760405162461bcd60e51b8152602060048201526024808201527f537065636966696564206f70657261746f7220697320616c726561647920696e6044820152632075736560e01b6064820152608401610ad1565b856001600160a01b0316856001600160a01b03161480610de657506000610ddb866115e1565b6001600160a01b0316145b610e325760405162461bcd60e51b815260206004820181905260248201527f537065636966696564206f70657261746f7220697320612070726f76696465726044820152606401610ad1565b6001600160a01b03858116600090815260046020526040902080546001600160a01b0319169188169190911790555b8154600160a81b90046001600160401b0316600003610ec657600380546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319166001600160a01b0388161790555b8154600160a01b900460ff1615610f27576001820154600980546001600160601b0392831692601491610f02918591600160a01b9004166138ed565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b81546001600160a01b03868116600168ffffffffffffffff0160a01b03199092168217600160a81b426001600160401b0381169190910291909117855560405190815283821692918916907fa38fda88cb3c476adfa74c64be4d74c915b19a3e587e77b887ca804fb9c82c7c9060200160405180910390a4815460ff60a01b191682556000546040516346696b9f60e11b81526001600160a01b038881166004830152878116602483015290911690638cd2d73e90604401600060405180830381600087803b158015610ff957600080fd5b505af115801561100d573d6000803e3d6000fd5b50505050505050505050565b6110216130f8565b6000816001600160a01b03163b1161107b5760405162461bcd60e51b815260206004820152601a60248201527f4368696c6420617070206d75737420626520636f6e74726163740000000000006044820152606401610ad1565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b336001600160a01b037f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd716146110e55760405162461bcd60e51b8152600401610ad190613914565b826110ef81613059565b6001600160a01b03841660009081526002602052604090208054600160a01b900460ff1615611173576111228185613153565b61112c83856138ed565b6009805460149061114e908490600160a01b90046001600160601b03166138ed565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001810180546001600160601b0319166001600160601b0385811691821792839055600160601b90920490911611156111cf57600181018054600160601b6001600160601b03821602600160601b600160c01b03199091161790555b604080516001600160601b038087168252851660208201526001600160a01b038716917f72cc05b0073888d0e26528638b21fdaa2d4af96a641469fe63a87de3c4a84d79910160405180910390a260018101546001600160601b031660000361123b5761123b856131cd565b6112458582613267565b5050505050565b6112546130f8565b6001546001600160a01b03908116908216036112cb5760405162461bcd60e51b815260206004820152603060248201527f4e65772061646472657373206d757374206e6f7420626520657175616c20746f60448201526f207468652063757272656e74206f6e6560801b6064820152608401610ad1565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6112f73382610aab565b50565b8061130481613059565b600061130f836115e1565b9050336001600160a01b038216146113695760405162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206d7573742062652062656e65666963696172790000000000006044820152606401610ad1565b6001600160a01b0383166000908152600260208190526040909120908101546001600160601b0316806113d65760405162461bcd60e51b81526020600482015260156024820152744e6f2072657761726420746f20776974686472617760581b6044820152606401610ad1565b6002820180546001600160601b03191690556040516001600160601b03821681526001600160a01b0384811691908716907f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e9060200160405180910390a36112456001600160a01b037f000000000000000000000000cdf7028ceab81fa0c6971208e83fa7872994bee516846001600160601b0384166132e7565b6000546001600160a01b031633146114e65760405162461bcd60e51b815260206004820152603260248201527f4f6e6c79206368696c64206170706c69636174696f6e20616c6c6f7765642074604482015271379031b7b73334b9369037b832b930ba37b960711b6064820152608401610ad1565b6001600160a01b03808216600090815260046020526040902054168061150a575050565b6001600160a01b03811660009081526002602052604090208054600160a01b900460ff166115dc5761153b82613059565b805460ff60a01b1916600160a01b90811782556001820154600980546001600160601b0392831693919260149261157792869291900416613959565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550826001600160a01b0316826001600160a01b03167fdbc602361eaa7fb503df3c16078c71b39d28412df5e9980bec6f489f78bb175c60405160405180910390a35b505050565b604051632de9480760e01b81526001600160a01b0382811660048301526000917f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd790911690632de9480790602401606060405180830381865afa15801561164c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116709190613882565b509392505050565b336001600160a01b037f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd716146116c05760405162461bcd60e51b8152600401610ad190613914565b826116ca81613059565b6001600160a01b038416600090815260026020526040902060018101546001600160601b0390811690841611156117565760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e7420746f2064656372656173652067726561746572207468616e20604482015269185d5d1a1bdc9a5e995960b21b6064820152608401610ad1565b6001600160601b038316158061179e57507f000000000000000000000000000000000000000000000878678326eac90000006001600160601b0316836001600160601b031610155b6118045760405162461bcd60e51b815260206004820152603160248201527f526573756c74696e6720617574686f72697a6174696f6e2077696c6c206265206044820152706c657373207468616e206d696e696d756d60781b6064820152608401610ad1565b6003810154426001600160401b0390911611156118825760405162461bcd60e51b815260206004820152603660248201527f43616e27742072657175657374206465617574686f72697a6174696f6e206265604482015275199bdc9948195b99081bd98818dbdb5b5a5d1b595b9d60521b6064820152608401610ad1565b8054600160a01b900460ff161561189d5761189d8185613153565b6001810180546001600160601b0319166001600160601b0386161790556118c483856138ed565b6001820180546001600160601b0392909216600160601b02600160601b600160c01b031990921691909117905561191b7f0000000000000000000000000000000000000000000000000000000000eff100426138da565b6001820180546001600160401b0392909216600160c01b026001600160c01b03909216919091179055604080516001600160601b038087168252851660208201526001600160a01b038716917f38b892bbec4f2d2e5372217fea7a4784417ae853489cd584b204f534b5c08f9591015b60405180910390a26112458582613267565b6119a56130f8565b6119af6000613346565b565b60006119bc81613059565b6005546001600160a01b03163314611a205760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79206469737472696275746f722063616e2070757368207265776172646044820152607360f81b6064820152608401610ad1565b6000826001600160601b031611611a795760405162461bcd60e51b815260206004820152601860248201527f526577617264206d7573742062652073706563696669656400000000000000006044820152606401610ad1565b600954600160a01b90046001600160601b0316611ad85760405162461bcd60e51b815260206004820152601b60248201527f4e6f20616374697665207374616b696e672070726f76696465727300000000006044820152606401610ad1565b6006544210611b3b577f00000000000000000000000000000000000000000000000000000000002819a0611b166103e8670de0b6b3a7640000613979565b611b29906001600160601b038516613979565b611b339190613990565b600755611bc2565b600042600654611b4b91906139b2565b9050600060075482611b5d9190613979565b90507f00000000000000000000000000000000000000000000000000000000002819a081611b956103e8670de0b6b3a7640000613979565b611ba8906001600160601b038816613979565b611bb291906138da565b611bbc9190613990565b60075550505b426008819055611bf3907f00000000000000000000000000000000000000000000000000000000002819a0906138da565b6006556040516001600160601b03831681527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1611c706001600160a01b037f000000000000000000000000cdf7028ceab81fa0c6971208e83fa7872994bee51633306001600160601b0386166133b7565b5050565b80611c7e81613059565b6001600160a01b03821660009081526002602052604090206001810154600160601b90046001600160601b0316611d035760405162461bcd60e51b8152602060048201526024808201527f5468657265206973206e6f206465617574686f72697a696e6720696e2070726f6044820152636365737360e01b6064820152608401610ad1565b600181015442600160c01b9091046001600160401b03161115611d7c5760405162461bcd60e51b815260206004820152602b60248201527f417574686f72697a6174696f6e20646563726561736520686173206e6f74206660448201526a1a5b9a5cda1959081e595d60aa1b6064820152608401610ad1565b604051633af0572d60e11b81526001600160a01b0384811660048301526000917f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd7909116906375e0ae5a906024016020604051808303816000875af1158015611de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0d91906139c5565b8254909150600160a01b900460ff1615611e81576001820154611e3a9082906001600160601b03166138ed565b60098054601490611e5c908490600160a01b90046001600160601b03166138ed565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001820154604080516001600160601b03928316815291831660208301526001600160a01b038616917f5879576c6c99ad6d1778483480ffa393a0f7b8ac18d53402720d8dd8e4617f7d910160405180910390a26001600160601b03811660018301819055600003611ef657611ef6846131cd565b611f008483613267565b50505050565b6000611f14426006546133f0565b905090565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015611f5e5750825b90506000826001600160401b03166001148015611f7a5750303b155b905081158015611f88575080155b15611fa65760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611fd057845460ff60401b1916600160401b1785555b611fd93361340a565b831561124557845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050565b6001600160a01b038116600090815260026020526040812060010154600160c01b90046001600160401b03164281116120615750600092915050565b61206b42826139b2565b9392505050565b6003818154811061208257600080fd5b6000918252602090912001546001600160a01b0316905081565b6120a46130f8565b600580546001600160a01b0319166001600160a01b0383169081179091556040517f075c02c513a415bd4ff5976f8aa6fc5767d2183daca9ec00ab71ce78e8bf815890600090a250565b806120f881613059565b6001600160a01b038281166000818152600260205260408082209051637004922d60e11b815260048101939093523060248401529290917f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd79091169063e009245a90604401602060405180830381865afa15801561217a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061219e91906139c5565b60018301549091506001600160601b038083169116116121f95760405162461bcd60e51b81526020600482015260166024820152754e6f7468696e6720746f2073796e6368726f6e697a6560501b6044820152606401610ad1565b8154600160a01b900460ff161561226a5760018201546122239082906001600160601b03166138ed565b60098054601490612245908490600160a01b90046001600160601b03166138ed565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001820154604080516001600160601b03928316815291831660208301526001600160a01b038616917f5e26a115e9efdff9c71141dec1f9cc5dd2ec5e717da782cef55a475506e56788910160405180910390a26001820180546001600160601b0319166001600160601b0383811691821792839055600160601b909204909116111561231a57600182018054600160601b6001600160601b03821602600160601b600160c01b03199091161790555b60018201546001600160601b0316600003611ef657611ef6846131cd565b8161234281613030565b61235e5760405162461bcd60e51b8152600401610ad190613853565b6001600160a01b038116331461242c57604051632de9480760e01b81526001600160a01b0382811660048301526000917f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd790911690632de9480790602401606060405180830381865afa1580156123d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123fd9190613882565b50909150506001600160a01b038116331461242a5760405162461bcd60e51b8152600401610ad190613853565b505b7f0000000000000000000000000000000000000000000000000000000065a5c6ff6001600160401b031642106124a45760405162461bcd60e51b815260206004820152601860248201527f436f6d6d69746d656e742077696e646f7720636c6f73656400000000000000006044820152606401610ad1565b6000826001600160401b03161180156125a157507f000000000000000000000000000000000000000000000000000000000077f8806001600160401b0316826001600160401b0316148061252957507f0000000000000000000000000000000000000000000000000000000000eff1006001600160401b0316826001600160401b0316145b8061256557507f0000000000000000000000000000000000000000000000000000000001dfe2006001600160401b0316826001600160401b0316145b806125a157507f0000000000000000000000000000000000000000000000000000000002cfd3006001600160401b0316826001600160401b0316145b6126095760405162461bcd60e51b815260206004820152603360248201527f436f6d6d69746d656e74206475726174696f6e206d75737420626520657175616044820152726c20746f206f6e65206f66206f7074696f6e7360681b6064820152608401610ad1565b6001600160a01b03831660009081526002602052604090206001810154600160c01b90046001600160401b03161561269b5760405162461bcd60e51b815260206004820152602f60248201527f436f6d6d69746d656e742063616e2774206265206d61646520647572696e672060448201526e3232b0baba3437b934bd30ba34b7b760891b6064820152608401610ad1565b60038101546001600160401b0316156126f65760405162461bcd60e51b815260206004820152601760248201527f436f6d6d69746d656e7420616c7265616479206d6164650000000000000000006044820152606401610ad1565b61270083426139e2565b60038201805467ffffffffffffffff19166001600160401b039290921691821790556040519081526001600160a01b038516907f293c61c79ecf0bcac67f97a5925ba2e75c025c6231a4ab629862b570730a264b9060200160405180910390a250505050565b6001600160a01b0381166127c75760405162461bcd60e51b815260206004820152602260248201527f5374616b696e672070726f7669646572206d7573742062652073706563696669604482015261195960f21b6064820152608401610ad1565b6001600160a01b038181166000818152600260209081526040918290206001810154815484516001600160601b03909216825290951691850191909152927f8dd220764537278d5094ef78e8e7584b819d083dd7905d32d09a928ec26466f2910160405180910390a261283a8282613267565b60005481546040516346696b9f60e11b81526001600160a01b0385811660048301529182166024820152911690638cd2d73e906044015b600060405180830381600087803b15801561288b57600080fd5b505af115801561289f573d6000803e3d6000fd5b505050505050565b336001600160a01b037f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd716146128ef5760405162461bcd60e51b8152600401610ad190613914565b826128f981613059565b6001600160a01b0384161580159061291a57506000826001600160601b0316115b6129715760405162461bcd60e51b815260206004820152602260248201527f496e70757420706172616d6574657273206d7573742062652073706563696669604482015261195960f21b6064820152608401610ad1565b7f000000000000000000000000000000000000000000000878678326eac90000006001600160601b0316826001600160601b03161015612a065760405162461bcd60e51b815260206004820152602a60248201527f417574686f72697a6174696f6e206d7573742062652067726561746572207468604482015269616e206d696e696d756d60b01b6064820152608401610ad1565b6001600160a01b0380851660009081526002602090815260408083206004909252909120549091161580612a5457506001600160a01b03808616600081815260046020526040902054909116145b612abd5760405162461bcd60e51b815260206004820152603460248201527f412070726f76696465722063616e277420626520616e206f70657261746f72206044820152733337b91030b737ba3432b910383937bb34b232b960611b6064820152608401610ad1565b8054600160a01b900460ff1615612b2957612ad88185613153565b612ae284846138ed565b60098054601490612b04908490600160a01b90046001600160601b0316613959565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001810180546001600160601b0319166001600160601b0385811691821790925560408051928716835260208301919091526001600160a01b038716917f9e46043a7120cf056d21eda9b6d78ffd99571a62fb6ff91a471a73e4b8484e1c910161198b565b600954600090600160a01b90046001600160601b03168103612bba57506009546001600160a01b031690565b600954600754600854600092600160a01b90046001600160601b03169190612be0611f06565b612bea91906139b2565b612bf49190613979565b612bfe9190613990565b600954612c1491906001600160a01b03166138da565b9050612c1f8161341b565b91505090565b600354600090606090808510612c715760405162461bcd60e51b81526020600482015260116024820152700aee4dedcce40e6e8c2e4e840d2dcc8caf607b1b6044820152606401610ad1565b8315801590612c88575080612c8685876138da565b105b15612c9a57612c9784866138da565b90505b612ca485826139b2565b6001600160401b03811115612cbb57612cbb613a02565b604051908082528060200260200182016040528015612ce4578160200160208202803683370190505b5060009350915082855b82811015612de457600060038281548110612d0b57612d0b613a18565b60009182526020808320909101546001600160a01b031680835260029091526040822090925090612d3b82613453565b6001600160601b031690507f000000000000000000000000000000000000000000000878678326eac90000006001600160601b0316811080612d8657508154600160a01b900460ff16155b15612d9357505050612ddc565b6001600160601b0319606084901b1681178786612daf81613a2e565b975081518110612dc157612dc1613a18565b6020908102919091010152612dd681896138da565b97505050505b600101612cee565b5080835250509250929050565b6001546001600160a01b03163314612e555760405162461bcd60e51b815260206004820152602160248201527f4f6e6c792061646a7564696361746f7220616c6c6f77656420746f20736c61736044820152600d60fb1b6064820152608401610ad1565b604080516001808252818301909252600091602080830190803683370190505090508381600081518110612e8b57612e8b613a18565b6001600160a01b0392831660209182029290920101526040516383ddba8f60e01b81527f00000000000000000000000001b67b1194c75264d06f808a921228a95c765dd7909116906383ddba8f90612eee90869060649087908790600401613a47565b600060405180830381600087803b158015612f0857600080fd5b505af1158015612f1c573d6000803e3d6000fd5b5050505050505050565b612f2e6130f8565b6001600160a01b038116612f5857604051631e4fbdf760e01b815260006004820152602401610ad1565b6112f781613346565b6001600160a01b03811660009081526002602052604081208054600160a01b900460ff16612f9c57600201546001600160601b031692915050565b60028101546000906001600160601b0316612fc16103e8670de0b6b3a7640000613979565b6002840154600160601b90046001600160a01b0316612fde612b8e565b612fe89190613aba565b6001850154613009916001600160a01b0316906001600160601b0316613979565b6130139190613990565b61301d91906138da565b905061302881613477565b949350505050565b6001600160a01b03166000908152600260205260409020600101546001600160601b0316151590565b613061612b8e565b600980546001600160a01b0319166001600160a01b0392909216919091179055613089611f06565b6008556001600160a01b038116156112f7576001600160a01b03811660009081526002602052604090206130bc82612f61565b60029190910180546001600160601b0319166001600160601b0390921691821781556009546001600160a01b0316600160601b02909117905550565b3361312a7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146119af5760405163118cdaa760e01b8152336004820152602401610ad1565b60018201546001600160601b03828116911614611c705760018201546131839082906001600160601b03166138ed565b600980546014906131a5908490600160a01b90046001600160601b03166138ed565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050565b6001600160a01b03818116600081815260026020908152604080832080548616845260049283905281842080546001600160a01b031916905580546001600160a81b03191681556001810180546001600160c01b0316905560038101805467ffffffffffffffff19169055835491516346696b9f60e11b815292830194909452602482019290925291921690638cd2d73e90604401612871565b600061327282613453565b6000546040516334cdb41f60e11b81526001600160a01b0386811660048301526001600160601b038416602483015292935091169063699b683e90604401600060405180830381600087803b1580156132ca57600080fd5b505af11580156132de573d6000803e3d6000fd5b50505050505050565b6040516001600160a01b038381166024830152604482018390526115dc91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506134ab565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6040516001600160a01b038481166024830152838116604483015260648201839052611f009186918216906323b872dd90608401613314565b60008183106133ff5781613401565b825b90505b92915050565b61341261350e565b6112f781613557565b60006001600160a01b0382111561344f576040516306dfcc6560e41b815260a0600482015260248101839052604401610ad1565b5090565b6001810154600090613404906001600160601b03600160601b8204811691166138ed565b60006001600160601b0382111561344f576040516306dfcc6560e41b81526060600482015260248101839052604401610ad1565b60006134c06001600160a01b0384168361355f565b905080516000141580156134e55750808060200190518101906134e39190613ada565b155b156115dc57604051635274afe760e01b81526001600160a01b0384166004820152602401610ad1565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166119af57604051631afcd79f60e31b815260040160405180910390fd5b612f2e61350e565b60606134018383600084600080856001600160a01b031684866040516135859190613afc565b60006040518083038185875af1925050503d80600081146135c2576040519150601f19603f3d011682016040523d82523d6000602084013e6135c7565b606091505b50915091506135d78683836135e1565b9695505050505050565b6060826135f6576135f18261363d565b61206b565b815115801561360d57506001600160a01b0384163b155b1561363657604051639996b31560e01b81526001600160a01b0385166004820152602401610ad1565b508061206b565b80511561364d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b03811681146112f757600080fd5b6000806040838503121561368e57600080fd5b823561369981613666565b915060208301356136a981613666565b809150509250929050565b6000602082840312156136c657600080fd5b813561206b81613666565b6001600160601b03811681146112f757600080fd5b6000806000606084860312156136fb57600080fd5b833561370681613666565b92506020840135613716816136d1565b91506040840135613726816136d1565b809150509250925092565b60006020828403121561374357600080fd5b813561206b816136d1565b60006020828403121561376057600080fd5b5035919050565b6000806040838503121561377a57600080fd5b823561378581613666565b915060208301356001600160401b03811681146136a957600080fd5b600080604083850312156137b457600080fd5b50508035926020909101359150565b60006040820184835260206040602085015281855180845260608601915060208701935060005b81811015613806578451835293830193918301916001016137ea565b5090979650505050505050565b60008060006060848603121561382857600080fd5b833561383381613666565b92506020840135613843816136d1565b9150604084013561372681613666565b6020808252601590820152742737ba1037bbb732b91037b910383937bb34b232b960591b604082015260600190565b60008060006060848603121561389757600080fd5b83516138a281613666565b60208501519093506138b381613666565b604085015190925061372681613666565b634e487b7160e01b600052601160045260246000fd5b80820180821115613404576134046138c4565b6001600160601b0382811682821603908082111561390d5761390d6138c4565b5092915050565b60208082526025908201527f43616c6c6572206d757374206265207468652054207374616b696e6720636f6e6040820152641d1c9858dd60da1b606082015260800190565b6001600160601b0381811683821601908082111561390d5761390d6138c4565b8082028115828204841417613404576134046138c4565b6000826139ad57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115613404576134046138c4565b6000602082840312156139d757600080fd5b815161206b816136d1565b6001600160401b0381811683821601908082111561390d5761390d6138c4565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060018201613a4057613a406138c4565b5060010190565b6001600160601b038516815260208082018590526001600160a01b038481166040840152608060608401819052845190840181905260009285810192909160a0860190855b81811015613aaa578551841683529484019491840191600101613a8c565b50909a9950505050505050505050565b6001600160a01b0382811682821603908082111561390d5761390d6138c4565b600060208284031215613aec57600080fd5b8151801515811461206b57600080fd5b6000825160005b81811015613b1d5760208186018101518583015201613b03565b50600092019182525091905056fea264697066735822122016032ba9c1625ae2a7d171c9601bb146581c6c4bafa5bb1cec03e9c28b90491864736f6c63430008170033
Deployed Bytecode Sourcemap
493:35149:15:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30338:2031;;;;;;:::i;:::-;;:::i;:::-;;6253:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6253:66:15;;;;;-1:-1:-1;;;6253:66:15;;;;-1:-1:-1;;;;;;;;6253:66:15;;;;;;-1:-1:-1;;;;;6253:66:15;;;;-1:-1:-1;;;6253:66:15;;;;;;-1:-1:-1;;;6253:66:15;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1204:15:16;;;1186:34;;1263:14;;1256:22;1251:2;1236:18;;1229:50;-1:-1:-1;;;;;1352:15:16;;;1332:18;;;1325:43;-1:-1:-1;;;;;1449:15:16;;;1444:2;1429:18;;1422:43;1502:15;;;1496:3;1481:19;;1474:44;1555:15;;;1166:3;1534:19;;1527:44;1608:15;;;;1602:3;1587:19;;1580:44;1661:15;;1655:3;1640:19;;1633:44;1714:15;;;1708:3;1693:19;;1686:44;1135:3;1120:19;6253:66:15;;;;;;;;10232:228;;;;;;:::i;:::-;;:::i;18670:852::-;;;;;;:::i;:::-;;:::i;5467:61::-;;5521:7;5467:61;;;;;2835:25:16;;;2823:2;2808:18;5467:61:15;2689:177:16;10557:258:15;;;;;;:::i;:::-;;:::i;30035:115::-;;;;;;:::i;:::-;;:::i;15901:546::-;;;;;;:::i;:::-;;:::i;5829:49::-;;;;;;;;-1:-1:-1;;;;;3033:31:16;;;3015:50;;3003:2;2988:18;5829:49:15;2871:200:16;32438:865:15;;;;;;:::i;:::-;;:::i;5884:49::-;;;;;28648:185;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;3256:32:16;;;3238:51;;3226:2;3211:18;28648:185:15;3076:219:16;6220:26:15;;;;;-1:-1:-1;;;;;6220:26:15;;;5680:43;;;;;19829:1121;;;;;;:::i;:::-;;:::i;3131:101:12:-;;;:::i;14791:929:15:-;;;;;;:::i;:::-;;:::i;21115:968::-;;;;;;:::i;:::-;;:::i;6507:33::-;;;;;;12070:414;;;;-1:-1:-1;;;;;12357:20:15;3972:39:16;3954:58;;-1:-1:-1;;;;;12398:23:15;4085:15:16;4080:2;4065:18;;4058:43;;;4117:18;;;4110:43;;;;3942:2;3927:18;12070:414:15;3758:401:16;29245:277:15;;;;;;:::i;:::-;-1:-1:-1;;;;;29356:39:15;;;29314:4;29356:39;;;:28;:39;;;;;;;;;;;;29440:36;;:19;:36;;;29493:22;-1:-1:-1;;;29493:22:15;;;;;29245:277;;;;4329:14:16;;4322:22;4304:41;;4292:2;4277:18;29245:277:15;4164:187:16;13470:129:15;;;:::i;10067:86::-;;;:::i;29611:116::-;29697:16;:23;29611:116;;5774:48;;;;;2417:144:12;1289:22;2546:8;-1:-1:-1;;;;;2546:8:12;2417:144;;6049:42:15;;;;;6174:40;;;;;-1:-1:-1;;;;;6174:40:15;;;5939:49;;;;;26037:373;;;;;;:::i;:::-;;:::i;6325:33::-;;;;;;:::i;:::-;;:::i;12620:187::-;;;;;;:::i;:::-;;:::i;22258:881::-;;;;;;:::i;:::-;;:::i;5994:49::-;;;;;6436:32;;;;;-1:-1:-1;;;;;6436:32:15;;;23368:1053;;;;;;:::i;:::-;;:::i;34507:470::-;;;;;;:::i;:::-;;:::i;25050:154::-;;;;;;:::i;:::-;-1:-1:-1;;;;;25149:37:15;25124:6;25149:37;;;:19;:37;;;;;:48;;;-1:-1:-1;;;;;25149:48:15;;25050:154;;;;-1:-1:-1;;;;;5367:39:16;;;5349:58;;5337:2;5322:18;25050:154:15;5205:208:16;24801:163:15;;;;;;:::i;:::-;-1:-1:-1;;;;;24911:37:15;;;24885:7;24911:37;;;:19;:37;;;;;:46;;;24801:163;6546:29;;;;;;17255:1117;;;;;;:::i;:::-;;:::i;13691:349::-;;;:::i;6622:31::-;;;;;-1:-1:-1;;;6622:31:15;;-1:-1:-1;;;;;6622:31:15;;;6098:34;;;;;24567:149;;;;;;:::i;:::-;-1:-1:-1;;;;;24670:39:15;;;24644:7;24670:39;;;:28;:39;;;;;;;;24567:149;6581:35;;;;;-1:-1:-1;;;;;6581:35:15;;;27088:1471;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;35262:378::-;;;;;;:::i;:::-;;:::i;6474:27::-;;;;;;5630:44;;;;;3381:215:12;;;;;;:::i;:::-;;:::i;5729:39:15:-;;;;;14194:450;;;;;;:::i;:::-;;:::i;6138:29::-;;;;;25674:193;;;;;;:::i;:::-;-1:-1:-1;;;;;25809:37:15;25784:6;25809:37;;;:19;:37;;;;;:51;;;-1:-1:-1;;;25809:51:15;;-1:-1:-1;;;;;25809:51:15;;25674:193;28944:151;;;;;;:::i;:::-;;:::i;30338:2031::-;30461:16;9709:30;9722:16;9709:12;:30::i;:::-;9701:64;;;;-1:-1:-1;;;9701:64:15;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;;;;;9779:30:15;;9799:10;9779:30;9775:184;;9847:34;;-1:-1:-1;;;9847:34:15;;-1:-1:-1;;;;;3256:32:16;;;9847:34:15;;;3238:51:16;9826:13:15;;9847:8;:16;;;;;;3211:18:16;;9847:34:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;9825:56:15;;-1:-1:-1;;;;;;;9903:19:15;;9912:10;9903:19;9895:53;;;;-1:-1:-1;;;9895:53:15;;;;;;;:::i;:::-;9811:148;9775:184;30492:16:::1;9278:38;9299:16;9278:20;:38::i;:::-;-1:-1:-1::0;;;;;30555:37:15;;::::2;30520:32;30555:37:::0;;;:19:::2;:37;::::0;;;;30629:13;;30555:37;;30629:13;;::::2;::::0;30673:29;::::2;::::0;;;30652:131:::2;;;::::0;-1:-1:-1;;;30652:131:15;;8649:2:16;30652:131:15::2;::::0;::::2;8631:21:16::0;8688:2;8668:18;;;8661:30;8727:34;8707:18;;;8700:62;8798:25;8778:18;;;8771:53;8841:19;;30652:131:15::2;8447:419:16::0;30652:131:15::2;-1:-1:-1::0;;;;;30842:30:15;::::2;::::0;30838:424:::2;;30914:22:::0;;-1:-1:-1;;;30914:22:15;::::2;;;30913:23;::::0;:123:::2;;-1:-1:-1::0;30987:27:15;;30979:57:::2;::::0;31018:18:::2;::::0;-1:-1:-1;;;30987:27:15;::::2;-1:-1:-1::0;;;;;30987:27:15::2;30979:57;:::i;:::-;30960:15;:76;;30913:123;30888:223;;;::::0;-1:-1:-1;;;30888:223:15;;9335:2:16;30888:223:15::2;::::0;::::2;9317:21:16::0;9374:2;9354:18;;;9347:30;9413:34;9393:18;;;9386:62;-1:-1:-1;;;9464:18:16;;;9457:39;9513:19;;30888:223:15::2;9133:405:16::0;30888:223:15::2;-1:-1:-1::0;;;;;31192:46:15;::::2;31249:1;31192:46:::0;;;:28:::2;:46;::::0;;;;:59;;-1:-1:-1;;;;;;31192:59:15::2;::::0;;30838:424:::2;-1:-1:-1::0;;;;;31276:23:15;::::2;::::0;31272:509:::2;;-1:-1:-1::0;;;;;31340:39:15;;::::2;31391:1;31340:39:::0;;;:28:::2;:39;::::0;;;;;::::2;:53:::0;31315:148:::2;;;::::0;-1:-1:-1;;;31315:148:15;;9745:2:16;31315:148:15::2;::::0;::::2;9727:21:16::0;9784:2;9764:18;;;9757:30;9823:34;9803:18;;;9796:62;-1:-1:-1;;;9874:18:16;;;9867:34;9918:19;;31315:148:15::2;9543:400:16::0;31315:148:15::2;31515:16;-1:-1:-1::0;;;;;31502:29:15::2;:9;-1:-1:-1::0;;;;;31502:29:15::2;;:72;;;-1:-1:-1::0;31572:1:15::2;31535:25;31550:9:::0;31535:14:::2;:25::i;:::-;-1:-1:-1::0;;;;;31535:39:15::2;;31502:72;31477:163;;;::::0;-1:-1:-1;;;31477:163:15;;10150:2:16;31477:163:15::2;::::0;::::2;10132:21:16::0;;;10169:18;;;10162:30;10228:34;10208:18;;;10201:62;10280:18;;31477:163:15::2;9948:356:16::0;31477:163:15::2;-1:-1:-1::0;;;;;31712:39:15;;::::2;;::::0;;;:28:::2;:39;::::0;;;;:58;;-1:-1:-1;;;;;;31712:58:15::2;::::0;;::::2;::::0;;;::::2;::::0;;31272:509:::2;31795:27:::0;;-1:-1:-1;;;31795:27:15;::::2;-1:-1:-1::0;;;;;31795:27:15::2;;:32:::0;31791:102:::2;;31843:16;:39:::0;;::::2;::::0;::::2;::::0;;-1:-1:-1;31843:39:15;;;;;::::2;::::0;;-1:-1:-1;;;;;;31843:39:15::2;-1:-1:-1::0;;;;;31843:39:15;::::2;;::::0;;31791:102:::2;31907:22:::0;;-1:-1:-1;;;31907:22:15;::::2;;;31903:89;;;31966:15;::::0;::::2;::::0;31945:17:::2;:36:::0;;-1:-1:-1;;;;;31966:15:15;;::::2;::::0;31945:17:::2;::::0;:36:::2;::::0;31966:15;;-1:-1:-1;;;31945:36:15;::::2;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;31945:36:15::2;;;;;-1:-1:-1::0;;;;;31945:36:15::2;;;;;;31903:89;32070:25:::0;;-1:-1:-1;;;;;32070:25:15;;::::2;-1:-1:-1::0;;;;;;32105:53:15;;;;;-1:-1:-1;;;32142:15:15::2;-1:-1:-1::0;;;;;32105:53:15;::::2;::::0;;;::::2;::::0;;;::::2;::::0;;32173:78:::2;::::0;2835:25:16;;;32173:78:15;;::::2;::::0;32070:25;32173:78;::::2;::::0;::::2;::::0;2823:2:16;2808:18;32173:78:15::2;;;;;;;32262:30:::0;;-1:-1:-1;;;;32262:30:15::2;::::0;;-1:-1:-1;32302:16:15;:60:::2;::::0;-1:-1:-1;;;32302:60:15;;-1:-1:-1;;;;;10735:15:16;;;32302:60:15::2;::::0;::::2;10717:34:16::0;10787:15;;;10767:18;;;10760:43;32302:16:15;;::::2;::::0;:31:::2;::::0;10652:18:16;;32302:60:15::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;30510:1859;;9968:1:::1;30338:2031:::0;;;:::o;10232:228::-;2310:13:12;:11;:13::i;:::-;10375:1:15::1;10342:17;-1:-1:-1::0;;;;;10334:38:15::1;;:42;10326:81;;;::::0;-1:-1:-1;;;10326:81:15;;11016:2:16;10326:81:15::1;::::0;::::1;10998:21:16::0;11055:2;11035:18;;;11028:30;11094:28;11074:18;;;11067:56;11140:18;;10326:81:15::1;10814:350:16::0;10326:81:15::1;10417:16;:36:::0;;-1:-1:-1;;;;;;10417:36:15::1;-1:-1:-1::0;;;;;10417:36:15;;;::::1;::::0;;;::::1;::::0;;10232:228::o;18670:852::-;9453:10;-1:-1:-1;;;;;9475:8:15;9453:31;;9445:81;;;;-1:-1:-1;;;9445:81:15;;;;;;;:::i;:::-;18857:16:::1;9278:38;9299:16;9278:20;:38::i;:::-;-1:-1:-1::0;;;;;18920:37:15;::::2;18885:32;18920:37:::0;;;:19:::2;:37;::::0;;;;18971:22;;-1:-1:-1;;;18971:22:15;::::2;;;18967:160;;;19009:49;19040:4;19046:11;19009:30;:49::i;:::-;19093:23;19107:9:::0;19093:11;:23:::2;:::i;:::-;19072:17;:44:::0;;:17:::2;::::0;:44:::2;::::0;;;-1:-1:-1;;;19072:44:15;::::2;-1:-1:-1::0;;;;;19072:44:15::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;19072:44:15::2;;;;;-1:-1:-1::0;;;;;19072:44:15::2;;;;;;18967:160;19137:15;::::0;::::2;:27:::0;;-1:-1:-1;;;;;;19137:27:15::2;-1:-1:-1::0;;;;;19137:27:15;;::::2;::::0;;::::2;::::0;;;;-1:-1:-1;;;19196:18:15;;::::2;::::0;;::::2;-1:-1:-1::0;19174:103:15::2;;;19251:15;::::0;::::2;::::0;;-1:-1:-1;;;;;;;;19251:15:15;::::2;19230:36;-1:-1:-1::0;;;;;;;;19230:36:15;;::::2;;::::0;;19174:103:::2;19291:75;::::0;;-1:-1:-1;;;;;11808:15:16;;;11790:34;;11860:15;;11855:2;11840:18;;11833:43;-1:-1:-1;;;;;19291:75:15;::::2;::::0;::::2;::::0;11718:18:16;19291:75:15::2;;;;;;;19381:15;::::0;::::2;::::0;-1:-1:-1;;;;;19381:15:15::2;;:20:::0;19377:85:::2;;19417:34;19434:16;19417;:34::i;:::-;19471:44;19492:16;19510:4;19471:20;:44::i;:::-;18875:647;9536:1:::1;18670:852:::0;;;:::o;10557:258::-;2310:13:12;:11;:13::i;:::-;10686:11:15::1;::::0;-1:-1:-1;;;;;10686:11:15;;::::1;10653:45:::0;;::::1;::::0;10632:140:::1;;;::::0;-1:-1:-1;;;10632:140:15;;12089:2:16;10632:140:15::1;::::0;::::1;12071:21:16::0;12128:2;12108:18;;;12101:30;12167:34;12147:18;;;12140:62;-1:-1:-1;;;12218:18:16;;;12211:46;12274:19;;10632:140:15::1;11887:412:16::0;10632:140:15::1;10782:11;:26:::0;;-1:-1:-1;;;;;;10782:26:15::1;-1:-1:-1::0;;;;;10782:26:15;;;::::1;::::0;;;::::1;::::0;;10557:258::o;30035:115::-;30108:35;30121:10;30133:9;30108:12;:35::i;:::-;30035:115;:::o;15901:546::-;15974:16;9278:38;9299:16;9278:20;:38::i;:::-;16002:19:::1;16024:32;16039:16;16024:14;:32::i;:::-;16002:54:::0;-1:-1:-1;16074:10:15::1;-1:-1:-1::0;;;;;16074:25:15;::::1;;16066:64;;;::::0;-1:-1:-1;;;16066:64:15;;12506:2:16;16066:64:15::1;::::0;::::1;12488:21:16::0;12545:2;12525:18;;;12518:30;12584:28;12564:18;;;12557:56;12630:18;;16066:64:15::1;12304:350:16::0;16066:64:15::1;-1:-1:-1::0;;;;;16176:37:15;::::1;16141:32;16176:37:::0;;;:19:::1;:37;::::0;;;;;;;16238:12;;::::1;::::0;-1:-1:-1;;;;;16238:12:15::1;16268:9:::0;16260:43:::1;;;::::0;-1:-1:-1;;;16260:43:15;;12861:2:16;16260:43:15::1;::::0;::::1;12843:21:16::0;12900:2;12880:18;;;12873:30;-1:-1:-1;;;12919:18:16;;;12912:51;12980:18;;16260:43:15::1;12659:345:16::0;16260:43:15::1;16313:12;::::0;::::1;:16:::0;;-1:-1:-1;;;;;;16313:16:15::1;::::0;;16344:48:::1;::::0;-1:-1:-1;;;;;5367:39:16;;5349:58;;-1:-1:-1;;;;;16344:48:15;;::::1;::::0;;;::::1;::::0;::::1;::::0;5337:2:16;5322:18;16344:48:15::1;;;;;;;16402:38;-1:-1:-1::0;;;;;16402:5:15::1;:18;16421:11:::0;-1:-1:-1;;;;;16402:38:15;::::1;:18;:38::i;32438:865::-:0;32560:16;;-1:-1:-1;;;;;32560:16:15;32538:10;:39;32517:136;;;;-1:-1:-1;;;32517:136:15;;13425:2:16;32517:136:15;;;13407:21:16;13464:2;13444:18;;;13437:30;13503:34;13483:18;;;13476:62;-1:-1:-1;;;13554:18:16;;;13547:48;13612:19;;32517:136:15;13223:414:16;32517:136:15;-1:-1:-1;;;;;32689:39:15;;;32663:23;32689:39;;;:28;:39;;;;;;;;32892:66;;32941:7;32438:865;:::o;32892:66::-;-1:-1:-1;;;;;33003:36:15;;32968:32;33003:36;;;:19;:36;;;;;33054:22;;-1:-1:-1;;;33054:22:15;;;;33049:248;;33092:37;33113:15;33092:20;:37::i;:::-;33143:29;;-1:-1:-1;;;;33143:29:15;-1:-1:-1;;;33143:29:15;;;;;33168:4;33207:15;;;33186:17;:36;;-1:-1:-1;;;;;33207:15:15;;;;33186:17;;33143:22;;33186:36;;33207:15;;33186:36;;;;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;33186:36:15;;;;;-1:-1:-1;;;;;33186:36:15;;;;;;33276:9;-1:-1:-1;;;;;33241:45:15;33259:15;-1:-1:-1;;;;;33241:45:15;;;;;;;;;;;33049:248;32507:796;;32438:865;:::o;28648:185::-;28792:34;;-1:-1:-1;;;28792:34:15;;-1:-1:-1;;;;;3256:32:16;;;28792:34:15;;;3238:51:16;28733:27:15;;28792:8;:16;;;;;;3211:18:16;;28792:34:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;28772:54:15;28648:185;-1:-1:-1;;;28648:185:15:o;19829:1121::-;9453:10;-1:-1:-1;;;;;9475:8:15;9453:31;;9445:81;;;;-1:-1:-1;;;9445:81:15;;;;;;;:::i;:::-;20014:16:::1;9278:38;9299:16;9278:20;:38::i;:::-;-1:-1:-1::0;;;;;20077:37:15;::::2;20042:32;20077:37:::0;;;:19:::2;:37;::::0;;;;20145:15:::2;::::0;::::2;::::0;-1:-1:-1;;;;;20145:15:15;;::::2;20132:28:::0;;::::2;;;20124:83;;;::::0;-1:-1:-1;;;20124:83:15;;14037:2:16;20124:83:15::2;::::0;::::2;14019:21:16::0;14076:2;14056:18;;;14049:30;14115:34;14095:18;;;14088:62;-1:-1:-1;;;14166:18:16;;;14159:40;14216:19;;20124:83:15::2;13835:406:16::0;20124:83:15::2;-1:-1:-1::0;;;;;20238:14:15;::::2;::::0;;:51:::2;;;20269:20;-1:-1:-1::0;;;;;20256:33:15::2;:9;-1:-1:-1::0;;;;;20256:33:15::2;;;20238:51;20217:147;;;::::0;-1:-1:-1;;;20217:147:15;;14448:2:16;20217:147:15::2;::::0;::::2;14430:21:16::0;14487:2;14467:18;;;14460:30;14526:34;14506:18;;;14499:62;-1:-1:-1;;;14577:18:16;;;14570:47;14634:19;;20217:147:15::2;14246:413:16::0;20217:147:15::2;20395:18;::::0;::::2;::::0;20417:15:::2;-1:-1:-1::0;;;;;20395:18:15;;::::2;:37;;20374:138;;;::::0;-1:-1:-1;;;20374:138:15;;14866:2:16;20374:138:15::2;::::0;::::2;14848:21:16::0;14905:2;14885:18;;;14878:30;14944:34;14924:18;;;14917:62;-1:-1:-1;;;14995:18:16;;;14988:52;15057:19;;20374:138:15::2;14664:418:16::0;20374:138:15::2;20526:22:::0;;-1:-1:-1;;;20526:22:15;::::2;;;20522:102;;;20564:49;20595:4;20601:11;20564:30;:49::i;:::-;20634:15;::::0;::::2;:29:::0;;-1:-1:-1;;;;;;20634:29:15::2;-1:-1:-1::0;;;;;20634:29:15;::::2;;::::0;;20694:23:::2;20708:9:::0;20634:29;20694:23:::2;:::i;:::-;20673:18;::::0;::::2;:44:::0;;-1:-1:-1;;;;;20673:44:15;;;::::2;-1:-1:-1::0;;;20673:44:15::2;-1:-1:-1::0;;;;;;;;20673:44:15;;::::2;::::0;;;::::2;::::0;;20760:41:::2;20778:23;20760:15;:41;:::i;:::-;20727:23;::::0;::::2;:75:::0;;-1:-1:-1;;;;;20727:75:15;;;::::2;-1:-1:-1::0;;;20727:75:15::2;-1:-1:-1::0;;;;;20727:75:15;;::::2;::::0;;;::::2;::::0;;20817:72:::2;::::0;;-1:-1:-1;;;;;11808:15:16;;;11790:34;;11860:15;;11855:2;11840:18;;11833:43;-1:-1:-1;;;;;20817:72:15;::::2;::::0;::::2;::::0;11718:18:16;20817:72:15::2;;;;;;;;20899:44;20920:16;20938:4;20899:20;:44::i;3131:101:12:-:0;2310:13;:11;:13::i;:::-;3195:30:::1;3222:1;3195:18;:30::i;:::-;3131:101::o:0;14791:929:15:-;14857:1;9278:38;9299:16;9278:20;:38::i;:::-;14893:17:::1;::::0;-1:-1:-1;;;;;14893:17:15::1;14879:10;:31;14871:77;;;::::0;-1:-1:-1;;;14871:77:15;;15289:2:16;14871:77:15::1;::::0;::::1;15271:21:16::0;15328:2;15308:18;;;15301:30;15367:34;15347:18;;;15340:62;-1:-1:-1;;;15418:18:16;;;15411:31;15459:19;;14871:77:15::1;15087:397:16::0;14871:77:15::1;14976:1;14966:7;-1:-1:-1::0;;;;;14966:11:15::1;;14958:48;;;::::0;-1:-1:-1;;;14958:48:15;;15691:2:16;14958:48:15::1;::::0;::::1;15673:21:16::0;15730:2;15710:18;;;15703:30;15769:26;15749:18;;;15742:54;15813:18;;14958:48:15::1;15489:348:16::0;14958:48:15::1;15024:17;::::0;-1:-1:-1;;;15024:17:15;::::1;-1:-1:-1::0;;;;;15024:17:15::1;15016:61;;;::::0;-1:-1:-1;;;15016:61:15;;16044:2:16;15016:61:15::1;::::0;::::1;16026:21:16::0;16083:2;16063:18;;;16056:30;16122:29;16102:18;;;16095:57;16169:18;;15016:61:15::1;15842:351:16::0;15016:61:15::1;15110:12;;15091:15;:31;15087:425;;15205:14;5585:38;5521:7;5615:8;5585:38;:::i;:::-;15160:41;::::0;-1:-1:-1;;;;;15160:16:15;::::1;:41;:::i;:::-;15159:60;;;;:::i;:::-;15138:18;:81:::0;15087:425:::1;;;15250:17;15285:15;15270:12;;:30;;;;:::i;:::-;15250:50;;15314:16;15345:18;;15333:9;:30;;;;:::i;:::-;15314:49:::0;-1:-1:-1;15487:14:15::1;15314:49:::0;5585:38:::1;5521:7;5615:8;5585:38;:::i;:::-;15415:41;::::0;-1:-1:-1;;;;;15415:16:15;::::1;:41;:::i;:::-;:52;;;;:::i;:::-;15414:87;;;;:::i;:::-;15377:18;:124:::0;-1:-1:-1;;15087:425:15::1;15538:15;15521:14;:32:::0;;;15578::::1;::::0;15596:14:::1;::::0;15578:32:::1;:::i;:::-;15563:12;:47:::0;15625:20:::1;::::0;-1:-1:-1;;;;;5367:39:16;;5349:58;;15625:20:15::1;::::0;5337:2:16;5322:18;15625:20:15::1;;;;;;;15655:58;-1:-1:-1::0;;;;;15655:5:15::1;:22;15678:10;15698:4;-1:-1:-1::0;;;;;15655:58:15;::::1;:22;:58::i;:::-;14791:929:::0;;:::o;21115:968::-;21215:16;9278:38;9299:16;9278:20;:38::i;:::-;-1:-1:-1;;;;;21278:37:15;::::1;21243:32;21278:37:::0;;;:19:::1;:37;::::0;;;;21333:18:::1;::::0;::::1;::::0;-1:-1:-1;;;21333:18:15;::::1;-1:-1:-1::0;;;;;21333:18:15::1;21325:71;;;::::0;-1:-1:-1;;;21325:71:15;;16928:2:16;21325:71:15::1;::::0;::::1;16910:21:16::0;16967:2;16947:18;;;16940:30;17006:34;16986:18;;;16979:62;-1:-1:-1;;;17057:18:16;;;17050:34;17101:19;;21325:71:15::1;16726:400:16::0;21325:71:15::1;21427:23;::::0;::::1;::::0;21454:15:::1;-1:-1:-1::0;;;21427:23:15;;::::1;-1:-1:-1::0;;;;;21427:23:15::1;:42;;21406:132;;;::::0;-1:-1:-1;;;21406:132:15;;17333:2:16;21406:132:15::1;::::0;::::1;17315:21:16::0;17372:2;17352:18;;;17345:30;17411:34;17391:18;;;17384:62;-1:-1:-1;;;17462:18:16;;;17455:41;17513:19;;21406:132:15::1;17131:407:16::0;21406:132:15::1;21567:55;::::0;-1:-1:-1;;;21567:55:15;;-1:-1:-1;;;;;3256:32:16;;;21567:55:15::1;::::0;::::1;3238:51:16::0;21549:15:15::1;::::0;21567:8:::1;:37:::0;;::::1;::::0;::::1;::::0;3211:18:16;;21567:55:15::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21637:22:::0;;21549:73;;-1:-1:-1;;;;21637:22:15;::::1;;;21633:100;;;21696:15;::::0;::::1;::::0;:26:::1;::::0;21714:8;;-1:-1:-1;;;;;21696:15:15::1;:26;:::i;:::-;21675:17;:47:::0;;:17:::1;::::0;:47:::1;::::0;;;-1:-1:-1;;;21675:47:15;::::1;-1:-1:-1::0;;;;;21675:47:15::1;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;21675:47:15::1;;;;;-1:-1:-1::0;;;;;21675:47:15::1;;;;;;21633:100;21796:15;::::0;::::1;::::0;21748:74:::1;::::0;;-1:-1:-1;;;;;21796:15:15;;::::1;11790:34:16::0;;11860:15;;;11855:2;11840:18;;11833:43;-1:-1:-1;;;;;21748:74:15;::::1;::::0;::::1;::::0;11718:18:16;21748:74:15::1;;;;;;;-1:-1:-1::0;;;;;21832:26:15;::::1;:15;::::0;::::1;21900:27:::0;;;21832:15:::1;21942:20:::0;21938:85:::1;;21978:34;21995:16;21978;:34::i;:::-;22032:44;22053:16;22071:4;22032:20;:44::i;:::-;21233:850;;21115:968:::0;;:::o;13470:129::-;13527:7;13553:39;13562:15;13579:12;;13553:8;:39::i;:::-;13546:46;;13470:129;:::o;10067:86::-;8870:21:10;4302:15;;-1:-1:-1;;;4302:15:10;;;;4301:16;;-1:-1:-1;;;;;4348:14:10;4158:30;4726:16;;:34;;;;;4746:14;4726:34;4706:54;;4770:17;4790:11;-1:-1:-1;;;;;4790:16:10;4805:1;4790:16;:50;;;;-1:-1:-1;4818:4:10;4810:25;:30;4790:50;4770:70;;4856:12;4855:13;:30;;;;;4873:12;4872:13;4855:30;4851:91;;;4908:23;;-1:-1:-1;;;4908:23:10;;;;;;;;;;;4851:91;4951:18;;-1:-1:-1;;4951:18:10;4968:1;4951:18;;;4979:67;;;;5013:22;;-1:-1:-1;;;;5013:22:10;-1:-1:-1;;;5013:22:10;;;4979:67;10120:26:15::1;10135:10;10120:14;:26::i;:::-;5070:14:10::0;5066:101;;;5100:23;;-1:-1:-1;;;;5100:23:10;;;5142:14;;-1:-1:-1;3015:50:16;;5142:14:10;;3003:2:16;2988:18;5142:14:10;;;;;;;4092:1081;;;;;10067:86:15:o;26037:373::-;-1:-1:-1;;;;;26201:37:15;;26154:6;26201:37;;;:19;:37;;;;;:56;;;-1:-1:-1;;;26201:56:15;;-1:-1:-1;;;;;26201:56:15;26293:15;26271:37;;26267:76;;-1:-1:-1;26331:1:15;;26037:373;-1:-1:-1;;26037:373:15:o;26267:76::-;26366:36;26387:15;26366:18;:36;:::i;:::-;26352:51;26037:373;-1:-1:-1;;;26037:373:15:o;6325:33::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6325:33:15;;-1:-1:-1;6325:33:15;:::o;12620:187::-;2310:13:12;:11;:13::i;:::-;12707:17:15::1;:38:::0;;-1:-1:-1;;;;;;12707:38:15::1;-1:-1:-1::0;;;;;12707:38:15;::::1;::::0;;::::1;::::0;;;12760:40:::1;::::0;::::1;::::0;-1:-1:-1;;12760:40:15::1;12620:187:::0;:::o;22258:881::-;22356:16;9278:38;9299:16;9278:20;:38::i;:::-;-1:-1:-1;;;;;22419:37:15;;::::1;22384:32;22419:37:::0;;;:19:::1;:37;::::0;;;;;22489:57;;-1:-1:-1;;;22489:57:15;;::::1;::::0;::::1;10717:34:16::0;;;;22540:4:15::1;10767:18:16::0;;;10760:43;22419:37:15;22384:32;;22489:8:::1;:24:::0;;::::1;::::0;::::1;::::0;10652:18:16;;22489:57:15::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22564:15;::::0;::::1;::::0;22466:80;;-1:-1:-1;;;;;;22564:31:15;;::::1;:15:::0;::::1;:31;22556:66;;;::::0;-1:-1:-1;;;22556:66:15;;18213:2:16;22556:66:15::1;::::0;::::1;18195:21:16::0;18252:2;18232:18;;;18225:30;-1:-1:-1;;;18271:18:16;;;18264:52;18333:18;;22556:66:15::1;18011:346:16::0;22556:66:15::1;22637:22:::0;;-1:-1:-1;;;22637:22:15;::::1;;;22633:105;;;22696:15;::::0;::::1;::::0;:31:::1;::::0;22714:13;;-1:-1:-1;;;;;22696:15:15::1;:31;:::i;:::-;22675:17;:52:::0;;:17:::1;::::0;:52:::1;::::0;;;-1:-1:-1;;;22675:52:15;::::1;-1:-1:-1::0;;;;;22675:52:15::1;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;22675:52:15::1;;;;;-1:-1:-1::0;;;;;22675:52:15::1;;;;;;22633:105;22798:15;::::0;::::1;::::0;22752:77:::1;::::0;;-1:-1:-1;;;;;22798:15:15;;::::1;11790:34:16::0;;11860:15;;;11855:2;11840:18;;11833:43;-1:-1:-1;;;;;22752:77:15;::::1;::::0;::::1;::::0;11718:18:16;22752:77:15::1;;;;;;;22840:15;::::0;::::1;:31:::0;;-1:-1:-1;;;;;;22840:31:15::1;-1:-1:-1::0;;;;;22840:31:15;;::::1;::::0;;::::1;::::0;;;;-1:-1:-1;;;22903:18:15;;::::1;::::0;;::::1;-1:-1:-1::0;22881:103:15::1;;;22958:15;::::0;::::1;::::0;;-1:-1:-1;;;;;;;;22958:15:15;::::1;22937:36;-1:-1:-1::0;;;;;;;;22937:36:15;;::::1;;::::0;;22881:103:::1;22998:15;::::0;::::1;::::0;-1:-1:-1;;;;;22998:15:15::1;;:20:::0;22994:85:::1;;23034:34;23051:16;23034;:34::i;23368:1053::-:0;23504:16;9709:30;9722:16;9709:12;:30::i;:::-;9701:64;;;;-1:-1:-1;;;9701:64:15;;;;;;;:::i;:::-;-1:-1:-1;;;;;9779:30:15;;9799:10;9779:30;9775:184;;9847:34;;-1:-1:-1;;;9847:34:15;;-1:-1:-1;;;;;3256:32:16;;;9847:34:15;;;3238:51:16;9826:13:15;;9847:8;:16;;;;;;3211:18:16;;9847:34:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;9825:56:15;;-1:-1:-1;;;;;;;9903:19:15;;9912:10;9903:19;9895:53;;;;-1:-1:-1;;;9895:53:15;;;;;;;:::i;:::-;9811:148;9775:184;23558:18:::1;-1:-1:-1::0;;;;;23540:36:15::1;:15;:36;23532:73;;;::::0;-1:-1:-1;;;23532:73:15;;18564:2:16;23532:73:15::1;::::0;::::1;18546:21:16::0;18603:2;18583:18;;;18576:30;18642:26;18622:18;;;18615:54;18686:18;;23532:73:15::1;18362:348:16::0;23532:73:15::1;23658:1;23636:19;-1:-1:-1::0;;;;;23636:23:15::1;;:309;;;;;23703:25;-1:-1:-1::0;;;;;23680:48:15::1;:19;-1:-1:-1::0;;;;;23680:48:15::1;;:120;;;;23775:25;-1:-1:-1::0;;;;;23752:48:15::1;:19;-1:-1:-1::0;;;;;23752:48:15::1;;23680:120;:192;;;;23847:25;-1:-1:-1::0;;;;;23824:48:15::1;:19;-1:-1:-1::0;;;;;23824:48:15::1;;23680:192;:264;;;;23919:25;-1:-1:-1::0;;;;;23896:48:15::1;:19;-1:-1:-1::0;;;;;23896:48:15::1;;23680:264;23615:407;;;::::0;-1:-1:-1;;;23615:407:15;;18917:2:16;23615:407:15::1;::::0;::::1;18899:21:16::0;18956:2;18936:18;;;18929:30;18995:34;18975:18;;;18968:62;-1:-1:-1;;;19046:18:16;;;19039:49;19105:19;;23615:407:15::1;18715:415:16::0;23615:407:15::1;-1:-1:-1::0;;;;;24067:37:15;::::1;24032:32;24067:37:::0;;;:19:::1;:37;::::0;;;;24122:23:::1;::::0;::::1;::::0;-1:-1:-1;;;24122:23:15;::::1;-1:-1:-1::0;;;;;24122:23:15::1;:28:::0;24114:88:::1;;;::::0;-1:-1:-1;;;24114:88:15;;19337:2:16;24114:88:15::1;::::0;::::1;19319:21:16::0;19376:2;19356:18;;;19349:30;19415:34;19395:18;;;19388:62;-1:-1:-1;;;19466:18:16;;;19459:45;19521:19;;24114:88:15::1;19135:411:16::0;24114:88:15::1;24220:18;::::0;::::1;::::0;-1:-1:-1;;;;;24220:18:15::1;:23:::0;24212:59:::1;;;::::0;-1:-1:-1;;;24212:59:15;;19753:2:16;24212:59:15::1;::::0;::::1;19735:21:16::0;19792:2;19772:18;;;19765:30;19831:25;19811:18;;;19804:53;19874:18;;24212:59:15::1;19551:347:16::0;24212:59:15::1;24302:45;24328:19:::0;24309:15:::1;24302:45;:::i;:::-;24281:18;::::0;::::1;:66:::0;;-1:-1:-1;;24281:66:15::1;-1:-1:-1::0;;;;;24281:66:15;;;::::1;::::0;;::::1;::::0;;24362:52:::1;::::0;3015:50:16;;;-1:-1:-1;;;;;24362:52:15;::::1;::::0;::::1;::::0;3003:2:16;2988:18;24362:52:15::1;;;;;;;23522:899;23368:1053:::0;;;:::o;34507:470::-;-1:-1:-1;;;;;34596:30:15;;34588:77;;;;-1:-1:-1;;;34588:77:15;;20496:2:16;34588:77:15;;;20478:21:16;20535:2;20515:18;;;20508:30;20574:34;20554:18;;;20547:62;-1:-1:-1;;;20625:18:16;;;20618:32;20667:19;;34588:77:15;20294:398:16;34588:77:15;-1:-1:-1;;;;;34710:37:15;;;34675:32;34710:37;;;:19;:37;;;;;;;;;34811:15;;;;34828:13;;34762:80;;-1:-1:-1;;;;;34811:15:15;;;20869:58:16;;34828:13:15;;;20943:18:16;;;20936:60;;;;34710:37:15;34762:80;;20842:18:16;34762:80:15;;;;;;;34852:44;34873:16;34891:4;34852:20;:44::i;:::-;34906:16;;34956:13;;34906:64;;-1:-1:-1;;;34906:64:15;;-1:-1:-1;;;;;10735:15:16;;;34906:64:15;;;10717:34:16;34956:13:15;;;10767:18:16;;;10760:43;34906:16:15;;;:31;;10652:18:16;;34906:64:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34578:399;34507:470;:::o;17255:1117::-;9453:10;-1:-1:-1;;;;;9475:8:15;9453:31;;9445:81;;;;-1:-1:-1;;;9445:81:15;;;;;;;:::i;:::-;17432:16:::1;9278:38;9299:16;9278:20;:38::i;:::-;-1:-1:-1::0;;;;;17481:30:15;::::2;::::0;;::::2;::::0;:47:::2;;;17527:1;17515:9;-1:-1:-1::0;;;;;17515:13:15::2;;17481:47;17460:128;;;::::0;-1:-1:-1;;;17460:128:15;;21209:2:16;17460:128:15::2;::::0;::::2;21191:21:16::0;21248:2;21228:18;;;21221:30;21287:34;21267:18;;;21260:62;-1:-1:-1;;;21338:18:16;;;21331:32;21380:19;;17460:128:15::2;21007:398:16::0;17460:128:15::2;17619:20;-1:-1:-1::0;;;;;17606:33:15::2;:9;-1:-1:-1::0;;;;;17606:33:15::2;;;17598:88;;;::::0;-1:-1:-1;;;17598:88:15;;21612:2:16;17598:88:15::2;::::0;::::2;21594:21:16::0;21651:2;21631:18;;;21624:30;21690:34;21670:18;;;21663:62;-1:-1:-1;;;21741:18:16;;;21734:40;21791:19;;17598:88:15::2;21410:406:16::0;17598:88:15::2;-1:-1:-1::0;;;;;17732:37:15;;::::2;17697:32;17732:37:::0;;;:19:::2;:37;::::0;;;;;;;17800:28:::2;:46:::0;;;;;;;17732:37;;17800:46:::2;:60:::0;;:146:::2;;-1:-1:-1::0;;;;;;17880:66:15;;::::2;:46;::::0;;;:28:::2;:46;::::0;;;;;;;::::2;:66;17800:146;17779:245;;;::::0;-1:-1:-1;;;17779:245:15;;22023:2:16;17779:245:15::2;::::0;::::2;22005:21:16::0;22062:2;22042:18;;;22035:30;22101:34;22081:18;;;22074:62;-1:-1:-1;;;22152:18:16;;;22145:50;22212:19;;17779:245:15::2;21821:416:16::0;17779:245:15::2;18039:22:::0;;-1:-1:-1;;;18039:22:15;::::2;;;18035:160;;;18077:49;18108:4;18114:11;18077:30;:49::i;:::-;18161:23;18173:11:::0;18161:9;:23:::2;:::i;:::-;18140:17;:44:::0;;:17:::2;::::0;:44:::2;::::0;;;-1:-1:-1;;;18140:44:15;::::2;-1:-1:-1::0;;;;;18140:44:15::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;18140:44:15::2;;;;;-1:-1:-1::0;;;;;18140:44:15::2;;;;;;18035:160;18205:15;::::0;::::2;:27:::0;;-1:-1:-1;;;;;;18205:27:15::2;-1:-1:-1::0;;;;;18205:27:15;;::::2;::::0;;::::2;::::0;;;18247:64:::2;::::0;;11808:15:16;;;11790:34;;11855:2;11840:18;;11833:43;;;;-1:-1:-1;;;;;18247:64:15;::::2;::::0;::::2;::::0;11718:18:16;18247:64:15::2;11575:307:16::0;13691:349:15;13761:17;;13738:7;;-1:-1:-1;;;13761:17:15;;-1:-1:-1;;;;;13761:17:15;:22;;13757:80;;-1:-1:-1;13806:20:15;;-1:-1:-1;;;;;13806:20:15;;13691:349::o;13757:80::-;13981:17;;13947:18;;13929:14;;13846;;-1:-1:-1;;;13981:17:15;;-1:-1:-1;;;;;13981:17:15;;13947:18;13900:26;:24;:26::i;:::-;:43;;;;:::i;:::-;13899:66;;;;:::i;:::-;13898:100;;;;:::i;:::-;13863:20;;:135;;;-1:-1:-1;;;;;13863:20:15;:135;:::i;:::-;13846:152;;14015:18;:6;:16;:18::i;:::-;14008:25;;;13691:349;:::o;27088:1471::-;27318:16;:23;27219:27;;27248:39;;27359:22;;;27351:52;;;;-1:-1:-1;;;27351:52:15;;22444:2:16;27351:52:15;;;22426:21:16;22483:2;22463:18;;;22456:30;-1:-1:-1;;;22502:18:16;;;22495:47;22559:18;;27351:52:15;22242:341:16;27351:52:15;27417:25;;;;;:74;;-1:-1:-1;27483:8:15;27446:34;27460:20;27446:11;:34;:::i;:::-;:45;27417:74;27413:150;;;27518:34;27532:20;27518:11;:34;:::i;:::-;27507:45;;27413:150;27611:22;27622:11;27611:8;:22;:::i;:::-;-1:-1:-1;;;;;27597:37:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27597:37:15;-1:-1:-1;27666:1:15;;-1:-1:-1;27572:62:15;-1:-1:-1;27666:1:15;27728:11;27711:757;27745:8;27741:1;:12;27711:757;;;27774:23;27800:16;27817:1;27800:19;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;27800:19:15;27868:36;;;:19;:36;;;;;;27800:19;;-1:-1:-1;27868:36:15;27943:23;27868:36;27943:17;:23::i;:::-;-1:-1:-1;;;;;27918:48:15;;;28001:20;-1:-1:-1;;;;;27984:37:15;:14;:37;:64;;;-1:-1:-1;28026:22:15;;-1:-1:-1;;;28026:22:15;;;;28025:23;27984:64;27980:111;;;28068:8;;;;;27980:111;-1:-1:-1;;;;;;28330:24:15;;;;28322:33;:84;;28266:22;28289:13;;;;:::i;:::-;;;28266:37;;;;;;;;:::i;:::-;;;;;;;;;;:140;28420:37;28443:14;28420:37;;:::i;:::-;;;27760:708;;;27711:757;27755:3;;27711:757;;;;28531:11;28507:22;28500:43;28486:67;;27088:1471;;;;;:::o;35262:378::-;35384:11;;-1:-1:-1;;;;;35384:11:15;35370:10;:25;35362:71;;;;-1:-1:-1;;;35362:71:15;;23194:2:16;35362:71:15;;;23176:21:16;23233:2;23213:18;;;23206:30;23272:34;23252:18;;;23245:62;-1:-1:-1;;;23323:18:16;;;23316:31;23364:19;;35362:71:15;22992:397:16;35362:71:15;35485:16;;;35499:1;35485:16;;;;;;;;;35443:39;;35485:16;;;;;;;;;;;-1:-1:-1;35485:16:15;35443:58;;35539:16;35511:22;35534:1;35511:25;;;;;;;;:::i;:::-;-1:-1:-1;;;;;35511:44:15;;;:25;;;;;;;;;:44;35565:68;;-1:-1:-1;;;35565:68:15;;:8;:14;;;;;;:68;;35580:8;;35590:3;;35595:13;;35610:22;;35565:68;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35352:288;35262:378;;;:::o;3381:215:12:-;2310:13;:11;:13::i;:::-;-1:-1:-1;;;;;3465:22:12;::::1;3461:91;;3510:31;::::0;-1:-1:-1;;;3510:31:12;;3538:1:::1;3510:31;::::0;::::1;3238:51:16::0;3211:18;;3510:31:12::1;3076:219:16::0;3461:91:12::1;3561:28;3580:8;3561:18;:28::i;14194:450:15:-:0;-1:-1:-1;;;;;14320:37:15;;14267:6;14320:37;;;:19;:37;;;;;14372:22;;-1:-1:-1;;;14372:22:15;;;;14367:73;;14417:12;;;-1:-1:-1;;;;;14417:12:15;;14194:450;-1:-1:-1;;14194:450:15:o;14367:73::-;14591:12;;;;14449:14;;-1:-1:-1;;;;;14591:12:15;5585:38;5521:7;5615:8;5585:38;:::i;:::-;14514:23;;;;-1:-1:-1;;;14514:23:15;;-1:-1:-1;;;;;14514:23:15;14495:16;:14;:16::i;:::-;:42;;;;:::i;:::-;14475:15;;;;14467:71;;-1:-1:-1;;;;;14467:71:15;;-1:-1:-1;;;;;14475:15:15;14467:71;:::i;:::-;14466:110;;;;:::i;:::-;:137;;;;:::i;:::-;14449:154;;14620:17;:6;:15;:17::i;:::-;14613:24;14194:450;-1:-1:-1;;;;14194:450:15:o;28944:151::-;-1:-1:-1;;;;;29036:37:15;29013:4;29036:37;;;:19;:37;;;;;:48;;;-1:-1:-1;;;;;29036:48:15;:52;;;28944:151::o;12949:439::-;13047:16;:14;:16::i;:::-;13024:20;:39;;-1:-1:-1;;;;;;13024:39:15;-1:-1:-1;;;;;13024:39:15;;;;;;;;;;13090:26;:24;:26::i;:::-;13073:14;:43;-1:-1:-1;;;;;13130:30:15;;;13126:256;;-1:-1:-1;;;;;13211:37:15;;13176:32;13211:37;;;:19;:37;;;;;13277:34;13231:16;13277;:34::i;:::-;13262:12;;;;;:49;;-1:-1:-1;;;;;;13262:49:15;-1:-1:-1;;;;;13262:49:15;;;;;;;;13351:20;;-1:-1:-1;;;;;13351:20:15;-1:-1:-1;;;13325:46:15;;;;;;-1:-1:-1;12949:439:15:o;2634:162:12:-;951:10:1;2693:7:12;1289:22;2546:8;-1:-1:-1;;;;;2546:8:12;;2417:144;2693:7;-1:-1:-1;;;;;2693:23:12;;2689:101;;2739:40;;-1:-1:-1;;;2739:40:12;;951:10:1;2739:40:12;;;3238:51:16;3211:18;;2739:40:12;3076:219:16;16609:261:15;16751:16;;;;-1:-1:-1;;;;;16751:33:15;;;:16;;:33;16747:117;;16821:16;;;;:32;;16840:13;;-1:-1:-1;;;;;16821:16:15;:32;:::i;:::-;16800:17;:53;;:17;;:53;;;;-1:-1:-1;;;16800:53:15;;-1:-1:-1;;;;;16800:53:15;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;16800:53:15;;;;;-1:-1:-1;;;;;16800:53:15;;;;;;16609:261;;:::o;33433:432::-;-1:-1:-1;;;;;33539:37:15;;;33504:32;33539:37;;;:19;:37;;;;;;;;33615:13;;;;33586:43;;:28;:43;;;;;;;:56;;-1:-1:-1;;;;;;33586:56:15;;;33652:26;;-1:-1:-1;;;;;;33688:30:15;;;-1:-1:-1;33728:23:15;;:27;;-1:-1:-1;;;;;33728:27:15;;;33765:18;;;:22;;-1:-1:-1;;33765:22:15;;;33797:16;;:61;;-1:-1:-1;;;33797:61:15;;;;;10717:34:16;;;;10767:18;;;10760:43;;;;33539:37:15;;33797:16;;:31;;10652:18:16;;33797:61:15;10505:304:16;33952:360:15;34177:21;34201:24;34219:5;34201:17;:24::i;:::-;34235:16;;:70;;-1:-1:-1;;;34235:70:15;;-1:-1:-1;;;;;24724:32:16;;;34235:70:15;;;24706:51:16;-1:-1:-1;;;;;24793:39:16;;24773:18;;;24766:67;34177:48:15;;-1:-1:-1;34235:16:15;;;:36;;24679:18:16;;34235:70:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34074:238;33952:360;;:::o;1271:160:14:-;1380:43;;-1:-1:-1;;;;;25036:32:16;;;1380:43:14;;;25018:51:16;25085:18;;;25078:34;;;1353:71:14;;1373:5;;1395:14;;;;;24991:18:16;;1380:43:14;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1380:43:14;;;;;;;;;;;1353:19;:71::i;3750:248:12:-;1289:22;3899:8;;-1:-1:-1;;;;;;3917:19:12;;-1:-1:-1;;;;;3917:19:12;;;;;;;;3951:40;;3899:8;;;;;3951:40;;3823:24;;3951:40;3813:185;;3750:248;:::o;1670:188:14:-;1797:53;;-1:-1:-1;;;;;25381:15:16;;;1797:53:14;;;25363:34:16;25433:15;;;25413:18;;;25406:43;25465:18;;;25458:34;;;1770:81:14;;1790:5;;1812:18;;;;;25298::16;;1797:53:14;25123:375:16;2557:104:11;2615:7;2645:1;2641;:5;:13;;2653:1;2641:13;;;2649:1;2641:13;2634:20;;2557:104;;;;;:::o;1823:127:12:-;6931:20:10;:18;:20::i;:::-;1905:38:12::1;1930:12;1905:24;:38::i;7223:218:13:-:0;7280:7;-1:-1:-1;;;;;7303:25:13;;7299:105;;;7351:42;;-1:-1:-1;;;7351:42:13;;7382:3;7351:42;;;25685:36:16;25737:18;;;25730:34;;;25658:18;;7351:42:13;25503:267:16;7299:105:13;-1:-1:-1;7428:5:13;7223:218::o;25290:155:15:-;25419:19;;;;25375:6;;25400:38;;-1:-1:-1;;;;;;;;25419:19:15;;;;;25400:16;:38;:::i;11291:213:13:-;11347:6;-1:-1:-1;;;;;11369:24:13;;11365:103;;;11416:41;;-1:-1:-1;;;11416:41:13;;11447:2;11416:41;;;25685:36:16;25737:18;;;25730:34;;;25658:18;;11416:41:13;25503:267:16;4027:629:14;4446:23;4472:33;-1:-1:-1;;;;;4472:27:14;;4500:4;4472:27;:33::i;:::-;4446:59;;4519:10;:17;4540:1;4519:22;;:57;;;;;4557:10;4546:30;;;;;;;;;;;;:::i;:::-;4545:31;4519:57;4515:135;;;4599:40;;-1:-1:-1;;;4599:40:14;;-1:-1:-1;;;;;3256:32:16;;4599:40:14;;;3238:51:16;3211:18;;4599:40:14;3076:219:16;7084:141:10;8870:21;8560:40;-1:-1:-1;;;8560:40:10;;;;7146:73;;7191:17;;-1:-1:-1;;;7191:17:10;;;;;;;;;;;1956:235:12;6931:20:10;:18;:20::i;2705:151:0:-;2780:12;2811:38;2833:6;2841:4;2847:1;2780:12;3421;3435:23;3462:6;-1:-1:-1;;;;;3462:11:0;3481:5;3488:4;3462:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3420:73;;;;3510:55;3537:6;3545:7;3554:10;3510:26;:55::i;:::-;3503:62;3180:392;-1:-1:-1;;;;;;3180:392:0:o;4625:582::-;4769:12;4798:7;4793:408;;4821:19;4829:10;4821:7;:19::i;:::-;4793:408;;;5045:17;;:22;:49;;;;-1:-1:-1;;;;;;5071:18:0;;;:23;5045:49;5041:119;;;5121:24;;-1:-1:-1;;;5121:24:0;;-1:-1:-1;;;;;3256:32:16;;5121:24:0;;;3238:51:16;3211:18;;5121:24:0;3076:219:16;5041:119:0;-1:-1:-1;5180:10:0;5173:17;;5743:516;5874:17;;:21;5870:383;;6102:10;6096:17;6158:15;6145:10;6141:2;6137:19;6130:44;5870:383;6225:17;;-1:-1:-1;;;6225:17:0;;;;;;;;;;;14:131:16;-1:-1:-1;;;;;89:31:16;;79:42;;69:70;;135:1;132;125:12;150:388;218:6;226;279:2;267:9;258:7;254:23;250:32;247:52;;;295:1;292;285:12;247:52;334:9;321:23;353:31;378:5;353:31;:::i;:::-;403:5;-1:-1:-1;460:2:16;445:18;;432:32;473:33;432:32;473:33;:::i;:::-;525:7;515:17;;;150:388;;;;;:::o;543:247::-;602:6;655:2;643:9;634:7;630:23;626:32;623:52;;;671:1;668;661:12;623:52;710:9;697:23;729:31;754:5;729:31;:::i;2017:137::-;-1:-1:-1;;;;;2095:5:16;2091:38;2084:5;2081:49;2071:77;;2144:1;2141;2134:12;2159:525;2234:6;2242;2250;2303:2;2291:9;2282:7;2278:23;2274:32;2271:52;;;2319:1;2316;2309:12;2271:52;2358:9;2345:23;2377:31;2402:5;2377:31;:::i;:::-;2427:5;-1:-1:-1;2484:2:16;2469:18;;2456:32;2497;2456;2497;:::i;:::-;2548:7;-1:-1:-1;2607:2:16;2592:18;;2579:32;2620;2579;2620;:::i;:::-;2671:7;2661:17;;;2159:525;;;;;:::o;3508:245::-;3566:6;3619:2;3607:9;3598:7;3594:23;3590:32;3587:52;;;3635:1;3632;3625:12;3587:52;3674:9;3661:23;3693:30;3717:5;3693:30;:::i;4588:180::-;4647:6;4700:2;4688:9;4679:7;4675:23;4671:32;4668:52;;;4716:1;4713;4706:12;4668:52;-1:-1:-1;4739:23:16;;4588:180;-1:-1:-1;4588:180:16:o;4773:427::-;4840:6;4848;4901:2;4889:9;4880:7;4876:23;4872:32;4869:52;;;4917:1;4914;4907:12;4869:52;4956:9;4943:23;4975:31;5000:5;4975:31;:::i;:::-;5025:5;-1:-1:-1;5082:2:16;5067:18;;5054:32;-1:-1:-1;;;;;5117:32:16;;5105:45;;5095:73;;5164:1;5161;5154:12;5850:248;5918:6;5926;5979:2;5967:9;5958:7;5954:23;5950:32;5947:52;;;5995:1;5992;5985:12;5947:52;-1:-1:-1;;6018:23:16;;;6088:2;6073:18;;;6060:32;;-1:-1:-1;5850:248:16:o;6103:703::-;6273:4;6321:2;6310:9;6306:18;6351:6;6340:9;6333:25;6377:2;6415;6410;6399:9;6395:18;6388:30;6438:6;6473;6467:13;6504:6;6496;6489:22;6542:2;6531:9;6527:18;6520:25;;6580:2;6572:6;6568:15;6554:29;;6601:1;6611:169;6625:6;6622:1;6619:13;6611:169;;;6686:13;;6674:26;;6755:15;;;;6720:12;;;;6647:1;6640:9;6611:169;;;-1:-1:-1;6797:3:16;;6103:703;-1:-1:-1;;;;;;;6103:703:16:o;6811:527::-;6887:6;6895;6903;6956:2;6944:9;6935:7;6931:23;6927:32;6924:52;;;6972:1;6969;6962:12;6924:52;7011:9;6998:23;7030:31;7055:5;7030:31;:::i;:::-;7080:5;-1:-1:-1;7137:2:16;7122:18;;7109:32;7150;7109;7150;:::i;:::-;7201:7;-1:-1:-1;7260:2:16;7245:18;;7232:32;7273:33;7232:32;7273:33;:::i;7565:345::-;7767:2;7749:21;;;7806:2;7786:18;;;7779:30;-1:-1:-1;;;7840:2:16;7825:18;;7818:51;7901:2;7886:18;;7565:345::o;7915:527::-;8011:6;8019;8027;8080:2;8068:9;8059:7;8055:23;8051:32;8048:52;;;8096:1;8093;8086:12;8048:52;8128:9;8122:16;8147:31;8172:5;8147:31;:::i;:::-;8247:2;8232:18;;8226:25;8197:5;;-1:-1:-1;8260:33:16;8226:25;8260:33;:::i;:::-;8364:2;8349:18;;8343:25;8312:7;;-1:-1:-1;8377:33:16;8343:25;8377:33;:::i;8871:127::-;8932:10;8927:3;8923:20;8920:1;8913:31;8963:4;8960:1;8953:15;8987:4;8984:1;8977:15;9003:125;9068:9;;;9089:10;;;9086:36;;;9102:18;;:::i;10309:191::-;-1:-1:-1;;;;;10436:10:16;;;10424;;;10420:27;;10459:12;;;10456:38;;;10474:18;;:::i;:::-;10456:38;10309:191;;;;:::o;11169:401::-;11371:2;11353:21;;;11410:2;11390:18;;;11383:30;11449:34;11444:2;11429:18;;11422:62;-1:-1:-1;;;11515:2:16;11500:18;;11493:35;11560:3;11545:19;;11169:401::o;13642:188::-;-1:-1:-1;;;;;13755:10:16;;;13767;;;13751:27;;13790:11;;;13787:37;;;13804:18;;:::i;16198:168::-;16271:9;;;16302;;16319:15;;;16313:22;;16299:37;16289:71;;16340:18;;:::i;16371:217::-;16411:1;16437;16427:132;;16481:10;16476:3;16472:20;16469:1;16462:31;16516:4;16513:1;16506:15;16544:4;16541:1;16534:15;16427:132;-1:-1:-1;16573:9:16;;16371:217::o;16593:128::-;16660:9;;;16681:11;;;16678:37;;;16695:18;;:::i;17543:249::-;17612:6;17665:2;17653:9;17644:7;17640:23;17636:32;17633:52;;;17681:1;17678;17671:12;17633:52;17713:9;17707:16;17732:30;17756:5;17732:30;:::i;19903:180::-;-1:-1:-1;;;;;20008:10:16;;;20020;;;20004:27;;20043:11;;;20040:37;;;20057:18;;:::i;22588:127::-;22649:10;22644:3;22640:20;22637:1;22630:31;22680:4;22677:1;22670:15;22704:4;22701:1;22694:15;22720:127;22781:10;22776:3;22772:20;22769:1;22762:31;22812:4;22809:1;22802:15;22836:4;22833:1;22826:15;22852:135;22891:3;22912:17;;;22909:43;;22932:18;;:::i;:::-;-1:-1:-1;22979:1:16;22968:13;;22852:135::o;23394:945::-;-1:-1:-1;;;;;23707:39:16;;23689:58;;23766:2;23784:18;;;23777:34;;;-1:-1:-1;;;;;23885:15:16;;;23880:2;23865:18;;23858:43;23676:3;23932:2;23917:18;;23910:31;;;23990:13;;23661:19;;;24012:22;;;23628:4;;24092:15;;;;23766:2;;23838:3;24050:19;;;23628:4;24135:178;24149:6;24146:1;24143:13;24135:178;;;24214:13;;24210:22;;24198:35;;24288:15;;;;24253:12;;;;24171:1;24164:9;24135:178;;;-1:-1:-1;24330:3:16;;23394:945;-1:-1:-1;;;;;;;;;;23394:945:16:o;24344:185::-;-1:-1:-1;;;;;24465:10:16;;;24453;;;24449:27;;24488:12;;;24485:38;;;24503:18;;:::i;26046:277::-;26113:6;26166:2;26154:9;26145:7;26141:23;26137:32;26134:52;;;26182:1;26179;26172:12;26134:52;26214:9;26208:16;26267:5;26260:13;26253:21;26246:5;26243:32;26233:60;;26289:1;26286;26279:12;26328:412;26457:3;26495:6;26489:13;26520:1;26530:129;26544:6;26541:1;26538:13;26530:129;;;26642:4;26626:14;;;26622:25;;26616:32;26603:11;;;26596:53;26559:12;26530:129;;;-1:-1:-1;26714:1:16;26678:16;;26703:13;;;-1:-1:-1;26678:16:16;26328:412;-1:-1:-1;26328:412:16:o
Swarm Source
ipfs://16032ba9c1625ae2a7d171c9601bb146581c6c4bafa5bb1cec03e9c28b904918
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.