More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 131 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Payment... | 17186550 | 480 days ago | IN | 0 ETH | 0.00453667 | ||||
Swap | 17185588 | 481 days ago | IN | 0 ETH | 0.007995 | ||||
Swap | 17182794 | 481 days ago | IN | 0 ETH | 0.01072504 | ||||
Set Accounts Lim... | 17179240 | 481 days ago | IN | 0 ETH | 0.00541739 | ||||
Swap | 17178293 | 482 days ago | IN | 0 ETH | 0.00954438 | ||||
Swap | 17152245 | 485 days ago | IN | 0 ETH | 0.00561112 | ||||
Swap | 17145030 | 486 days ago | IN | 0 ETH | 0.00490425 | ||||
Swap | 17143167 | 487 days ago | IN | 0 ETH | 0.00439015 | ||||
Swap | 17142527 | 487 days ago | IN | 0 ETH | 0.00494228 | ||||
Swap | 17140753 | 487 days ago | IN | 0 ETH | 0.00439652 | ||||
Swap | 17136505 | 487 days ago | IN | 0 ETH | 0.00603201 | ||||
Increase Issuanc... | 17129812 | 488 days ago | IN | 0 ETH | 0.00372266 | ||||
Set Accounts Lim... | 17129525 | 488 days ago | IN | 0 ETH | 0.11160773 | ||||
Create Payment L... | 17128075 | 489 days ago | IN | 0 ETH | 0.0021204 | ||||
Create Simple Po... | 17128058 | 489 days ago | IN | 0 ETH | 0.00877729 | ||||
Accept Ownership | 17030900 | 502 days ago | IN | 0 ETH | 0.00060831 | ||||
Nominate New Own... | 17030896 | 502 days ago | IN | 0 ETH | 0.00089677 | ||||
Accept Pool Owne... | 17030878 | 502 days ago | IN | 0 ETH | 0.00062445 | ||||
Accept Pool Owne... | 17030873 | 502 days ago | IN | 0 ETH | 0.00062734 | ||||
Nominate New Poo... | 17030865 | 502 days ago | IN | 0 ETH | 0.00106813 | ||||
Nominate New Poo... | 17030863 | 502 days ago | IN | 0 ETH | 0.00115326 | ||||
Accept Pool Owne... | 17030857 | 502 days ago | IN | 0 ETH | 0.00061437 | ||||
Nominate New Poo... | 17030826 | 502 days ago | IN | 0 ETH | 0.00100394 | ||||
Withdraw Payment... | 17024394 | 503 days ago | IN | 0 ETH | 0.00169898 | ||||
Set Accounts Lim... | 17023670 | 503 days ago | IN | 0 ETH | 0.00111581 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
FixedSwap
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default 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/token/ERC20/IERC20.sol"; import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/math/Math.sol"; import "openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol"; import "solowei/contracts/AttoDecimal.sol"; import "solowei/contracts/TwoStageOwnable.sol"; contract FixedSwap is ReentrancyGuard, TwoStageOwnable { using SafeMath for uint256; using SafeERC20 for IERC20; using AttoDecimal for AttoDecimal.Instance; enum Type {SIMPLE, INTERVAL, LINEAR} struct Props { uint256 issuanceLimit; uint256 startsAt; uint256 endsAt; IERC20 paymentToken; IERC20 issuanceToken; AttoDecimal.Instance fee; AttoDecimal.Instance rate; } struct AccountState { uint256 limitIndex; uint256 paymentSum; } struct ComplexAccountState { uint256 issuanceAmount; uint256 withdrawnIssuanceAmount; } struct Account { AccountState state; ComplexAccountState complex; uint256 immediatelyUnlockedAmount; // linear uint256 unlockedIntervalsCount; // interval } struct State { uint256 available; uint256 issuance; uint256 lockedPayments; uint256 unlockedPayments; address nominatedOwner; address owner; uint256[] paymentLimits; } struct Interval { uint256 startsAt; AttoDecimal.Instance unlockingPart; } struct LinearProps { uint256 endsAt; uint256 duration; } struct Pool { Type type_; uint256 index; AttoDecimal.Instance immediatelyUnlockingPart; Props props; LinearProps linear; State state; Interval[] intervals; mapping(address => Account) accounts; } Pool[] private _pools; mapping(IERC20 => uint256) private _collectedFees; function getTimestamp() internal view virtual returns (uint256) { return block.timestamp; } function poolsCount() public view returns (uint256) { return _pools.length; } function poolProps(uint256 poolIndex) public view returns (Type type_, Props memory props) { Pool storage pool = _getPool(poolIndex); return (pool.type_, pool.props); } function intervalPoolProps(uint256 poolIndex) public view returns ( Props memory props, AttoDecimal.Instance memory immediatelyUnlockingPart, Interval[] memory intervals ) { Pool storage pool = _getPool(poolIndex); _assertPoolIsInterval(pool); return (pool.props, pool.immediatelyUnlockingPart, pool.intervals); } function linearPoolProps(uint256 poolIndex) public view returns ( Props memory props, AttoDecimal.Instance memory immediatelyUnlockingPart, LinearProps memory linear ) { Pool storage pool = _getPool(poolIndex); _assertPoolIsLinear(pool); return (pool.props, pool.immediatelyUnlockingPart, pool.linear); } function poolState(uint256 poolIndex) public view returns (State memory state) { return _getPool(poolIndex).state; } function poolAccount(uint256 poolIndex, address address_) public view returns (Type type_, AccountState memory state) { Pool storage pool = _getPool(poolIndex); return (pool.type_, pool.accounts[address_].state); } function intervalPoolAccount(uint256 poolIndex, address address_) public view returns ( AccountState memory state, ComplexAccountState memory complex, uint256 unlockedIntervalsCount ) { Pool storage pool = _getPool(poolIndex); _assertPoolIsInterval(pool); Account storage account = pool.accounts[address_]; return (account.state, account.complex, account.unlockedIntervalsCount); } function linearPoolAccount(uint256 poolIndex, address address_) public view returns ( AccountState memory state, ComplexAccountState memory complex, uint256 immediatelyUnlockedAmount ) { Pool storage pool = _getPool(poolIndex); _assertPoolIsLinear(pool); Account storage account = pool.accounts[address_]; return (account.state, account.complex, account.immediatelyUnlockedAmount); } function collectedFees(IERC20 token) public view returns (uint256) { return _collectedFees[token]; } event AccountLimitChanged(uint256 indexed poolIndex, address indexed address_, uint256 indexed limitIndex); event FeeWithdrawn(address indexed token, uint256 amount); event ImmediatelyUnlockingPartUpdated(uint256 indexed poolIndex, uint256 mantissa); event IntervalCreated(uint256 indexed poolIndex, uint256 startsAt, uint256 unlockingPart); event IssuanceIncreased(uint256 indexed poolIndex, uint256 amount); event LinearUnlockingEndingTimestampUpdated(uint256 indexed poolIndex, uint256 timestamp); event LinearPoolUnlocking(uint256 indexed poolIndex, address indexed account, uint256 amount); event PaymentLimitCreated(uint256 indexed poolIndex, uint256 indexed limitIndex, uint256 limit); event PaymentLimitChanged(uint256 indexed poolIndex, uint256 indexed limitIndex, uint256 newLimit); event PaymentUnlocked(uint256 indexed poolIndex, uint256 unlockedAmount, uint256 collectedFee); event PaymentsWithdrawn(uint256 indexed poolIndex, uint256 amount); event PoolOwnerChanged(uint256 indexed poolIndex, address indexed newOwner); event PoolOwnerNominated(uint256 indexed poolIndex, address indexed nominatedOwner); event UnsoldWithdrawn(uint256 indexed poolIndex, uint256 amount); event PoolCreated( Type type_, IERC20 indexed paymentToken, IERC20 indexed issuanceToken, uint256 poolIndex, uint256 issuanceLimit, uint256 startsAt, uint256 endsAt, uint256 fee, uint256 rate, uint256 paymentLimit ); event Swap( uint256 indexed poolIndex, address indexed caller, uint256 requestedPaymentAmount, uint256 paymentAmount, uint256 issuanceAmount ); constructor(address owner_) public TwoStageOwnable(owner_) { return; } function createSimplePool( Props memory props, uint256 paymentLimit, address owner_ ) external onlyOwner returns (bool success, uint256 poolIndex) { return (true, _createSimplePool(props, paymentLimit, owner_, Type.SIMPLE).index); } function createIntervalPool( Props memory props, uint256 paymentLimit, address owner_, AttoDecimal.Instance memory immediatelyUnlockingPart, Interval[] memory intervals ) external onlyOwner returns (bool success, uint256 poolIndex) { Pool storage pool = _createSimplePool(props, paymentLimit, owner_, Type.INTERVAL); _setImmediatelyUnlockingPart(pool, immediatelyUnlockingPart); uint256 intervalsCount = intervals.length; AttoDecimal.Instance memory lastUnlockingPart = immediatelyUnlockingPart; uint256 lastIntervalStartingTimestamp = props.endsAt - 1; for (uint256 i = 0; i < intervalsCount; i++) { Interval memory interval = intervals[i]; require(interval.unlockingPart.gt(lastUnlockingPart), "Invalid interval unlocking part"); lastUnlockingPart = interval.unlockingPart; uint256 startingTimestamp = interval.startsAt; require(startingTimestamp > lastIntervalStartingTimestamp, "Invalid interval starting timestamp"); lastIntervalStartingTimestamp = startingTimestamp; pool.intervals.push(interval); emit IntervalCreated(poolIndex, interval.startsAt, interval.unlockingPart.mantissa); } require(lastUnlockingPart.eq(1), "Unlocking part not equal to one"); return (true, pool.index); } function createLinearPool( Props memory props, uint256 paymentLimit, address owner_, AttoDecimal.Instance memory immediatelyUnlockingPart, uint256 linearUnlockingEndsAt ) external onlyOwner returns (bool success, uint256 poolIndex) { require(linearUnlockingEndsAt > props.endsAt, "Linear unlocking less than or equal to pool ending timestamp"); Pool storage pool = _createSimplePool(props, paymentLimit, owner_, Type.LINEAR); _setImmediatelyUnlockingPart(pool, immediatelyUnlockingPart); pool.linear.endsAt = linearUnlockingEndsAt; pool.linear.duration = linearUnlockingEndsAt - props.endsAt; emit LinearUnlockingEndingTimestampUpdated(pool.index, linearUnlockingEndsAt); return (true, pool.index); } function increaseIssuance(uint256 poolIndex, uint256 amount) external returns (bool success) { require(amount > 0, "Amount is zero"); Pool storage pool = _getPool(poolIndex); require(getTimestamp() < pool.props.endsAt, "Pool ended"); address caller = msg.sender; _assertPoolOwnership(pool, caller); pool.state.issuance = pool.state.issuance.add(amount); require(pool.state.issuance <= pool.props.issuanceLimit, "Issuance limit exceeded"); pool.state.available = pool.state.available.add(amount); emit IssuanceIncreased(poolIndex, amount); pool.props.issuanceToken.safeTransferFrom(caller, address(this), amount); return true; } function swap(uint256 poolIndex, uint256 requestedPaymentAmount) external nonReentrant returns (uint256 paymentAmount, uint256 issuanceAmount) { require(requestedPaymentAmount > 0, "Requested payment amount is zero"); address caller = msg.sender; Pool storage pool = _getPool(poolIndex); uint256 timestamp = getTimestamp(); require(timestamp >= pool.props.startsAt, "Pool not started"); require(timestamp < pool.props.endsAt, "Pool ended"); require(pool.state.available > 0, "No available issuance"); (paymentAmount, issuanceAmount) = _calculateSwapAmounts(pool, requestedPaymentAmount, caller); Account storage account = pool.accounts[caller]; if (paymentAmount > 0) { pool.state.lockedPayments = pool.state.lockedPayments.add(paymentAmount); account.state.paymentSum = account.state.paymentSum.add(paymentAmount); pool.props.paymentToken.safeTransferFrom(caller, address(this), paymentAmount); } if (issuanceAmount > 0) { if (pool.type_ == Type.SIMPLE) pool.props.issuanceToken.safeTransfer(caller, issuanceAmount); else { uint256 totalIssuanceAmount = account.complex.issuanceAmount.add(issuanceAmount); account.complex.issuanceAmount = totalIssuanceAmount; uint256 newWithdrawnIssuanceAmount = pool.immediatelyUnlockingPart.mul(totalIssuanceAmount).floor(); uint256 issuanceToWithdraw = newWithdrawnIssuanceAmount - account.complex.withdrawnIssuanceAmount; account.complex.withdrawnIssuanceAmount = newWithdrawnIssuanceAmount; if (pool.type_ == Type.LINEAR) account.immediatelyUnlockedAmount = newWithdrawnIssuanceAmount; if (issuanceToWithdraw > 0) pool.props.issuanceToken.safeTransfer(caller, issuanceToWithdraw); } pool.state.available = pool.state.available.sub(issuanceAmount); } emit Swap(poolIndex, caller, requestedPaymentAmount, paymentAmount, issuanceAmount); } function unlockInterval(uint256 poolIndex, uint256 intervalIndex) external returns (uint256 withdrawnIssuanceAmount) { address caller = msg.sender; Pool storage pool = _getPool(poolIndex); _assertPoolIsInterval(pool); require(intervalIndex < pool.intervals.length, "Invalid interval index"); Interval storage interval = pool.intervals[intervalIndex]; require(interval.startsAt <= getTimestamp(), "Interval not started"); Account storage account = pool.accounts[caller]; require(intervalIndex >= account.unlockedIntervalsCount, "Already unlocked"); uint256 newWithdrawnIssuanceAmount = interval.unlockingPart.mul(account.complex.issuanceAmount).floor(); uint256 issuanceToWithdraw = newWithdrawnIssuanceAmount - account.complex.withdrawnIssuanceAmount; account.complex.withdrawnIssuanceAmount = newWithdrawnIssuanceAmount; if (issuanceToWithdraw > 0) pool.props.issuanceToken.safeTransfer(caller, issuanceToWithdraw); account.unlockedIntervalsCount = intervalIndex.add(1); return issuanceToWithdraw; } function unlockLinear(uint256 poolIndex) external returns (uint256 withdrawalAmount) { address caller = msg.sender; uint256 timestamp = getTimestamp(); Pool storage pool = _getPool(poolIndex); _assertPoolIsLinear(pool); require(pool.props.endsAt < timestamp, "Pool not ended"); Account storage account = pool.accounts[caller]; uint256 issuanceAmount = account.complex.issuanceAmount; require(account.complex.withdrawnIssuanceAmount < issuanceAmount, "All funds already unlocked"); uint256 passedTime = timestamp - pool.props.endsAt; uint256 freezedAmount = issuanceAmount.sub(account.immediatelyUnlockedAmount); uint256 unfreezedAmount = passedTime.mul(freezedAmount).div(pool.linear.duration); uint256 newWithdrawnIssuanceAmount = timestamp >= pool.linear.endsAt ? issuanceAmount : Math.min(account.immediatelyUnlockedAmount.add(unfreezedAmount), issuanceAmount); withdrawalAmount = newWithdrawnIssuanceAmount.sub(account.complex.withdrawnIssuanceAmount); if (withdrawalAmount > 0) { account.complex.withdrawnIssuanceAmount = newWithdrawnIssuanceAmount; emit LinearPoolUnlocking(pool.index, caller, withdrawalAmount); pool.props.issuanceToken.safeTransfer(caller, withdrawalAmount); } } function createPaymentLimit(uint256 poolIndex, uint256 limit) external returns (uint256 limitIndex) { Pool storage pool = _getPool(poolIndex); _assertPoolOwnership(pool, msg.sender); limitIndex = pool.state.paymentLimits.length; pool.state.paymentLimits.push(limit); emit PaymentLimitCreated(poolIndex, limitIndex, limit); } function changeLimit( uint256 poolIndex, uint256 limitIndex, uint256 newLimit ) external returns (bool success) { Pool storage pool = _getPool(poolIndex); _assertPoolOwnership(pool, msg.sender); _validateLimitIndex(pool, limitIndex); pool.state.paymentLimits[limitIndex] = newLimit; emit PaymentLimitChanged(poolIndex, limitIndex, newLimit); return true; } function setAccountsLimit( uint256 poolIndex, uint256 limitIndex, address[] memory accounts ) external returns (bool succcess) { Pool storage pool = _getPool(poolIndex); _assertPoolOwnership(pool, msg.sender); _validateLimitIndex(pool, limitIndex); uint256 accountsCount = accounts.length; require(accountsCount > 0, "No accounts provided"); for (uint256 i = 0; i < accountsCount; i++) { address account = accounts[i]; Account storage poolAccount_ = pool.accounts[account]; if (poolAccount_.state.limitIndex == limitIndex) continue; poolAccount_.state.limitIndex = limitIndex; emit AccountLimitChanged(poolIndex, account, limitIndex); } return true; } function withdrawPayments(uint256 poolIndex) external returns (bool success) { Pool storage pool = _getPool(poolIndex); address caller = msg.sender; _assertPoolOwnership(pool, caller); _unlockPayments(pool); uint256 collectedPayments = pool.state.unlockedPayments; require(collectedPayments > 0, "No collected payments"); pool.state.unlockedPayments = 0; emit PaymentsWithdrawn(poolIndex, collectedPayments); pool.props.paymentToken.safeTransfer(caller, collectedPayments); return true; } function withdrawUnsold(uint256 poolIndex) external returns (bool success) { Pool storage pool = _getPool(poolIndex); address caller = msg.sender; _assertPoolOwnership(pool, caller); require(getTimestamp() >= pool.props.endsAt, "Not ended"); uint256 amount = pool.state.available; require(amount > 0, "No unsold"); pool.state.available = 0; emit UnsoldWithdrawn(poolIndex, amount); pool.props.issuanceToken.safeTransfer(caller, amount); return true; } function collectFee(uint256 poolIndex) external onlyOwner returns (bool success) { _unlockPayments(_getPool(poolIndex)); return true; } function withdrawFee(IERC20 token) external onlyOwner returns (bool success) { uint256 collectedFee = _collectedFees[token]; require(collectedFee > 0, "No collected fees"); _collectedFees[token] = 0; emit FeeWithdrawn(address(token), collectedFee); token.safeTransfer(owner(), collectedFee); return true; } function nominateNewPoolOwner(uint256 poolIndex, address nominatedOwner_) external returns (bool success) { Pool storage pool = _getPool(poolIndex); _assertPoolOwnership(pool, msg.sender); require(nominatedOwner_ != pool.state.owner, "Already owner"); if (pool.state.nominatedOwner == nominatedOwner_) return true; pool.state.nominatedOwner = nominatedOwner_; emit PoolOwnerNominated(poolIndex, nominatedOwner_); return true; } function acceptPoolOwnership(uint256 poolIndex) external returns (bool success) { Pool storage pool = _getPool(poolIndex); address caller = msg.sender; require(pool.state.nominatedOwner == caller, "Not nominated to pool ownership"); pool.state.owner = caller; pool.state.nominatedOwner = address(0); emit PoolOwnerChanged(poolIndex, caller); return true; } function _assertPoolIsInterval(Pool storage pool) private view { require(pool.type_ == Type.INTERVAL, "Not interval pool"); } function _assertPoolIsLinear(Pool storage pool) private view { require(pool.type_ == Type.LINEAR, "Not linear pool"); } function _assertPoolOwnership(Pool storage pool, address account) private view { require(account == pool.state.owner, "Permission denied"); } function _calculateSwapAmounts( Pool storage pool, uint256 requestedPaymentAmount, address account ) private view returns (uint256 paymentAmount, uint256 issuanceAmount) { paymentAmount = requestedPaymentAmount; Account storage poolAccount_ = pool.accounts[account]; uint256 paymentLimit = pool.state.paymentLimits[poolAccount_.state.limitIndex]; require(poolAccount_.state.paymentSum < paymentLimit, "Account payment limit exceeded"); if (poolAccount_.state.paymentSum.add(paymentAmount) > paymentLimit) { paymentAmount = paymentLimit.sub(poolAccount_.state.paymentSum); } issuanceAmount = pool.props.rate.mul(paymentAmount).floor(); if (issuanceAmount > pool.state.available) { issuanceAmount = pool.state.available; paymentAmount = AttoDecimal.div(issuanceAmount, pool.props.rate).ceil(); } } function _getPool(uint256 index) private view returns (Pool storage) { require(index < _pools.length, "Pool not found"); return _pools[index]; } function _validateLimitIndex(Pool storage pool, uint256 limitIndex) private view { require(limitIndex < pool.state.paymentLimits.length, "Limit not found"); } function _createSimplePool( Props memory props, uint256 paymentLimit, address owner_, Type type_ ) private returns (Pool storage) { { uint256 timestamp = getTimestamp(); if (props.startsAt < timestamp) props.startsAt = timestamp; require(props.fee.lt(100), "Fee gte 100%"); require(props.startsAt < props.endsAt, "Invalid ending timestamp"); } uint256 poolIndex = _pools.length; _pools.push(); Pool storage pool = _pools[poolIndex]; pool.index = poolIndex; pool.type_ = type_; pool.props = props; pool.state.paymentLimits = new uint256[](1); pool.state.paymentLimits[0] = paymentLimit; pool.state.owner = owner_; emit PoolCreated( type_, props.paymentToken, props.issuanceToken, poolIndex, props.issuanceLimit, props.startsAt, props.endsAt, props.fee.mantissa, props.rate.mantissa, paymentLimit ); emit PoolOwnerChanged(poolIndex, owner_); return pool; } function _setImmediatelyUnlockingPart(Pool storage pool, AttoDecimal.Instance memory immediatelyUnlockingPart) private { require(immediatelyUnlockingPart.lt(1), "Invalid immediately unlocking part value"); pool.immediatelyUnlockingPart = immediatelyUnlockingPart; emit ImmediatelyUnlockingPartUpdated(pool.index, immediatelyUnlockingPart.mantissa); } function _unlockPayments(Pool storage pool) private { if (pool.state.lockedPayments == 0) return; uint256 fee = pool.props.fee.mul(pool.state.lockedPayments).ceil(); _collectedFees[pool.props.paymentToken] = _collectedFees[pool.props.paymentToken].add(fee); uint256 unlockedAmount = pool.state.lockedPayments.sub(fee); pool.state.unlockedPayments = pool.state.unlockedPayments.add(unlockedAmount); pool.state.lockedPayments = 0; emit PaymentUnlocked(pool.index, unlockedAmount, fee); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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 <0.8.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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `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 <0.8.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 <0.8.0; /** * @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 on 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"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { 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 <0.8.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]. */ abstract 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.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); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":true,"internalType":"address","name":"address_","type":"address"},{"indexed":true,"internalType":"uint256","name":"limitIndex","type":"uint256"}],"name":"AccountLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mantissa","type":"uint256"}],"name":"ImmediatelyUnlockingPartUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startsAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unlockingPart","type":"uint256"}],"name":"IntervalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"IssuanceIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LinearPoolUnlocking","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"LinearUnlockingEndingTimestampUpdated","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":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"limitIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"PaymentLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"limitIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"PaymentLimitCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"collectedFee","type":"uint256"}],"name":"PaymentUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum FixedSwap.Type","name":"type_","type":"uint8"},{"indexed":true,"internalType":"contract IERC20","name":"paymentToken","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"issuanceToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"issuanceLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startsAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endsAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paymentLimit","type":"uint256"}],"name":"PoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"PoolOwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":true,"internalType":"address","name":"nominatedOwner","type":"address"}],"name":"PoolOwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestedPaymentAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paymentAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"issuanceAmount","type":"uint256"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnsoldWithdrawn","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"acceptPoolOwnership","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"uint256","name":"limitIndex","type":"uint256"},{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"changeLimit","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"collectFee","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"collectedFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"issuanceLimit","type":"uint256"},{"internalType":"uint256","name":"startsAt","type":"uint256"},{"internalType":"uint256","name":"endsAt","type":"uint256"},{"internalType":"contract IERC20","name":"paymentToken","type":"address"},{"internalType":"contract IERC20","name":"issuanceToken","type":"address"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"fee","type":"tuple"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"rate","type":"tuple"}],"internalType":"struct FixedSwap.Props","name":"props","type":"tuple"},{"internalType":"uint256","name":"paymentLimit","type":"uint256"},{"internalType":"address","name":"owner_","type":"address"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"immediatelyUnlockingPart","type":"tuple"},{"components":[{"internalType":"uint256","name":"startsAt","type":"uint256"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"unlockingPart","type":"tuple"}],"internalType":"struct FixedSwap.Interval[]","name":"intervals","type":"tuple[]"}],"name":"createIntervalPool","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"issuanceLimit","type":"uint256"},{"internalType":"uint256","name":"startsAt","type":"uint256"},{"internalType":"uint256","name":"endsAt","type":"uint256"},{"internalType":"contract IERC20","name":"paymentToken","type":"address"},{"internalType":"contract IERC20","name":"issuanceToken","type":"address"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"fee","type":"tuple"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"rate","type":"tuple"}],"internalType":"struct FixedSwap.Props","name":"props","type":"tuple"},{"internalType":"uint256","name":"paymentLimit","type":"uint256"},{"internalType":"address","name":"owner_","type":"address"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"immediatelyUnlockingPart","type":"tuple"},{"internalType":"uint256","name":"linearUnlockingEndsAt","type":"uint256"}],"name":"createLinearPool","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"createPaymentLimit","outputs":[{"internalType":"uint256","name":"limitIndex","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"issuanceLimit","type":"uint256"},{"internalType":"uint256","name":"startsAt","type":"uint256"},{"internalType":"uint256","name":"endsAt","type":"uint256"},{"internalType":"contract IERC20","name":"paymentToken","type":"address"},{"internalType":"contract IERC20","name":"issuanceToken","type":"address"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"fee","type":"tuple"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"rate","type":"tuple"}],"internalType":"struct FixedSwap.Props","name":"props","type":"tuple"},{"internalType":"uint256","name":"paymentLimit","type":"uint256"},{"internalType":"address","name":"owner_","type":"address"}],"name":"createSimplePool","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"increaseIssuance","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"address","name":"address_","type":"address"}],"name":"intervalPoolAccount","outputs":[{"components":[{"internalType":"uint256","name":"limitIndex","type":"uint256"},{"internalType":"uint256","name":"paymentSum","type":"uint256"}],"internalType":"struct FixedSwap.AccountState","name":"state","type":"tuple"},{"components":[{"internalType":"uint256","name":"issuanceAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawnIssuanceAmount","type":"uint256"}],"internalType":"struct FixedSwap.ComplexAccountState","name":"complex","type":"tuple"},{"internalType":"uint256","name":"unlockedIntervalsCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"intervalPoolProps","outputs":[{"components":[{"internalType":"uint256","name":"issuanceLimit","type":"uint256"},{"internalType":"uint256","name":"startsAt","type":"uint256"},{"internalType":"uint256","name":"endsAt","type":"uint256"},{"internalType":"contract IERC20","name":"paymentToken","type":"address"},{"internalType":"contract IERC20","name":"issuanceToken","type":"address"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"fee","type":"tuple"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"rate","type":"tuple"}],"internalType":"struct FixedSwap.Props","name":"props","type":"tuple"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"immediatelyUnlockingPart","type":"tuple"},{"components":[{"internalType":"uint256","name":"startsAt","type":"uint256"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"unlockingPart","type":"tuple"}],"internalType":"struct FixedSwap.Interval[]","name":"intervals","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"address","name":"address_","type":"address"}],"name":"linearPoolAccount","outputs":[{"components":[{"internalType":"uint256","name":"limitIndex","type":"uint256"},{"internalType":"uint256","name":"paymentSum","type":"uint256"}],"internalType":"struct FixedSwap.AccountState","name":"state","type":"tuple"},{"components":[{"internalType":"uint256","name":"issuanceAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawnIssuanceAmount","type":"uint256"}],"internalType":"struct FixedSwap.ComplexAccountState","name":"complex","type":"tuple"},{"internalType":"uint256","name":"immediatelyUnlockedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"linearPoolProps","outputs":[{"components":[{"internalType":"uint256","name":"issuanceLimit","type":"uint256"},{"internalType":"uint256","name":"startsAt","type":"uint256"},{"internalType":"uint256","name":"endsAt","type":"uint256"},{"internalType":"contract IERC20","name":"paymentToken","type":"address"},{"internalType":"contract IERC20","name":"issuanceToken","type":"address"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"fee","type":"tuple"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"rate","type":"tuple"}],"internalType":"struct FixedSwap.Props","name":"props","type":"tuple"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"immediatelyUnlockingPart","type":"tuple"},{"components":[{"internalType":"uint256","name":"endsAt","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"internalType":"struct FixedSwap.LinearProps","name":"linear","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":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"address","name":"nominatedOwner_","type":"address"}],"name":"nominateNewPoolOwner","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":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"address","name":"address_","type":"address"}],"name":"poolAccount","outputs":[{"internalType":"enum FixedSwap.Type","name":"type_","type":"uint8"},{"components":[{"internalType":"uint256","name":"limitIndex","type":"uint256"},{"internalType":"uint256","name":"paymentSum","type":"uint256"}],"internalType":"struct FixedSwap.AccountState","name":"state","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"poolProps","outputs":[{"internalType":"enum FixedSwap.Type","name":"type_","type":"uint8"},{"components":[{"internalType":"uint256","name":"issuanceLimit","type":"uint256"},{"internalType":"uint256","name":"startsAt","type":"uint256"},{"internalType":"uint256","name":"endsAt","type":"uint256"},{"internalType":"contract IERC20","name":"paymentToken","type":"address"},{"internalType":"contract IERC20","name":"issuanceToken","type":"address"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"fee","type":"tuple"},{"components":[{"internalType":"uint256","name":"mantissa","type":"uint256"}],"internalType":"struct AttoDecimal.Instance","name":"rate","type":"tuple"}],"internalType":"struct FixedSwap.Props","name":"props","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"poolState","outputs":[{"components":[{"internalType":"uint256","name":"available","type":"uint256"},{"internalType":"uint256","name":"issuance","type":"uint256"},{"internalType":"uint256","name":"lockedPayments","type":"uint256"},{"internalType":"uint256","name":"unlockedPayments","type":"uint256"},{"internalType":"address","name":"nominatedOwner","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"paymentLimits","type":"uint256[]"}],"internalType":"struct FixedSwap.State","name":"state","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"uint256","name":"limitIndex","type":"uint256"},{"internalType":"address[]","name":"accounts","type":"address[]"}],"name":"setAccountsLimit","outputs":[{"internalType":"bool","name":"succcess","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"uint256","name":"requestedPaymentAmount","type":"uint256"}],"name":"swap","outputs":[{"internalType":"uint256","name":"paymentAmount","type":"uint256"},{"internalType":"uint256","name":"issuanceAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"uint256","name":"intervalIndex","type":"uint256"}],"name":"unlockInterval","outputs":[{"internalType":"uint256","name":"withdrawnIssuanceAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"unlockLinear","outputs":[{"internalType":"uint256","name":"withdrawalAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawFee","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"withdrawPayments","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"withdrawUnsold","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620035d0380380620035d08339810160408190526200003491620000f1565b6001600055806001600160a01b0381166200006c5760405162461bcd60e51b8152600401620000639062000121565b60405180910390fd5b62000077816200007f565b505062000148565b6002546001600160a01b03828116911614156200009c57620000ee565b600280546001600160a01b0383166001600160a01b031991821681179092556001805490911690556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3690600090a25b50565b60006020828403121562000103578081fd5b81516001600160a01b03811681146200011a578182fd5b9392505050565b6020808252600d908201526c4f776e6572206973207a65726f60981b604082015260600190565b61347880620001586000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638da5cb5b11610104578063bcde0451116100a2578063e43b156011610071578063e43b156014610417578063ee90ac8214610438578063f63d8d321461044b578063f6f94e2c1461045e576101cf565b8063bcde0451146103ae578063beaa1176146103c1578063ceec13ff146103d4578063d96073cf146103f6576101cf565b8063a90101fb116100de578063a90101fb14610362578063a969ff0a14610375578063ae4ff9dc14610388578063b333ad871461039b576101cf565b80638da5cb5b1461032657806398ecde321461032e5780639a419e2e1461034f576101cf565b806344e4b97b116101715780636ccc56cd1161014b5780636ccc56cd146102e357806376d6ffa11461030357806379ba5097146103165780638c788de01461031e576101cf565b806344e4b97b1461029a57806346f75858146102bb57806353a47bb7146102ce576101cf565b80631cead9a7116101ad5780631cead9a71461023257806323fc3136146102525780632f9afafc1461026557806341975af814610287576101cf565b8063059332ec146101d45780631627540c146101ff5780631ac3ddeb1461021f575b600080fd5b6101e76101e236600461276a565b610471565b6040516101f6939291906132bb565b60405180910390f35b61021261020d366004612584565b61053f565b6040516101f69190612982565b61021261022d366004612584565b610587565b610245610240366004612584565b610662565b6040516101f69190613382565b6102126102603660046127d2565b61067d565b61027861027336600461276a565b610767565b6040516101f69392919061324f565b61021261029536600461276a565b61088e565b6102ad6102a836600461270e565b610937565b6040516101f692919061298d565b6102126102c936600461276a565b610a08565b6102d6610aa6565b6040516101f69190612931565b6102f66102f136600461276a565b610ab5565b6040516101f691906132df565b61024561031136600461276a565b610b79565b610212610d02565b610245610d4a565b6102d6610d50565b61034161033c36600461276a565b610d5f565b6040516101f69291906129bb565b61024561035d3660046127b1565b610df3565b610212610370366004612782565b610e6c565b61021261038336600461276a565b610f2d565b61021261039636600461276a565b610f6b565b6102126103a93660046127b1565b61102b565b6102ad6103bc366004612602565b611130565b6102ad6103cf3660046125c0565b6112cb565b6103e76103e2366004612782565b611319565b6040516101f693929190613226565b6104096104043660046127b1565b6113a2565b6040516101f692919061338b565b61042a610425366004612782565b61161e565b6040516101f692919061299d565b61021261044636600461287f565b611677565b6103e7610459366004612782565b6116fe565b61024561046c3660046127b1565b611787565b61047961237f565b6104816123d9565b6104896123ec565b6000610494856118be565b905061049f81611904565b6040805160e08101825260038301548152600483015460208083019190915260058401548284015260068401546001600160a01b0390811660608401526007850154166080830152825180820184526008850154815260a0830152825180820184526009850154815260c083015282518082018452600285015481528351808501909452600a8501548452600b9094015490830152969195509350915050565b6002546000906001600160a01b031633146105755760405162461bcd60e51b815260040161056c9061300d565b60405180910390fd5b61057e82611936565b5060015b919050565b6002546000906001600160a01b031633146105b45760405162461bcd60e51b815260040161056c9061300d565b6001600160a01b038216600090815260046020526040902054806105ea5760405162461bcd60e51b815260040161056c90612fe2565b6001600160a01b03831660008181526004602052604080822091909155517f78473f3f373f7673597f4f0fa5873cb4d375fea6d4339ad6b56dbd411513cb3f90610635908490613382565b60405180910390a2610659610648610d50565b6001600160a01b03851690836119c9565b50600192915050565b6001600160a01b031660009081526004602052604090205490565b600080610689856118be565b90506106958133611a24565b61069f8185611a57565b8251806106be5760405162461bcd60e51b815260040161056c90612a87565b60005b818110156107585760008582815181106106d757fe5b6020908102919091018101516001600160a01b0381166000908152601487019092526040909120805491925090881415610712575050610750565b87815560405188906001600160a01b038416908b907fd98eb3f94d757b6a35fcfb91cf696b9bc1a78ec87a7378e0b0429bc21386bb3b90600090a450505b6001016106c1565b506001925050505b9392505050565b61076f61237f565b6107776123d9565b60606000610784856118be565b905061078f81611a7a565b6040805160e08101825260038301548152600483015460208083019190915260058401548284015260068401546001600160a01b0390811660608401526007850154166080830152825180820184526008850154815260a0830152825180820184526009850154815260c0830152825180820184526002850154815260138501805485518185028101850190965280865293949193909283919060009084015b8282101561087a57600084815260209081902060408051808201825260028602909201805483528151808501909252600190810154825282840191909152908352909201910161082f565b505050509050935093509350509193909250565b60008061089a836118be565b9050336108a78282611a24565b6108b082611aa9565b600f820154806108d25760405162461bcd60e51b815260040161056c90612bc3565b6000600f84015560405185907fa21048fafbb2c049d83f70c98e05b976cf8f1e5f767ef698a6fdb1e7444c28289061090b908490613382565b60405180910390a2600683015461092c906001600160a01b031683836119c9565b506001949350505050565b60025460009081906001600160a01b031633146109665760405162461bcd60e51b815260040161056c9061300d565b866040015183116109895760405162461bcd60e51b815260040161056c90612cf6565b60006109988888886002611b9e565b90506109a48186611e0f565b600a81018490556040808901518503600b830155600182015490517f09fff9e1458ed4445723dc13dc4b99f6ae814f666b62ac4d767dd5b942744943906109ec908790613382565b60405180910390a2600190810154909890975095505050505050565b600080610a14836118be565b601081015490915033906001600160a01b03168114610a455760405162461bcd60e51b815260040161056c90612b8c565b6011820180546001600160a01b0383166001600160a01b03199182168117909255601084018054909116905560405185907f1db9920ce261cf5299c96ab18ed9969b1b467e3ac5f5e7a33656d6471495cf0790600090a35060019392505050565b6001546001600160a01b031690565b610abd612406565b610ac6826118be565b6040805160e081018252600c830180548252600d840154602080840191909152600e85015483850152600f850154606084015260108501546001600160a01b03908116608085015260118601541660a0840152601290940180548451818702810187019095528085529294919360c08601939092830182828015610b6957602002820191906000526020600020905b815481526020019060010190808311610b55575b5050505050815250509050919050565b60003381610b85611e81565b90506000610b92856118be565b9050610b9d81611904565b60058101548211610bc05760405162461bcd60e51b815260040161056c90612e3b565b6001600160a01b03831660009081526014820160205260409020600281015460038201548111610c025760405162461bcd60e51b815260040161056c90612fab565b6005830154600483015490850390600090610c1e908490611e85565b600b860154909150600090610c3d90610c378585611ead565b90611ee7565b9050600086600a0160000154881015610c6e576004860154610c6990610c639084611f19565b86611f3e565b610c70565b845b6003870154909150610c83908290611e85565b99508915610cf4576003860181905560018701546040516001600160a01b038b1691907f238e86f4971c795f36cd7b184dc9e65155fad7d6cf7dc94da2ced659781b653c90610cd3908e90613382565b60405180910390a36007870154610cf4906001600160a01b03168a8c6119c9565b505050505050505050919050565b6001546000906001600160a01b03163314610d2f5760405162461bcd60e51b815260040161056c90612f74565b600154610d44906001600160a01b0316611f54565b50600190565b60035490565b6002546001600160a01b031690565b6000610d6961237f565b6000610d74846118be565b80546040805160e08101825260038401548152600484015460208083019190915260058501548284015260068501546001600160a01b0390811660608401526007860154166080830152825180820184526008860154815260a08301528251908101909252600990930154815260c083015260ff169350915050915091565b600080610dff846118be565b9050610e0b8133611a24565b601281018054600181018255600091825260209091208101849055604051909250829085907f123042b7c2ada7097e3ab9d05b9dd5b54bab274a5690d2e16a2316f6e274844a90610e5d908790613382565b60405180910390a35092915050565b600080610e78846118be565b9050610e848133611a24565b60118101546001600160a01b0384811691161415610eb45760405162461bcd60e51b815260040161056c90612f1f565b60108101546001600160a01b0384811691161415610ed6576001915050610f27565b6010810180546001600160a01b0319166001600160a01b03851690811790915560405185907fceff235f9d95a8aba06f4cf159261832d21ce128a9e450e75c5f32faeb2df8e290600090a360019150505b92915050565b6002546000906001600160a01b03163314610f5a5760405162461bcd60e51b815260040161056c9061300d565b61057e610f66836118be565b611aa9565b600080610f77836118be565b905033610f848282611a24565b6005820154610f91611e81565b1015610faf5760405162461bcd60e51b815260040161056c90613053565b600c82015480610fd15760405162461bcd60e51b815260040161056c90613030565b6000600c84015560405185907f4caa9523353802828989b84b2bb248c625aeb6d44999cd9ba0fe7e15711f3db79061100a908490613382565b60405180910390a2600783015461092c906001600160a01b031683836119c9565b600080821161104c5760405162461bcd60e51b815260040161056c90612e8d565b6000611057846118be565b6005810154909150611067611e81565b106110845760405162461bcd60e51b815260040161056c90612e17565b3361108f8282611a24565b600d82015461109e9085611f19565b600d8301819055600383015410156110c85760405162461bcd60e51b815260040161056c90612c88565b600c8201546110d79085611f19565b600c83015560405185907f4ef8678904704bdf752e12cfb17a926ce33dcaf9077e565fb660cfe644ed22649061110e908790613382565b60405180910390a2600782015461092c906001600160a01b0316823087611fc3565b60025460009081906001600160a01b0316331461115f5760405162461bcd60e51b815260040161056c9061300d565b600061116e8888886001611b9e565b905061117a8186611e0f565b83516111846123d9565b50604089015186906000190160005b8381101561128c576111a3612455565b8882815181106111af57fe5b602002602001015190506111d0848260200151611fea90919063ffffffff16565b6111ec5760405162461bcd60e51b815260040161056c90612a50565b602081015181519094508381116112155760405162461bcd60e51b815260040161056c90612adb565b60138701805460018181018355600092835260209283902085516002909302018281559285015151920182905560405192955085928a927f9ad21f79ce9c3c640f4c7e4d5cccb24f33967153042855c93f33f9cb457b70959261127a9290919061338b565b60405180910390a25050600101611193565b50611298826001611ff1565b6112b45760405162461bcd60e51b815260040161056c90612c51565b505050600190810154909890975095505050505050565b60025460009081906001600160a01b031633146112fa5760405162461bcd60e51b815260040161056c9061300d565b60016113098686866000611b9e565b6001015491509150935093915050565b6113216123ec565b6113296123ec565b600080611335866118be565b905061134081611904565b6001600160a01b0385166000908152601490910160209081526040918290206004810154835180850185528254815260018301548185015284518086019095526002830154855260039092015492840192909252945090925090509250925092565b600080600260005414156113c85760405162461bcd60e51b815260040161056c9061314f565b6002600055826113ea5760405162461bcd60e51b815260040161056c90612bf2565b3360006113f6866118be565b90506000611402611e81565b60048301549091508110156114295760405162461bcd60e51b815260040161056c90612c27565b6005820154811061144c5760405162461bcd60e51b815260040161056c90612e17565b600c82015461146d5760405162461bcd60e51b815260040161056c906130ad565b61147882878561202f565b6001600160a01b03851660009081526014850160205260409020919650945085156114df57600e8301546114ac9087611f19565b600e84015560018101546114c09087611f19565b600182015560068301546114df906001600160a01b0316853089611fc3565b84156115c6576000835460ff1660028111156114f757fe5b141561151b576007830154611516906001600160a01b031685876119c9565b6115b1565b600281015460009061152d9087611f19565b6002808401829055604080516020810190915290860154815290915060009061155f9061155a9084612122565b61214c565b6003840180549082905590915081036002865460ff16600281111561158057fe5b141561158e57600484018290555b80156115ad5760078601546115ad906001600160a01b031688836119c9565b5050505b600c8301546115c09086611e85565b600c8401555b836001600160a01b0316887f7d421bbd3ba855339632fdd240923952de83fd611d837a284506157b596f493289898960405161160493929190613399565b60405180910390a350506001600055509194909350915050565b60006116286123ec565b6000611633856118be565b80546001600160a01b038616600090815260149092016020908152604092839020835180850190945280548452600101549083015260ff1693509150509250929050565b600080611683856118be565b905061168f8133611a24565b6116998185611a57565b8281600c0160060185815481106116ac57fe5b906000526020600020018190555083857fc128898667140122862a239400b6468386a01fb68fe432ebe587a84166d241ad856040516116eb9190613382565b60405180910390a3506001949350505050565b6117066123ec565b61170e6123ec565b60008061171a866118be565b905061172581611a7a565b6001600160a01b0385166000908152601490910160209081526040918290206005810154835180850185528254815260018301548185015284518086019095526002830154855260039092015492840192909252945090925090509250925092565b60003381611794856118be565b905061179f81611a7a565b601381015484106117c25760405162461bcd60e51b815260040161056c90613186565b60008160130185815481106117d357fe5b906000526020600020906002020190506117eb611e81565b8154111561180b5760405162461bcd60e51b815260040161056c90612f46565b6001600160a01b0383166000908152601483016020526040902060058101548610156118495760405162461bcd60e51b815260040161056c90612e63565b60028101546040805160208101909152600184015481526000916118709161155a91612122565b600383018054908290559091508103801561189e57600785015461189e906001600160a01b031687836119c9565b6118a9886001611f19565b60059093019290925550935050505092915050565b60035460009082106118e25760405162461bcd60e51b815260040161056c906131fe565b600382815481106118ef57fe5b90600052602060002090601502019050919050565b6002815460ff16600281111561191657fe5b146119335760405162461bcd60e51b815260040161056c90612eb5565b50565b6001546001600160a01b038281169116141561195157611933565b6002546001600160a01b038281169116141561197f5760405162461bcd60e51b815260040161056c90612f1f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b611a1f8363a9059cbb60e01b84846040516024016119e8929190612969565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261215b565b505050565b60118201546001600160a01b03828116911614611a535760405162461bcd60e51b815260040161056c90612dec565b5050565b60128201548110611a535760405162461bcd60e51b815260040161056c90613126565b6001815460ff166002811115611a8c57fe5b146119335760405162461bcd60e51b815260040161056c90612d53565b600e810154611ab757611933565b600e810154604080516020810190915260088301548152600091611ae391611ade91612122565b6121ea565b60068301546001600160a01b0316600090815260046020526040902054909150611b0d9082611f19565b60068301546001600160a01b0316600090815260046020526040812091909155600e830154611b3c9083611e85565b600f840154909150611b4e9082611f19565b600f8401556000600e84015560018301546040517f969043bab89ac5dd319ed2e1356119888d1624898734ac8516a120bea7fb426090611b91908490869061338b565b60405180910390a2505050565b600080611ba9611e81565b90508086602001511015611bbf57602086018190525b60a0860151611bcf906064612224565b611beb5760405162461bcd60e51b815260040161056c90612ab5565b8560400151866020015110611c125760405162461bcd60e51b815260040161056c90612db5565b506003805460018101808355600083815291929083908110611c3057fe5b60009182526020909120600160159092020181810184905580549092508591839160ff191690836002811115611c6257fe5b0217905550865160038201556020808801516004830155604080890151600584015560608901516006840180546001600160a01b039283166001600160a01b03199182161790915560808b015160078601805491909316911617905560a089015151600884015560c08901515160098401558051600180825281830190925291828101908036833750508151611d01926012850192506020019061246f565b508581600c01600601600081548110611d1657fe5b90600052602060002001819055508481600c0160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555086608001516001600160a01b031687606001516001600160a01b03167f6d0a80f2ee73de8861b1887eb263d606bb9e1b85beff2d71b45b913b0f9aed3186858b600001518c602001518d604001518e60a00151600001518f60c00151600001518f604051611dc59897969594939291906129d8565b60405180910390a36040516001600160a01b0386169083907f1db9920ce261cf5299c96ab18ed9969b1b467e3ac5f5e7a33656d6471495cf0790600090a39150505b949350505050565b611e1a816001612224565b611e365760405162461bcd60e51b815260040161056c906131b6565b805160028301819055600183015460405190917f4b934b79ea913cbf45273ed2d6516ef75fd53b22d460b29bfc3627bdda76103f91611e759190613382565b60405180910390a25050565b4290565b600082821115611ea75760405162461bcd60e51b815260040161056c90612cbf565b50900390565b600082611ebc57506000610f27565b82820282848281611ec957fe5b04146107605760405162461bcd60e51b815260040161056c90612ede565b6000808211611f085760405162461bcd60e51b815260040161056c90612d7e565b818381611f1157fe5b049392505050565b6000828201838110156107605760405162461bcd60e51b815260040161056c90612b55565b6000818310611f4d5781610760565b5090919050565b6002546001600160a01b0382811691161415611f6f57611933565b600280546001600160a01b0383166001600160a01b031991821681179092556001805490911690556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3690600090a250565b611fe4846323b872dd60e01b8585856040516024016119e893929190612945565b50505050565b5190511190565b60007812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f2182111561201c57506000610f27565b509051670de0b6b3a76400009091021490565b6001600160a01b03811660009081526014840160205260408120805460128601805486949392849291811061206057fe5b90600052602060002001549050808260000160010154106120935760405162461bcd60e51b815260040161056c90612b1e565b600182015481906120a49086611f19565b11156120bd5760018201546120ba908290611e85565b93505b6040805160208101909152600988015481526120dd9061155a9086612122565b600c88015490935083111561211857600c87015460408051602081019091526009890154815290935061211590611ade908590612262565b93505b5050935093915050565b61212a6123d9565b6040805160208101909152835181906121439085611ead565b90529392505050565b51670de0b6b3a7640000900490565b60606121b0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166122969092919063ffffffff16565b805190915015611a1f57808060200190518101906121ce91906125a0565b611a1f5760405162461bcd60e51b815260040161056c906130dc565b8051600090670de0b6b3a76400009006612205576000612208565b60015b60ff166012600a0a83600001518161221c57fe5b040192915050565b60007812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f2182111561224f57506001610f27565b509051670de0b6b3a76400009091021190565b61226a6123d9565b60408051602081019091528251819061214390610c37876ec097ce7bc90715b34b9f1000000000611ead565b6060611e078484600085856122aa85612340565b6122c65760405162461bcd60e51b815260040161056c90613076565b60006060866001600160a01b031685876040516122e39190612915565b60006040518083038185875af1925050503d8060008114612320576040519150601f19603f3d011682016040523d82523d6000602084013e612325565b606091505b5091509150612335828286612346565b979650505050505050565b3b151590565b60608315612355575081610760565b8251156123655782518084602001fd5b8160405162461bcd60e51b815260040161056c9190612a1d565b6040518060e0016040528060008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016123c76123d9565b81526020016123d46123d9565b905290565b6040518060200160405280600081525090565b604051806040016040528060008152602001600081525090565b6040518060e001604052806000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001606081525090565b6040518060400160405280600081526020016123d46123d9565b8280548282559060005260206000209081019282156124aa579160200282015b828111156124aa57825182559160200191906001019061248f565b506124b69291506124ba565b5090565b5b808211156124b657600081556001016124bb565b8035610f278161342d565b6000602082840312156124eb578081fd5b6124f560206133af565b9135825250919050565b600060e08284031215612510578081fd5b61251a60e06133af565b905081358152602082013560208201526040820135604082015260608201356125428161342d565b606082015260808201356125558161342d565b60808201526125678360a084016124da565b60a08201526125798360c084016124da565b60c082015292915050565b600060208284031215612595578081fd5b81356107608161342d565b6000602082840312156125b1578081fd5b81518015158114610760578182fd5b600080600061012084860312156125d5578182fd5b6125df85856124ff565b925060e084013591506101008401356125f78161342d565b809150509250925092565b6000806000806000610160868803121561261a578081fd5b61262487876124ff565b945060e0860135935061010086013561263c8161342d565b925061264c8761012088016124da565b915061014086013567ffffffffffffffff811115612668578182fd5b8601601f81018813612678578182fd5b803561268b612686826133d6565b6133af565b808282526020808301925080850160408d8382880289010111156126ad578788fd5b8796505b858710156126fa5780828f0312156126c7578788fd5b6126d0816133af565b823581526126e08f8585016124da565b8185015285526001969096019593820193908101906126b1565b505050809450505050509295509295909350565b60008060008060006101608688031215612726578081fd5b61273087876124ff565b945060e086013593506101008601356127488161342d565b92506127588761012088016124da565b94979396509194610140013592915050565b60006020828403121561277b578081fd5b5035919050565b60008060408385031215612794578182fd5b8235915060208301356127a68161342d565b809150509250929050565b600080604083850312156127c3578182fd5b50508035926020909101359150565b6000806000606084860312156127e6578283fd5b833592506020808501359250604085013567ffffffffffffffff81111561280b578283fd5b8501601f8101871361281b578283fd5b8035612829612686826133d6565b81815283810190838501858402850186018b1015612845578687fd5b8694505b8385101561286f5761285b8b826124cf565b835260019490940193918501918501612849565b5080955050505050509250925092565b600080600060608486031215612893578081fd5b505081359360208301359350604090920135919050565b815260200190565b80518252602090810151910152565b805182526020810151602083015260408101516040830152606081015160018060a01b038082166060850152806080840151166080850152505060a08101515160a083015260c08101515160c08301525050565b60008251612927818460208701613401565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9115158252602082015260400190565b60608101600384106129ab57fe5b83825261076060208301846128b2565b61010081016129c9846133f6565b825261076060208301846128c1565b61010081016129e68a6133f6565b8252602082019890985260408101969096526060860194909452608085019290925260a084015260c083015260e090910152919050565b6000602082528251806020840152612a3c816040850160208701613401565b601f01601f19169190910160400192915050565b6020808252601f908201527f496e76616c696420696e74657276616c20756e6c6f636b696e67207061727400604082015260600190565b602080825260149082015273139bc81858d8dbdd5b9d1cc81c1c9bdd9a59195960621b604082015260600190565b6020808252600c908201526b46656520677465203130302560a01b604082015260600190565b60208082526023908201527f496e76616c696420696e74657276616c207374617274696e672074696d6573746040820152620616d760ec1b606082015260800190565b6020808252601e908201527f4163636f756e74207061796d656e74206c696d69742065786365656465640000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601f908201527f4e6f74206e6f6d696e6174656420746f20706f6f6c206f776e65727368697000604082015260600190565b6020808252601590820152744e6f20636f6c6c6563746564207061796d656e747360581b604082015260600190565b6020808252818101527f526571756573746564207061796d656e7420616d6f756e74206973207a65726f604082015260600190565b60208082526010908201526f141bdbdb081b9bdd081cdd185c9d195960821b604082015260600190565b6020808252601f908201527f556e6c6f636b696e672070617274206e6f7420657175616c20746f206f6e6500604082015260600190565b60208082526017908201527f49737375616e6365206c696d6974206578636565646564000000000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252603c908201527f4c696e65617220756e6c6f636b696e67206c657373207468616e206f7220657160408201527f75616c20746f20706f6f6c20656e64696e672074696d657374616d7000000000606082015260800190565b602080825260119082015270139bdd081a5b9d195c9d985b081c1bdbdb607a1b604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526018908201527f496e76616c696420656e64696e672074696d657374616d700000000000000000604082015260600190565b60208082526011908201527014195c9b5a5cdcda5bdb8819195b9a5959607a1b604082015260600190565b6020808252600a9082015269141bdbdb08195b99195960b21b604082015260600190565b6020808252600e908201526d141bdbdb081b9bdd08195b99195960921b604082015260600190565b60208082526010908201526f105b1c9958591e481d5b9b1bd8dad95960821b604082015260600190565b6020808252600e908201526d416d6f756e74206973207a65726f60901b604082015260600190565b6020808252600f908201526e139bdd081b1a5b99585c881c1bdbdb608a1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600d908201526c20b63932b0b23c9037bbb732b960991b604082015260600190565b602080825260149082015273125b9d195c9d985b081b9bdd081cdd185c9d195960621b604082015260600190565b6020808252601a908201527f4e6f74206e6f6d696e6174656420746f206f776e657273686970000000000000604082015260600190565b6020808252601a908201527f416c6c2066756e647320616c726561647920756e6c6f636b6564000000000000604082015260600190565b6020808252601190820152704e6f20636f6c6c6563746564206665657360781b604082015260600190565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b602080825260099082015268139bc81d5b9cdbdb1960ba1b604082015260600190565b602080825260099082015268139bdd08195b99195960ba1b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601590820152744e6f20617661696c61626c652069737375616e636560581b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600f908201526e131a5b5a5d081b9bdd08199bdd5b99608a1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260169082015275092dcecc2d8d2c840d2dce8cae4ecc2d840d2dcc8caf60531b604082015260600190565b60208082526028908201527f496e76616c696420696d6d6564696174656c7920756e6c6f636b696e6720706160408201526772742076616c756560c01b606082015260800190565b6020808252600e908201526d141bdbdb081b9bdd08199bdd5b9960921b604082015260600190565b60a0810161323482866128b2565b61324160408301856128b2565b826080830152949350505050565b600061012080830161326184886128c1565b855160e0850152610100840191909152835190819052610140830190602090818601845b828110156132ad57815180518652840151518486015260409094019390830190600101613285565b509298975050505050505050565b61014081016132ca82866128c1565b835160e0830152611e076101008301846128b2565b6000602080835261010083018451828501528185015160408501526040850151606085015260608501516080850152608085015160018060a01b0380821660a08701528060a08801511660c0870152505060c085015160e0808601528181516133488185613382565b9285019350859291505b80831015613377576133658285516128aa565b91508484019350600183019250613352565b509695505050505050565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff811182821017156133ce57600080fd5b604052919050565b600067ffffffffffffffff8211156133ec578081fd5b5060209081020190565b806003811061058257fe5b60005b8381101561341c578181015183820152602001613404565b83811115611fe45750506000910152565b6001600160a01b038116811461193357600080fdfea26469706673582212207a69f8da7de1e8bb1fec8eff3ed67eb0586a60f25e5002228daa7111b34ad51064736f6c634300060c003300000000000000000000000061f2cdbdbf7dea13b26fce15307e92fcabddd910
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638da5cb5b11610104578063bcde0451116100a2578063e43b156011610071578063e43b156014610417578063ee90ac8214610438578063f63d8d321461044b578063f6f94e2c1461045e576101cf565b8063bcde0451146103ae578063beaa1176146103c1578063ceec13ff146103d4578063d96073cf146103f6576101cf565b8063a90101fb116100de578063a90101fb14610362578063a969ff0a14610375578063ae4ff9dc14610388578063b333ad871461039b576101cf565b80638da5cb5b1461032657806398ecde321461032e5780639a419e2e1461034f576101cf565b806344e4b97b116101715780636ccc56cd1161014b5780636ccc56cd146102e357806376d6ffa11461030357806379ba5097146103165780638c788de01461031e576101cf565b806344e4b97b1461029a57806346f75858146102bb57806353a47bb7146102ce576101cf565b80631cead9a7116101ad5780631cead9a71461023257806323fc3136146102525780632f9afafc1461026557806341975af814610287576101cf565b8063059332ec146101d45780631627540c146101ff5780631ac3ddeb1461021f575b600080fd5b6101e76101e236600461276a565b610471565b6040516101f6939291906132bb565b60405180910390f35b61021261020d366004612584565b61053f565b6040516101f69190612982565b61021261022d366004612584565b610587565b610245610240366004612584565b610662565b6040516101f69190613382565b6102126102603660046127d2565b61067d565b61027861027336600461276a565b610767565b6040516101f69392919061324f565b61021261029536600461276a565b61088e565b6102ad6102a836600461270e565b610937565b6040516101f692919061298d565b6102126102c936600461276a565b610a08565b6102d6610aa6565b6040516101f69190612931565b6102f66102f136600461276a565b610ab5565b6040516101f691906132df565b61024561031136600461276a565b610b79565b610212610d02565b610245610d4a565b6102d6610d50565b61034161033c36600461276a565b610d5f565b6040516101f69291906129bb565b61024561035d3660046127b1565b610df3565b610212610370366004612782565b610e6c565b61021261038336600461276a565b610f2d565b61021261039636600461276a565b610f6b565b6102126103a93660046127b1565b61102b565b6102ad6103bc366004612602565b611130565b6102ad6103cf3660046125c0565b6112cb565b6103e76103e2366004612782565b611319565b6040516101f693929190613226565b6104096104043660046127b1565b6113a2565b6040516101f692919061338b565b61042a610425366004612782565b61161e565b6040516101f692919061299d565b61021261044636600461287f565b611677565b6103e7610459366004612782565b6116fe565b61024561046c3660046127b1565b611787565b61047961237f565b6104816123d9565b6104896123ec565b6000610494856118be565b905061049f81611904565b6040805160e08101825260038301548152600483015460208083019190915260058401548284015260068401546001600160a01b0390811660608401526007850154166080830152825180820184526008850154815260a0830152825180820184526009850154815260c083015282518082018452600285015481528351808501909452600a8501548452600b9094015490830152969195509350915050565b6002546000906001600160a01b031633146105755760405162461bcd60e51b815260040161056c9061300d565b60405180910390fd5b61057e82611936565b5060015b919050565b6002546000906001600160a01b031633146105b45760405162461bcd60e51b815260040161056c9061300d565b6001600160a01b038216600090815260046020526040902054806105ea5760405162461bcd60e51b815260040161056c90612fe2565b6001600160a01b03831660008181526004602052604080822091909155517f78473f3f373f7673597f4f0fa5873cb4d375fea6d4339ad6b56dbd411513cb3f90610635908490613382565b60405180910390a2610659610648610d50565b6001600160a01b03851690836119c9565b50600192915050565b6001600160a01b031660009081526004602052604090205490565b600080610689856118be565b90506106958133611a24565b61069f8185611a57565b8251806106be5760405162461bcd60e51b815260040161056c90612a87565b60005b818110156107585760008582815181106106d757fe5b6020908102919091018101516001600160a01b0381166000908152601487019092526040909120805491925090881415610712575050610750565b87815560405188906001600160a01b038416908b907fd98eb3f94d757b6a35fcfb91cf696b9bc1a78ec87a7378e0b0429bc21386bb3b90600090a450505b6001016106c1565b506001925050505b9392505050565b61076f61237f565b6107776123d9565b60606000610784856118be565b905061078f81611a7a565b6040805160e08101825260038301548152600483015460208083019190915260058401548284015260068401546001600160a01b0390811660608401526007850154166080830152825180820184526008850154815260a0830152825180820184526009850154815260c0830152825180820184526002850154815260138501805485518185028101850190965280865293949193909283919060009084015b8282101561087a57600084815260209081902060408051808201825260028602909201805483528151808501909252600190810154825282840191909152908352909201910161082f565b505050509050935093509350509193909250565b60008061089a836118be565b9050336108a78282611a24565b6108b082611aa9565b600f820154806108d25760405162461bcd60e51b815260040161056c90612bc3565b6000600f84015560405185907fa21048fafbb2c049d83f70c98e05b976cf8f1e5f767ef698a6fdb1e7444c28289061090b908490613382565b60405180910390a2600683015461092c906001600160a01b031683836119c9565b506001949350505050565b60025460009081906001600160a01b031633146109665760405162461bcd60e51b815260040161056c9061300d565b866040015183116109895760405162461bcd60e51b815260040161056c90612cf6565b60006109988888886002611b9e565b90506109a48186611e0f565b600a81018490556040808901518503600b830155600182015490517f09fff9e1458ed4445723dc13dc4b99f6ae814f666b62ac4d767dd5b942744943906109ec908790613382565b60405180910390a2600190810154909890975095505050505050565b600080610a14836118be565b601081015490915033906001600160a01b03168114610a455760405162461bcd60e51b815260040161056c90612b8c565b6011820180546001600160a01b0383166001600160a01b03199182168117909255601084018054909116905560405185907f1db9920ce261cf5299c96ab18ed9969b1b467e3ac5f5e7a33656d6471495cf0790600090a35060019392505050565b6001546001600160a01b031690565b610abd612406565b610ac6826118be565b6040805160e081018252600c830180548252600d840154602080840191909152600e85015483850152600f850154606084015260108501546001600160a01b03908116608085015260118601541660a0840152601290940180548451818702810187019095528085529294919360c08601939092830182828015610b6957602002820191906000526020600020905b815481526020019060010190808311610b55575b5050505050815250509050919050565b60003381610b85611e81565b90506000610b92856118be565b9050610b9d81611904565b60058101548211610bc05760405162461bcd60e51b815260040161056c90612e3b565b6001600160a01b03831660009081526014820160205260409020600281015460038201548111610c025760405162461bcd60e51b815260040161056c90612fab565b6005830154600483015490850390600090610c1e908490611e85565b600b860154909150600090610c3d90610c378585611ead565b90611ee7565b9050600086600a0160000154881015610c6e576004860154610c6990610c639084611f19565b86611f3e565b610c70565b845b6003870154909150610c83908290611e85565b99508915610cf4576003860181905560018701546040516001600160a01b038b1691907f238e86f4971c795f36cd7b184dc9e65155fad7d6cf7dc94da2ced659781b653c90610cd3908e90613382565b60405180910390a36007870154610cf4906001600160a01b03168a8c6119c9565b505050505050505050919050565b6001546000906001600160a01b03163314610d2f5760405162461bcd60e51b815260040161056c90612f74565b600154610d44906001600160a01b0316611f54565b50600190565b60035490565b6002546001600160a01b031690565b6000610d6961237f565b6000610d74846118be565b80546040805160e08101825260038401548152600484015460208083019190915260058501548284015260068501546001600160a01b0390811660608401526007860154166080830152825180820184526008860154815260a08301528251908101909252600990930154815260c083015260ff169350915050915091565b600080610dff846118be565b9050610e0b8133611a24565b601281018054600181018255600091825260209091208101849055604051909250829085907f123042b7c2ada7097e3ab9d05b9dd5b54bab274a5690d2e16a2316f6e274844a90610e5d908790613382565b60405180910390a35092915050565b600080610e78846118be565b9050610e848133611a24565b60118101546001600160a01b0384811691161415610eb45760405162461bcd60e51b815260040161056c90612f1f565b60108101546001600160a01b0384811691161415610ed6576001915050610f27565b6010810180546001600160a01b0319166001600160a01b03851690811790915560405185907fceff235f9d95a8aba06f4cf159261832d21ce128a9e450e75c5f32faeb2df8e290600090a360019150505b92915050565b6002546000906001600160a01b03163314610f5a5760405162461bcd60e51b815260040161056c9061300d565b61057e610f66836118be565b611aa9565b600080610f77836118be565b905033610f848282611a24565b6005820154610f91611e81565b1015610faf5760405162461bcd60e51b815260040161056c90613053565b600c82015480610fd15760405162461bcd60e51b815260040161056c90613030565b6000600c84015560405185907f4caa9523353802828989b84b2bb248c625aeb6d44999cd9ba0fe7e15711f3db79061100a908490613382565b60405180910390a2600783015461092c906001600160a01b031683836119c9565b600080821161104c5760405162461bcd60e51b815260040161056c90612e8d565b6000611057846118be565b6005810154909150611067611e81565b106110845760405162461bcd60e51b815260040161056c90612e17565b3361108f8282611a24565b600d82015461109e9085611f19565b600d8301819055600383015410156110c85760405162461bcd60e51b815260040161056c90612c88565b600c8201546110d79085611f19565b600c83015560405185907f4ef8678904704bdf752e12cfb17a926ce33dcaf9077e565fb660cfe644ed22649061110e908790613382565b60405180910390a2600782015461092c906001600160a01b0316823087611fc3565b60025460009081906001600160a01b0316331461115f5760405162461bcd60e51b815260040161056c9061300d565b600061116e8888886001611b9e565b905061117a8186611e0f565b83516111846123d9565b50604089015186906000190160005b8381101561128c576111a3612455565b8882815181106111af57fe5b602002602001015190506111d0848260200151611fea90919063ffffffff16565b6111ec5760405162461bcd60e51b815260040161056c90612a50565b602081015181519094508381116112155760405162461bcd60e51b815260040161056c90612adb565b60138701805460018181018355600092835260209283902085516002909302018281559285015151920182905560405192955085928a927f9ad21f79ce9c3c640f4c7e4d5cccb24f33967153042855c93f33f9cb457b70959261127a9290919061338b565b60405180910390a25050600101611193565b50611298826001611ff1565b6112b45760405162461bcd60e51b815260040161056c90612c51565b505050600190810154909890975095505050505050565b60025460009081906001600160a01b031633146112fa5760405162461bcd60e51b815260040161056c9061300d565b60016113098686866000611b9e565b6001015491509150935093915050565b6113216123ec565b6113296123ec565b600080611335866118be565b905061134081611904565b6001600160a01b0385166000908152601490910160209081526040918290206004810154835180850185528254815260018301548185015284518086019095526002830154855260039092015492840192909252945090925090509250925092565b600080600260005414156113c85760405162461bcd60e51b815260040161056c9061314f565b6002600055826113ea5760405162461bcd60e51b815260040161056c90612bf2565b3360006113f6866118be565b90506000611402611e81565b60048301549091508110156114295760405162461bcd60e51b815260040161056c90612c27565b6005820154811061144c5760405162461bcd60e51b815260040161056c90612e17565b600c82015461146d5760405162461bcd60e51b815260040161056c906130ad565b61147882878561202f565b6001600160a01b03851660009081526014850160205260409020919650945085156114df57600e8301546114ac9087611f19565b600e84015560018101546114c09087611f19565b600182015560068301546114df906001600160a01b0316853089611fc3565b84156115c6576000835460ff1660028111156114f757fe5b141561151b576007830154611516906001600160a01b031685876119c9565b6115b1565b600281015460009061152d9087611f19565b6002808401829055604080516020810190915290860154815290915060009061155f9061155a9084612122565b61214c565b6003840180549082905590915081036002865460ff16600281111561158057fe5b141561158e57600484018290555b80156115ad5760078601546115ad906001600160a01b031688836119c9565b5050505b600c8301546115c09086611e85565b600c8401555b836001600160a01b0316887f7d421bbd3ba855339632fdd240923952de83fd611d837a284506157b596f493289898960405161160493929190613399565b60405180910390a350506001600055509194909350915050565b60006116286123ec565b6000611633856118be565b80546001600160a01b038616600090815260149092016020908152604092839020835180850190945280548452600101549083015260ff1693509150509250929050565b600080611683856118be565b905061168f8133611a24565b6116998185611a57565b8281600c0160060185815481106116ac57fe5b906000526020600020018190555083857fc128898667140122862a239400b6468386a01fb68fe432ebe587a84166d241ad856040516116eb9190613382565b60405180910390a3506001949350505050565b6117066123ec565b61170e6123ec565b60008061171a866118be565b905061172581611a7a565b6001600160a01b0385166000908152601490910160209081526040918290206005810154835180850185528254815260018301548185015284518086019095526002830154855260039092015492840192909252945090925090509250925092565b60003381611794856118be565b905061179f81611a7a565b601381015484106117c25760405162461bcd60e51b815260040161056c90613186565b60008160130185815481106117d357fe5b906000526020600020906002020190506117eb611e81565b8154111561180b5760405162461bcd60e51b815260040161056c90612f46565b6001600160a01b0383166000908152601483016020526040902060058101548610156118495760405162461bcd60e51b815260040161056c90612e63565b60028101546040805160208101909152600184015481526000916118709161155a91612122565b600383018054908290559091508103801561189e57600785015461189e906001600160a01b031687836119c9565b6118a9886001611f19565b60059093019290925550935050505092915050565b60035460009082106118e25760405162461bcd60e51b815260040161056c906131fe565b600382815481106118ef57fe5b90600052602060002090601502019050919050565b6002815460ff16600281111561191657fe5b146119335760405162461bcd60e51b815260040161056c90612eb5565b50565b6001546001600160a01b038281169116141561195157611933565b6002546001600160a01b038281169116141561197f5760405162461bcd60e51b815260040161056c90612f1f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b611a1f8363a9059cbb60e01b84846040516024016119e8929190612969565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261215b565b505050565b60118201546001600160a01b03828116911614611a535760405162461bcd60e51b815260040161056c90612dec565b5050565b60128201548110611a535760405162461bcd60e51b815260040161056c90613126565b6001815460ff166002811115611a8c57fe5b146119335760405162461bcd60e51b815260040161056c90612d53565b600e810154611ab757611933565b600e810154604080516020810190915260088301548152600091611ae391611ade91612122565b6121ea565b60068301546001600160a01b0316600090815260046020526040902054909150611b0d9082611f19565b60068301546001600160a01b0316600090815260046020526040812091909155600e830154611b3c9083611e85565b600f840154909150611b4e9082611f19565b600f8401556000600e84015560018301546040517f969043bab89ac5dd319ed2e1356119888d1624898734ac8516a120bea7fb426090611b91908490869061338b565b60405180910390a2505050565b600080611ba9611e81565b90508086602001511015611bbf57602086018190525b60a0860151611bcf906064612224565b611beb5760405162461bcd60e51b815260040161056c90612ab5565b8560400151866020015110611c125760405162461bcd60e51b815260040161056c90612db5565b506003805460018101808355600083815291929083908110611c3057fe5b60009182526020909120600160159092020181810184905580549092508591839160ff191690836002811115611c6257fe5b0217905550865160038201556020808801516004830155604080890151600584015560608901516006840180546001600160a01b039283166001600160a01b03199182161790915560808b015160078601805491909316911617905560a089015151600884015560c08901515160098401558051600180825281830190925291828101908036833750508151611d01926012850192506020019061246f565b508581600c01600601600081548110611d1657fe5b90600052602060002001819055508481600c0160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555086608001516001600160a01b031687606001516001600160a01b03167f6d0a80f2ee73de8861b1887eb263d606bb9e1b85beff2d71b45b913b0f9aed3186858b600001518c602001518d604001518e60a00151600001518f60c00151600001518f604051611dc59897969594939291906129d8565b60405180910390a36040516001600160a01b0386169083907f1db9920ce261cf5299c96ab18ed9969b1b467e3ac5f5e7a33656d6471495cf0790600090a39150505b949350505050565b611e1a816001612224565b611e365760405162461bcd60e51b815260040161056c906131b6565b805160028301819055600183015460405190917f4b934b79ea913cbf45273ed2d6516ef75fd53b22d460b29bfc3627bdda76103f91611e759190613382565b60405180910390a25050565b4290565b600082821115611ea75760405162461bcd60e51b815260040161056c90612cbf565b50900390565b600082611ebc57506000610f27565b82820282848281611ec957fe5b04146107605760405162461bcd60e51b815260040161056c90612ede565b6000808211611f085760405162461bcd60e51b815260040161056c90612d7e565b818381611f1157fe5b049392505050565b6000828201838110156107605760405162461bcd60e51b815260040161056c90612b55565b6000818310611f4d5781610760565b5090919050565b6002546001600160a01b0382811691161415611f6f57611933565b600280546001600160a01b0383166001600160a01b031991821681179092556001805490911690556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf3690600090a250565b611fe4846323b872dd60e01b8585856040516024016119e893929190612945565b50505050565b5190511190565b60007812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f2182111561201c57506000610f27565b509051670de0b6b3a76400009091021490565b6001600160a01b03811660009081526014840160205260408120805460128601805486949392849291811061206057fe5b90600052602060002001549050808260000160010154106120935760405162461bcd60e51b815260040161056c90612b1e565b600182015481906120a49086611f19565b11156120bd5760018201546120ba908290611e85565b93505b6040805160208101909152600988015481526120dd9061155a9086612122565b600c88015490935083111561211857600c87015460408051602081019091526009890154815290935061211590611ade908590612262565b93505b5050935093915050565b61212a6123d9565b6040805160208101909152835181906121439085611ead565b90529392505050565b51670de0b6b3a7640000900490565b60606121b0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166122969092919063ffffffff16565b805190915015611a1f57808060200190518101906121ce91906125a0565b611a1f5760405162461bcd60e51b815260040161056c906130dc565b8051600090670de0b6b3a76400009006612205576000612208565b60015b60ff166012600a0a83600001518161221c57fe5b040192915050565b60007812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f2182111561224f57506001610f27565b509051670de0b6b3a76400009091021190565b61226a6123d9565b60408051602081019091528251819061214390610c37876ec097ce7bc90715b34b9f1000000000611ead565b6060611e078484600085856122aa85612340565b6122c65760405162461bcd60e51b815260040161056c90613076565b60006060866001600160a01b031685876040516122e39190612915565b60006040518083038185875af1925050503d8060008114612320576040519150601f19603f3d011682016040523d82523d6000602084013e612325565b606091505b5091509150612335828286612346565b979650505050505050565b3b151590565b60608315612355575081610760565b8251156123655782518084602001fd5b8160405162461bcd60e51b815260040161056c9190612a1d565b6040518060e0016040528060008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016123c76123d9565b81526020016123d46123d9565b905290565b6040518060200160405280600081525090565b604051806040016040528060008152602001600081525090565b6040518060e001604052806000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001606081525090565b6040518060400160405280600081526020016123d46123d9565b8280548282559060005260206000209081019282156124aa579160200282015b828111156124aa57825182559160200191906001019061248f565b506124b69291506124ba565b5090565b5b808211156124b657600081556001016124bb565b8035610f278161342d565b6000602082840312156124eb578081fd5b6124f560206133af565b9135825250919050565b600060e08284031215612510578081fd5b61251a60e06133af565b905081358152602082013560208201526040820135604082015260608201356125428161342d565b606082015260808201356125558161342d565b60808201526125678360a084016124da565b60a08201526125798360c084016124da565b60c082015292915050565b600060208284031215612595578081fd5b81356107608161342d565b6000602082840312156125b1578081fd5b81518015158114610760578182fd5b600080600061012084860312156125d5578182fd5b6125df85856124ff565b925060e084013591506101008401356125f78161342d565b809150509250925092565b6000806000806000610160868803121561261a578081fd5b61262487876124ff565b945060e0860135935061010086013561263c8161342d565b925061264c8761012088016124da565b915061014086013567ffffffffffffffff811115612668578182fd5b8601601f81018813612678578182fd5b803561268b612686826133d6565b6133af565b808282526020808301925080850160408d8382880289010111156126ad578788fd5b8796505b858710156126fa5780828f0312156126c7578788fd5b6126d0816133af565b823581526126e08f8585016124da565b8185015285526001969096019593820193908101906126b1565b505050809450505050509295509295909350565b60008060008060006101608688031215612726578081fd5b61273087876124ff565b945060e086013593506101008601356127488161342d565b92506127588761012088016124da565b94979396509194610140013592915050565b60006020828403121561277b578081fd5b5035919050565b60008060408385031215612794578182fd5b8235915060208301356127a68161342d565b809150509250929050565b600080604083850312156127c3578182fd5b50508035926020909101359150565b6000806000606084860312156127e6578283fd5b833592506020808501359250604085013567ffffffffffffffff81111561280b578283fd5b8501601f8101871361281b578283fd5b8035612829612686826133d6565b81815283810190838501858402850186018b1015612845578687fd5b8694505b8385101561286f5761285b8b826124cf565b835260019490940193918501918501612849565b5080955050505050509250925092565b600080600060608486031215612893578081fd5b505081359360208301359350604090920135919050565b815260200190565b80518252602090810151910152565b805182526020810151602083015260408101516040830152606081015160018060a01b038082166060850152806080840151166080850152505060a08101515160a083015260c08101515160c08301525050565b60008251612927818460208701613401565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9115158252602082015260400190565b60608101600384106129ab57fe5b83825261076060208301846128b2565b61010081016129c9846133f6565b825261076060208301846128c1565b61010081016129e68a6133f6565b8252602082019890985260408101969096526060860194909452608085019290925260a084015260c083015260e090910152919050565b6000602082528251806020840152612a3c816040850160208701613401565b601f01601f19169190910160400192915050565b6020808252601f908201527f496e76616c696420696e74657276616c20756e6c6f636b696e67207061727400604082015260600190565b602080825260149082015273139bc81858d8dbdd5b9d1cc81c1c9bdd9a59195960621b604082015260600190565b6020808252600c908201526b46656520677465203130302560a01b604082015260600190565b60208082526023908201527f496e76616c696420696e74657276616c207374617274696e672074696d6573746040820152620616d760ec1b606082015260800190565b6020808252601e908201527f4163636f756e74207061796d656e74206c696d69742065786365656465640000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601f908201527f4e6f74206e6f6d696e6174656420746f20706f6f6c206f776e65727368697000604082015260600190565b6020808252601590820152744e6f20636f6c6c6563746564207061796d656e747360581b604082015260600190565b6020808252818101527f526571756573746564207061796d656e7420616d6f756e74206973207a65726f604082015260600190565b60208082526010908201526f141bdbdb081b9bdd081cdd185c9d195960821b604082015260600190565b6020808252601f908201527f556e6c6f636b696e672070617274206e6f7420657175616c20746f206f6e6500604082015260600190565b60208082526017908201527f49737375616e6365206c696d6974206578636565646564000000000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252603c908201527f4c696e65617220756e6c6f636b696e67206c657373207468616e206f7220657160408201527f75616c20746f20706f6f6c20656e64696e672074696d657374616d7000000000606082015260800190565b602080825260119082015270139bdd081a5b9d195c9d985b081c1bdbdb607a1b604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526018908201527f496e76616c696420656e64696e672074696d657374616d700000000000000000604082015260600190565b60208082526011908201527014195c9b5a5cdcda5bdb8819195b9a5959607a1b604082015260600190565b6020808252600a9082015269141bdbdb08195b99195960b21b604082015260600190565b6020808252600e908201526d141bdbdb081b9bdd08195b99195960921b604082015260600190565b60208082526010908201526f105b1c9958591e481d5b9b1bd8dad95960821b604082015260600190565b6020808252600e908201526d416d6f756e74206973207a65726f60901b604082015260600190565b6020808252600f908201526e139bdd081b1a5b99585c881c1bdbdb608a1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600d908201526c20b63932b0b23c9037bbb732b960991b604082015260600190565b602080825260149082015273125b9d195c9d985b081b9bdd081cdd185c9d195960621b604082015260600190565b6020808252601a908201527f4e6f74206e6f6d696e6174656420746f206f776e657273686970000000000000604082015260600190565b6020808252601a908201527f416c6c2066756e647320616c726561647920756e6c6f636b6564000000000000604082015260600190565b6020808252601190820152704e6f20636f6c6c6563746564206665657360781b604082015260600190565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b602080825260099082015268139bc81d5b9cdbdb1960ba1b604082015260600190565b602080825260099082015268139bdd08195b99195960ba1b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601590820152744e6f20617661696c61626c652069737375616e636560581b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600f908201526e131a5b5a5d081b9bdd08199bdd5b99608a1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260169082015275092dcecc2d8d2c840d2dce8cae4ecc2d840d2dcc8caf60531b604082015260600190565b60208082526028908201527f496e76616c696420696d6d6564696174656c7920756e6c6f636b696e6720706160408201526772742076616c756560c01b606082015260800190565b6020808252600e908201526d141bdbdb081b9bdd08199bdd5b9960921b604082015260600190565b60a0810161323482866128b2565b61324160408301856128b2565b826080830152949350505050565b600061012080830161326184886128c1565b855160e0850152610100840191909152835190819052610140830190602090818601845b828110156132ad57815180518652840151518486015260409094019390830190600101613285565b509298975050505050505050565b61014081016132ca82866128c1565b835160e0830152611e076101008301846128b2565b6000602080835261010083018451828501528185015160408501526040850151606085015260608501516080850152608085015160018060a01b0380821660a08701528060a08801511660c0870152505060c085015160e0808601528181516133488185613382565b9285019350859291505b80831015613377576133658285516128aa565b91508484019350600183019250613352565b509695505050505050565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff811182821017156133ce57600080fd5b604052919050565b600067ffffffffffffffff8211156133ec578081fd5b5060209081020190565b806003811061058257fe5b60005b8381101561341c578181015183820152602001613404565b83811115611fe45750506000910152565b6001600160a01b038116811461193357600080fdfea26469706673582212207a69f8da7de1e8bb1fec8eff3ed67eb0586a60f25e5002228daa7111b34ad51064736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000061f2cdbdbf7dea13b26fce15307e92fcabddd910
-----Decoded View---------------
Arg [0] : owner_ (address): 0x61F2cDbDBF7DEa13b26FCE15307e92FCAbdDD910
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000061f2cdbdbf7dea13b26fce15307e92fcabddd910
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.