ERC-20
Overview
Max Total Supply
2,000,000 COFFIN
Holders
5
Total Transfers
-
Market
Price
$0.00 @ 0.000000 FTM
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
Coffin
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "./TaxableToken.sol"; contract Coffin is TaxableToken, Initializable { using SafeMath for uint256; uint256 public constant genesis_supply = 2_000_000 ether; // for initial liquidity. // uint256 public constant REWARD_ALLOCATION = 98_000_000 ether; // uint256 public rewardClaimed; function init( address _maker ) external initializer onlyOwner { coffin_pools[_maker] = true; coffin_pools_array.push(_maker); _mint(msg.sender, genesis_supply); } function reward_mint(address recipient, uint256 amount) public onlyPools { require(amount > 0, "invalidAmount"); require(recipient != address(0), "!rewardController"); uint256 _remainingRewards = REWARD_ALLOCATION - rewardClaimed; require(amount <= _remainingRewards, "exceedRewards"); rewardClaimed = rewardClaimed + amount; super._mint(recipient, amount); emit Minted(msg.sender, recipient, amount); } // constructor() TaxableToken("TestToken", "testSHARE") {} constructor() TaxableToken("CoffinToken", "COFFIN") {} event MaxTotalSupplyUpdated(uint256 _newCap); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT // coffin finance pragma solidity ^0.8.7; // pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./CoffinOracle.sol"; import "./PoolToken.sol"; import "./libs/Babylonian.sol"; import './interfaces/ITaxableTokenPolicy.sol'; contract TaxableToken is PoolToken { using SafeMath for uint256; address public coffinOracle; // fixed tax rate uint16 public staticTaxRate = 0; // latest tax rate uint16 public latestTaxRate = 0; // Address of the Tax Office address public taxOffice; // Address of the tax collector wallet address public taxCollectorAddress; // Tax Policy address public policy; // bool public using_twap; // Dollar Price threshold below which taxes will get burned uint256 public burnThreshold = 0.98e18; uint256 public taxThreshold = 1e18; // bool public taxActivated = false; bool public autoCalculateTax = false; address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD; uint16 public maxTaxRate = 2000; // basis tax rate. 0.05% by default. // believe it should be bigger than flashloan fee. // C.R.E.A.M => 0.03% , AAVE => 0.09%. uint16 public basisTaxRate = 5; uint32 public adjustTaxRateA = 2000000; uint32 public adjustTaxRateB = 4; mapping(address => bool) private _isExcluded; address[] private _excluded; // modifier modifier onlyOwnerOrTaxOffice() { require( owner() == msg.sender || taxOffice == msg.sender, "Caller is not the owner or the tax office" ); _; } // constructor constructor(string memory _name, string memory _symbol) PoolToken(_name, _symbol) {} // internal // get current coUSD price function _getCoUSDPrice() public view returns (uint256 _price) { if (using_twap) { (uint256 __price, uint8 __d) = ICoffinOracle(coffinOracle) .getTwapCOUSDUSD(); _price = __price * (10**(18 - __d)); } else { (uint256 __price, uint8 __d) = ICoffinOracle(coffinOracle) .getCOUSDUSD(); _price = __price * (10**(18 - __d)); } } function setTaxPolicy(address _policy) external onlyOwner { require(_policy!=address(0), 'wrong tax policy' ); policy = _policy; } function calcAutoTaxRate(uint256 _cousdPrice) public view returns (uint16) { if (policy==address(0)) { return 0; } return ITaxableTokenPolicy(policy).calcTaxRate( _cousdPrice, taxThreshold, adjustTaxRateA, adjustTaxRateB, basisTaxRate, maxTaxRate ); } function getTaxInfo() private view returns ( uint16 _currentTaxRate, uint16 _staticTaxRate, uint256 _burnThreshold, uint256 _taxThreshold, bool _taxActivated, bool _autoCalculateTax, uint16 _maxTaxRate, uint32 _adjustTaxRateA, bool _burnTax, uint256 _currentCoUSDPrice, uint256 __rawPrice, uint8 __rawDecimal, uint32 _adjustTaxRateB ) { _burnThreshold = burnThreshold; _taxThreshold = taxThreshold; _taxActivated = taxActivated; _autoCalculateTax = autoCalculateTax; _maxTaxRate = maxTaxRate; _adjustTaxRateA = adjustTaxRateA; _staticTaxRate = staticTaxRate; (_currentTaxRate, _burnTax, _currentCoUSDPrice) = _getTaxInfo(); (__rawPrice, __rawDecimal) = ICoffinOracle(coffinOracle).getCOUSDUSD(); _adjustTaxRateB = adjustTaxRateB; } function _getTaxInfo() private view returns ( uint16 currentTaxRate, bool burnTax, uint256 currentCoUSDPrice ) { if (taxActivated) { (currentCoUSDPrice) = _getCoUSDPrice(); if (currentCoUSDPrice > 0 && currentCoUSDPrice < taxThreshold) { if (currentCoUSDPrice < burnThreshold) { burnTax = true; } if (autoCalculateTax) { currentTaxRate = calcAutoTaxRate(currentCoUSDPrice); } else { currentTaxRate = staticTaxRate; } } } } function _transfer( address sender, address recipient, uint256 amount ) internal override { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); (uint16 currentTaxRate, bool burnTax, ) = _getTaxInfo(); latestTaxRate = currentTaxRate; if ( currentTaxRate == 0 || coffin_pools[sender] || coffin_pools[recipient] || _isExcluded[sender] || _isExcluded[recipient] ) { super._transfer(sender, recipient, amount); } else { _transferWithTax( sender, recipient, amount, currentTaxRate, burnTax ); } } function _transferWithTax( address sender, address recipient, uint256 amount, uint16 _taxRate, bool burnTax ) internal returns (bool) { uint256 taxAmount = amount.mul(_taxRate).div(10000); uint256 amountAfterTax = amount.sub(taxAmount); if (burnTax) { // Burn tax if (taxAmount>0) { super._burn(sender, taxAmount); } } else { // Transfer tax to tax collector if (taxAmount>0) { super._transfer(sender, taxCollectorAddress, taxAmount); } } // Transfer amount after tax to recipient if (amountAfterTax>0) { super._transfer(sender, recipient, amountAfterTax); } return true; } /********** onlyOwnerOrTaxOffice ************/ // set coffinOracle function setCoffinOracle(address _coffinOracle) public onlyOwnerOrTaxOffice { require( _coffinOracle != address(0), "oracle address cannot be 0 address" ); coffinOracle = _coffinOracle; } function enableAutoCalculateTax() public onlyOwnerOrTaxOffice { autoCalculateTax = true; } function disableAutoCalculateTax() public onlyOwnerOrTaxOffice { autoCalculateTax = false; } function enableTwap() public onlyOwnerOrTaxOffice { using_twap = true; } function disablTwap() public onlyOwnerOrTaxOffice { using_twap = false; } function enableTax() public onlyOwnerOrTaxOffice { taxActivated = true; } function disableTax() public onlyOwnerOrTaxOffice { taxActivated = false; } function setTaxOffice(address _taxOffice) public onlyOwnerOrTaxOffice { require( _taxOffice != address(0), "tax office address cannot be 0 address" ); emit TaxOfficeTransferred(taxOffice, _taxOffice); taxOffice = _taxOffice; } function setTaxCollectorAddress(address _taxCollectorAddress) public onlyOwnerOrTaxOffice { require( _taxCollectorAddress != address(0), "tax collector address must be non-zero address" ); taxCollectorAddress = _taxCollectorAddress; } function excludeAddressFromTax(address account) external onlyOwnerOrTaxOffice returns (bool) { require(!_isExcluded[account], "Account is already excluded"); _isExcluded[account] = true; return true; } function includeAddressInTax(address account) external onlyOwnerOrTaxOffice returns (bool) { require(_isExcluded[account], "Account is already included"); _isExcluded[account] = false; return true; } function isExcluded(address account) public view returns (bool) { return _isExcluded[account]; } function setTaxThreshold(uint256 _taxThreshold) public onlyOwnerOrTaxOffice returns (bool) { taxThreshold = _taxThreshold; return true; } function setBurnThreshold(uint256 _burnThreshold) public onlyOwnerOrTaxOffice returns (bool) { burnThreshold = _burnThreshold; return true; } function setStaticTaxRate(uint16 _staticTaxRate) public onlyOwnerOrTaxOffice { require(staticTaxRate < 2500, "Tax rates are too high. "); staticTaxRate = _staticTaxRate; } function setBasisTaxRate(uint16 _basisTaxRate) public onlyOwnerOrTaxOffice { require(basisTaxRate < 300, "basis tax rates should be only few. "); basisTaxRate = _basisTaxRate; } function setMaxTaxRate(uint16 _maxTaxRate) public onlyOwnerOrTaxOffice { require(_maxTaxRate < 5000, "Tax rates are too high."); maxTaxRate = _maxTaxRate; } function setAdjustTaxRateA(uint32 _adjustTaxRate) public onlyOwnerOrTaxOffice { // for adjustmentA adjustTaxRateA = _adjustTaxRate; } function setAdjustTaxRateB(uint32 _adjustTaxRate) public onlyOwnerOrTaxOffice { // for adjustmentB adjustTaxRateB = _adjustTaxRate; } event TaxOfficeTransferred(address oldAddress, address newAddress); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); unchecked { _approve(account, _msgSender(), currentAllowance - amount); } _burn(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract 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() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the 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 virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the 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) { return a + b; } /** * @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 a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IUniswapV2Router02.sol"; import "./interfaces/IUniswapV2Factory.sol"; import "./interfaces/IUniswapLP.sol"; import "./libs/FixedPoint.sol"; import "./interfaces/IBandStdReference.sol"; interface ICoffinOracle { function PERIOD() external view returns (uint32); function getCOFFINUSD() external view returns (uint256, uint8); function updateTwap(address token0, address token1) external ; function getCOUSDUSD() external view returns (uint256, uint8); function getTwapCOUSDUSD() external view returns (uint256, uint8); function getTwapCOFFINUSD() external view returns (uint256, uint8); function getTwapXCOFFINUSD() external view returns (uint256, uint8); function updateTwapDollar() external ; function updateTwapCoffin() external ; function updateTwapXCoffin() external ; function getXCOFFINUSD() external view returns (uint256, uint8); function getCOUSDFTM() external view returns (uint256, uint8); function getXCOFFINFTM() external view returns (uint256, uint8); function getCOFFINFTM() external view returns (uint256, uint8); function getFTMUSD() external view returns (uint256, uint8); } contract MockCoffinOracle is ICoffinOracle, Ownable { uint256 public xcoffinftm = (1 / 2) * 1 * 10**18; uint256 public coffinftm = 2 * 1 * 10**18; uint256 public ftmusd = (1 / 4) * 1 * 10**18; uint256 public cousdftm = (101 / 100) * 4 * 1 * 10**18; uint32 public override PERIOD = 600; // 10-minute TWAP function updateTwap(address token0, address token1) external override { } function updateTwapDollar() external override{ } function updateTwapCoffin() external override{ } function updateTwapXCoffin() external override{ } function setCOUSDFTM(uint256 val) external { cousdftm = val; } function getCOUSDFTM() public view override returns (uint256, uint8) { return (cousdftm, 18); } function setXCOFFINFTM(uint256 val) external { xcoffinftm = val; } function getXCOFFINFTM() public view override returns (uint256, uint8) { return (xcoffinftm, 18); } function setCOFFINFTM(uint256 val) external { coffinftm = val; } function getCOFFINFTM() public view override returns (uint256, uint8) { return (coffinftm, 18); } uint256 public cousdusd = 1030000000000000000; function setCOUSDUSD(uint256 val) external { cousdusd = val;// decimal 18 } function getCOUSDUSD() public view override returns(uint256,uint8){ return (cousdusd,18);// decimal 18 } function setFTMUSD(uint256 val) external { ftmusd = val; } function getFTMUSD() public view override returns (uint256, uint8) { return (ftmusd, 18); } function getCOFFINUSD() public view override returns (uint256, uint8) { (uint256 v1, uint8 d1) = getCOFFINFTM(); (uint256 v2, uint8 d2) = getFTMUSD(); return ((v1 * v2) / (10**d1), d2); } function getXCOFFINUSD() public view override returns (uint256, uint8) { (uint256 v1, uint8 d1) = getXCOFFINFTM(); (uint256 v2, uint8 d2) = getFTMUSD(); return ((v1 * v2) / (10**d1), d2); } function getTwapCOUSDUSD() external view override returns (uint256, uint8){ return getCOUSDUSD(); } function getTwapCOFFINUSD() external view override returns (uint256, uint8){ return getCOFFINUSD(); } function getTwapXCOFFINUSD() external view override returns (uint256, uint8){ return getXCOFFINUSD(); } } contract CoffinOracle is ICoffinOracle, Initializable,Ownable { using SafeMath for uint256; using FixedPoint for *; IUniswapV2Router02 public uniswapv2router; address public coffin; address public dollar; address public xcoffin; address public wftm = 0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83; address public usdc = 0x04068DA6C83AFCFA0e13ba15A6696662335D5B75; address public dai = 0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E; address public boo = 0x841FAD6EAe12c286d1Fd18d1d525DFfA75C7EFFE; IBandStdReference bandRef; uint32 public override PERIOD = 600; // 10-minute TWAP struct Pair { uint256 price0CumulativeLast; uint256 price1CumulativeLast; uint32 blockTimestampLast; FixedPoint.uq112x112 price0Average; FixedPoint.uq112x112 price1Average; bool initialized; } mapping(address => Pair) public getPair; function setPeriod(uint32 _period) external onlyOwner { PERIOD = _period; } function init( address _coffinAddress, address _cousdAddress, address _xcoffinAddress ) external initializer onlyOwner{ // router address. it's spooky router by default. address routerAddress = 0xF491e7B69E4244ad4002BC14e878a34207E38c29; setRouter(routerAddress); address fantomBandProtocol = 0x56E2898E0ceFF0D1222827759B56B28Ad812f92F; setBandOracle(fantomBandProtocol); setCOFFINAddress(_coffinAddress); setDollarAddress(_cousdAddress); setXCOFFINAddress(_xcoffinAddress); } function getBandRate(string memory token0, string memory token1) public view returns (uint256) { IBandStdReference.ReferenceData memory data = bandRef.getReferenceData( token0, token1 ); return data.rate; } function getFTMUSD() public view override returns (uint256, uint8) { return (getBandRate("FTM","USD"), 18); } function setCOFFINAddress(address _coffinAddress) public onlyOwner { coffin = _coffinAddress; } function setXCOFFINAddress(address _xcoffinAddress) public onlyOwner { xcoffin = _xcoffinAddress; } function setDollarAddress(address _cousdAddress) public onlyOwner { dollar = _cousdAddress; } function setRouter(address _uniswapv2routeraddress) public onlyOwner { uniswapv2router = IUniswapV2Router02(_uniswapv2routeraddress); } function setBandOracle(address _bandOracleAddress) public onlyOwner { bandRef = IBandStdReference(_bandOracleAddress); } function getCOFFINUSD() external view override returns (uint256, uint8) { (uint256 v1, uint8 d1) = getCOFFINFTM(); (uint256 v2, uint8 d2) = getFTMUSD(); return ((v1 * v2) / (10**d1), d2); } function getTwapCOFFINUSD() external view override returns (uint256, uint8) { (uint256 v1, uint8 d1) = getTwapCOFFINFTM(); (uint256 v2, uint8 d2) = getFTMUSD(); return ((v1 * v2) / (10**d1), d2); } function getCOUSDUSD() external view override returns (uint256, uint8) { // (uint256 v1, uint8 d1) = getTwapCOUSDFTM(); (uint256 v1, uint8 d1) = getCOUSDFTM(); (uint256 v2, uint8 d2) = getFTMUSD(); return ((v1 * v2) / (10**d1), d2); } function getTwapCOUSDUSD() external view override returns (uint256, uint8) { (uint256 v1, uint8 d1) = getTwapCOUSDFTM(); (uint256 v2, uint8 d2) = getFTMUSD(); return ((v1 * v2) / (10**d1), d2); } function getXCOFFINUSD() external view override returns (uint256, uint8) { (uint256 v1, uint8 d1) = getXCOFFINFTM(); (uint256 v2, uint8 d2) = getFTMUSD(); return ((v1 * v2) / (10**d1), d2); } function getTwapXCOFFINUSD() external view override returns (uint256, uint8) { (uint256 v1, uint8 d1) = getTwapXCOFFINFTM(); (uint256 v2, uint8 d2) = getFTMUSD(); return ((v1 * v2) / (10**d1), d2); } function getTwapCOUSDFTM() public view returns (uint256, uint8) { (uint256 a, uint8 b) = getTwapRate(dollar,wftm); if (a>0) { return (a,b); } return getRealtimeRate(dollar,wftm); } function getCOUSDFTM() public view override returns (uint256, uint8) { return getRealtimeRate(dollar,wftm); } function getTwapXCOFFINFTM() public view returns (uint256, uint8) { (uint256 a, uint8 b) = getTwapRate(xcoffin,wftm); if (a>0) { return (a,b); } return getRealtimeRate(xcoffin,wftm); } function getXCOFFINFTM() public view override returns (uint256, uint8) { return getRealtimeRate(xcoffin,wftm); } function getTwapCOFFINFTM() public view returns (uint256, uint8) { (uint256 a, uint8 b) = getTwapRate(coffin,wftm); if (a>0) { return (a,b); } return getRealtimeRate(coffin,wftm); } function getCOFFINFTM() public view override returns (uint256, uint8) { return getRealtimeRate(coffin,wftm); } function currentBlockTimestamp() internal view returns (uint32) { return uint32(block.timestamp % 2**32); } function currentCumulativePrices(address uniswapV2Pair) internal view returns ( uint256 price0Cumulative, uint256 price1Cumulative, uint32 blockTimestamp ) { // Pair storage pairStorage = getPair[uniswapV2Pair]; blockTimestamp = currentBlockTimestamp(); IUniswapLP uniswapPair = IUniswapLP(uniswapV2Pair); price0Cumulative = uniswapPair.price0CumulativeLast(); price1Cumulative = uniswapPair.price1CumulativeLast(); // if time has elapsed since the last update on the pair, mock the accumulated price values (uint112 reserve0, uint112 reserve1, uint32 _blockTimestampLast) = uniswapPair.getReserves(); if (_blockTimestampLast != blockTimestamp) { // subtraction overflow is desired uint32 timeElapsed = blockTimestamp - _blockTimestampLast; // addition overflow is desired // counterfactual price0Cumulative += uint256(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed; // counterfactual price1Cumulative += uint256(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed; } } function getTwapRate(address token0, address token1) public view returns (uint256 priceLatest, uint8 decimals) { address[] memory path = new address[](2); path[0] = token0; path[1] = token1; address factory = address(uniswapv2router.factory()); address uniswapV2Pair = IUniswapV2Factory(factory).getPair(token0, token1); if (uniswapV2Pair== address(0)) { return (0,0); } // Pair memory pair = getPair[uniswapV2Pair]; Pair storage pairStorage = getPair[uniswapV2Pair]; // require(pairStorage.initialized, "need to setup first"); if (!pairStorage.initialized) { return getRealtimeRate(token0, token1); // return (0,0); } (uint256 price0Cumulative, uint256 price1Cumulative, uint32 blockTimestamp) = currentCumulativePrices( address(uniswapV2Pair) ); uint32 timeElapsed = blockTimestamp - pairStorage.blockTimestampLast; // Overflow is desired FixedPoint.uq112x112 memory price0Average = FixedPoint.uq112x112(uint224((price0Cumulative - pairStorage.price0CumulativeLast) / timeElapsed)); FixedPoint.uq112x112 memory price1Average = FixedPoint.uq112x112(uint224((price1Cumulative - pairStorage.price1CumulativeLast) / timeElapsed)); uint256 amountIn = 1e18; if (IUniswapLP(uniswapV2Pair).token0() == token0) { priceLatest = uint256(price0Average.mul(amountIn).decode144()); decimals = ERC20(token1).decimals(); } else { require(IUniswapLP(uniswapV2Pair).token0() == token1, "TwapOracle: INVALID_TOKEN"); priceLatest = uint256(price1Average.mul(amountIn).decode144()); decimals = ERC20(token0).decimals(); } } function getTwapRateWithUpdate(address token0, address token1) external returns (uint256 priceLatest, uint8 decimals) { updateTwap(token0,token1); return getTwapRate(token0,token1); } function updateTwapDollar() public override { updateTwap(dollar, wftm); } function updateTwapCoffin() public override { updateTwap(coffin, wftm); } function updateTwapXCoffin() public override { updateTwap(xcoffin, wftm); } function updateTwap(address token0, address token1) public override { address[] memory path = new address[](2); path[0] = token0; path[1] = token1; address factory = address(uniswapv2router.factory()); address uniswapV2Pair = IUniswapV2Factory(factory).getPair(token0, token1); if (uniswapV2Pair== address(0)) { return; } Pair storage pairStorage = getPair[uniswapV2Pair]; // require(pairStorage.initialized, "need to setup first"); (uint256 price0Cumulative, uint256 price1Cumulative, uint32 blockTimestamp) = currentCumulativePrices( address(uniswapV2Pair) ); if (!pairStorage.initialized) { // first time pairStorage.price0CumulativeLast = price0Cumulative; pairStorage.price1CumulativeLast = price1Cumulative; pairStorage.blockTimestampLast = blockTimestamp; pairStorage.initialized = true; return; } // Overflow is desired uint32 timeElapsed = blockTimestamp - pairStorage.blockTimestampLast; // Ensure that at least one full period has passed since the last update if (timeElapsed < PERIOD) { return ; } pairStorage.price0Average = FixedPoint.uq112x112(uint224((price0Cumulative - pairStorage.price0CumulativeLast) / timeElapsed)); pairStorage.price1Average = FixedPoint.uq112x112(uint224((price1Cumulative - pairStorage.price1CumulativeLast) / timeElapsed)); pairStorage.price0CumulativeLast = price0Cumulative; pairStorage.price1CumulativeLast = price1Cumulative; pairStorage.blockTimestampLast = blockTimestamp; } function getRealtimeRate(address token0, address token1) public view returns (uint256 priceLatest, uint8 decimals) { address[] memory path = new address[](2); path[0] = token0; path[1] = token1; address factory = address(uniswapv2router.factory()); address pair = IUniswapV2Factory(factory).getPair(token0, token1); if (pair== address(0)) { return (0,0); } // setup(pair); (uint112 reserve0, uint112 reserve1,) = IUniswapLP(pair).getReserves(); if (IUniswapLP(pair).token0()==token0) { priceLatest = uint256(reserve1).mul(10**ERC20(token0).decimals()).div(uint256(reserve0)); decimals = ERC20(token1).decimals(); } else { priceLatest = uint256(reserve0).mul(10**ERC20(token1).decimals()).div(uint256(reserve1)); decimals = ERC20(token0).decimals(); } } // function getRate(address token0, address token1) // public // view // returns (uint256, uint8) // { // address[] memory path = new address[](2); // path[0] = token0; // path[1] = token1; // address factory = address(uniswapv2router.factory()); // address pair = IUniswapV2Factory(factory).getPair(token0, token1); // if (pair== address(0)) { // return (0,0); // } // try uniswapv2router.getAmountsOut( // 1 * 10**(ERC20(token0).decimals()), // path // ) returns (uint256[] memory amount) { // return (amount[1], ERC20(token1).decimals()); // } catch (bytes memory /*lowLevelData*/) { // return (0,0); // } // } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; contract PoolToken is ERC20Burnable , Ownable{ using SafeMath for uint256; // The addresses in this array are added by the oracle and these contracts are able to mint coffin address[] public coffin_pools_array; // Mapping is also used for faster verification mapping(address => bool) public coffin_pools; /* ========== MODIFIERS ========== */ modifier onlyPools() { require(coffin_pools[msg.sender] == true, "Only coffin pools can call this function"); _; } modifier onlyByOwnerOrPool() { require( msg.sender == owner() || coffin_pools[msg.sender] == true, "You are not the owner, or a pool"); _; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /* ========== constructor ========== */ constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {} /* ========== view ========== */ function poolLength() view public returns(uint256) { return coffin_pools_array.length; } /* ========== onlyPools ========== */ // Used by pools when user redeems function pool_burn_from(address addr, uint256 amount) public onlyPools { super.burnFrom(addr, amount); emit Burned(addr, msg.sender, amount); } // This function is what other pools will call to mint new token function pool_mint(address addr, uint256 amount) public onlyPools { super._mint(addr, amount); emit Minted(msg.sender, addr, amount); } /* ========== onlyOwner ========== */ // function burnFrom(address addr, uint256 amount) public override onlyOwner { super.burnFrom(addr, amount); emit Minted(msg.sender, addr, amount); } // pools which can mint/burn function addPool(address pool_address) public onlyOwner { require(pool_address != address(0), "Zero address detected"); require(coffin_pools[pool_address] == false, "Address already exists"); coffin_pools[pool_address] = true; coffin_pools_array.push(pool_address); emit PoolAdded(pool_address); } // Remove a pool function removePool(address pool_address) public onlyOwner { require(pool_address != address(0), "Zero address detected"); require(coffin_pools[pool_address] == true, "Address nonexistant"); // Delete from the mapping delete coffin_pools[pool_address]; // 'Delete' from the array by setting the address to 0x0 for (uint i = 0; i < coffin_pools_array.length; i++){ if (coffin_pools_array[i] == pool_address) { coffin_pools_array[i] = address(0); // This will leave a null in the array and keep the indices the same break; } } emit PoolRemoved(pool_address); } /* ========== EVENTS ========== */ event Burned(address indexed from, address indexed by, uint256 amount); event Minted(address indexed from, address indexed to, uint256 amount); event PoolAdded(address pool_address); event PoolRemoved(address pool_address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; // computes square roots using the babylonian method // https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method library Babylonian { function sqrt(uint256 y) internal pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } // else z = 0 } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; interface ITaxableTokenPolicy { function calcTaxRate( uint256 dollarPrice, uint256 taxThreshold, uint256 paramA, uint256 paramB, uint256 basisTaxRate, uint256 maxTaxRate ) external pure returns (uint16) ; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.11; import "./IUniswapV2Router01.sol"; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; interface IUniswapV2Factory { function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; pragma experimental ABIEncoderV2; interface IUniswapLP { 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 (uint256); function price1CumulativeLast() external view returns (uint256); function getTokenWeights() external view returns (uint32 tokenWeight0, uint32 tokenWeight1); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "./Babylonian.sol"; // a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format)) library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint256 _x; } uint8 private constant RESOLUTION = 112; uint256 private constant Q112 = uint256(1) << RESOLUTION; uint256 private constant Q224 = Q112 << RESOLUTION; // encode a uint112 as a UQ112x112 function encode(uint112 x) internal pure returns (uq112x112 memory) { return uq112x112(uint224(x) << RESOLUTION); } // encodes a uint144 as a UQ144x112 function encode144(uint144 x) internal pure returns (uq144x112 memory) { return uq144x112(uint256(x) << RESOLUTION); } // divide a UQ112x112 by a uint112, returning a UQ112x112 function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) { require(x != 0, "FixedPoint: DIV_BY_ZERO"); return uq112x112(self._x / uint224(x)); } // multiply a UQ112x112 by a uint, returning a UQ144x112 // reverts on overflow function mul(uq112x112 memory self, uint256 y) internal pure returns (uq144x112 memory) { uint256 z; require(y == 0 || (z = uint256(self._x) * y) / y == uint256(self._x), "FixedPoint: MULTIPLICATION_OVERFLOW"); return uq144x112(z); } // returns a UQ112x112 which represents the ratio of the numerator to the denominator // equivalent to encode(numerator).div(denominator) function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) { require(denominator > 0, "FixedPoint: DIV_BY_ZERO"); return uq112x112((uint224(numerator) << RESOLUTION) / denominator); } // decode a UQ112x112 into a uint112 by truncating after the radix point function decode(uq112x112 memory self) internal pure returns (uint112) { return uint112(self._x >> RESOLUTION); } // decode a UQ144x112 into a uint144 by truncating after the radix point function decode144(uq144x112 memory self) internal pure returns (uint144) { return uint144(self._x >> RESOLUTION); } // take the reciprocal of a UQ112x112 function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) { require(self._x != 0, "FixedPoint: ZERO_RECIPROCAL"); return uq112x112(uint224(Q224 / self._x)); } // square root of a UQ112x112 function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) { return uq112x112(uint224(Babylonian.sqrt(uint256(self._x)) << 56)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; interface IBandStdReference { /// A structure returned whenever someone requests for standard reference data. struct ReferenceData { uint256 rate; // base/quote exchange rate, multiplied by 1e18. uint256 lastUpdatedBase; // UNIX epoch of the last time when base price gets updated. uint256 lastUpdatedQuote; // UNIX epoch of the last time when quote price gets updated. } /// Returns the price data for the given base/quote pair. Revert if not available. function getReferenceData(string memory _base, string memory _quote) external view returns (ReferenceData memory); /// Similar to getReferenceData, but with multiple base/quote pairs at once. function getReferenceDataBulk( string[] memory _bases, string[] memory _quotes ) external view returns (ReferenceData[] memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; interface IUniswapV2Router01 { function factory() external view returns (address); function WETH() external view returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
{ "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Burned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newCap","type":"uint256"}],"name":"MaxTotalSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pool_address","type":"address"}],"name":"PoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pool_address","type":"address"}],"name":"PoolRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"TaxOfficeTransferred","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"},{"inputs":[],"name":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_ALLOCATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_getCoUSDPrice","outputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_address","type":"address"}],"name":"addPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adjustTaxRateA","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adjustTaxRateB","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoCalculateTax","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"basisTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cousdPrice","type":"uint256"}],"name":"calcAutoTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coffinOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"coffin_pools","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"coffin_pools_array","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disablTwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableAutoCalculateTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableAutoCalculateTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableTwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"excludeAddressFromTax","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesis_supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"includeAddressInTax","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_maker","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcluded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"policy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"pool_burn_from","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"pool_mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool_address","type":"address"}],"name":"removePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"reward_mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_adjustTaxRate","type":"uint32"}],"name":"setAdjustTaxRateA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_adjustTaxRate","type":"uint32"}],"name":"setAdjustTaxRateB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_basisTaxRate","type":"uint16"}],"name":"setBasisTaxRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_burnThreshold","type":"uint256"}],"name":"setBurnThreshold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_coffinOracle","type":"address"}],"name":"setCoffinOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxTaxRate","type":"uint16"}],"name":"setMaxTaxRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_staticTaxRate","type":"uint16"}],"name":"setStaticTaxRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_taxCollectorAddress","type":"address"}],"name":"setTaxCollectorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_taxOffice","type":"address"}],"name":"setTaxOffice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_policy","type":"address"}],"name":"setTaxPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_taxThreshold","type":"uint256"}],"name":"setTaxThreshold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staticTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxCollectorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxOffice","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"using_twap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526008805463ffffffff60a01b19169055670d99a8cec7e20000600c55670de0b6b3a7640000600d55600e80546001600160701b0319166a04001e8480000507d000001790553480156200005657600080fd5b506040518060400160405280600b81526020016a21b7b33334b72a37b5b2b760a91b8152506040518060400160405280600681526020016521a7a32324a760d11b815250818181818160039080519060200190620000b692919062000149565b508051620000cc90600490602084019062000149565b505050620000e9620000e3620000f360201b60201c565b620000f7565b505050506200022c565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200015790620001ef565b90600052602060002090601f0160209004810192826200017b5760008555620001c6565b82601f106200019657805160ff1916838001178555620001c6565b82800160010185558215620001c6579182015b82811115620001c6578251825591602001919060010190620001a9565b50620001d4929150620001d8565b5090565b5b80821115620001d45760008155600101620001d9565b600181811c908216806200020457607f821691505b602082108114156200022657634e487b7160e01b600052602260045260246000fd5b50919050565b612e50806200023c6000396000f3fe608060405234801561001057600080fd5b50600436106103e65760003560e01c806370a082311161020a578063b4f56b2611610125578063dd62ed3e116100b8578063f2fde38b11610087578063f2fde38b146108a0578063f6a2db8a146108b3578063fb1c80b2146108d6578063fccc2813146108ed578063ff87fc7c146108f657600080fd5b8063dd62ed3e1461082e578063e06c73b114610867578063e48849b214610879578063e7b462181461088d57600080fd5b8063cba0e996116100f4578063cba0e996146107d4578063cd428af314610800578063ced695a414610813578063d914cd4b1461081b57600080fd5b8063b4f56b2614610793578063be8ec6d2146107a6578063be94f86b146107ae578063c3bdf613146107c157600080fd5b80638e6c77221161019d578063a457c2d71161016c578063a457c2d714610745578063a6e7ab1614610758578063a8a778ae1461076d578063a9059cbb1461078057600080fd5b80638e6c77221461070457806395d89b41146107175780639d6b5f211461071f578063a0025c4a1461073257600080fd5b806379cc6790116101d957806379cc6790146106b8578063887d882f146106cb5780638d3cc818146106e15780638da5cb5b146106f357600080fd5b806370a0823114610676578063715018a61461069f578063739272ad146106a757806377d1440d146106af57600080fd5b806339509351116103055780635024ec1f1161029857806353eb3bcf1161026757806353eb3bcf1461062d5780635c26606a146106355780635c6b16c11461064857806365bbacd91461065b57806369356d471461066357600080fd5b80635024ec1f146105d757806351e238e3146105ff57806352b779ea1461061157806353788a6b1461062557600080fd5b80633f07d76a116102d45780633f07d76a1461059557806342966c68146105a85780634cace7ae146105bb5780634f6d38d0146105ce57600080fd5b806339509351146105495780633a9874891461055c5780633b7d09461461056f5780633e5f13d41461058257600080fd5b806318160ddd1161037d57806323b872dd1161034c57806323b872dd14610507578063242b8f641461051a578063313ce5671461052757806332adb9a51461053657600080fd5b806318160ddd146104c457806319ab453c146104cc57806319db099d146104e15780632084acbc146104f457600080fd5b806307a212be116103b957806307a212be14610473578063081e3eda14610496578063095ea7b31461049e578063105481af146104b157600080fd5b806301b62b78146103eb5780630505c8c91461040757806305a04aae1461043257806306fdde031461045e575b600080fd5b6103f460125481565b6040519081526020015b60405180910390f35b600b5461041a906001600160a01b031681565b6040516001600160a01b0390911681526020016103fe565b600e5461044990600160501b900463ffffffff1681565b60405163ffffffff90911681526020016103fe565b6104666108fe565b6040516103fe9190612a8d565b610486610481366004612a18565b610990565b60405190151581526020016103fe565b6006546103f4565b6104866104ac3660046129b4565b6109f7565b60085461041a906001600160a01b031681565b6002546103f4565b6104df6104da36600461292a565b610a0e565b005b6104866104ef36600461292a565b610b66565b6104df610502366004612a67565b610c43565b610486610515366004612978565b610cb7565b600e546104869060ff1681565b604051601281526020016103fe565b61041a610544366004612a18565b610d61565b6104866105573660046129b4565b610d8b565b6104df61056a366004612a67565b610dc7565b6104df61057d36600461292a565b610e3e565b60095461041a906001600160a01b031681565b6104df6105a336600461292a565b611017565b6104df6105b6366004612a18565b611133565b6104df6105c936600461292a565b611140565b6103f4600c5481565b6008546105ec90600160a01b900461ffff1681565b60405161ffff90911681526020016103fe565b6103f46a01a784379d99db4200000081565b600b5461048690600160a01b900460ff1681565b6104df6111d5565b6104df611238565b6104df6106433660046129de565b611295565b6104df6106563660046129b4565b611364565b6104df6114e0565b6104df61067136600461292a565b61153b565b6103f461068436600461292a565b6001600160a01b031660009081526020819052604090205490565b6104df611618565b6103f461164e565b6103f4600d5481565b6104df6106c63660046129b4565b611751565b600e546105ec90640100000000900461ffff1681565b600e5461048690610100900460ff1681565b6005546001600160a01b031661041a565b6104df61071236600461292a565b6117ca565b61046661189b565b61048661072d366004612a18565b6118aa565b6104df6107403660046129de565b611903565b6104866107533660046129b4565b6119c6565b6008546105ec90600160b01b900461ffff1681565b6104df61077b3660046129b4565b611a5f565b61048661078e3660046129b4565b611ada565b6104df6107a13660046129b4565b611ae7565b6104df611b25565b6104866107bc36600461292a565b611b82565b600a5461041a906001600160a01b031681565b6104866107e236600461292a565b6001600160a01b03166000908152600f602052604090205460ff1690565b6104df61080e3660046129de565b611c64565b6104df611d42565b6104df61082936600461292a565b611d9c565b6103f461083c366004612945565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6103f46a51104ea52a72f7a200000081565b600e546105ec9062010000900461ffff1681565b6105ec61089b366004612a18565b611f0c565b6104df6108ae36600461292a565b611ff0565b6104866108c136600461292a565b60076020526000908152604090205460ff1681565b600e5461044990600160301b900463ffffffff1681565b61041a61dead81565b6104df612088565b60606003805461090d90612db1565b80601f016020809104026020016040519081016040528092919081815260200182805461093990612db1565b80156109865780601f1061095b57610100808354040283529160200191610986565b820191906000526020600020905b81548152906001019060200180831161096957829003601f168201915b5050505050905090565b6000336109a56005546001600160a01b031690565b6001600160a01b031614806109c457506009546001600160a01b031633145b6109e95760405162461bcd60e51b81526004016109e090612b25565b60405180910390fd5b50600d81905560015b919050565b6000610a043384846120e7565b5060015b92915050565b601154610100900460ff1680610a27575060115460ff16155b610a8a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109e0565b601154610100900460ff16158015610aac576011805461ffff19166101011790555b6005546001600160a01b03163314610ad65760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b0382166000818152600760205260408120805460ff191660019081179091556006805491820181559091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319169091179055610b50336a01a784379d99db42000000612203565b8015610b62576011805461ff00191690555b5050565b600033610b7b6005546001600160a01b031690565b6001600160a01b03161480610b9a57506009546001600160a01b031633145b610bb65760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0382166000908152600f602052604090205460ff16610c1e5760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c726561647920696e636c75646564000000000060448201526064016109e0565b506001600160a01b03166000908152600f60205260409020805460ff19169055600190565b33610c566005546001600160a01b031690565b6001600160a01b03161480610c7557506009546001600160a01b031633145b610c915760405162461bcd60e51b81526004016109e090612b25565b600e805463ffffffff909216600160501b0263ffffffff60501b19909216919091179055565b6000610cc48484846122e2565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610d495760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016109e0565b610d5685338584036120e7565b506001949350505050565b60068181548110610d7157600080fd5b6000918252602090912001546001600160a01b0316905081565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a04918590610dc2908690612c30565b6120e7565b33610dda6005546001600160a01b031690565b6001600160a01b03161480610df957506009546001600160a01b031633145b610e155760405162461bcd60e51b81526004016109e090612b25565b600e805463ffffffff909216600160301b0269ffffffff00000000000019909216919091179055565b6005546001600160a01b03163314610e685760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b038116610eb65760405162461bcd60e51b815260206004820152601560248201527416995c9bc81859191c995cdcc819195d1958dd1959605a1b60448201526064016109e0565b6001600160a01b03811660009081526007602052604090205460ff161515600114610f195760405162461bcd60e51b81526020600482015260136024820152721059191c995cdcc81b9bdb995e1a5cdd185b9d606a1b60448201526064016109e0565b6001600160a01b0381166000908152600760205260408120805460ff191690555b600654811015610fd657816001600160a01b031660068281548110610f6157610f61612e1d565b6000918252602090912001546001600160a01b03161415610fc457600060068281548110610f9157610f91612e1d565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610fd6565b80610fce81612dec565b915050610f3a565b506040516001600160a01b03821681527f4106dfdaa577573db51c0ca93f766dbedfa0758faa2e7f5bcdb7c142be803c3f906020015b60405180910390a150565b3361102a6005546001600160a01b031690565b6001600160a01b0316148061104957506009546001600160a01b031633145b6110655760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0381166110ca5760405162461bcd60e51b815260206004820152602660248201527f746178206f666669636520616464726573732063616e6e6f742062652030206160448201526564647265737360d01b60648201526084016109e0565b600954604080516001600160a01b03928316815291831660208301527f75237613d1cfb394eb7979839ecbeacaca4592ef0cf96791979625803948a601910160405180910390a1600980546001600160a01b0319166001600160a01b0392909216919091179055565b61113d3382612479565b50565b6005546001600160a01b0316331461116a5760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b0381166111b35760405162461bcd60e51b815260206004820152601060248201526f77726f6e672074617820706f6c69637960801b60448201526064016109e0565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b336111e86005546001600160a01b031690565b6001600160a01b0316148061120757506009546001600160a01b031633145b6112235760405162461bcd60e51b81526004016109e090612b25565b600b805460ff60a01b1916600160a01b179055565b3361124b6005546001600160a01b031690565b6001600160a01b0316148061126a57506009546001600160a01b031633145b6112865760405162461bcd60e51b81526004016109e090612b25565b600e805460ff19166001179055565b336112a86005546001600160a01b031690565b6001600160a01b031614806112c757506009546001600160a01b031633145b6112e35760405162461bcd60e51b81526004016109e090612b25565b6008546109c4600160a01b90910461ffff16106113425760405162461bcd60e51b815260206004820152601860248201527f5461782072617465732061726520746f6f20686967682e20000000000000000060448201526064016109e0565b6008805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b3360009081526007602052604090205460ff1615156001146113985760405162461bcd60e51b81526004016109e090612b6e565b600081116113d85760405162461bcd60e51b815260206004820152600d60248201526c1a5b9d985b1a59105b5bdd5b9d609a1b60448201526064016109e0565b6001600160a01b0382166114225760405162461bcd60e51b815260206004820152601160248201527010b932bbb0b93221b7b73a3937b63632b960791b60448201526064016109e0565b60006012546a51104ea52a72f7a200000061143d9190612d77565b90508082111561147f5760405162461bcd60e51b815260206004820152600d60248201526c6578636565645265776172647360981b60448201526064016109e0565b8160125461148d9190612c30565b60125561149a8383612203565b6040518281526001600160a01b0384169033907f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0906020015b60405180910390a3505050565b336114f36005546001600160a01b031690565b6001600160a01b0316148061151257506009546001600160a01b031633145b61152e5760405162461bcd60e51b81526004016109e090612b25565b600e805461ff0019169055565b3361154e6005546001600160a01b031690565b6001600160a01b0316148061156d57506009546001600160a01b031633145b6115895760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0381166115f65760405162461bcd60e51b815260206004820152602e60248201527f74617820636f6c6c6563746f722061646472657373206d757374206265206e6f60448201526d6e2d7a65726f206164647265737360901b60648201526084016109e0565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146116425760405162461bcd60e51b81526004016109e090612bb6565b61164c60006125c4565b565b600b54600090600160a01b900460ff161561170c57600854604080516369a2085d60e11b8152815160009384936001600160a01b039091169263d34410ba9260048083019392829003018186803b1580156116a857600080fd5b505afa1580156116bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e09190612a31565b90925090506116f0816012612d8e565b6116fb90600a612cad565b6117059083612d58565b9250505090565b60085460408051630e61574b60e41b8152815160009384936001600160a01b039091169263e61574b09260048083019392829003018186803b1580156116a857600080fd5b6005546001600160a01b0316331461177b5760405162461bcd60e51b81526004016109e090612bb6565b6117858282612616565b6040518181526001600160a01b0383169033907f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0906020015b60405180910390a35050565b336117dd6005546001600160a01b031690565b6001600160a01b031614806117fc57506009546001600160a01b031633145b6118185760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0381166118795760405162461bcd60e51b815260206004820152602260248201527f6f7261636c6520616464726573732063616e6e6f742062652030206164647265604482015261737360f01b60648201526084016109e0565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60606004805461090d90612db1565b6000336118bf6005546001600160a01b031690565b6001600160a01b031614806118de57506009546001600160a01b031633145b6118fa5760405162461bcd60e51b81526004016109e090612b25565b50600c55600190565b336119166005546001600160a01b031690565b6001600160a01b0316148061193557506009546001600160a01b031633145b6119515760405162461bcd60e51b81526004016109e090612b25565b6113888161ffff16106119a65760405162461bcd60e51b815260206004820152601760248201527f5461782072617465732061726520746f6f20686967682e00000000000000000060448201526064016109e0565b600e805461ffff909216620100000263ffff000019909216919091179055565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611a485760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016109e0565b611a5533858584036120e7565b5060019392505050565b3360009081526007602052604090205460ff161515600114611a935760405162461bcd60e51b81526004016109e090612b6e565b611a9d8282612616565b60405181815233906001600160a01b038416907f6ab368f832c266c8eb942b84fbcaa20aedc24a699d2a05fae2568028733b1d09906020016117be565b6000610a043384846122e2565b3360009081526007602052604090205460ff161515600114611b1b5760405162461bcd60e51b81526004016109e090612b6e565b6117858282612203565b33611b386005546001600160a01b031690565b6001600160a01b03161480611b5757506009546001600160a01b031633145b611b735760405162461bcd60e51b81526004016109e090612b25565b600b805460ff60a01b19169055565b600033611b976005546001600160a01b031690565b6001600160a01b03161480611bb657506009546001600160a01b031633145b611bd25760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0382166000908152600f602052604090205460ff1615611c3b5760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016109e0565b506001600160a01b03166000908152600f60205260409020805460ff1916600190811790915590565b33611c776005546001600160a01b031690565b6001600160a01b03161480611c9657506009546001600160a01b031633145b611cb25760405162461bcd60e51b81526004016109e090612b25565b600e5461012c64010000000090910461ffff1610611d1e5760405162461bcd60e51b8152602060048201526024808201527f6261736973207461782072617465732073686f756c64206265206f6e6c792066604482015263032bb97160e51b60648201526084016109e0565b600e805461ffff9092166401000000000265ffff0000000019909216919091179055565b33611d556005546001600160a01b031690565b6001600160a01b03161480611d7457506009546001600160a01b031633145b611d905760405162461bcd60e51b81526004016109e090612b25565b600e805460ff19169055565b6005546001600160a01b03163314611dc65760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b038116611e145760405162461bcd60e51b815260206004820152601560248201527416995c9bc81859191c995cdcc819195d1958dd1959605a1b60448201526064016109e0565b6001600160a01b03811660009081526007602052604090205460ff1615611e765760405162461bcd60e51b81526020600482015260166024820152754164647265737320616c72656164792065786973747360501b60448201526064016109e0565b6001600160a01b0381166000818152600760209081526040808320805460ff191660019081179091556006805491820181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90920180546001600160a01b0319168417905590519182527f73cca62ab1b520c9715bf4e6c71e3e518c754e7148f65102f43289a7df0efea6910161100c565b600b546000906001600160a01b0316611f2757506000919050565b600b54600d54600e5460405163855ee2f760e01b815260048101869052602481019290925263ffffffff600160301b820481166044840152600160501b820416606483015261ffff640100000000820481166084840152620100009091041660a48201526001600160a01b039091169063855ee2f79060c40160206040518083038186803b158015611fb857600080fd5b505afa158015611fcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0891906129fb565b6005546001600160a01b0316331461201a5760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b03811661207f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109e0565b61113d816125c4565b3361209b6005546001600160a01b031690565b6001600160a01b031614806120ba57506009546001600160a01b031633145b6120d65760405162461bcd60e51b81526004016109e090612b25565b600e805461ff001916610100179055565b6001600160a01b0383166121495760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109e0565b6001600160a01b0382166121aa5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109e0565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591016114d3565b6001600160a01b0382166122595760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109e0565b806002600082825461226b9190612c30565b90915550506001600160a01b03821660009081526020819052604081208054839290612298908490612c30565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383166123085760405162461bcd60e51b81526004016109e090612beb565b6001600160a01b03821661232e5760405162461bcd60e51b81526004016109e090612ae2565b600081116123905760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016109e0565b60008061239b612697565b506008805461ffff60b01b1916600160b01b61ffff851690810291909117909155919350915015806123e557506001600160a01b03851660009081526007602052604090205460ff165b8061240857506001600160a01b03841660009081526007602052604090205460ff165b8061242b57506001600160a01b0385166000908152600f602052604090205460ff165b8061244e57506001600160a01b0384166000908152600f602052604090205460ff165b156124635761245e85858561270e565b612472565b6124708585858585612863565b505b5050505050565b6001600160a01b0382166124d95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016109e0565b6001600160a01b0382166000908152602081905260409020548181101561254d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016109e0565b6001600160a01b038316600090815260208190526040812083830390556002805484929061257c908490612d77565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016114d3565b505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612622833361083c565b9050818110156126805760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016109e0565b61268d83338484036120e7565b6125bf8383612479565b600e546000908190819060ff1615612709576126b161164e565b90506000811180156126c45750600d5481105b1561270957600c548110156126d857600191505b600e54610100900460ff16156126f8576126f181611f0c565b9250909192565b600854600160a01b900461ffff1692505b909192565b6001600160a01b0383166127345760405162461bcd60e51b81526004016109e090612beb565b6001600160a01b03821661275a5760405162461bcd60e51b81526004016109e090612ae2565b6001600160a01b038316600090815260208190526040902054818110156127d25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016109e0565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290612809908490612c30565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161285591815260200190565b60405180910390a350505050565b60008061288061271061287a8761ffff88166128e8565b906128fb565b9050600061288e8683612907565b905083156128ab5781156128a6576128a68883612479565b6128c9565b81156128c957600a546128c99089906001600160a01b03168461270e565b80156128da576128da88888361270e565b506001979650505050505050565b60006128f48284612d58565b9392505050565b60006128f48284612c48565b60006128f48284612d77565b80356001600160a01b03811681146109f257600080fd5b60006020828403121561293c57600080fd5b6128f482612913565b6000806040838503121561295857600080fd5b61296183612913565b915061296f60208401612913565b90509250929050565b60008060006060848603121561298d57600080fd5b61299684612913565b92506129a460208501612913565b9150604084013590509250925092565b600080604083850312156129c757600080fd5b6129d083612913565b946020939093013593505050565b6000602082840312156129f057600080fd5b81356128f481612e33565b600060208284031215612a0d57600080fd5b81516128f481612e33565b600060208284031215612a2a57600080fd5b5035919050565b60008060408385031215612a4457600080fd5b82519150602083015160ff81168114612a5c57600080fd5b809150509250929050565b600060208284031215612a7957600080fd5b813563ffffffff811681146128f457600080fd5b600060208083528351808285015260005b81811015612aba57858101830151858201604001528201612a9e565b81811115612acc576000604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526029908201527f43616c6c6572206973206e6f7420746865206f776e6572206f722074686520746040820152686178206f666669636560b81b606082015260800190565b60208082526028908201527f4f6e6c7920636f6666696e20706f6f6c732063616e2063616c6c207468697320604082015267333ab731ba34b7b760c11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60008219821115612c4357612c43612e07565b500190565b600082612c6557634e487b7160e01b600052601260045260246000fd5b500490565b600181815b80851115612ca5578160001904821115612c8b57612c8b612e07565b80851615612c9857918102915b93841c9390800290612c6f565b509250929050565b60006128f460ff841683600082612cc657506001610a08565b81612cd357506000610a08565b8160018114612ce95760028114612cf357612d0f565b6001915050610a08565b60ff841115612d0457612d04612e07565b50506001821b610a08565b5060208310610133831016604e8410600b8410161715612d32575081810a610a08565b612d3c8383612c6a565b8060001904821115612d5057612d50612e07565b029392505050565b6000816000190483118215151615612d7257612d72612e07565b500290565b600082821015612d8957612d89612e07565b500390565b600060ff821660ff841680821015612da857612da8612e07565b90039392505050565b600181811c90821680612dc557607f821691505b60208210811415612de657634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612e0057612e00612e07565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b61ffff8116811461113d57600080fdfea164736f6c6343000807000a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103e65760003560e01c806370a082311161020a578063b4f56b2611610125578063dd62ed3e116100b8578063f2fde38b11610087578063f2fde38b146108a0578063f6a2db8a146108b3578063fb1c80b2146108d6578063fccc2813146108ed578063ff87fc7c146108f657600080fd5b8063dd62ed3e1461082e578063e06c73b114610867578063e48849b214610879578063e7b462181461088d57600080fd5b8063cba0e996116100f4578063cba0e996146107d4578063cd428af314610800578063ced695a414610813578063d914cd4b1461081b57600080fd5b8063b4f56b2614610793578063be8ec6d2146107a6578063be94f86b146107ae578063c3bdf613146107c157600080fd5b80638e6c77221161019d578063a457c2d71161016c578063a457c2d714610745578063a6e7ab1614610758578063a8a778ae1461076d578063a9059cbb1461078057600080fd5b80638e6c77221461070457806395d89b41146107175780639d6b5f211461071f578063a0025c4a1461073257600080fd5b806379cc6790116101d957806379cc6790146106b8578063887d882f146106cb5780638d3cc818146106e15780638da5cb5b146106f357600080fd5b806370a0823114610676578063715018a61461069f578063739272ad146106a757806377d1440d146106af57600080fd5b806339509351116103055780635024ec1f1161029857806353eb3bcf1161026757806353eb3bcf1461062d5780635c26606a146106355780635c6b16c11461064857806365bbacd91461065b57806369356d471461066357600080fd5b80635024ec1f146105d757806351e238e3146105ff57806352b779ea1461061157806353788a6b1461062557600080fd5b80633f07d76a116102d45780633f07d76a1461059557806342966c68146105a85780634cace7ae146105bb5780634f6d38d0146105ce57600080fd5b806339509351146105495780633a9874891461055c5780633b7d09461461056f5780633e5f13d41461058257600080fd5b806318160ddd1161037d57806323b872dd1161034c57806323b872dd14610507578063242b8f641461051a578063313ce5671461052757806332adb9a51461053657600080fd5b806318160ddd146104c457806319ab453c146104cc57806319db099d146104e15780632084acbc146104f457600080fd5b806307a212be116103b957806307a212be14610473578063081e3eda14610496578063095ea7b31461049e578063105481af146104b157600080fd5b806301b62b78146103eb5780630505c8c91461040757806305a04aae1461043257806306fdde031461045e575b600080fd5b6103f460125481565b6040519081526020015b60405180910390f35b600b5461041a906001600160a01b031681565b6040516001600160a01b0390911681526020016103fe565b600e5461044990600160501b900463ffffffff1681565b60405163ffffffff90911681526020016103fe565b6104666108fe565b6040516103fe9190612a8d565b610486610481366004612a18565b610990565b60405190151581526020016103fe565b6006546103f4565b6104866104ac3660046129b4565b6109f7565b60085461041a906001600160a01b031681565b6002546103f4565b6104df6104da36600461292a565b610a0e565b005b6104866104ef36600461292a565b610b66565b6104df610502366004612a67565b610c43565b610486610515366004612978565b610cb7565b600e546104869060ff1681565b604051601281526020016103fe565b61041a610544366004612a18565b610d61565b6104866105573660046129b4565b610d8b565b6104df61056a366004612a67565b610dc7565b6104df61057d36600461292a565b610e3e565b60095461041a906001600160a01b031681565b6104df6105a336600461292a565b611017565b6104df6105b6366004612a18565b611133565b6104df6105c936600461292a565b611140565b6103f4600c5481565b6008546105ec90600160a01b900461ffff1681565b60405161ffff90911681526020016103fe565b6103f46a01a784379d99db4200000081565b600b5461048690600160a01b900460ff1681565b6104df6111d5565b6104df611238565b6104df6106433660046129de565b611295565b6104df6106563660046129b4565b611364565b6104df6114e0565b6104df61067136600461292a565b61153b565b6103f461068436600461292a565b6001600160a01b031660009081526020819052604090205490565b6104df611618565b6103f461164e565b6103f4600d5481565b6104df6106c63660046129b4565b611751565b600e546105ec90640100000000900461ffff1681565b600e5461048690610100900460ff1681565b6005546001600160a01b031661041a565b6104df61071236600461292a565b6117ca565b61046661189b565b61048661072d366004612a18565b6118aa565b6104df6107403660046129de565b611903565b6104866107533660046129b4565b6119c6565b6008546105ec90600160b01b900461ffff1681565b6104df61077b3660046129b4565b611a5f565b61048661078e3660046129b4565b611ada565b6104df6107a13660046129b4565b611ae7565b6104df611b25565b6104866107bc36600461292a565b611b82565b600a5461041a906001600160a01b031681565b6104866107e236600461292a565b6001600160a01b03166000908152600f602052604090205460ff1690565b6104df61080e3660046129de565b611c64565b6104df611d42565b6104df61082936600461292a565b611d9c565b6103f461083c366004612945565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6103f46a51104ea52a72f7a200000081565b600e546105ec9062010000900461ffff1681565b6105ec61089b366004612a18565b611f0c565b6104df6108ae36600461292a565b611ff0565b6104866108c136600461292a565b60076020526000908152604090205460ff1681565b600e5461044990600160301b900463ffffffff1681565b61041a61dead81565b6104df612088565b60606003805461090d90612db1565b80601f016020809104026020016040519081016040528092919081815260200182805461093990612db1565b80156109865780601f1061095b57610100808354040283529160200191610986565b820191906000526020600020905b81548152906001019060200180831161096957829003601f168201915b5050505050905090565b6000336109a56005546001600160a01b031690565b6001600160a01b031614806109c457506009546001600160a01b031633145b6109e95760405162461bcd60e51b81526004016109e090612b25565b60405180910390fd5b50600d81905560015b919050565b6000610a043384846120e7565b5060015b92915050565b601154610100900460ff1680610a27575060115460ff16155b610a8a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109e0565b601154610100900460ff16158015610aac576011805461ffff19166101011790555b6005546001600160a01b03163314610ad65760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b0382166000818152600760205260408120805460ff191660019081179091556006805491820181559091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319169091179055610b50336a01a784379d99db42000000612203565b8015610b62576011805461ff00191690555b5050565b600033610b7b6005546001600160a01b031690565b6001600160a01b03161480610b9a57506009546001600160a01b031633145b610bb65760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0382166000908152600f602052604090205460ff16610c1e5760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c726561647920696e636c75646564000000000060448201526064016109e0565b506001600160a01b03166000908152600f60205260409020805460ff19169055600190565b33610c566005546001600160a01b031690565b6001600160a01b03161480610c7557506009546001600160a01b031633145b610c915760405162461bcd60e51b81526004016109e090612b25565b600e805463ffffffff909216600160501b0263ffffffff60501b19909216919091179055565b6000610cc48484846122e2565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610d495760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016109e0565b610d5685338584036120e7565b506001949350505050565b60068181548110610d7157600080fd5b6000918252602090912001546001600160a01b0316905081565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a04918590610dc2908690612c30565b6120e7565b33610dda6005546001600160a01b031690565b6001600160a01b03161480610df957506009546001600160a01b031633145b610e155760405162461bcd60e51b81526004016109e090612b25565b600e805463ffffffff909216600160301b0269ffffffff00000000000019909216919091179055565b6005546001600160a01b03163314610e685760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b038116610eb65760405162461bcd60e51b815260206004820152601560248201527416995c9bc81859191c995cdcc819195d1958dd1959605a1b60448201526064016109e0565b6001600160a01b03811660009081526007602052604090205460ff161515600114610f195760405162461bcd60e51b81526020600482015260136024820152721059191c995cdcc81b9bdb995e1a5cdd185b9d606a1b60448201526064016109e0565b6001600160a01b0381166000908152600760205260408120805460ff191690555b600654811015610fd657816001600160a01b031660068281548110610f6157610f61612e1d565b6000918252602090912001546001600160a01b03161415610fc457600060068281548110610f9157610f91612e1d565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610fd6565b80610fce81612dec565b915050610f3a565b506040516001600160a01b03821681527f4106dfdaa577573db51c0ca93f766dbedfa0758faa2e7f5bcdb7c142be803c3f906020015b60405180910390a150565b3361102a6005546001600160a01b031690565b6001600160a01b0316148061104957506009546001600160a01b031633145b6110655760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0381166110ca5760405162461bcd60e51b815260206004820152602660248201527f746178206f666669636520616464726573732063616e6e6f742062652030206160448201526564647265737360d01b60648201526084016109e0565b600954604080516001600160a01b03928316815291831660208301527f75237613d1cfb394eb7979839ecbeacaca4592ef0cf96791979625803948a601910160405180910390a1600980546001600160a01b0319166001600160a01b0392909216919091179055565b61113d3382612479565b50565b6005546001600160a01b0316331461116a5760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b0381166111b35760405162461bcd60e51b815260206004820152601060248201526f77726f6e672074617820706f6c69637960801b60448201526064016109e0565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b336111e86005546001600160a01b031690565b6001600160a01b0316148061120757506009546001600160a01b031633145b6112235760405162461bcd60e51b81526004016109e090612b25565b600b805460ff60a01b1916600160a01b179055565b3361124b6005546001600160a01b031690565b6001600160a01b0316148061126a57506009546001600160a01b031633145b6112865760405162461bcd60e51b81526004016109e090612b25565b600e805460ff19166001179055565b336112a86005546001600160a01b031690565b6001600160a01b031614806112c757506009546001600160a01b031633145b6112e35760405162461bcd60e51b81526004016109e090612b25565b6008546109c4600160a01b90910461ffff16106113425760405162461bcd60e51b815260206004820152601860248201527f5461782072617465732061726520746f6f20686967682e20000000000000000060448201526064016109e0565b6008805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b3360009081526007602052604090205460ff1615156001146113985760405162461bcd60e51b81526004016109e090612b6e565b600081116113d85760405162461bcd60e51b815260206004820152600d60248201526c1a5b9d985b1a59105b5bdd5b9d609a1b60448201526064016109e0565b6001600160a01b0382166114225760405162461bcd60e51b815260206004820152601160248201527010b932bbb0b93221b7b73a3937b63632b960791b60448201526064016109e0565b60006012546a51104ea52a72f7a200000061143d9190612d77565b90508082111561147f5760405162461bcd60e51b815260206004820152600d60248201526c6578636565645265776172647360981b60448201526064016109e0565b8160125461148d9190612c30565b60125561149a8383612203565b6040518281526001600160a01b0384169033907f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0906020015b60405180910390a3505050565b336114f36005546001600160a01b031690565b6001600160a01b0316148061151257506009546001600160a01b031633145b61152e5760405162461bcd60e51b81526004016109e090612b25565b600e805461ff0019169055565b3361154e6005546001600160a01b031690565b6001600160a01b0316148061156d57506009546001600160a01b031633145b6115895760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0381166115f65760405162461bcd60e51b815260206004820152602e60248201527f74617820636f6c6c6563746f722061646472657373206d757374206265206e6f60448201526d6e2d7a65726f206164647265737360901b60648201526084016109e0565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146116425760405162461bcd60e51b81526004016109e090612bb6565b61164c60006125c4565b565b600b54600090600160a01b900460ff161561170c57600854604080516369a2085d60e11b8152815160009384936001600160a01b039091169263d34410ba9260048083019392829003018186803b1580156116a857600080fd5b505afa1580156116bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e09190612a31565b90925090506116f0816012612d8e565b6116fb90600a612cad565b6117059083612d58565b9250505090565b60085460408051630e61574b60e41b8152815160009384936001600160a01b039091169263e61574b09260048083019392829003018186803b1580156116a857600080fd5b6005546001600160a01b0316331461177b5760405162461bcd60e51b81526004016109e090612bb6565b6117858282612616565b6040518181526001600160a01b0383169033907f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0906020015b60405180910390a35050565b336117dd6005546001600160a01b031690565b6001600160a01b031614806117fc57506009546001600160a01b031633145b6118185760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0381166118795760405162461bcd60e51b815260206004820152602260248201527f6f7261636c6520616464726573732063616e6e6f742062652030206164647265604482015261737360f01b60648201526084016109e0565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60606004805461090d90612db1565b6000336118bf6005546001600160a01b031690565b6001600160a01b031614806118de57506009546001600160a01b031633145b6118fa5760405162461bcd60e51b81526004016109e090612b25565b50600c55600190565b336119166005546001600160a01b031690565b6001600160a01b0316148061193557506009546001600160a01b031633145b6119515760405162461bcd60e51b81526004016109e090612b25565b6113888161ffff16106119a65760405162461bcd60e51b815260206004820152601760248201527f5461782072617465732061726520746f6f20686967682e00000000000000000060448201526064016109e0565b600e805461ffff909216620100000263ffff000019909216919091179055565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611a485760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016109e0565b611a5533858584036120e7565b5060019392505050565b3360009081526007602052604090205460ff161515600114611a935760405162461bcd60e51b81526004016109e090612b6e565b611a9d8282612616565b60405181815233906001600160a01b038416907f6ab368f832c266c8eb942b84fbcaa20aedc24a699d2a05fae2568028733b1d09906020016117be565b6000610a043384846122e2565b3360009081526007602052604090205460ff161515600114611b1b5760405162461bcd60e51b81526004016109e090612b6e565b6117858282612203565b33611b386005546001600160a01b031690565b6001600160a01b03161480611b5757506009546001600160a01b031633145b611b735760405162461bcd60e51b81526004016109e090612b25565b600b805460ff60a01b19169055565b600033611b976005546001600160a01b031690565b6001600160a01b03161480611bb657506009546001600160a01b031633145b611bd25760405162461bcd60e51b81526004016109e090612b25565b6001600160a01b0382166000908152600f602052604090205460ff1615611c3b5760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016109e0565b506001600160a01b03166000908152600f60205260409020805460ff1916600190811790915590565b33611c776005546001600160a01b031690565b6001600160a01b03161480611c9657506009546001600160a01b031633145b611cb25760405162461bcd60e51b81526004016109e090612b25565b600e5461012c64010000000090910461ffff1610611d1e5760405162461bcd60e51b8152602060048201526024808201527f6261736973207461782072617465732073686f756c64206265206f6e6c792066604482015263032bb97160e51b60648201526084016109e0565b600e805461ffff9092166401000000000265ffff0000000019909216919091179055565b33611d556005546001600160a01b031690565b6001600160a01b03161480611d7457506009546001600160a01b031633145b611d905760405162461bcd60e51b81526004016109e090612b25565b600e805460ff19169055565b6005546001600160a01b03163314611dc65760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b038116611e145760405162461bcd60e51b815260206004820152601560248201527416995c9bc81859191c995cdcc819195d1958dd1959605a1b60448201526064016109e0565b6001600160a01b03811660009081526007602052604090205460ff1615611e765760405162461bcd60e51b81526020600482015260166024820152754164647265737320616c72656164792065786973747360501b60448201526064016109e0565b6001600160a01b0381166000818152600760209081526040808320805460ff191660019081179091556006805491820181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90920180546001600160a01b0319168417905590519182527f73cca62ab1b520c9715bf4e6c71e3e518c754e7148f65102f43289a7df0efea6910161100c565b600b546000906001600160a01b0316611f2757506000919050565b600b54600d54600e5460405163855ee2f760e01b815260048101869052602481019290925263ffffffff600160301b820481166044840152600160501b820416606483015261ffff640100000000820481166084840152620100009091041660a48201526001600160a01b039091169063855ee2f79060c40160206040518083038186803b158015611fb857600080fd5b505afa158015611fcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0891906129fb565b6005546001600160a01b0316331461201a5760405162461bcd60e51b81526004016109e090612bb6565b6001600160a01b03811661207f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109e0565b61113d816125c4565b3361209b6005546001600160a01b031690565b6001600160a01b031614806120ba57506009546001600160a01b031633145b6120d65760405162461bcd60e51b81526004016109e090612b25565b600e805461ff001916610100179055565b6001600160a01b0383166121495760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109e0565b6001600160a01b0382166121aa5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109e0565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591016114d3565b6001600160a01b0382166122595760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109e0565b806002600082825461226b9190612c30565b90915550506001600160a01b03821660009081526020819052604081208054839290612298908490612c30565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383166123085760405162461bcd60e51b81526004016109e090612beb565b6001600160a01b03821661232e5760405162461bcd60e51b81526004016109e090612ae2565b600081116123905760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016109e0565b60008061239b612697565b506008805461ffff60b01b1916600160b01b61ffff851690810291909117909155919350915015806123e557506001600160a01b03851660009081526007602052604090205460ff165b8061240857506001600160a01b03841660009081526007602052604090205460ff165b8061242b57506001600160a01b0385166000908152600f602052604090205460ff165b8061244e57506001600160a01b0384166000908152600f602052604090205460ff165b156124635761245e85858561270e565b612472565b6124708585858585612863565b505b5050505050565b6001600160a01b0382166124d95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016109e0565b6001600160a01b0382166000908152602081905260409020548181101561254d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016109e0565b6001600160a01b038316600090815260208190526040812083830390556002805484929061257c908490612d77565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016114d3565b505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612622833361083c565b9050818110156126805760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016109e0565b61268d83338484036120e7565b6125bf8383612479565b600e546000908190819060ff1615612709576126b161164e565b90506000811180156126c45750600d5481105b1561270957600c548110156126d857600191505b600e54610100900460ff16156126f8576126f181611f0c565b9250909192565b600854600160a01b900461ffff1692505b909192565b6001600160a01b0383166127345760405162461bcd60e51b81526004016109e090612beb565b6001600160a01b03821661275a5760405162461bcd60e51b81526004016109e090612ae2565b6001600160a01b038316600090815260208190526040902054818110156127d25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016109e0565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290612809908490612c30565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161285591815260200190565b60405180910390a350505050565b60008061288061271061287a8761ffff88166128e8565b906128fb565b9050600061288e8683612907565b905083156128ab5781156128a6576128a68883612479565b6128c9565b81156128c957600a546128c99089906001600160a01b03168461270e565b80156128da576128da88888361270e565b506001979650505050505050565b60006128f48284612d58565b9392505050565b60006128f48284612c48565b60006128f48284612d77565b80356001600160a01b03811681146109f257600080fd5b60006020828403121561293c57600080fd5b6128f482612913565b6000806040838503121561295857600080fd5b61296183612913565b915061296f60208401612913565b90509250929050565b60008060006060848603121561298d57600080fd5b61299684612913565b92506129a460208501612913565b9150604084013590509250925092565b600080604083850312156129c757600080fd5b6129d083612913565b946020939093013593505050565b6000602082840312156129f057600080fd5b81356128f481612e33565b600060208284031215612a0d57600080fd5b81516128f481612e33565b600060208284031215612a2a57600080fd5b5035919050565b60008060408385031215612a4457600080fd5b82519150602083015160ff81168114612a5c57600080fd5b809150509250929050565b600060208284031215612a7957600080fd5b813563ffffffff811681146128f457600080fd5b600060208083528351808285015260005b81811015612aba57858101830151858201604001528201612a9e565b81811115612acc576000604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526029908201527f43616c6c6572206973206e6f7420746865206f776e6572206f722074686520746040820152686178206f666669636560b81b606082015260800190565b60208082526028908201527f4f6e6c7920636f6666696e20706f6f6c732063616e2063616c6c207468697320604082015267333ab731ba34b7b760c11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60008219821115612c4357612c43612e07565b500190565b600082612c6557634e487b7160e01b600052601260045260246000fd5b500490565b600181815b80851115612ca5578160001904821115612c8b57612c8b612e07565b80851615612c9857918102915b93841c9390800290612c6f565b509250929050565b60006128f460ff841683600082612cc657506001610a08565b81612cd357506000610a08565b8160018114612ce95760028114612cf357612d0f565b6001915050610a08565b60ff841115612d0457612d04612e07565b50506001821b610a08565b5060208310610133831016604e8410600b8410161715612d32575081810a610a08565b612d3c8383612c6a565b8060001904821115612d5057612d50612e07565b029392505050565b6000816000190483118215151615612d7257612d72612e07565b500290565b600082821015612d8957612d89612e07565b500390565b600060ff821660ff841680821015612da857612da8612e07565b90039392505050565b600181811c90821680612dc557607f821691505b60208210811415612de657634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612e0057612e00612e07565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b61ffff8116811461113d57600080fdfea164736f6c6343000807000a
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.