Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
25,669,165,839.826526046067156336 TS
Holders
359
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.000000000000005566 TSValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Forge
Compiler Version
v0.5.17+commit.d19bba13
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-11-11 */ pragma solidity ^0.5.17; pragma experimental ABIEncoderV2; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _owner; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @title Decimal * @author dYdX * * Library that defines a fixed-point number with 18 decimal places. */ library Decimal { using SafeMath for uint256; // ============ Constants ============ uint256 constant BASE = 10**18; // ============ Structs ============ struct D256 { uint256 value; } // ============ Static Functions ============ function zero() internal pure returns (D256 memory) { return D256({value: 0}); } function one() internal pure returns (D256 memory) { return D256({value: BASE}); } function from(uint256 a) internal pure returns (D256 memory) { return D256({value: a.mul(BASE)}); } function ratio(uint256 a, uint256 b) internal pure returns (D256 memory) { return D256({value: getPartial(a, BASE, b)}); } // ============ Self Functions ============ function add(D256 memory self, uint256 b) internal pure returns (D256 memory) { return D256({value: self.value.add(b.mul(BASE))}); } function sub(D256 memory self, uint256 b) internal pure returns (D256 memory) { return D256({value: self.value.sub(b.mul(BASE))}); } function sub( D256 memory self, uint256 b, string memory reason ) internal pure returns (D256 memory) { return D256({value: self.value.sub(b.mul(BASE), reason)}); } function mul(D256 memory self, uint256 b) internal pure returns (D256 memory) { return D256({value: self.value.mul(b)}); } function div(D256 memory self, uint256 b) internal pure returns (D256 memory) { return D256({value: self.value.div(b)}); } function pow(D256 memory self, uint256 b) internal pure returns (D256 memory) { if (b == 0) { return from(1); } D256 memory temp = D256({value: self.value}); for (uint256 i = 1; i < b; i++) { temp = mul(temp, self); } return temp; } function add(D256 memory self, D256 memory b) internal pure returns (D256 memory) { return D256({value: self.value.add(b.value)}); } function sub(D256 memory self, D256 memory b) internal pure returns (D256 memory) { return D256({value: self.value.sub(b.value)}); } function sub( D256 memory self, D256 memory b, string memory reason ) internal pure returns (D256 memory) { return D256({value: self.value.sub(b.value, reason)}); } function mul(D256 memory self, D256 memory b) internal pure returns (D256 memory) { return D256({value: getPartial(self.value, b.value, BASE)}); } function div(D256 memory self, D256 memory b) internal pure returns (D256 memory) { return D256({value: getPartial(self.value, BASE, b.value)}); } function equals(D256 memory self, D256 memory b) internal pure returns (bool) { return self.value == b.value; } function greaterThan(D256 memory self, D256 memory b) internal pure returns (bool) { return compareTo(self, b) == 2; } function lessThan(D256 memory self, D256 memory b) internal pure returns (bool) { return compareTo(self, b) == 0; } function greaterThanOrEqualTo(D256 memory self, D256 memory b) internal pure returns (bool) { return compareTo(self, b) > 0; } function lessThanOrEqualTo(D256 memory self, D256 memory b) internal pure returns (bool) { return compareTo(self, b) < 2; } function isZero(D256 memory self) internal pure returns (bool) { return self.value == 0; } function asUint256(D256 memory self) internal pure returns (uint256) { return self.value.div(BASE); } // ============ Core Methods ============ function getPartial( uint256 target, uint256 numerator, uint256 denominator ) private pure returns (uint256) { return target.mul(numerator).div(denominator); } function compareTo(D256 memory a, D256 memory b) private pure returns (uint256) { if (a.value == b.value) { return 1; } return a.value > b.value ? 2 : 0; } } library Constants { /* Chain */ uint256 private constant CHAIN_ID = 1; // Mainnet /* Bootstrapping */ uint256 private constant BOOTSTRAPPING_PERIOD = 672; // 14 days uint256 private constant BOOTSTRAPPING_PRICE = 1078280614764947472; // Should be 0.1 difference between peg /* Oracle */ address private constant CRV3 = address(0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490); // Anywhere the term CRV3 is refernenced, consider that as "peg", really uint256 private constant ORACLE_RESERVE_MINIMUM = 1e22; // 10,000 T /* Bonding */ uint256 private constant INITIAL_STAKE_MULTIPLE = 1e6; // 100 T -> 100M TS /* Epoch */ struct EpochStrategy { uint256 offset; uint256 start; uint256 period; } uint256 private constant CURRENT_EPOCH_OFFSET = 0; uint256 private constant CURRENT_EPOCH_START = 1667790000; uint256 private constant CURRENT_EPOCH_PERIOD = 1800; /* Forge */ uint256 private constant ADVANCE_INCENTIVE_IN_3CRV = 75 * 10**18; // 75 3CRV uint256 private constant ADVANCE_INCENTIVE_IN_T_MAX = 5000 * 10**18; // 5000 T uint256 private constant FORGE_EXIT_LOCKUP_EPOCHS = 240; // 5 days fluid /* Pool */ uint256 private constant POOL_EXIT_LOCKUP_EPOCHS = 144; // 3 days fluid /* Market */ uint256 private constant COUPON_EXPIRATION = 8640; // 180 days uint256 private constant DEBT_RATIO_CAP = 20e16; // 20% /* Regulator */ uint256 private constant SUPPLY_CHANGE_LIMIT = 1e16; // 1% uint256 private constant COUPON_SUPPLY_CHANGE_LIMIT = 2e16; // 2% uint256 private constant ORACLE_POOL_RATIO = 50; // 50% uint256 private constant TREASURY_RATIO = 0; // 0% /* Deployed */ address private constant TREASURY_ADDRESS = address(0x0000000000000000000000000000000000000000); /** * Getters */ function getCrv3Address() internal pure returns (address) { return CRV3; } function getOracleReserveMinimum() internal pure returns (uint256) { return ORACLE_RESERVE_MINIMUM; } function getCurrentEpochStrategy() internal pure returns (EpochStrategy memory) { return EpochStrategy({ offset: CURRENT_EPOCH_OFFSET, start: CURRENT_EPOCH_START, period: CURRENT_EPOCH_PERIOD }); } function getInitialStakeMultiple() internal pure returns (uint256) { return INITIAL_STAKE_MULTIPLE; } function getBootstrappingPeriod() internal pure returns (uint256) { return BOOTSTRAPPING_PERIOD; } function getBootstrappingPrice() internal pure returns (Decimal.D256 memory) { return Decimal.D256({value: BOOTSTRAPPING_PRICE}); } function getAdvanceIncentive() internal pure returns (uint256) { return ADVANCE_INCENTIVE_IN_3CRV; } function getMaxAdvanceTIncentive() internal pure returns (uint256) { return ADVANCE_INCENTIVE_IN_T_MAX; } function getForgeExitLockupEpochs() internal pure returns (uint256) { return FORGE_EXIT_LOCKUP_EPOCHS; } function getPoolExitLockupEpochs() internal pure returns (uint256) { return POOL_EXIT_LOCKUP_EPOCHS; } function getCouponExpiration() internal pure returns (uint256) { return COUPON_EXPIRATION; } function getDebtRatioCap() internal pure returns (Decimal.D256 memory) { return Decimal.D256({value: DEBT_RATIO_CAP}); } function getSupplyChangeLimit() internal pure returns (Decimal.D256 memory) { return Decimal.D256({value: SUPPLY_CHANGE_LIMIT}); } function getCouponSupplyChangeLimit() internal pure returns (Decimal.D256 memory) { return Decimal.D256({value: COUPON_SUPPLY_CHANGE_LIMIT}); } function getOraclePoolRatio() internal pure returns (uint256) { return ORACLE_POOL_RATIO; } function getTreasuryRatio() internal pure returns (uint256) { return TREASURY_RATIO; } function getChainId() internal pure returns (uint256) { return CHAIN_ID; } function getTreasuryAddress() internal pure returns (address) { return TREASURY_ADDRESS; } } contract Curve { using SafeMath for uint256; using Decimal for Decimal.D256; function calculateCouponPremium( uint256 totalSupply, uint256 totalDebt, uint256 amount ) internal pure returns (uint256) { return effectivePremium(totalSupply, totalDebt, amount) .mul(amount) .asUint256(); } function effectivePremium( uint256 totalSupply, uint256 totalDebt, uint256 amount ) private pure returns (Decimal.D256 memory) { Decimal.D256 memory debtRatio = Decimal.ratio(totalDebt, totalSupply); Decimal.D256 memory debtRatioUpperBound = Constants.getDebtRatioCap(); uint256 totalSupplyEnd = totalSupply.sub(amount); uint256 totalDebtEnd = totalDebt.sub(amount); Decimal.D256 memory debtRatioEnd = Decimal.ratio( totalDebtEnd, totalSupplyEnd ); if (debtRatio.greaterThan(debtRatioUpperBound)) { if (debtRatioEnd.greaterThan(debtRatioUpperBound)) { return curve(debtRatioUpperBound); } Decimal.D256 memory premiumCurve = curveMean( debtRatioEnd, debtRatioUpperBound ); Decimal.D256 memory premiumCurveDelta = debtRatioUpperBound.sub( debtRatioEnd ); Decimal.D256 memory premiumFlat = curve(debtRatioUpperBound); Decimal.D256 memory premiumFlatDelta = debtRatio.sub( debtRatioUpperBound ); return (premiumCurve.mul(premiumCurveDelta)) .add(premiumFlat.mul(premiumFlatDelta)) .div(premiumCurveDelta.add(premiumFlatDelta)); } return curveMean(debtRatioEnd, debtRatio); } // 1/(3(1-R)^2)-1/3 function curve(Decimal.D256 memory debtRatio) private pure returns (Decimal.D256 memory) { return Decimal .one() .div(Decimal.from(3).mul((Decimal.one().sub(debtRatio)).pow(2))) .sub(Decimal.ratio(1, 3)); } // 1/(3(1-R)(1-R'))-1/3 function curveMean(Decimal.D256 memory lower, Decimal.D256 memory upper) private pure returns (Decimal.D256 memory) { if (lower.equals(upper)) { return curve(lower); } return Decimal .one() .div( Decimal.from(3).mul(Decimal.one().sub(upper)).mul( Decimal.one().sub(lower) ) ) .sub(Decimal.ratio(1, 3)); } } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ 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); } contract IDollar is IERC20 { function burn(uint256 amount) public; function burnFrom(address account, uint256 amount) public; function mint(address account, uint256 amount) public returns (bool); } contract IOracle { function update() public; function consult() public returns (Decimal.D256 memory, bool); function averageDollarPrice() public returns (Decimal.D256 memory, bool); function pair() external view returns (address); } contract Account { enum Status { Frozen, Fluid, Locked } struct State { uint256 staged; uint256 balance; mapping(uint256 => uint256) coupons; mapping(address => uint256) couponAllowances; uint256 fluidUntil; uint256 lockedUntil; } } contract Epoch { struct Global { uint256 start; uint256 period; uint256 current; } struct Coupons { uint256 outstanding; uint256 expiration; uint256[] expiring; } struct State { uint256 bonded; Coupons coupons; } } contract Candidate { enum Vote { UNDECIDED, APPROVE, REJECT } struct State { uint256 start; uint256 period; uint256 approve; uint256 reject; mapping(address => Vote) votes; bool initialized; } } contract Storage { struct Provider { IDollar dollar; IOracle oracle; address pool; } struct Balance { uint256 supply; uint256 bonded; uint256 staged; uint256 redeemable; uint256 debt; uint256 coupons; } struct State { Epoch.Global epoch; Balance balance; Provider provider; mapping(address => Account.State) accounts; mapping(uint256 => Epoch.State) epochs; mapping(address => Candidate.State) candidates; } } contract State { Storage.State _state; } contract Getters is State { using SafeMath for uint256; using Decimal for Decimal.D256; bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * ERC20 Interface */ function name() public view returns (string memory) { return "Titanium Shares"; } function symbol() public view returns (string memory) { return "TS"; } function decimals() public view returns (uint8) { return 18; } function balanceOf(address account) public view returns (uint256) { return _state.accounts[account].balance; } function totalSupply() public view returns (uint256) { return _state.balance.supply; } function allowance(address owner, address spender) external view returns (uint256) { return 0; } /** * Global */ function dollar() public view returns (IDollar) { return _state.provider.dollar; } function oracle() public view returns (IOracle) { return _state.provider.oracle; } function pool() public view returns (address) { return _state.provider.pool; } function totalBonded() public view returns (uint256) { return _state.balance.bonded; } function totalStaged() public view returns (uint256) { return _state.balance.staged; } function totalDebt() public view returns (uint256) { return _state.balance.debt; } function totalRedeemable() public view returns (uint256) { return _state.balance.redeemable; } function totalCoupons() public view returns (uint256) { return _state.balance.coupons; } function totalNet() public view returns (uint256) { return dollar().totalSupply().sub(totalDebt()); } /** * Account */ function balanceOfStaged(address account) public view returns (uint256) { return _state.accounts[account].staged; } function balanceOfBonded(address account) public view returns (uint256) { uint256 totalSupply = totalSupply(); if (totalSupply == 0) { return 0; } return totalBonded().mul(balanceOf(account)).div(totalSupply); } function balanceOfCoupons(address account, uint256 epoch) public view returns (uint256) { if (outstandingCoupons(epoch) == 0) { return 0; } return _state.accounts[account].coupons[epoch]; } function statusOf(address account) public view returns (Account.Status) { if (_state.accounts[account].lockedUntil > epoch()) { return Account.Status.Locked; } return epoch() >= _state.accounts[account].fluidUntil ? Account.Status.Frozen : Account.Status.Fluid; } function fluidUntil(address account) public view returns (uint256) { return _state.accounts[account].fluidUntil; } function lockedUntil(address account) public view returns (uint256) { return _state.accounts[account].lockedUntil; } function allowanceCoupons(address owner, address spender) public view returns (uint256) { return _state.accounts[owner].couponAllowances[spender]; } /** * Epoch */ function epoch() public view returns (uint256) { return _state.epoch.current; } function epochTime() public view returns (uint256) { Constants.EpochStrategy memory current = Constants .getCurrentEpochStrategy(); return epochTimeWithStrategy(current); } function epochTimeWithStrategy(Constants.EpochStrategy memory strategy) private view returns (uint256) { return blockTimestamp().sub(strategy.start).div(strategy.period).add( strategy.offset ); } // Overridable for testing function blockTimestamp() internal view returns (uint256) { return block.timestamp; } function outstandingCoupons(uint256 epoch) public view returns (uint256) { return _state.epochs[epoch].coupons.outstanding; } function couponsExpiration(uint256 epoch) public view returns (uint256) { return _state.epochs[epoch].coupons.expiration; } function expiringCoupons(uint256 epoch) public view returns (uint256) { return _state.epochs[epoch].coupons.expiring.length; } function expiringCouponsAtIndex(uint256 epoch, uint256 i) public view returns (uint256) { return _state.epochs[epoch].coupons.expiring[i]; } function totalBondedAt(uint256 epoch) public view returns (uint256) { return _state.epochs[epoch].bonded; } function bootstrappingAt(uint256 epoch) public view returns (bool) { return epoch <= Constants.getBootstrappingPeriod(); } } contract Setters is State, Getters { using SafeMath for uint256; event Transfer(address indexed from, address indexed to, uint256 value); /** * ERC20 Interface */ function transfer(address recipient, uint256 amount) external returns (bool) { return false; } function approve(address spender, uint256 amount) external returns (bool) { return false; } function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool) { return false; } /** * Global */ function incrementTotalBonded(uint256 amount) internal { _state.balance.bonded = _state.balance.bonded.add(amount); } function decrementTotalBonded(uint256 amount, string memory reason) internal { _state.balance.bonded = _state.balance.bonded.sub(amount, reason); } function incrementTotalDebt(uint256 amount) internal { _state.balance.debt = _state.balance.debt.add(amount); } function decrementTotalDebt(uint256 amount, string memory reason) internal { _state.balance.debt = _state.balance.debt.sub(amount, reason); } function incrementTotalRedeemable(uint256 amount) internal { _state.balance.redeemable = _state.balance.redeemable.add(amount); } function decrementTotalRedeemable(uint256 amount, string memory reason) internal { _state.balance.redeemable = _state.balance.redeemable.sub( amount, reason ); } /** * Account */ function incrementBalanceOf(address account, uint256 amount) internal { _state.accounts[account].balance = _state.accounts[account].balance.add( amount ); _state.balance.supply = _state.balance.supply.add(amount); emit Transfer(address(0), account, amount); } function decrementBalanceOf( address account, uint256 amount, string memory reason ) internal { _state.accounts[account].balance = _state.accounts[account].balance.sub( amount, reason ); _state.balance.supply = _state.balance.supply.sub(amount, reason); emit Transfer(account, address(0), amount); } function incrementBalanceOfStaged(address account, uint256 amount) internal { _state.accounts[account].staged = _state.accounts[account].staged.add( amount ); _state.balance.staged = _state.balance.staged.add(amount); } function decrementBalanceOfStaged( address account, uint256 amount, string memory reason ) internal { _state.accounts[account].staged = _state.accounts[account].staged.sub( amount, reason ); _state.balance.staged = _state.balance.staged.sub(amount, reason); } function incrementBalanceOfCoupons( address account, uint256 epoch, uint256 amount ) internal { _state.accounts[account].coupons[epoch] = _state .accounts[account] .coupons[epoch] .add(amount); _state.epochs[epoch].coupons.outstanding = _state .epochs[epoch] .coupons .outstanding .add(amount); _state.balance.coupons = _state.balance.coupons.add(amount); } function decrementBalanceOfCoupons( address account, uint256 epoch, uint256 amount, string memory reason ) internal { _state.accounts[account].coupons[epoch] = _state .accounts[account] .coupons[epoch] .sub(amount, reason); _state.epochs[epoch].coupons.outstanding = _state .epochs[epoch] .coupons .outstanding .sub(amount, reason); _state.balance.coupons = _state.balance.coupons.sub(amount, reason); } function unfreeze(address account) internal { _state.accounts[account].fluidUntil = epoch().add( Constants.getForgeExitLockupEpochs() ); } function updateAllowanceCoupons( address owner, address spender, uint256 amount ) internal { _state.accounts[owner].couponAllowances[spender] = amount; } function decrementAllowanceCoupons( address owner, address spender, uint256 amount, string memory reason ) internal { _state.accounts[owner].couponAllowances[spender] = _state .accounts[owner] .couponAllowances[spender] .sub(amount, reason); } /** * Epoch */ function incrementEpoch() internal { _state.epoch.current = _state.epoch.current.add(1); } function snapshotTotalBonded() internal { _state.epochs[epoch()].bonded = totalSupply(); } function initializeCouponsExpiration(uint256 epoch, uint256 expiration) internal { _state.epochs[epoch].coupons.expiration = expiration; _state.epochs[expiration].coupons.expiring.push(epoch); } function eliminateOutstandingCoupons(uint256 epoch) internal { uint256 outstandingCouponsForEpoch = outstandingCoupons(epoch); if (outstandingCouponsForEpoch == 0) { return; } _state.balance.coupons = _state.balance.coupons.sub( outstandingCouponsForEpoch ); _state.epochs[epoch].coupons.outstanding = 0; } } /* Copyright 2019 dYdX Trading Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** * @title Require * @author dYdX * * Stringifies parameters to pretty-print revert messages. Costs more gas than regular require() */ library Require { // ============ Constants ============ uint256 constant ASCII_ZERO = 48; // '0' uint256 constant ASCII_RELATIVE_ZERO = 87; // 'a' - 10 uint256 constant ASCII_LOWER_EX = 120; // 'x' bytes2 constant COLON = 0x3a20; // ': ' bytes2 constant COMMA = 0x2c20; // ', ' bytes2 constant LPAREN = 0x203c; // ' <' byte constant RPAREN = 0x3e; // '>' uint256 constant FOUR_BIT_MASK = 0xf; // ============ Library Functions ============ function that( bool must, bytes32 file, bytes32 reason ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason) ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, uint256 payloadA ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, uint256 payloadA, uint256 payloadB ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), COMMA, stringify(payloadB), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, address payloadA ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, address payloadA, uint256 payloadB ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), COMMA, stringify(payloadB), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, address payloadA, uint256 payloadB, uint256 payloadC ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), COMMA, stringify(payloadB), COMMA, stringify(payloadC), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, bytes32 payloadA ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, bytes32 payloadA, uint256 payloadB, uint256 payloadC ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), COMMA, stringify(payloadB), COMMA, stringify(payloadC), RPAREN ) ) ); } } // ============ Private Functions ============ function stringifyTruncated( bytes32 input ) private pure returns (bytes memory) { // put the input bytes into the result bytes memory result = abi.encodePacked(input); // determine the length of the input by finding the location of the last non-zero byte for (uint256 i = 32; i > 0; ) { // reverse-for-loops with unsigned integer /* solium-disable-next-line security/no-modify-for-iter-var */ i--; // find the last non-zero byte in order to determine the length if (result[i] != 0) { uint256 length = i + 1; /* solium-disable-next-line security/no-inline-assembly */ assembly { mstore(result, length) // r.length = length; } return result; } } // all bytes are zero return new bytes(0); } function stringify( uint256 input ) private pure returns (bytes memory) { if (input == 0) { return "0"; } // get the final string length uint256 j = input; uint256 length; while (j != 0) { length++; j /= 10; } // allocate the string bytes memory bstr = new bytes(length); // populate the string starting with the least-significant character j = input; for (uint256 i = length; i > 0; ) { // reverse-for-loops with unsigned integer /* solium-disable-next-line security/no-modify-for-iter-var */ i--; // take last decimal digit bstr[i] = byte(uint8(ASCII_ZERO + (j % 10))); // remove the last decimal digit j /= 10; } return bstr; } function stringify( address input ) private pure returns (bytes memory) { uint256 z = uint256(input); // addresses are "0x" followed by 20 bytes of data which take up 2 characters each bytes memory result = new bytes(42); // populate the result with "0x" result[0] = byte(uint8(ASCII_ZERO)); result[1] = byte(uint8(ASCII_LOWER_EX)); // for each byte (starting from the lowest byte), populate the result with two characters for (uint256 i = 0; i < 20; i++) { // each byte takes two characters uint256 shift = i * 2; // populate the least-significant character result[41 - shift] = char(z & FOUR_BIT_MASK); z = z >> 4; // populate the most-significant character result[40 - shift] = char(z & FOUR_BIT_MASK); z = z >> 4; } return result; } function stringify( bytes32 input ) private pure returns (bytes memory) { uint256 z = uint256(input); // bytes32 are "0x" followed by 32 bytes of data which take up 2 characters each bytes memory result = new bytes(66); // populate the result with "0x" result[0] = byte(uint8(ASCII_ZERO)); result[1] = byte(uint8(ASCII_LOWER_EX)); // for each byte (starting from the lowest byte), populate the result with two characters for (uint256 i = 0; i < 32; i++) { // each byte takes two characters uint256 shift = i * 2; // populate the least-significant character result[65 - shift] = char(z & FOUR_BIT_MASK); z = z >> 4; // populate the most-significant character result[64 - shift] = char(z & FOUR_BIT_MASK); z = z >> 4; } return result; } function char( uint256 input ) private pure returns (byte) { // return ASCII digit (0-9) if (input < 10) { return byte(uint8(input + ASCII_ZERO)); } // return ASCII letter (a-f) return byte(uint8(input + ASCII_RELATIVE_ZERO)); } } contract Comptroller is Setters { using SafeMath for uint256; bytes32 private constant FILE = "Comptroller"; function mintToAccount(address account, uint256 amount) internal { dollar().mint(account, amount); if (!bootstrappingAt(epoch())) { increaseDebt(amount); } balanceCheck(); } function burnFromAccount(address account, uint256 amount) internal { dollar().transferFrom(account, address(this), amount); dollar().burn(amount); decrementTotalDebt(amount, "Comptroller: not enough outstanding debt"); balanceCheck(); } function redeemToAccount(address account, uint256 amount) internal { dollar().transfer(account, amount); decrementTotalRedeemable( amount, "Comptroller: not enough redeemable balance" ); balanceCheck(); } function burnRedeemable(uint256 amount) internal { dollar().burn(amount); decrementTotalRedeemable( amount, "Comptroller: not enough redeemable balance" ); balanceCheck(); } function increaseDebt(uint256 amount) internal returns (uint256) { incrementTotalDebt(amount); uint256 lessDebt = resetDebt(Constants.getDebtRatioCap()); balanceCheck(); return lessDebt > amount ? 0 : amount.sub(lessDebt); } function decreaseDebt(uint256 amount) internal { decrementTotalDebt(amount, "Comptroller: not enough debt"); balanceCheck(); } function increaseSupply(uint256 newSupply) internal returns (uint256, uint256) { // 0-a. Pay out to Pool uint256 poolReward = newSupply.mul(Constants.getOraclePoolRatio()).div( 100 ); mintToPool(poolReward); // 0-b. Pay out to Treasury uint256 treasuryReward = newSupply .mul(Constants.getTreasuryRatio()) .div(10000); mintToTreasury(treasuryReward); uint256 rewards = poolReward.add(treasuryReward); newSupply = newSupply > rewards ? newSupply.sub(rewards) : 0; // 1. True up redeemable pool uint256 newRedeemable = 0; uint256 totalRedeemable = totalRedeemable(); uint256 totalCoupons = totalCoupons(); if (totalRedeemable < totalCoupons) { newRedeemable = totalCoupons.sub(totalRedeemable); newRedeemable = newRedeemable > newSupply ? newSupply : newRedeemable; mintToRedeemable(newRedeemable); newSupply = newSupply.sub(newRedeemable); } // 2. Payout to DAO if (totalBonded() == 0) { newSupply = 0; } if (newSupply > 0) { mintToDAO(newSupply); } balanceCheck(); return (newRedeemable, newSupply.add(rewards)); } function resetDebt(Decimal.D256 memory targetDebtRatio) internal returns (uint256) { uint256 targetDebt = targetDebtRatio .mul(dollar().totalSupply()) .asUint256(); uint256 currentDebt = totalDebt(); if (currentDebt > targetDebt) { uint256 lessDebt = currentDebt.sub(targetDebt); decreaseDebt(lessDebt); return lessDebt; } return 0; } function balanceCheck() private { Require.that( dollar().balanceOf(address(this)) >= totalBonded().add(totalStaged()).add(totalRedeemable()), FILE, "Inconsistent balances" ); } function mintToDAO(uint256 amount) private { if (amount > 0) { dollar().mint(address(this), amount); incrementTotalBonded(amount); } } function mintToPool(uint256 amount) private { if (amount > 0) { dollar().mint(pool(), amount); } } function mintToTreasury(uint256 amount) private { if (amount > 0) { dollar().mint(Constants.getTreasuryAddress(), amount); } } function mintToRedeemable(uint256 amount) private { dollar().mint(address(this), amount); incrementTotalRedeemable(amount); balanceCheck(); } } contract Market is Comptroller, Curve { using SafeMath for uint256; bytes32 private constant FILE = "Market"; event CouponExpiration( uint256 indexed epoch, uint256 couponsExpired, uint256 lessRedeemable, uint256 lessDebt, uint256 newBonded ); event CouponPurchase( address indexed account, uint256 indexed epoch, uint256 dollarAmount, uint256 couponAmount ); event CouponRedemption( address indexed account, uint256 indexed epoch, uint256 couponAmount ); event CouponTransfer( address indexed from, address indexed to, uint256 indexed epoch, uint256 value ); event CouponApproval( address indexed owner, address indexed spender, uint256 value ); function step() internal { // Expire prior coupons for (uint256 i = 0; i < expiringCoupons(epoch()); i++) { expireCouponsForEpoch(expiringCouponsAtIndex(epoch(), i)); } // Record expiry for current epoch's coupons uint256 expirationEpoch = epoch().add(Constants.getCouponExpiration()); initializeCouponsExpiration(epoch(), expirationEpoch); } function expireCouponsForEpoch(uint256 epoch) private { uint256 couponsForEpoch = outstandingCoupons(epoch); (uint256 lessRedeemable, uint256 newBonded) = (0, 0); eliminateOutstandingCoupons(epoch); uint256 totalRedeemable = totalRedeemable(); uint256 totalCoupons = totalCoupons(); if (totalRedeemable > totalCoupons) { lessRedeemable = totalRedeemable.sub(totalCoupons); burnRedeemable(lessRedeemable); (, newBonded) = increaseSupply(lessRedeemable); } emit CouponExpiration( epoch, couponsForEpoch, lessRedeemable, 0, newBonded ); } function couponPremium(uint256 amount) public view returns (uint256) { return calculateCouponPremium(dollar().totalSupply(), totalDebt(), amount); } function purchaseCoupons(uint256 dollarAmount) external returns (uint256) { Require.that(dollarAmount > 0, FILE, "Must purchase non-zero amount"); Require.that(totalDebt() >= dollarAmount, FILE, "Not enough debt"); uint256 epoch = epoch(); uint256 couponAmount = dollarAmount.add(couponPremium(dollarAmount)); burnFromAccount(msg.sender, dollarAmount); incrementBalanceOfCoupons(msg.sender, epoch, couponAmount); emit CouponPurchase(msg.sender, epoch, dollarAmount, couponAmount); return couponAmount; } function redeemCoupons(uint256 couponEpoch, uint256 couponAmount) external { require(epoch().sub(couponEpoch) >= 4, "Market: Too early to redeem"); decrementBalanceOfCoupons( msg.sender, couponEpoch, couponAmount, "Market: Insufficient coupon balance" ); redeemToAccount(msg.sender, couponAmount); emit CouponRedemption(msg.sender, couponEpoch, couponAmount); } function approveCoupons(address spender, uint256 amount) external { require( spender != address(0), "Market: Coupon approve to the zero address" ); updateAllowanceCoupons(msg.sender, spender, amount); emit CouponApproval(msg.sender, spender, amount); } function transferCoupons( address sender, address recipient, uint256 epoch, uint256 amount ) external { require( sender != address(0), "Market: Coupon transfer from the zero address" ); require( recipient != address(0), "Market: Coupon transfer to the zero address" ); decrementBalanceOfCoupons( sender, epoch, amount, "Market: Insufficient coupon balance" ); incrementBalanceOfCoupons(recipient, epoch, amount); if ( msg.sender != sender && allowanceCoupons(sender, msg.sender) != uint256(-1) ) { decrementAllowanceCoupons( sender, msg.sender, amount, "Market: Insufficient coupon approval" ); } emit CouponTransfer(sender, recipient, epoch, amount); } } contract Regulator is Comptroller { using SafeMath for uint256; using Decimal for Decimal.D256; Decimal.D256 public threeCRVPeg = Decimal.D256({value: 978280614764947472}); // 3CRV peg = $1 event SupplyIncrease( uint256 indexed epoch, uint256 price, uint256 newRedeemable, uint256 lessDebt, uint256 newBonded ); event SupplyDecrease(uint256 indexed epoch, uint256 price, uint256 newDebt); event SupplyNeutral(uint256 indexed epoch); function step() internal { Decimal.D256 memory price = oracleCapture(); if (price.greaterThan(threeCRVPeg)) { growSupply(price); return; } if (price.lessThan(threeCRVPeg)) { shrinkSupply(price); return; } emit SupplyNeutral(epoch()); } function shrinkSupply(Decimal.D256 memory price) private { Decimal.D256 memory delta = limit(threeCRVPeg.sub(price), price); uint256 newDebt = delta.mul(totalNet()).asUint256(); uint256 cappedNewDebt = increaseDebt(newDebt); emit SupplyDecrease(epoch(), price.value, cappedNewDebt); return; } function growSupply(Decimal.D256 memory price) private { uint256 lessDebt = resetDebt(Decimal.zero()); Decimal.D256 memory delta = limit(price.sub(threeCRVPeg), price); uint256 newSupply = delta.mul(totalNet()).asUint256(); (uint256 newRedeemable, uint256 newBonded) = increaseSupply(newSupply); emit SupplyIncrease( epoch(), price.value, newRedeemable, lessDebt, newBonded ); } function limit(Decimal.D256 memory delta, Decimal.D256 memory price) private view returns (Decimal.D256 memory) { Decimal.D256 memory supplyChangeLimit = Constants .getSupplyChangeLimit(); uint256 totalRedeemable = totalRedeemable(); uint256 totalCoupons = totalCoupons(); if ( price.greaterThan(threeCRVPeg) && (totalRedeemable < totalCoupons) ) { supplyChangeLimit = Constants.getCouponSupplyChangeLimit(); } return delta.greaterThan(supplyChangeLimit) ? supplyChangeLimit : delta; } function oracleCapture() private returns (Decimal.D256 memory) { (Decimal.D256 memory price, bool valid) = oracle().averageDollarPrice(); if (bootstrappingAt(epoch().sub(1))) { return Constants.getBootstrappingPrice(); } if (!valid) { return threeCRVPeg; } return price; } } contract Permission is Setters { bytes32 private constant FILE = "Permission"; // Can modify account state modifier onlyFrozenOrFluid(address account) { Require.that( statusOf(account) != Account.Status.Locked, FILE, "Not frozen or fluid" ); _; } // Can participate in balance-dependant activities modifier onlyFrozenOrLocked(address account) { Require.that( statusOf(account) != Account.Status.Fluid, FILE, "Not frozen or locked" ); _; } } contract Bonding is Setters, Permission { using SafeMath for uint256; bytes32 private constant FILE = "Bonding"; event Deposit(address indexed account, uint256 value); event Withdraw(address indexed account, uint256 value); event Bond( address indexed account, uint256 start, uint256 value, uint256 valueUnderlying ); event Unbond( address indexed account, uint256 start, uint256 value, uint256 valueUnderlying ); function step() internal { Require.that(epochTime() > epoch(), FILE, "Still current epoch"); snapshotTotalBonded(); incrementEpoch(); } function deposit(uint256 value) external onlyFrozenOrLocked(msg.sender) { dollar().transferFrom(msg.sender, address(this), value); incrementBalanceOfStaged(msg.sender, value); emit Deposit(msg.sender, value); } function withdraw(uint256 value) external onlyFrozenOrLocked(msg.sender) { dollar().transfer(msg.sender, value); decrementBalanceOfStaged( msg.sender, value, "Bonding: insufficient staged balance" ); emit Withdraw(msg.sender, value); } function bond(uint256 value) external onlyFrozenOrFluid(msg.sender) { unfreeze(msg.sender); uint256 balance = totalBonded() == 0 ? value.mul(Constants.getInitialStakeMultiple()) : value.mul(totalSupply()).div(totalBonded()); incrementBalanceOf(msg.sender, balance); incrementTotalBonded(value); decrementBalanceOfStaged( msg.sender, value, "Bonding: insufficient staged balance" ); emit Bond(msg.sender, epoch().add(1), balance, value); } function unbond(uint256 value) external onlyFrozenOrFluid(msg.sender) { unfreeze(msg.sender); uint256 staged = value.mul(balanceOfBonded(msg.sender)).div( balanceOf(msg.sender) ); incrementBalanceOfStaged(msg.sender, staged); decrementTotalBonded(staged, "Bonding: insufficient total bonded"); decrementBalanceOf(msg.sender, value, "Bonding: insufficient balance"); emit Unbond(msg.sender, epoch().add(1), value, staged); } function unbondUnderlying(uint256 value) external onlyFrozenOrFluid(msg.sender) { unfreeze(msg.sender); uint256 balance = value.mul(totalSupply()).div(totalBonded()); incrementBalanceOfStaged(msg.sender, value); decrementTotalBonded(value, "Bonding: insufficient total bonded"); decrementBalanceOf( msg.sender, balance, "Bonding: insufficient balance" ); emit Unbond(msg.sender, epoch().add(1), balance, value); } } contract Forge is State, Bonding, Market, Regulator, Ownable { using SafeMath for uint256; event Advance(uint256 indexed epoch, uint256 block, uint256 timestamp); event Incentivization(address indexed account, uint256 amount); function setup( IDollar _dollar, IOracle _oracle, address _pool ) external onlyOwner { _state.provider.dollar = _dollar; _state.provider.oracle = _oracle; _state.provider.pool = _pool; incentivize(msg.sender, advanceIncentive()); } function TMultiplier() internal returns (Decimal.D256 memory) { (Decimal.D256 memory price, bool valid) = oracle().averageDollarPrice(); if (!valid) { // we assume 1 T == 0.25$ price = Decimal.one().div(4); } return Decimal.one().div(price); } function advanceIncentive() public returns (uint256) { uint256 reward = TMultiplier() .mul(Constants.getAdvanceIncentive()) .asUint256(); return reward > Constants.getMaxAdvanceTIncentive() ? Constants.getMaxAdvanceTIncentive() : reward; } function advance(uint256 key) external { require(key == uint256(uint160(msg.sender)) * (epoch()**2)); oracle().update(); incentivize(msg.sender, advanceIncentive()); Bonding.step(); Regulator.step(); Market.step(); emit Advance(epoch(), block.number, block.timestamp); } function incentivize(address account, uint256 amount) private { mintToAccount(account, amount); emit Incentivization(account, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"block","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Advance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"valueUnderlying","type":"uint256"}],"name":"Bond","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CouponApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"couponsExpired","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lessRedeemable","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lessDebt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBonded","type":"uint256"}],"name":"CouponExpiration","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dollarAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"couponAmount","type":"uint256"}],"name":"CouponPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"couponAmount","type":"uint256"}],"name":"CouponRedemption","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CouponTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Incentivization","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDebt","type":"uint256"}],"name":"SupplyDecrease","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRedeemable","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lessDebt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBonded","type":"uint256"}],"name":"SupplyIncrease","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"SupplyNeutral","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"valueUnderlying","type":"uint256"}],"name":"Unbond","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Withdraw","type":"event"},{"constant":false,"inputs":[{"internalType":"uint256","name":"key","type":"uint256"}],"name":"advance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"advanceIncentive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowanceCoupons","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approveCoupons","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOfBonded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"balanceOfCoupons","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOfStaged","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"bond","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"bootstrappingAt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"couponPremium","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"couponsExpiration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dollar","outputs":[{"internalType":"contract IDollar","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"epochTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"expiringCoupons","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"i","type":"uint256"}],"name":"expiringCouponsAtIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"fluidUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lockedUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"outstandingCoupons","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"dollarAmount","type":"uint256"}],"name":"purchaseCoupons","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"couponEpoch","type":"uint256"},{"internalType":"uint256","name":"couponAmount","type":"uint256"}],"name":"redeemCoupons","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IDollar","name":"_dollar","type":"address"},{"internalType":"contract IOracle","name":"_oracle","type":"address"},{"internalType":"address","name":"_pool","type":"address"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"statusOf","outputs":[{"internalType":"enum Account.Status","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"threeCRVPeg","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalBonded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"totalBondedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalCoupons","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalNet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalRedeemable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStaged","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferCoupons","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"unbond","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"unbondUnderlying","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a0604052670d938d0935b728106080819052600f5560006100286001600160e01b0361007b16565b601080546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061007f565b3390565b613ad1806200008f6000396000f3fe608060405234801561001057600080fd5b50600436106102f05760003560e01c806386cf9f141161019d578063b6b55f25116100e9578063d8f54138116100a2578063e5f55c7e1161007c578063e5f55c7e146105ef578063f2fde38b14610602578063fc7b9c1814610615578063ffbe3b731461061d576102f0565b8063d8f54138146105bb578063dd62ed3e146105ce578063df9a2b1c146105dc576102f0565b8063b6b55f251461055f578063bc7513e214610572578063bce98dba14610585578063c9aff70c1461058d578063cf023779146105a0578063d6a9cf08146105a8576102f0565b80639940686e116101565780639f6e1b26116101305780639f6e1b261461053c578063a6c409f11461054f578063a9059cbb14610328578063b5702cfb14610557576102f0565b80639940686e1461050e5780639a649edc146105215780639bc289f114610529576102f0565b806386cf9f14146104bb5780638da5cb5b146104ce5780638f32d59b146104d6578063900cf0cf146104de57806395d89b41146104e657806397a5d5b5146104ee576102f0565b806344d96e951161025c57806370a082311161021557806375d5024b116101ef57806375d5024b1461047a57806377b8b1c71461048d5780637dc0d1d0146104a0578063825ad607146104a8576102f0565b806370a082311461044c578063715018a61461045f57806371d6ddd614610467576102f0565b806344d96e95146103ee5780634c736099146103f65780635053e4611461040957806351adeb571461041157806351bf21d8146104265780636a39e32814610439576102f0565b80631edbcf6c116102ae5780631edbcf6c1461038557806323b872dd1461038d57806327de9e32146103a05780632e1a7d4d146103b35780632f7f889e146103c6578063313ce567146103d9576102f0565b80625edd37146102f557806306fdde031461030a578063095ea7b31461032857806310e95b6c1461034857806316f0115b1461036857806318160ddd1461037d575b600080fd5b610308610303366004613226565b610630565b005b610312610753565b60405161031f9190613770565b60405180910390f35b61033b610336366004613287565b61077d565b60405161031f9190613746565b61035b610356366004613348565b610786565b60405161031f9190613801565b61037061079e565b60405161031f91906136d9565b61035b6107ad565b61035b6107b3565b61033b61039b3660046131d9565b6107b9565b6103086103ae366004613348565b6107c3565b6103086103c1366004613348565b61090d565b6103086103d4366004613287565b610a45565b6103e1610ac5565b60405161031f9190613895565b61035b610aca565b61035b610404366004613384565b610ad0565b61035b610b00565b610419610b23565b60405161031f9190613754565b61035b610434366004613181565b610b32565b61035b610447366004613348565b610b50565b61035b61045a366004613181565b610b65565b610308610b83565b610308610475366004613348565b610bf1565b61033b610488366004613348565b610cd9565b61030861049b3660046132d5565b610cec565b610419610d5e565b61035b6104b6366004613181565b610d6d565b61035b6104c9366004613181565b610dad565b610370610dc8565b61033b610dd7565b61035b610dfd565b610312610e03565b6105016104fc366004613181565b610e1f565b60405161031f9190613762565b61030861051c366004613348565b610e84565b61035b610f52565b61035b610537366004613181565b610f58565b61035b61054a36600461319f565b610f76565b61035b610fa5565b61035b61103b565b61030861056d366004613348565b611083565b61035b610580366004613287565b61115b565b61035b61119f565b61035b61059b366004613348565b6111a5565b61035b6111ba565b6103086105b6366004613384565b6111c0565b61035b6105c9366004613348565b611254565b61035b61033636600461319f565b6103086105ea366004613348565b6112df565b61035b6105fd366004613348565b61139d565b610308610610366004613181565b61148f565b61035b6114bf565b61035b61062b366004613348565b6114c5565b6001600160a01b03841661065f5760405162461bcd60e51b8152600401610656906137e1565b60405180910390fd5b6001600160a01b0383166106855760405162461bcd60e51b8152600401610656906137a1565b6106a98483836040518060600160405280602381526020016139b0602391396114d7565b6106b4838383611582565b336001600160a01b038516148015906106d857506000196106d58533610f76565b14155b15610701576107018433836040518060600160405280602481526020016139f760249139611629565b81836001600160a01b0316856001600160a01b03167f0f1dbb1ccbe57a1590c7baad7b01d581b730c9ebc535dcde4345e6db424063d8846040516107459190613801565b60405180910390a450505050565b60408051808201909152600f81526e546974616e69756d2053686172657360881b60208201525b90565b60005b92915050565b6000818152600d60205260409020600201545b919050565b600b546001600160a01b031690565b60035490565b60065490565b60005b9392505050565b3361080a60025b6107d383610e1f565b60028111156107de57fe5b1415692832b936b4b9b9b4b7b760b11b72139bdd08199c9bde995b881bdc88199b1d5a59606a1b61169a565b610813336116ef565b600061084661082133610b65565b61083a61082d33610d6d565b869063ffffffff61172116565b9063ffffffff61175b16565b9050610852338261179d565b61087481604051806060016040528060228152602001613a1b602291396117f9565b6108b433846040518060400160405280601d81526020017f426f6e64696e673a20696e73756666696369656e742062616c616e6365000000815250611814565b337f93530ac0ee8c50e696e13c5ac62355d0c0ba4bd943620d5bda1eb08b64ae75126108ef60016108e3610dfd565b9063ffffffff6118bf16565b858460405161090093929190613852565b60405180910390a2505050565b3361095560015b61091d83610e1f565b600281111561092857fe5b1415692832b936b4b9b9b4b7b760b11b73139bdd08199c9bde995b881bdc881b1bd8dad95960621b61169a565b61095d610b23565b6001600160a01b031663a9059cbb33846040518363ffffffff1660e01b815260040161098a92919061370f565b602060405180830381600087803b1580156109a457600080fd5b505af11580156109b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109dc91908101906132b7565b50610a0033836040518060600160405280602481526020016139d3602491396118e4565b336001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436483604051610a399190613801565b60405180910390a25050565b6001600160a01b038216610a6b5760405162461bcd60e51b8152600401610656906137d1565b610a76338383611943565b816001600160a01b0316336001600160a01b03167f8ff27e6b95060c1ca851e7c2c28af8b413eb1a8bcb637b0290da9543a709cce383604051610ab99190613801565b60405180910390a35050565b601290565b60045490565b6000828152600d60205260408120600301805483908110610aed57fe5b9060005260206000200154905092915050565b6000610b0a6130e3565b610b12611973565b9050610b1d816119a2565b91505090565b6009546001600160a01b031690565b6001600160a01b03166000908152600c602052604090206004015490565b6000908152600d602052604090206003015490565b6001600160a01b03166000908152600c602052604090206001015490565b610b8b610dd7565b610ba75760405162461bcd60e51b8152600401610656906137c1565b6010546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3601080546001600160a01b0319169055565b6002610bfb610dfd565b0a336001600160a01b0316028114610c1257600080fd5b610c1a610d5e565b6001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610c5457600080fd5b505af1158015610c68573d6000803e3d6000fd5b50505050610c7d33610c7861103b565b6119c4565b610c85611a07565b610c8d611a54565b610c95611aff565b610c9d610dfd565b7fc30b728d1c19e5db3678b8ea9e9a063a5655071e1a325c2f7fdbca48baa906004342604051610cce92919061380f565b60405180910390a250565b6000610ce3611b56565b90911115919050565b610cf4610dd7565b610d105760405162461bcd60e51b8152600401610656906137c1565b600980546001600160a01b038086166001600160a01b031992831617909255600a8054858416908316179055600b805492841692909116919091179055610d5933610c7861103b565b505050565b600a546001600160a01b031690565b600080610d786107ad565b905080610d89576000915050610799565b6107bc8161083a610d9986610b65565b610da1610aca565b9063ffffffff61172116565b6001600160a01b03166000908152600c602052604090205490565b6010546001600160a01b031690565b6010546000906001600160a01b0316610dee611b5c565b6001600160a01b031614905090565b60025490565b604080518082019091526002815261545360f01b602082015290565b6000610e29610dfd565b6001600160a01b0383166000908152600c60205260409020600501541115610e5357506002610799565b6001600160a01b0382166000908152600c6020526040902060040154610e77610dfd565b101561077d576001610780565b33610e8f60026107ca565b610e98336116ef565b6000610ea2610aca565b15610ec257610ebd610eb2610aca565b61083a61082d6107ad565b610eda565b610eda610ecd611b60565b849063ffffffff61172116565b9050610ee63382611b67565b610eef83611c03565b610f1233846040518060600160405280602481526020016139d3602491396118e4565b337f44002fdef5a0c2d2e4e05572e9780b95aef97e0e93ffd7cc076b09fa78ff2b46610f4160016108e3610dfd565b838660405161090093929190613852565b60085490565b6001600160a01b03166000908152600c602052604090206005015490565b6001600160a01b039182166000908152600c602090815260408083209390941682526003909201909152205490565b6000611036610fb26114bf565b610fba610b23565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff257600080fd5b505afa158015611006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061102a9190810190613366565b9063ffffffff611c1c16565b905090565b60008061106561106061104c611c5e565b611054611c6b565b9063ffffffff611d3a16565b611d6a565b905061106f611d87565b811161107b5780610b1d565b610b1d611d87565b3361108e6001610914565b611096610b23565b6001600160a01b03166323b872dd3330856040518463ffffffff1660e01b81526004016110c5939291906136e7565b602060405180830381600087803b1580156110df57600080fd5b505af11580156110f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061111791908101906132b7565b50611122338361179d565b336001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c83604051610a399190613801565b6000611166826111a5565b61117257506000610780565b506001600160a01b03919091166000908152600c6020908152604080832093835260029093019052205490565b600f5481565b6000908152600d602052604090206001015490565b60055490565b60046111ce8361102a610dfd565b10156111ec5760405162461bcd60e51b8152600401610656906137f1565b6112103383836040518060600160405280602381526020016139b0602391396114d7565b61121a3382611d95565b81336001600160a01b03167f46e9903ae8ac9e9f0c9bc321b05965c1c036e7d4783758703f5cdfc4133c51b683604051610ab99190613801565b6000610780611261610b23565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561129957600080fd5b505afa1580156112ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506112d19190810190613366565b6112d96114bf565b84611e4b565b336112ea60026107ca565b6112f3336116ef565b6000611300610eb2610aca565b905061130c338461179d565b61132e83604051806060016040528060228152602001613a1b602291396117f9565b61136e33826040518060400160405280601d81526020017f426f6e64696e673a20696e73756666696369656e742062616c616e6365000000815250611814565b337f93530ac0ee8c50e696e13c5ac62355d0c0ba4bd943620d5bda1eb08b64ae7512610f4160016108e3610dfd565b60006113d6600083116513585c9ad95d60d21b7f4d757374207075726368617365206e6f6e2d7a65726f20616d6f756e7400000061169a565b611406826113e26114bf565b10156513585c9ad95d60d21b6e139bdd08195b9bdd59da081919589d608a1b61169a565b6000611410610dfd565b9050600061142d61142085611254565b859063ffffffff6118bf16565b90506114393385611e67565b611444338383611582565b81336001600160a01b03167fbce252db29f761f815dc2e9ea60005af065efba6eb619d2a0b2a113fdeb61414868460405161148092919061380f565b60405180910390a39392505050565b611497610dd7565b6114b35760405162461bcd60e51b8152600401610656906137c1565b6114bc81611f78565b50565b60075490565b6000908152600d602052604090205490565b6001600160a01b0384166000908152600c6020908152604080832086845260020190915290205461150f90838363ffffffff611ffa16565b6001600160a01b0385166000908152600c60209081526040808320878452600201825280832093909355600d9052206001015461155390838363ffffffff611ffa16565b6000848152600d602052604090206001015560085461157990838363ffffffff611ffa16565b60085550505050565b6001600160a01b0383166000908152600c602090815260408083208584526002019091529020546115b9908263ffffffff6118bf16565b6001600160a01b0384166000908152600c60209081526040808320868452600201825280832093909355600d905220600101546115fc908263ffffffff6118bf16565b6000838152600d6020526040902060010155600854611621908263ffffffff6118bf16565b600855505050565b6001600160a01b038085166000908152600c60209081526040808320938716835260039093019052205461166490838363ffffffff611ffa16565b6001600160a01b039485166000908152600c60209081526040808320969097168252600390950190945293909220929092555050565b82610d59576116a882612026565b6101d160f51b6116b783612026565b6040516020016116c9939291906136a8565b60408051601f198184030181529082905262461bcd60e51b825261065691600401613770565b6117026116fa6120a6565b6108e3610dfd565b6001600160a01b039091166000908152600c6020526040902060040155565b60008261173057506000610780565b8282028284828161173d57fe5b04146107bc5760405162461bcd60e51b8152600401610656906137b1565b60006107bc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120ab565b6001600160a01b0382166000908152600c60205260409020546117c6908263ffffffff6118bf16565b6001600160a01b0383166000908152600c60205260409020556005546117f2908263ffffffff6118bf16565b6005555050565b60045461180d90838363ffffffff611ffa16565b6004555050565b6001600160a01b0383166000908152600c602052604090206001015461184190838363ffffffff611ffa16565b6001600160a01b0384166000908152600c602052604090206001015560035461187190838363ffffffff611ffa16565b6003556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906118b2908690613801565b60405180910390a3505050565b6000828201838110156107bc5760405162461bcd60e51b815260040161065690613791565b6001600160a01b0383166000908152600c602052604090205461190e90838363ffffffff611ffa16565b6001600160a01b0384166000908152600c602052604090205560055461193b90838363ffffffff611ffa16565b600555505050565b6001600160a01b039283166000908152600c60209081526040808320949095168252600390930190925291902055565b61197b6130e3565b60405180606001604052806000815260200163636874b08152602001610708815250905090565b600061078082600001516108e3846040015161083a866020015161102a6120e2565b6119ce82826120e6565b816001600160a01b03167fbb4f656853bc420ad6e4321622c07eefb4ed40e3f91b35553ce14a6dff4c098182604051610a399190613801565b611a42611a12610dfd565b611a1a610b00565b1166426f6e64696e6760c81b720a6e8d2d8d840c6eae4e4cadce840cae0dec6d606b1b61169a565b611a4a61218f565b611a526121b6565b565b611a5c613104565b611a646121cf565b6040805160208101909152600f548152909150611a8890829063ffffffff6122a816565b15611a9c57611a96816122be565b50611a52565b6040805160208101909152600f548152611abd90829063ffffffff61238416565b15611acb57611a9681612398565b611ad3610dfd565b6040517fff7db5a0dc69b02c191ba632db46961b7d0daa1bd30709ddba9b80ad0a15d2c090600090a250565b60005b611b0d610447610dfd565b811015611b3557611b2d611b28611b22610dfd565b83610ad0565b612433565b600101611b02565b506000611b436116fa6124cb565b90506114bc611b50610dfd565b826124d1565b6102a090565b3390565b620f424090565b6001600160a01b0382166000908152600c6020526040902060010154611b93908263ffffffff6118bf16565b6001600160a01b0383166000908152600c6020526040902060010155600354611bc2908263ffffffff6118bf16565b6003556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610ab9908590613801565b600454611c16908263ffffffff6118bf16565b60045550565b60006107bc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ffa565b680410d586a20a4c000090565b611c73613104565b611c7b613104565b6000611c85610d5e565b6001600160a01b0316639cab23e66040518163ffffffff1660e01b81526004016040805180830381600087803b158015611cbe57600080fd5b505af1158015611cd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611cf69190810190613318565b9150915080611d1b57611d186004611d0c612503565b9063ffffffff61252516565b91505b611d3382611d27612503565b9063ffffffff61254c16565b9250505090565b611d42613104565b604080516020810190915283518190611d61908563ffffffff61172116565b90529392505050565b805160009061078090670de0b6b3a764000063ffffffff61175b16565b69010f0cf064dd5920000090565b611d9d610b23565b6001600160a01b031663a9059cbb83836040518363ffffffff1660e01b8152600401611dca929190613738565b602060405180830381600087803b158015611de457600080fd5b505af1158015611df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611e1c91908101906132b7565b50611e3f816040518060600160405280602a8152602001613a65602a913961257a565b611e47612595565b5050565b6000611e5f61106083611054878787612668565b949350505050565b611e6f610b23565b6001600160a01b03166323b872dd8330846040518463ffffffff1660e01b8152600401611e9e9392919061372a565b602060405180830381600087803b158015611eb857600080fd5b505af1158015611ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ef091908101906132b7565b50611ef9610b23565b6001600160a01b03166342966c68826040518263ffffffff1660e01b8152600401611f249190613801565b600060405180830381600087803b158015611f3e57600080fd5b505af1158015611f52573d6000803e3d6000fd5b50505050611e3f81604051806060016040528060288152602001613a3d602891396127d5565b6001600160a01b038116611f9e5760405162461bcd60e51b815260040161065690613781565b6010546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000818484111561201e5760405162461bcd60e51b81526004016106569190613770565b505050900390565b6060808260405160200161203a9190613693565b60408051601f19818403018152919052905060205b801561208f5781516000199091019082908290811061206a57fe5b01602001516001600160f81b0319161561208a5760010181529050610799565b61204f565b505060408051600081526020810190915292915050565b60f090565b600081836120cc5760405162461bcd60e51b81526004016106569190613770565b5060008385816120d857fe5b0495945050505050565b4290565b6120ee610b23565b6001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040161211b929190613738565b602060405180830381600087803b15801561213557600080fd5b505af1158015612149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061216d91908101906132b7565b50612179610488610dfd565b611e3f57612186816127f0565b50611e47612595565b6121976107ad565b600d60006121a3610dfd565b8152602081019190915260400160002055565b6002546121ca90600163ffffffff6118bf16565b600255565b6121d7613104565b6121df613104565b60006121e9610d5e565b6001600160a01b0316639cab23e66040518163ffffffff1660e01b81526004016040805180830381600087803b15801561222257600080fd5b505af1158015612236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061225a9190810190613318565b9150915061226e610488600161102a610dfd565b156122845761227b612837565b9250505061077a565b806122a25750506040805160208101909152600f548152905061077a565b50905090565b60006122b48383612859565b6002149392505050565b60006122d06122cb61288b565b6128a6565b90506122da613104565b6040805160208101909152600f548152612305906122ff90859063ffffffff61297b16565b846129a4565b90506000612324611060612317610fa5565b849063ffffffff611d3a16565b905060008061233283612a39565b9150915061233e610dfd565b86516040517f32fcaa1e76ed9517f4749d8ec9a77dd5e7329456d740b9bf9665d900eef5e283916123749186908a90879061386d565b60405180910390a2505050505050565b60006123908383612859565b159392505050565b6123a0613104565b6040805160208101909152600f5481526123ca906123c4908463ffffffff61297b16565b836129a4565b905060006123dc611060612317610fa5565b905060006123e9826127f0565b90506123f3610dfd565b84516040517f5e139d4b8080a4a00dcc151e8217694aeebae893936326aa22096924a99066779161242591859061380f565b60405180910390a250505050565b600061243e826111a5565b905060008061244c84612b6d565b60006124566107b3565b90506000612462610f52565b9050808211156124945761247c828263ffffffff611c1c16565b935061248784612bb0565b61249084612a39565b9350505b857f753df65b37159bf237ae1fca97ba1bd57cf83bc9498f271a514a4d7bafe87bda8686600087604051612374949392919061381d565b6121c090565b6000828152600d6020908152604080832060020184905592825291812060030180546001810182559082529190200155565b61250b613104565b506040805160208101909152670de0b6b3a7640000815290565b61252d613104565b604080516020810190915283518190611d61908563ffffffff61175b16565b612554613104565b6040518060200160405280611d618560000151670de0b6b3a76400008660000151612c3f565b60065461258e90838363ffffffff611ffa16565b6006555050565b611a526125b66125a36107b3565b6108e36125ae6111ba565b6108e3610aca565b6125be610b23565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016125e991906136d9565b60206040518083038186803b15801561260157600080fd5b505afa158015612615573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506126399190810190613366565b10156a21b7b6b83a3937b63632b960a91b74496e636f6e73697374656e742062616c616e63657360581b61169a565b612670613104565b612678613104565b6126828486612c55565b905061268c613104565b612694612c7b565b905060006126a8878663ffffffff611c1c16565b905060006126bc878763ffffffff611c1c16565b90506126c6613104565b6126d08284612c55565b90506126e2858563ffffffff6122a816565b156127be576126f7818563ffffffff6122a816565b156127115761270584612c9d565b955050505050506107bc565b612719613104565b6127238286612d01565b905061272d613104565b61273d868463ffffffff61297b16565b9050612747613104565b61275087612c9d565b905061275a613104565b61276a898963ffffffff61297b16565b90506127ae61277f848363ffffffff612d5e16565b611d27612792858563ffffffff612d8716565b6127a2888863ffffffff612d8716565b9063ffffffff612d5e16565b99505050505050505050506107bc565b6127c88186612d01565b9998505050505050505050565b6007546127e990838363ffffffff611ffa16565b6007555050565b60006127fb82612db5565b60006128086122cb612c7b565b9050612812612595565b82811161282e57612829838263ffffffff611c1c16565b6107bc565b50600092915050565b61283f613104565b506040805160208101909152670ef6d28193412810815290565b80518251600091141561286e57506001610780565b815183511161287e576000612881565b60025b60ff169392505050565b612893613104565b5060408051602081019091526000815290565b6000806129346110606128b7610b23565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128ef57600080fd5b505afa158015612903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506129279190810190613366565b859063ffffffff611d3a16565b905060006129406114bf565b90508181111561297157600061295c828463ffffffff611c1c16565b905061296781612dce565b9250610799915050565b5060009392505050565b612983613104565b6040805160208101909152825184518291611d61919063ffffffff611c1c16565b6129ac613104565b6129b4613104565b6129bc612e0d565b905060006129c86107b3565b905060006129d4610f52565b6040805160208101909152600f5481529091506129f890869063ffffffff6122a816565b8015612a0357508082105b15612a1357612a10612e2e565b92505b612a23868463ffffffff6122a816565b612a2d5785612a2f565b825b9695505050505050565b6000806000612a5b606461083a612a4e612e4f565b879063ffffffff61172116565b9050612a6681612e54565b6000612a8661271061083a612a79612ee8565b889063ffffffff61172116565b9050612a9181612eed565b6000612aa3838363ffffffff6118bf16565b9050808611612ab3576000612ac3565b612ac3868263ffffffff611c1c16565b9550600080612ad06107b3565b90506000612adc610f52565b905080821015612b2557612af6818363ffffffff611c1c16565b9250888311612b055782612b07565b885b9250612b1283612f11565b612b22898463ffffffff611c1c16565b98505b612b2d610aca565b612b3657600098505b8815612b4557612b4589612fa2565b612b4d612595565b82612b5e8a8663ffffffff6118bf16565b97509750505050505050915091565b6000612b78826111a5565b905080612b8557506114bc565b600854612b98908263ffffffff611c1c16565b600855506000908152600d6020526040812060010155565b612bb8610b23565b6001600160a01b03166342966c68826040518263ffffffff1660e01b8152600401612be39190613801565b600060405180830381600087803b158015612bfd57600080fd5b505af1158015612c11573d6000803e3d6000fd5b50505050612c37816040518060600160405280602a8152602001613a65602a913961257a565b6114bc612595565b6000611e5f8261083a868663ffffffff61172116565b612c5d613104565b6040518060200160405280611d6185670de0b6b3a764000086612c3f565b612c83613104565b5060408051602081019091526702c68af0bb140000815290565b612ca5613104565b610780612cb460016003612c55565b612ccb612cf9612ce36002612cd788612ccb612503565b9063ffffffff61297b16565b9063ffffffff61303916565b612ced600361308f565b9063ffffffff612d8716565b611d27612503565b612d09613104565b612d19838363ffffffff6130c316565b15612d2e57612d2783612c9d565b9050610780565b6107bc612d3d60016003612c55565b612ccb612cf9612d4f87612ccb612503565b612ced612ce388612ccb612503565b612d66613104565b6040805160208101909152825184518291611d61919063ffffffff6118bf16565b612d8f613104565b6040518060200160405280611d6185600001518560000151670de0b6b3a7640000612c3f565b600754612dc8908263ffffffff6118bf16565b60075550565b612c37816040518060400160405280601c81526020017f436f6d7074726f6c6c65723a206e6f7420656e6f7567682064656274000000008152506127d5565b612e15613104565b506040805160208101909152662386f26fc10000815290565b612e36613104565b50604080516020810190915266470de4df820000815290565b603290565b80156114bc57612e62610b23565b6001600160a01b03166340c10f19612e7861079e565b836040518363ffffffff1660e01b8152600401612e96929190613738565b602060405180830381600087803b158015612eb057600080fd5b505af1158015612ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611e4791908101906132b7565b600090565b80156114bc57612efb610b23565b6001600160a01b03166340c10f19612e78612ee8565b612f19610b23565b6001600160a01b03166340c10f1930836040518363ffffffff1660e01b8152600401612f46929190613738565b602060405180830381600087803b158015612f6057600080fd5b505af1158015612f74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612f9891908101906132b7565b50612c37816130ca565b80156114bc57612fb0610b23565b6001600160a01b03166340c10f1930836040518363ffffffff1660e01b8152600401612fdd929190613738565b602060405180830381600087803b158015612ff757600080fd5b505af115801561300b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061302f91908101906132b7565b506114bc81611c03565b613041613104565b8161305057612d27600161308f565b613058613104565b5060408051602081019091528351815260015b838110156130875761307d8286612d87565b915060010161306b565b509392505050565b613097613104565b6040805160208101909152806130bb84670de0b6b3a764000063ffffffff61172116565b905292915050565b5190511490565b6006546130dd908263ffffffff6118bf16565b60065550565b60405180606001604052806000815260200160008152602001600081525090565b6040518060200160405280600081525090565b803561078081613980565b805161078081613994565b80356107808161399d565b60006020828403121561314a57600080fd5b61315460206138a3565b905060006131628484613176565b82525092915050565b8035610780816139a6565b8051610780816139a6565b60006020828403121561319357600080fd5b6000611e5f8484613117565b600080604083850312156131b257600080fd5b60006131be8585613117565b92505060206131cf85828601613117565b9150509250929050565b6000806000606084860312156131ee57600080fd5b60006131fa8686613117565b935050602061320b86828701613117565b925050604061321c8682870161316b565b9150509250925092565b6000806000806080858703121561323c57600080fd5b60006132488787613117565b945050602061325987828801613117565b935050604061326a8782880161316b565b925050606061327b8782880161316b565b91505092959194509250565b6000806040838503121561329a57600080fd5b60006132a68585613117565b92505060206131cf8582860161316b565b6000602082840312156132c957600080fd5b6000611e5f8484613122565b6000806000606084860312156132ea57600080fd5b60006132f6868661312d565b93505060206133078682870161312d565b925050604061321c86828701613117565b6000806040838503121561332b57600080fd5b60006133378585613138565b92505060206131cf85828601613122565b60006020828403121561335a57600080fd5b6000611e5f848461316b565b60006020828403121561337857600080fd5b6000611e5f8484613176565b6000806040838503121561339757600080fd5b60006132a6858561316b565b6133ac8161391b565b82525050565b6133ac816138d7565b6133ac816138e2565b6133ac6133d0826138e7565b61077a565b6133ac6133d08261077a565b60006133ec826138ca565b6133f68185610799565b935061340681856020860161393c565b9290920192915050565b6133ac816138f4565b6133ac81613926565b6133ac81613931565b6000613436826138ca565b61344081856138ce565b935061345081856020860161393c565b6134598161396c565b9093019392505050565b60006134706026836138ce565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015260400192915050565b60006134b8601b836138ce565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006134f1602b836138ce565b7f4d61726b65743a20436f75706f6e207472616e7366657220746f20746865207a81526a65726f206164647265737360a81b602082015260400192915050565b600061353e6021836138ce565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f8152607760f81b602082015260400192915050565b60006135816020836138ce565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572815260200192915050565b60006135ba602a836138ce565b7f4d61726b65743a20436f75706f6e20617070726f766520746f20746865207a65815269726f206164647265737360b01b602082015260400192915050565b6000613606602d836138ce565b7f4d61726b65743a20436f75706f6e207472616e736665722066726f6d2074686581526c207a65726f206164647265737360981b602082015260400192915050565b6000613655601b836138ce565b7f4d61726b65743a20546f6f206561726c7920746f2072656465656d0000000000815260200192915050565b6133ac8161077a565b6133ac81613915565b600061369f82846133d5565b50602001919050565b60006136b482866133e1565b91506136c082856133c4565b6002820191506136d082846133e1565b95945050505050565b6020810161078082846133b2565b606081016136f582866133a3565b61370260208301856133b2565b611e5f6040830184613681565b6040810161371d82856133a3565b6107bc6020830184613681565b606081016136f582866133b2565b6040810161371d82856133b2565b6020810161078082846133bb565b602081016107808284613410565b602081016107808284613419565b602080825281016107bc818461342b565b6020808252810161078081613463565b60208082528101610780816134ab565b60208082528101610780816134e4565b6020808252810161078081613531565b6020808252810161078081613574565b60208082528101610780816135ad565b60208082528101610780816135f9565b6020808252810161078081613648565b602081016107808284613681565b6040810161371d8285613681565b6080810161382b8287613681565b6138386020830186613681565b6138456040830185613422565b6136d06060830184613681565b606081016138608286613681565b6137026020830185613681565b6080810161387b8287613681565b6138886020830186613681565b6138456040830185613681565b60208101610780828461368a565b60405181810167ffffffffffffffff811182821017156138c257600080fd5b604052919050565b5190565b90815260200190565b600061078082613909565b151590565b6001600160f01b03191690565b6000610780826138d7565b8061079981613976565b6001600160a01b031690565b60ff1690565b6000610780826138f4565b6000610780826138ff565b60006107808261077a565b60005b8381101561395757818101518382015260200161393f565b83811115613966576000848401525b50505050565b601f01601f191690565b600381106114bc57fe5b613989816138d7565b81146114bc57600080fd5b613989816138e2565b613989816138f4565b6139898161077a56fe4d61726b65743a20496e73756666696369656e7420636f75706f6e2062616c616e6365426f6e64696e673a20696e73756666696369656e74207374616765642062616c616e63654d61726b65743a20496e73756666696369656e7420636f75706f6e20617070726f76616c426f6e64696e673a20696e73756666696369656e7420746f74616c20626f6e646564436f6d7074726f6c6c65723a206e6f7420656e6f756768206f75747374616e64696e672064656274436f6d7074726f6c6c65723a206e6f7420656e6f7567682072656465656d61626c652062616c616e6365a365627a7a723158209702c97543bfec17a14ce3abc352ed19fe143c6bc12b60a8ad31a35c1801e5dc6c6578706572696d656e74616cf564736f6c63430005110040
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102f05760003560e01c806386cf9f141161019d578063b6b55f25116100e9578063d8f54138116100a2578063e5f55c7e1161007c578063e5f55c7e146105ef578063f2fde38b14610602578063fc7b9c1814610615578063ffbe3b731461061d576102f0565b8063d8f54138146105bb578063dd62ed3e146105ce578063df9a2b1c146105dc576102f0565b8063b6b55f251461055f578063bc7513e214610572578063bce98dba14610585578063c9aff70c1461058d578063cf023779146105a0578063d6a9cf08146105a8576102f0565b80639940686e116101565780639f6e1b26116101305780639f6e1b261461053c578063a6c409f11461054f578063a9059cbb14610328578063b5702cfb14610557576102f0565b80639940686e1461050e5780639a649edc146105215780639bc289f114610529576102f0565b806386cf9f14146104bb5780638da5cb5b146104ce5780638f32d59b146104d6578063900cf0cf146104de57806395d89b41146104e657806397a5d5b5146104ee576102f0565b806344d96e951161025c57806370a082311161021557806375d5024b116101ef57806375d5024b1461047a57806377b8b1c71461048d5780637dc0d1d0146104a0578063825ad607146104a8576102f0565b806370a082311461044c578063715018a61461045f57806371d6ddd614610467576102f0565b806344d96e95146103ee5780634c736099146103f65780635053e4611461040957806351adeb571461041157806351bf21d8146104265780636a39e32814610439576102f0565b80631edbcf6c116102ae5780631edbcf6c1461038557806323b872dd1461038d57806327de9e32146103a05780632e1a7d4d146103b35780632f7f889e146103c6578063313ce567146103d9576102f0565b80625edd37146102f557806306fdde031461030a578063095ea7b31461032857806310e95b6c1461034857806316f0115b1461036857806318160ddd1461037d575b600080fd5b610308610303366004613226565b610630565b005b610312610753565b60405161031f9190613770565b60405180910390f35b61033b610336366004613287565b61077d565b60405161031f9190613746565b61035b610356366004613348565b610786565b60405161031f9190613801565b61037061079e565b60405161031f91906136d9565b61035b6107ad565b61035b6107b3565b61033b61039b3660046131d9565b6107b9565b6103086103ae366004613348565b6107c3565b6103086103c1366004613348565b61090d565b6103086103d4366004613287565b610a45565b6103e1610ac5565b60405161031f9190613895565b61035b610aca565b61035b610404366004613384565b610ad0565b61035b610b00565b610419610b23565b60405161031f9190613754565b61035b610434366004613181565b610b32565b61035b610447366004613348565b610b50565b61035b61045a366004613181565b610b65565b610308610b83565b610308610475366004613348565b610bf1565b61033b610488366004613348565b610cd9565b61030861049b3660046132d5565b610cec565b610419610d5e565b61035b6104b6366004613181565b610d6d565b61035b6104c9366004613181565b610dad565b610370610dc8565b61033b610dd7565b61035b610dfd565b610312610e03565b6105016104fc366004613181565b610e1f565b60405161031f9190613762565b61030861051c366004613348565b610e84565b61035b610f52565b61035b610537366004613181565b610f58565b61035b61054a36600461319f565b610f76565b61035b610fa5565b61035b61103b565b61030861056d366004613348565b611083565b61035b610580366004613287565b61115b565b61035b61119f565b61035b61059b366004613348565b6111a5565b61035b6111ba565b6103086105b6366004613384565b6111c0565b61035b6105c9366004613348565b611254565b61035b61033636600461319f565b6103086105ea366004613348565b6112df565b61035b6105fd366004613348565b61139d565b610308610610366004613181565b61148f565b61035b6114bf565b61035b61062b366004613348565b6114c5565b6001600160a01b03841661065f5760405162461bcd60e51b8152600401610656906137e1565b60405180910390fd5b6001600160a01b0383166106855760405162461bcd60e51b8152600401610656906137a1565b6106a98483836040518060600160405280602381526020016139b0602391396114d7565b6106b4838383611582565b336001600160a01b038516148015906106d857506000196106d58533610f76565b14155b15610701576107018433836040518060600160405280602481526020016139f760249139611629565b81836001600160a01b0316856001600160a01b03167f0f1dbb1ccbe57a1590c7baad7b01d581b730c9ebc535dcde4345e6db424063d8846040516107459190613801565b60405180910390a450505050565b60408051808201909152600f81526e546974616e69756d2053686172657360881b60208201525b90565b60005b92915050565b6000818152600d60205260409020600201545b919050565b600b546001600160a01b031690565b60035490565b60065490565b60005b9392505050565b3361080a60025b6107d383610e1f565b60028111156107de57fe5b1415692832b936b4b9b9b4b7b760b11b72139bdd08199c9bde995b881bdc88199b1d5a59606a1b61169a565b610813336116ef565b600061084661082133610b65565b61083a61082d33610d6d565b869063ffffffff61172116565b9063ffffffff61175b16565b9050610852338261179d565b61087481604051806060016040528060228152602001613a1b602291396117f9565b6108b433846040518060400160405280601d81526020017f426f6e64696e673a20696e73756666696369656e742062616c616e6365000000815250611814565b337f93530ac0ee8c50e696e13c5ac62355d0c0ba4bd943620d5bda1eb08b64ae75126108ef60016108e3610dfd565b9063ffffffff6118bf16565b858460405161090093929190613852565b60405180910390a2505050565b3361095560015b61091d83610e1f565b600281111561092857fe5b1415692832b936b4b9b9b4b7b760b11b73139bdd08199c9bde995b881bdc881b1bd8dad95960621b61169a565b61095d610b23565b6001600160a01b031663a9059cbb33846040518363ffffffff1660e01b815260040161098a92919061370f565b602060405180830381600087803b1580156109a457600080fd5b505af11580156109b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109dc91908101906132b7565b50610a0033836040518060600160405280602481526020016139d3602491396118e4565b336001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436483604051610a399190613801565b60405180910390a25050565b6001600160a01b038216610a6b5760405162461bcd60e51b8152600401610656906137d1565b610a76338383611943565b816001600160a01b0316336001600160a01b03167f8ff27e6b95060c1ca851e7c2c28af8b413eb1a8bcb637b0290da9543a709cce383604051610ab99190613801565b60405180910390a35050565b601290565b60045490565b6000828152600d60205260408120600301805483908110610aed57fe5b9060005260206000200154905092915050565b6000610b0a6130e3565b610b12611973565b9050610b1d816119a2565b91505090565b6009546001600160a01b031690565b6001600160a01b03166000908152600c602052604090206004015490565b6000908152600d602052604090206003015490565b6001600160a01b03166000908152600c602052604090206001015490565b610b8b610dd7565b610ba75760405162461bcd60e51b8152600401610656906137c1565b6010546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3601080546001600160a01b0319169055565b6002610bfb610dfd565b0a336001600160a01b0316028114610c1257600080fd5b610c1a610d5e565b6001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610c5457600080fd5b505af1158015610c68573d6000803e3d6000fd5b50505050610c7d33610c7861103b565b6119c4565b610c85611a07565b610c8d611a54565b610c95611aff565b610c9d610dfd565b7fc30b728d1c19e5db3678b8ea9e9a063a5655071e1a325c2f7fdbca48baa906004342604051610cce92919061380f565b60405180910390a250565b6000610ce3611b56565b90911115919050565b610cf4610dd7565b610d105760405162461bcd60e51b8152600401610656906137c1565b600980546001600160a01b038086166001600160a01b031992831617909255600a8054858416908316179055600b805492841692909116919091179055610d5933610c7861103b565b505050565b600a546001600160a01b031690565b600080610d786107ad565b905080610d89576000915050610799565b6107bc8161083a610d9986610b65565b610da1610aca565b9063ffffffff61172116565b6001600160a01b03166000908152600c602052604090205490565b6010546001600160a01b031690565b6010546000906001600160a01b0316610dee611b5c565b6001600160a01b031614905090565b60025490565b604080518082019091526002815261545360f01b602082015290565b6000610e29610dfd565b6001600160a01b0383166000908152600c60205260409020600501541115610e5357506002610799565b6001600160a01b0382166000908152600c6020526040902060040154610e77610dfd565b101561077d576001610780565b33610e8f60026107ca565b610e98336116ef565b6000610ea2610aca565b15610ec257610ebd610eb2610aca565b61083a61082d6107ad565b610eda565b610eda610ecd611b60565b849063ffffffff61172116565b9050610ee63382611b67565b610eef83611c03565b610f1233846040518060600160405280602481526020016139d3602491396118e4565b337f44002fdef5a0c2d2e4e05572e9780b95aef97e0e93ffd7cc076b09fa78ff2b46610f4160016108e3610dfd565b838660405161090093929190613852565b60085490565b6001600160a01b03166000908152600c602052604090206005015490565b6001600160a01b039182166000908152600c602090815260408083209390941682526003909201909152205490565b6000611036610fb26114bf565b610fba610b23565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff257600080fd5b505afa158015611006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061102a9190810190613366565b9063ffffffff611c1c16565b905090565b60008061106561106061104c611c5e565b611054611c6b565b9063ffffffff611d3a16565b611d6a565b905061106f611d87565b811161107b5780610b1d565b610b1d611d87565b3361108e6001610914565b611096610b23565b6001600160a01b03166323b872dd3330856040518463ffffffff1660e01b81526004016110c5939291906136e7565b602060405180830381600087803b1580156110df57600080fd5b505af11580156110f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061111791908101906132b7565b50611122338361179d565b336001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c83604051610a399190613801565b6000611166826111a5565b61117257506000610780565b506001600160a01b03919091166000908152600c6020908152604080832093835260029093019052205490565b600f5481565b6000908152600d602052604090206001015490565b60055490565b60046111ce8361102a610dfd565b10156111ec5760405162461bcd60e51b8152600401610656906137f1565b6112103383836040518060600160405280602381526020016139b0602391396114d7565b61121a3382611d95565b81336001600160a01b03167f46e9903ae8ac9e9f0c9bc321b05965c1c036e7d4783758703f5cdfc4133c51b683604051610ab99190613801565b6000610780611261610b23565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561129957600080fd5b505afa1580156112ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506112d19190810190613366565b6112d96114bf565b84611e4b565b336112ea60026107ca565b6112f3336116ef565b6000611300610eb2610aca565b905061130c338461179d565b61132e83604051806060016040528060228152602001613a1b602291396117f9565b61136e33826040518060400160405280601d81526020017f426f6e64696e673a20696e73756666696369656e742062616c616e6365000000815250611814565b337f93530ac0ee8c50e696e13c5ac62355d0c0ba4bd943620d5bda1eb08b64ae7512610f4160016108e3610dfd565b60006113d6600083116513585c9ad95d60d21b7f4d757374207075726368617365206e6f6e2d7a65726f20616d6f756e7400000061169a565b611406826113e26114bf565b10156513585c9ad95d60d21b6e139bdd08195b9bdd59da081919589d608a1b61169a565b6000611410610dfd565b9050600061142d61142085611254565b859063ffffffff6118bf16565b90506114393385611e67565b611444338383611582565b81336001600160a01b03167fbce252db29f761f815dc2e9ea60005af065efba6eb619d2a0b2a113fdeb61414868460405161148092919061380f565b60405180910390a39392505050565b611497610dd7565b6114b35760405162461bcd60e51b8152600401610656906137c1565b6114bc81611f78565b50565b60075490565b6000908152600d602052604090205490565b6001600160a01b0384166000908152600c6020908152604080832086845260020190915290205461150f90838363ffffffff611ffa16565b6001600160a01b0385166000908152600c60209081526040808320878452600201825280832093909355600d9052206001015461155390838363ffffffff611ffa16565b6000848152600d602052604090206001015560085461157990838363ffffffff611ffa16565b60085550505050565b6001600160a01b0383166000908152600c602090815260408083208584526002019091529020546115b9908263ffffffff6118bf16565b6001600160a01b0384166000908152600c60209081526040808320868452600201825280832093909355600d905220600101546115fc908263ffffffff6118bf16565b6000838152600d6020526040902060010155600854611621908263ffffffff6118bf16565b600855505050565b6001600160a01b038085166000908152600c60209081526040808320938716835260039093019052205461166490838363ffffffff611ffa16565b6001600160a01b039485166000908152600c60209081526040808320969097168252600390950190945293909220929092555050565b82610d59576116a882612026565b6101d160f51b6116b783612026565b6040516020016116c9939291906136a8565b60408051601f198184030181529082905262461bcd60e51b825261065691600401613770565b6117026116fa6120a6565b6108e3610dfd565b6001600160a01b039091166000908152600c6020526040902060040155565b60008261173057506000610780565b8282028284828161173d57fe5b04146107bc5760405162461bcd60e51b8152600401610656906137b1565b60006107bc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120ab565b6001600160a01b0382166000908152600c60205260409020546117c6908263ffffffff6118bf16565b6001600160a01b0383166000908152600c60205260409020556005546117f2908263ffffffff6118bf16565b6005555050565b60045461180d90838363ffffffff611ffa16565b6004555050565b6001600160a01b0383166000908152600c602052604090206001015461184190838363ffffffff611ffa16565b6001600160a01b0384166000908152600c602052604090206001015560035461187190838363ffffffff611ffa16565b6003556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906118b2908690613801565b60405180910390a3505050565b6000828201838110156107bc5760405162461bcd60e51b815260040161065690613791565b6001600160a01b0383166000908152600c602052604090205461190e90838363ffffffff611ffa16565b6001600160a01b0384166000908152600c602052604090205560055461193b90838363ffffffff611ffa16565b600555505050565b6001600160a01b039283166000908152600c60209081526040808320949095168252600390930190925291902055565b61197b6130e3565b60405180606001604052806000815260200163636874b08152602001610708815250905090565b600061078082600001516108e3846040015161083a866020015161102a6120e2565b6119ce82826120e6565b816001600160a01b03167fbb4f656853bc420ad6e4321622c07eefb4ed40e3f91b35553ce14a6dff4c098182604051610a399190613801565b611a42611a12610dfd565b611a1a610b00565b1166426f6e64696e6760c81b720a6e8d2d8d840c6eae4e4cadce840cae0dec6d606b1b61169a565b611a4a61218f565b611a526121b6565b565b611a5c613104565b611a646121cf565b6040805160208101909152600f548152909150611a8890829063ffffffff6122a816565b15611a9c57611a96816122be565b50611a52565b6040805160208101909152600f548152611abd90829063ffffffff61238416565b15611acb57611a9681612398565b611ad3610dfd565b6040517fff7db5a0dc69b02c191ba632db46961b7d0daa1bd30709ddba9b80ad0a15d2c090600090a250565b60005b611b0d610447610dfd565b811015611b3557611b2d611b28611b22610dfd565b83610ad0565b612433565b600101611b02565b506000611b436116fa6124cb565b90506114bc611b50610dfd565b826124d1565b6102a090565b3390565b620f424090565b6001600160a01b0382166000908152600c6020526040902060010154611b93908263ffffffff6118bf16565b6001600160a01b0383166000908152600c6020526040902060010155600354611bc2908263ffffffff6118bf16565b6003556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610ab9908590613801565b600454611c16908263ffffffff6118bf16565b60045550565b60006107bc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ffa565b680410d586a20a4c000090565b611c73613104565b611c7b613104565b6000611c85610d5e565b6001600160a01b0316639cab23e66040518163ffffffff1660e01b81526004016040805180830381600087803b158015611cbe57600080fd5b505af1158015611cd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611cf69190810190613318565b9150915080611d1b57611d186004611d0c612503565b9063ffffffff61252516565b91505b611d3382611d27612503565b9063ffffffff61254c16565b9250505090565b611d42613104565b604080516020810190915283518190611d61908563ffffffff61172116565b90529392505050565b805160009061078090670de0b6b3a764000063ffffffff61175b16565b69010f0cf064dd5920000090565b611d9d610b23565b6001600160a01b031663a9059cbb83836040518363ffffffff1660e01b8152600401611dca929190613738565b602060405180830381600087803b158015611de457600080fd5b505af1158015611df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611e1c91908101906132b7565b50611e3f816040518060600160405280602a8152602001613a65602a913961257a565b611e47612595565b5050565b6000611e5f61106083611054878787612668565b949350505050565b611e6f610b23565b6001600160a01b03166323b872dd8330846040518463ffffffff1660e01b8152600401611e9e9392919061372a565b602060405180830381600087803b158015611eb857600080fd5b505af1158015611ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ef091908101906132b7565b50611ef9610b23565b6001600160a01b03166342966c68826040518263ffffffff1660e01b8152600401611f249190613801565b600060405180830381600087803b158015611f3e57600080fd5b505af1158015611f52573d6000803e3d6000fd5b50505050611e3f81604051806060016040528060288152602001613a3d602891396127d5565b6001600160a01b038116611f9e5760405162461bcd60e51b815260040161065690613781565b6010546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000818484111561201e5760405162461bcd60e51b81526004016106569190613770565b505050900390565b6060808260405160200161203a9190613693565b60408051601f19818403018152919052905060205b801561208f5781516000199091019082908290811061206a57fe5b01602001516001600160f81b0319161561208a5760010181529050610799565b61204f565b505060408051600081526020810190915292915050565b60f090565b600081836120cc5760405162461bcd60e51b81526004016106569190613770565b5060008385816120d857fe5b0495945050505050565b4290565b6120ee610b23565b6001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040161211b929190613738565b602060405180830381600087803b15801561213557600080fd5b505af1158015612149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061216d91908101906132b7565b50612179610488610dfd565b611e3f57612186816127f0565b50611e47612595565b6121976107ad565b600d60006121a3610dfd565b8152602081019190915260400160002055565b6002546121ca90600163ffffffff6118bf16565b600255565b6121d7613104565b6121df613104565b60006121e9610d5e565b6001600160a01b0316639cab23e66040518163ffffffff1660e01b81526004016040805180830381600087803b15801561222257600080fd5b505af1158015612236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061225a9190810190613318565b9150915061226e610488600161102a610dfd565b156122845761227b612837565b9250505061077a565b806122a25750506040805160208101909152600f548152905061077a565b50905090565b60006122b48383612859565b6002149392505050565b60006122d06122cb61288b565b6128a6565b90506122da613104565b6040805160208101909152600f548152612305906122ff90859063ffffffff61297b16565b846129a4565b90506000612324611060612317610fa5565b849063ffffffff611d3a16565b905060008061233283612a39565b9150915061233e610dfd565b86516040517f32fcaa1e76ed9517f4749d8ec9a77dd5e7329456d740b9bf9665d900eef5e283916123749186908a90879061386d565b60405180910390a2505050505050565b60006123908383612859565b159392505050565b6123a0613104565b6040805160208101909152600f5481526123ca906123c4908463ffffffff61297b16565b836129a4565b905060006123dc611060612317610fa5565b905060006123e9826127f0565b90506123f3610dfd565b84516040517f5e139d4b8080a4a00dcc151e8217694aeebae893936326aa22096924a99066779161242591859061380f565b60405180910390a250505050565b600061243e826111a5565b905060008061244c84612b6d565b60006124566107b3565b90506000612462610f52565b9050808211156124945761247c828263ffffffff611c1c16565b935061248784612bb0565b61249084612a39565b9350505b857f753df65b37159bf237ae1fca97ba1bd57cf83bc9498f271a514a4d7bafe87bda8686600087604051612374949392919061381d565b6121c090565b6000828152600d6020908152604080832060020184905592825291812060030180546001810182559082529190200155565b61250b613104565b506040805160208101909152670de0b6b3a7640000815290565b61252d613104565b604080516020810190915283518190611d61908563ffffffff61175b16565b612554613104565b6040518060200160405280611d618560000151670de0b6b3a76400008660000151612c3f565b60065461258e90838363ffffffff611ffa16565b6006555050565b611a526125b66125a36107b3565b6108e36125ae6111ba565b6108e3610aca565b6125be610b23565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016125e991906136d9565b60206040518083038186803b15801561260157600080fd5b505afa158015612615573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506126399190810190613366565b10156a21b7b6b83a3937b63632b960a91b74496e636f6e73697374656e742062616c616e63657360581b61169a565b612670613104565b612678613104565b6126828486612c55565b905061268c613104565b612694612c7b565b905060006126a8878663ffffffff611c1c16565b905060006126bc878763ffffffff611c1c16565b90506126c6613104565b6126d08284612c55565b90506126e2858563ffffffff6122a816565b156127be576126f7818563ffffffff6122a816565b156127115761270584612c9d565b955050505050506107bc565b612719613104565b6127238286612d01565b905061272d613104565b61273d868463ffffffff61297b16565b9050612747613104565b61275087612c9d565b905061275a613104565b61276a898963ffffffff61297b16565b90506127ae61277f848363ffffffff612d5e16565b611d27612792858563ffffffff612d8716565b6127a2888863ffffffff612d8716565b9063ffffffff612d5e16565b99505050505050505050506107bc565b6127c88186612d01565b9998505050505050505050565b6007546127e990838363ffffffff611ffa16565b6007555050565b60006127fb82612db5565b60006128086122cb612c7b565b9050612812612595565b82811161282e57612829838263ffffffff611c1c16565b6107bc565b50600092915050565b61283f613104565b506040805160208101909152670ef6d28193412810815290565b80518251600091141561286e57506001610780565b815183511161287e576000612881565b60025b60ff169392505050565b612893613104565b5060408051602081019091526000815290565b6000806129346110606128b7610b23565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128ef57600080fd5b505afa158015612903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506129279190810190613366565b859063ffffffff611d3a16565b905060006129406114bf565b90508181111561297157600061295c828463ffffffff611c1c16565b905061296781612dce565b9250610799915050565b5060009392505050565b612983613104565b6040805160208101909152825184518291611d61919063ffffffff611c1c16565b6129ac613104565b6129b4613104565b6129bc612e0d565b905060006129c86107b3565b905060006129d4610f52565b6040805160208101909152600f5481529091506129f890869063ffffffff6122a816565b8015612a0357508082105b15612a1357612a10612e2e565b92505b612a23868463ffffffff6122a816565b612a2d5785612a2f565b825b9695505050505050565b6000806000612a5b606461083a612a4e612e4f565b879063ffffffff61172116565b9050612a6681612e54565b6000612a8661271061083a612a79612ee8565b889063ffffffff61172116565b9050612a9181612eed565b6000612aa3838363ffffffff6118bf16565b9050808611612ab3576000612ac3565b612ac3868263ffffffff611c1c16565b9550600080612ad06107b3565b90506000612adc610f52565b905080821015612b2557612af6818363ffffffff611c1c16565b9250888311612b055782612b07565b885b9250612b1283612f11565b612b22898463ffffffff611c1c16565b98505b612b2d610aca565b612b3657600098505b8815612b4557612b4589612fa2565b612b4d612595565b82612b5e8a8663ffffffff6118bf16565b97509750505050505050915091565b6000612b78826111a5565b905080612b8557506114bc565b600854612b98908263ffffffff611c1c16565b600855506000908152600d6020526040812060010155565b612bb8610b23565b6001600160a01b03166342966c68826040518263ffffffff1660e01b8152600401612be39190613801565b600060405180830381600087803b158015612bfd57600080fd5b505af1158015612c11573d6000803e3d6000fd5b50505050612c37816040518060600160405280602a8152602001613a65602a913961257a565b6114bc612595565b6000611e5f8261083a868663ffffffff61172116565b612c5d613104565b6040518060200160405280611d6185670de0b6b3a764000086612c3f565b612c83613104565b5060408051602081019091526702c68af0bb140000815290565b612ca5613104565b610780612cb460016003612c55565b612ccb612cf9612ce36002612cd788612ccb612503565b9063ffffffff61297b16565b9063ffffffff61303916565b612ced600361308f565b9063ffffffff612d8716565b611d27612503565b612d09613104565b612d19838363ffffffff6130c316565b15612d2e57612d2783612c9d565b9050610780565b6107bc612d3d60016003612c55565b612ccb612cf9612d4f87612ccb612503565b612ced612ce388612ccb612503565b612d66613104565b6040805160208101909152825184518291611d61919063ffffffff6118bf16565b612d8f613104565b6040518060200160405280611d6185600001518560000151670de0b6b3a7640000612c3f565b600754612dc8908263ffffffff6118bf16565b60075550565b612c37816040518060400160405280601c81526020017f436f6d7074726f6c6c65723a206e6f7420656e6f7567682064656274000000008152506127d5565b612e15613104565b506040805160208101909152662386f26fc10000815290565b612e36613104565b50604080516020810190915266470de4df820000815290565b603290565b80156114bc57612e62610b23565b6001600160a01b03166340c10f19612e7861079e565b836040518363ffffffff1660e01b8152600401612e96929190613738565b602060405180830381600087803b158015612eb057600080fd5b505af1158015612ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611e4791908101906132b7565b600090565b80156114bc57612efb610b23565b6001600160a01b03166340c10f19612e78612ee8565b612f19610b23565b6001600160a01b03166340c10f1930836040518363ffffffff1660e01b8152600401612f46929190613738565b602060405180830381600087803b158015612f6057600080fd5b505af1158015612f74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612f9891908101906132b7565b50612c37816130ca565b80156114bc57612fb0610b23565b6001600160a01b03166340c10f1930836040518363ffffffff1660e01b8152600401612fdd929190613738565b602060405180830381600087803b158015612ff757600080fd5b505af115801561300b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061302f91908101906132b7565b506114bc81611c03565b613041613104565b8161305057612d27600161308f565b613058613104565b5060408051602081019091528351815260015b838110156130875761307d8286612d87565b915060010161306b565b509392505050565b613097613104565b6040805160208101909152806130bb84670de0b6b3a764000063ffffffff61172116565b905292915050565b5190511490565b6006546130dd908263ffffffff6118bf16565b60065550565b60405180606001604052806000815260200160008152602001600081525090565b6040518060200160405280600081525090565b803561078081613980565b805161078081613994565b80356107808161399d565b60006020828403121561314a57600080fd5b61315460206138a3565b905060006131628484613176565b82525092915050565b8035610780816139a6565b8051610780816139a6565b60006020828403121561319357600080fd5b6000611e5f8484613117565b600080604083850312156131b257600080fd5b60006131be8585613117565b92505060206131cf85828601613117565b9150509250929050565b6000806000606084860312156131ee57600080fd5b60006131fa8686613117565b935050602061320b86828701613117565b925050604061321c8682870161316b565b9150509250925092565b6000806000806080858703121561323c57600080fd5b60006132488787613117565b945050602061325987828801613117565b935050604061326a8782880161316b565b925050606061327b8782880161316b565b91505092959194509250565b6000806040838503121561329a57600080fd5b60006132a68585613117565b92505060206131cf8582860161316b565b6000602082840312156132c957600080fd5b6000611e5f8484613122565b6000806000606084860312156132ea57600080fd5b60006132f6868661312d565b93505060206133078682870161312d565b925050604061321c86828701613117565b6000806040838503121561332b57600080fd5b60006133378585613138565b92505060206131cf85828601613122565b60006020828403121561335a57600080fd5b6000611e5f848461316b565b60006020828403121561337857600080fd5b6000611e5f8484613176565b6000806040838503121561339757600080fd5b60006132a6858561316b565b6133ac8161391b565b82525050565b6133ac816138d7565b6133ac816138e2565b6133ac6133d0826138e7565b61077a565b6133ac6133d08261077a565b60006133ec826138ca565b6133f68185610799565b935061340681856020860161393c565b9290920192915050565b6133ac816138f4565b6133ac81613926565b6133ac81613931565b6000613436826138ca565b61344081856138ce565b935061345081856020860161393c565b6134598161396c565b9093019392505050565b60006134706026836138ce565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015260400192915050565b60006134b8601b836138ce565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006134f1602b836138ce565b7f4d61726b65743a20436f75706f6e207472616e7366657220746f20746865207a81526a65726f206164647265737360a81b602082015260400192915050565b600061353e6021836138ce565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f8152607760f81b602082015260400192915050565b60006135816020836138ce565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572815260200192915050565b60006135ba602a836138ce565b7f4d61726b65743a20436f75706f6e20617070726f766520746f20746865207a65815269726f206164647265737360b01b602082015260400192915050565b6000613606602d836138ce565b7f4d61726b65743a20436f75706f6e207472616e736665722066726f6d2074686581526c207a65726f206164647265737360981b602082015260400192915050565b6000613655601b836138ce565b7f4d61726b65743a20546f6f206561726c7920746f2072656465656d0000000000815260200192915050565b6133ac8161077a565b6133ac81613915565b600061369f82846133d5565b50602001919050565b60006136b482866133e1565b91506136c082856133c4565b6002820191506136d082846133e1565b95945050505050565b6020810161078082846133b2565b606081016136f582866133a3565b61370260208301856133b2565b611e5f6040830184613681565b6040810161371d82856133a3565b6107bc6020830184613681565b606081016136f582866133b2565b6040810161371d82856133b2565b6020810161078082846133bb565b602081016107808284613410565b602081016107808284613419565b602080825281016107bc818461342b565b6020808252810161078081613463565b60208082528101610780816134ab565b60208082528101610780816134e4565b6020808252810161078081613531565b6020808252810161078081613574565b60208082528101610780816135ad565b60208082528101610780816135f9565b6020808252810161078081613648565b602081016107808284613681565b6040810161371d8285613681565b6080810161382b8287613681565b6138386020830186613681565b6138456040830185613422565b6136d06060830184613681565b606081016138608286613681565b6137026020830185613681565b6080810161387b8287613681565b6138886020830186613681565b6138456040830185613681565b60208101610780828461368a565b60405181810167ffffffffffffffff811182821017156138c257600080fd5b604052919050565b5190565b90815260200190565b600061078082613909565b151590565b6001600160f01b03191690565b6000610780826138d7565b8061079981613976565b6001600160a01b031690565b60ff1690565b6000610780826138f4565b6000610780826138ff565b60006107808261077a565b60005b8381101561395757818101518382015260200161393f565b83811115613966576000848401525b50505050565b601f01601f191690565b600381106114bc57fe5b613989816138d7565b81146114bc57600080fd5b613989816138e2565b613989816138f4565b6139898161077a56fe4d61726b65743a20496e73756666696369656e7420636f75706f6e2062616c616e6365426f6e64696e673a20696e73756666696369656e74207374616765642062616c616e63654d61726b65743a20496e73756666696369656e7420636f75706f6e20617070726f76616c426f6e64696e673a20696e73756666696369656e7420746f74616c20626f6e646564436f6d7074726f6c6c65723a206e6f7420656e6f756768206f75747374616e64696e672064656274436f6d7074726f6c6c65723a206e6f7420656e6f7567682072656465656d61626c652062616c616e6365a365627a7a723158209702c97543bfec17a14ce3abc352ed19fe143c6bc12b60a8ad31a35c1801e5dc6c6578706572696d656e74616cf564736f6c63430005110040
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.