Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 14 from a total of 14 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Address Stat... | 17535514 | 576 days ago | IN | 0 ETH | 0.000741 | ||||
Set Address Stat... | 17535479 | 576 days ago | IN | 0 ETH | 0.00072679 | ||||
Set Address Stat... | 17268849 | 614 days ago | IN | 0 ETH | 0.00127801 | ||||
Set Address Stat... | 17268029 | 614 days ago | IN | 0 ETH | 0.00304243 | ||||
Set Address Stat... | 17268007 | 614 days ago | IN | 0 ETH | 0.00327596 | ||||
Set Address Stat... | 16843540 | 674 days ago | IN | 0 ETH | 0.0015669 | ||||
Allow Pool | 15272854 | 899 days ago | IN | 0 ETH | 0.02002135 | ||||
Claim Ownership | 15268535 | 899 days ago | IN | 0 ETH | 0.00028599 | ||||
Transfer Ownersh... | 15263955 | 900 days ago | IN | 0 ETH | 0.000302 | ||||
Transfer Ownersh... | 15099280 | 926 days ago | IN | 0 ETH | 0.0016386 | ||||
Set Unrestricted... | 14858054 | 967 days ago | IN | 0 ETH | 0.00137752 | ||||
Set Unrestricted... | 14858051 | 967 days ago | IN | 0 ETH | 0.00107864 | ||||
Allow Pool | 14858048 | 967 days ago | IN | 0 ETH | 0.05397985 | ||||
Allow Pool | 14858046 | 967 days ago | IN | 0 ETH | 0.00240764 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
PiTransferGate
Compiler Version
v0.7.4+commit.3f05b770
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity 0.7.4; pragma experimental ABIEncoderV2; import "./openzeppelin/TokensRecoverable.sol"; import "./openzeppelin/Owned.sol"; import "./interfaces/IPi.sol"; import "./interfaces/IPiTransferGate.sol"; import "./interfaces/IUniswapV2Pair.sol"; import "./interfaces/IUniswapV2Factory.sol"; import "./interfaces/IUniswapV2Router02.sol"; import "./openzeppelin/ReentrancyGuard.sol"; /* Pi: A transfer gate (GatedERC20) for use with Pi tokens It: Allows customization of tax and burn rates Allows transfer to/from approved Uniswap pools Disallows transfer to/from non-approved Uniswap pools (doesn't interfere with other crappy AMMs) Allows transfer to/from anywhere else Allows for free transfers if permission granted Allows for unrestricted transfers if permission granted Provides a safe and tax-free liquidity adding function */ struct PiTransferGateParameters { address dev; uint16 stakeRate; // 100000 = 100% uint16 burnRate; // 100000 = 100% uint16 devRate; // 100000 = 100% address stake; } contract PiTransferGate is Owned, TokensRecoverable, IPiTransferGate, ReentrancyGuard { using Address for address; using SafeERC20 for IERC20; using SafeMath for uint256; PiTransferGateParameters public parameters; IPi immutable Pi ; mapping (address => AddressState) public addressStates; IERC20[] public allowedPoolTokens; bool public unrestricted; mapping (address => bool) public unrestrictedControllers; mapping (address => bool) public freeParticipant; mapping (address => bool) public allowedFactoryAddress; mapping (address => uint256) public liquiditySupply; address public mustUpdate; uint256 slippage = 5000; //5000 for 5% event SlippageSet(uint slippage); event ParametersSet(address dev, address stake, uint16 stakeRate, uint16 burnRate, uint16 devRate); event AddressStateSet(AddressState state); constructor(address _Pi) { Pi=IPi(_Pi); allowedFactoryAddress[0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f]=true; // uniswap factory address allowed PiTransferGateParameters memory _parameters; _parameters.dev = 0x16352774BF9287E0324E362897c1380ABC8B2b35; _parameters.stakeRate = 2000; _parameters.burnRate = 500; _parameters.devRate = 2000; _parameters.stake = 0xb0bBfAF6492B70359a001Fd30E673A4fcE875c6C; parameters = _parameters; } function addFactory(address factoryAddress) external ownerOnly{ allowedFactoryAddress[factoryAddress]=true; } function removeFactory(address factoryAddress) external ownerOnly{ allowedFactoryAddress[factoryAddress]=false; } // 3 decimal =>1000 = 1% => function setSlippage(uint256 _slippage) external ownerOnly{ require(_slippage<100000,"cannot be more than 100%"); slippage=_slippage; emit SlippageSet(slippage); } function allowedPoolTokensCount() public view override returns (uint256) { return allowedPoolTokens.length; } function setUnrestrictedController(address unrestrictedController, bool allow) public override ownerOnly(){ unrestrictedControllers[unrestrictedController] = allow; } function setFreeParticipant(address participant, bool free) public override ownerOnly() { freeParticipant[participant] = free; } function setUnrestricted(bool _unrestricted) public override { require (unrestrictedControllers[msg.sender], "Not an unrestricted controller"); unrestricted = _unrestricted; } function setParameters(address _dev, address _stake, uint16 _stakeRate, uint16 _burnRate, uint16 _devRate) public override ownerOnly() { require (_stakeRate <= 100000 && _burnRate <= 100000 && _devRate <= 100000 && _stakeRate + _burnRate + _devRate <= 100000, "> 100%"); require (_dev != address(0) && _stake != address(0)); // require (_stakeRate <= 500 && _burnRate <= 500 && _devRate <= 10, "Sanity"); PiTransferGateParameters memory _parameters; _parameters.dev = _dev; _parameters.stakeRate = _stakeRate; _parameters.burnRate = _burnRate; _parameters.devRate = _devRate; _parameters.stake = _stake; parameters = _parameters; emit ParametersSet(_dev, _stake, _stakeRate, _burnRate, _devRate); } function allowPool(IUniswapV2Factory _uniswapV2Factory, IERC20 token) public override ownerOnly() { require(allowedFactoryAddress[address(_uniswapV2Factory)],"This uniswapV2Factory not allowed"); address pool = _uniswapV2Factory.getPair(address(Pi), address(token)); if (pool == address(0)) { pool = _uniswapV2Factory.createPair(address(Pi), address(token)); } AddressState state = addressStates[pool]; require (state != AddressState.AllowedPool, "Already allowed"); addressStates[pool] = AddressState.AllowedPool; allowedPoolTokens.push(token); liquiditySupply[pool] = IERC20(pool).totalSupply(); } function safeAddLiquidity(IUniswapV2Router02 _uniswapRouter02, IERC20 token, uint256 tokenAmount, uint256 PiAmount) public nonReentrant override returns (uint256 PiUsed, uint256 tokenUsed, uint256 liquidity) { require(allowedFactoryAddress[address(_uniswapRouter02.factory())],"This _uniswapV2Factory not allowed"); address pool = IUniswapV2Factory(_uniswapRouter02.factory()).getPair(address(Pi), address(token)); require (pool != address(0) && addressStates[pool] == AddressState.AllowedPool, "Pool not approved"); unrestricted = true; uint256 tokenBalance = token.balanceOf(address(this)); uint256 PiBalance = Pi.balanceOf(address(this)); token.safeTransferFrom(msg.sender, address(this), tokenAmount); Pi.transferFrom(msg.sender, address(this), PiAmount); Pi.approve(address(_uniswapRouter02), PiAmount); token.safeApprove(address(_uniswapRouter02), tokenAmount); // actual received token amount uint256 tokenAmountReceived= token.balanceOf(address(this)).sub(tokenBalance); uint256 PiAmountReceived=Pi.balanceOf(address(this)).sub(PiBalance); // uint256 tokenMinAmount = estimateBuy(_uniswapRouter02, token,tokenAmount).mul((100000-slippageBuy)/1000)/100; // uint256 PiMinAmount = estimateSell(_uniswapRouter02, token,PiAmount).mul((100000-slippageSell)/1000)/100; (PiUsed, tokenUsed ,liquidity ) = _uniswapRouter02.addLiquidity( address(Pi), address(token), PiAmountReceived, tokenAmountReceived, PiAmountReceived.mul(100000-slippage).div(100000), tokenAmountReceived.mul(100000-slippage).div(100000), msg.sender, block.timestamp); liquiditySupply[pool] = IERC20(pool).totalSupply(); if (mustUpdate == pool) { mustUpdate = address(0); } if (PiUsed < PiAmount) { Pi.transfer(msg.sender, PiAmount.sub(PiUsed)); } tokenBalance = token.balanceOf(address(this)).sub(tokenBalance); // we do it this way in case there's a burn if (tokenBalance > 0) { token.safeTransfer(msg.sender, tokenBalance); } unrestricted = false; } function handleTransfer(address, address from, address to, uint256 amount) external override returns (uint256 burn, TransferGateTarget[] memory targets){ address mustUpdateAddress = mustUpdate; if (mustUpdateAddress != address(0)) { mustUpdate = address(0); liquiditySupply[mustUpdateAddress] = IERC20(mustUpdateAddress).totalSupply(); } AddressState fromState = addressStates[from]; AddressState toState = addressStates[to]; if (fromState != AddressState.AllowedPool && toState != AddressState.AllowedPool) { if (fromState == AddressState.Unknown) { fromState = detectState(from); } if (toState == AddressState.Unknown) { toState = detectState(to); } require (unrestricted || (fromState != AddressState.DisallowedPool && toState != AddressState.DisallowedPool), "Pool not approved"); } if (toState == AddressState.AllowedPool) { mustUpdate = to; } if (fromState == AddressState.AllowedPool) { if (unrestricted) { liquiditySupply[from] = IERC20(from).totalSupply(); } require (IERC20(from).totalSupply() >= liquiditySupply[from], "Cannot remove liquidity"); } if (unrestricted || freeParticipant[from] || freeParticipant[to]) { return (0, new TransferGateTarget[](0)); } PiTransferGateParameters memory params = parameters; // "amount" will never be > totalSupply which is capped at 10k, so these multiplications will never overflow burn = amount.mul(params.burnRate).div(100000); targets = new TransferGateTarget[]((params.devRate > 0 ? 1 : 0) + (params.stakeRate > 0 ? 1 : 0)); uint256 index = 0; if (params.stakeRate > 0) { targets[index].destination = params.stake; targets[index++].amount = amount.mul(params.stakeRate).div(100000); } if (params.devRate > 0) { targets[index].destination = params.dev; targets[index].amount = amount.mul(params.devRate).div(100000); } } function setAddressState(address a, AddressState state) public ownerOnly() { addressStates[a] = state; emit AddressStateSet(state); } function detectState(address a) public returns (AddressState state) { state = AddressState.NotPool; if (a.isContract()) { try this.throwAddressState(a) { assert(false); } catch Error(string memory result) { if (bytes(result).length == 1) { state = AddressState.NotPool; } if (bytes(result).length == 2) { state = AddressState.DisallowedPool; } } catch { } } addressStates[a] = state; return state; } // Not intended for external consumption // Always throws // We want to call functions to probe for things, but don't want to open ourselves up to // possible state-changes // So we return a value by reverting with a message function throwAddressState(address a) external view { try IUniswapV2Pair(a).factory() returns (address factory) { // don't care if it's some crappy alt-amm if (allowedFactoryAddress[factory]) { // these checks for token0/token1 are just for additional // certainty that we're interacting with a uniswap pair try IUniswapV2Pair(a).token0() returns (address token0) { if (token0 == address(Pi)) { revert("22"); } try IUniswapV2Pair(a).token1() returns (address token1) { if (token1 == address(Pi)) { revert("22"); } } catch { } } catch { } } } catch { } revert("1"); } }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; /* ROOTKIT: Allows recovery of unexpected tokens (airdrops, etc) Inheriters can customize logic by overriding canRecoverTokens */ import "../interfaces/IERC20.sol"; import "../libraries/SafeERC20.sol"; import "./Owned.sol"; import "../interfaces/ITokensRecoverable.sol"; abstract contract TokensRecoverable is Owned, ITokensRecoverable { using SafeERC20 for IERC20; function recoverTokens(IERC20 token) public override ownerOnly() { require (canRecoverTokens(token)); token.safeTransfer(msg.sender, token.balanceOf(address(this))); } function recoverETH(uint256 amount) public override ownerOnly() { msg.sender.transfer(amount); } function canRecoverTokens(IERC20 token) internal virtual view returns (bool) { return address(token) != address(this); } }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; /* ROOTKIT: Provides ownerOnly() modifier Allows for ownership transfer but requires the new owner to claim (accept) ownership Safer because no accidental transfers or renouncing */ import "../interfaces/IOwned.sol"; abstract contract Owned is IOwned { address public override owner = msg.sender; address internal pendingOwner; modifier ownerOnly() { require (msg.sender == owner, "Owner only"); _; } function transferOwnership(address newOwner) public override ownerOnly() { pendingOwner = newOwner; } function claimOwnership() public override { require (pendingOwner == msg.sender); pendingOwner = address(0); emit OwnershipTransferred(owner, msg.sender); owner = msg.sender; } }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; import "./IGatedERC20.sol"; interface IPi is IGatedERC20 { function FEE() external view returns (uint256); function FEE_ADDRESS() external view returns (address); function isIgnored(address _ignoredAddress) external view returns (bool); }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; pragma experimental ABIEncoderV2; import "./IOwned.sol"; import "./ITokensRecoverable.sol"; import "./IUniswapV2Router02.sol"; import "./IUniswapV2Factory.sol"; enum AddressState { Unknown, NotPool, DisallowedPool, AllowedPool } struct TransferGateTarget { address destination; uint256 amount; } interface IPiTransferGate is IOwned, ITokensRecoverable { function allowedPoolTokensCount() external view returns (uint256); function setUnrestrictedController(address unrestrictedController, bool allow) external; function setFreeParticipant(address participant, bool free) external; function setUnrestricted(bool _unrestricted) external; function setParameters(address _dev, address _stake, uint16 _stakeRate, uint16 _burnRate, uint16 _devRate) external; function allowPool(IUniswapV2Factory _uniswapV2Factory, IERC20 token) external; function safeAddLiquidity(IUniswapV2Router02 _uniswapRouter02, IERC20 token, uint256 tokenAmount, uint256 PiAmount//, uint256 minTokenAmount, uint256 minPiAmount // ,uint256 deadline //stack deep issue coming so had to use fix values ) external returns (uint256 PiUsed, uint256 tokenUsed, uint256 liquidity); function handleTransfer(address msgSender, address from, address to, uint256 amount) external returns (uint256 burn, TransferGateTarget[] memory targets); }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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: J-J-J-JENGA!!! pragma solidity ^0.7.4; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; interface IERC20 { event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function totalSupply() external view returns (uint256); function balanceOf(address _account) external view returns (uint256); function transfer(address _recipient, uint256 _amount) external returns (bool); function allowance(address _owner, address _spender) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transferFrom(address _sender, address _recipient, uint256 _amount) external returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; /* ROOTKIT: Modified to remove some junk Also modified to remove silly restrictions (traps!) within safeApprove */ import "../interfaces/IERC20.sol"; import "./SafeMath.sol"; import "./Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn( token, abi.encodeWithSelector( token.approve.selector, spender, newAllowance ) ); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).sub( value, "SafeERC20: decreased allowance below zero" ); _callOptionalReturn( token, abi.encodeWithSelector( token.approve.selector, spender, newAllowance ) ); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; import "./IERC20.sol"; interface ITokensRecoverable { function recoverTokens(IERC20 token) external; function recoverETH(uint256 amount) external; }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; /* ROOTKIT: O wherefore art thou 8 point O */ library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.3._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.3._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; interface IOwned { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function owner() external view returns (address); function transferOwnership(address newOwner) external; function claimOwnership() external; }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; import "./IERC20.sol"; import "./IPiTransferGate.sol"; interface IGatedERC20 is IERC20 { function transferGate() external view returns (IPiTransferGate); function setTransferGate(IPiTransferGate _transferGate) external; }
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure 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 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_Pi","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum AddressState","name":"state","type":"uint8"}],"name":"AddressStateSet","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":"dev","type":"address"},{"indexed":false,"internalType":"address","name":"stake","type":"address"},{"indexed":false,"internalType":"uint16","name":"stakeRate","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"burnRate","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"devRate","type":"uint16"}],"name":"ParametersSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"slippage","type":"uint256"}],"name":"SlippageSet","type":"event"},{"inputs":[{"internalType":"address","name":"factoryAddress","type":"address"}],"name":"addFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressStates","outputs":[{"internalType":"enum AddressState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniswapV2Factory","name":"_uniswapV2Factory","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"allowPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowedFactoryAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedPoolTokens","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowedPoolTokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"detectState","outputs":[{"internalType":"enum AddressState","name":"state","type":"uint8"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"freeParticipant","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"handleTransfer","outputs":[{"internalType":"uint256","name":"burn","type":"uint256"},{"components":[{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct TransferGateTarget[]","name":"targets","type":"tuple[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"liquiditySupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mustUpdate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"parameters","outputs":[{"internalType":"address","name":"dev","type":"address"},{"internalType":"uint16","name":"stakeRate","type":"uint16"},{"internalType":"uint16","name":"burnRate","type":"uint16"},{"internalType":"uint16","name":"devRate","type":"uint16"},{"internalType":"address","name":"stake","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"factoryAddress","type":"address"}],"name":"removeFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IUniswapV2Router02","name":"_uniswapRouter02","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"PiAmount","type":"uint256"}],"name":"safeAddLiquidity","outputs":[{"internalType":"uint256","name":"PiUsed","type":"uint256"},{"internalType":"uint256","name":"tokenUsed","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"},{"internalType":"enum AddressState","name":"state","type":"uint8"}],"name":"setAddressState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"participant","type":"address"},{"internalType":"bool","name":"free","type":"bool"}],"name":"setFreeParticipant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dev","type":"address"},{"internalType":"address","name":"_stake","type":"address"},{"internalType":"uint16","name":"_stakeRate","type":"uint16"},{"internalType":"uint16","name":"_burnRate","type":"uint16"},{"internalType":"uint16","name":"_devRate","type":"uint16"}],"name":"setParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_slippage","type":"uint256"}],"name":"setSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_unrestricted","type":"bool"}],"name":"setUnrestricted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"unrestrictedController","type":"address"},{"internalType":"bool","name":"allow","type":"bool"}],"name":"setUnrestrictedController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"throwAddressState","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unrestricted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unrestrictedControllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a0604052600080546001600160a01b03191633179055611388600d553480156200002957600080fd5b506040516200307c3803806200307c8339810160408190526200004c9162000184565b600160028190556001600160601b0319606083901b16608052735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f600052600a6020527f6b6db0e5a071b5b5a795aebd1b920390f7143688ec84db92cc3ee1e53faee91d805460ff19169091179055620000b862000156565b7316352774bf9287e0324e362897c1380abc8b2b358082526107d0602083018190526101f46040840152606083015273b0bbfaf6492b70359a001fd30e673a4fce875c6c6080909201829052600380546001600160a01b031990811690921761ffff60a01b1916607d60a41b1761ffff60b01b1916607d60b21b1761ffff60c01b1916607d60c41b17905560048054909116909117905550620001b4565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60006020828403121562000196578081fd5b81516001600160a01b0381168114620001ad578182fd5b9392505050565b60805160601c612e7862000204600039806106e1528061078f5280610f2e52806110a952806111715280611214528061134452806113a152806115495280611ea85280611f6c5250612e786000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80637df6dc25116100f9578063d333555311610097578063f0fa55a911610071578063f0fa55a9146103bc578063f2fde38b146103cf578063f77a4ba0146103e2578063fb774c04146103f5576101c4565b8063d33355531461038e578063d8304ae2146103a1578063d89bc367146103b4576101c4565b80638da5cb5b116100d35780638da5cb5b1461033f57806395c47d06146103475780639c8c247c14610368578063c2cac5661461037b576101c4565b80637df6dc25146102f15780638327eb87146103135780638903573014610326576101c4565b8063464e651d116101665780634e71e0c8116101405780634e71e0c8146102b057806356f62a3b146102b85780637c1c6f0b146102cb5780637da6b496146102de576101c4565b8063464e651d1461027757806348b156761461028a5780634b37c73f1461029d576101c4565b806329ce1ec5116101a257806329ce1ec51461021c57806335c6508d1461022f5780633d4dc1371461024f57806345d63cd314610264576101c4565b80630bfe8934146101c957806316114acd146101f257806326278f8614610207575b600080fd5b6101dc6101d7366004612917565b610408565b6040516101e99190612974565b60405180910390f35b610205610200366004612715565b610432565b005b61020f610521565b6040516101e99190612a92565b61020561022a366004612715565b61052a565b61024261023d366004612715565b61059a565b6040516101e99190612a9d565b6102576105af565b6040516101e99190612c84565b610205610272366004612805565b6105b6565b6102056102853660046128a5565b61062d565b61020561029836600461279d565b61094f565b6102056102ab366004612715565b610b0d565b610205610b7a565b6102056102c636600461283d565b610bed565b6102426102d9366004612715565b610ca8565b61020f6102ec366004612715565b610d85565b6103046102ff3660046128d2565b610d9a565b6040516101e993929190612ced565b61020561032136600461286d565b611657565b61032e611699565b6040516101e9959493929190612a5e565b6101dc6116d2565b61035a61035536600461274d565b6116e1565b6040516101e9929190612c8d565b610205610376366004612805565b611c98565b61020f610389366004612715565b611d0f565b61020561039c366004612917565b611d24565b6102056103af366004612715565b611da1565b6101dc611fda565b6102056103ca366004612917565b611fe9565b6102056103dd366004612715565b612097565b61020f6103f0366004612715565b612105565b610257610403366004612715565b61211a565b6006818154811061041857600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b0316331461047e576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6104878161212c565b61049057600080fd5b61051e33826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156104e157600080fd5b505afa1580156104f5573d6000803e3d6000fd5b505050506040513d602081101561050b57600080fd5b50516001600160a01b038416919061213e565b50565b60075460ff1681565b6000546001600160a01b03163314610576576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03166000908152600a60205260409020805460ff19166001179055565b60056020526000908152604090205460ff1681565b6006545b90565b6000546001600160a01b03163314610602576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610679576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b0382166000908152600a602052604090205460ff166106ba5760405162461bcd60e51b81526004016106b190612ab1565b60405180910390fd5b60405163e6a4390560e01b81526000906001600160a01b0384169063e6a439059061070b907f00000000000000000000000000000000000000000000000000000000000000009086906004016129c5565b60206040518083038186803b15801561072357600080fd5b505afa158015610737573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075b9190612731565b90506001600160a01b03811661080e576040516364e329cb60e11b81526001600160a01b0384169063c9c65396906107b9907f00000000000000000000000000000000000000000000000000000000000000009086906004016129c5565b602060405180830381600087803b1580156107d357600080fd5b505af11580156107e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080b9190612731565b90505b6001600160a01b03811660009081526005602052604090205460ff16600381600381111561083857fe5b14156108565760405162461bcd60e51b81526004016106b190612b54565b6001600160a01b038281166000818152600560209081526040808320805460ff191660031790556006805460018101825593527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90920180549488166001600160a01b03199095169490941790935580516318160ddd60e01b8152905191926318160ddd92600480840193829003018186803b1580156108f557600080fd5b505afa158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092d919061292f565b6001600160a01b039092166000908152600b6020526040902091909155505050565b6000546001600160a01b0316331461099b576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b620186a08361ffff16111580156109b95750620186a08261ffff1611155b80156109cc5750620186a08161ffff1611155b80156109e35750620186a0818385010161ffff1611155b6109ff5760405162461bcd60e51b81526004016106b190612c64565b6001600160a01b03851615801590610a1f57506001600160a01b03841615155b610a2857600080fd5b610a306126be565b6001600160a01b0386811680835261ffff86811660208501819052868216604080870182905292871660608701819052948a1660808701819052600380546001600160a01b031990811690961761ffff60a01b1916600160a01b9094029390931761ffff60b01b1916600160b01b9092029190911761ffff60c01b1916600160c01b909502949094179055600480549092169092179055517fbfd5e625291b0ccaa4917bab7a62a7a0d7137686dc25a0470ddf9f7ba9a75e4f90610afd90889088908890889088906129df565b60405180910390a1505050505050565b6000546001600160a01b03163314610b59576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03166000908152600a60205260409020805460ff19169055565b6001546001600160a01b03163314610b9157600080fd5b600180546001600160a01b03191690556000805460405133926001600160a01b03909216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b03191633179055565b6000546001600160a01b03163314610c39576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b0382166000908152600560205260409020805482919060ff19166001836003811115610c6857fe5b02179055507f95de19b5339566eb54682a47e034e79a78ed512e3e3bfa79ca8054abe7ce850881604051610c9c9190612a9d565b60405180910390a15050565b6001610cbc6001600160a01b038316612195565b15610d4b57604051636c18257160e11b8152309063d8304ae290610ce4908590600401612974565b60006040518083038186803b158015610cfc57600080fd5b505afa925050508015610d0d575060015b610d4957610d19612d09565b80610d245750610d44565b805160011415610d3357600191505b805160021415610d4257600291505b505b610d4b565bfe5b6001600160a01b0382166000908152600560205260409020805482919060ff19166001836003811115610d7a57fe5b02179055505b919050565b60086020526000908152604090205460ff1681565b6000806000600280541415610df6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60028081905550600a6000886001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3a57600080fd5b505afa158015610e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e729190612731565b6001600160a01b0316815260208101919091526040016000205460ff16610eab5760405162461bcd60e51b81526004016106b190612b7d565b6000876001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee657600080fd5b505afa158015610efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1e9190612731565b6001600160a01b031663e6a439057f0000000000000000000000000000000000000000000000000000000000000000896040518363ffffffff1660e01b8152600401610f6b9291906129c5565b60206040518083038186803b158015610f8357600080fd5b505afa158015610f97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbb9190612731565b90506001600160a01b03811615801590610ffb575060036001600160a01b03821660009081526005602052604090205460ff166003811115610ff957fe5b145b6110175760405162461bcd60e51b81526004016106b190612b29565b6007805460ff191660011790556040516370a0823160e01b81526000906001600160a01b038916906370a0823190611053903090600401612974565b60206040518083038186803b15801561106b57600080fd5b505afa15801561107f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a3919061292f565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016110f39190612974565b60206040518083038186803b15801561110b57600080fd5b505afa15801561111f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611143919061292f565b905061115a6001600160a01b038a1633308b61219b565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906111aa90339030908c90600401612988565b602060405180830381600087803b1580156111c457600080fd5b505af11580156111d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fc9190612889565b5060405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b39061124b908d908b906004016129ac565b602060405180830381600087803b15801561126557600080fd5b505af1158015611279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129d9190612889565b506112b26001600160a01b038a168b8a6121fb565b600061133a838b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016112e49190612974565b60206040518083038186803b1580156112fc57600080fd5b505afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611334919061292f565b9061224d565b9050600061138e837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016112e49190612974565b90508b6001600160a01b031663e8e337007f00000000000000000000000000000000000000000000000000000000000000008d84866113ea620186a06113e4600d54620186a0038a61229890919063ffffffff16565b906122f1565b61140b620186a06113e4600d54620186a0038c61229890919063ffffffff16565b33426040518963ffffffff1660e01b8152600401611430989796959493929190612a15565b606060405180830381600087803b15801561144a57600080fd5b505af115801561145e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114829190612947565b809850819950829a50505050846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114c757600080fd5b505afa1580156114db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ff919061292f565b6001600160a01b038087166000818152600b6020526040902092909255600c5416141561153757600c80546001600160a01b03191690555b888810156115ea576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb336115798c8c61224d565b6040518363ffffffff1660e01b81526004016115969291906129ac565b602060405180830381600087803b1580156115b057600080fd5b505af11580156115c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e89190612889565b505b61161a848c6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016112e49190612974565b93508315611636576116366001600160a01b038c16338661213e565b50506007805460ff1916905550506001600255509196909550909350915050565b3360009081526008602052604090205460ff166116865760405162461bcd60e51b81526004016106b190612c2d565b6007805460ff1916911515919091179055565b6003546004546001600160a01b038083169261ffff600160a01b8204811693600160b01b8304821693600160c01b909304909116911685565b6000546001600160a01b031681565b600c546000906060906001600160a01b0316801561179b57600c80546001600160a01b0319169055604080516318160ddd60e01b815290516001600160a01b038316916318160ddd916004808301926020929190829003018186803b15801561174957600080fd5b505afa15801561175d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611781919061292f565b6001600160a01b0382166000908152600b60205260409020555b6001600160a01b0380871660009081526005602052604080822054928816825290205460ff918216911660038260038111156117d357fe5b141580156117ed575060038160038111156117ea57fe5b14155b1561188257600082600381111561180057fe5b14156118125761180f88610ca8565b91505b600081600381111561182057fe5b14156118325761182f87610ca8565b90505b60075460ff16806118665750600282600381111561184c57fe5b141580156118665750600281600381111561186357fe5b14155b6118825760405162461bcd60e51b81526004016106b190612b29565b600381600381111561189057fe5b14156118b257600c80546001600160a01b0319166001600160a01b0389161790555b60038260038111156118c057fe5b1415611a115760075460ff161561195c57876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561190a57600080fd5b505afa15801561191e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611942919061292f565b6001600160a01b0389166000908152600b60205260409020555b600b6000896001600160a01b03166001600160a01b0316815260200190815260200160002054886001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119bb57600080fd5b505afa1580156119cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f3919061292f565b1015611a115760405162461bcd60e51b81526004016106b190612bf6565b60075460ff1680611a3a57506001600160a01b03881660009081526009602052604090205460ff165b80611a5d57506001600160a01b03871660009081526009602052604090205460ff165b15611aa0576040805160008082526020820190925281611a93565b611a806126ec565b815260200190600190039081611a785790505b5094509450505050611c8f565b611aa86126be565b506040805160a0810182526003546001600160a01b03808216835261ffff600160a01b830481166020850152600160b01b83048116948401859052600160c01b909204909116606083015260045416608082015290611b1190620186a0906113e4908a90612298565b95506000816020015161ffff1611611b2a576000611b2d565b60015b6000826060015161ffff1611611b44576000611b47565b60015b0160ff1667ffffffffffffffff81118015611b6157600080fd5b50604051908082528060200260200182016040528015611b9b57816020015b611b886126ec565b815260200190600190039081611b805790505b509450600080826020015161ffff161115611c18578160800151868281518110611bc157fe5b6020908102919091018101516001600160a01b03909216909152820151611bf690620186a0906113e4908b9061ffff16612298565b8651600183019288918110611c0757fe5b602002602001015160200181815250505b606082015161ffff1615611c89578160000151868281518110611c3757fe5b60209081029190910101516001600160a01b0390911690526060820151611c6c90620186a0906113e4908b9061ffff16612298565b868281518110611c7857fe5b602002602001015160200181815250505b50505050505b94509492505050565b6000546001600160a01b03163314611ce4576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600960205260409020805460ff1916911515919091179055565b600a6020526000908152604090205460ff1681565b6000546001600160a01b03163314611d70576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b604051339082156108fc029083906000818181858888f19350505050158015611d9d573d6000803e3d6000fd5b5050565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015611dda57600080fd5b505afa925050508015611e0a575060408051601f3d908101601f19168201909252611e0791810190612731565b60015b611e1357611fc2565b6001600160a01b0381166000908152600a602052604090205460ff1615611fc057816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6d57600080fd5b505afa925050508015611e9d575060408051601f3d908101601f19168201909252611e9a91810190612731565b60015b611ea657611fc0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611ef85760405162461bcd60e51b81526004016106b190612bda565b826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3157600080fd5b505afa925050508015611f61575060408051601f3d908101601f19168201909252611f5e91810190612731565b60015b611f6a57611fbe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fbc5760405162461bcd60e51b81526004016106b190612bda565b505b505b505b60405162461bcd60e51b81526004016106b190612bbf565b600c546001600160a01b031681565b6000546001600160a01b03163314612035576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b620186a081106120575760405162461bcd60e51b81526004016106b190612af2565b600d8190556040517f1a89170b7100a37f2e1a8bca9d866cd3f6d666800bfb0fa8dd82f0b2193c926f9061208c908390612c84565b60405180910390a150565b6000546001600160a01b031633146120e3576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60096020526000908152604090205460ff1681565b600b6020526000908152604090205481565b6001600160a01b038116301415919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612190908490612333565b505050565b3b151590565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526121f5908590612333565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612190908490612333565b600061228f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506123e4565b90505b92915050565b6000826122a757506000612292565b828202828482816122b457fe5b041461228f5760405162461bcd60e51b8152600401808060200182810382526021815260200180612df86021913960400191505060405180910390fd5b600061228f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612480565b6060612388826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166124e59092919063ffffffff16565b805190915015612190578080602001905160208110156123a757600080fd5b50516121905760405162461bcd60e51b815260040180806020018281038252602a815260200180612e19602a913960400191505060405180910390fd5b600081848411156124735760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612438578181015183820152602001612420565b50505050905090810190601f1680156124655780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b600081836124cf5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612438578181015183820152602001612420565b5060008385816124db57fe5b0495945050505050565b60606124f484846000856124fc565b949350505050565b60608247101561253d5760405162461bcd60e51b8152600401808060200182810382526026815260200180612dd26026913960400191505060405180910390fd5b61254685612195565b612597576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106125d65780518252601f1990920191602091820191016125b7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612638576040519150601f19603f3d011682016040523d82523d6000602084013e61263d565b606091505b509150915061264d828286612658565b979650505050505050565b60608315612667575081612479565b8251156126775782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612438578181015183820152602001612420565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b604080518082019091526000808252602082015290565b803561ffff81168114610d8057600080fd5b600060208284031215612726578081fd5b813561228f81612dae565b600060208284031215612742578081fd5b815161228f81612dae565b60008060008060808587031215612762578283fd5b843561276d81612dae565b9350602085013561277d81612dae565b9250604085013561278d81612dae565b9396929550929360600135925050565b600080600080600060a086880312156127b4578081fd5b85356127bf81612dae565b945060208601356127cf81612dae565b93506127dd60408701612703565b92506127eb60608701612703565b91506127f960808701612703565b90509295509295909350565b60008060408385031215612817578182fd5b823561282281612dae565b9150602083013561283281612dc3565b809150509250929050565b6000806040838503121561284f578182fd5b823561285a81612dae565b9150602083013560048110612832578182fd5b60006020828403121561287e578081fd5b813561228f81612dc3565b60006020828403121561289a578081fd5b815161228f81612dc3565b600080604083850312156128b7578182fd5b82356128c281612dae565b9150602083013561283281612dae565b600080600080608085870312156128e7578384fd5b84356128f281612dae565b9350602085013561290281612dae565b93969395505050506040820135916060013590565b600060208284031215612928578081fd5b5035919050565b600060208284031215612940578081fd5b5051919050565b60008060006060848603121561295b578081fd5b8351925060208401519150604084015190509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03958616815293909416602084015261ffff918216604084015281166060830152909116608082015260a00190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03958616815261ffff94851660208201529284166040840152921660608201529116608082015260a00190565b901515815260200190565b6020810160048310612aab57fe5b91905290565b60208082526021908201527f5468697320756e69737761705632466163746f7279206e6f7420616c6c6f77656040820152601960fa1b606082015260800190565b60208082526018908201527f63616e6e6f74206265206d6f7265207468616e20313030250000000000000000604082015260600190565b602080825260119082015270141bdbdb081b9bdd08185c1c1c9bdd9959607a1b604082015260600190565b6020808252600f908201526e105b1c9958591e48185b1b1bddd959608a1b604082015260600190565b60208082526022908201527f54686973205f756e69737761705632466163746f7279206e6f7420616c6c6f77604082015261195960f21b606082015260800190565b6020808252600190820152603160f81b604082015260600190565b602080825260029082015261191960f11b604082015260600190565b60208082526017908201527f43616e6e6f742072656d6f7665206c6971756964697479000000000000000000604082015260600190565b6020808252601e908201527f4e6f7420616e20756e7265737472696374656420636f6e74726f6c6c65720000604082015260600190565b6020808252600690820152653e203130302560d01b604082015260600190565b90815260200190565b60006040808301858452602082818601528186518084526060870191508288019350855b81811015612cdf57845180516001600160a01b03168452840151848401529383019391850191600101612cb1565b509098975050505050505050565b9283526020830191909152604082015260600190565b60e01c90565b600060443d1015612d19576105b3565b600481823e6308c379a0612d2d8251612d03565b14612d37576105b3565b6040513d600319016004823e80513d67ffffffffffffffff8160248401118184111715612d6757505050506105b3565b82840192508251915080821115612d8157505050506105b3565b503d83016020828401011115612d99575050506105b3565b601f01601f1916810160200160405291505090565b6001600160a01b038116811461051e57600080fd5b801515811461051e57600080fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ee9e1fd16055805d1f9d04caf8a8e64e9ac3a4616e1bb4419113a65c27d1a94264736f6c6343000704003300000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa8707
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80637df6dc25116100f9578063d333555311610097578063f0fa55a911610071578063f0fa55a9146103bc578063f2fde38b146103cf578063f77a4ba0146103e2578063fb774c04146103f5576101c4565b8063d33355531461038e578063d8304ae2146103a1578063d89bc367146103b4576101c4565b80638da5cb5b116100d35780638da5cb5b1461033f57806395c47d06146103475780639c8c247c14610368578063c2cac5661461037b576101c4565b80637df6dc25146102f15780638327eb87146103135780638903573014610326576101c4565b8063464e651d116101665780634e71e0c8116101405780634e71e0c8146102b057806356f62a3b146102b85780637c1c6f0b146102cb5780637da6b496146102de576101c4565b8063464e651d1461027757806348b156761461028a5780634b37c73f1461029d576101c4565b806329ce1ec5116101a257806329ce1ec51461021c57806335c6508d1461022f5780633d4dc1371461024f57806345d63cd314610264576101c4565b80630bfe8934146101c957806316114acd146101f257806326278f8614610207575b600080fd5b6101dc6101d7366004612917565b610408565b6040516101e99190612974565b60405180910390f35b610205610200366004612715565b610432565b005b61020f610521565b6040516101e99190612a92565b61020561022a366004612715565b61052a565b61024261023d366004612715565b61059a565b6040516101e99190612a9d565b6102576105af565b6040516101e99190612c84565b610205610272366004612805565b6105b6565b6102056102853660046128a5565b61062d565b61020561029836600461279d565b61094f565b6102056102ab366004612715565b610b0d565b610205610b7a565b6102056102c636600461283d565b610bed565b6102426102d9366004612715565b610ca8565b61020f6102ec366004612715565b610d85565b6103046102ff3660046128d2565b610d9a565b6040516101e993929190612ced565b61020561032136600461286d565b611657565b61032e611699565b6040516101e9959493929190612a5e565b6101dc6116d2565b61035a61035536600461274d565b6116e1565b6040516101e9929190612c8d565b610205610376366004612805565b611c98565b61020f610389366004612715565b611d0f565b61020561039c366004612917565b611d24565b6102056103af366004612715565b611da1565b6101dc611fda565b6102056103ca366004612917565b611fe9565b6102056103dd366004612715565b612097565b61020f6103f0366004612715565b612105565b610257610403366004612715565b61211a565b6006818154811061041857600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b0316331461047e576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6104878161212c565b61049057600080fd5b61051e33826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156104e157600080fd5b505afa1580156104f5573d6000803e3d6000fd5b505050506040513d602081101561050b57600080fd5b50516001600160a01b038416919061213e565b50565b60075460ff1681565b6000546001600160a01b03163314610576576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03166000908152600a60205260409020805460ff19166001179055565b60056020526000908152604090205460ff1681565b6006545b90565b6000546001600160a01b03163314610602576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610679576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b0382166000908152600a602052604090205460ff166106ba5760405162461bcd60e51b81526004016106b190612ab1565b60405180910390fd5b60405163e6a4390560e01b81526000906001600160a01b0384169063e6a439059061070b907f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa87079086906004016129c5565b60206040518083038186803b15801561072357600080fd5b505afa158015610737573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075b9190612731565b90506001600160a01b03811661080e576040516364e329cb60e11b81526001600160a01b0384169063c9c65396906107b9907f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa87079086906004016129c5565b602060405180830381600087803b1580156107d357600080fd5b505af11580156107e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080b9190612731565b90505b6001600160a01b03811660009081526005602052604090205460ff16600381600381111561083857fe5b14156108565760405162461bcd60e51b81526004016106b190612b54565b6001600160a01b038281166000818152600560209081526040808320805460ff191660031790556006805460018101825593527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90920180549488166001600160a01b03199095169490941790935580516318160ddd60e01b8152905191926318160ddd92600480840193829003018186803b1580156108f557600080fd5b505afa158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092d919061292f565b6001600160a01b039092166000908152600b6020526040902091909155505050565b6000546001600160a01b0316331461099b576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b620186a08361ffff16111580156109b95750620186a08261ffff1611155b80156109cc5750620186a08161ffff1611155b80156109e35750620186a0818385010161ffff1611155b6109ff5760405162461bcd60e51b81526004016106b190612c64565b6001600160a01b03851615801590610a1f57506001600160a01b03841615155b610a2857600080fd5b610a306126be565b6001600160a01b0386811680835261ffff86811660208501819052868216604080870182905292871660608701819052948a1660808701819052600380546001600160a01b031990811690961761ffff60a01b1916600160a01b9094029390931761ffff60b01b1916600160b01b9092029190911761ffff60c01b1916600160c01b909502949094179055600480549092169092179055517fbfd5e625291b0ccaa4917bab7a62a7a0d7137686dc25a0470ddf9f7ba9a75e4f90610afd90889088908890889088906129df565b60405180910390a1505050505050565b6000546001600160a01b03163314610b59576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03166000908152600a60205260409020805460ff19169055565b6001546001600160a01b03163314610b9157600080fd5b600180546001600160a01b03191690556000805460405133926001600160a01b03909216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b03191633179055565b6000546001600160a01b03163314610c39576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b0382166000908152600560205260409020805482919060ff19166001836003811115610c6857fe5b02179055507f95de19b5339566eb54682a47e034e79a78ed512e3e3bfa79ca8054abe7ce850881604051610c9c9190612a9d565b60405180910390a15050565b6001610cbc6001600160a01b038316612195565b15610d4b57604051636c18257160e11b8152309063d8304ae290610ce4908590600401612974565b60006040518083038186803b158015610cfc57600080fd5b505afa925050508015610d0d575060015b610d4957610d19612d09565b80610d245750610d44565b805160011415610d3357600191505b805160021415610d4257600291505b505b610d4b565bfe5b6001600160a01b0382166000908152600560205260409020805482919060ff19166001836003811115610d7a57fe5b02179055505b919050565b60086020526000908152604090205460ff1681565b6000806000600280541415610df6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60028081905550600a6000886001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3a57600080fd5b505afa158015610e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e729190612731565b6001600160a01b0316815260208101919091526040016000205460ff16610eab5760405162461bcd60e51b81526004016106b190612b7d565b6000876001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee657600080fd5b505afa158015610efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1e9190612731565b6001600160a01b031663e6a439057f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa8707896040518363ffffffff1660e01b8152600401610f6b9291906129c5565b60206040518083038186803b158015610f8357600080fd5b505afa158015610f97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbb9190612731565b90506001600160a01b03811615801590610ffb575060036001600160a01b03821660009081526005602052604090205460ff166003811115610ff957fe5b145b6110175760405162461bcd60e51b81526004016106b190612b29565b6007805460ff191660011790556040516370a0823160e01b81526000906001600160a01b038916906370a0823190611053903090600401612974565b60206040518083038186803b15801561106b57600080fd5b505afa15801561107f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a3919061292f565b905060007f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa87076001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016110f39190612974565b60206040518083038186803b15801561110b57600080fd5b505afa15801561111f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611143919061292f565b905061115a6001600160a01b038a1633308b61219b565b6040516323b872dd60e01b81526001600160a01b037f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa870716906323b872dd906111aa90339030908c90600401612988565b602060405180830381600087803b1580156111c457600080fd5b505af11580156111d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fc9190612889565b5060405163095ea7b360e01b81526001600160a01b037f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa8707169063095ea7b39061124b908d908b906004016129ac565b602060405180830381600087803b15801561126557600080fd5b505af1158015611279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129d9190612889565b506112b26001600160a01b038a168b8a6121fb565b600061133a838b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016112e49190612974565b60206040518083038186803b1580156112fc57600080fd5b505afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611334919061292f565b9061224d565b9050600061138e837f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa87076001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016112e49190612974565b90508b6001600160a01b031663e8e337007f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa87078d84866113ea620186a06113e4600d54620186a0038a61229890919063ffffffff16565b906122f1565b61140b620186a06113e4600d54620186a0038c61229890919063ffffffff16565b33426040518963ffffffff1660e01b8152600401611430989796959493929190612a15565b606060405180830381600087803b15801561144a57600080fd5b505af115801561145e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114829190612947565b809850819950829a50505050846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114c757600080fd5b505afa1580156114db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ff919061292f565b6001600160a01b038087166000818152600b6020526040902092909255600c5416141561153757600c80546001600160a01b03191690555b888810156115ea576001600160a01b037f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa87071663a9059cbb336115798c8c61224d565b6040518363ffffffff1660e01b81526004016115969291906129ac565b602060405180830381600087803b1580156115b057600080fd5b505af11580156115c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e89190612889565b505b61161a848c6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016112e49190612974565b93508315611636576116366001600160a01b038c16338661213e565b50506007805460ff1916905550506001600255509196909550909350915050565b3360009081526008602052604090205460ff166116865760405162461bcd60e51b81526004016106b190612c2d565b6007805460ff1916911515919091179055565b6003546004546001600160a01b038083169261ffff600160a01b8204811693600160b01b8304821693600160c01b909304909116911685565b6000546001600160a01b031681565b600c546000906060906001600160a01b0316801561179b57600c80546001600160a01b0319169055604080516318160ddd60e01b815290516001600160a01b038316916318160ddd916004808301926020929190829003018186803b15801561174957600080fd5b505afa15801561175d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611781919061292f565b6001600160a01b0382166000908152600b60205260409020555b6001600160a01b0380871660009081526005602052604080822054928816825290205460ff918216911660038260038111156117d357fe5b141580156117ed575060038160038111156117ea57fe5b14155b1561188257600082600381111561180057fe5b14156118125761180f88610ca8565b91505b600081600381111561182057fe5b14156118325761182f87610ca8565b90505b60075460ff16806118665750600282600381111561184c57fe5b141580156118665750600281600381111561186357fe5b14155b6118825760405162461bcd60e51b81526004016106b190612b29565b600381600381111561189057fe5b14156118b257600c80546001600160a01b0319166001600160a01b0389161790555b60038260038111156118c057fe5b1415611a115760075460ff161561195c57876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561190a57600080fd5b505afa15801561191e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611942919061292f565b6001600160a01b0389166000908152600b60205260409020555b600b6000896001600160a01b03166001600160a01b0316815260200190815260200160002054886001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119bb57600080fd5b505afa1580156119cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f3919061292f565b1015611a115760405162461bcd60e51b81526004016106b190612bf6565b60075460ff1680611a3a57506001600160a01b03881660009081526009602052604090205460ff165b80611a5d57506001600160a01b03871660009081526009602052604090205460ff165b15611aa0576040805160008082526020820190925281611a93565b611a806126ec565b815260200190600190039081611a785790505b5094509450505050611c8f565b611aa86126be565b506040805160a0810182526003546001600160a01b03808216835261ffff600160a01b830481166020850152600160b01b83048116948401859052600160c01b909204909116606083015260045416608082015290611b1190620186a0906113e4908a90612298565b95506000816020015161ffff1611611b2a576000611b2d565b60015b6000826060015161ffff1611611b44576000611b47565b60015b0160ff1667ffffffffffffffff81118015611b6157600080fd5b50604051908082528060200260200182016040528015611b9b57816020015b611b886126ec565b815260200190600190039081611b805790505b509450600080826020015161ffff161115611c18578160800151868281518110611bc157fe5b6020908102919091018101516001600160a01b03909216909152820151611bf690620186a0906113e4908b9061ffff16612298565b8651600183019288918110611c0757fe5b602002602001015160200181815250505b606082015161ffff1615611c89578160000151868281518110611c3757fe5b60209081029190910101516001600160a01b0390911690526060820151611c6c90620186a0906113e4908b9061ffff16612298565b868281518110611c7857fe5b602002602001015160200181815250505b50505050505b94509492505050565b6000546001600160a01b03163314611ce4576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600960205260409020805460ff1916911515919091179055565b600a6020526000908152604090205460ff1681565b6000546001600160a01b03163314611d70576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b604051339082156108fc029083906000818181858888f19350505050158015611d9d573d6000803e3d6000fd5b5050565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015611dda57600080fd5b505afa925050508015611e0a575060408051601f3d908101601f19168201909252611e0791810190612731565b60015b611e1357611fc2565b6001600160a01b0381166000908152600a602052604090205460ff1615611fc057816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6d57600080fd5b505afa925050508015611e9d575060408051601f3d908101601f19168201909252611e9a91810190612731565b60015b611ea657611fc0565b7f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa87076001600160a01b0316816001600160a01b03161415611ef85760405162461bcd60e51b81526004016106b190612bda565b826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3157600080fd5b505afa925050508015611f61575060408051601f3d908101601f19168201909252611f5e91810190612731565b60015b611f6a57611fbe565b7f00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa87076001600160a01b0316816001600160a01b03161415611fbc5760405162461bcd60e51b81526004016106b190612bda565b505b505b505b60405162461bcd60e51b81526004016106b190612bbf565b600c546001600160a01b031681565b6000546001600160a01b03163314612035576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b620186a081106120575760405162461bcd60e51b81526004016106b190612af2565b600d8190556040517f1a89170b7100a37f2e1a8bca9d866cd3f6d666800bfb0fa8dd82f0b2193c926f9061208c908390612c84565b60405180910390a150565b6000546001600160a01b031633146120e3576040805162461bcd60e51b815260206004820152600a6024820152694f776e6572206f6e6c7960b01b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60096020526000908152604090205460ff1681565b600b6020526000908152604090205481565b6001600160a01b038116301415919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612190908490612333565b505050565b3b151590565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526121f5908590612333565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612190908490612333565b600061228f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506123e4565b90505b92915050565b6000826122a757506000612292565b828202828482816122b457fe5b041461228f5760405162461bcd60e51b8152600401808060200182810382526021815260200180612df86021913960400191505060405180910390fd5b600061228f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612480565b6060612388826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166124e59092919063ffffffff16565b805190915015612190578080602001905160208110156123a757600080fd5b50516121905760405162461bcd60e51b815260040180806020018281038252602a815260200180612e19602a913960400191505060405180910390fd5b600081848411156124735760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612438578181015183820152602001612420565b50505050905090810190601f1680156124655780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b600081836124cf5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612438578181015183820152602001612420565b5060008385816124db57fe5b0495945050505050565b60606124f484846000856124fc565b949350505050565b60608247101561253d5760405162461bcd60e51b8152600401808060200182810382526026815260200180612dd26026913960400191505060405180910390fd5b61254685612195565b612597576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106125d65780518252601f1990920191602091820191016125b7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612638576040519150601f19603f3d011682016040523d82523d6000602084013e61263d565b606091505b509150915061264d828286612658565b979650505050505050565b60608315612667575081612479565b8251156126775782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612438578181015183820152602001612420565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b604080518082019091526000808252602082015290565b803561ffff81168114610d8057600080fd5b600060208284031215612726578081fd5b813561228f81612dae565b600060208284031215612742578081fd5b815161228f81612dae565b60008060008060808587031215612762578283fd5b843561276d81612dae565b9350602085013561277d81612dae565b9250604085013561278d81612dae565b9396929550929360600135925050565b600080600080600060a086880312156127b4578081fd5b85356127bf81612dae565b945060208601356127cf81612dae565b93506127dd60408701612703565b92506127eb60608701612703565b91506127f960808701612703565b90509295509295909350565b60008060408385031215612817578182fd5b823561282281612dae565b9150602083013561283281612dc3565b809150509250929050565b6000806040838503121561284f578182fd5b823561285a81612dae565b9150602083013560048110612832578182fd5b60006020828403121561287e578081fd5b813561228f81612dc3565b60006020828403121561289a578081fd5b815161228f81612dc3565b600080604083850312156128b7578182fd5b82356128c281612dae565b9150602083013561283281612dae565b600080600080608085870312156128e7578384fd5b84356128f281612dae565b9350602085013561290281612dae565b93969395505050506040820135916060013590565b600060208284031215612928578081fd5b5035919050565b600060208284031215612940578081fd5b5051919050565b60008060006060848603121561295b578081fd5b8351925060208401519150604084015190509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03958616815293909416602084015261ffff918216604084015281166060830152909116608082015260a00190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03958616815261ffff94851660208201529284166040840152921660608201529116608082015260a00190565b901515815260200190565b6020810160048310612aab57fe5b91905290565b60208082526021908201527f5468697320756e69737761705632466163746f7279206e6f7420616c6c6f77656040820152601960fa1b606082015260800190565b60208082526018908201527f63616e6e6f74206265206d6f7265207468616e20313030250000000000000000604082015260600190565b602080825260119082015270141bdbdb081b9bdd08185c1c1c9bdd9959607a1b604082015260600190565b6020808252600f908201526e105b1c9958591e48185b1b1bddd959608a1b604082015260600190565b60208082526022908201527f54686973205f756e69737761705632466163746f7279206e6f7420616c6c6f77604082015261195960f21b606082015260800190565b6020808252600190820152603160f81b604082015260600190565b602080825260029082015261191960f11b604082015260600190565b60208082526017908201527f43616e6e6f742072656d6f7665206c6971756964697479000000000000000000604082015260600190565b6020808252601e908201527f4e6f7420616e20756e7265737472696374656420636f6e74726f6c6c65720000604082015260600190565b6020808252600690820152653e203130302560d01b604082015260600190565b90815260200190565b60006040808301858452602082818601528186518084526060870191508288019350855b81811015612cdf57845180516001600160a01b03168452840151848401529383019391850191600101612cb1565b509098975050505050505050565b9283526020830191909152604082015260600190565b60e01c90565b600060443d1015612d19576105b3565b600481823e6308c379a0612d2d8251612d03565b14612d37576105b3565b6040513d600319016004823e80513d67ffffffffffffffff8160248401118184111715612d6757505050506105b3565b82840192508251915080821115612d8157505050506105b3565b503d83016020828401011115612d99575050506105b3565b601f01601f1916810160200160405291505090565b6001600160a01b038116811461051e57600080fd5b801515811461051e57600080fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ee9e1fd16055805d1f9d04caf8a8e64e9ac3a4616e1bb4419113a65c27d1a94264736f6c63430007040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa8707
-----Decoded View---------------
Arg [0] : _Pi (address): 0x37613D64258c0FE09d5E53EeCb091DA5b8fA8707
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000037613d64258c0fe09d5e53eecb091da5b8fa8707
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.