ERC-20
Overview
Max Total Supply
1,329,413.599945834950246058 sOM
Holders
398
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.528344356069780654 sOMValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
StakingPool
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
No with 200 runs
Other Settings:
constantinople EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; import "openzeppelin-solidity/contracts/math/Math.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; import "openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol"; import "solowei/contracts/AttoDecimal.sol"; import "solowei/contracts/TwoStageOwnable.sol"; contract StakingPool is ERC20, ReentrancyGuard, TwoStageOwnable { using SafeMath for uint256; using SafeERC20 for IERC20; using AttoDecimal for AttoDecimal.Instance; struct Strategy { uint256 endBlockNumber; uint256 perBlockReward; uint256 startBlockNumber; } struct Unstake { uint256 amount; uint256 applicableAt; } uint256 public constant MIN_STAKE_BALANCE = 10**18; uint256 public claimingFeePercent; uint256 public lastUpdateBlockNumber; uint256 private _feePool; uint256 private _lockedRewards; uint256 private _totalStaked; uint256 private _totalUnstaked; uint256 private _unstakingTime; IERC20 private _stakingToken; AttoDecimal.Instance private _defaultPrice; AttoDecimal.Instance private _price; Strategy private _currentStrategy; Strategy private _nextStrategy; mapping(address => Unstake) private _unstakes; function getBlockNumber() internal view virtual returns (uint256) { return block.number; } function getTimestamp() internal view virtual returns (uint256) { return block.timestamp; } function feePool() public view returns (uint256) { return _feePool; } function lockedRewards() public view returns (uint256) { return _lockedRewards; } function totalStaked() public view returns (uint256) { return _totalStaked; } function totalUnstaked() public view returns (uint256) { return _totalUnstaked; } function stakingToken() public view returns (IERC20) { return _stakingToken; } function unstakingTime() public view returns (uint256) { return _unstakingTime; } function currentStrategy() public view returns (Strategy memory) { return _currentStrategy; } function nextStrategy() public view returns (Strategy memory) { return _nextStrategy; } function getUnstake(address account) public view returns (Unstake memory result) { result = _unstakes[account]; } function defaultPrice() external view returns ( uint256 mantissa, uint256 base, uint256 exponentiation ) { return _defaultPrice.toTuple(); } function getCurrentStrategyUnlockedRewards() public view returns (uint256 unlocked) { unlocked = _getStrategyUnlockedRewards(_currentStrategy); } function getUnlockedRewards() public view returns (uint256 unlocked, bool currentStrategyEnded) { unlocked = _getStrategyUnlockedRewards(_currentStrategy); if (getBlockNumber() >= _currentStrategy.endBlockNumber) { currentStrategyEnded = true; if (_nextStrategy.endBlockNumber != 0) unlocked = unlocked.add(_getStrategyUnlockedRewards(_nextStrategy)); } } /// @notice Calculates price of synthetic token for current block function price() public view returns ( uint256 mantissa, uint256 base, uint256 exponentiation ) { (uint256 unlocked, ) = getUnlockedRewards(); uint256 totalStaked_ = _totalStaked; uint256 totalSupply_ = totalSupply(); AttoDecimal.Instance memory result = _defaultPrice; if (totalSupply_ > 0) result = AttoDecimal.div(totalStaked_.add(unlocked), totalSupply_); return result.toTuple(); } /// @notice Returns last updated price of synthetic token function priceStored() public view returns ( uint256 mantissa, uint256 base, uint256 exponentiation ) { return _price.toTuple(); } /// @notice Calculates expected result of swapping synthetic tokens for staking tokens /// @param account Account that wants to swap /// @param amount Minimum amount of staking tokens that should be received at swapping process /// @return unstakedAmount Amount of staking tokens that should be received at swapping process /// @return burnedAmount Amount of synthetic tokens that should be burned at swapping process function calculateUnstake(address account, uint256 amount) public view returns (uint256 unstakedAmount, uint256 burnedAmount) { (uint256 mantissa_, , ) = price(); return _calculateUnstake(account, amount, AttoDecimal.Instance(mantissa_)); } event Claimed( address indexed account, uint256 requestedAmount, uint256 claimedAmount, uint256 feeAmount, uint256 burnedAmount ); event ClaimingFeePercentUpdated(uint256 feePercent); event CurrentStrategyUpdated(uint256 perBlockReward, uint256 startBlockNumber, uint256 endBlockNumber); event FeeClaimed(address indexed receiver, uint256 amount); event Migrated( address indexed account, uint256 omTokenV1StakeAmount, uint256 stakingPoolV1Reward, uint256 stakingPoolV2Reward ); event NextStrategyUpdated(uint256 perBlockReward, uint256 startBlockNumber, uint256 endBlockNumber); event UnstakingTimeUpdated(uint256 unstakingTime); event NextStrategyRemoved(); event PoolDecreased(uint256 amount); event PoolIncreased(address indexed payer, uint256 amount); event PriceUpdated(uint256 mantissa, uint256 base, uint256 exponentiation); event RewardsUnlocked(uint256 amount); event Staked(address indexed account, address indexed payer, uint256 stakedAmount, uint256 mintedAmount); event Unstaked(address indexed account, uint256 requestedAmount, uint256 unstakedAmount, uint256 burnedAmount); event UnstakingCanceled(address indexed account, uint256 amount); event Withdrawed(address indexed account, uint256 amount); constructor( string memory syntheticTokenName, string memory syntheticTokenSymbol, IERC20 stakingToken_, address owner_, uint256 claimingFeePercent_, uint256 perBlockReward_, uint256 startBlockNumber_, uint256 duration_, uint256 unstakingTime_, uint256 defaultPriceMantissa ) public TwoStageOwnable(owner_) ERC20(syntheticTokenName, syntheticTokenSymbol) { _defaultPrice = AttoDecimal.Instance(defaultPriceMantissa); _stakingToken = stakingToken_; _setClaimingFeePercent(claimingFeePercent_); _validateStrategyParameters(perBlockReward_, startBlockNumber_, duration_); _setUnstakingTime(unstakingTime_); _setCurrentStrategy(perBlockReward_, startBlockNumber_, startBlockNumber_.add(duration_)); lastUpdateBlockNumber = getBlockNumber(); _price = _defaultPrice; } /// @notice Cancels unstaking by staking locked for withdrawals tokens /// @param amount Amount of locked for withdrawals tokens function cancelUnstaking(uint256 amount) external onlyPositiveAmount(amount) returns (bool success) { _update(); address caller = msg.sender; Unstake storage unstake_ = _unstakes[caller]; uint256 unstakingAmount = unstake_.amount; require(unstakingAmount >= amount, "Not enough unstaked balance"); uint256 stakedAmount = _price.mul(balanceOf(caller)).floor(); require(stakedAmount.add(amount) >= MIN_STAKE_BALANCE, "Stake balance lt min stake"); uint256 synthAmount = AttoDecimal.div(amount, _price).floor(); _mint(caller, synthAmount); _totalStaked = _totalStaked.add(amount); _totalUnstaked = _totalUnstaked.sub(amount); unstake_.amount = unstakingAmount.sub(amount); emit Staked(caller, address(0), amount, synthAmount); emit UnstakingCanceled(caller, amount); return true; } /// @notice Swaps synthetic tokens for staking tokens and immediately sends them to the caller but takes some fee /// @param amount Staking tokens amount to swap for. Fee will be taked from this amount /// @return claimedAmount Amount of staking tokens that was been sended to caller /// @return burnedAmount Amount of synthetic tokens that was burned while swapping function claim(uint256 amount) external onlyPositiveAmount(amount) returns (uint256 claimedAmount, uint256 burnedAmount) { _update(); address caller = msg.sender; (claimedAmount, burnedAmount) = _calculateUnstake(caller, amount, _price); uint256 fee = claimedAmount.mul(claimingFeePercent).div(100); _burn(caller, burnedAmount); _totalStaked = _totalStaked.sub(claimedAmount); claimedAmount = claimedAmount.sub(fee); _feePool = _feePool.add(fee); emit Claimed(caller, amount, claimedAmount, fee, burnedAmount); _stakingToken.safeTransfer(caller, claimedAmount); } /// @notice Withdraws all staking tokens, that have been accumulated in imidiatly claiming process. /// Allowed to be called only by the owner /// @return amount Amount of accumulated and withdrawed tokens function claimFees() external onlyOwner returns (uint256 amount) { require(_feePool > 0, "No fees"); amount = _feePool; _feePool = 0; emit FeeClaimed(owner(), amount); _stakingToken.safeTransfer(owner(), amount); } /// @notice Creates new strategy. Allowed to be called only by the owner /// @param perBlockReward_ Reward that should be added to common staking tokens pool every block /// @param startBlockNumber_ Number of block from which strategy should starts /// @param duration_ Blocks count for which new strategy should be applied function createNewStrategy( uint256 perBlockReward_, uint256 startBlockNumber_, uint256 duration_ ) public onlyOwner returns (bool success) { _update(); _validateStrategyParameters(perBlockReward_, startBlockNumber_, duration_); uint256 endBlockNumber = startBlockNumber_.add(duration_); Strategy memory strategy = Strategy({ perBlockReward: perBlockReward_, startBlockNumber: startBlockNumber_, endBlockNumber: endBlockNumber }); if (_currentStrategy.startBlockNumber > getBlockNumber()) { delete _nextStrategy; emit NextStrategyRemoved(); _currentStrategy = strategy; emit CurrentStrategyUpdated(perBlockReward_, startBlockNumber_, endBlockNumber); } else { emit NextStrategyUpdated(perBlockReward_, startBlockNumber_, endBlockNumber); _nextStrategy = strategy; if (_currentStrategy.endBlockNumber > startBlockNumber_) { _currentStrategy.endBlockNumber = startBlockNumber_; emit CurrentStrategyUpdated( _currentStrategy.perBlockReward, _currentStrategy.startBlockNumber, startBlockNumber_ ); } } return true; } function decreasePool(uint256 amount) external onlyPositiveAmount(amount) onlyOwner returns (bool success) { _update(); _lockedRewards = _lockedRewards.sub(amount, "Not enough locked rewards"); emit PoolDecreased(amount); _stakingToken.safeTransfer(owner(), amount); return true; } /// @notice Increases pool of rewards /// @param amount Amount of staking tokens (in wei) that should be added to rewards pool function increasePool(uint256 amount) external onlyPositiveAmount(amount) returns (bool success) { _update(); address payer = msg.sender; _lockedRewards = _lockedRewards.add(amount); emit PoolIncreased(payer, amount); _stakingToken.safeTransferFrom(payer, address(this), amount); return true; } /// @notice Change claiming fee percent. Can be called only by the owner /// @param feePercent New claiming fee percent function setClaimingFeePercent(uint256 feePercent) external onlyOwner returns (bool success) { _setClaimingFeePercent(feePercent); return true; } /// @notice Converts staking tokens to synthetic tokens /// @param amount Amount of staking tokens to be swapped /// @return mintedAmount Amount of synthetic tokens that was received at swapping process function stake(uint256 amount) external onlyPositiveAmount(amount) returns (uint256 mintedAmount) { address staker = msg.sender; return _stake(staker, staker, amount); } /// @notice Converts staking tokens to synthetic tokens and sends them to specific account /// @param account Receiver of synthetic tokens /// @param amount Amount of staking tokens to be swapped /// @return mintedAmount Amount of synthetic tokens that was received by specified account at swapping process function stakeForUser(address account, uint256 amount) external onlyPositiveAmount(amount) returns (uint256 mintedAmount) { return _stake(account, msg.sender, amount); } /// @notice Swapes synthetic tokens for staking tokens and locks them for some period /// @param amount Minimum amount of staking tokens that should be locked after swapping process /// @return unstakedAmount Amount of staking tokens that was locked /// @return burnedAmount Amount of synthetic tokens that was burned function unstake(uint256 amount) external onlyPositiveAmount(amount) returns (uint256 unstakedAmount, uint256 burnedAmount) { _update(); address caller = msg.sender; (unstakedAmount, burnedAmount) = _calculateUnstake(caller, amount, _price); _burn(caller, burnedAmount); _totalStaked = _totalStaked.sub(unstakedAmount); _totalUnstaked = _totalUnstaked.add(unstakedAmount); Unstake storage unstake_ = _unstakes[caller]; unstake_.amount = unstake_.amount.add(unstakedAmount); unstake_.applicableAt = getTimestamp().add(_unstakingTime); emit Unstaked(caller, amount, unstakedAmount, burnedAmount); } /// @notice Updates price of synthetic token /// @dev Automatically has been called on every contract action, that uses or can affect price function update() external returns (bool success) { _update(); return true; } /// @notice Withdraws unstaked staking tokens function withdraw() external returns (bool success) { address caller = msg.sender; Unstake storage unstake_ = _unstakes[caller]; uint256 amount = unstake_.amount; require(amount > 0, "Not unstaked"); require(unstake_.applicableAt <= getTimestamp(), "Not released at"); delete _unstakes[caller]; _totalUnstaked = _totalUnstaked.sub(amount); emit Withdrawed(caller, amount); _stakingToken.safeTransfer(caller, amount); return true; } /// @notice Change unstaking time. Can be called only by the owner /// @param unstakingTime_ New unstaking process duration in seconds function setUnstakingTime(uint256 unstakingTime_) external onlyOwner returns (bool success) { _setUnstakingTime(unstakingTime_); return true; } function _getStrategyUnlockedRewards(Strategy memory strategy_) internal view returns (uint256 unlocked) { uint256 currentBlockNumber = getBlockNumber(); if (currentBlockNumber < strategy_.startBlockNumber || currentBlockNumber == lastUpdateBlockNumber) { return unlocked; } uint256 lastRewardedBlockNumber = Math.max(lastUpdateBlockNumber, strategy_.startBlockNumber); uint256 lastRewardableBlockNumber = Math.min(currentBlockNumber, strategy_.endBlockNumber); if (lastRewardedBlockNumber < lastRewardableBlockNumber) { uint256 blocksDiff = lastRewardableBlockNumber.sub(lastRewardedBlockNumber); unlocked = unlocked.add(blocksDiff.mul(strategy_.perBlockReward)); } } function _calculateUnstake( address account, uint256 amount, AttoDecimal.Instance memory price_ ) internal view returns (uint256 unstakedAmount, uint256 burnedAmount) { unstakedAmount = amount; burnedAmount = AttoDecimal.div(amount, price_).ceil(); uint256 balance = balanceOf(account); require(burnedAmount > 0, "Too small unstaking amount"); require(balance >= burnedAmount, "Not enough synthetic tokens"); uint256 remainingSyntheticBalance = balance.sub(burnedAmount); uint256 remainingStake = _price.mul(remainingSyntheticBalance).floor(); if (remainingStake < 10**18) { burnedAmount = balance; unstakedAmount = unstakedAmount.add(remainingStake); } } function _unlockRewardsAndStake() internal { (uint256 unlocked, bool currentStrategyEnded) = getUnlockedRewards(); if (currentStrategyEnded) { _currentStrategy = _nextStrategy; emit NextStrategyRemoved(); if (_currentStrategy.endBlockNumber != 0) { emit CurrentStrategyUpdated( _currentStrategy.perBlockReward, _currentStrategy.startBlockNumber, _currentStrategy.endBlockNumber ); } delete _nextStrategy; } unlocked = Math.min(unlocked, _lockedRewards); if (unlocked > 0) { emit RewardsUnlocked(unlocked); _lockedRewards = _lockedRewards.sub(unlocked); _totalStaked = _totalStaked.add(unlocked); } lastUpdateBlockNumber = getBlockNumber(); } function _update() internal { if (getBlockNumber() <= lastUpdateBlockNumber) return; _unlockRewardsAndStake(); _updatePrice(); } function _updatePrice() internal { uint256 totalStaked_ = _totalStaked; uint256 totalSupply_ = totalSupply(); if (totalSupply_ == 0) _price = _defaultPrice; else _price = AttoDecimal.div(totalStaked_, totalSupply_); emit PriceUpdated(_price.mantissa, AttoDecimal.BASE, AttoDecimal.EXPONENTIATION); } function _validateStrategyParameters( uint256 perBlockReward, uint256 startBlockNumber, uint256 duration ) internal view { require(duration > 0, "Duration is zero"); require(startBlockNumber >= getBlockNumber(), "Start block number lt current"); require(perBlockReward <= 188 * 10**18, "Per block reward overflow"); } function _setClaimingFeePercent(uint256 feePercent) internal { require(feePercent >= 0 && feePercent <= 100, "Invalid fee percent"); claimingFeePercent = feePercent; emit ClaimingFeePercentUpdated(feePercent); } function _setUnstakingTime(uint256 unstakingTime_) internal { _unstakingTime = unstakingTime_; emit UnstakingTimeUpdated(unstakingTime_); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { _update(); string memory errorText = "Minimal stake balance should be more or equal to 1 token"; if (from != address(0)) { uint256 fromNewBalance = _price.mul(balanceOf(from).sub(amount)).floor(); require(fromNewBalance >= MIN_STAKE_BALANCE || fromNewBalance == 0, errorText); } if (to != address(0)) { require(_price.mul(balanceOf(to).add(amount)).floor() >= MIN_STAKE_BALANCE, errorText); } } function _setCurrentStrategy( uint256 perBlockReward_, uint256 startBlockNumber_, uint256 endBlockNumber_ ) private { _currentStrategy = Strategy({ perBlockReward: perBlockReward_, startBlockNumber: startBlockNumber_, endBlockNumber: endBlockNumber_ }); emit CurrentStrategyUpdated(perBlockReward_, startBlockNumber_, endBlockNumber_); } function _stake( address staker, address payer, uint256 amount ) private returns (uint256 mintedAmount) { _update(); mintedAmount = AttoDecimal.div(amount, _price).floor(); require(mintedAmount > 0, "Too small staking amount"); _mint(staker, mintedAmount); _totalStaked = _totalStaked.add(amount); emit Staked(staker, payer, amount, mintedAmount); _stakingToken.safeTransferFrom(payer, address(this), amount); } modifier onlyPositiveAmount(uint256 amount) { require(amount > 0, "Amount is not positive"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /* * @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 Context { 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @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); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.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 SafeMath { /** * @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 pragma solidity ^0.6.0; import "../../GSN/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.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 ERC20 is Context, IERC20 { using SafeMath for uint256; using Address 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. */ constructor (string memory name, string memory symbol) public { _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 { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `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.6.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 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(IERC20 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(IERC20 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(IERC20 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(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "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.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @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) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @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.6.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; library AttoDecimal { using SafeMath for uint256; struct Instance { uint256 mantissa; } uint256 internal constant BASE = 10; uint256 internal constant EXPONENTIATION = 18; uint256 internal constant ONE_MANTISSA = BASE**EXPONENTIATION; uint256 internal constant ONE_TENTH_MANTISSA = ONE_MANTISSA / 10; uint256 internal constant HALF_MANTISSA = ONE_MANTISSA / 2; uint256 internal constant SQUARED_ONE_MANTISSA = ONE_MANTISSA * ONE_MANTISSA; uint256 internal constant MAX_INTEGER = uint256(-1) / ONE_MANTISSA; function maximum() internal pure returns (Instance memory) { return Instance({mantissa: uint256(-1)}); } function zero() internal pure returns (Instance memory) { return Instance({mantissa: 0}); } function one() internal pure returns (Instance memory) { return Instance({mantissa: ONE_MANTISSA}); } function convert(uint256 integer) internal pure returns (Instance memory) { return Instance({mantissa: integer.mul(ONE_MANTISSA)}); } function compare(Instance memory a, Instance memory b) internal pure returns (int8) { if (a.mantissa < b.mantissa) return -1; return int8(a.mantissa > b.mantissa ? 1 : 0); } function compare(Instance memory a, uint256 b) internal pure returns (int8) { return compare(a, convert(b)); } function add(Instance memory a, Instance memory b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.add(b.mantissa)}); } function add(Instance memory a, uint256 b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.add(b.mul(ONE_MANTISSA))}); } function sub(Instance memory a, Instance memory b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.sub(b.mantissa)}); } function sub(Instance memory a, uint256 b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.sub(b.mul(ONE_MANTISSA))}); } function sub(uint256 a, Instance memory b) internal pure returns (Instance memory) { return Instance({mantissa: a.mul(ONE_MANTISSA).sub(b.mantissa)}); } function mul(Instance memory a, Instance memory b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.mul(b.mantissa) / ONE_MANTISSA}); } function mul(Instance memory a, uint256 b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.mul(b)}); } function div(Instance memory a, Instance memory b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.mul(ONE_MANTISSA).div(b.mantissa)}); } function div(Instance memory a, uint256 b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.mul(ONE_MANTISSA).div(b)}); } function div(uint256 a, Instance memory b) internal pure returns (Instance memory) { return Instance({mantissa: a.mul(SQUARED_ONE_MANTISSA).div(b.mantissa)}); } function div(uint256 a, uint256 b) internal pure returns (Instance memory) { return Instance({mantissa: a.mul(ONE_MANTISSA).div(b)}); } function idiv(Instance memory a, Instance memory b) internal pure returns (uint256) { return a.mantissa.div(b.mantissa); } function idiv(Instance memory a, uint256 b) internal pure returns (uint256) { return a.mantissa.div(b.mul(ONE_MANTISSA)); } function idiv(uint256 a, Instance memory b) internal pure returns (uint256) { return a.mul(ONE_MANTISSA).div(b.mantissa); } function mod(Instance memory a, Instance memory b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.mod(b.mantissa)}); } function mod(Instance memory a, uint256 b) internal pure returns (Instance memory) { return Instance({mantissa: a.mantissa.mod(b.mul(ONE_MANTISSA))}); } function mod(uint256 a, Instance memory b) internal pure returns (Instance memory) { if (a > MAX_INTEGER) return Instance({mantissa: a.mod(b.mantissa).mul(ONE_MANTISSA) % b.mantissa}); return Instance({mantissa: a.mul(ONE_MANTISSA).mod(b.mantissa)}); } function floor(Instance memory a) internal pure returns (uint256) { return a.mantissa / ONE_MANTISSA; } function ceil(Instance memory a) internal pure returns (uint256) { return (a.mantissa / ONE_MANTISSA) + (a.mantissa % ONE_MANTISSA > 0 ? 1 : 0); } function round(Instance memory a) internal pure returns (uint256) { return (a.mantissa / ONE_MANTISSA) + ((a.mantissa / ONE_TENTH_MANTISSA) % 10 >= 5 ? 1 : 0); } function eq(Instance memory a, Instance memory b) internal pure returns (bool) { return a.mantissa == b.mantissa; } function eq(Instance memory a, uint256 b) internal pure returns (bool) { if (b > MAX_INTEGER) return false; return a.mantissa == b * ONE_MANTISSA; } function gt(Instance memory a, Instance memory b) internal pure returns (bool) { return a.mantissa > b.mantissa; } function gt(Instance memory a, uint256 b) internal pure returns (bool) { if (b > MAX_INTEGER) return false; return a.mantissa > b * ONE_MANTISSA; } function gte(Instance memory a, Instance memory b) internal pure returns (bool) { return a.mantissa >= b.mantissa; } function gte(Instance memory a, uint256 b) internal pure returns (bool) { if (b > MAX_INTEGER) return false; return a.mantissa >= b * ONE_MANTISSA; } function lt(Instance memory a, Instance memory b) internal pure returns (bool) { return a.mantissa < b.mantissa; } function lt(Instance memory a, uint256 b) internal pure returns (bool) { if (b > MAX_INTEGER) return true; return a.mantissa < b * ONE_MANTISSA; } function lte(Instance memory a, Instance memory b) internal pure returns (bool) { return a.mantissa <= b.mantissa; } function lte(Instance memory a, uint256 b) internal pure returns (bool) { if (b > MAX_INTEGER) return true; return a.mantissa <= b * ONE_MANTISSA; } function isInteger(Instance memory a) internal pure returns (bool) { return a.mantissa % ONE_MANTISSA == 0; } function isPositive(Instance memory a) internal pure returns (bool) { return a.mantissa > 0; } function isZero(Instance memory a) internal pure returns (bool) { return a.mantissa == 0; } function sum(Instance[] memory array) internal pure returns (Instance memory result) { uint256 length = array.length; for (uint256 index = 0; index < length; index++) result = add(result, array[index]); } function toTuple(Instance memory a) internal pure returns ( uint256 mantissa, uint256 base, uint256 exponentiation ) { return (a.mantissa, BASE, EXPONENTIATION); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; abstract contract TwoStageOwnable { address private _nominatedOwner; address private _owner; function nominatedOwner() public view returns (address) { return _nominatedOwner; } function owner() public view returns (address) { return _owner; } event OwnerChanged(address indexed newOwner); event OwnerNominated(address indexed nominatedOwner); constructor(address owner_) internal { require(owner_ != address(0), "Owner is zero"); _setOwner(owner_); } function acceptOwnership() external returns (bool success) { require(msg.sender == _nominatedOwner, "Not nominated to ownership"); _setOwner(_nominatedOwner); return true; } function nominateNewOwner(address owner_) external onlyOwner returns (bool success) { _nominateNewOwner(owner_); return true; } modifier onlyOwner { require(msg.sender == _owner, "Not owner"); _; } function _nominateNewOwner(address owner_) internal { if (_nominatedOwner == owner_) return; require(_owner != owner_, "Already owner"); _nominatedOwner = owner_; emit OwnerNominated(owner_); } function _setOwner(address newOwner) internal { if (_owner == newOwner) return; _owner = newOwner; _nominatedOwner = address(0); emit OwnerChanged(newOwner); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "constantinople", "libraries": { "": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"syntheticTokenName","type":"string"},{"internalType":"string","name":"syntheticTokenSymbol","type":"string"},{"internalType":"contract IERC20","name":"stakingToken_","type":"address"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"claimingFeePercent_","type":"uint256"},{"internalType":"uint256","name":"perBlockReward_","type":"uint256"},{"internalType":"uint256","name":"startBlockNumber_","type":"uint256"},{"internalType":"uint256","name":"duration_","type":"uint256"},{"internalType":"uint256","name":"unstakingTime_","type":"uint256"},{"internalType":"uint256","name":"defaultPriceMantissa","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnedAmount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feePercent","type":"uint256"}],"name":"ClaimingFeePercentUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"perBlockReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startBlockNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlockNumber","type":"uint256"}],"name":"CurrentStrategyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"omTokenV1StakeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakingPoolV1Reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakingPoolV2Reward","type":"uint256"}],"name":"Migrated","type":"event"},{"anonymous":false,"inputs":[],"name":"NextStrategyRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"perBlockReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startBlockNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlockNumber","type":"uint256"}],"name":"NextStrategyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nominatedOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PoolDecreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PoolIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mantissa","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"base","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"exponentiation","type":"uint256"}],"name":"PriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintedAmount","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":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unstakedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnedAmount","type":"uint256"}],"name":"Unstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnstakingCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"unstakingTime","type":"uint256"}],"name":"UnstakingTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawed","type":"event"},{"inputs":[],"name":"MIN_STAKE_BALANCE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calculateUnstake","outputs":[{"internalType":"uint256","name":"unstakedAmount","type":"uint256"},{"internalType":"uint256","name":"burnedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"cancelUnstaking","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claim","outputs":[{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"burnedAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimFees","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimingFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"perBlockReward_","type":"uint256"},{"internalType":"uint256","name":"startBlockNumber_","type":"uint256"},{"internalType":"uint256","name":"duration_","type":"uint256"}],"name":"createNewStrategy","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentStrategy","outputs":[{"components":[{"internalType":"uint256","name":"endBlockNumber","type":"uint256"},{"internalType":"uint256","name":"perBlockReward","type":"uint256"},{"internalType":"uint256","name":"startBlockNumber","type":"uint256"}],"internalType":"struct StakingPool.Strategy","name":"","type":"tuple"}],"stateMutability":"view","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":"amount","type":"uint256"}],"name":"decreasePool","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultPrice","outputs":[{"internalType":"uint256","name":"mantissa","type":"uint256"},{"internalType":"uint256","name":"base","type":"uint256"},{"internalType":"uint256","name":"exponentiation","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentStrategyUnlockedRewards","outputs":[{"internalType":"uint256","name":"unlocked","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnlockedRewards","outputs":[{"internalType":"uint256","name":"unlocked","type":"uint256"},{"internalType":"bool","name":"currentStrategyEnded","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUnstake","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"applicableAt","type":"uint256"}],"internalType":"struct StakingPool.Unstake","name":"result","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"increasePool","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastUpdateBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextStrategy","outputs":[{"components":[{"internalType":"uint256","name":"endBlockNumber","type":"uint256"},{"internalType":"uint256","name":"perBlockReward","type":"uint256"},{"internalType":"uint256","name":"startBlockNumber","type":"uint256"}],"internalType":"struct StakingPool.Strategy","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"nominateNewOwner","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"mantissa","type":"uint256"},{"internalType":"uint256","name":"base","type":"uint256"},{"internalType":"uint256","name":"exponentiation","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceStored","outputs":[{"internalType":"uint256","name":"mantissa","type":"uint256"},{"internalType":"uint256","name":"base","type":"uint256"},{"internalType":"uint256","name":"exponentiation","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"feePercent","type":"uint256"}],"name":"setClaimingFeePercent","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"unstakingTime_","type":"uint256"}],"name":"setUnstakingTime","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[{"internalType":"uint256","name":"mintedAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeForUser","outputs":[{"internalType":"uint256","name":"mintedAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnstaked","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"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[{"internalType":"uint256","name":"unstakedAmount","type":"uint256"},{"internalType":"uint256","name":"burnedAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstakingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"update","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162005cdb38038062005cdb833981810160405281019062000037919062000726565b868a8a816003908051906020019062000052929190620005df565b5080600490805190602001906200006b929190620005df565b506012600560006101000a81548160ff021916908360ff16021790555050506001600681905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000105576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000fc9062000a29565b60405180910390fd5b62000116816200020e60201b60201c565b5060405180602001604052808281525060116000820151816000015590505087601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000187866200033560201b60201c565b6200019a858585620003cd60201b60201c565b620001ab82620004bc60201b60201c565b620001d78585620001cb8688620004ff60201b620024211790919060201c565b6200055760201b60201c565b620001e7620005d760201b60201c565b600a8190555060116012600082015481600001559050505050505050505050505062000c4d565b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156200026b5762000332565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3660405160405180910390a25b50565b6000811015801562000348575060648111155b6200038a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003819062000a8f565b60405180910390fd5b806009819055507fcd36e83aa831664c67a318291b1d97d2741c9ea9d5a49f66e29e28541b3c06e981604051620003c2919062000ab1565b60405180910390a150565b6000811162000413576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200040a9062000a07565b60405180910390fd5b62000423620005d760201b60201c565b82101562000468576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200045f9062000a4b565b60405180910390fd5b680a31062beeed700000831115620004b7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004ae90620009e5565b60405180910390fd5b505050565b80600f819055507f7f7d5eb76787d9279c88eb7f18c26b33761ae038bbd802551a7c6aa2f9f8dd1281604051620004f4919062000ab1565b60405180910390a150565b6000808284019050838110156200054d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005449062000a6d565b60405180910390fd5b8091505092915050565b60405180606001604052808281526020018481526020018381525060136000820151816000015560208201518160010155604082015181600201559050507f2fa40e2e6101b8bae833c4716c3c36b1e15938b1aaa699ec9896bb2d836c9492838383604051620005ca9392919062000ace565b60405180910390a1505050565b600043905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200062257805160ff191683800117855562000653565b8280016001018555821562000653579182015b828111156200065257825182559160200191906001019062000635565b5b50905062000662919062000666565b5090565b5b808211156200068157600081600090555060010162000667565b5090565b600081519050620006968162000bff565b92915050565b600081519050620006ad8162000c19565b92915050565b600082601f830112620006c557600080fd5b8151620006dc620006d68262000b39565b62000b0b565b91508082526020830160208301858383011115620006f957600080fd5b6200070683828462000bc9565b50505092915050565b600081519050620007208162000c33565b92915050565b6000806000806000806000806000806101408b8d0312156200074757600080fd5b60008b015167ffffffffffffffff8111156200076257600080fd5b620007708d828e01620006b3565b9a505060208b015167ffffffffffffffff8111156200078e57600080fd5b6200079c8d828e01620006b3565b9950506040620007af8d828e016200069c565b9850506060620007c28d828e0162000685565b9750506080620007d58d828e016200070f565b96505060a0620007e88d828e016200070f565b95505060c0620007fb8d828e016200070f565b94505060e06200080e8d828e016200070f565b935050610100620008228d828e016200070f565b925050610120620008368d828e016200070f565b9150509295989b9194979a5092959850565b60006200085760198362000b66565b91507f50657220626c6f636b20726577617264206f766572666c6f77000000000000006000830152602082019050919050565b60006200089960108362000b66565b91507f4475726174696f6e206973207a65726f000000000000000000000000000000006000830152602082019050919050565b6000620008db600d8362000b66565b91507f4f776e6572206973207a65726f000000000000000000000000000000000000006000830152602082019050919050565b60006200091d601d8362000b66565b91507f537461727420626c6f636b206e756d626572206c742063757272656e740000006000830152602082019050919050565b60006200095f601b8362000b66565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000620009a160138362000b66565b91507f496e76616c6964206665652070657263656e74000000000000000000000000006000830152602082019050919050565b620009df8162000bbf565b82525050565b6000602082019050818103600083015262000a008162000848565b9050919050565b6000602082019050818103600083015262000a22816200088a565b9050919050565b6000602082019050818103600083015262000a4481620008cc565b9050919050565b6000602082019050818103600083015262000a66816200090e565b9050919050565b6000602082019050818103600083015262000a888162000950565b9050919050565b6000602082019050818103600083015262000aaa8162000992565b9050919050565b600060208201905062000ac86000830184620009d4565b92915050565b600060608201905062000ae56000830186620009d4565b62000af46020830185620009d4565b62000b036040830184620009d4565b949350505050565b6000604051905081810181811067ffffffffffffffff8211171562000b2f57600080fd5b8060405250919050565b600067ffffffffffffffff82111562000b5157600080fd5b601f19601f8301169050602081019050919050565b600082825260208201905092915050565b600062000b848262000b9f565b9050919050565b600062000b988262000b77565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101562000be957808201518184015260208101905062000bcc565b8381111562000bf9576000848401525b50505050565b62000c0a8162000b77565b811462000c1657600080fd5b50565b62000c248162000b8b565b811462000c3057600080fd5b50565b62000c3e8162000bbf565b811462000c4a57600080fd5b50565b61507e8062000c5d6000396000f3fe608060405234801561001057600080fd5b506004361061028a5760003560e01c806379ba50971161015c578063a9059cbb116100ce578063dd62ed3e11610087578063dd62ed3e1461088b578063e175ae13146108bb578063e2fd6ff9146108d9578063e69e04b3146108f7578063e928ce7214610917578063fd79c6a2146109355761028a565b8063a9059cbb146107b3578063ae2e933b146107e3578063af1c7f2014610801578063b4c6e4161461081f578063d294f0931461083d578063d708120e1461085b5761028a565b8063947ae12a11610120578063947ae12a146106c757806395d89b41146106f7578063a035b1fe14610715578063a2e6204514610735578063a457c2d714610753578063a694fc3a146107835761028a565b806379ba50971461060d5780637ee3beb91461062b578063817b1cd21461065b578063833e8bb6146106795780638da5cb5b146106a95761028a565b806332a6bf43116102005780635235934d116101b95780635235934d1461053557806353a47bb714610553578063551fdc46146105715780636a1ceb2d146105a157806370a08231146105bf57806372f702f3146105ef5761028a565b806332a6bf4314610447578063379607f5146104675780633950935114610498578063396f55d0146104c85780633ccfd60b146104e657806346267a93146105045761028a565b80631627540c116102525780631627540c1461034a57806318160ddd1461037a5780632059ba6f1461039857806323b872dd146103c85780632e17de78146103f8578063313ce567146104295761028a565b806301a563831461028f57806306fdde03146102ad578063095ea7b3146102cb5780630be4bc0d146102fb57806314cb97d71461031a575b600080fd5b610297610965565b6040516102a49190614d43565b60405180910390f35b6102b561096b565b6040516102c291906149ab565b60405180910390f35b6102e560048036038101906102e09190613f47565b610a0d565b6040516102f29190614975565b60405180910390f35b610303610a2b565b604051610311929190614d5e565b60405180910390f35b610334600480360381019061032f9190613fac565b610ad4565b6040516103419190614975565b60405180910390f35b610364600480360381019061035f9190613e93565b610b78565b6040516103719190614975565b60405180910390f35b610382610c1c565b60405161038f9190614d43565b60405180910390f35b6103b260048036038101906103ad9190613fac565b610c26565b6040516103bf9190614975565b60405180910390f35b6103e260048036038101906103dd9190613ef8565b610cca565b6040516103ef9190614975565b60405180910390f35b610412600480360381019061040d9190613fac565b610da3565b604051610420929190614d87565b60405180910390f35b610431610f40565b60405161043e9190614e2c565b60405180910390f35b61044f610f57565b60405161045e93929190614db0565b60405180910390f35b610481600480360381019061047c9190613fac565b610f86565b60405161048f929190614d87565b60405180910390f35b6104b260048036038101906104ad9190613f47565b61112d565b6040516104bf9190614975565b60405180910390f35b6104d06111e0565b6040516104dd9190614d43565b60405180910390f35b6104ee6111ec565b6040516104fb9190614975565b60405180910390f35b61051e60048036038101906105199190613f47565b6113e1565b60405161052c929190614d87565b60405180910390f35b61053d611417565b60405161054a9190614d43565b60405180910390f35b61055b611421565b60405161056891906148fa565b60405180910390f35b61058b60048036038101906105869190613fac565b61144b565b6040516105989190614975565b60405180910390f35b6105a9611610565b6040516105b69190614d0d565b60405180910390f35b6105d960048036038101906105d49190613e93565b611648565b6040516105e69190614d43565b60405180910390f35b6105f7611690565b6040516106049190614990565b60405180910390f35b6106156116ba565b6040516106229190614975565b60405180910390f35b61064560048036038101906106409190613fac565b61177e565b6040516106529190614975565b60405180910390f35b610663611a46565b6040516106709190614d43565b60405180910390f35b610693600480360381019061068e9190613fac565b611a50565b6040516106a09190614975565b60405180910390f35b6106b1611b66565b6040516106be91906148fa565b60405180910390f35b6106e160048036038101906106dc9190613e93565b611b90565b6040516106ee9190614d28565b60405180910390f35b6106ff611bfd565b60405161070c91906149ab565b60405180910390f35b61071d611c9f565b60405161072c93929190614db0565b60405180910390f35b61073d611d24565b60405161074a9190614975565b60405180910390f35b61076d60048036038101906107689190613f47565b611d35565b60405161077a9190614975565b60405180910390f35b61079d60048036038101906107989190613fac565b611e02565b6040516107aa9190614d43565b60405180910390f35b6107cd60048036038101906107c89190613f47565b611e61565b6040516107da9190614975565b60405180910390f35b6107eb611e7f565b6040516107f89190614d43565b60405180910390f35b610809611e89565b6040516108169190614d43565b60405180910390f35b610827611e93565b6040516108349190614d43565b60405180910390f35b610845611e99565b6040516108529190614d43565b60405180910390f35b61087560048036038101906108709190613fd5565b612029565b6040516108829190614975565b60405180910390f35b6108a560048036038101906108a09190613ebc565b612295565b6040516108b29190614d43565b60405180910390f35b6108c361231c565b6040516108d09190614d0d565b60405180910390f35b6108e1612354565b6040516108ee9190614d43565b60405180910390f35b6108ff61238e565b60405161090e93929190614db0565b60405180910390f35b61091f6123bd565b60405161092c9190614d43565b60405180910390f35b61094f600480360381019061094a9190613f47565b6123c7565b60405161095c9190614d43565b60405180910390f35b60095481565b606060038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a035780601f106109d857610100808354040283529160200191610a03565b820191906000526020600020905b8154815290600101906020018083116109e657829003601f168201915b5050505050905090565b6000610a21610a1a612476565b848461247e565b6001905092915050565b600080610a6160136040518060600160405290816000820154815260200160018201548152602001600282015481525050612649565b9150601360000154610a716126ef565b10610ad05760019050600060166000015414610acf57610acc610abd60166040518060600160405290816000820154815260200160018201548152602001600282015481525050612649565b8361242190919063ffffffff16565b91505b5b9091565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5d90614bed565b60405180910390fd5b610b6f826126f7565b60019050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190614bed565b60405180910390fd5b610c1382612789565b60019050919050565b6000600254905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf90614bed565b60405180910390fd5b610cc1826128fd565b60019050919050565b6000610cd784848461293e565b610d9884610ce3612476565b610d9385604051806060016040528060288152602001614fc460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610d49612476565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd39092919063ffffffff16565b61247e565b600190509392505050565b6000808260008111610dea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de190614acd565b60405180910390fd5b610df2612c2e565b6000339050610e1881866012604051806020016040529081600082015481525050612c56565b8094508195505050610e2a8184612d83565b610e3f84600d54612f3190919063ffffffff16565b600d81905550610e5a84600e5461242190919063ffffffff16565b600e819055506000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050610eba85826000015461242190919063ffffffff16565b8160000181905550610ede600f54610ed0612f7b565b61242190919063ffffffff16565b81600101819055508173ffffffffffffffffffffffffffffffffffffffff167f204fccf0d92ed8d48f204adb39b2e81e92bad0dedb93f5716ca9478cfb57de00878787604051610f3093929190614db0565b60405180910390a2505050915091565b6000600560009054906101000a900460ff16905090565b6000806000610f7b6012604051806020016040529081600082015481525050612f83565b925092509250909192565b6000808260008111610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc490614acd565b60405180910390fd5b610fd5612c2e565b6000339050610ffb81866012604051806020016040529081600082015481525050612c56565b8094508195505050600061102d606461101f60095488612f9e90919063ffffffff16565b61300e90919063ffffffff16565b90506110398285612d83565b61104e85600d54612f3190919063ffffffff16565b600d819055506110678186612f3190919063ffffffff16565b945061107e81600b5461242190919063ffffffff16565b600b819055508173ffffffffffffffffffffffffffffffffffffffff167f7708755c9b641bf197be5047b04002d2e88fa658c173a351067747eb5dfc568a878784886040516110d09493929190614de7565b60405180910390a26111258286601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166130589092919063ffffffff16565b505050915091565b60006111d661113a612476565b846111d1856001600061114b612476565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242190919063ffffffff16565b61247e565b6001905092915050565b670de0b6b3a764000081565b6000803390506000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000154905060008111611281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127890614a8d565b60405180910390fd5b611289612f7b565b826001015411156112cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c690614b0d565b60405180910390fd5b601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000808201600090556001820160009055505061133681600e54612f3190919063ffffffff16565b600e819055508273ffffffffffffffffffffffffffffffffffffffff167f6cca423c6ffc06e62a0acc433965e074b11c28479b0449250ce3ff65ac9e39fe826040516113829190614d43565b60405180910390a26113d78382601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166130589092919063ffffffff16565b6001935050505090565b60008060006113ee611c9f565b5050905061140b8585604051806020016040528085815250612c56565b92509250509250929050565b6000600e54905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008160008111611491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148890614acd565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151890614bed565b60405180910390fd5b611529612c2e565b611575836040518060400160405280601981526020017f4e6f7420656e6f756768206c6f636b6564207265776172647300000000000000815250600c54612bd39092919063ffffffff16565b600c819055507fcb871ad2b15bb3b1869f4566fd37fc75eb21cc32e880568fc6a73aae7939c5d2836040516115aa9190614d43565b60405180910390a16116066115bd611b66565b84601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166130589092919063ffffffff16565b6001915050919050565b611618613e06565b60136040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461174c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174390614b6d565b60405180910390fd5b611777600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166130de565b6001905090565b600081600081116117c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117bb90614acd565b60405180910390fd5b6117cc612c2e565b60003390506000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000154905085811015611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185790614c4d565b60405180910390fd5b600061189b61189661187186611648565b601260405180602001604052908160008201548152505061320390919063ffffffff16565b613238565b9050670de0b6b3a76400006118b9888361242190919063ffffffff16565b10156118fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f190614bcd565b60405180910390fd5b600061192461191f896012604051806020016040529081600082015481525050613253565b613238565b905061193085826132a4565b61194588600d5461242190919063ffffffff16565b600d8190555061196088600e54612f3190919063ffffffff16565b600e819055506119798884612f3190919063ffffffff16565b8460000181905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f6c86f3fd5118b3aa8bb4f389a617046de0a3d3d477de1a1673d227f802f616dc8a846040516119e1929190614d87565b60405180910390a38473ffffffffffffffffffffffffffffffffffffffff167f6a6d5d5933544e2f8792a55eb024869c9b2fa719fd6b231725a991198658f94e89604051611a2f9190614d43565b60405180910390a260019650505050505050919050565b6000600d54905090565b60008160008111611a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8d90614acd565b60405180910390fd5b611a9e612c2e565b6000339050611ab884600c5461242190919063ffffffff16565b600c819055508073ffffffffffffffffffffffffffffffffffffffff167f457b865678556d8d0f459b359ad2daa4638a33e4616c48e9c501f28ef8b673c485604051611b049190614d43565b60405180910390a2611b5b813086601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613438909392919063ffffffff16565b600192505050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611b98613e27565b601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050919050565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611c955780601f10611c6a57610100808354040283529160200191611c95565b820191906000526020600020905b815481529060010190602001808311611c7857829003601f168201915b5050505050905090565b600080600080611cad610a2b565b5090506000600d5490506000611cc1610c1c565b9050611ccb613e41565b601160405180602001604052908160008201548152505090506000821115611d0c57611d09611d03858561242190919063ffffffff16565b836134c1565b90505b611d1581612f83565b96509650965050505050909192565b6000611d2e612c2e565b6001905090565b6000611df8611d42612476565b84611df3856040518060600160405280602581526020016150246025913960016000611d6c612476565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd39092919063ffffffff16565b61247e565b6001905092915050565b60008160008111611e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3f90614acd565b60405180910390fd5b6000339050611e58818286613508565b92505050919050565b6000611e75611e6e612476565b848461293e565b6001905092915050565b6000600b54905090565b6000600f54905090565b600a5481565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2290614bed565b60405180910390fd5b6000600b5411611f70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6790614aad565b60405180910390fd5b600b5490506000600b81905550611f85611b66565b73ffffffffffffffffffffffffffffffffffffffff167f20ca5094f3a20c321cbe4123d0f01b276b81df0fa24cd4d83d9253956035d86382604051611fca9190614d43565b60405180910390a2612026611fdd611b66565b82601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166130589092919063ffffffff16565b90565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b290614bed565b60405180910390fd5b6120c3612c2e565b6120ce848484613661565b60006120e3838561242190919063ffffffff16565b90506120ed613e06565b60405180606001604052808381526020018781526020018681525090506121126126ef565b60136002015411156121cb5760166000808201600090556001820160009055600282016000905550507fe58d04c6069251e310ede9daae36efbc408e81b8bebd9915bf5a7e6e7ca95d9860405160405180910390a18060136000820151816000015560208201518160010155604082015181600201559050507f2fa40e2e6101b8bae833c4716c3c36b1e15938b1aaa699ec9896bb2d836c94928686846040516121be93929190614db0565b60405180910390a1612288565b7f1355800f5bff457ad5c5a51017502bef53351bc3e3575eaf67c1f768b2101b758686846040516121fe93929190614db0565b60405180910390a180601660008201518160000155602082015181600101556040820151816002015590505084601360000154111561228757846013600001819055507f2fa40e2e6101b8bae833c4716c3c36b1e15938b1aaa699ec9896bb2d836c94926013600101546013600201548760405161227e93929190614db0565b60405180910390a15b5b6001925050509392505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b612324613e06565b60166040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b600061238960136040518060600160405290816000820154815260200160018201548152602001600282015481525050612649565b905090565b60008060006123b26011604051806020016040529081600082015481525050612f83565b925092509250909192565b6000600c54905090565b6000816000811161240d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240490614acd565b60405180910390fd5b612418843385613508565b91505092915050565b60008082840190508381101561246c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246390614a6d565b60405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156124ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e590614c0d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561255e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255590614a4d565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161263c9190614d43565b60405180910390a3505050565b6000806126546126ef565b905082604001518110806126695750600a5481145b1561267457506126ea565b6000612686600a54856040015161373f565b90506000612698838660000151613759565b9050808210156126e65760006126b78383612f3190919063ffffffff16565b90506126e26126d3876020015183612f9e90919063ffffffff16565b8661242190919063ffffffff16565b9450505b5050505b919050565b600043905090565b60008110158015612709575060648111155b612748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273f90614c6d565b60405180910390fd5b806009819055507fcd36e83aa831664c67a318291b1d97d2741c9ea9d5a49f66e29e28541b3c06e98160405161277e9190614d43565b60405180910390a150565b8073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156127e4576128fa565b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286c90614b4d565b60405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2260405160405180910390a25b50565b80600f819055507f7f7d5eb76787d9279c88eb7f18c26b33761ae038bbd802551a7c6aa2f9f8dd12816040516129339190614d43565b60405180910390a150565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156129ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129a590614bad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a15906149ed565b60405180910390fd5b612a29838383613772565b612a9481604051806060016040528060268152602001614f9e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd39092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612b27816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242190919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612bc69190614d43565b60405180910390a3505050565b6000838311158290612c1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1291906149ab565b60405180910390fd5b5060008385039050809150509392505050565b600a54612c396126ef565b11612c4357612c54565b612c4b61394a565b612c53613abd565b5b565b600080839150612c6e612c698585613253565b613b4f565b90506000612c7b86611648565b905060008211612cc0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cb790614ccd565b60405180910390fd5b81811015612d03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cfa90614cad565b60405180910390fd5b6000612d188383612f3190919063ffffffff16565b90506000612d4d612d4883601260405180602001604052908160008201548152505061320390919063ffffffff16565b613238565b9050670de0b6b3a7640000811015612d7857829350612d75818661242190919063ffffffff16565b94505b505050935093915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612df3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dea90614b8d565b60405180910390fd5b612dff82600083613772565b612e6a81604051806060016040528060228152602001614f7c602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd39092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ec181600254612f3190919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612f259190614d43565b60405180910390a35050565b6000612f7383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612bd3565b905092915050565b600042905090565b60008060008360000151600a60129250925092509193909250565b600080831415612fb15760009050613008565b6000828402905082848281612fc257fe5b0414613003576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ffa90614aed565b60405180910390fd5b809150505b92915050565b600061305083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613b90565b905092915050565b6130d98363a9059cbb60e01b848460405160240161307792919061494c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613bf1565b505050565b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561313957613200565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3660405160405180910390a25b50565b61320b613e41565b604051806020016040528061322d848660000151612f9e90919063ffffffff16565b815250905092915050565b60006012600a0a82600001518161324b57fe5b049050919050565b61325b613e41565b6040518060200160405280613299846000015161328b6012600a0a6012600a0a0288612f9e90919063ffffffff16565b61300e90919063ffffffff16565b815250905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613314576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161330b90614ced565b60405180910390fd5b61332060008383613772565b6133358160025461242190919063ffffffff16565b60028190555061338c816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242190919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161342c9190614d43565b60405180910390a35050565b6134bb846323b872dd60e01b85858560405160240161345993929190614915565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613bf1565b50505050565b6134c9613e41565b60405180602001604052806134fd846134ef6012600a0a88612f9e90919063ffffffff16565b61300e90919063ffffffff16565b815250905092915050565b6000613512612c2e565b61353a613535836012604051806020016040529081600082015481525050613253565b613238565b90506000811161357f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161357690614b2d565b60405180910390fd5b61358984826132a4565b61359e82600d5461242190919063ffffffff16565b600d819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f6c86f3fd5118b3aa8bb4f389a617046de0a3d3d477de1a1673d227f802f616dc8484604051613603929190614d87565b60405180910390a361365a833084601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613438909392919063ffffffff16565b9392505050565b600081116136a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161369b90614a0d565b60405180910390fd5b6136ac6126ef565b8210156136ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136e590614a2d565b60405180910390fd5b680a31062beeed70000083111561373a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613731906149cd565b60405180910390fd5b505050565b60008183101561374f5781613751565b825b905092915050565b6000818310613768578161376a565b825b905092915050565b61377a612c2e565b6060604051806060016040528060388152602001614fec603891399050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146138765760006138186138136137ee856137e089611648565b612f3190919063ffffffff16565b601260405180602001604052908160008201548152505061320390919063ffffffff16565b613238565b9050670de0b6b3a7640000811015806138315750600081145b8290613873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161386a91906149ab565b60405180910390fd5b50505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461394457670de0b6b3a76400006138fe6138f96138d4856138c688611648565b61242190919063ffffffff16565b601260405180602001604052908160008201548152505061320390919063ffffffff16565b613238565b10158190613942576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161393991906149ab565b60405180910390fd5b505b50505050565b600080613955610a2b565b915091508015613a2657601660136000820154816000015560018201548160010155600282015481600201559050507fe58d04c6069251e310ede9daae36efbc408e81b8bebd9915bf5a7e6e7ca95d9860405160405180910390a1600060136000015414613a08577f2fa40e2e6101b8bae833c4716c3c36b1e15938b1aaa699ec9896bb2d836c94926013600101546013600201546013600001546040516139ff93929190614db0565b60405180910390a15b60166000808201600090556001820160009055600282016000905550505b613a3282600c54613759565b91506000821115613aab577f01feb0f24c52736758ca404486734e6287175eb5c93aa090f0ab371665231d7282604051613a6c9190614d43565b60405180910390a1613a8982600c54612f3190919063ffffffff16565b600c81905550613aa482600d5461242190919063ffffffff16565b600d819055505b613ab36126ef565b600a819055505050565b6000600d5490506000613ace610c1c565b90506000811415613aef576011601260008201548160000155905050613b09565b613af982826134c1565b6012600082015181600001559050505b7f15819dd2fd9f6418b142e798d08a18d0bf06ea368f4480b7b0d3f75bd966bc48601260000154600a6012604051613b4393929190614db0565b60405180910390a15050565b6000806012600a0a836000015181613b6357fe5b0611613b70576000613b73565b60015b60ff166012600a0a836000015181613b8757fe5b04019050919050565b60008083118290613bd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613bce91906149ab565b60405180910390fd5b506000838581613be357fe5b049050809150509392505050565b6060613c53826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613cb89092919063ffffffff16565b9050600081511115613cb35780806020019051810190613c739190613f83565b613cb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ca990614c8d565b60405180910390fd5b5b505050565b6060613cc78484600085613cd0565b90509392505050565b6060613cdb85613df3565b613d1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d1190614c2d565b60405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051613d4491906148e3565b60006040518083038185875af1925050503d8060008114613d81576040519150601f19603f3d011682016040523d82523d6000602084013e613d86565b606091505b50915091508115613d9b578092505050613deb565b600081511115613dae5780518082602001fd5b836040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613de291906149ab565b60405180910390fd5b949350505050565b600080823b905060008111915050919050565b60405180606001604052806000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b6040518060200160405280600081525090565b600081359050613e6381614f36565b92915050565b600081519050613e7881614f4d565b92915050565b600081359050613e8d81614f64565b92915050565b600060208284031215613ea557600080fd5b6000613eb384828501613e54565b91505092915050565b60008060408385031215613ecf57600080fd5b6000613edd85828601613e54565b9250506020613eee85828601613e54565b9150509250929050565b600080600060608486031215613f0d57600080fd5b6000613f1b86828701613e54565b9350506020613f2c86828701613e54565b9250506040613f3d86828701613e7e565b9150509250925092565b60008060408385031215613f5a57600080fd5b6000613f6885828601613e54565b9250506020613f7985828601613e7e565b9150509250929050565b600060208284031215613f9557600080fd5b6000613fa384828501613e69565b91505092915050565b600060208284031215613fbe57600080fd5b6000613fcc84828501613e7e565b91505092915050565b600080600060608486031215613fea57600080fd5b6000613ff886828701613e7e565b935050602061400986828701613e7e565b925050604061401a86828701613e7e565b9150509250925092565b61402d81614e79565b82525050565b61403c81614e8b565b82525050565b600061404d82614e47565b6140578185614e5d565b9350614067818560208601614ef2565b80840191505092915050565b61407c81614ece565b82525050565b600061408d82614e52565b6140978185614e68565b93506140a7818560208601614ef2565b6140b081614f25565b840191505092915050565b60006140c8601983614e68565b91507f50657220626c6f636b20726577617264206f766572666c6f77000000000000006000830152602082019050919050565b6000614108602383614e68565b91507f45524332303a207472616e7366657220746f20746865207a65726f206164647260008301527f65737300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061416e601083614e68565b91507f4475726174696f6e206973207a65726f000000000000000000000000000000006000830152602082019050919050565b60006141ae601d83614e68565b91507f537461727420626c6f636b206e756d626572206c742063757272656e740000006000830152602082019050919050565b60006141ee602283614e68565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614254601b83614e68565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000614294600c83614e68565b91507f4e6f7420756e7374616b656400000000000000000000000000000000000000006000830152602082019050919050565b60006142d4600783614e68565b91507f4e6f2066656573000000000000000000000000000000000000000000000000006000830152602082019050919050565b6000614314601683614e68565b91507f416d6f756e74206973206e6f7420706f736974697665000000000000000000006000830152602082019050919050565b6000614354602183614e68565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006143ba600f83614e68565b91507f4e6f742072656c656173656420617400000000000000000000000000000000006000830152602082019050919050565b60006143fa601883614e68565b91507f546f6f20736d616c6c207374616b696e6720616d6f756e7400000000000000006000830152602082019050919050565b600061443a600d83614e68565b91507f416c7265616479206f776e6572000000000000000000000000000000000000006000830152602082019050919050565b600061447a601a83614e68565b91507f4e6f74206e6f6d696e6174656420746f206f776e6572736869700000000000006000830152602082019050919050565b60006144ba602183614e68565b91507f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008301527f73000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614520602583614e68565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614586601a83614e68565b91507f5374616b652062616c616e6365206c74206d696e207374616b650000000000006000830152602082019050919050565b60006145c6600983614e68565b91507f4e6f74206f776e657200000000000000000000000000000000000000000000006000830152602082019050919050565b6000614606602483614e68565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061466c601d83614e68565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b60006146ac601b83614e68565b91507f4e6f7420656e6f75676820756e7374616b65642062616c616e636500000000006000830152602082019050919050565b60006146ec601383614e68565b91507f496e76616c6964206665652070657263656e74000000000000000000000000006000830152602082019050919050565b600061472c602a83614e68565b91507f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b6000614792601b83614e68565b91507f4e6f7420656e6f7567682073796e74686574696320746f6b656e7300000000006000830152602082019050919050565b60006147d2601a83614e68565b91507f546f6f20736d616c6c20756e7374616b696e6720616d6f756e740000000000006000830152602082019050919050565b6000614812601f83614e68565b91507f45524332303a206d696e7420746f20746865207a65726f2061646472657373006000830152602082019050919050565b60608201600082015161485b60008501826148b6565b50602082015161486e60208501826148b6565b50604082015161488160408501826148b6565b50505050565b60408201600082015161489d60008501826148b6565b5060208201516148b060208501826148b6565b50505050565b6148bf81614eb7565b82525050565b6148ce81614eb7565b82525050565b6148dd81614ec1565b82525050565b60006148ef8284614042565b915081905092915050565b600060208201905061490f6000830184614024565b92915050565b600060608201905061492a6000830186614024565b6149376020830185614024565b61494460408301846148c5565b949350505050565b60006040820190506149616000830185614024565b61496e60208301846148c5565b9392505050565b600060208201905061498a6000830184614033565b92915050565b60006020820190506149a56000830184614073565b92915050565b600060208201905081810360008301526149c58184614082565b905092915050565b600060208201905081810360008301526149e6816140bb565b9050919050565b60006020820190508181036000830152614a06816140fb565b9050919050565b60006020820190508181036000830152614a2681614161565b9050919050565b60006020820190508181036000830152614a46816141a1565b9050919050565b60006020820190508181036000830152614a66816141e1565b9050919050565b60006020820190508181036000830152614a8681614247565b9050919050565b60006020820190508181036000830152614aa681614287565b9050919050565b60006020820190508181036000830152614ac6816142c7565b9050919050565b60006020820190508181036000830152614ae681614307565b9050919050565b60006020820190508181036000830152614b0681614347565b9050919050565b60006020820190508181036000830152614b26816143ad565b9050919050565b60006020820190508181036000830152614b46816143ed565b9050919050565b60006020820190508181036000830152614b668161442d565b9050919050565b60006020820190508181036000830152614b868161446d565b9050919050565b60006020820190508181036000830152614ba6816144ad565b9050919050565b60006020820190508181036000830152614bc681614513565b9050919050565b60006020820190508181036000830152614be681614579565b9050919050565b60006020820190508181036000830152614c06816145b9565b9050919050565b60006020820190508181036000830152614c26816145f9565b9050919050565b60006020820190508181036000830152614c468161465f565b9050919050565b60006020820190508181036000830152614c668161469f565b9050919050565b60006020820190508181036000830152614c86816146df565b9050919050565b60006020820190508181036000830152614ca68161471f565b9050919050565b60006020820190508181036000830152614cc681614785565b9050919050565b60006020820190508181036000830152614ce6816147c5565b9050919050565b60006020820190508181036000830152614d0681614805565b9050919050565b6000606082019050614d226000830184614845565b92915050565b6000604082019050614d3d6000830184614887565b92915050565b6000602082019050614d5860008301846148c5565b92915050565b6000604082019050614d7360008301856148c5565b614d806020830184614033565b9392505050565b6000604082019050614d9c60008301856148c5565b614da960208301846148c5565b9392505050565b6000606082019050614dc560008301866148c5565b614dd260208301856148c5565b614ddf60408301846148c5565b949350505050565b6000608082019050614dfc60008301876148c5565b614e0960208301866148c5565b614e1660408301856148c5565b614e2360608301846148c5565b95945050505050565b6000602082019050614e4160008301846148d4565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000614e8482614e97565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000614ed982614ee0565b9050919050565b6000614eeb82614e97565b9050919050565b60005b83811015614f10578082015181840152602081019050614ef5565b83811115614f1f576000848401525b50505050565b6000601f19601f8301169050919050565b614f3f81614e79565b8114614f4a57600080fd5b50565b614f5681614e8b565b8114614f6157600080fd5b50565b614f6d81614eb7565b8114614f7857600080fd5b5056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654d696e696d616c207374616b652062616c616e63652073686f756c64206265206d6f7265206f7220657175616c20746f203120746f6b656e45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122090e6b400976aca545754af18c09b980bc93886193eb42b28464d1281b48224d764736f6c634300060c0033000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000003593d125a4f7849a1b059e64f4517a86dd60c95d000000000000000000000000d4eee3d50588d7dee8dcc42635e50093e0aa8cc000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000000000b89d62000000000000000000000000000000000000000000000000000000000011940000000000000000000000000000000000000000000000000000000000000a8c000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000095374616b6564204f4d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003734f4d0000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061028a5760003560e01c806379ba50971161015c578063a9059cbb116100ce578063dd62ed3e11610087578063dd62ed3e1461088b578063e175ae13146108bb578063e2fd6ff9146108d9578063e69e04b3146108f7578063e928ce7214610917578063fd79c6a2146109355761028a565b8063a9059cbb146107b3578063ae2e933b146107e3578063af1c7f2014610801578063b4c6e4161461081f578063d294f0931461083d578063d708120e1461085b5761028a565b8063947ae12a11610120578063947ae12a146106c757806395d89b41146106f7578063a035b1fe14610715578063a2e6204514610735578063a457c2d714610753578063a694fc3a146107835761028a565b806379ba50971461060d5780637ee3beb91461062b578063817b1cd21461065b578063833e8bb6146106795780638da5cb5b146106a95761028a565b806332a6bf43116102005780635235934d116101b95780635235934d1461053557806353a47bb714610553578063551fdc46146105715780636a1ceb2d146105a157806370a08231146105bf57806372f702f3146105ef5761028a565b806332a6bf4314610447578063379607f5146104675780633950935114610498578063396f55d0146104c85780633ccfd60b146104e657806346267a93146105045761028a565b80631627540c116102525780631627540c1461034a57806318160ddd1461037a5780632059ba6f1461039857806323b872dd146103c85780632e17de78146103f8578063313ce567146104295761028a565b806301a563831461028f57806306fdde03146102ad578063095ea7b3146102cb5780630be4bc0d146102fb57806314cb97d71461031a575b600080fd5b610297610965565b6040516102a49190614d43565b60405180910390f35b6102b561096b565b6040516102c291906149ab565b60405180910390f35b6102e560048036038101906102e09190613f47565b610a0d565b6040516102f29190614975565b60405180910390f35b610303610a2b565b604051610311929190614d5e565b60405180910390f35b610334600480360381019061032f9190613fac565b610ad4565b6040516103419190614975565b60405180910390f35b610364600480360381019061035f9190613e93565b610b78565b6040516103719190614975565b60405180910390f35b610382610c1c565b60405161038f9190614d43565b60405180910390f35b6103b260048036038101906103ad9190613fac565b610c26565b6040516103bf9190614975565b60405180910390f35b6103e260048036038101906103dd9190613ef8565b610cca565b6040516103ef9190614975565b60405180910390f35b610412600480360381019061040d9190613fac565b610da3565b604051610420929190614d87565b60405180910390f35b610431610f40565b60405161043e9190614e2c565b60405180910390f35b61044f610f57565b60405161045e93929190614db0565b60405180910390f35b610481600480360381019061047c9190613fac565b610f86565b60405161048f929190614d87565b60405180910390f35b6104b260048036038101906104ad9190613f47565b61112d565b6040516104bf9190614975565b60405180910390f35b6104d06111e0565b6040516104dd9190614d43565b60405180910390f35b6104ee6111ec565b6040516104fb9190614975565b60405180910390f35b61051e60048036038101906105199190613f47565b6113e1565b60405161052c929190614d87565b60405180910390f35b61053d611417565b60405161054a9190614d43565b60405180910390f35b61055b611421565b60405161056891906148fa565b60405180910390f35b61058b60048036038101906105869190613fac565b61144b565b6040516105989190614975565b60405180910390f35b6105a9611610565b6040516105b69190614d0d565b60405180910390f35b6105d960048036038101906105d49190613e93565b611648565b6040516105e69190614d43565b60405180910390f35b6105f7611690565b6040516106049190614990565b60405180910390f35b6106156116ba565b6040516106229190614975565b60405180910390f35b61064560048036038101906106409190613fac565b61177e565b6040516106529190614975565b60405180910390f35b610663611a46565b6040516106709190614d43565b60405180910390f35b610693600480360381019061068e9190613fac565b611a50565b6040516106a09190614975565b60405180910390f35b6106b1611b66565b6040516106be91906148fa565b60405180910390f35b6106e160048036038101906106dc9190613e93565b611b90565b6040516106ee9190614d28565b60405180910390f35b6106ff611bfd565b60405161070c91906149ab565b60405180910390f35b61071d611c9f565b60405161072c93929190614db0565b60405180910390f35b61073d611d24565b60405161074a9190614975565b60405180910390f35b61076d60048036038101906107689190613f47565b611d35565b60405161077a9190614975565b60405180910390f35b61079d60048036038101906107989190613fac565b611e02565b6040516107aa9190614d43565b60405180910390f35b6107cd60048036038101906107c89190613f47565b611e61565b6040516107da9190614975565b60405180910390f35b6107eb611e7f565b6040516107f89190614d43565b60405180910390f35b610809611e89565b6040516108169190614d43565b60405180910390f35b610827611e93565b6040516108349190614d43565b60405180910390f35b610845611e99565b6040516108529190614d43565b60405180910390f35b61087560048036038101906108709190613fd5565b612029565b6040516108829190614975565b60405180910390f35b6108a560048036038101906108a09190613ebc565b612295565b6040516108b29190614d43565b60405180910390f35b6108c361231c565b6040516108d09190614d0d565b60405180910390f35b6108e1612354565b6040516108ee9190614d43565b60405180910390f35b6108ff61238e565b60405161090e93929190614db0565b60405180910390f35b61091f6123bd565b60405161092c9190614d43565b60405180910390f35b61094f600480360381019061094a9190613f47565b6123c7565b60405161095c9190614d43565b60405180910390f35b60095481565b606060038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a035780601f106109d857610100808354040283529160200191610a03565b820191906000526020600020905b8154815290600101906020018083116109e657829003601f168201915b5050505050905090565b6000610a21610a1a612476565b848461247e565b6001905092915050565b600080610a6160136040518060600160405290816000820154815260200160018201548152602001600282015481525050612649565b9150601360000154610a716126ef565b10610ad05760019050600060166000015414610acf57610acc610abd60166040518060600160405290816000820154815260200160018201548152602001600282015481525050612649565b8361242190919063ffffffff16565b91505b5b9091565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5d90614bed565b60405180910390fd5b610b6f826126f7565b60019050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190614bed565b60405180910390fd5b610c1382612789565b60019050919050565b6000600254905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf90614bed565b60405180910390fd5b610cc1826128fd565b60019050919050565b6000610cd784848461293e565b610d9884610ce3612476565b610d9385604051806060016040528060288152602001614fc460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610d49612476565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd39092919063ffffffff16565b61247e565b600190509392505050565b6000808260008111610dea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de190614acd565b60405180910390fd5b610df2612c2e565b6000339050610e1881866012604051806020016040529081600082015481525050612c56565b8094508195505050610e2a8184612d83565b610e3f84600d54612f3190919063ffffffff16565b600d81905550610e5a84600e5461242190919063ffffffff16565b600e819055506000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050610eba85826000015461242190919063ffffffff16565b8160000181905550610ede600f54610ed0612f7b565b61242190919063ffffffff16565b81600101819055508173ffffffffffffffffffffffffffffffffffffffff167f204fccf0d92ed8d48f204adb39b2e81e92bad0dedb93f5716ca9478cfb57de00878787604051610f3093929190614db0565b60405180910390a2505050915091565b6000600560009054906101000a900460ff16905090565b6000806000610f7b6012604051806020016040529081600082015481525050612f83565b925092509250909192565b6000808260008111610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc490614acd565b60405180910390fd5b610fd5612c2e565b6000339050610ffb81866012604051806020016040529081600082015481525050612c56565b8094508195505050600061102d606461101f60095488612f9e90919063ffffffff16565b61300e90919063ffffffff16565b90506110398285612d83565b61104e85600d54612f3190919063ffffffff16565b600d819055506110678186612f3190919063ffffffff16565b945061107e81600b5461242190919063ffffffff16565b600b819055508173ffffffffffffffffffffffffffffffffffffffff167f7708755c9b641bf197be5047b04002d2e88fa658c173a351067747eb5dfc568a878784886040516110d09493929190614de7565b60405180910390a26111258286601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166130589092919063ffffffff16565b505050915091565b60006111d661113a612476565b846111d1856001600061114b612476565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242190919063ffffffff16565b61247e565b6001905092915050565b670de0b6b3a764000081565b6000803390506000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000154905060008111611281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127890614a8d565b60405180910390fd5b611289612f7b565b826001015411156112cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c690614b0d565b60405180910390fd5b601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000808201600090556001820160009055505061133681600e54612f3190919063ffffffff16565b600e819055508273ffffffffffffffffffffffffffffffffffffffff167f6cca423c6ffc06e62a0acc433965e074b11c28479b0449250ce3ff65ac9e39fe826040516113829190614d43565b60405180910390a26113d78382601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166130589092919063ffffffff16565b6001935050505090565b60008060006113ee611c9f565b5050905061140b8585604051806020016040528085815250612c56565b92509250509250929050565b6000600e54905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008160008111611491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148890614acd565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151890614bed565b60405180910390fd5b611529612c2e565b611575836040518060400160405280601981526020017f4e6f7420656e6f756768206c6f636b6564207265776172647300000000000000815250600c54612bd39092919063ffffffff16565b600c819055507fcb871ad2b15bb3b1869f4566fd37fc75eb21cc32e880568fc6a73aae7939c5d2836040516115aa9190614d43565b60405180910390a16116066115bd611b66565b84601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166130589092919063ffffffff16565b6001915050919050565b611618613e06565b60136040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461174c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174390614b6d565b60405180910390fd5b611777600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166130de565b6001905090565b600081600081116117c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117bb90614acd565b60405180910390fd5b6117cc612c2e565b60003390506000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000154905085811015611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185790614c4d565b60405180910390fd5b600061189b61189661187186611648565b601260405180602001604052908160008201548152505061320390919063ffffffff16565b613238565b9050670de0b6b3a76400006118b9888361242190919063ffffffff16565b10156118fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f190614bcd565b60405180910390fd5b600061192461191f896012604051806020016040529081600082015481525050613253565b613238565b905061193085826132a4565b61194588600d5461242190919063ffffffff16565b600d8190555061196088600e54612f3190919063ffffffff16565b600e819055506119798884612f3190919063ffffffff16565b8460000181905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f6c86f3fd5118b3aa8bb4f389a617046de0a3d3d477de1a1673d227f802f616dc8a846040516119e1929190614d87565b60405180910390a38473ffffffffffffffffffffffffffffffffffffffff167f6a6d5d5933544e2f8792a55eb024869c9b2fa719fd6b231725a991198658f94e89604051611a2f9190614d43565b60405180910390a260019650505050505050919050565b6000600d54905090565b60008160008111611a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8d90614acd565b60405180910390fd5b611a9e612c2e565b6000339050611ab884600c5461242190919063ffffffff16565b600c819055508073ffffffffffffffffffffffffffffffffffffffff167f457b865678556d8d0f459b359ad2daa4638a33e4616c48e9c501f28ef8b673c485604051611b049190614d43565b60405180910390a2611b5b813086601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613438909392919063ffffffff16565b600192505050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611b98613e27565b601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050919050565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611c955780601f10611c6a57610100808354040283529160200191611c95565b820191906000526020600020905b815481529060010190602001808311611c7857829003601f168201915b5050505050905090565b600080600080611cad610a2b565b5090506000600d5490506000611cc1610c1c565b9050611ccb613e41565b601160405180602001604052908160008201548152505090506000821115611d0c57611d09611d03858561242190919063ffffffff16565b836134c1565b90505b611d1581612f83565b96509650965050505050909192565b6000611d2e612c2e565b6001905090565b6000611df8611d42612476565b84611df3856040518060600160405280602581526020016150246025913960016000611d6c612476565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd39092919063ffffffff16565b61247e565b6001905092915050565b60008160008111611e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3f90614acd565b60405180910390fd5b6000339050611e58818286613508565b92505050919050565b6000611e75611e6e612476565b848461293e565b6001905092915050565b6000600b54905090565b6000600f54905090565b600a5481565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2290614bed565b60405180910390fd5b6000600b5411611f70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6790614aad565b60405180910390fd5b600b5490506000600b81905550611f85611b66565b73ffffffffffffffffffffffffffffffffffffffff167f20ca5094f3a20c321cbe4123d0f01b276b81df0fa24cd4d83d9253956035d86382604051611fca9190614d43565b60405180910390a2612026611fdd611b66565b82601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166130589092919063ffffffff16565b90565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b290614bed565b60405180910390fd5b6120c3612c2e565b6120ce848484613661565b60006120e3838561242190919063ffffffff16565b90506120ed613e06565b60405180606001604052808381526020018781526020018681525090506121126126ef565b60136002015411156121cb5760166000808201600090556001820160009055600282016000905550507fe58d04c6069251e310ede9daae36efbc408e81b8bebd9915bf5a7e6e7ca95d9860405160405180910390a18060136000820151816000015560208201518160010155604082015181600201559050507f2fa40e2e6101b8bae833c4716c3c36b1e15938b1aaa699ec9896bb2d836c94928686846040516121be93929190614db0565b60405180910390a1612288565b7f1355800f5bff457ad5c5a51017502bef53351bc3e3575eaf67c1f768b2101b758686846040516121fe93929190614db0565b60405180910390a180601660008201518160000155602082015181600101556040820151816002015590505084601360000154111561228757846013600001819055507f2fa40e2e6101b8bae833c4716c3c36b1e15938b1aaa699ec9896bb2d836c94926013600101546013600201548760405161227e93929190614db0565b60405180910390a15b5b6001925050509392505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b612324613e06565b60166040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b600061238960136040518060600160405290816000820154815260200160018201548152602001600282015481525050612649565b905090565b60008060006123b26011604051806020016040529081600082015481525050612f83565b925092509250909192565b6000600c54905090565b6000816000811161240d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240490614acd565b60405180910390fd5b612418843385613508565b91505092915050565b60008082840190508381101561246c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246390614a6d565b60405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156124ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e590614c0d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561255e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255590614a4d565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161263c9190614d43565b60405180910390a3505050565b6000806126546126ef565b905082604001518110806126695750600a5481145b1561267457506126ea565b6000612686600a54856040015161373f565b90506000612698838660000151613759565b9050808210156126e65760006126b78383612f3190919063ffffffff16565b90506126e26126d3876020015183612f9e90919063ffffffff16565b8661242190919063ffffffff16565b9450505b5050505b919050565b600043905090565b60008110158015612709575060648111155b612748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273f90614c6d565b60405180910390fd5b806009819055507fcd36e83aa831664c67a318291b1d97d2741c9ea9d5a49f66e29e28541b3c06e98160405161277e9190614d43565b60405180910390a150565b8073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156127e4576128fa565b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286c90614b4d565b60405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2260405160405180910390a25b50565b80600f819055507f7f7d5eb76787d9279c88eb7f18c26b33761ae038bbd802551a7c6aa2f9f8dd12816040516129339190614d43565b60405180910390a150565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156129ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129a590614bad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a15906149ed565b60405180910390fd5b612a29838383613772565b612a9481604051806060016040528060268152602001614f9e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd39092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612b27816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242190919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612bc69190614d43565b60405180910390a3505050565b6000838311158290612c1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1291906149ab565b60405180910390fd5b5060008385039050809150509392505050565b600a54612c396126ef565b11612c4357612c54565b612c4b61394a565b612c53613abd565b5b565b600080839150612c6e612c698585613253565b613b4f565b90506000612c7b86611648565b905060008211612cc0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cb790614ccd565b60405180910390fd5b81811015612d03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cfa90614cad565b60405180910390fd5b6000612d188383612f3190919063ffffffff16565b90506000612d4d612d4883601260405180602001604052908160008201548152505061320390919063ffffffff16565b613238565b9050670de0b6b3a7640000811015612d7857829350612d75818661242190919063ffffffff16565b94505b505050935093915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612df3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dea90614b8d565b60405180910390fd5b612dff82600083613772565b612e6a81604051806060016040528060228152602001614f7c602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd39092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ec181600254612f3190919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612f259190614d43565b60405180910390a35050565b6000612f7383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612bd3565b905092915050565b600042905090565b60008060008360000151600a60129250925092509193909250565b600080831415612fb15760009050613008565b6000828402905082848281612fc257fe5b0414613003576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ffa90614aed565b60405180910390fd5b809150505b92915050565b600061305083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613b90565b905092915050565b6130d98363a9059cbb60e01b848460405160240161307792919061494c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613bf1565b505050565b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561313957613200565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3660405160405180910390a25b50565b61320b613e41565b604051806020016040528061322d848660000151612f9e90919063ffffffff16565b815250905092915050565b60006012600a0a82600001518161324b57fe5b049050919050565b61325b613e41565b6040518060200160405280613299846000015161328b6012600a0a6012600a0a0288612f9e90919063ffffffff16565b61300e90919063ffffffff16565b815250905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613314576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161330b90614ced565b60405180910390fd5b61332060008383613772565b6133358160025461242190919063ffffffff16565b60028190555061338c816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242190919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161342c9190614d43565b60405180910390a35050565b6134bb846323b872dd60e01b85858560405160240161345993929190614915565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613bf1565b50505050565b6134c9613e41565b60405180602001604052806134fd846134ef6012600a0a88612f9e90919063ffffffff16565b61300e90919063ffffffff16565b815250905092915050565b6000613512612c2e565b61353a613535836012604051806020016040529081600082015481525050613253565b613238565b90506000811161357f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161357690614b2d565b60405180910390fd5b61358984826132a4565b61359e82600d5461242190919063ffffffff16565b600d819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f6c86f3fd5118b3aa8bb4f389a617046de0a3d3d477de1a1673d227f802f616dc8484604051613603929190614d87565b60405180910390a361365a833084601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613438909392919063ffffffff16565b9392505050565b600081116136a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161369b90614a0d565b60405180910390fd5b6136ac6126ef565b8210156136ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136e590614a2d565b60405180910390fd5b680a31062beeed70000083111561373a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613731906149cd565b60405180910390fd5b505050565b60008183101561374f5781613751565b825b905092915050565b6000818310613768578161376a565b825b905092915050565b61377a612c2e565b6060604051806060016040528060388152602001614fec603891399050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146138765760006138186138136137ee856137e089611648565b612f3190919063ffffffff16565b601260405180602001604052908160008201548152505061320390919063ffffffff16565b613238565b9050670de0b6b3a7640000811015806138315750600081145b8290613873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161386a91906149ab565b60405180910390fd5b50505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461394457670de0b6b3a76400006138fe6138f96138d4856138c688611648565b61242190919063ffffffff16565b601260405180602001604052908160008201548152505061320390919063ffffffff16565b613238565b10158190613942576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161393991906149ab565b60405180910390fd5b505b50505050565b600080613955610a2b565b915091508015613a2657601660136000820154816000015560018201548160010155600282015481600201559050507fe58d04c6069251e310ede9daae36efbc408e81b8bebd9915bf5a7e6e7ca95d9860405160405180910390a1600060136000015414613a08577f2fa40e2e6101b8bae833c4716c3c36b1e15938b1aaa699ec9896bb2d836c94926013600101546013600201546013600001546040516139ff93929190614db0565b60405180910390a15b60166000808201600090556001820160009055600282016000905550505b613a3282600c54613759565b91506000821115613aab577f01feb0f24c52736758ca404486734e6287175eb5c93aa090f0ab371665231d7282604051613a6c9190614d43565b60405180910390a1613a8982600c54612f3190919063ffffffff16565b600c81905550613aa482600d5461242190919063ffffffff16565b600d819055505b613ab36126ef565b600a819055505050565b6000600d5490506000613ace610c1c565b90506000811415613aef576011601260008201548160000155905050613b09565b613af982826134c1565b6012600082015181600001559050505b7f15819dd2fd9f6418b142e798d08a18d0bf06ea368f4480b7b0d3f75bd966bc48601260000154600a6012604051613b4393929190614db0565b60405180910390a15050565b6000806012600a0a836000015181613b6357fe5b0611613b70576000613b73565b60015b60ff166012600a0a836000015181613b8757fe5b04019050919050565b60008083118290613bd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613bce91906149ab565b60405180910390fd5b506000838581613be357fe5b049050809150509392505050565b6060613c53826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613cb89092919063ffffffff16565b9050600081511115613cb35780806020019051810190613c739190613f83565b613cb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ca990614c8d565b60405180910390fd5b5b505050565b6060613cc78484600085613cd0565b90509392505050565b6060613cdb85613df3565b613d1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d1190614c2d565b60405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051613d4491906148e3565b60006040518083038185875af1925050503d8060008114613d81576040519150601f19603f3d011682016040523d82523d6000602084013e613d86565b606091505b50915091508115613d9b578092505050613deb565b600081511115613dae5780518082602001fd5b836040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613de291906149ab565b60405180910390fd5b949350505050565b600080823b905060008111915050919050565b60405180606001604052806000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b6040518060200160405280600081525090565b600081359050613e6381614f36565b92915050565b600081519050613e7881614f4d565b92915050565b600081359050613e8d81614f64565b92915050565b600060208284031215613ea557600080fd5b6000613eb384828501613e54565b91505092915050565b60008060408385031215613ecf57600080fd5b6000613edd85828601613e54565b9250506020613eee85828601613e54565b9150509250929050565b600080600060608486031215613f0d57600080fd5b6000613f1b86828701613e54565b9350506020613f2c86828701613e54565b9250506040613f3d86828701613e7e565b9150509250925092565b60008060408385031215613f5a57600080fd5b6000613f6885828601613e54565b9250506020613f7985828601613e7e565b9150509250929050565b600060208284031215613f9557600080fd5b6000613fa384828501613e69565b91505092915050565b600060208284031215613fbe57600080fd5b6000613fcc84828501613e7e565b91505092915050565b600080600060608486031215613fea57600080fd5b6000613ff886828701613e7e565b935050602061400986828701613e7e565b925050604061401a86828701613e7e565b9150509250925092565b61402d81614e79565b82525050565b61403c81614e8b565b82525050565b600061404d82614e47565b6140578185614e5d565b9350614067818560208601614ef2565b80840191505092915050565b61407c81614ece565b82525050565b600061408d82614e52565b6140978185614e68565b93506140a7818560208601614ef2565b6140b081614f25565b840191505092915050565b60006140c8601983614e68565b91507f50657220626c6f636b20726577617264206f766572666c6f77000000000000006000830152602082019050919050565b6000614108602383614e68565b91507f45524332303a207472616e7366657220746f20746865207a65726f206164647260008301527f65737300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061416e601083614e68565b91507f4475726174696f6e206973207a65726f000000000000000000000000000000006000830152602082019050919050565b60006141ae601d83614e68565b91507f537461727420626c6f636b206e756d626572206c742063757272656e740000006000830152602082019050919050565b60006141ee602283614e68565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614254601b83614e68565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000614294600c83614e68565b91507f4e6f7420756e7374616b656400000000000000000000000000000000000000006000830152602082019050919050565b60006142d4600783614e68565b91507f4e6f2066656573000000000000000000000000000000000000000000000000006000830152602082019050919050565b6000614314601683614e68565b91507f416d6f756e74206973206e6f7420706f736974697665000000000000000000006000830152602082019050919050565b6000614354602183614e68565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006143ba600f83614e68565b91507f4e6f742072656c656173656420617400000000000000000000000000000000006000830152602082019050919050565b60006143fa601883614e68565b91507f546f6f20736d616c6c207374616b696e6720616d6f756e7400000000000000006000830152602082019050919050565b600061443a600d83614e68565b91507f416c7265616479206f776e6572000000000000000000000000000000000000006000830152602082019050919050565b600061447a601a83614e68565b91507f4e6f74206e6f6d696e6174656420746f206f776e6572736869700000000000006000830152602082019050919050565b60006144ba602183614e68565b91507f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008301527f73000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614520602583614e68565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614586601a83614e68565b91507f5374616b652062616c616e6365206c74206d696e207374616b650000000000006000830152602082019050919050565b60006145c6600983614e68565b91507f4e6f74206f776e657200000000000000000000000000000000000000000000006000830152602082019050919050565b6000614606602483614e68565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061466c601d83614e68565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b60006146ac601b83614e68565b91507f4e6f7420656e6f75676820756e7374616b65642062616c616e636500000000006000830152602082019050919050565b60006146ec601383614e68565b91507f496e76616c6964206665652070657263656e74000000000000000000000000006000830152602082019050919050565b600061472c602a83614e68565b91507f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b6000614792601b83614e68565b91507f4e6f7420656e6f7567682073796e74686574696320746f6b656e7300000000006000830152602082019050919050565b60006147d2601a83614e68565b91507f546f6f20736d616c6c20756e7374616b696e6720616d6f756e740000000000006000830152602082019050919050565b6000614812601f83614e68565b91507f45524332303a206d696e7420746f20746865207a65726f2061646472657373006000830152602082019050919050565b60608201600082015161485b60008501826148b6565b50602082015161486e60208501826148b6565b50604082015161488160408501826148b6565b50505050565b60408201600082015161489d60008501826148b6565b5060208201516148b060208501826148b6565b50505050565b6148bf81614eb7565b82525050565b6148ce81614eb7565b82525050565b6148dd81614ec1565b82525050565b60006148ef8284614042565b915081905092915050565b600060208201905061490f6000830184614024565b92915050565b600060608201905061492a6000830186614024565b6149376020830185614024565b61494460408301846148c5565b949350505050565b60006040820190506149616000830185614024565b61496e60208301846148c5565b9392505050565b600060208201905061498a6000830184614033565b92915050565b60006020820190506149a56000830184614073565b92915050565b600060208201905081810360008301526149c58184614082565b905092915050565b600060208201905081810360008301526149e6816140bb565b9050919050565b60006020820190508181036000830152614a06816140fb565b9050919050565b60006020820190508181036000830152614a2681614161565b9050919050565b60006020820190508181036000830152614a46816141a1565b9050919050565b60006020820190508181036000830152614a66816141e1565b9050919050565b60006020820190508181036000830152614a8681614247565b9050919050565b60006020820190508181036000830152614aa681614287565b9050919050565b60006020820190508181036000830152614ac6816142c7565b9050919050565b60006020820190508181036000830152614ae681614307565b9050919050565b60006020820190508181036000830152614b0681614347565b9050919050565b60006020820190508181036000830152614b26816143ad565b9050919050565b60006020820190508181036000830152614b46816143ed565b9050919050565b60006020820190508181036000830152614b668161442d565b9050919050565b60006020820190508181036000830152614b868161446d565b9050919050565b60006020820190508181036000830152614ba6816144ad565b9050919050565b60006020820190508181036000830152614bc681614513565b9050919050565b60006020820190508181036000830152614be681614579565b9050919050565b60006020820190508181036000830152614c06816145b9565b9050919050565b60006020820190508181036000830152614c26816145f9565b9050919050565b60006020820190508181036000830152614c468161465f565b9050919050565b60006020820190508181036000830152614c668161469f565b9050919050565b60006020820190508181036000830152614c86816146df565b9050919050565b60006020820190508181036000830152614ca68161471f565b9050919050565b60006020820190508181036000830152614cc681614785565b9050919050565b60006020820190508181036000830152614ce6816147c5565b9050919050565b60006020820190508181036000830152614d0681614805565b9050919050565b6000606082019050614d226000830184614845565b92915050565b6000604082019050614d3d6000830184614887565b92915050565b6000602082019050614d5860008301846148c5565b92915050565b6000604082019050614d7360008301856148c5565b614d806020830184614033565b9392505050565b6000604082019050614d9c60008301856148c5565b614da960208301846148c5565b9392505050565b6000606082019050614dc560008301866148c5565b614dd260208301856148c5565b614ddf60408301846148c5565b949350505050565b6000608082019050614dfc60008301876148c5565b614e0960208301866148c5565b614e1660408301856148c5565b614e2360608301846148c5565b95945050505050565b6000602082019050614e4160008301846148d4565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000614e8482614e97565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000614ed982614ee0565b9050919050565b6000614eeb82614e97565b9050919050565b60005b83811015614f10578082015181840152602081019050614ef5565b83811115614f1f576000848401525b50505050565b6000601f19601f8301169050919050565b614f3f81614e79565b8114614f4a57600080fd5b50565b614f5681614e8b565b8114614f6157600080fd5b50565b614f6d81614eb7565b8114614f7857600080fd5b5056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654d696e696d616c207374616b652062616c616e63652073686f756c64206265206d6f7265206f7220657175616c20746f203120746f6b656e45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122090e6b400976aca545754af18c09b980bc93886193eb42b28464d1281b48224d764736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000003593d125a4f7849a1b059e64f4517a86dd60c95d000000000000000000000000d4eee3d50588d7dee8dcc42635e50093e0aa8cc000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000000000b89d62000000000000000000000000000000000000000000000000000000000011940000000000000000000000000000000000000000000000000000000000000a8c000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000095374616b6564204f4d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003734f4d0000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : syntheticTokenName (string): Staked OM
Arg [1] : syntheticTokenSymbol (string): sOM
Arg [2] : stakingToken_ (address): 0x3593D125a4f7849a1B059E64F4517A86Dd60c95d
Arg [3] : owner_ (address): 0xd4eeE3D50588D7dee8Dcc42635E50093E0AA8Cc0
Arg [4] : claimingFeePercent_ (uint256): 2
Arg [5] : perBlockReward_ (uint256): 5000000000000000000
Arg [6] : startBlockNumber_ (uint256): 12098914
Arg [7] : duration_ (uint256): 1152000
Arg [8] : unstakingTime_ (uint256): 691200
Arg [9] : defaultPriceMantissa (uint256): 1000000000000000000
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [2] : 0000000000000000000000003593d125a4f7849a1b059e64f4517a86dd60c95d
Arg [3] : 000000000000000000000000d4eee3d50588d7dee8dcc42635e50093e0aa8cc0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [5] : 0000000000000000000000000000000000000000000000004563918244f40000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000b89d62
Arg [7] : 0000000000000000000000000000000000000000000000000000000000119400
Arg [8] : 00000000000000000000000000000000000000000000000000000000000a8c00
Arg [9] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [11] : 5374616b6564204f4d0000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [13] : 734f4d0000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.