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
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 11504003 | 1327 days ago | IN | 0 ETH | 0.35940618 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
StakedETHIX
Compiler Version
v0.7.5+commit.eb77ed08
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: gpl-3.0 pragma solidity 0.7.5; pragma experimental ABIEncoderV2; import './bases/staking/interfaces/ITransferHook.sol'; import './bases/staking/StakedToken.sol'; /** * @title StakedEthix * @notice StakedToken with ETHIX token as staked token * @author Aave / Ethichub **/ contract StakedETHIX is StakedToken { function initialize( IERC20Upgradeable stakedToken, ITransferHook ethixGovernance, uint256 cooldownSeconds, uint256 unstakeWindow, IReserve rewardsVault, address emissionManager, uint128 distributionDuration ) public initializer { __StakedToken_init( 'Staked ETHIX', 'stkETHIX', 18, ethixGovernance, stakedToken, cooldownSeconds, unstakeWindow, rewardsVault, emissionManager, distributionDuration ); } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.7.5; interface ITransferHook { function onTransfer( address from, address to, uint256 amount ) external; }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.7.5; pragma experimental ABIEncoderV2; import './StakingRewards.sol'; import './interfaces/IStakedEthix.sol'; import './interfaces/ITransferHook.sol'; import '../../../reserve/IReserve.sol'; import './lib/EthixERC20Snapshot.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol'; /** * @title StakedToken * @notice Contract to stake Ethix token, tokenize the position and get rewards, inheriting from a distribution manager contract * @author Aave / Ethichub **/ contract StakedToken is Initializable, IStakedEthix, EthixERC20Snapshot, StakingRewards { using SafeERC20Upgradeable for IERC20Upgradeable; using SafeMathUpgradeable for uint256; IERC20Upgradeable public STAKED_TOKEN; uint256 public COOLDOWN_SECONDS; /// @notice Seconds available to redeem once the cooldown period is fullfilled uint256 public UNSTAKE_WINDOW; /// @notice IReserve to pull from the rewards, needs to have this contract as WITHDRAW role IReserve public REWARDS_VAULT; mapping(address => uint256) public stakerRewardsToClaim; mapping(address => uint256) public stakersCooldowns; event Staked(address indexed from, address indexed onBehalfOf, uint256 amount); event Redeem(address indexed from, address indexed to, uint256 amount); event RewardsAccrued(address user, uint256 amount); event RewardsClaimed(address indexed from, address indexed to, uint256 amount); event Cooldown(address indexed user); function __StakedToken_init( string memory name, string memory symbol, uint8 decimals, ITransferHook ethixGovernance, IERC20Upgradeable stakedToken, uint256 cooldownSeconds, uint256 unstakeWindow, IReserve rewardsVault, address emissionManager, uint128 distributionDuration ) internal initializer { __EthixERC20Snapshot_init(name, symbol); _setupDecimals(decimals); _setEthixGovernance(ethixGovernance); __StakingRewards_init(emissionManager, distributionDuration); STAKED_TOKEN = stakedToken; COOLDOWN_SECONDS = cooldownSeconds; UNSTAKE_WINDOW = unstakeWindow; REWARDS_VAULT = rewardsVault; } function stake(address onBehalfOf, uint256 amount) external override { require(amount != 0, 'INVALID_ZERO_AMOUNT'); uint256 balanceOfUser = balanceOf(onBehalfOf); uint256 accruedRewards = _updateUserAssetInternal(onBehalfOf, address(this), balanceOfUser, totalSupply()); if (accruedRewards != 0) { emit RewardsAccrued(onBehalfOf, accruedRewards); stakerRewardsToClaim[onBehalfOf] = stakerRewardsToClaim[onBehalfOf].add(accruedRewards); } stakersCooldowns[onBehalfOf] = getNextCooldownTimestamp( 0, amount, onBehalfOf, balanceOfUser ); _mint(onBehalfOf, amount); IERC20Upgradeable(STAKED_TOKEN).safeTransferFrom(msg.sender, address(this), amount); emit Staked(msg.sender, onBehalfOf, amount); } /** * @dev Redeems staked tokens, and stop earning rewards * @param to Address to redeem to * @param amount Amount to redeem **/ function redeem(address to, uint256 amount) external override { require(amount != 0, 'INVALID_ZERO_AMOUNT'); //solium-disable-next-line uint256 cooldownStartTimestamp = stakersCooldowns[msg.sender]; require( block.timestamp > cooldownStartTimestamp.add(COOLDOWN_SECONDS), 'INSUFFICIENT_COOLDOWN' ); require( block.timestamp.sub(cooldownStartTimestamp.add(COOLDOWN_SECONDS)) <= UNSTAKE_WINDOW, 'UNSTAKE_WINDOW_FINISHED' ); uint256 balanceOfMessageSender = balanceOf(msg.sender); uint256 amountToRedeem = (amount > balanceOfMessageSender) ? balanceOfMessageSender : amount; _updateCurrentUnclaimedRewards(msg.sender, balanceOfMessageSender, true); _burn(msg.sender, amountToRedeem); if (balanceOfMessageSender.sub(amountToRedeem) == 0) { stakersCooldowns[msg.sender] = 0; } IERC20Upgradeable(STAKED_TOKEN).safeTransfer(to, amountToRedeem); emit Redeem(msg.sender, to, amountToRedeem); } /** * @dev Activates the cooldown period to unstake * - It can't be called if the user is not staking **/ function cooldown() external override { require(balanceOf(msg.sender) != 0, 'INVALID_BALANCE_ON_COOLDOWN'); //solium-disable-next-line stakersCooldowns[msg.sender] = block.timestamp; emit Cooldown(msg.sender); } /** * @dev Claims an `amount` from Rewards reserve to the address `to` * @param to Address to stake for * @param amount Amount to stake **/ function claimRewards(address payable to, uint256 amount) external override { uint256 newTotalRewards = _updateCurrentUnclaimedRewards(msg.sender, balanceOf(msg.sender), false); uint256 amountToClaim = (amount == type(uint256).max) ? newTotalRewards : amount; stakerRewardsToClaim[msg.sender] = newTotalRewards.sub(amountToClaim, 'INVALID_AMOUNT'); require(REWARDS_VAULT.transfer(to, amountToClaim), 'ERROR_TRANSFER_FROM_VAULT'); emit RewardsClaimed(msg.sender, to, amountToClaim); } /** * @dev Internal ERC20 _transfer of the tokenized staked tokens * @param from Address to transfer from * @param to Address to transfer to * @param amount Amount to transfer **/ function _transfer( address from, address to, uint256 amount ) internal override { uint256 balanceOfFrom = balanceOf(from); // Sender _updateCurrentUnclaimedRewards(from, balanceOfFrom, true); // Recipient if (from != to) { uint256 balanceOfTo = balanceOf(to); _updateCurrentUnclaimedRewards(to, balanceOfTo, true); uint256 previousSenderCooldown = stakersCooldowns[from]; stakersCooldowns[to] = getNextCooldownTimestamp( previousSenderCooldown, amount, to, balanceOfTo ); // if cooldown was set and whole balance of sender was transferred - clear cooldown if (balanceOfFrom == amount && previousSenderCooldown != 0) { stakersCooldowns[from] = 0; } } super._transfer(from, to, amount); } /** * @dev Updates the user state related with his accrued rewards * @param user Address of the user * @param userBalance The current balance of the user * @param updateStorage Boolean flag used to update or not the stakerRewardsToClaim of the user * @return The unclaimed rewards that were added to the total accrued **/ function _updateCurrentUnclaimedRewards( address user, uint256 userBalance, bool updateStorage ) internal returns (uint256) { uint256 accruedRewards = _updateUserAssetInternal(user, address(this), userBalance, totalSupply()); uint256 unclaimedRewards = stakerRewardsToClaim[user].add(accruedRewards); if (accruedRewards != 0) { if (updateStorage) { stakerRewardsToClaim[user] = unclaimedRewards; } emit RewardsAccrued(user, accruedRewards); } return unclaimedRewards; } /** * @dev Calculates the how is gonna be a new cooldown timestamp depending on the sender/receiver situation * - If the timestamp of the sender is "better" or the timestamp of the recipient is 0, we take the one of the recipient * - Weighted average of from/to cooldown timestamps if: * # The sender doesn't have the cooldown activated (timestamp 0). * # The sender timestamp is expired * # The sender has a "worse" timestamp * - If the receiver's cooldown timestamp expired (too old), the next is 0 * @param _fromCooldownTimestamp Cooldown timestamp of the sender * @param _amountToReceive Amount * @param _toAddress Address of the recipient * @param _toBalance Current balance of the receiver * @return The new cooldown timestamp **/ function getNextCooldownTimestamp( uint256 _fromCooldownTimestamp, uint256 _amountToReceive, address _toAddress, uint256 _toBalance ) public returns (uint256) { uint256 toCooldownTimestamp = stakersCooldowns[_toAddress]; if (toCooldownTimestamp == 0) { return 0; } uint256 minimalValidCooldownTimestamp = block.timestamp.sub(COOLDOWN_SECONDS).sub(UNSTAKE_WINDOW); if (minimalValidCooldownTimestamp > toCooldownTimestamp) { toCooldownTimestamp = 0; } else { uint256 fromCooldownTimestamp = (minimalValidCooldownTimestamp > _fromCooldownTimestamp) ? block.timestamp : _fromCooldownTimestamp; if (fromCooldownTimestamp < toCooldownTimestamp) { return toCooldownTimestamp; } else { toCooldownTimestamp = ( _amountToReceive.mul(fromCooldownTimestamp).add( _toBalance.mul(toCooldownTimestamp) ) ) .div(_amountToReceive.add(_toBalance)); } } stakersCooldowns[_toAddress] = toCooldownTimestamp; return toCooldownTimestamp; } /** * @dev Return the total rewards pending to claim by an staker * @param staker The staker address * @return The rewards */ function getTotalRewardsBalance(address staker) external view returns (uint256) { DistributionTypes.UserStakeInput[] memory userStakeInputs = new DistributionTypes.UserStakeInput[](1); userStakeInputs[0] = DistributionTypes.UserStakeInput({ underlyingAsset: address(this), stakedByUser: balanceOf(staker), totalStaked: totalSupply() }); return stakerRewardsToClaim[staker].add(_getUnclaimedRewards(staker, userStakeInputs)); } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.7.5; pragma experimental ABIEncoderV2; import './lib/DistributionTypes.sol'; import './interfaces/IStakingRewards.sol'; import '@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol'; import '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol'; /** * @title StakingRewards * @notice Accounting contract to manage multiple staking distributions * @author Aave / Ethichub **/ contract StakingRewards is Initializable, IStakingRewards, AccessControlUpgradeable { bytes32 public constant EMISSION_MANAGER_ROLE = keccak256('EMISSION_MANAGER'); using SafeMathUpgradeable for uint256; struct AssetData { uint128 emissionPerSecond; uint128 lastUpdateTimestamp; uint256 index; mapping(address => uint256) users; } uint256 public DISTRIBUTION_END; uint8 constant public PRECISION = 18; mapping(address => AssetData) public assets; event AssetConfigUpdated(address indexed asset, uint256 emission); event AssetIndexUpdated(address indexed asset, uint256 index); event UserIndexUpdated(address indexed user, address indexed asset, uint256 index); function __StakingRewards_init(address emissionManager, uint256 distributionDuration) public initializer { __AccessControl_init_unchained(); DISTRIBUTION_END = block.timestamp.add(distributionDuration); _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(EMISSION_MANAGER_ROLE, emissionManager); } /** * @dev Configures the distribution of rewards for a list of assets * @param assetsConfigInput The list of configurations to apply **/ function configureAssets(DistributionTypes.AssetConfigInput[] calldata assetsConfigInput) external override { require(hasRole(EMISSION_MANAGER_ROLE, msg.sender), 'ONLY_EMISSION_MANAGER'); for (uint256 i = 0; i < assetsConfigInput.length; i++) { AssetData storage assetConfig = assets[assetsConfigInput[i].underlyingAsset]; _updateAssetStateInternal( assetsConfigInput[i].underlyingAsset, assetConfig, assetsConfigInput[i].totalStaked ); assetConfig.emissionPerSecond = assetsConfigInput[i].emissionPerSecond; emit AssetConfigUpdated( assetsConfigInput[i].underlyingAsset, assetsConfigInput[i].emissionPerSecond ); } } /** * @dev Updates the state of one distribution, mainly rewards index and timestamp * @param underlyingAsset The address used as key in the distribution * @param assetConfig Storage pointer to the distribution's config * @param totalStaked Current total of staked assets for this distribution * @return The new distribution index **/ function _updateAssetStateInternal( address underlyingAsset, AssetData storage assetConfig, uint256 totalStaked ) internal returns (uint256) { uint256 oldIndex = assetConfig.index; uint128 lastUpdateTimestamp = assetConfig.lastUpdateTimestamp; if (block.timestamp == lastUpdateTimestamp) { return oldIndex; } uint256 newIndex = _getAssetIndex( oldIndex, assetConfig.emissionPerSecond, lastUpdateTimestamp, totalStaked ); if (newIndex != oldIndex) { assetConfig.index = newIndex; emit AssetIndexUpdated(underlyingAsset, newIndex); } assetConfig.lastUpdateTimestamp = uint128(block.timestamp); return newIndex; } /** * @dev Updates the state of an user in a distribution * @param user The user's address * @param asset The address of the reference asset of the distribution * @param stakedByUser Amount of tokens staked by the user in the distribution at the moment * @param totalStaked Total tokens staked in the distribution * @return The accrued rewards for the user until the moment **/ function _updateUserAssetInternal( address user, address asset, uint256 stakedByUser, uint256 totalStaked ) internal returns (uint256) { AssetData storage assetData = assets[asset]; uint256 userIndex = assetData.users[user]; uint256 accruedRewards = 0; uint256 newIndex = _updateAssetStateInternal(asset, assetData, totalStaked); if (userIndex != newIndex) { if (stakedByUser != 0) { accruedRewards = _getRewards(stakedByUser, newIndex, userIndex); } assetData.users[user] = newIndex; emit UserIndexUpdated(user, asset, newIndex); } return accruedRewards; } /** * @dev Used by "frontend" stake contracts to update the data of an user when claiming rewards from there * @param user The address of the user * @param stakes List of structs of the user data related with his stake * @return The accrued rewards for the user until the moment **/ function _claimRewards(address payable user, DistributionTypes.UserStakeInput[] memory stakes) internal returns (uint256) { uint256 accruedRewards = 0; for (uint256 i = 0; i < stakes.length; i++) { accruedRewards = accruedRewards.add( _updateUserAssetInternal( user, stakes[i].underlyingAsset, stakes[i].stakedByUser, stakes[i].totalStaked ) ); } return accruedRewards; } /** * @dev Return the accrued rewards for an user over a list of distribution * @param user The address of the user * @param stakes List of structs of the user data related with his stake * @return The accrued rewards for the user until the moment **/ function _getUnclaimedRewards(address user, DistributionTypes.UserStakeInput[] memory stakes) internal view returns (uint256) { uint256 accruedRewards = 0; for (uint256 i = 0; i < stakes.length; i++) { AssetData storage assetConfig = assets[stakes[i].underlyingAsset]; uint256 assetIndex = _getAssetIndex( assetConfig.index, assetConfig.emissionPerSecond, assetConfig.lastUpdateTimestamp, stakes[i].totalStaked ); accruedRewards = accruedRewards.add( _getRewards(stakes[i].stakedByUser, assetIndex, assetConfig.users[user]) ); } return accruedRewards; } /** * @dev Internal function for the calculation of user's rewards on a distribution * @param principalUserBalance Amount staked by the user on a distribution * @param reserveIndex Current index of the distribution * @param userIndex Index stored for the user, representation his staking moment * @return The rewards **/ function _getRewards( uint256 principalUserBalance, uint256 reserveIndex, uint256 userIndex ) internal view returns (uint256) { return principalUserBalance.mul(reserveIndex.sub(userIndex)).div(10**uint256(PRECISION)); } /** * @dev Calculates the next value of an specific distribution index, with validations * @param currentIndex Current index of the distribution * @param emissionPerSecond Representing the total rewards distributed per second per asset unit, on the distribution * @param lastUpdateTimestamp Last moment this distribution was updated * @param totalBalance of tokens considered for the distribution * @return The new index. **/ function _getAssetIndex( uint256 currentIndex, uint256 emissionPerSecond, uint128 lastUpdateTimestamp, uint256 totalBalance ) internal view returns (uint256) { if ( emissionPerSecond == 0 || totalBalance == 0 || lastUpdateTimestamp == block.timestamp || lastUpdateTimestamp >= DISTRIBUTION_END ) { return currentIndex; } uint256 currentTimestamp = block.timestamp > DISTRIBUTION_END ? DISTRIBUTION_END : block.timestamp; uint256 timeDelta = currentTimestamp.sub(lastUpdateTimestamp); return emissionPerSecond.mul(timeDelta).mul(10**uint256(PRECISION)).div(totalBalance).add( currentIndex ); } /** * @dev Returns the data of an user on a distribution * @param user Address of the user * @param asset The address of the reference asset of the distribution * @return The new index **/ function getUserAssetData(address user, address asset) public view returns (uint256) { return assets[asset].users[user]; } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.7.5; interface IStakedEthix { function stake(address to, uint256 amount) external; function redeem(address to, uint256 amount) external; function cooldown() external; function claimRewards(address payable to, uint256 amount) external; }
// SPDX-License-Identifier: gpl-3.0 pragma solidity 0.7.5; interface IReserve { event Transfer(address indexed to, uint256 amount); event RescueFunds(address token, address indexed to, uint256 amount); function balance() external view returns (uint256); function transfer(address payable _to, uint256 _value) external returns (bool); function rescueFunds( address _tokenToRescue, address _to, uint256 _amount ) external; }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.7.5; import '../interfaces/ITransferHook.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/ERC20SnapshotUpgradeable.sol'; /** * @title EthixERC20Snapshot * @notice Modified OZ ERC20Snapshot to add Aave stuff * @author Ethichub **/ contract EthixERC20Snapshot is ERC20SnapshotUpgradeable { function __EthixERC20Snapshot_init(string memory name_, string memory symbol_) public initializer { __ERC20Snapshot_init(); __ERC20_init(name_, symbol_); } /// @dev reference to the Ethix governance contract to call (if initialized) on _beforeTokenTransfer /// !!! IMPORTANT The Ethix governance is considered a trustable contract, being its responsibility /// to control all potential reentrancies by calling back the this contract ITransferHook public _ethixGovernance; function _setEthixGovernance(ITransferHook ethixGovernance) internal virtual { _ethixGovernance = ethixGovernance; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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 pragma solidity ^0.7.0; import "./IERC20Upgradeable.sol"; import "../../math/SafeMathUpgradeable.sol"; import "../../utils/AddressUpgradeable.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 SafeERC20Upgradeable { using SafeMathUpgradeable for uint256; using AddressUpgradeable for address; function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @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(IERC20Upgradeable 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, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when 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 SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; /** * @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 a proxied contract can't have 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. * * 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 {UpgradeableProxy-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. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; // solhint-disable-next-line no-inline-assembly assembly { cs := extcodesize(self) } return cs == 0; } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.7.5; pragma experimental ABIEncoderV2; library DistributionTypes { struct AssetConfigInput { uint128 emissionPerSecond; uint256 totalStaked; address underlyingAsset; } struct UserStakeInput { address underlyingAsset; uint256 stakedByUser; uint256 totalStaked; } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.7.5; pragma experimental ABIEncoderV2; import '../lib/DistributionTypes.sol'; interface IStakingRewards { function configureAssets(DistributionTypes.AssetConfigInput[] calldata assetsConfigInput) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../utils/EnumerableSetUpgradeable.sol"; import "../utils/AddressUpgradeable.sol"; import "../GSN/ContextUpgradeable.sol"; import "../proxy/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable { function __AccessControl_init() internal initializer { __Context_init_unchained(); __AccessControl_init_unchained(); } function __AccessControl_init_unchained() internal initializer { } using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; using AddressUpgradeable for address; struct RoleData { EnumerableSetUpgradeable.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view returns (bool) { return _roles[role].members.contains(account); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view returns (uint256) { return _roles[role].members.length(); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view returns (address) { return _roles[role].members.at(index); } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (_roles[role].members.add(account)) { emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (_roles[role].members.remove(account)) { emit RoleRevoked(role, account, _msgSender()); } } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @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, it is bubbled up by this * function (like regular Solidity function calls). * * 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. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @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`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../proxy/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 GSN 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 initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../../math/SafeMathUpgradeable.sol"; import "../../utils/ArraysUpgradeable.sol"; import "../../utils/CountersUpgradeable.sol"; import "./ERC20Upgradeable.sol"; import "../../proxy/Initializable.sol"; /** * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and * total supply at the time are recorded for later access. * * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting. * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be * used to create an efficient ERC20 forking mechanism. * * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id * and the account address. * * ==== Gas Costs * * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much * smaller since identical balances in subsequent snapshots are stored as a single entry. * * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent * transfers will have normal cost until the next snapshot, and so on. */ abstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable { function __ERC20Snapshot_init() internal initializer { __Context_init_unchained(); __ERC20Snapshot_init_unchained(); } function __ERC20Snapshot_init_unchained() internal initializer { } // Inspired by Jordi Baylina's MiniMeToken to record historical balances: // https://github.com/Giveth/minimd/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol using SafeMathUpgradeable for uint256; using ArraysUpgradeable for uint256[]; using CountersUpgradeable for CountersUpgradeable.Counter; // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a // Snapshot struct, but that would impede usage of functions that work on an array. struct Snapshots { uint256[] ids; uint256[] values; } mapping (address => Snapshots) private _accountBalanceSnapshots; Snapshots private _totalSupplySnapshots; // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. CountersUpgradeable.Counter private _currentSnapshotId; /** * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created. */ event Snapshot(uint256 id); /** * @dev Creates a new snapshot and returns its snapshot id. * * Emits a {Snapshot} event that contains the same id. * * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a * set of accounts, for example using {AccessControl}, or it may be open to the public. * * [WARNING] * ==== * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking, * you must consider that it can potentially be used by attackers in two ways. * * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs * section above. * * We haven't measured the actual numbers; if this is something you're interested in please reach out to us. * ==== */ function _snapshot() internal virtual returns (uint256) { _currentSnapshotId.increment(); uint256 currentId = _currentSnapshotId.current(); emit Snapshot(currentId); return currentId; } /** * @dev Retrieves the balance of `account` at the time `snapshotId` was created. */ function balanceOfAt(address account, uint256 snapshotId) public view returns (uint256) { (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]); return snapshotted ? value : balanceOf(account); } /** * @dev Retrieves the total supply at the time `snapshotId` was created. */ function totalSupplyAt(uint256 snapshotId) public view returns(uint256) { (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots); return snapshotted ? value : totalSupply(); } // Update balance and/or total supply snapshots before the values are modified. This is implemented // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations. function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { super._beforeTokenTransfer(from, to, amount); if (from == address(0)) { // mint _updateAccountSnapshot(to); _updateTotalSupplySnapshot(); } else if (to == address(0)) { // burn _updateAccountSnapshot(from); _updateTotalSupplySnapshot(); } else { // transfer _updateAccountSnapshot(from); _updateAccountSnapshot(to); } } function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) { require(snapshotId > 0, "ERC20Snapshot: id is 0"); // solhint-disable-next-line max-line-length require(snapshotId <= _currentSnapshotId.current(), "ERC20Snapshot: nonexistent id"); // When a valid snapshot is queried, there are three possibilities: // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds // to this id is the current one. // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the // requested id, and its value is the one to return. // c) More snapshots were created after the requested one, and the queried value was later modified. There will be // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is // larger than the requested one. // // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does // exactly this. uint256 index = snapshots.ids.findUpperBound(snapshotId); if (index == snapshots.ids.length) { return (false, 0); } else { return (true, snapshots.values[index]); } } function _updateAccountSnapshot(address account) private { _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account)); } function _updateTotalSupplySnapshot() private { _updateSnapshot(_totalSupplySnapshots, totalSupply()); } function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { uint256 currentId = _currentSnapshotId.current(); if (_lastSnapshotId(snapshots.ids) < currentId) { snapshots.ids.push(currentId); snapshots.values.push(currentValue); } } function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) { if (ids.length == 0) { return 0; } else { return ids[ids.length - 1]; } } uint256[46] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../math/MathUpgradeable.sol"; /** * @dev Collection of functions related to array types. */ library ArraysUpgradeable { /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { if (array.length == 0) { return 0; } uint256 low = 0; uint256 high = array.length; while (low < high) { uint256 mid = MathUpgradeable.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds down (it does integer division with truncation). if (array[mid] > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && array[low - 1] == element) { return low - 1; } else { return low; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../math/SafeMathUpgradeable.sol"; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library CountersUpgradeable { using SafeMathUpgradeable for uint256; struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { // The {SafeMath} overflow check can be skipped here, see the comment at the top counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../../GSN/ContextUpgradeable.sol"; import "./IERC20Upgradeable.sol"; import "../../math/SafeMathUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../proxy/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable { using SafeMathUpgradeable for uint256; using AddressUpgradeable for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } uint256[44] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { /** * @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, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"emission","type":"uint256"}],"name":"AssetConfigUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"AssetIndexUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Cooldown","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsAccrued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"UserIndexUpdated","type":"event"},{"inputs":[],"name":"COOLDOWN_SECONDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISTRIBUTION_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EMISSION_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARDS_VAULT","outputs":[{"internalType":"contract IReserve","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKED_TOKEN","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNSTAKE_WINDOW","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"name":"__EthixERC20Snapshot_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"emissionManager","type":"address"},{"internalType":"uint256","name":"distributionDuration","type":"uint256"}],"name":"__StakingRewards_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_ethixGovernance","outputs":[{"internalType":"contract ITransferHook","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assets","outputs":[{"internalType":"uint128","name":"emissionPerSecond","type":"uint128"},{"internalType":"uint128","name":"lastUpdateTimestamp","type":"uint128"},{"internalType":"uint256","name":"index","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint128","name":"emissionPerSecond","type":"uint128"},{"internalType":"uint256","name":"totalStaked","type":"uint256"},{"internalType":"address","name":"underlyingAsset","type":"address"}],"internalType":"struct DistributionTypes.AssetConfigInput[]","name":"assetsConfigInput","type":"tuple[]"}],"name":"configureAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cooldown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromCooldownTimestamp","type":"uint256"},{"internalType":"uint256","name":"_amountToReceive","type":"uint256"},{"internalType":"address","name":"_toAddress","type":"address"},{"internalType":"uint256","name":"_toBalance","type":"uint256"}],"name":"getNextCooldownTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"getTotalRewardsBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"asset","type":"address"}],"name":"getUserAssetData","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"stakedToken","type":"address"},{"internalType":"contract ITransferHook","name":"ethixGovernance","type":"address"},{"internalType":"uint256","name":"cooldownSeconds","type":"uint256"},{"internalType":"uint256","name":"unstakeWindow","type":"uint256"},{"internalType":"contract IReserve","name":"rewardsVault","type":"address"},{"internalType":"address","name":"emissionManager","type":"address"},{"internalType":"uint128","name":"distributionDuration","type":"uint128"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakerRewardsToClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakersCooldowns","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615c3080620000216000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c80639010d07c11610151578063adc9772e116100c3578063c3c9e42d11610087578063c3c9e42d146107ae578063ca15c873146107ca578063d547741f146107fa578063dd62ed3e14610816578063f11b818814610846578063f1cc432a1461087857610269565b8063adc9772e14610720578063b2a5dbfa1461073c578063b398741a14610758578063b4f0e8c314610774578063c1a9d6e91461079257610269565b8063981b24d011610115578063981b24d0146106385780639a99b4f014610668578063a217fddf14610684578063a457c2d7146106a2578063a9059cbb146106d2578063aaf5eb681461070257610269565b80639010d07c1461057e578063919cd40f146105ae57806391d14854146105cc578063946776cd146105fc57806395d89b411461061a57610269565b80633373ee4c116101ea5780635fe5952a116101ae5780635fe5952a146104a857806370a08231146104c657806372b49d63146104f6578063787a08a6146105145780637e90d7ef1461051e5780638dbefee21461054e57610269565b80633373ee4c146103de578063359c4a961461040e57806336568abe1461042c57806339509351146104485780634ee2cd7e1461047857610269565b806323b872dd1161023157806323b872dd14610326578063248a9ca3146103565780632f2ff15d14610386578063312f6b83146103a2578063313ce567146103c057610269565b806306fdde031461026e578063091030c31461028c578063095ea7b3146102bc57806318160ddd146102ec5780631e9a69501461030a575b600080fd5b6102766108a8565b6040516102839190615541565b60405180910390f35b6102a660048036038101906102a19190614df5565b61094a565b6040516102b39190615675565b60405180910390f35b6102d660048036038101906102d19190614ee5565b610962565b6040516102e391906154ba565b60405180910390f35b6102f4610980565b6040516103019190615675565b60405180910390f35b610324600480360381019061031f9190614ee5565b61098a565b005b610340600480360381019061033b9190614e96565b610c24565b60405161034d91906154ba565b60405180910390f35b610370600480360381019061036b9190614f8f565b610cfd565b60405161037d91906154d5565b60405180910390f35b6103a0600480360381019061039b9190614fb8565b610d1d565b005b6103aa610da7565b6040516103b791906154f0565b60405180910390f35b6103c8610dcd565b6040516103d59190615690565b60405180910390f35b6103f860048036038101906103f39190614e5a565b610de4565b6040516104059190615675565b60405180910390f35b610416610e6e565b6040516104239190615675565b60405180910390f35b61044660048036038101906104419190614fb8565b610e74565b005b610462600480360381019061045d9190614ee5565b610f0d565b60405161046f91906154ba565b60405180910390f35b610492600480360381019061048d9190614ee5565b610fc0565b60405161049f9190615675565b60405180910390f35b6104b0611030565b6040516104bd9190615526565b60405180910390f35b6104e060048036038101906104db9190614df5565b611056565b6040516104ed9190615675565b60405180910390f35b6104fe61109f565b60405161050b9190615675565b60405180910390f35b61051c6110a5565b005b61053860048036038101906105339190614df5565b61117a565b6040516105459190615675565b60405180910390f35b61056860048036038101906105639190614df5565b611192565b6040516105759190615675565b60405180910390f35b61059860048036038101906105939190614ff4565b6112a6565b6040516105a5919061544d565b60405180910390f35b6105b66112d8565b6040516105c39190615675565b60405180910390f35b6105e660048036038101906105e19190614fb8565b6112de565b6040516105f391906154ba565b60405180910390f35b610604611310565b604051610611919061550b565b60405180910390f35b610622611336565b60405161062f9190615541565b60405180910390f35b610652600480360381019061064d9190615163565b6113d8565b60405161065f9190615675565b60405180910390f35b610682600480360381019061067d9190614e1e565b611409565b005b61068c61163a565b60405161069991906154d5565b60405180910390f35b6106bc60048036038101906106b79190614ee5565b611641565b6040516106c991906154ba565b60405180910390f35b6106ec60048036038101906106e79190614ee5565b61170e565b6040516106f991906154ba565b60405180910390f35b61070a61172c565b6040516107179190615690565b60405180910390f35b61073a60048036038101906107359190614ee5565b611731565b005b61075660048036038101906107519190614f21565b611984565b005b610772600480360381019061076d9190614ee5565b611baa565b005b61077c611d02565b60405161078991906154d5565b60405180910390f35b6107ac60048036038101906107a79190615030565b611d26565b005b6107c860048036038101906107c391906150ce565b611ea8565b005b6107e460048036038101906107df9190614f8f565b611fba565b6040516107f19190615675565b60405180910390f35b610814600480360381019061080f9190614fb8565b611fe1565b005b610830600480360381019061082b9190614e5a565b61206b565b60405161083d9190615675565b60405180910390f35b610860600480360381019061085b9190614df5565b6120f2565b60405161086f9392919061563e565b60405180910390f35b610892600480360381019061088d919061518c565b612154565b60405161089f9190615675565b60405180910390f35b606060368054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109405780601f1061091557610100808354040283529160200191610940565b820191906000526020600020905b81548152906001019060200180831161092357829003601f168201915b5050505050905090565b60d16020528060005260406000206000915090505481565b600061097661096f6122c1565b84846122c9565b6001905092915050565b6000603554905090565b60008114156109ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c590615563565b60405180910390fd5b600060d160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610a2760cd54826124c090919063ffffffff16565b4211610a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5f906155a3565b60405180910390fd5b60ce54610a92610a8360cd54846124c090919063ffffffff16565b4261254890919063ffffffff16565b1115610ad3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aca906155e3565b60405180910390fd5b6000610ade33611056565b90506000818411610aef5783610af1565b815b9050610aff33836001612592565b50610b0a3382612699565b6000610b1f828461254890919063ffffffff16565b1415610b6b57600060d160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b610bb8858260cc60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661285f9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd12200efa34901b99367694174c3b0d32c99585fdf37c7c26892136ddd0836d983604051610c159190615675565b60405180910390a35050505050565b6000610c31848484612901565b610cf284610c3d6122c1565b610ced85604051806060016040528060288152602001615aeb60289139603460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610ca36122c1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6a9092919063ffffffff16565b6122c9565b600190509392505050565b600060986000838152602001908152602001600020600201549050919050565b610d446098600084815260200190815260200160002060020154610d3f6122c1565b6112de565b610d99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806159d3602f913960400191505060405180910390fd5b610da38282612b2a565b5050565b60cc60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000603860009054906101000a900460ff16905090565b600060cb60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60ce5481565b610e7c6122c1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610eff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180615bcc602f913960400191505060405180910390fd5b610f098282612bbe565b5050565b6000610fb6610f1a6122c1565b84610fb18560346000610f2b6122c1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b6122c9565b6001905092915050565b600080600061100d84606560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020612c52565b91509150816110245761101f85611056565b611026565b805b9250505092915050565b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000603360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60cd5481565b60006110b033611056565b14156110f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e890615603565b60405180910390fd5b4260d160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167ff52f50426b32362d3e6bb8cb36b7074756b224622def6352a59eac7f66ebe6e860405160405180910390a2565b60d06020528060005260406000206000915090505481565b60006060600167ffffffffffffffff811180156111ae57600080fd5b506040519080825280602002602001820160405280156111e857816020015b6111d5614bb8565b8152602001906001900390816111cd5790505b50905060405180606001604052803073ffffffffffffffffffffffffffffffffffffffff16815260200161121b85611056565b8152602001611228610980565b8152508160008151811061123857fe5b602002602001018190525061129e6112508483612da9565b60d060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b915050919050565b60006112d08260986000868152602001908152602001600020600001612f2490919063ffffffff16565b905092915050565b60ca5481565b60006113088260986000868152602001908152602001600020600001612f3e90919063ffffffff16565b905092915050565b60cf60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060378054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113ce5780601f106113a3576101008083540402835291602001916113ce565b820191906000526020600020905b8154815290600101906020018083116113b157829003601f168201915b5050505050905090565b60008060006113e8846066612c52565b91509150816113fe576113f9610980565b611400565b805b92505050919050565b600061141f3361141833611056565b6000612592565b905060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83146114505782611452565b815b905061149e816040518060400160405280600e81526020017f494e56414c49445f414d4f554e5400000000000000000000000000000000000081525084612a6a9092919063ffffffff16565b60d060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060cf60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85836040518363ffffffff1660e01b815260040161153e929190615468565b602060405180830381600087803b15801561155857600080fd5b505af115801561156c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115909190614f66565b6115cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c690615583565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9310ccfcb8de723f578a9e4282ea9f521f05ae40dc08f3068dfad528a65ee3c78360405161162c9190615675565b60405180910390a350505050565b6000801b81565b600061170461164e6122c1565b846116ff85604051806060016040528060258152602001615ba760259139603460006116786122c1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6a9092919063ffffffff16565b6122c9565b6001905092915050565b600061172261171b6122c1565b8484612901565b6001905092915050565b601281565b6000811415611775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176c90615563565b60405180910390fd5b600061178083611056565b90506000611797843084611792610980565b612f6e565b905060008114611870577f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a7684826040516117d2929190615491565b60405180910390a161182c8160d060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b60d060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b61187d6000848685612154565b60d160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118ca84846130e0565b61191933308560cc60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166132a9909392919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5dac0c1b1112564a045ba943c9d50270893e8e826c49be8e7073adc713ab7bd7856040516119769190615675565b60405180910390a350505050565b6119ae7f0178ef1edee9408b9148e43c7402964baa5d7066a35d0ff56e2596c8e1dc0f67336112de565b6119ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e4906155c3565b60405180910390fd5b60005b82829050811015611ba557600060cb6000858585818110611a0d57fe5b9050606002016040016020810190611a259190614df5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050611aa4848484818110611a7057fe5b9050606002016040016020810190611a889190614df5565b82868686818110611a9557fe5b9050606002016020013561336a565b50838383818110611ab157fe5b9050606002016000016020810190611ac9919061513a565b8160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550838383818110611b0f57fe5b9050606002016040016020810190611b279190614df5565b73ffffffffffffffffffffffffffffffffffffffff167f87fa03892a0556cb6b8f97e6d533a150d4d55fcbf275fff5fa003fa636bcc7fa858585818110611b6a57fe5b9050606002016000016020810190611b82919061513a565b604051611b8f9190615623565b60405180910390a25080806001019150506119f0565b505050565b600060019054906101000a900460ff1680611bc95750611bc86134a7565b5b80611bdf575060008054906101000a900460ff16155b611c34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611c84576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611c8c6134be565b611c9f82426124c090919063ffffffff16565b60ca81905550611cb26000801b336135bc565b611cdc7f0178ef1edee9408b9148e43c7402964baa5d7066a35d0ff56e2596c8e1dc0f67846135bc565b8015611cfd5760008060016101000a81548160ff0219169083151502179055505b505050565b7f0178ef1edee9408b9148e43c7402964baa5d7066a35d0ff56e2596c8e1dc0f6781565b600060019054906101000a900460ff1680611d455750611d446134a7565b5b80611d5b575060008054906101000a900460ff16155b611db0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611e00576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611e7d6040518060400160405280600c81526020017f5374616b656420455448495800000000000000000000000000000000000000008152506040518060400160405280600881526020017f73746b455448495800000000000000000000000000000000000000000000000081525060128a8c8b8b8b8b8b6135ca565b8015611e9e5760008060016101000a81548160ff0219169083151502179055505b5050505050505050565b600060019054906101000a900460ff1680611ec75750611ec66134a7565b5b80611edd575060008054906101000a900460ff16155b611f32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611f82576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611f8a61379a565b611f9483836138a8565b8015611fb55760008060016101000a81548160ff0219169083151502179055505b505050565b6000611fda609860008481526020019081526020016000206000016139ba565b9050919050565b61200860986000848152602001908152602001600020600201546120036122c1565b6112de565b61205d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180615a6c6030913960400191505060405180910390fd5b6120678282612bbe565b5050565b6000603460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60cb6020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16908060010154905083565b60008060d160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156121ac5760009150506122b9565b60006121d760ce546121c960cd544261254890919063ffffffff16565b61254890919063ffffffff16565b9050818111156121ea576000915061226f565b60008782116121f957876121fb565b425b905082811015612210578293505050506122b9565b61226b61222686896124c090919063ffffffff16565b61225d61223c86896139cf90919063ffffffff16565b61224f858c6139cf90919063ffffffff16565b6124c090919063ffffffff16565b613a5590919063ffffffff16565b9250505b8160d160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081925050505b949350505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561234f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180615b596024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156123d5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180615a246022913960400191505060405180910390fd5b80603460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b60008082840190508381101561253e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061258a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612a6a565b905092915050565b6000806125a88530866125a3610980565b612f6e565b905060006125fe8260d060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b90506000821461268d578315612653578060d060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b7f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a768683604051612684929190615491565b60405180910390a15b80925050509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561271f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615b136021913960400191505060405180910390fd5b61272b82600083613a9f565b61279781604051806060016040528060228152602001615a0260229139603360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6a9092919063ffffffff16565b603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127ef8160355461254890919063ffffffff16565b603581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6128fc8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613b59565b505050565b600061290c84611056565b905061291a84826001612592565b508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614612a5957600061295984611056565b905061296784826001612592565b50600060d160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506129b881858785612154565b60d160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508383148015612a0b575060008114155b15612a5657600060d160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b50505b612a64848484613c48565b50505050565b6000838311158290612b17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612adc578082015181840152602081019050612ac1565b50505050905090810190601f168015612b095780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b612b528160986000858152602001908152602001600020600001613f0d90919063ffffffff16565b15612bba57612b5f6122c1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b612be68160986000858152602001908152602001600020600001613f3d90919063ffffffff16565b15612c4e57612bf36122c1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60008060008411612ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552433230536e617073686f743a20696420697320300000000000000000000081525060200191505060405180910390fd5b612cd56068613f6d565b841115612d4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000081525060200191505060405180910390fd5b6000612d628585600001613f7b90919063ffffffff16565b90508360000180549050811415612d80576000809250925050612da2565b6001846001018281548110612d9157fe5b906000526020600020015492509250505b9250929050565b6000806000905060005b8351811015612f1957600060cb6000868481518110612dce57fe5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000612e9182600101548360000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168460000160109054906101000a90046fffffffffffffffffffffffffffffffff16898781518110612e8057fe5b60200260200101516040015161402c565b9050612f08612ef9878581518110612ea557fe5b602002602001015160200151838560020160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054614121565b856124c090919063ffffffff16565b935050508080600101915050612db3565b508091505092915050565b6000612f33836000018361416a565b60001c905092915050565b6000612f66836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6141ed565b905092915050565b60008060cb60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008061300688858861336a565b90508083146130d1576000871461302557613022878285614121565b91505b808460020160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fbb123b5c06d5408bbea3c4fef481578175cfb432e3b482c6186f02ed9086585b836040516130c89190615675565b60405180910390a35b81945050505050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b61318f60008383613a9f565b6131a4816035546124c090919063ffffffff16565b6035819055506131fc81603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b613364846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613b59565b50505050565b6000808360010154905060008460000160109054906101000a90046fffffffffffffffffffffffffffffffff169050806fffffffffffffffffffffffffffffffff164214156133bd5781925050506134a0565b60006133fd838760000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16848861402c565b905082811461345e578086600101819055508673ffffffffffffffffffffffffffffffffffffffff167f5777ca300dfe5bead41006fbce4389794dbc0ed8d6cccebfaf94630aa04184bc826040516134559190615675565b60405180910390a25b428660000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508093505050505b9392505050565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff16806134dd57506134dc6134a7565b5b806134f3575060008054906101000a900460ff16155b613548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613598576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156135b95760008060016101000a81548160ff0219169083151502179055505b50565b6135c68282612b2a565b5050565b600060019054906101000a900460ff16806135e957506135e86134a7565b5b806135ff575060008054906101000a900460ff16155b613654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156136a4576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6136ae8b8b611ea8565b6136b789614210565b6136c08861422e565b6136dc83836fffffffffffffffffffffffffffffffff16611baa565b8660cc60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560cd819055508460ce819055508360cf60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550801561378d5760008060016101000a81548160ff0219169083151502179055505b5050505050505050505050565b600060019054906101000a900460ff16806137b957506137b86134a7565b5b806137cf575060008054906101000a900460ff16155b613824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613874576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61387c614272565b613884614370565b80156138a55760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806138c757506138c66134a7565b5b806138dd575060008054906101000a900460ff16155b613932576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613982576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61398a614272565b613994838361446e565b80156139b55760008060016101000a81548160ff0219169083151502179055505b505050565b60006139c8826000016145b8565b9050919050565b6000808314156139e25760009050613a4f565b60008284029050828482816139f357fe5b0414613a4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615aca6021913960400191505060405180910390fd5b809150505b92915050565b6000613a9783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506145c9565b905092915050565b613aaa83838361468f565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613af557613ae882614694565b613af06146e7565b613b54565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613b4057613b3383614694565b613b3b6146e7565b613b53565b613b4983614694565b613b5282614694565b5b5b505050565b6060613bbb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166146fb9092919063ffffffff16565b9050600081511115613c4357808060200190516020811015613bdc57600080fd5b8101908080519060200190929190505050613c42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b7d602a913960400191505060405180910390fd5b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613cce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180615b346025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613d54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806159b06023913960400191505060405180910390fd5b613d5f838383613a9f565b613dcb81604051806060016040528060268152602001615a4660269139603360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6a9092919063ffffffff16565b603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613e6081603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000613f35836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614713565b905092915050565b6000613f65836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614783565b905092915050565b600081600001549050919050565b60008083805490501415613f925760009050614026565b600080848054905090505b80821015613fe6576000613fb1838361486b565b905084868281548110613fc057fe5b90600052602060002001541115613fd957809150613fe0565b6001810192505b50613f9d565b60008211801561400e57508385600184038154811061400157fe5b9060005260206000200154145b15614020576001820392505050614026565b81925050505b92915050565b60008084148061403c5750600082145b80614058575042836fffffffffffffffffffffffffffffffff16145b80614077575060ca54836fffffffffffffffffffffffffffffffff1610155b1561408457849050614119565b600060ca5442116140955742614099565b60ca545b905060006140c2856fffffffffffffffffffffffffffffffff168361254890919063ffffffff16565b905061411487614106866140f8601260ff16600a0a6140ea878d6139cf90919063ffffffff16565b6139cf90919063ffffffff16565b613a5590919063ffffffff16565b6124c090919063ffffffff16565b925050505b949350505050565b6000614161601260ff16600a0a614153614144858761254890919063ffffffff16565b876139cf90919063ffffffff16565b613a5590919063ffffffff16565b90509392505050565b6000818360000180549050116141cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061598e6022913960400191505060405180910390fd5b8260000182815481106141da57fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b80603860006101000a81548160ff021916908360ff16021790555050565b80609760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600060019054906101000a900460ff168061429157506142906134a7565b5b806142a7575060008054906101000a900460ff16155b6142fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561434c576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b801561436d5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff168061438f575061438e6134a7565b5b806143a5575060008054906101000a900460ff16155b6143fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561444a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b801561446b5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff168061448d575061448c6134a7565b5b806144a3575060008054906101000a900460ff16155b6144f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614548576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b826036908051906020019061455e929190614bef565b508160379080519060200190614575929190614bef565b506012603860006101000a81548160ff021916908360ff16021790555080156145b35760008060016101000a81548160ff0219169083151502179055505b505050565b600081600001805490509050919050565b60008083118290614675576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561463a57808201518184015260208101905061461f565b50505050905090810190601f1680156146675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161468157fe5b049050809150509392505050565b505050565b6146e4606560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206146df83611056565b6148ad565b50565b6146f960666146f4610980565b6148ad565b565b606061470a848460008561492a565b90509392505050565b600061471f83836141ed565b61477857826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061477d565b600090505b92915050565b6000808360010160008481526020019081526020016000205490506000811461485f57600060018203905060006001866000018054905003905060008660000182815481106147ce57fe5b90600052602060002001549050808760000184815481106147eb57fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061482357fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050614865565b60009150505b92915050565b6000600280838161487857fe5b066002858161488357fe5b06018161488c57fe5b046002838161489757fe5b04600285816148a257fe5b040101905092915050565b60006148b96068613f6d565b9050806148c884600001614b30565b10156149255782600001819080600181540180825580915050600190039060005260206000200160009091909190915055826001018290806001815401808255809150506001900390600052602060002001600090919091909150555b505050565b606061493585614b6d565b6149a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106149f757805182526020820191506020810190506020830392506149d4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614a59576040519150601f19603f3d011682016040523d82523d6000602084013e614a5e565b606091505b50915091508115614a73578092505050614b28565b600081511115614a865780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614aed578082015181840152602081019050614ad2565b50505050905090810190601f168015614b1a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b949350505050565b60008082805490501415614b475760009050614b68565b81600183805490500381548110614b5a57fe5b906000526020600020015490505b919050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614baf57506000801b8214155b92505050919050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282614c255760008555614c6c565b82601f10614c3e57805160ff1916838001178555614c6c565b82800160010185558215614c6c579182015b82811115614c6b578251825591602001919060010190614c50565b5b509050614c799190614c7d565b5090565b5b80821115614c96576000816000905550600101614c7e565b5090565b600081359050614ca9816158be565b92915050565b600081359050614cbe816158d5565b92915050565b60008083601f840112614cd657600080fd5b8235905067ffffffffffffffff811115614cef57600080fd5b602083019150836060820283011115614d0757600080fd5b9250929050565b600081519050614d1d816158ec565b92915050565b600081359050614d3281615903565b92915050565b600081359050614d478161591a565b92915050565b600081359050614d5c81615931565b92915050565b600081359050614d7181615948565b92915050565b600082601f830112614d8857600080fd5b8135614d9b614d96826156dc565b6156ab565b91508082526020830160208301858383011115614db757600080fd5b614dc2838284615869565b50505092915050565b600081359050614dda8161595f565b92915050565b600081359050614def81615976565b92915050565b600060208284031215614e0757600080fd5b6000614e1584828501614c9a565b91505092915050565b60008060408385031215614e3157600080fd5b6000614e3f85828601614caf565b9250506020614e5085828601614de0565b9150509250929050565b60008060408385031215614e6d57600080fd5b6000614e7b85828601614c9a565b9250506020614e8c85828601614c9a565b9150509250929050565b600080600060608486031215614eab57600080fd5b6000614eb986828701614c9a565b9350506020614eca86828701614c9a565b9250506040614edb86828701614de0565b9150509250925092565b60008060408385031215614ef857600080fd5b6000614f0685828601614c9a565b9250506020614f1785828601614de0565b9150509250929050565b60008060208385031215614f3457600080fd5b600083013567ffffffffffffffff811115614f4e57600080fd5b614f5a85828601614cc4565b92509250509250929050565b600060208284031215614f7857600080fd5b6000614f8684828501614d0e565b91505092915050565b600060208284031215614fa157600080fd5b6000614faf84828501614d23565b91505092915050565b60008060408385031215614fcb57600080fd5b6000614fd985828601614d23565b9250506020614fea85828601614c9a565b9150509250929050565b6000806040838503121561500757600080fd5b600061501585828601614d23565b925050602061502685828601614de0565b9150509250929050565b600080600080600080600060e0888a03121561504b57600080fd5b60006150598a828b01614d38565b975050602061506a8a828b01614d62565b965050604061507b8a828b01614de0565b955050606061508c8a828b01614de0565b945050608061509d8a828b01614d4d565b93505060a06150ae8a828b01614c9a565b92505060c06150bf8a828b01614dcb565b91505092959891949750929550565b600080604083850312156150e157600080fd5b600083013567ffffffffffffffff8111156150fb57600080fd5b61510785828601614d77565b925050602083013567ffffffffffffffff81111561512457600080fd5b61513085828601614d77565b9150509250929050565b60006020828403121561514c57600080fd5b600061515a84828501614dcb565b91505092915050565b60006020828403121561517557600080fd5b600061518384828501614de0565b91505092915050565b600080600080608085870312156151a257600080fd5b60006151b087828801614de0565b94505060206151c187828801614de0565b93505060406151d287828801614c9a565b92505060606151e387828801614de0565b91505092959194509250565b6151f88161573a565b82525050565b61520781615728565b82525050565b6152168161574c565b82525050565b61522581615758565b82525050565b615234816157eb565b82525050565b6152438161580f565b82525050565b61525281615833565b82525050565b60006152638261570c565b61526d8185615717565b935061527d818560208601615878565b615286816158ad565b840191505092915050565b600061529e601383615717565b91507f494e56414c49445f5a45524f5f414d4f554e54000000000000000000000000006000830152602082019050919050565b60006152de601983615717565b91507f4552524f525f5452414e534645525f46524f4d5f5641554c54000000000000006000830152602082019050919050565b600061531e601583615717565b91507f494e53554646494349454e545f434f4f4c444f574e00000000000000000000006000830152602082019050919050565b600061535e601583615717565b91507f4f4e4c595f454d495353494f4e5f4d414e4147455200000000000000000000006000830152602082019050919050565b600061539e601783615717565b91507f554e5354414b455f57494e444f575f46494e49534845440000000000000000006000830152602082019050919050565b60006153de601b83615717565b91507f494e56414c49445f42414c414e43455f4f4e5f434f4f4c444f574e00000000006000830152602082019050919050565b61541a81615798565b82525050565b61542981615857565b82525050565b615438816157d4565b82525050565b615447816157de565b82525050565b600060208201905061546260008301846151fe565b92915050565b600060408201905061547d60008301856151ef565b61548a602083018461542f565b9392505050565b60006040820190506154a660008301856151fe565b6154b3602083018461542f565b9392505050565b60006020820190506154cf600083018461520d565b92915050565b60006020820190506154ea600083018461521c565b92915050565b6000602082019050615505600083018461522b565b92915050565b6000602082019050615520600083018461523a565b92915050565b600060208201905061553b6000830184615249565b92915050565b6000602082019050818103600083015261555b8184615258565b905092915050565b6000602082019050818103600083015261557c81615291565b9050919050565b6000602082019050818103600083015261559c816152d1565b9050919050565b600060208201905081810360008301526155bc81615311565b9050919050565b600060208201905081810360008301526155dc81615351565b9050919050565b600060208201905081810360008301526155fc81615391565b9050919050565b6000602082019050818103600083015261561c816153d1565b9050919050565b60006020820190506156386000830184615420565b92915050565b60006060820190506156536000830186615411565b6156606020830185615411565b61566d604083018461542f565b949350505050565b600060208201905061568a600083018461542f565b92915050565b60006020820190506156a5600083018461543e565b92915050565b6000604051905081810181811067ffffffffffffffff821117156156d2576156d16158ab565b5b8060405250919050565b600067ffffffffffffffff8211156156f7576156f66158ab565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000615733826157b4565b9050919050565b6000615745826157b4565b9050919050565b60008115159050919050565b6000819050919050565b600061576d82615728565b9050919050565b600061577f82615728565b9050919050565b600061579182615728565b9050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006157f6826157fd565b9050919050565b6000615808826157b4565b9050919050565b600061581a82615821565b9050919050565b600061582c826157b4565b9050919050565b600061583e82615845565b9050919050565b6000615850826157b4565b9050919050565b600061586282615798565b9050919050565b82818337600083830152505050565b60005b8381101561589657808201518184015260208101905061587b565b838111156158a5576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b6158c781615728565b81146158d257600080fd5b50565b6158de8161573a565b81146158e957600080fd5b50565b6158f58161574c565b811461590057600080fd5b50565b61590c81615758565b811461591757600080fd5b50565b61592381615762565b811461592e57600080fd5b50565b61593a81615774565b811461594557600080fd5b50565b61595181615786565b811461595c57600080fd5b50565b61596881615798565b811461597357600080fd5b50565b61597f816157d4565b811461598a57600080fd5b5056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220bcde306c1ffec3460a1bc9f99538724f50b0479d02050777d45606104baa3b7864736f6c63430007050033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102695760003560e01c80639010d07c11610151578063adc9772e116100c3578063c3c9e42d11610087578063c3c9e42d146107ae578063ca15c873146107ca578063d547741f146107fa578063dd62ed3e14610816578063f11b818814610846578063f1cc432a1461087857610269565b8063adc9772e14610720578063b2a5dbfa1461073c578063b398741a14610758578063b4f0e8c314610774578063c1a9d6e91461079257610269565b8063981b24d011610115578063981b24d0146106385780639a99b4f014610668578063a217fddf14610684578063a457c2d7146106a2578063a9059cbb146106d2578063aaf5eb681461070257610269565b80639010d07c1461057e578063919cd40f146105ae57806391d14854146105cc578063946776cd146105fc57806395d89b411461061a57610269565b80633373ee4c116101ea5780635fe5952a116101ae5780635fe5952a146104a857806370a08231146104c657806372b49d63146104f6578063787a08a6146105145780637e90d7ef1461051e5780638dbefee21461054e57610269565b80633373ee4c146103de578063359c4a961461040e57806336568abe1461042c57806339509351146104485780634ee2cd7e1461047857610269565b806323b872dd1161023157806323b872dd14610326578063248a9ca3146103565780632f2ff15d14610386578063312f6b83146103a2578063313ce567146103c057610269565b806306fdde031461026e578063091030c31461028c578063095ea7b3146102bc57806318160ddd146102ec5780631e9a69501461030a575b600080fd5b6102766108a8565b6040516102839190615541565b60405180910390f35b6102a660048036038101906102a19190614df5565b61094a565b6040516102b39190615675565b60405180910390f35b6102d660048036038101906102d19190614ee5565b610962565b6040516102e391906154ba565b60405180910390f35b6102f4610980565b6040516103019190615675565b60405180910390f35b610324600480360381019061031f9190614ee5565b61098a565b005b610340600480360381019061033b9190614e96565b610c24565b60405161034d91906154ba565b60405180910390f35b610370600480360381019061036b9190614f8f565b610cfd565b60405161037d91906154d5565b60405180910390f35b6103a0600480360381019061039b9190614fb8565b610d1d565b005b6103aa610da7565b6040516103b791906154f0565b60405180910390f35b6103c8610dcd565b6040516103d59190615690565b60405180910390f35b6103f860048036038101906103f39190614e5a565b610de4565b6040516104059190615675565b60405180910390f35b610416610e6e565b6040516104239190615675565b60405180910390f35b61044660048036038101906104419190614fb8565b610e74565b005b610462600480360381019061045d9190614ee5565b610f0d565b60405161046f91906154ba565b60405180910390f35b610492600480360381019061048d9190614ee5565b610fc0565b60405161049f9190615675565b60405180910390f35b6104b0611030565b6040516104bd9190615526565b60405180910390f35b6104e060048036038101906104db9190614df5565b611056565b6040516104ed9190615675565b60405180910390f35b6104fe61109f565b60405161050b9190615675565b60405180910390f35b61051c6110a5565b005b61053860048036038101906105339190614df5565b61117a565b6040516105459190615675565b60405180910390f35b61056860048036038101906105639190614df5565b611192565b6040516105759190615675565b60405180910390f35b61059860048036038101906105939190614ff4565b6112a6565b6040516105a5919061544d565b60405180910390f35b6105b66112d8565b6040516105c39190615675565b60405180910390f35b6105e660048036038101906105e19190614fb8565b6112de565b6040516105f391906154ba565b60405180910390f35b610604611310565b604051610611919061550b565b60405180910390f35b610622611336565b60405161062f9190615541565b60405180910390f35b610652600480360381019061064d9190615163565b6113d8565b60405161065f9190615675565b60405180910390f35b610682600480360381019061067d9190614e1e565b611409565b005b61068c61163a565b60405161069991906154d5565b60405180910390f35b6106bc60048036038101906106b79190614ee5565b611641565b6040516106c991906154ba565b60405180910390f35b6106ec60048036038101906106e79190614ee5565b61170e565b6040516106f991906154ba565b60405180910390f35b61070a61172c565b6040516107179190615690565b60405180910390f35b61073a60048036038101906107359190614ee5565b611731565b005b61075660048036038101906107519190614f21565b611984565b005b610772600480360381019061076d9190614ee5565b611baa565b005b61077c611d02565b60405161078991906154d5565b60405180910390f35b6107ac60048036038101906107a79190615030565b611d26565b005b6107c860048036038101906107c391906150ce565b611ea8565b005b6107e460048036038101906107df9190614f8f565b611fba565b6040516107f19190615675565b60405180910390f35b610814600480360381019061080f9190614fb8565b611fe1565b005b610830600480360381019061082b9190614e5a565b61206b565b60405161083d9190615675565b60405180910390f35b610860600480360381019061085b9190614df5565b6120f2565b60405161086f9392919061563e565b60405180910390f35b610892600480360381019061088d919061518c565b612154565b60405161089f9190615675565b60405180910390f35b606060368054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109405780601f1061091557610100808354040283529160200191610940565b820191906000526020600020905b81548152906001019060200180831161092357829003601f168201915b5050505050905090565b60d16020528060005260406000206000915090505481565b600061097661096f6122c1565b84846122c9565b6001905092915050565b6000603554905090565b60008114156109ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c590615563565b60405180910390fd5b600060d160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610a2760cd54826124c090919063ffffffff16565b4211610a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5f906155a3565b60405180910390fd5b60ce54610a92610a8360cd54846124c090919063ffffffff16565b4261254890919063ffffffff16565b1115610ad3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aca906155e3565b60405180910390fd5b6000610ade33611056565b90506000818411610aef5783610af1565b815b9050610aff33836001612592565b50610b0a3382612699565b6000610b1f828461254890919063ffffffff16565b1415610b6b57600060d160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b610bb8858260cc60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661285f9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd12200efa34901b99367694174c3b0d32c99585fdf37c7c26892136ddd0836d983604051610c159190615675565b60405180910390a35050505050565b6000610c31848484612901565b610cf284610c3d6122c1565b610ced85604051806060016040528060288152602001615aeb60289139603460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610ca36122c1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6a9092919063ffffffff16565b6122c9565b600190509392505050565b600060986000838152602001908152602001600020600201549050919050565b610d446098600084815260200190815260200160002060020154610d3f6122c1565b6112de565b610d99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806159d3602f913960400191505060405180910390fd5b610da38282612b2a565b5050565b60cc60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000603860009054906101000a900460ff16905090565b600060cb60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60ce5481565b610e7c6122c1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610eff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180615bcc602f913960400191505060405180910390fd5b610f098282612bbe565b5050565b6000610fb6610f1a6122c1565b84610fb18560346000610f2b6122c1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b6122c9565b6001905092915050565b600080600061100d84606560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020612c52565b91509150816110245761101f85611056565b611026565b805b9250505092915050565b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000603360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60cd5481565b60006110b033611056565b14156110f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e890615603565b60405180910390fd5b4260d160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167ff52f50426b32362d3e6bb8cb36b7074756b224622def6352a59eac7f66ebe6e860405160405180910390a2565b60d06020528060005260406000206000915090505481565b60006060600167ffffffffffffffff811180156111ae57600080fd5b506040519080825280602002602001820160405280156111e857816020015b6111d5614bb8565b8152602001906001900390816111cd5790505b50905060405180606001604052803073ffffffffffffffffffffffffffffffffffffffff16815260200161121b85611056565b8152602001611228610980565b8152508160008151811061123857fe5b602002602001018190525061129e6112508483612da9565b60d060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b915050919050565b60006112d08260986000868152602001908152602001600020600001612f2490919063ffffffff16565b905092915050565b60ca5481565b60006113088260986000868152602001908152602001600020600001612f3e90919063ffffffff16565b905092915050565b60cf60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060378054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113ce5780601f106113a3576101008083540402835291602001916113ce565b820191906000526020600020905b8154815290600101906020018083116113b157829003601f168201915b5050505050905090565b60008060006113e8846066612c52565b91509150816113fe576113f9610980565b611400565b805b92505050919050565b600061141f3361141833611056565b6000612592565b905060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83146114505782611452565b815b905061149e816040518060400160405280600e81526020017f494e56414c49445f414d4f554e5400000000000000000000000000000000000081525084612a6a9092919063ffffffff16565b60d060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060cf60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85836040518363ffffffff1660e01b815260040161153e929190615468565b602060405180830381600087803b15801561155857600080fd5b505af115801561156c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115909190614f66565b6115cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c690615583565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9310ccfcb8de723f578a9e4282ea9f521f05ae40dc08f3068dfad528a65ee3c78360405161162c9190615675565b60405180910390a350505050565b6000801b81565b600061170461164e6122c1565b846116ff85604051806060016040528060258152602001615ba760259139603460006116786122c1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6a9092919063ffffffff16565b6122c9565b6001905092915050565b600061172261171b6122c1565b8484612901565b6001905092915050565b601281565b6000811415611775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176c90615563565b60405180910390fd5b600061178083611056565b90506000611797843084611792610980565b612f6e565b905060008114611870577f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a7684826040516117d2929190615491565b60405180910390a161182c8160d060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b60d060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b61187d6000848685612154565b60d160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118ca84846130e0565b61191933308560cc60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166132a9909392919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5dac0c1b1112564a045ba943c9d50270893e8e826c49be8e7073adc713ab7bd7856040516119769190615675565b60405180910390a350505050565b6119ae7f0178ef1edee9408b9148e43c7402964baa5d7066a35d0ff56e2596c8e1dc0f67336112de565b6119ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e4906155c3565b60405180910390fd5b60005b82829050811015611ba557600060cb6000858585818110611a0d57fe5b9050606002016040016020810190611a259190614df5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050611aa4848484818110611a7057fe5b9050606002016040016020810190611a889190614df5565b82868686818110611a9557fe5b9050606002016020013561336a565b50838383818110611ab157fe5b9050606002016000016020810190611ac9919061513a565b8160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550838383818110611b0f57fe5b9050606002016040016020810190611b279190614df5565b73ffffffffffffffffffffffffffffffffffffffff167f87fa03892a0556cb6b8f97e6d533a150d4d55fcbf275fff5fa003fa636bcc7fa858585818110611b6a57fe5b9050606002016000016020810190611b82919061513a565b604051611b8f9190615623565b60405180910390a25080806001019150506119f0565b505050565b600060019054906101000a900460ff1680611bc95750611bc86134a7565b5b80611bdf575060008054906101000a900460ff16155b611c34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611c84576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611c8c6134be565b611c9f82426124c090919063ffffffff16565b60ca81905550611cb26000801b336135bc565b611cdc7f0178ef1edee9408b9148e43c7402964baa5d7066a35d0ff56e2596c8e1dc0f67846135bc565b8015611cfd5760008060016101000a81548160ff0219169083151502179055505b505050565b7f0178ef1edee9408b9148e43c7402964baa5d7066a35d0ff56e2596c8e1dc0f6781565b600060019054906101000a900460ff1680611d455750611d446134a7565b5b80611d5b575060008054906101000a900460ff16155b611db0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611e00576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611e7d6040518060400160405280600c81526020017f5374616b656420455448495800000000000000000000000000000000000000008152506040518060400160405280600881526020017f73746b455448495800000000000000000000000000000000000000000000000081525060128a8c8b8b8b8b8b6135ca565b8015611e9e5760008060016101000a81548160ff0219169083151502179055505b5050505050505050565b600060019054906101000a900460ff1680611ec75750611ec66134a7565b5b80611edd575060008054906101000a900460ff16155b611f32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611f82576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611f8a61379a565b611f9483836138a8565b8015611fb55760008060016101000a81548160ff0219169083151502179055505b505050565b6000611fda609860008481526020019081526020016000206000016139ba565b9050919050565b61200860986000848152602001908152602001600020600201546120036122c1565b6112de565b61205d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180615a6c6030913960400191505060405180910390fd5b6120678282612bbe565b5050565b6000603460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60cb6020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16908060010154905083565b60008060d160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156121ac5760009150506122b9565b60006121d760ce546121c960cd544261254890919063ffffffff16565b61254890919063ffffffff16565b9050818111156121ea576000915061226f565b60008782116121f957876121fb565b425b905082811015612210578293505050506122b9565b61226b61222686896124c090919063ffffffff16565b61225d61223c86896139cf90919063ffffffff16565b61224f858c6139cf90919063ffffffff16565b6124c090919063ffffffff16565b613a5590919063ffffffff16565b9250505b8160d160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081925050505b949350505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561234f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180615b596024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156123d5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180615a246022913960400191505060405180910390fd5b80603460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b60008082840190508381101561253e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061258a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612a6a565b905092915050565b6000806125a88530866125a3610980565b612f6e565b905060006125fe8260d060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b90506000821461268d578315612653578060d060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b7f2468f9268c60ad90e2d49edb0032c8a001e733ae888b3ab8e982edf535be1a768683604051612684929190615491565b60405180910390a15b80925050509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561271f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615b136021913960400191505060405180910390fd5b61272b82600083613a9f565b61279781604051806060016040528060228152602001615a0260229139603360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6a9092919063ffffffff16565b603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127ef8160355461254890919063ffffffff16565b603581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6128fc8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613b59565b505050565b600061290c84611056565b905061291a84826001612592565b508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614612a5957600061295984611056565b905061296784826001612592565b50600060d160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506129b881858785612154565b60d160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508383148015612a0b575060008114155b15612a5657600060d160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b50505b612a64848484613c48565b50505050565b6000838311158290612b17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612adc578082015181840152602081019050612ac1565b50505050905090810190601f168015612b095780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b612b528160986000858152602001908152602001600020600001613f0d90919063ffffffff16565b15612bba57612b5f6122c1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b612be68160986000858152602001908152602001600020600001613f3d90919063ffffffff16565b15612c4e57612bf36122c1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60008060008411612ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552433230536e617073686f743a20696420697320300000000000000000000081525060200191505060405180910390fd5b612cd56068613f6d565b841115612d4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000081525060200191505060405180910390fd5b6000612d628585600001613f7b90919063ffffffff16565b90508360000180549050811415612d80576000809250925050612da2565b6001846001018281548110612d9157fe5b906000526020600020015492509250505b9250929050565b6000806000905060005b8351811015612f1957600060cb6000868481518110612dce57fe5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000612e9182600101548360000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168460000160109054906101000a90046fffffffffffffffffffffffffffffffff16898781518110612e8057fe5b60200260200101516040015161402c565b9050612f08612ef9878581518110612ea557fe5b602002602001015160200151838560020160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054614121565b856124c090919063ffffffff16565b935050508080600101915050612db3565b508091505092915050565b6000612f33836000018361416a565b60001c905092915050565b6000612f66836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6141ed565b905092915050565b60008060cb60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008061300688858861336a565b90508083146130d1576000871461302557613022878285614121565b91505b808460020160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fbb123b5c06d5408bbea3c4fef481578175cfb432e3b482c6186f02ed9086585b836040516130c89190615675565b60405180910390a35b81945050505050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b61318f60008383613a9f565b6131a4816035546124c090919063ffffffff16565b6035819055506131fc81603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b613364846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613b59565b50505050565b6000808360010154905060008460000160109054906101000a90046fffffffffffffffffffffffffffffffff169050806fffffffffffffffffffffffffffffffff164214156133bd5781925050506134a0565b60006133fd838760000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16848861402c565b905082811461345e578086600101819055508673ffffffffffffffffffffffffffffffffffffffff167f5777ca300dfe5bead41006fbce4389794dbc0ed8d6cccebfaf94630aa04184bc826040516134559190615675565b60405180910390a25b428660000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508093505050505b9392505050565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff16806134dd57506134dc6134a7565b5b806134f3575060008054906101000a900460ff16155b613548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613598576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156135b95760008060016101000a81548160ff0219169083151502179055505b50565b6135c68282612b2a565b5050565b600060019054906101000a900460ff16806135e957506135e86134a7565b5b806135ff575060008054906101000a900460ff16155b613654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156136a4576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6136ae8b8b611ea8565b6136b789614210565b6136c08861422e565b6136dc83836fffffffffffffffffffffffffffffffff16611baa565b8660cc60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560cd819055508460ce819055508360cf60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550801561378d5760008060016101000a81548160ff0219169083151502179055505b5050505050505050505050565b600060019054906101000a900460ff16806137b957506137b86134a7565b5b806137cf575060008054906101000a900460ff16155b613824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613874576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61387c614272565b613884614370565b80156138a55760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806138c757506138c66134a7565b5b806138dd575060008054906101000a900460ff16155b613932576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613982576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61398a614272565b613994838361446e565b80156139b55760008060016101000a81548160ff0219169083151502179055505b505050565b60006139c8826000016145b8565b9050919050565b6000808314156139e25760009050613a4f565b60008284029050828482816139f357fe5b0414613a4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615aca6021913960400191505060405180910390fd5b809150505b92915050565b6000613a9783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506145c9565b905092915050565b613aaa83838361468f565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613af557613ae882614694565b613af06146e7565b613b54565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613b4057613b3383614694565b613b3b6146e7565b613b53565b613b4983614694565b613b5282614694565b5b5b505050565b6060613bbb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166146fb9092919063ffffffff16565b9050600081511115613c4357808060200190516020811015613bdc57600080fd5b8101908080519060200190929190505050613c42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b7d602a913960400191505060405180910390fd5b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613cce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180615b346025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613d54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806159b06023913960400191505060405180910390fd5b613d5f838383613a9f565b613dcb81604051806060016040528060268152602001615a4660269139603360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a6a9092919063ffffffff16565b603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613e6081603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000613f35836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614713565b905092915050565b6000613f65836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614783565b905092915050565b600081600001549050919050565b60008083805490501415613f925760009050614026565b600080848054905090505b80821015613fe6576000613fb1838361486b565b905084868281548110613fc057fe5b90600052602060002001541115613fd957809150613fe0565b6001810192505b50613f9d565b60008211801561400e57508385600184038154811061400157fe5b9060005260206000200154145b15614020576001820392505050614026565b81925050505b92915050565b60008084148061403c5750600082145b80614058575042836fffffffffffffffffffffffffffffffff16145b80614077575060ca54836fffffffffffffffffffffffffffffffff1610155b1561408457849050614119565b600060ca5442116140955742614099565b60ca545b905060006140c2856fffffffffffffffffffffffffffffffff168361254890919063ffffffff16565b905061411487614106866140f8601260ff16600a0a6140ea878d6139cf90919063ffffffff16565b6139cf90919063ffffffff16565b613a5590919063ffffffff16565b6124c090919063ffffffff16565b925050505b949350505050565b6000614161601260ff16600a0a614153614144858761254890919063ffffffff16565b876139cf90919063ffffffff16565b613a5590919063ffffffff16565b90509392505050565b6000818360000180549050116141cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061598e6022913960400191505060405180910390fd5b8260000182815481106141da57fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b80603860006101000a81548160ff021916908360ff16021790555050565b80609760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600060019054906101000a900460ff168061429157506142906134a7565b5b806142a7575060008054906101000a900460ff16155b6142fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561434c576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b801561436d5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff168061438f575061438e6134a7565b5b806143a5575060008054906101000a900460ff16155b6143fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561444a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b801561446b5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff168061448d575061448c6134a7565b5b806144a3575060008054906101000a900460ff16155b6144f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615a9c602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614548576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b826036908051906020019061455e929190614bef565b508160379080519060200190614575929190614bef565b506012603860006101000a81548160ff021916908360ff16021790555080156145b35760008060016101000a81548160ff0219169083151502179055505b505050565b600081600001805490509050919050565b60008083118290614675576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561463a57808201518184015260208101905061461f565b50505050905090810190601f1680156146675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161468157fe5b049050809150509392505050565b505050565b6146e4606560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206146df83611056565b6148ad565b50565b6146f960666146f4610980565b6148ad565b565b606061470a848460008561492a565b90509392505050565b600061471f83836141ed565b61477857826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061477d565b600090505b92915050565b6000808360010160008481526020019081526020016000205490506000811461485f57600060018203905060006001866000018054905003905060008660000182815481106147ce57fe5b90600052602060002001549050808760000184815481106147eb57fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061482357fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050614865565b60009150505b92915050565b6000600280838161487857fe5b066002858161488357fe5b06018161488c57fe5b046002838161489757fe5b04600285816148a257fe5b040101905092915050565b60006148b96068613f6d565b9050806148c884600001614b30565b10156149255782600001819080600181540180825580915050600190039060005260206000200160009091909190915055826001018290806001815401808255809150506001900390600052602060002001600090919091909150555b505050565b606061493585614b6d565b6149a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106149f757805182526020820191506020810190506020830392506149d4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614a59576040519150601f19603f3d011682016040523d82523d6000602084013e614a5e565b606091505b50915091508115614a73578092505050614b28565b600081511115614a865780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614aed578082015181840152602081019050614ad2565b50505050905090810190601f168015614b1a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b949350505050565b60008082805490501415614b475760009050614b68565b81600183805490500381548110614b5a57fe5b906000526020600020015490505b919050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614baf57506000801b8214155b92505050919050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282614c255760008555614c6c565b82601f10614c3e57805160ff1916838001178555614c6c565b82800160010185558215614c6c579182015b82811115614c6b578251825591602001919060010190614c50565b5b509050614c799190614c7d565b5090565b5b80821115614c96576000816000905550600101614c7e565b5090565b600081359050614ca9816158be565b92915050565b600081359050614cbe816158d5565b92915050565b60008083601f840112614cd657600080fd5b8235905067ffffffffffffffff811115614cef57600080fd5b602083019150836060820283011115614d0757600080fd5b9250929050565b600081519050614d1d816158ec565b92915050565b600081359050614d3281615903565b92915050565b600081359050614d478161591a565b92915050565b600081359050614d5c81615931565b92915050565b600081359050614d7181615948565b92915050565b600082601f830112614d8857600080fd5b8135614d9b614d96826156dc565b6156ab565b91508082526020830160208301858383011115614db757600080fd5b614dc2838284615869565b50505092915050565b600081359050614dda8161595f565b92915050565b600081359050614def81615976565b92915050565b600060208284031215614e0757600080fd5b6000614e1584828501614c9a565b91505092915050565b60008060408385031215614e3157600080fd5b6000614e3f85828601614caf565b9250506020614e5085828601614de0565b9150509250929050565b60008060408385031215614e6d57600080fd5b6000614e7b85828601614c9a565b9250506020614e8c85828601614c9a565b9150509250929050565b600080600060608486031215614eab57600080fd5b6000614eb986828701614c9a565b9350506020614eca86828701614c9a565b9250506040614edb86828701614de0565b9150509250925092565b60008060408385031215614ef857600080fd5b6000614f0685828601614c9a565b9250506020614f1785828601614de0565b9150509250929050565b60008060208385031215614f3457600080fd5b600083013567ffffffffffffffff811115614f4e57600080fd5b614f5a85828601614cc4565b92509250509250929050565b600060208284031215614f7857600080fd5b6000614f8684828501614d0e565b91505092915050565b600060208284031215614fa157600080fd5b6000614faf84828501614d23565b91505092915050565b60008060408385031215614fcb57600080fd5b6000614fd985828601614d23565b9250506020614fea85828601614c9a565b9150509250929050565b6000806040838503121561500757600080fd5b600061501585828601614d23565b925050602061502685828601614de0565b9150509250929050565b600080600080600080600060e0888a03121561504b57600080fd5b60006150598a828b01614d38565b975050602061506a8a828b01614d62565b965050604061507b8a828b01614de0565b955050606061508c8a828b01614de0565b945050608061509d8a828b01614d4d565b93505060a06150ae8a828b01614c9a565b92505060c06150bf8a828b01614dcb565b91505092959891949750929550565b600080604083850312156150e157600080fd5b600083013567ffffffffffffffff8111156150fb57600080fd5b61510785828601614d77565b925050602083013567ffffffffffffffff81111561512457600080fd5b61513085828601614d77565b9150509250929050565b60006020828403121561514c57600080fd5b600061515a84828501614dcb565b91505092915050565b60006020828403121561517557600080fd5b600061518384828501614de0565b91505092915050565b600080600080608085870312156151a257600080fd5b60006151b087828801614de0565b94505060206151c187828801614de0565b93505060406151d287828801614c9a565b92505060606151e387828801614de0565b91505092959194509250565b6151f88161573a565b82525050565b61520781615728565b82525050565b6152168161574c565b82525050565b61522581615758565b82525050565b615234816157eb565b82525050565b6152438161580f565b82525050565b61525281615833565b82525050565b60006152638261570c565b61526d8185615717565b935061527d818560208601615878565b615286816158ad565b840191505092915050565b600061529e601383615717565b91507f494e56414c49445f5a45524f5f414d4f554e54000000000000000000000000006000830152602082019050919050565b60006152de601983615717565b91507f4552524f525f5452414e534645525f46524f4d5f5641554c54000000000000006000830152602082019050919050565b600061531e601583615717565b91507f494e53554646494349454e545f434f4f4c444f574e00000000000000000000006000830152602082019050919050565b600061535e601583615717565b91507f4f4e4c595f454d495353494f4e5f4d414e4147455200000000000000000000006000830152602082019050919050565b600061539e601783615717565b91507f554e5354414b455f57494e444f575f46494e49534845440000000000000000006000830152602082019050919050565b60006153de601b83615717565b91507f494e56414c49445f42414c414e43455f4f4e5f434f4f4c444f574e00000000006000830152602082019050919050565b61541a81615798565b82525050565b61542981615857565b82525050565b615438816157d4565b82525050565b615447816157de565b82525050565b600060208201905061546260008301846151fe565b92915050565b600060408201905061547d60008301856151ef565b61548a602083018461542f565b9392505050565b60006040820190506154a660008301856151fe565b6154b3602083018461542f565b9392505050565b60006020820190506154cf600083018461520d565b92915050565b60006020820190506154ea600083018461521c565b92915050565b6000602082019050615505600083018461522b565b92915050565b6000602082019050615520600083018461523a565b92915050565b600060208201905061553b6000830184615249565b92915050565b6000602082019050818103600083015261555b8184615258565b905092915050565b6000602082019050818103600083015261557c81615291565b9050919050565b6000602082019050818103600083015261559c816152d1565b9050919050565b600060208201905081810360008301526155bc81615311565b9050919050565b600060208201905081810360008301526155dc81615351565b9050919050565b600060208201905081810360008301526155fc81615391565b9050919050565b6000602082019050818103600083015261561c816153d1565b9050919050565b60006020820190506156386000830184615420565b92915050565b60006060820190506156536000830186615411565b6156606020830185615411565b61566d604083018461542f565b949350505050565b600060208201905061568a600083018461542f565b92915050565b60006020820190506156a5600083018461543e565b92915050565b6000604051905081810181811067ffffffffffffffff821117156156d2576156d16158ab565b5b8060405250919050565b600067ffffffffffffffff8211156156f7576156f66158ab565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000615733826157b4565b9050919050565b6000615745826157b4565b9050919050565b60008115159050919050565b6000819050919050565b600061576d82615728565b9050919050565b600061577f82615728565b9050919050565b600061579182615728565b9050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006157f6826157fd565b9050919050565b6000615808826157b4565b9050919050565b600061581a82615821565b9050919050565b600061582c826157b4565b9050919050565b600061583e82615845565b9050919050565b6000615850826157b4565b9050919050565b600061586282615798565b9050919050565b82818337600083830152505050565b60005b8381101561589657808201518184015260208101905061587b565b838111156158a5576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b6158c781615728565b81146158d257600080fd5b50565b6158de8161573a565b81146158e957600080fd5b50565b6158f58161574c565b811461590057600080fd5b50565b61590c81615758565b811461591757600080fd5b50565b61592381615762565b811461592e57600080fd5b50565b61593a81615774565b811461594557600080fd5b50565b61595181615786565b811461595c57600080fd5b50565b61596881615798565b811461597357600080fd5b50565b61597f816157d4565b811461598a57600080fd5b5056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220bcde306c1ffec3460a1bc9f99538724f50b0479d02050777d45606104baa3b7864736f6c63430007050033
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.