More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 963 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Swap Tokens For ... | 20870365 | 48 days ago | IN | 0 ETH | 0.00242452 | ||||
Create Token | 20870337 | 48 days ago | IN | 0.15 ETH | 0.0478915 | ||||
Swap Eth For Tok... | 20870172 | 48 days ago | IN | 0.2135247 ETH | 0.04188515 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.15606119 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.12577949 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.20998786 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.19865522 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.14968137 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.13602953 ETH | 0.00257059 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.21304529 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.17032954 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.18397019 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.15899782 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.17116867 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.18728778 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.20309064 ETH | 0.00257059 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.18320408 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.19278534 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.20286598 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.20095703 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.18460975 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.15658339 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.13414822 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.17958634 ETH | 0.00257075 | ||||
Swap Eth For Tok... | 20870169 | 48 days ago | IN | 0.16207034 ETH | 0.00257075 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20870365 | 48 days ago | 0.147015 ETH | ||||
20870365 | 48 days ago | 0.001485 ETH | ||||
20870337 | 48 days ago | 0.0015 ETH | ||||
20870337 | 48 days ago | Contract Creation | 0 ETH | |||
20870172 | 48 days ago | 4.97486484 ETH | ||||
20870172 | 48 days ago | 0.10152785 ETH | ||||
20870172 | 48 days ago | 0.00213524 ETH | ||||
20870169 | 48 days ago | 0.00156061 ETH | ||||
20870169 | 48 days ago | 0.00125779 ETH | ||||
20870169 | 48 days ago | 0.00209987 ETH | ||||
20870169 | 48 days ago | 0.00198655 ETH | ||||
20870169 | 48 days ago | 0.00149681 ETH | ||||
20870169 | 48 days ago | 0.00136029 ETH | ||||
20870169 | 48 days ago | 0.00213045 ETH | ||||
20870169 | 48 days ago | 0.00170329 ETH | ||||
20870169 | 48 days ago | 0.0018397 ETH | ||||
20870169 | 48 days ago | 0.00158997 ETH | ||||
20870169 | 48 days ago | 0.00171168 ETH | ||||
20870169 | 48 days ago | 0.00187287 ETH | ||||
20870169 | 48 days ago | 0.0020309 ETH | ||||
20870169 | 48 days ago | 0.00183204 ETH | ||||
20870169 | 48 days ago | 0.00192785 ETH | ||||
20870169 | 48 days ago | 0.00202865 ETH | ||||
20870169 | 48 days ago | 0.00200957 ETH | ||||
20870169 | 48 days ago | 0.00184609 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
EmCore
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; import {ReentrancyGuard} from "solmate/utils/ReentrancyGuard.sol"; import {FixedPointMathLib} from "solmate/utils/FixedPointMathLib.sol"; import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol"; import {EmToken} from "./EmToken.sol"; import {EmHeadmaster} from "./EmHeadmaster.sol"; import {EmLedger} from "./EmLedger.sol"; import {ExternalEntities} from "./ExternalEntities.sol"; error InsufficientOutput(); error InsufficientTokenReserve(); error InsufficientEthReserve(); error InsufficientMcap(); error TooMuchMcap(); error AlreadyGraduated(); error NotEmToken(); error DeadlineExceeded(); error InvalidAmountIn(); error Forbidden(); error FeeTooHigh(); error Paused(); /// @notice Owner can pause trading, set fees, and set the graduation strategy, but cannot withdraw funds or modify the bonding curve. contract EmCore is ReentrancyGuard { using FixedPointMathLib for uint256; struct Pool { EmToken token; uint256 tokenReserve; uint256 virtualTokenReserve; uint256 ethReserve; uint256 virtualEthReserve; uint256 lastPrice; uint256 lastMcapInEth; uint256 lastTimestamp; uint256 lastBlock; address creator; address headmaster; // poolId is not limited to address to support non-uniswap styled AMMs uint256 poolId; // K is never updated uint256 K; } uint8 public constant DECIMALS = 18; uint256 public constant FEE_DENOMINATOR = 10000; uint256 public constant MAX_FEE = 1000; // 10% uint256 public feeRate_ = 100; // 1% uint256 public constant INIT_VIRTUAL_TOKEN_RESERVE = 1073000000 ether; uint256 public constant INIT_REAL_TOKEN_RESERVE = 793100000 ether; uint256 public constant TOTAL_SUPPLY = 1000000000 ether; uint256 public initVirtualEthReserve_; uint256 public graduationThreshold_; uint256 public K_; mapping(EmToken => Pool) public pools_; EmLedger public emLedger_; uint256 public creationFee_ = 0; uint256 public graduationFeeRate_ = 200; address public feeTo_; bool public paused_; EmHeadmaster public headmaster_; // the contract which implements the graduation logic ExternalEntities public externalEntities_; /*////////////////////////////////////////////////// ///////////// PERMISSIONED METHODS ///////////// //////////////////////////////////////////////////*/ address public owner_; modifier onlyOwner() { if (msg.sender != owner_) revert Forbidden(); _; } function setFeeTo(address feeTo) external onlyOwner { feeTo_ = feeTo; } function setFeeRate(uint256 feeRate) external onlyOwner { if (feeRate > MAX_FEE) revert FeeTooHigh(); feeRate_ = feeRate; } function setGraduationFeeRate(uint256 feeRate) external onlyOwner { if (feeRate > MAX_FEE) revert FeeTooHigh(); graduationFeeRate_ = feeRate; } function setEmLedger(EmLedger _ledger) external onlyOwner { emLedger_ = _ledger; } function setInitVirtualEthReserve( uint256 initVirtualEthReserve ) external onlyOwner { initVirtualEthReserve_ = initVirtualEthReserve; K_ = initVirtualEthReserve_ * INIT_VIRTUAL_TOKEN_RESERVE; graduationThreshold_ = K_ / (INIT_VIRTUAL_TOKEN_RESERVE - INIT_REAL_TOKEN_RESERVE) - initVirtualEthReserve_; } function setCreationFee(uint256 fee) external onlyOwner { creationFee_ = fee; } function setHeadmaster(EmHeadmaster headmaster) external onlyOwner { headmaster_ = headmaster; } function setExternalEntities( ExternalEntities externalEntities ) external onlyOwner { externalEntities_ = externalEntities; } function setOwner(address owner) external onlyOwner { owner_ = owner; } function setPaused(bool paused) external onlyOwner { paused_ = paused; } /*////////////////////////////////////////////////// //////////////// CONSTRUCTOR /////////////////// //////////////////////////////////////////////////*/ constructor(uint256 initVirtualEthReserve) { feeTo_ = msg.sender; owner_ = msg.sender; paused_ = false; emLedger_ = new EmLedger(); initVirtualEthReserve_ = initVirtualEthReserve; K_ = initVirtualEthReserve_ * INIT_VIRTUAL_TOKEN_RESERVE; graduationThreshold_ = K_ / (INIT_VIRTUAL_TOKEN_RESERVE - INIT_REAL_TOKEN_RESERVE) - initVirtualEthReserve_; } /*////////////////////////////////////////////////// ////////////////// ASSERTIONS ////////////////// //////////////////////////////////////////////////*/ modifier checkDeadline(uint256 deadline) { if (block.timestamp > deadline) revert DeadlineExceeded(); _; } modifier onlyUnpaused() { if (paused_) revert Paused(); _; } modifier onlyUngraduated(EmToken token) { if (pools_[token].headmaster != address(0)) revert AlreadyGraduated(); if (pools_[token].ethReserve > graduationThreshold_) { revert TooMuchMcap(); } _; } modifier onlyEmToken(EmToken token) { if (token == EmToken(address(0)) || pools_[token].token != token) { revert NotEmToken(); } _; } function _isMcapGraduable(EmToken token) private view returns (bool) { return pools_[token].ethReserve >= graduationThreshold_; } /*////////////////////////////////////////////////// //////////////////// EVENTS //////////////////// //////////////////////////////////////////////////*/ event TokenCreated(EmToken indexed token, address indexed creator); event TokenGraduated( EmToken indexed token, EmHeadmaster indexed headmaster, uint256 indexed poolId, uint256 amountToken, uint256 amountETH ); event Buy( EmToken indexed token, address indexed sender, uint256 amountIn, uint256 amountOut, address indexed to ); event Sell( EmToken indexed token, address indexed sender, uint256 amountIn, uint256 amountOut, address indexed to ); event PriceUpdate( EmToken indexed token, address indexed sender, uint256 price, uint256 mcapInEth ); /*////////////////////////////////////////////////// //////////////// POOL FUNCTIONS //////////////// //////////////////////////////////////////////////*/ /// @notice Creates a new token in the EmCore. /// @param name The name of the token. /// @param symbol The symbol of the token. /// @param initAmountIn The initial amount of ETH to swap for the token. /// @param description The description of the token. /// @param extended The extended description of the token, typically a JSON string. /// @return token The newly created token. /// @return amountOut The output amount of token the creator received. function createToken( string memory name, string memory symbol, uint256 initAmountIn, string memory description, string memory extended ) external payable onlyUnpaused returns (EmToken token, uint256 amountOut) { if (msg.value != initAmountIn + creationFee_) revert InvalidAmountIn(); if (creationFee_ > 0) { SafeTransferLib.safeTransferETH(feeTo_, creationFee_); } token = _deployToken(name, symbol, description, extended); if (initAmountIn > 0) { amountOut = _swapEthForTokens(token, initAmountIn, 0, msg.sender); } } function createTokenAndBurnLiquidity( string memory name, string memory symbol, uint256 initAmountIn, string memory description, string memory extended ) external payable onlyUnpaused returns (EmToken token, uint256 amountOut) { if (msg.value != initAmountIn + creationFee_) revert InvalidAmountIn(); if (creationFee_ > 0) { SafeTransferLib.safeTransferETH(feeTo_, creationFee_); } token = _deployToken(name, symbol, description, extended); if (initAmountIn > 0) { amountOut = _swapEthForTokens( token, initAmountIn, 0, 0x000000000000000000000000000000000000dEaD ); } } function _deployToken( string memory name, string memory symbol, string memory description, string memory extended ) private returns (EmToken) { EmToken token = new EmToken( name, symbol, DECIMALS, TOTAL_SUPPLY, description, extended, address(this), msg.sender ); Pool storage pool = pools_[token]; pool.token = token; pool.tokenReserve = INIT_REAL_TOKEN_RESERVE; pool.virtualTokenReserve = INIT_VIRTUAL_TOKEN_RESERVE; pool.ethReserve = 0; pool.virtualEthReserve = initVirtualEthReserve_; pool.lastPrice = initVirtualEthReserve_.divWadDown( INIT_VIRTUAL_TOKEN_RESERVE ); pool.lastMcapInEth = TOTAL_SUPPLY.mulWadUp(pool.lastPrice); pool.lastTimestamp = block.timestamp; pool.lastBlock = block.number; pool.creator = msg.sender; pool.K = K_; emit TokenCreated(token, msg.sender); emit PriceUpdate(token, msg.sender, pool.lastPrice, pool.lastMcapInEth); emLedger_.addCreation(token, msg.sender); return token; } function _graduate(EmToken token) private { pools_[token].lastTimestamp = block.timestamp; pools_[token].lastBlock = block.number; uint256 fee = (pools_[token].ethReserve * graduationFeeRate_) / FEE_DENOMINATOR; SafeTransferLib.safeTransferETH(feeTo_, fee); uint256 _amountETH = pools_[token].ethReserve - fee; uint256 _amountToken = TOTAL_SUPPLY - INIT_REAL_TOKEN_RESERVE; EmToken(address(token)).setIsUnrestricted(true); token.approve(address(headmaster_), type(uint256).max); (uint256 poolId, uint256 amountToken, uint256 amountETH) = headmaster_ .execute{value: _amountETH}(token, _amountToken, _amountETH); pools_[token].headmaster = address(headmaster_); pools_[token].poolId = poolId; pools_[token].virtualTokenReserve = 0; pools_[token].virtualEthReserve = 0; pools_[token].tokenReserve = 0; pools_[token].ethReserve = 0; emit TokenGraduated(token, headmaster_, poolId, amountToken, amountETH); emLedger_.addGraduation(token, amountETH); } /*////////////////////////////////////////////////// //////////////// SWAP FUNCTIONS //////////////// //////////////////////////////////////////////////*/ /// @notice Swaps ETH for tokens. /// @param token The token to swap. /// @param amountIn Input amount of ETH. /// @param amountOutMin Minimum output amount of token. /// @param to Recipient of token. /// @param deadline Deadline for the swap. /// @return amountOut The actual output amount of token. function swapEthForTokens( EmToken token, uint256 amountIn, uint256 amountOutMin, address to, uint256 deadline ) external payable nonReentrant onlyUnpaused onlyUngraduated(token) onlyEmToken(token) checkDeadline(deadline) returns (uint256 amountOut) { if (msg.value != amountIn) revert InvalidAmountIn(); amountOut = _swapEthForTokens(token, amountIn, amountOutMin, to); if (_isMcapGraduable(token)) { _graduate(token); } } function _swapEthForTokens( EmToken token, uint256 amountIn, uint256 amountOutMin, address to ) private returns (uint256 amountOut) { if (amountIn == 0) revert InvalidAmountIn(); uint256 fee = (amountIn * feeRate_) / FEE_DENOMINATOR; SafeTransferLib.safeTransferETH(feeTo_, fee); amountIn -= fee; uint256 newVirtualEthReserve = pools_[token].virtualEthReserve + amountIn; uint256 newVirtualTokenReserve = pools_[token].K / newVirtualEthReserve; amountOut = pools_[token].virtualTokenReserve - newVirtualTokenReserve; if (amountOut > pools_[token].tokenReserve) { amountOut = pools_[token].tokenReserve; } if (amountOut < amountOutMin) revert InsufficientOutput(); pools_[token].virtualTokenReserve = newVirtualTokenReserve; pools_[token].virtualEthReserve = newVirtualEthReserve; pools_[token].lastPrice = newVirtualEthReserve.divWadDown( newVirtualTokenReserve ); pools_[token].lastMcapInEth = TOTAL_SUPPLY.mulWadUp( pools_[token].lastPrice ); pools_[token].lastTimestamp = block.timestamp; pools_[token].lastBlock = block.number; pools_[token].ethReserve += amountIn; pools_[token].tokenReserve -= amountOut; SafeTransferLib.safeTransfer(token, to, amountOut); emit Buy(token, msg.sender, amountIn + fee, amountOut, to); emit PriceUpdate( token, msg.sender, pools_[token].lastPrice, pools_[token].lastMcapInEth ); EmLedger.Trade memory trade = EmLedger.Trade( token, true, to, amountIn + fee, amountOut, uint128(block.timestamp), uint128(block.number) ); emLedger_.addTrade(trade); } /// @notice Swaps tokens for ETH. /// @param token The token to swap. /// @param amountIn Input amount of token. /// @param amountOutMin Minimum output amount of ETH. /// @param to Recipient of ETH. /// @param deadline Deadline for the swap. /// @return amountOut The actual output amount of ETH. function swapTokensForEth( EmToken token, uint256 amountIn, uint256 amountOutMin, address to, uint256 deadline ) external nonReentrant onlyUnpaused onlyUngraduated(token) onlyEmToken(token) checkDeadline(deadline) returns (uint256 amountOut) { if (amountIn == 0) revert InvalidAmountIn(); SafeTransferLib.safeTransferFrom( token, msg.sender, address(this), amountIn ); uint256 newVirtualTokenReserve = pools_[token].virtualTokenReserve + amountIn; uint256 newVirtualEthReserve = pools_[token].K / newVirtualTokenReserve; amountOut = pools_[token].virtualEthReserve - newVirtualEthReserve; pools_[token].virtualTokenReserve = newVirtualTokenReserve; pools_[token].virtualEthReserve = newVirtualEthReserve; pools_[token].lastPrice = newVirtualEthReserve.divWadDown( newVirtualTokenReserve ); pools_[token].lastMcapInEth = TOTAL_SUPPLY.mulWadUp( pools_[token].lastPrice ); pools_[token].lastTimestamp = block.timestamp; pools_[token].lastBlock = block.number; pools_[token].tokenReserve += amountIn; pools_[token].ethReserve -= amountOut; uint256 fee = (amountOut * feeRate_) / FEE_DENOMINATOR; amountOut -= fee; if (amountOut < amountOutMin) revert InsufficientOutput(); SafeTransferLib.safeTransferETH(feeTo_, fee); SafeTransferLib.safeTransferETH(to, amountOut); emit Sell(token, msg.sender, amountIn, amountOut, to); emit PriceUpdate( token, msg.sender, pools_[token].lastPrice, pools_[token].lastMcapInEth ); EmLedger.Trade memory trade = EmLedger.Trade( token, false, msg.sender, amountIn, amountOut + fee, uint128(block.timestamp), uint128(block.number) ); emLedger_.addTrade(trade); } /*////////////////////////////////////////////////// //////////////// VIEW FUNCTIONS //////////////// //////////////////////////////////////////////////*/ /// @notice Calculates the expected output amount of ETH given an input amount of token. /// @param token The token to swap. /// @param amountIn Input amount of token. /// @return amountOut The expected output amount of ETH. function calcAmountOutFromToken( EmToken token, uint256 amountIn ) external view returns (uint256 amountOut) { if (amountIn == 0) revert InvalidAmountIn(); uint256 newVirtualTokenReserve = pools_[token].virtualTokenReserve + amountIn; uint256 newVirtualEthReserve = pools_[token].K / newVirtualTokenReserve; amountOut = pools_[token].virtualEthReserve - newVirtualEthReserve; uint256 fee = (amountOut * feeRate_) / FEE_DENOMINATOR; amountOut -= fee; } /// @notice Calculates the expected output amount of token given an input amount of ETH. /// @param token The token to swap. /// @param amountIn Input amount of ETH. /// @return amountOut The expected output amount of token. function calcAmountOutFromEth( EmToken token, uint256 amountIn ) external view returns (uint256 amountOut) { if (amountIn == 0) revert InvalidAmountIn(); uint256 fee = (amountIn * feeRate_) / FEE_DENOMINATOR; amountIn -= fee; uint256 newVirtualEthReserve = pools_[token].virtualEthReserve + amountIn; uint256 newVirtualTokenReserve = pools_[token].K / newVirtualEthReserve; amountOut = pools_[token].virtualTokenReserve - newVirtualTokenReserve; if (amountOut > pools_[token].tokenReserve) { amountOut = pools_[token].tokenReserve; } } /*/////////////////////////////////////////// // Storage Getters // ///////////////////////////////////////////*/ function getPool(EmToken token) external view returns (Pool memory) { return pools_[token]; } function getPoolsAll( uint256 offset, uint256 limit ) external view returns (Pool[] memory) { EmToken[] memory tokens = emLedger_.getTokens(offset, limit); Pool[] memory pools = new Pool[](tokens.length); for (uint256 i = 0; i < tokens.length; i++) { pools[i] = pools_[tokens[i]]; } return pools; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Gas optimized reentrancy protection for smart contracts. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol) abstract contract ReentrancyGuard { uint256 private locked = 1; modifier nonReentrant() virtual { require(locked == 1, "REENTRANCY"); locked = 2; _; locked = 1; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Arithmetic library with operations for fixed-point numbers. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol) /// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol) library FixedPointMathLib { /*////////////////////////////////////////////////////////////// SIMPLIFIED FIXED POINT OPERATIONS //////////////////////////////////////////////////////////////*/ uint256 internal constant MAX_UINT256 = 2**256 - 1; uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s. function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down. } function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up. } function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down. } function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up. } /*////////////////////////////////////////////////////////////// LOW LEVEL FIXED POINT OPERATIONS //////////////////////////////////////////////////////////////*/ function mulDivDown( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y)) if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) { revert(0, 0) } // Divide x * y by the denominator. z := div(mul(x, y), denominator) } } function mulDivUp( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y)) if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) { revert(0, 0) } // If x * y modulo the denominator is strictly greater than 0, // 1 is added to round up the division of x * y by the denominator. z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator)) } } function rpow( uint256 x, uint256 n, uint256 scalar ) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { switch x case 0 { switch n case 0 { // 0 ** 0 = 1 z := scalar } default { // 0 ** n = 0 z := 0 } } default { switch mod(n, 2) case 0 { // If n is even, store scalar in z for now. z := scalar } default { // If n is odd, store x in z for now. z := x } // Shifting right by 1 is like dividing by 2. let half := shr(1, scalar) for { // Shift n right by 1 before looping to halve it. n := shr(1, n) } n { // Shift n right by 1 each iteration to halve it. n := shr(1, n) } { // Revert immediately if x ** 2 would overflow. // Equivalent to iszero(eq(div(xx, x), x)) here. if shr(128, x) { revert(0, 0) } // Store x squared. let xx := mul(x, x) // Round to the nearest number. let xxRound := add(xx, half) // Revert if xx + half overflowed. if lt(xxRound, xx) { revert(0, 0) } // Set x to scaled xxRound. x := div(xxRound, scalar) // If n is even: if mod(n, 2) { // Compute z * x. let zx := mul(z, x) // If z * x overflowed: if iszero(eq(div(zx, x), z)) { // Revert if x is non-zero. if iszero(iszero(x)) { revert(0, 0) } } // Round to the nearest number. let zxRound := add(zx, half) // Revert if zx + half overflowed. if lt(zxRound, zx) { revert(0, 0) } // Return properly scaled zxRound. z := div(zxRound, scalar) } } } } } /*////////////////////////////////////////////////////////////// GENERAL NUMBER UTILITIES //////////////////////////////////////////////////////////////*/ function sqrt(uint256 x) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { let y := x // We start y at x, which will help us make our initial estimate. z := 181 // The "correct" value is 1, but this saves a multiplication later. // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically. // We check y >= 2^(k + 8) but shift right by k bits // each branch to ensure that if x >= 256, then y >= 256. if iszero(lt(y, 0x10000000000000000000000000000000000)) { y := shr(128, y) z := shl(64, z) } if iszero(lt(y, 0x1000000000000000000)) { y := shr(64, y) z := shl(32, z) } if iszero(lt(y, 0x10000000000)) { y := shr(32, y) z := shl(16, z) } if iszero(lt(y, 0x1000000)) { y := shr(16, y) z := shl(8, z) } // Goal was to get z*z*y within a small factor of x. More iterations could // get y in a tighter range. Currently, we will have y in [256, 256*2^16). // We ensured y >= 256 so that the relative difference between y and y+1 is small. // That's not possible if x < 256 but we can just verify those cases exhaustively. // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256. // Correctness can be checked exhaustively for x < 256, so we assume y >= 256. // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps. // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256. // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18. // There is no overflow risk here since y < 2^136 after the first branch above. z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181. // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough. z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) // If x+1 is a perfect square, the Babylonian method cycles between // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor. // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case. // If you don't care whether the floor or ceil square root is returned, you can remove this statement. z := sub(z, lt(div(x, z), z)) } } function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { // Mod x by y. Note this will return // 0 instead of reverting if y is zero. z := mod(x, y) } } function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) { /// @solidity memory-safe-assembly assembly { // Divide x by y. Note this will return // 0 instead of reverting if y is zero. r := div(x, y) } } function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { // Add 1 to x * y if x % y > 0. Note this will // return 0 instead of reverting if y is zero. z := add(gt(mod(x, y), 0), div(x, y)) } } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {ERC20} from "../tokens/ERC20.sol"; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. /// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. library SafeTransferLib { /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address to, uint256 amount) internal { bool success; /// @solidity memory-safe-assembly assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } require(success, "ETH_TRANSFER_FAILED"); } /*////////////////////////////////////////////////////////////// ERC20 OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferFrom( ERC20 token, address from, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument. mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) ) } require(success, "TRANSFER_FROM_FAILED"); } function safeTransfer( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "TRANSFER_FAILED"); } function safeApprove( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "APPROVE_FAILED"); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; import {ERC20} from "solmate/tokens/ERC20.sol"; import {EmCore} from "./EmCore.sol"; error NotEmCore(); error Forbidden(); /// @title The Em protocol ERC20 token template. /// @notice Until graduation, the token allowance is restricted to only the EmCore, and transfers to certain external entities are not /// allowed (eg. Uniswap pairs). This makes sure the token is transferable but not tradable before graduation. contract EmToken is ERC20 { struct Metadata { EmToken token; string name; string symbol; string description; string extended; address creator; bool isGraduated; uint256 mcap; } string public description; string public extended; EmCore public immutable emCore; address public immutable creator; address[] public holders; mapping(address => bool) public isHolder; /// @notice Locked before graduation to restrict trading to EmCore bool public isUnrestricted = false; constructor( string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply, string memory _description, string memory _extended, address _emCore, address _creator ) ERC20(_name, _symbol, _decimals) { description = _description; extended = _extended; emCore = EmCore(_emCore); creator = _creator; _mint(msg.sender, _supply); _addHolder(msg.sender); } function _addHolder(address holder) private { if (!isHolder[holder]) { holders.push(holder); isHolder[holder] = true; } } function getMetadata() public view returns (Metadata memory) { EmCore.Pool memory pool = emCore.getPool(this); return Metadata( EmToken(address(this)), this.name(), this.symbol(), description, extended, creator, isGraduated(), pool.lastMcapInEth ); } function isGraduated() public view returns (bool) { EmCore.Pool memory pool = emCore.getPool(this); return pool.headmaster != address(0); } function setIsUnrestricted(bool _isUnrestricted) public { if (msg.sender != address(emCore)) revert NotEmCore(); isUnrestricted = _isUnrestricted; } function transfer( address to, uint256 amount ) public override returns (bool) { if (!isUnrestricted) { bool isPregradRestricted = emCore .externalEntities_() .isPregradRestricted(address(this), address(to)); if (isPregradRestricted) revert Forbidden(); } _addHolder(to); return super.transfer(to, amount); } function transferFrom( address from, address to, uint256 amount ) public override returns (bool) { if (!isUnrestricted) { bool isPregradRestricted = emCore .externalEntities_() .isPregradRestricted(address(this), address(to)); if (isPregradRestricted) revert Forbidden(); } // Pre-approve EmCore for improved UX if (allowance[from][address(emCore)] != type(uint256).max) { allowance[from][address(emCore)] = type(uint256).max; } _addHolder(to); return super.transferFrom(from, to, amount); } function approve( address spender, uint256 amount ) public override returns (bool) { if (!isUnrestricted) revert Forbidden(); return super.approve(spender, amount); } function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public override { if (!isUnrestricted) revert Forbidden(); super.permit(owner, spender, value, deadline, v, r, s); } /// Get all addresses who have ever held the token with their balances /// @return The holders and their balances /// @notice Some holders may have a zero balance function getHoldersWithBalance( uint256 offset, uint256 limit ) public view returns (address[] memory, uint256[] memory) { uint256 length = holders.length; if (offset >= length) { return (new address[](0), new uint256[](0)); } uint256 end = offset + limit; if (end > length) { end = length; } address[] memory resultAddresses = new address[](end - offset); uint256[] memory resultBalances = new uint256[](end - offset); for (uint256 i = offset; i < end; i++) { address holder = holders[i]; resultAddresses[i - offset] = holder; resultBalances[i - offset] = balanceOf[holder]; } return (resultAddresses, resultBalances); } /// Get all addresses who have ever held the token /// @return The holders /// @notice Some holders may have a zero balance function getHolders( uint256 offset, uint256 limit ) public view returns (address[] memory) { uint256 length = holders.length; if (offset >= length) { return new address[](0); } uint256 end = offset + limit; if (end > length) { end = length; } address[] memory result = new address[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = holders[i]; } return result; } /// Get the number of all addresses who have ever held the token /// @return The number of holders /// @notice Some holders may have a zero balance function getHoldersLength() public view returns (uint256) { return holders.length; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol"; import {IUniswapV2Router02} from "./interfaces/IUniswapV2Router02.sol"; import {IUniswapV2Factory} from "./interfaces/IUniswapV2Factory.sol"; import {EmToken} from "./EmToken.sol"; import {EmCore} from "./EmCore.sol"; error Forbidden(); error InvalidAmountToken(); error InvalidAmountEth(); /// @title A Em protocol graduation strategy for bootstrapping liquidity on uni-v2 AMMs. /// @notice This contract may be replaced by other strategies in the future. contract EmHeadmaster { EmCore public immutable emCore; IUniswapV2Router02 public immutable uniswapV2Router02; IUniswapV2Factory public immutable uniswapV2Factory; address public constant liquidityOwner = address(0); EmToken[] public alumni; constructor(EmCore _emCore, IUniswapV2Router02 _uniswapV2Router02) { emCore = _emCore; uniswapV2Router02 = IUniswapV2Router02(payable(_uniswapV2Router02)); uniswapV2Factory = IUniswapV2Factory(uniswapV2Router02.factory()); } modifier onlyEmCore() { if (msg.sender != address(emCore)) revert Forbidden(); _; } event Executed( EmToken token, uint256 indexed poolId, uint256 amountToken, uint256 amountETH, address indexed owner ); function execute(EmToken token, uint256 amountToken, uint256 amountEth) external payable onlyEmCore returns (uint256 poolId, uint256 _amountToken, uint256 _amountETH) { if (amountToken == 0) revert InvalidAmountToken(); if (amountEth == 0 || msg.value != amountEth) revert InvalidAmountEth(); SafeTransferLib.safeTransferFrom(token, msg.sender, address(this), amountToken); SafeTransferLib.safeApprove(token, address(uniswapV2Router02), amountToken); address pair = uniswapV2Factory.getPair(address(token), uniswapV2Router02.WETH()); if (pair == address(0)) { pair = uniswapV2Factory.createPair(address(token), uniswapV2Router02.WETH()); } poolId = uint256(uint160(pair)); uint256 amountTokenMin = (amountToken * 95) / 100; uint256 amountEthMin = (amountEth * 95) / 100; (_amountToken, _amountETH,) = uniswapV2Router02.addLiquidityETH{value: amountEth}( address(token), amountToken, amountTokenMin, amountEthMin, liquidityOwner, block.timestamp ); alumni.push(token); emit Executed(token, poolId, _amountToken, _amountETH, liquidityOwner); } /*/////////////////////////////////////////// // Storage Getters // ///////////////////////////////////////////*/ function getAlumni(uint256 offset, uint256 limit) external view returns (EmToken[] memory) { uint256 length = alumni.length; if (offset >= length) { return new EmToken[](0); } uint256 end = offset + limit; if (end > length) { end = length; } EmToken[] memory result = new EmToken[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = alumni[i]; } return result; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; import {EmCore} from "./EmCore.sol"; import {EmToken} from "./EmToken.sol"; error NotFoundry(); /// @title The Em protocol user activity bookkeeper. /// @notice Since this version of the protocol is not deployed on gas-expensive networks, this contract is designed to make data more available from onchain. contract EmLedger { struct Stats { uint256 totalVolume; uint256 totalLiquidityBootstrapped; uint256 totalTokensCreated; uint256 totalTokensGraduated; uint256 totalTrades; } struct Trade { EmToken token; bool isBuy; address maker; uint256 amountIn; uint256 amountOut; uint128 timestamp; uint128 blockNumber; } uint256 public totalVolume; uint256 public totalLiquidityBootstrapped; mapping(address => EmToken[]) public tokensCreatedBy; mapping(address => EmToken[]) public tokensTradedBy; mapping(EmToken => mapping(address => bool)) public hasTraded; EmToken[] public tokensCreated; EmToken[] public tokensGraduated; mapping(EmToken => bool) public isGraduated; Trade[] public trades; mapping(EmToken => uint256[]) public tradesByToken; mapping(address => uint256[]) public tradesByUser; EmCore public immutable emCore; constructor() { emCore = EmCore(msg.sender); } modifier onlyFoundry() { if (msg.sender != address(emCore)) revert NotFoundry(); _; } /// Add a token to the list of tokens created by a user /// @param token The token to add /// @param user The user to add the token for /// @notice This method should only be called once per token creation function addCreation(EmToken token, address user) public onlyFoundry { tokensCreatedBy[user].push(token); tokensCreated.push(token); } /// Add a trade to the ledger /// @param trade The trade to add function addTrade(Trade memory trade) public onlyFoundry { uint256 tradeId = trades.length; trades.push(trade); tradesByToken[trade.token].push(tradeId); tradesByUser[trade.maker].push(tradeId); totalVolume += trade.isBuy ? trade.amountIn : trade.amountOut; if (hasTraded[trade.token][trade.maker]) return; tokensTradedBy[trade.maker].push(trade.token); hasTraded[trade.token][trade.maker] = true; } /// Add a token to the list of graduated tokens /// @param token The token to add /// @notice This method should only be called once per token graduation function addGraduation( EmToken token, uint256 amountEth ) public onlyFoundry { tokensGraduated.push(token); isGraduated[token] = true; totalLiquidityBootstrapped += amountEth; } /*/////////////////////////////////////////// // Storage Getters // ///////////////////////////////////////////*/ function getTokensCreatedBy( address user, uint256 offset, uint256 limit ) public view returns (EmToken[] memory) { EmToken[] storage allTokens = tokensCreatedBy[user]; uint256 length = allTokens.length; if (offset >= length) { return new EmToken[](0); } uint256 end = offset + limit; if (end > length) { end = length; } EmToken[] memory result = new EmToken[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = allTokens[i]; } return result; } function getTokensTradedBy( address user, uint256 offset, uint256 limit ) public view returns (EmToken[] memory) { EmToken[] storage allTokens = tokensTradedBy[user]; uint256 length = allTokens.length; if (offset >= length) { return new EmToken[](0); } uint256 end = offset + limit; if (end > length) { end = length; } EmToken[] memory result = new EmToken[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = allTokens[i]; } return result; } function getTokens( uint256 offset, uint256 limit ) public view returns (EmToken[] memory) { uint256 length = tokensCreated.length; if (offset >= length) { return new EmToken[](0); } uint256 end = offset + limit; if (end > length) { end = length; } EmToken[] memory result = new EmToken[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = tokensCreated[i]; } return result; } function getToken(uint256 tokenId) public view returns (EmToken) { return tokensCreated[tokenId]; } function getTokensLength() public view returns (uint256) { return tokensCreated.length; } function getTokensGraduated( uint256 offset, uint256 limit ) public view returns (EmToken[] memory) { uint256 length = tokensGraduated.length; if (offset >= length) { return new EmToken[](0); } uint256 end = offset + limit; if (end > length) { end = length; } EmToken[] memory result = new EmToken[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = tokensGraduated[i]; } return result; } function getTokenGraduated(uint256 tokenId) public view returns (EmToken) { return tokensGraduated[tokenId]; } function getTokensGraduatedLength() public view returns (uint256) { return tokensGraduated.length; } function getTradesAll( uint256 offset, uint256 limit ) public view returns (Trade[] memory) { uint256 length = trades.length; if (offset >= length) { return new Trade[](0); } uint256 end = offset + limit; if (end > length) { end = length; } Trade[] memory result = new Trade[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = trades[i]; } return result; } function getTrade(uint256 tradeId) public view returns (Trade memory) { return trades[tradeId]; } function getTradesLength() public view returns (uint256) { return trades.length; } function getTradesByTokenLength( EmToken token ) public view returns (uint256) { return tradesByToken[token].length; } function getTradeIdsByToken( EmToken token, uint256 offset, uint256 limit ) public view returns (uint256[] memory) { uint256 length = tradesByToken[token].length; if (offset >= length) { return new uint256[](0); } uint256 end = offset + limit; if (end > length) { end = length; } uint256[] memory result = new uint256[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = tradesByToken[token][i]; } return result; } function getTradesByUserLength(address user) public view returns (uint256) { return tradesByUser[user].length; } function getTradeIdsByUser( address user, uint256 offset, uint256 limit ) public view returns (uint256[] memory) { uint256 length = tradesByUser[user].length; if (offset >= length) { return new uint256[](0); } uint256 end = offset + limit; if (end > length) { end = length; } uint256[] memory result = new uint256[](end - offset); for (uint256 i = offset; i < end; i++) { result[i - offset] = tradesByUser[user][i]; } return result; } function getStats() public view returns (Stats memory) { return Stats({ totalVolume: totalVolume, totalLiquidityBootstrapped: totalLiquidityBootstrapped, totalTokensCreated: tokensCreated.length, totalTokensGraduated: tokensGraduated.length, totalTrades: trades.length }); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; import {ERC20} from "solmate/tokens/ERC20.sol"; import {EmCore} from "./EmCore.sol"; import {IUniswapV2Factory} from "./interfaces/IUniswapV2Factory.sol"; error Forbidden(); /// @title External entities registry. Primarily used to check and restrict pre-graduation token transfers to specific entities like Uniswap V2 pairs. /// @notice Refer to the EmToken template contract to verify that the restriction is lifted after graduation. contract ExternalEntities { address public immutable weth; IUniswapV2Factory[] public knownFactories; mapping(address => bool) public pregradRestricted; address public owner; constructor(address _weth) { owner = msg.sender; weth = _weth; } function setOwner(address _owner) external { if (msg.sender != owner) revert Forbidden(); owner = _owner; } function addFactory(address factory) external { if (msg.sender != owner) revert Forbidden(); knownFactories.push(IUniswapV2Factory(factory)); } function removeFactory(address factory) external { if (msg.sender != owner) revert Forbidden(); for (uint256 i = 0; i < knownFactories.length; i++) { if (address(knownFactories[i]) == factory) { knownFactories[i] = knownFactories[knownFactories.length - 1]; knownFactories.pop(); break; } } } function addPregradRestricted(address to) external { if (msg.sender != owner) revert Forbidden(); pregradRestricted[to] = true; } function removePregradRestricted(address to) external { if (msg.sender != owner) revert Forbidden(); pregradRestricted[to] = false; } function computeUniV2Pair( IUniswapV2Factory factory, address tokenA, address tokenB ) public view returns (address pair, bool exists) { pair = factory.getPair(tokenA, tokenB); if (pair != address(0)) { return (pair, true); } (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); // both uniswap and quickswap v2 are using the same init code hash pair = address( uint160( uint256( keccak256( abi.encodePacked( hex"ff", factory, keccak256(abi.encodePacked(token0, token1)), hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" ) ) ) ) ); return (pair, false); } function isPregradRestricted( address token, address to ) external view returns (bool) { for (uint256 i = 0; i < knownFactories.length; i++) { (address pair, ) = computeUniV2Pair(knownFactories[i], token, weth); if (pair == to) { return true; } } return pregradRestricted[to]; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; interface IUniswapV2Router02 { function WETH() external view returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function factory() external view returns (address); function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountIn); function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountOut); function getAmountsIn(uint256 amountOut, address[] memory path) external view returns (uint256[] memory amounts); function getAmountsOut(uint256 amountIn, address[] memory path) external view returns (uint256[] memory amounts); function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function swapETHForExactTokens(uint256 amountOut, address[] memory path, address to, uint256 deadline) external payable returns (uint256[] memory amounts); function swapExactETHForTokens(uint256 amountOutMin, address[] memory path, address to, uint256 deadline) external payable returns (uint256[] memory amounts); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] memory path, address to, uint256 deadline ) external payable; function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] memory path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] memory path, address to, uint256 deadline ) external; function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] memory path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] memory path, address to, uint256 deadline ) external; function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline ) external returns (uint256[] memory amounts); receive() external payable; }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.25; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint256); function allPairs(uint256) external view returns (address); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address, address) external view returns (address); function setFeeTo(address _feeTo) external; function setFeeToSetter(address _feeToSetter) external; }
{ "remappings": [ "forge-std/=lib/forge-std/src/", "lib/solmate/=lib/solmate/", "src/WenLedger.sol/=src/WenLedger.sol/", "src/ExternalEntities.sol/=src/ExternalEntities.sol/", "src/WenToken.sol/=src/WenToken.sol/", "src/WenFoundry.sol/=src/WenFoundry.sol/", "src/WenHeadmaster.sol/=src/WenHeadmaster.sol/", "src/interfaces/=src/interfaces/", "ds-test/=lib/solmate/lib/ds-test/src/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 1000000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": false }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"initVirtualEthReserve","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyGraduated","type":"error"},{"inputs":[],"name":"DeadlineExceeded","type":"error"},{"inputs":[],"name":"FeeTooHigh","type":"error"},{"inputs":[],"name":"Forbidden","type":"error"},{"inputs":[],"name":"InsufficientOutput","type":"error"},{"inputs":[],"name":"InvalidAmountIn","type":"error"},{"inputs":[],"name":"NotEmToken","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[],"name":"TooMuchMcap","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract EmToken","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract EmToken","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mcapInEth","type":"uint256"}],"name":"PriceUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract EmToken","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Sell","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract EmToken","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"}],"name":"TokenCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract EmToken","name":"token","type":"address"},{"indexed":true,"internalType":"contract EmHeadmaster","name":"headmaster","type":"address"},{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToken","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"}],"name":"TokenGraduated","type":"event"},{"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INIT_REAL_TOKEN_RESERVE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INIT_VIRTUAL_TOKEN_RESERVE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"K_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"calcAmountOutFromEth","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"calcAmountOutFromToken","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"initAmountIn","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"extended","type":"string"}],"name":"createToken","outputs":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"initAmountIn","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"extended","type":"string"}],"name":"createTokenAndBurnLiquidity","outputs":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"creationFee_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emLedger_","outputs":[{"internalType":"contract EmLedger","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"externalEntities_","outputs":[{"internalType":"contract ExternalEntities","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRate_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTo_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract EmToken","name":"token","type":"address"}],"name":"getPool","outputs":[{"components":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"tokenReserve","type":"uint256"},{"internalType":"uint256","name":"virtualTokenReserve","type":"uint256"},{"internalType":"uint256","name":"ethReserve","type":"uint256"},{"internalType":"uint256","name":"virtualEthReserve","type":"uint256"},{"internalType":"uint256","name":"lastPrice","type":"uint256"},{"internalType":"uint256","name":"lastMcapInEth","type":"uint256"},{"internalType":"uint256","name":"lastTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastBlock","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"address","name":"headmaster","type":"address"},{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"K","type":"uint256"}],"internalType":"struct EmCore.Pool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getPoolsAll","outputs":[{"components":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"tokenReserve","type":"uint256"},{"internalType":"uint256","name":"virtualTokenReserve","type":"uint256"},{"internalType":"uint256","name":"ethReserve","type":"uint256"},{"internalType":"uint256","name":"virtualEthReserve","type":"uint256"},{"internalType":"uint256","name":"lastPrice","type":"uint256"},{"internalType":"uint256","name":"lastMcapInEth","type":"uint256"},{"internalType":"uint256","name":"lastTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastBlock","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"address","name":"headmaster","type":"address"},{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"K","type":"uint256"}],"internalType":"struct EmCore.Pool[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"graduationFeeRate_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"graduationThreshold_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"headmaster_","outputs":[{"internalType":"contract EmHeadmaster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initVirtualEthReserve_","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused_","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract EmToken","name":"","type":"address"}],"name":"pools_","outputs":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"tokenReserve","type":"uint256"},{"internalType":"uint256","name":"virtualTokenReserve","type":"uint256"},{"internalType":"uint256","name":"ethReserve","type":"uint256"},{"internalType":"uint256","name":"virtualEthReserve","type":"uint256"},{"internalType":"uint256","name":"lastPrice","type":"uint256"},{"internalType":"uint256","name":"lastMcapInEth","type":"uint256"},{"internalType":"uint256","name":"lastTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastBlock","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"address","name":"headmaster","type":"address"},{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"K","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setCreationFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract EmLedger","name":"_ledger","type":"address"}],"name":"setEmLedger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ExternalEntities","name":"externalEntities","type":"address"}],"name":"setExternalEntities","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"feeRate","type":"uint256"}],"name":"setFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"feeTo","type":"address"}],"name":"setFeeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"feeRate","type":"uint256"}],"name":"setGraduationFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract EmHeadmaster","name":"headmaster","type":"address"}],"name":"setHeadmaster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"initVirtualEthReserve","type":"uint256"}],"name":"setInitVirtualEthReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapEthForTokens","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract EmToken","name":"token","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForEth","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60803461015f576001600160401b0390601f617aea38819003918201601f1916830191848311848410176101645780849260209460405283398101031261015f5751600160008181556064909155600781905560c860085560098054600c80546001600160a01b0319908116339081179092556001600160a81b031990921660ff60a01b1990911617909155604051929391929091611c3e8083019182118383101761014b57908291615eac8339039083f080156101405760018060a01b0316906006541617600655816002556b037790968dc8efffd100000080830290838204148315171561012c57806ae787216768429d2180000091600455049182039182116101185750600355604051615d31908161017b8239f35b634e487b7160e01b81526011600452602490fd5b634e487b7160e01b82526011600452602482fd5b6040513d84823e3d90fd5b634e487b7160e01b85526041600452602485fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b60009060e0823560e01c91826305c6022414612afd575081630d03391c14612aab57816313af403514612a2557816316c38b3c14612981578163198d447e1461255757816329b53cee146124965781632e0f26251461245c578163326dff241461240a578163412f9bad146123ce57816345596e2e1461236d5781634b103bfa1461232857816354028f7c146122d657816355315bf6146122845781636577327e146121c95781636a739edf146120d5578163758b74f4146120995781637b874dfb1461200e5781638103dd1714611fd25781638801b4fc14611f8e578163902d55a514611f49578163a134ddf714611f04578163a206382d14611b1a578163b1821e7714611705578163b47873ce1461139d57508063b7d8622514611345578063bbe4f6db146111a4578063bc063e1a14611169578063c1edd5bc1461108a578063c1f1b04a1461104e578063c2f0113514610fc6578063d73792a914610f8b578063e3196c8114610f03578063e766307914610eb1578063e806c4d414610e29578063f007977e14610ded578063f46901ed14610d3a5763fa71e27e146101bb57600080fd5b6101c436612d25565b909193926101d56001875414612e22565b600286556009549160ff8360a01c16610d105773ffffffffffffffffffffffffffffffffffffffff85168752600560205273ffffffffffffffffffffffffffffffffffffffff600a60408920015416610ce65773ffffffffffffffffffffffffffffffffffffffff851687526005602052600360408820015460035410610cbc5773ffffffffffffffffffffffffffffffffffffffff8516158015610c64575b610c3a574211610c1057803403610be6576000918115610be6576102cd60409173ffffffffffffffffffffffffffffffffffffffff936102c86127106102bd60015484612dc9565b048096819416612f43565b612ddc565b9273ffffffffffffffffffffffffffffffffffffffff8616815260056020526103596102ff8560048585200154612d8d565b9173ffffffffffffffffffffffffffffffffffffffff881681526005602052600261033084600c8785200154612de9565b94859273ffffffffffffffffffffffffffffffffffffffff8b1681526005602052200154612ddc565b9673ffffffffffffffffffffffffffffffffffffffff87166000526005602052600160406000200154808911610bde575b508710610bb4576103db6103d060039373ffffffffffffffffffffffffffffffffffffffff891660005260056020526040600020938160028601558060048601556132b8565b806005840155613264565b6006820155426007820155436008820155016103f8838254612d8d565b905573ffffffffffffffffffffffffffffffffffffffff84166000526005602052600160406000200161042c868254612ddc565b905560206000604473ffffffffffffffffffffffffffffffffffffffff604051967fa9059cbb00000000000000000000000000000000000000000000000000000000885216958660048201528860248201528273ffffffffffffffffffffffffffffffffffffffff89165af13d15601f3d1160016000511416171615610b565781836104bb8361058195612d8d565b60405190815287602082015233907f0daf98ca968d02ea35519e9b431a9f4185e069631b0c16f2e351cca350e12af3604073ffffffffffffffffffffffffffffffffffffffff8a1692a473ffffffffffffffffffffffffffffffffffffffff85166000526005602052604060002060066005820154910154604051918252602082015233907fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d604073ffffffffffffffffffffffffffffffffffffffff891692a3612d8d565b6fffffffffffffffffffffffffffffffff90604051926105a084612b5a565b73ffffffffffffffffffffffffffffffffffffffff85168452600160208501526040840152606083015283608083015280421660a0830152431660c082015273ffffffffffffffffffffffffffffffffffffffff60065416803b15610b5157604080517f3b39d500000000000000000000000000000000000000000000000000000000008152835173ffffffffffffffffffffffffffffffffffffffff9081166004830152602085015115156024830152918401519091166044820152606083015160648201526080830151608482015260a08301516fffffffffffffffffffffffffffffffff90811660a483015260c09093015190921660c4830152600090829060e490829084905af18015610b4557610b36575b5073ffffffffffffffffffffffffffffffffffffffff811683526005602052604083206003810154906003548210156106f9575b60208460018755604051908152f35b61271061071a86936107689342600782015560084391015560085490612dc9565b0461073d8173ffffffffffffffffffffffffffffffffffffffff60095416612f43565b73ffffffffffffffffffffffffffffffffffffffff8416835260056020526003604084200154612ddc565b73ffffffffffffffffffffffffffffffffffffffff83163b15610a8b576040517f95c996410000000000000000000000000000000000000000000000000000000081526001600482015282816024818373ffffffffffffffffffffffffffffffffffffffff89165af1908115610a8f578391610b22575b505073ffffffffffffffffffffffffffffffffffffffff600a5416604051907f095ea7b300000000000000000000000000000000000000000000000000000000825260048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201526020816044818673ffffffffffffffffffffffffffffffffffffffff89165af18015610a8f57610aea575b50606073ffffffffffffffffffffffffffffffffffffffff600a54166064604051809481937fc52ab77800000000000000000000000000000000000000000000000000000000835273ffffffffffffffffffffffffffffffffffffffff891660048401526aab24c7796fd2da3880000060248401528160448401525af1908115610adf57829083908493610a9e575b5083600373ffffffffffffffffffffffffffffffffffffffff600a541673ffffffffffffffffffffffffffffffffffffffff8816835260056020526040832090600a8201907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905584600b820155826002820155826004820155826001820155015573ffffffffffffffffffffffffffffffffffffffff600a5416906040519081528360208201527f5ec1e9daf7affe04984801e0d07de6448f00139d72977b7c948bf698bd353f76604073ffffffffffffffffffffffffffffffffffffffff881692a473ffffffffffffffffffffffffffffffffffffffff60065416803b15610a9a576040517fcf5c45cd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff94909416600485015260248401919091528290604490829084905af18015610a8f57610a77575b80806106ea565b610a818391612ba5565b610a8b5738610a70565b5080fd5b6040513d85823e3d90fd5b8280fd5b925050506060813d606011610ad7575b81610abb60609383612bd6565b81010312610a8b57805160208201516040909201519138610906565b3d9150610aae565b6040513d84823e3d90fd5b6020813d602011610b1a575b81610b0360209383612bd6565b81010312610a9a575180151503610a8b5738610877565b3d9150610af6565b610b2b90612ba5565b610a8b5781386107df565b610b3f90612ba5565b386106b6565b6040513d6000823e3d90fd5b600080fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b60046040517fbb2875c3000000000000000000000000000000000000000000000000000000008152fd5b97503861038a565b60046040517fcae33fc2000000000000000000000000000000000000000000000000000000008152fd5b60046040517f559895a3000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb4afdc66000000000000000000000000000000000000000000000000000000008152fd5b5073ffffffffffffffffffffffffffffffffffffffff85168752600560205273ffffffffffffffffffffffffffffffffffffffff851673ffffffffffffffffffffffffffffffffffffffff6040892054161415610275565b60046040517f2c21983e000000000000000000000000000000000000000000000000000000008152fd5b60046040517fe6a0d45f000000000000000000000000000000000000000000000000000000008152fd5b60046040517f9e87fac8000000000000000000000000000000000000000000000000000000008152fd5b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57610d72612b37565b73ffffffffffffffffffffffffffffffffffffffff9081600c54163303610dc057167fffffffffffffffffffffffff0000000000000000000000000000000000000000600954161760095580f35b60046040517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b80fd5b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600854604051908152f35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610a9a57600c54163303610dc0577fffffffffffffffffffffffff0000000000000000000000000000000000000000600b541617600b5580f35b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff600c5416604051908152f35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610a9a57600c54163303610dc0577fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a5580f35b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516127108152f35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610a9a57600c54163303610dc0577fffffffffffffffffffffffff0000000000000000000000000000000000000000600654161760065580f35b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600354604051908152f35b5034610dea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576110c2612b37565b602435918215610be657604060019161114661113361112073ffffffffffffffffffffffffffffffffffffffff61110a6020996127106111038a5483612dc9565b0490612ddc565b9716968785526005895260048686200154612d8d565b86845260058852600c8585200154612de9565b8583526005875260028484200154612ddc565b93815260058552200154808211611161575b50604051908152f35b905038611158565b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516103e88152f35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576101a090600c60406111e4612b37565b926111ed612e9f565b5073ffffffffffffffffffffffffffffffffffffffff80941681526005602052206040519261121b84612bb9565b80825416845260018201546020850152600282015460408501526003820154606085015260048201546080850152600582015460a0850152600682015460c0850152600782015460e0850152600882015461010085015280600983015416610120850152600a82015416610140840152600b8101546101608401520154610180820152611343604051809273ffffffffffffffffffffffffffffffffffffffff8082511683526020820151602084015260408201516040840152606082015160608401526080820151608084015260a082015160a084015260c082015160c084015260e082015160e084015261010080830151908401526101208181840151169084015261014090818301511690830152610160808201519083015261018080910151910152565bf35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5773ffffffffffffffffffffffffffffffffffffffff600c54163303610dc05760043560075580f35b8234610dea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760449073ffffffffffffffffffffffffffffffffffffffff90600691818160065416604051958680927f494cfc6c000000000000000000000000000000000000000000000000000000008252600435600483015260243560248301525afa938415610adf578294611659575b5083519461145f61144987612e87565b966114576040519889612bd6565b808852612e87565b937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06020950185855b82811061164357505050835b86518110156115615780846114ab6001938a612f00565b511686526005808852600c60408820604051926114c784612bb9565b888254168452858201548b85015260028201546040850152600382015460608501526004820154608085015281015460a08401528581015460c084015260078101548784015260088101546101008401528760098201541661012084015287600a82015416610140840152600b810154610160840152015461018082015261154f828b612f00565b5261155a818a612f00565b5001611494565b6040805187815289518189018190528a89019282019089895b8281106115875784840385f35b909192826101a0826116346001948a5173ffffffffffffffffffffffffffffffffffffffff8082511683526020820151602084015260408201516040840152606082015160608401526080820151608084015260a082015160a084015260c082015160c084015260e082015160e084015261010080830151908401526101208181840151169084015261014090818301511690830152610160808201519083015261018080910151910152565b0196019101949291909461157a565b61164b612e9f565b82828c010152018690611488565b9093503d8083833e61166b8183612bd6565b81019060209081818403126116fd5780519067ffffffffffffffff821161170157019180601f840112156116fd5782516116a481612e87565b936116b26040519586612bd6565b818552838086019260051b8201019283116116f9578301905b8282106116dd57505050509285611439565b815188811681036116f55781529083019083016116cb565b8680fd5b8580fd5b8380fd5b8480fd5b8261170f36612c8c565b919394926009549360ff8560a01c16610d105795600754946117318688612d8d565b3403610be6578561174896611af4575b505061300f565b908015801561177d575b50506040805173ffffffffffffffffffffffffffffffffffffffff9290921682526020820192909252f35b90919250600090610be65760409161271061179a60015483612dc9565b04916117c48373ffffffffffffffffffffffffffffffffffffffff936102c8828660095416612f43565b928286169384835260056020938185526118116117e78460048b85200154612d8d565b91888152838752600261180084600c8d85200154612de9565b9a828b8d9452868a52200154612ddc565b97876000528286526040600020916001830154808b11611aea575b5061184982611853928594600260039701558060048601556132b8565b8085840155613264565b600682015542600782015543600882015501611870838254612d8d565b905585600052808452600160406000200161188c888254612ddc565b905583600060446040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201528a6024820152828a5af13d15601f3d1160016000511416171615611a8c579082916118ed61196c9483612d8d565b60405190815288868201523390887f0daf98ca968d02ea35519e9b431a9f4185e069631b0c16f2e351cca350e12af360403393a486600052808552600660406000209182015491015460405191825285820152867fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d60403393a3612d8d565b60016fffffffffffffffffffffffffffffffff926040519561198d87612b5a565b8652850152336040850152606084015283608084015280421660a0840152431660c083015260065416803b15610b5157604080517f3b39d500000000000000000000000000000000000000000000000000000000008152835173ffffffffffffffffffffffffffffffffffffffff9081166004830152602085015115156024830152918401519091166044820152606083015160648201526080830151608482015260a08301516fffffffffffffffffffffffffffffffff90811660a483015260c09093015190921660c4830152600090829060e490829084905af18015610b4557611a7d575b50908280611752565b611a8690612ba5565b82611a74565b606484604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b995061184961182c565b73ffffffffffffffffffffffffffffffffffffffff611b139216612f43565b8780611741565b8234610dea57611b2936612d25565b9492611b3c600185969394965414612e22565b6002845560ff60095460a01c16610d105773ffffffffffffffffffffffffffffffffffffffff80921692838552600560209781895284600a60408920015416610ce657858752818952600360408820015460035410610cbc5785158015611eee575b610c3a574211610c10578215610be657878660646040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015286604482015282895af13d15601f3d11600189511416171615611e90578590858252808952600189611c6d611849611c23886002604089200154612d8d565b8a875285845285611c3b82600c60408b200154612de9565b948c89528181528c611c5487600460408d200154612ddc565b99525260408c20938160028601558060048601556132b8565b600682015542600782015543600882015501611c8a858254612d8d565b905585875280895260036040882001611ca4838254612ddc565b9055611cc0612710611cb860015485612dc9565b048093612ddc565b978810610bb457611d6392611cd9838760095416612f43565b611ce38982612f43565b85604051918683528a8c8401521690877fcf6fb4bb8248e51cb4bad5294f240615b1d0f5560da60c639802d614431e8f1960403393a48587528089526006604088209182015491015460405191825289820152857fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d60403393a386612d8d565b6fffffffffffffffffffffffffffffffff9160405194611d8286612b5a565b855285888601523360408601526060850152608084015280421660a0840152431660c08301526006541690813b15610a9a57611e63839283926040519485809481937f3b39d5000000000000000000000000000000000000000000000000000000000083526004830191909160c060e082019373ffffffffffffffffffffffffffffffffffffffff808251168452602082015115156020850152604082015116604084015260608101516060840152608081015160808401528160a0820151916fffffffffffffffffffffffffffffffff80931660a0860152015116910152565b03925af18015610adf579060019291611e81575b5055604051908152f35b611e8a90612ba5565b84611e77565b606488604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152fd5b5085875281895285856040892054161415611b9e565b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516b037790968dc8efffd10000008152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516b033b2e3c9fd0803ce80000008152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602060ff60095460a01c166040519015158152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600754604051908152f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff600c54163303610dc0576103e8811161206f5760085580f35b60046040517fcd4e6167000000000000000000000000000000000000000000000000000000008152fd5b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600254604051908152f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576101a090604073ffffffffffffffffffffffffffffffffffffffff918261212a612b37565b1681526005602052209080825416916001810154916002820154906003830154600484015460058501546006860154906007870154926008880154948660098a01541696600a8a01541697600c600b8b01549a01549a6040519c8d5260208d015260408c015260608b015260808a015260a089015260c088015260e0870152610100860152610120850152610140840152610160830152610180820152f35b8234610dea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57612201612b37565b90602435918215610be6576020926004604061227c9461225e61224b73ffffffffffffffffffffffffffffffffffffffff61226d97169586845260058a5260028585200154612d8d565b85835260058952600c8484200154612de9565b93815260058752200154612ddc565b61271061110360015483612dc9565b604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff600a5416604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff600b5416604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516b029009752660ad62af8000008152f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff600c54163303610dc0576103e8811161206f5760015580f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600154604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602060405160128152f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff600c54163303610dc057806002556b037790968dc8efffd100000080820290828204148215171561252a57906ae787216768429d21800000826125249360045504612ddc565b60035580f35b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b8261256136612c8c565b906009959495939293549260ff8460a01c16610d10578596600754946125878688612d8d565b3403610be6578561259d9661295b57505061300f565b91811580156125d3575b50506040805173ffffffffffffffffffffffffffffffffffffffff939093168352602083019390935250f35b9293509091610be6576127106125eb60015484612dc9565b046126148173ffffffffffffffffffffffffffffffffffffffff946102c8828760095416612f43565b92808516918284526005602091818352612635876004604089200154612d8d565b9685875282845261264d88600c60408a200154612de9565b9786885283855261266589600260408b200154612ddc565b9887895284865260408920916001830154808c11612951575b5061269b826126a5928594600260039701558060048601556132b8565b8087840155613264565b6006820155426007820155436008820155016126c2828254612d8d565b9055858752828452600160408820016126dc898254612ddc565b9055604051927fa9059cbb0000000000000000000000000000000000000000000000000000000084528488604461dead968760048201528c6024820152828b5af13d15601f3d1160018b5114161716156128f357908291846127416127bc9584612d8d565b6040519081528b88820152897f0daf98ca968d02ea35519e9b431a9f4185e069631b0c16f2e351cca350e12af360403393a4878952808652600660408a209182015491015460405191825286820152877fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d60403393a3612d8d565b9060016fffffffffffffffffffffffffffffffff93604051966127de88612b5a565b87528601526040850152606084015284608084015280421660a0840152431660c08301526006541690813b15610a9a576128bd839283926040519586809481937f3b39d5000000000000000000000000000000000000000000000000000000000083526004830191909160c060e082019373ffffffffffffffffffffffffffffffffffffffff808251168452602082015115156020850152604082015116604084015260608101516060840152608081015160808401528160a0820151916fffffffffffffffffffffffffffffffff80931660a0860152015116910152565b03925af19081156128e757506128d8575b50908280806125a7565b6128e190612ba5565b826128ce565b604051903d90823e3d90fd5b606485604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b9a5061269b61267e565b73ffffffffffffffffffffffffffffffffffffffff61297a9216612f43565b8880611741565b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57600435801515809103610a8b5773ffffffffffffffffffffffffffffffffffffffff600c54163303610dc0577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000006009549260a01b1691161760095580f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57612a5d612b37565b600c549073ffffffffffffffffffffffffffffffffffffffff8083163303610dc0577fffffffffffffffffffffffff00000000000000000000000000000000000000009116911617600c5580f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff60065416604051908152f35b839034610a8b57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a8b576020906004548152f35b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610b5157565b60e0810190811067ffffffffffffffff821117612b7657604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff8111612b7657604052565b6101a0810190811067ffffffffffffffff821117612b7657604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612b7657604052565b81601f82011215610b515780359067ffffffffffffffff8211612b765760405192612c6a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160185612bd6565b82845260208383010111610b5157816000926020809301838601378301015290565b9060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc830112610b515767ffffffffffffffff600435818111610b515783612cd791600401612c17565b92602435828111610b515781612cef91600401612c17565b9260443592606435818111610b515783612d0b91600401612c17565b92608435918211610b5157612d2291600401612c17565b90565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60a0910112610b515773ffffffffffffffffffffffffffffffffffffffff906004358281168103610b51579160243591604435916064359081168103610b51579060843590565b91908201809211612d9a57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810292918115918404141715612d9a57565b91908203918211612d9a57565b8115612df3570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b15612e2957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f5245454e5452414e4359000000000000000000000000000000000000000000006044820152fd5b67ffffffffffffffff8111612b765760051b60200190565b60405190612eac82612bb9565b816101806000918281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e0820152826101008201528261012082015282610140820152826101608201520152565b8051821015612f145760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080809381935af115612f5357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152fd5b919082519283825260005b848110612ffb5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201612fbc565b9190604093845192612a43908185019585871067ffffffffffffffff881117612b76576130969461305461306292613088956132ee8a39610100808b528a0190612fb1565b9088820360208a0152612fb1565b906012888801526b033b2e3c9fd0803ce800000060608801528682036080880152612fb1565b9084820360a0860152612fb1565b913060c082015260e03391015280600092039082f09182156132565773ffffffffffffffffffffffffffffffffffffffff8084169081845260056020528284207fffffffffffffffffffffffff000000000000000000000000000000000000000083818354161782556b029009752660ad62af80000060018301556b037790968dc8efffd1000000806002840155866003840155600254806004850155670de0b6b3a7640000907812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f2181118202158302156132605702049182600582015561317583613264565b9182600683015542600783015543600883015560098201903390825416179055600c60045491015584519133857fd5f9bdf12adf29dab0248c349842c3822d53ae2bb4f36352f301630d018c81398980a382526020820152827fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d853393a36006541690813b156116fd57839160448392855196879384927ffcf4ca5400000000000000000000000000000000000000000000000000000000845260048401523360248401525af191821561325657505061324d575090565b612d2290612ba5565b51903d90823e3d90fd5b8880fd5b6b033b2e3c9fd0803ce800000090670de0b6b3a764000091817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048111820215830215610b51570290808204910615150190565b670de0b6b3a7640000907812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f218111820215830215610b515702049056fe6101206040818152346107c757612a43803803809161001e82866107cc565b843982016101009283818303126107c75780516001600160401b0391908281116107c7578361004e9183016107ef565b91602090818301518181116107c757856100699185016107ef565b93868401519360ff851685036107c75760608101519260808201518181116107c757886100979184016107ef565b9760a0830151908282116107c7576100b09184016107ef565b926100c960e06100c260c0860161085e565b940161085e565b938151978389116107b157600098806100e28b54610872565b94601f95868111610765575b508a90868311600114610702578c926106f7575b50508160011b916000199060031b1c19161789555b89518481116105b8578060019b61012e8d54610872565b8681116106a9575b508a90868311600114610640578c92610635575b5050600019600383901b1c1916908b1b178a555b6080524660a052888b5189818b549161017683610872565b928383528c808401968216918260001461061a5750506001146105e0575b6101a0925003826107cc565b5190208b51888101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528d8201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815260c08101818110868211176105cc578d5251902060c05260ff19998a600a5416600a558051908482116105b8578190610240600654610872565b858111610569575b5089908583116001146104ff578b926104f4575b5050600019600383901b1c1916908a1b176006555b80519283116104e057908291610288600754610872565b82811161048f575b508791831160011461042e578892610423575b5050600019600383901b1c191690871b176007555b6001600160a01b031660e052875260025481810190811061040f57600255338352600382528583208181540190558551908152827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef833393a33382526009815260ff858320541615610390575b85855161219691826108ad833960805182610fc4015260a05182611a53015260c05182611a7a015260e0518281816106c2015281816109bf01528181610c08015281816110f501528181611225015281816113c40152611fb1015251818181610d0301526115d10152f35b600854680100000000000000008110156103fb57838101806008558110156103e757600883528183200180546001600160a01b03191633908117909155825260099052839020805490921617905538808080610325565b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b83526041600452602483fd5b634e487b7160e01b84526011600452602484fd5b0151905038806102a3565b600789528789208a94509190601f1984168a5b8a8282106104795750508411610460575b505050811b016007556102b8565b015160001960f88460031b161c19169055388080610452565b8385015186558d97909501949384019301610441565b90919250600789528789208380860160051c8201928a87106104d7575b9186958d929594930160051c01915b8281106104c9575050610290565b8b81558695508c91016104bb565b925081926104ac565b634e487b7160e01b88526041600452602488fd5b01519050388061025c565b60068c528a8c208d94509190601f1984168d5b8d82821061054a5750508411610531575b505050811b01600655610271565b015160001960f88460031b161c19169055388080610523565b91929395968291958786015181550195019301908e9594939291610512565b90915060068b52898b208580850160051c8201928c86106105af575b918e91869594930160051c01915b8281106105a1575050610248565b8d81558594508e9101610593565b92508192610585565b634e487b7160e01b8a52604160045260248afd5b634e487b7160e01b8b52604160045260248bfd5b508a8c8e8180528282205b8583106106015750506101a09350820101610194565b8091929450548385880101520191018b908e85936105eb565b60ff191687526101a094151560051b84010191506101949050565b01519050388061014a565b8d8d528b8d208e94509190601f1984168e8e5b8282106106895750508411610670575b505050811b018a5561015e565b015160001960f88460031b161c19169055388080610663565b91929395968291958786015181550195019301908f95949392918e610653565b9091508c8c528a8c208680850160051c8201928d86106106ee575b918f91869594930160051c01915b8281106106e0575050610136565b8e81558594508f91016106d2565b925081926106c4565b015190503880610102565b8c80528b8d209250601f1984168d5b8d82821061074f575050908460019594939210610736575b505050811b018955610117565b015160001960f88460031b161c19169055388080610729565b6001859682939686015181550195019301610711565b9091508b80528a8c208680850160051c8201928d86106107a8575b9085949392910160051c01905b81811061079a57506100ee565b8d815584935060010161078d565b92508192610780565b634e487b7160e01b600052604160045260246000fd5b600080fd5b601f909101601f19168101906001600160401b038211908210176107b157604052565b919080601f840112156107c75782516001600160401b0381116107b1576020906040519261082683601f19601f85011601856107cc565b8184528282870101116107c75760005b81811061084b57508260009394955001015290565b8581018301518482018401528201610836565b51906001600160a01b03821682036107c757565b90600182811c921680156108a2575b602083101461088c57565b634e487b7160e01b600052602260045260246000fd5b91607f169161088156fe6080604081815260048036101561001557600080fd5b60009260e08435811c91826302d05d3f146115875750816306fdde03146114b8578163095ea7b3146113e85781630c4efc8e1461137857816318160ddd1461133a57816323b872dd146110555781632a11ced014610fe8578163313ce56714610f8b5781633644e51514610f485781636f3921ee14610f0b57816370a0823114610ea85781637284e41614610e585781637a5b4f5914610b545781637ecebe0014610af15781638911e26b14610aae5781638e84697214610a4157816395c996411461096a57816395d89b41146108435781639e5f2602146107fe578163a9059cbb146105b9578163b569807114610584578163d4d7b19a1461051c578163d505accf146101ef57508063db04aef4146101ae5763dd62ed3e1461013857600080fd5b346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209282916101736118db565b61017b611903565b9173ffffffffffffffffffffffffffffffffffffffff8092168452865283832091168252845220549051908152f35b8280fd5b5050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906008549051908152f35b5080fd5b84915083346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576102296118db565b610231611903565b9160443590606435926084359460ff86168096036105185760ff600a5416156104f05742851061049357610263611a4e565b9473ffffffffffffffffffffffffffffffffffffffff80931696878a5260209660058852858b20998a549a60018c019055865193868a8601967f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988528c8a880152169b8c606087015289608087015260a086015260c085015260c08452830167ffffffffffffffff948482108683111761046657818852845190206101008501927f19010000000000000000000000000000000000000000000000000000000000008452610102860152610122850152604281526101608401948186109086111761043a57848752519020835261018082015260a4356101a082015260c4356101c0909101528780528490889060809060015afa15610430578651169687151580610427575b156103cc5786977f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259596975283528087208688528352818188205551908152a380f35b8360649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152fd5b50848814610389565b81513d88823e3d90fd5b60248c60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5060248c60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b60648960208551917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152fd5b8883517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b8780fd5b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760ff8160209373ffffffffffffffffffffffffffffffffffffffff6105716118db565b1681526009855220541690519015158152f35b505050346101eb576105b5906105a261059c3661198c565b90612019565b90519182916020835260208301906119c0565b0390f35b505091346107fb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb576105f26118db565b926024359060ff600a54161561067e575b508273ffffffffffffffffffffffffffffffffffffffff856106266020976120bd565b3385526003875282852061063b858254611e53565b90551692838152600386522081815401905582519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a35160018152f35b73ffffffffffffffffffffffffffffffffffffffff84517f54028f7c00000000000000000000000000000000000000000000000000000000815260209182828581847f0000000000000000000000000000000000000000000000000000000000000000165afa9182156107f15790839187936107c2575b5087517feb56a3bd0000000000000000000000000000000000000000000000000000000081523086820190815273ffffffffffffffffffffffffffffffffffffffff8b1660208201529093849291839003604001918391165afa9182156107b857859261078b575b5050156106035783517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b6107aa9250803d106107b1575b6107a281836116b0565b810190611a36565b388061075d565b503d610798565b86513d87823e3d90fd5b6107e3919350823d84116107ea575b6107db81836116b0565b810190611a0a565b91386106f5565b503d6107d1565b87513d88823e3d90fd5b80fd5b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209061083a611f64565b90519015158152f35b8385346107fb57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb57815191828260019360015494610888866115f5565b91828552602096876001821691826000146109255750506001146108c9575b5050506105b592916108ba9103856116b0565b51928284938452830190611898565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b82841061090d57505050820101816108ba6105b56108a7565b8054848a0186015288955087949093019281016108f4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b860190930193508492506108ba91506105b590506108a7565b5050346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57803591821515809303610a3d5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163303610a1757505060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a5416911617600a5580f35b517f301d76fc000000000000000000000000000000000000000000000000000000008152fd5b8380fd5b8385346107fb5790610a5b610a553661198c565b90611e74565b9092610a7083519484869586528501906119c0565b60208482036020860152602080855193848152019401925b828110610a9757505050500390f35b835185528695509381019392810192600101610a88565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209060ff600a541690519015158152f35b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb578060209273ffffffffffffffffffffffffffffffffffffffff610b446118db565b1681526005845220549051908152f35b848385346101aa57827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa578051610b9081611648565b8381528385606092836020820152838582015283808201528360808201528260a08201528260c0820152015273ffffffffffffffffffffffffffffffffffffffff9482517fbbe4f6db00000000000000000000000000000000000000000000000000000000815230858201526101a09081816024818b7f0000000000000000000000000000000000000000000000000000000000000000165afa918215610e21578792610e2b575b50508351947f06fdde0300000000000000000000000000000000000000000000000000000000865286868281305afa958615610e21578796610e05575b5086855180927f95d89b4100000000000000000000000000000000000000000000000000000000825281305afa968715610dfa578097610dd5575b505086610cbb611f64565b9160c0015193855197610ccd89611648565b30895260208901978852868901908152610ce56117d6565b828a01908152610cf36116f1565b9160808b0192835260a08b0199857f0000000000000000000000000000000000000000000000000000000000000000168b5260c08c019615158752878c0198895289519c8d9c60208e52511660208d015251610100809a8d01526101208c01610d5b91611898565b9051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe094858d830301908d0152610d9291611898565b905190838b82030160808c0152610da891611898565b9051918982030160a08a0152610dbd91611898565b95511660c08701525115159085015251908301520390f35b610df29297503d8091833e610dea81836116b0565b810190611d26565b948780610cb0565b8551903d90823e3d90fd5b610e1a9196503d8089833e610dea81836116b0565b9488610c75565b85513d89823e3d90fd5b610e4a9250803d10610e51575b610e4281836116b0565b810190611c4d565b8780610c38565b503d610e38565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576105b590610e956117d6565b9051918291602083526020830190611898565b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb578060209273ffffffffffffffffffffffffffffffffffffffff610efb6118db565b1681526003845220549051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576105b590610e956116f1565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb57602090610f84611a4e565b9051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5735916008548310156107fb575073ffffffffffffffffffffffffffffffffffffffff611046602093611926565b92905490519260031b1c168152f35b505091346107fb5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb5761108f6118db565b611097611903565b9360443560ff600a5416156111e0575b907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef918573ffffffffffffffffffffffffffffffffffffffff80951694858752602098848a958652838920837f00000000000000000000000000000000000000000000000000000000000000001690818b5287527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081868c2054036111c7575b50611152836120bd565b888a52818752848a20338b52875285858b20549182036111a4575b50505086885260038552828820611185858254611e53565b9055169586815260038452208181540190558551908152a35160018152f35b6111ad91611e53565b90888a528652838920338a5286528389205538808561116d565b898b52828852858b20908b52875280858b205538611148565b73ffffffffffffffffffffffffffffffffffffffff8551907f54028f7c00000000000000000000000000000000000000000000000000000000825260209182818681857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156113305783916112b4918991611313575b5089517feb56a3bd0000000000000000000000000000000000000000000000000000000081523088820190815273ffffffffffffffffffffffffffffffffffffffff8d1660208201529094859384928391604090910190565b0392165afa9182156107f15786926112f6575b5050156110a7575083517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b61130c9250803d106107b1576107a281836116b0565b38806112c7565b61132a9150833d85116107ea576107db81836116b0565b3861125b565b88513d89823e3d90fd5b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906002549051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b505091346107fb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb576114216118db565b906024359060ff600a54161561148f57838291602096338252875273ffffffffffffffffffffffffffffffffffffffff8282209516948582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b505050517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b8385346107fb57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb57815191828283546114f8816115f5565b908184526020956001918760018216918260001461092557505060011461152c575050506105b592916108ba9103856116b0565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b82841061156f57505050820101816108ba6105b56108a7565b8054848a018601528895508794909301928101611556565b8590346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c9216801561163e575b602083101461160f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611604565b610100810190811067ffffffffffffffff82111761166557604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff82111761166557604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761166557604052565b6040519060008260075491611705836115f5565b808352926020906001908181169081156117935750600114611732575b5050611730925003836116b0565b565b91509260076000527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688936000925b82841061177b57506117309450505081016020013880611722565b85548885018301529485019487945092810192611760565b9050602093506117309592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013880611722565b60405190600082600654916117ea836115f5565b808352926020906001908181169081156117935750600114611814575050611730925003836116b0565b91509260066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f936000925b82841061185d57506117309450505081016020013880611722565b85548885018301529485019487945092810192611842565b60005b8381106118885750506000910152565b8181015183820152602001611878565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936118d481518092818752878088019101611875565b0116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036118fe57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff821682036118fe57565b60085481101561195d5760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60409101126118fe576004359060243590565b90815180825260208080930193019160005b8281106119e0575050505090565b835173ffffffffffffffffffffffffffffffffffffffff16855293810193928101926001016119d2565b908160209103126118fe575173ffffffffffffffffffffffffffffffffffffffff811681036118fe5790565b908160209103126118fe575180151581036118fe5790565b6000467f000000000000000000000000000000000000000000000000000000000000000003611a9c57507f000000000000000000000000000000000000000000000000000000000000000090565b60405181548291611aac826115f5565b808252816020948582019460019087600182169182600014611bf0575050600114611b97575b50611adf925003826116b0565b51902091604051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845260408301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019082821067ffffffffffffffff831117611b6a575060405251902090565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b87805286915087907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b858310611bd8575050611adf935082010138611ad2565b80548388018501528694508893909201918101611bc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168852611adf95151560051b8501019250389150611ad29050565b519073ffffffffffffffffffffffffffffffffffffffff821682036118fe57565b80916101a092839103126118fe5760405191820182811067ffffffffffffffff82111761166557604052805173ffffffffffffffffffffffffffffffffffffffff811681036118fe5782526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015190830152610120611cf7818301611c2c565b90830152610140611d09818301611c2c565b908301526101608082015190830152610180809101519082015290565b6020818303126118fe57805167ffffffffffffffff918282116118fe57019082601f830112156118fe5781519081116116655760405192611d8f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601856116b0565b818452602082840101116118fe57611dad9160208085019101611875565b90565b67ffffffffffffffff81116116655760051b60200190565b90611dd282611db0565b611ddf60405191826116b0565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611e0d8294611db0565b0190602036910137565b91908201809211611e2457565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b91908203918211611e2457565b805182101561195d5760209160051b010190565b91906008549081841015611f3657611e8c9084611e17565b90808211611f2e575b50611ea8611ea38483611e53565b611dc8565b90611eb6611ea38583611e53565b93805b828110611ec7575050509190565b80604073ffffffffffffffffffffffffffffffffffffffff611eea600194611926565b919054600392831b1c169081611f09611f038887611e53565b8a611e60565b5260009182526020522054611f27611f218584611e53565b89611e60565b5201611eb9565b905038611e95565b50506040519150611f4682611694565b6000825260405191611f5783611694565b6000835260003681379190565b73ffffffffffffffffffffffffffffffffffffffff6040517fbbe4f6db0000000000000000000000000000000000000000000000000000000081523060048201526101a0908181602481867f0000000000000000000000000000000000000000000000000000000000000000165afa90811561200d5761014092600092611ff0575b5050015116151590565b6120069250803d10610e5157610e4281836116b0565b3880611fe6565b6040513d6000823e3d90fd5b9060085490818310156120a2576120309083611e17565b9080821161209a575b50612047611ea38383611e53565b91805b8281106120575750505090565b8073ffffffffffffffffffffffffffffffffffffffff612078600193611926565b90549060031b1c1661209361208d8584611e53565b87611e60565b520161204a565b905038612039565b5050506040516120b181611694565b60008152600036813790565b9073ffffffffffffffffffffffffffffffffffffffff809216600090808252600960205260ff604083205416156120f5575b50509050565b60085493680100000000000000008510156121695761211d8560016040969701600855611926565b819291549060031b9184831b921b1916179055815260096020522060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790558038806120ef565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd60a0806040523460375733608052611c01908161003d82396080518181816101d4015281816103de01528181610b170152610f990152f35b600080fdfe6080604081815260048036101561001557600080fd5b60009260e0843560e01c9182630c4efc8e14610f4f57508163127aca4f14610f3157816315b26c9214610f1357816317d74fd314610e8e5781631e6c598e14610dd057816329e7a3b714610d6d5781632db25e0514610ca257816338bf84a914610c5457816339a4f35414610b7c575080633b39d50014610a5957806341abf571146109fc578063491aadaf146109bf578063494cfc6c146109a257806349ec094e1461096557806359be9a9e146109125780635f81a57c146108d757806368a4c8b7146108705780636c85e26f14610813578063737d2b8f146107b157806381936f36146107745780638985566a1461074c5780638e54c4a6146106d457806392964ccd146106615780639e94d8d414610635578063af416e14146105c0578063b0c26ecf14610583578063c59d4847146104da578063cf5c45cd1461038e578063e4b50cb81461032c578063e6017d69146102a45763fcf4ca541461017b57600080fd5b346102a057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102a0576101b1611048565b906101ba61106b565b9273ffffffffffffffffffffffffffffffffffffffff93847f00000000000000000000000000000000000000000000000000000000000000001633036102795761021091858592168752600260205286206117af565b600554906801000000000000000082101561024d575080600161023692016005556110e3565b90928084549260031b9316831b921b191617905580f35b8460416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b50517f06cd454e000000000000000000000000000000000000000000000000000000008152fd5b8280fd5b50503461032857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328576102dc611048565b73ffffffffffffffffffffffffffffffffffffffff168252600a60205280822080546024359390841015610325575060209261031791611180565b91905490519160031b1c8152f35b80fd5b5080fd5b5091346103255760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610325575073ffffffffffffffffffffffffffffffffffffffff61037f602093356110e3565b92905490519260031b1c168152f35b50346102a057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102a0576103c5611048565b73ffffffffffffffffffffffffffffffffffffffff91827f00000000000000000000000000000000000000000000000000000000000000001633036104b3576006549068010000000000000000821015610487575061042b816001859301600655611149565b939092169282549060031b9184831b921b191617905582526007602052812060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055610481602435600154611344565b60015580f35b8560416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b83517f06cd454e000000000000000000000000000000000000000000000000000000008152fd5b50503461032857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328578160a092608061051861125e565b82815282602082015282858201528260608201520152549060015490600554906006549160085493608061054a61125e565b87815260208101928352848101938452606081019586520194855282519586525160208601525190840152516060830152516080820152f35b50503461032857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328576020906005549051908152f35b50503461032857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328576105f8611048565b6024359273ffffffffffffffffffffffffffffffffffffffff80921681526002602052828120908154851015610325575060209361037f91611180565b5050346103285761065d9061065261064c3661108e565b91611b57565b9051918291826111d3565b0390f35b50503461032857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032857610699611048565b73ffffffffffffffffffffffffffffffffffffffff168252600960205280822080546024359390841015610325575060209261031791611180565b50346102a057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102a0578160209360ff92610712611048565b61071a61106b565b9173ffffffffffffffffffffffffffffffffffffffff8092168452875283832091168252855220541690519015158152f35b5050346103285761065d906107696107633661108e565b91611aac565b905191829182610ff6565b50503461032857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328576020906001549051908152f35b5050346103285760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328578060209273ffffffffffffffffffffffffffffffffffffffff610803611048565b168152600a845220549051908152f35b50346102a05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102a0573591600654831015610325575073ffffffffffffffffffffffffffffffffffffffff61037f602093611149565b5050346103285760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103285760ff8160209373ffffffffffffffffffffffffffffffffffffffff6108c4611048565b1681526007855220541690519015158152f35b50503461032857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032857602091549051908152f35b5091346103255760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610325575073ffffffffffffffffffffffffffffffffffffffff61037f60209335611149565b50503461032857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328576020906008549051908152f35b5050346103285761065d906107696109b936610fbd565b90611a29565b50503461032857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328576020906006549051908152f35b50346102a05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102a0573591600554831015610325575073ffffffffffffffffffffffffffffffffffffffff61037f6020936110e3565b50346102a05760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102a057610a9161120f565b91610a9a611048565b83526024358015158103610b7857602084015273ffffffffffffffffffffffffffffffffffffffff6044358181168103610b705784830152606435606085015260843560808501526fffffffffffffffffffffffffffffffff60a4358181168103610b745760a086015260c4359081168103610b705760c08501527f0000000000000000000000000000000000000000000000000000000000000000163303610b4a5783610b47846117fd565b80f35b517f06cd454e000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8680fd5b8480fd5b849084346102a05791610b97610b9136610fbd565b9061166b565b90835193849360209060208087019381885286518095528701950193905b838210610bc25786860387f35b918496508286610c44600194969884985160c09073ffffffffffffffffffffffffffffffffffffffff808251168452602082015115156020850152604082015116604084015260608101516060840152608081015160808401528160a0820151916fffffffffffffffffffffffffffffffff80931660a0860152015116910152565b0196019201869594929391610bb5565b505050346103285760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103285761065d90610652610c95611048565b60443590602435906115a1565b505091346103255760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103255750610d6b610cf6610cf060e094610ce96114f5565b5035611198565b50611528565b9151809260c09073ffffffffffffffffffffffffffffffffffffffff808251168452602082015115156020850152604082015116604084015260608101516060840152608081015160808401528160a0820151916fffffffffffffffffffffffffffffffff80931660a0860152015116910152565bf35b505050346103285760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610328578060209273ffffffffffffffffffffffffffffffffffffffff610dc0611048565b1681526009845220549051908152f35b5050346102a05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102a0578035926008548410156103255750610e1a60e093611198565b5080549173ffffffffffffffffffffffffffffffffffffffff93846001840154169060ff6002850154936003860154950154958251978116885260a01c1615156020870152850152606084015260808301526fffffffffffffffffffffffffffffffff811660a083015260801c60c0820152f35b5050503461032857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032857610ec7611048565b6024359273ffffffffffffffffffffffffffffffffffffffff809216815260036020528281209081548510156103255750602093610f0491611180565b90549060031b1c169051908152f35b505050346103285761065d90610769610f2b3661108e565b91611446565b505050346103285761065d90610769610f4936610fbd565b906113a1565b85903461032857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103285760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610ff1576004359060243590565b600080fd5b602090602060408183019282815285518094520193019160005b82811061101e575050505090565b835173ffffffffffffffffffffffffffffffffffffffff1685529381019392810192600101611010565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610ff157565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203610ff157565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060910112610ff15760043573ffffffffffffffffffffffffffffffffffffffff81168103610ff157906024359060443590565b60055481101561111a5760056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60065481101561111a5760066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0190600090565b805482101561111a5760005260206000200190600090565b60085481101561111a576005906008600052027ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b602090602060408183019282815285518094520193019160005b8281106111fb575050505090565b8351855293810193928101926001016111ed565b6040519060e0820182811067ffffffffffffffff82111761122f57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519060a0820182811067ffffffffffffffff82111761122f57604052565b604051906020820182811067ffffffffffffffff82111761122f57604052565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761122f57604052565b67ffffffffffffffff811161122f5760051b60200190565b9061130c611307836112e2565b61129e565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061133a82946112e2565b0190602036910137565b9190820180921161135157565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9190820391821161135157565b805182101561111a5760209160051b010190565b90600654908183101561142f576113b89083611344565b90808211611427575b506113d46113cf8383611380565b6112fa565b91805b8281106113e45750505090565b8073ffffffffffffffffffffffffffffffffffffffff611405600193611149565b90549060031b1c1661142061141a8584611380565b8761138d565b52016113d7565b9050386113c1565b50505061143a61127e565b60008152600036813790565b919073ffffffffffffffffffffffffffffffffffffffff8093166000526003926003602052604060002093845493848410156114e7576114869084611344565b938085116114df575b5061149d6113cf8486611380565b94835b8581106114b05750505050505090565b80846114be60019385611180565b905490861b1c166114d86114d28884611380565b8a61138d565b52016114a0565b93503861148f565b50505050505061143a61127e565b6114fd61120f565b9060008083528060208401528060408401528060608401528060808401528060a084015260c0830152565b90600461153361120f565b92805460ff73ffffffffffffffffffffffffffffffffffffffff91828116875260a01c16151560208601526001820154166040850152600281015460608501526003810154608085015201546fffffffffffffffffffffffffffffffff811660a084015260801c60c0830152565b73ffffffffffffffffffffffffffffffffffffffff9092919216916000838152600990602091600960205260409260408320549586861015611651576115e79086611344565b95808711611649575b506115fe6113cf8688611380565b96855b87811061161357505050505050505090565b60019082865284845261162881888820611180565b90549060031b1c61164261163c8a84611380565b8c61138d565b5201611601565b9550386115f0565b505050935050505061166161127e565b9080825236813790565b906008549081831015611746576116829083611344565b9080821161173e575b506116968282611380565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06116d06116c7611307866112e2565b948086526112e2565b0160005b818110611727575050805b8281106116ec5750505090565b806117206116fb600193611198565b5061170f6117098685611380565b91611528565b611719828961138d565b528661138d565b50016116df565b6020906117326114f5565b828288010152016116d4565b90503861168b565b50505061175161127e565b6000815290565b80546801000000000000000081101561122f5761177a91600182018155611180565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff829392549160031b92831b921b1916179055565b80546801000000000000000081101561122f576117d191600182018155611180565b73ffffffffffffffffffffffffffffffffffffffff9291928084549260031b9316831b921b1916179055565b6008546801000000000000000081101561122f576001810160085561182181611198565b9190916119fa5773ffffffffffffffffffffffffffffffffffffffff91828451169281549461196f7fffffffffffffffffffffffff0000000000000000000000000000000000000000948686891617855560209485840198887fffffffffffffffffffffff00000000000000000000000000000000000000000074ff00000000000000000000000000000000000000008c51151560a01b1692161717815560018101986040998a860198878a51169082541617905561195f60608601938451600285015560808701938451600382015560046fffffffffffffffffffffffffffffffff60a08a0151167fffffffffffffffffffffffffffffffff0000000000000000000000000000000060c08b015160801b161791015560009a8b526009895261194d818d8d20611758565b878a51168b52600a89528b8b20611758565b51156119f25750515b8654611344565b855581815116855260048352858520828551168652835260ff86862054166119ea578190818551168652600384526119ad87872083835116906117af565b51168452600482528484209251168352522060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b505050505050565b905051611968565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b90600554908183101561142f57611a409083611344565b90808211611aa4575b50611a576113cf8383611380565b91805b828110611a675750505090565b8073ffffffffffffffffffffffffffffffffffffffff611a886001936110e3565b90549060031b1c16611a9d61141a8584611380565b5201611a5a565b905038611a49565b919073ffffffffffffffffffffffffffffffffffffffff809316600052600260205260406000209283549283831015611b4a57611ae99083611344565b92808411611b42575b50611b006113cf8385611380565b93825b848110611b1257505050505090565b8083611b2060019385611180565b90549060031b1c16611b3b611b358784611380565b8961138d565b5201611b03565b925038611af2565b505050505061143a61127e565b73ffffffffffffffffffffffffffffffffffffffff9092919216916000838152600a90602091600a6020526040926040832054958686101561165157611b9d9086611344565b95808711611bf9575b50611bb46113cf8688611380565b96855b878110611bc957505050505050505090565b600190828652848452611bde81888820611180565b90549060031b1c611bf261163c8a84611380565b5201611bb7565b955038611ba656000000000000000000000000000000000000000000000000187d19772e931e4f
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60009060e0823560e01c91826305c6022414612afd575081630d03391c14612aab57816313af403514612a2557816316c38b3c14612981578163198d447e1461255757816329b53cee146124965781632e0f26251461245c578163326dff241461240a578163412f9bad146123ce57816345596e2e1461236d5781634b103bfa1461232857816354028f7c146122d657816355315bf6146122845781636577327e146121c95781636a739edf146120d5578163758b74f4146120995781637b874dfb1461200e5781638103dd1714611fd25781638801b4fc14611f8e578163902d55a514611f49578163a134ddf714611f04578163a206382d14611b1a578163b1821e7714611705578163b47873ce1461139d57508063b7d8622514611345578063bbe4f6db146111a4578063bc063e1a14611169578063c1edd5bc1461108a578063c1f1b04a1461104e578063c2f0113514610fc6578063d73792a914610f8b578063e3196c8114610f03578063e766307914610eb1578063e806c4d414610e29578063f007977e14610ded578063f46901ed14610d3a5763fa71e27e146101bb57600080fd5b6101c436612d25565b909193926101d56001875414612e22565b600286556009549160ff8360a01c16610d105773ffffffffffffffffffffffffffffffffffffffff85168752600560205273ffffffffffffffffffffffffffffffffffffffff600a60408920015416610ce65773ffffffffffffffffffffffffffffffffffffffff851687526005602052600360408820015460035410610cbc5773ffffffffffffffffffffffffffffffffffffffff8516158015610c64575b610c3a574211610c1057803403610be6576000918115610be6576102cd60409173ffffffffffffffffffffffffffffffffffffffff936102c86127106102bd60015484612dc9565b048096819416612f43565b612ddc565b9273ffffffffffffffffffffffffffffffffffffffff8616815260056020526103596102ff8560048585200154612d8d565b9173ffffffffffffffffffffffffffffffffffffffff881681526005602052600261033084600c8785200154612de9565b94859273ffffffffffffffffffffffffffffffffffffffff8b1681526005602052200154612ddc565b9673ffffffffffffffffffffffffffffffffffffffff87166000526005602052600160406000200154808911610bde575b508710610bb4576103db6103d060039373ffffffffffffffffffffffffffffffffffffffff891660005260056020526040600020938160028601558060048601556132b8565b806005840155613264565b6006820155426007820155436008820155016103f8838254612d8d565b905573ffffffffffffffffffffffffffffffffffffffff84166000526005602052600160406000200161042c868254612ddc565b905560206000604473ffffffffffffffffffffffffffffffffffffffff604051967fa9059cbb00000000000000000000000000000000000000000000000000000000885216958660048201528860248201528273ffffffffffffffffffffffffffffffffffffffff89165af13d15601f3d1160016000511416171615610b565781836104bb8361058195612d8d565b60405190815287602082015233907f0daf98ca968d02ea35519e9b431a9f4185e069631b0c16f2e351cca350e12af3604073ffffffffffffffffffffffffffffffffffffffff8a1692a473ffffffffffffffffffffffffffffffffffffffff85166000526005602052604060002060066005820154910154604051918252602082015233907fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d604073ffffffffffffffffffffffffffffffffffffffff891692a3612d8d565b6fffffffffffffffffffffffffffffffff90604051926105a084612b5a565b73ffffffffffffffffffffffffffffffffffffffff85168452600160208501526040840152606083015283608083015280421660a0830152431660c082015273ffffffffffffffffffffffffffffffffffffffff60065416803b15610b5157604080517f3b39d500000000000000000000000000000000000000000000000000000000008152835173ffffffffffffffffffffffffffffffffffffffff9081166004830152602085015115156024830152918401519091166044820152606083015160648201526080830151608482015260a08301516fffffffffffffffffffffffffffffffff90811660a483015260c09093015190921660c4830152600090829060e490829084905af18015610b4557610b36575b5073ffffffffffffffffffffffffffffffffffffffff811683526005602052604083206003810154906003548210156106f9575b60208460018755604051908152f35b61271061071a86936107689342600782015560084391015560085490612dc9565b0461073d8173ffffffffffffffffffffffffffffffffffffffff60095416612f43565b73ffffffffffffffffffffffffffffffffffffffff8416835260056020526003604084200154612ddc565b73ffffffffffffffffffffffffffffffffffffffff83163b15610a8b576040517f95c996410000000000000000000000000000000000000000000000000000000081526001600482015282816024818373ffffffffffffffffffffffffffffffffffffffff89165af1908115610a8f578391610b22575b505073ffffffffffffffffffffffffffffffffffffffff600a5416604051907f095ea7b300000000000000000000000000000000000000000000000000000000825260048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201526020816044818673ffffffffffffffffffffffffffffffffffffffff89165af18015610a8f57610aea575b50606073ffffffffffffffffffffffffffffffffffffffff600a54166064604051809481937fc52ab77800000000000000000000000000000000000000000000000000000000835273ffffffffffffffffffffffffffffffffffffffff891660048401526aab24c7796fd2da3880000060248401528160448401525af1908115610adf57829083908493610a9e575b5083600373ffffffffffffffffffffffffffffffffffffffff600a541673ffffffffffffffffffffffffffffffffffffffff8816835260056020526040832090600a8201907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905584600b820155826002820155826004820155826001820155015573ffffffffffffffffffffffffffffffffffffffff600a5416906040519081528360208201527f5ec1e9daf7affe04984801e0d07de6448f00139d72977b7c948bf698bd353f76604073ffffffffffffffffffffffffffffffffffffffff881692a473ffffffffffffffffffffffffffffffffffffffff60065416803b15610a9a576040517fcf5c45cd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff94909416600485015260248401919091528290604490829084905af18015610a8f57610a77575b80806106ea565b610a818391612ba5565b610a8b5738610a70565b5080fd5b6040513d85823e3d90fd5b8280fd5b925050506060813d606011610ad7575b81610abb60609383612bd6565b81010312610a8b57805160208201516040909201519138610906565b3d9150610aae565b6040513d84823e3d90fd5b6020813d602011610b1a575b81610b0360209383612bd6565b81010312610a9a575180151503610a8b5738610877565b3d9150610af6565b610b2b90612ba5565b610a8b5781386107df565b610b3f90612ba5565b386106b6565b6040513d6000823e3d90fd5b600080fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b60046040517fbb2875c3000000000000000000000000000000000000000000000000000000008152fd5b97503861038a565b60046040517fcae33fc2000000000000000000000000000000000000000000000000000000008152fd5b60046040517f559895a3000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb4afdc66000000000000000000000000000000000000000000000000000000008152fd5b5073ffffffffffffffffffffffffffffffffffffffff85168752600560205273ffffffffffffffffffffffffffffffffffffffff851673ffffffffffffffffffffffffffffffffffffffff6040892054161415610275565b60046040517f2c21983e000000000000000000000000000000000000000000000000000000008152fd5b60046040517fe6a0d45f000000000000000000000000000000000000000000000000000000008152fd5b60046040517f9e87fac8000000000000000000000000000000000000000000000000000000008152fd5b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57610d72612b37565b73ffffffffffffffffffffffffffffffffffffffff9081600c54163303610dc057167fffffffffffffffffffffffff0000000000000000000000000000000000000000600954161760095580f35b60046040517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b80fd5b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600854604051908152f35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610a9a57600c54163303610dc0577fffffffffffffffffffffffff0000000000000000000000000000000000000000600b541617600b5580f35b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff600c5416604051908152f35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610a9a57600c54163303610dc0577fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a5580f35b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516127108152f35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610a9a57600c54163303610dc0577fffffffffffffffffffffffff0000000000000000000000000000000000000000600654161760065580f35b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600354604051908152f35b5034610dea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576110c2612b37565b602435918215610be657604060019161114661113361112073ffffffffffffffffffffffffffffffffffffffff61110a6020996127106111038a5483612dc9565b0490612ddc565b9716968785526005895260048686200154612d8d565b86845260058852600c8585200154612de9565b8583526005875260028484200154612ddc565b93815260058552200154808211611161575b50604051908152f35b905038611158565b5034610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516103e88152f35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576101a090600c60406111e4612b37565b926111ed612e9f565b5073ffffffffffffffffffffffffffffffffffffffff80941681526005602052206040519261121b84612bb9565b80825416845260018201546020850152600282015460408501526003820154606085015260048201546080850152600582015460a0850152600682015460c0850152600782015460e0850152600882015461010085015280600983015416610120850152600a82015416610140840152600b8101546101608401520154610180820152611343604051809273ffffffffffffffffffffffffffffffffffffffff8082511683526020820151602084015260408201516040840152606082015160608401526080820151608084015260a082015160a084015260c082015160c084015260e082015160e084015261010080830151908401526101208181840151169084015261014090818301511690830152610160808201519083015261018080910151910152565bf35b5034610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5773ffffffffffffffffffffffffffffffffffffffff600c54163303610dc05760043560075580f35b8234610dea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760449073ffffffffffffffffffffffffffffffffffffffff90600691818160065416604051958680927f494cfc6c000000000000000000000000000000000000000000000000000000008252600435600483015260243560248301525afa938415610adf578294611659575b5083519461145f61144987612e87565b966114576040519889612bd6565b808852612e87565b937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06020950185855b82811061164357505050835b86518110156115615780846114ab6001938a612f00565b511686526005808852600c60408820604051926114c784612bb9565b888254168452858201548b85015260028201546040850152600382015460608501526004820154608085015281015460a08401528581015460c084015260078101548784015260088101546101008401528760098201541661012084015287600a82015416610140840152600b810154610160840152015461018082015261154f828b612f00565b5261155a818a612f00565b5001611494565b6040805187815289518189018190528a89019282019089895b8281106115875784840385f35b909192826101a0826116346001948a5173ffffffffffffffffffffffffffffffffffffffff8082511683526020820151602084015260408201516040840152606082015160608401526080820151608084015260a082015160a084015260c082015160c084015260e082015160e084015261010080830151908401526101208181840151169084015261014090818301511690830152610160808201519083015261018080910151910152565b0196019101949291909461157a565b61164b612e9f565b82828c010152018690611488565b9093503d8083833e61166b8183612bd6565b81019060209081818403126116fd5780519067ffffffffffffffff821161170157019180601f840112156116fd5782516116a481612e87565b936116b26040519586612bd6565b818552838086019260051b8201019283116116f9578301905b8282106116dd57505050509285611439565b815188811681036116f55781529083019083016116cb565b8680fd5b8580fd5b8380fd5b8480fd5b8261170f36612c8c565b919394926009549360ff8560a01c16610d105795600754946117318688612d8d565b3403610be6578561174896611af4575b505061300f565b908015801561177d575b50506040805173ffffffffffffffffffffffffffffffffffffffff9290921682526020820192909252f35b90919250600090610be65760409161271061179a60015483612dc9565b04916117c48373ffffffffffffffffffffffffffffffffffffffff936102c8828660095416612f43565b928286169384835260056020938185526118116117e78460048b85200154612d8d565b91888152838752600261180084600c8d85200154612de9565b9a828b8d9452868a52200154612ddc565b97876000528286526040600020916001830154808b11611aea575b5061184982611853928594600260039701558060048601556132b8565b8085840155613264565b600682015542600782015543600882015501611870838254612d8d565b905585600052808452600160406000200161188c888254612ddc565b905583600060446040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201528a6024820152828a5af13d15601f3d1160016000511416171615611a8c579082916118ed61196c9483612d8d565b60405190815288868201523390887f0daf98ca968d02ea35519e9b431a9f4185e069631b0c16f2e351cca350e12af360403393a486600052808552600660406000209182015491015460405191825285820152867fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d60403393a3612d8d565b60016fffffffffffffffffffffffffffffffff926040519561198d87612b5a565b8652850152336040850152606084015283608084015280421660a0840152431660c083015260065416803b15610b5157604080517f3b39d500000000000000000000000000000000000000000000000000000000008152835173ffffffffffffffffffffffffffffffffffffffff9081166004830152602085015115156024830152918401519091166044820152606083015160648201526080830151608482015260a08301516fffffffffffffffffffffffffffffffff90811660a483015260c09093015190921660c4830152600090829060e490829084905af18015610b4557611a7d575b50908280611752565b611a8690612ba5565b82611a74565b606484604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b995061184961182c565b73ffffffffffffffffffffffffffffffffffffffff611b139216612f43565b8780611741565b8234610dea57611b2936612d25565b9492611b3c600185969394965414612e22565b6002845560ff60095460a01c16610d105773ffffffffffffffffffffffffffffffffffffffff80921692838552600560209781895284600a60408920015416610ce657858752818952600360408820015460035410610cbc5785158015611eee575b610c3a574211610c10578215610be657878660646040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015286604482015282895af13d15601f3d11600189511416171615611e90578590858252808952600189611c6d611849611c23886002604089200154612d8d565b8a875285845285611c3b82600c60408b200154612de9565b948c89528181528c611c5487600460408d200154612ddc565b99525260408c20938160028601558060048601556132b8565b600682015542600782015543600882015501611c8a858254612d8d565b905585875280895260036040882001611ca4838254612ddc565b9055611cc0612710611cb860015485612dc9565b048093612ddc565b978810610bb457611d6392611cd9838760095416612f43565b611ce38982612f43565b85604051918683528a8c8401521690877fcf6fb4bb8248e51cb4bad5294f240615b1d0f5560da60c639802d614431e8f1960403393a48587528089526006604088209182015491015460405191825289820152857fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d60403393a386612d8d565b6fffffffffffffffffffffffffffffffff9160405194611d8286612b5a565b855285888601523360408601526060850152608084015280421660a0840152431660c08301526006541690813b15610a9a57611e63839283926040519485809481937f3b39d5000000000000000000000000000000000000000000000000000000000083526004830191909160c060e082019373ffffffffffffffffffffffffffffffffffffffff808251168452602082015115156020850152604082015116604084015260608101516060840152608081015160808401528160a0820151916fffffffffffffffffffffffffffffffff80931660a0860152015116910152565b03925af18015610adf579060019291611e81575b5055604051908152f35b611e8a90612ba5565b84611e77565b606488604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152fd5b5085875281895285856040892054161415611b9e565b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516b037790968dc8efffd10000008152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516b033b2e3c9fd0803ce80000008152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602060ff60095460a01c166040519015158152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600754604051908152f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff600c54163303610dc0576103e8811161206f5760085580f35b60046040517fcd4e6167000000000000000000000000000000000000000000000000000000008152fd5b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600254604051908152f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576101a090604073ffffffffffffffffffffffffffffffffffffffff918261212a612b37565b1681526005602052209080825416916001810154916002820154906003830154600484015460058501546006860154906007870154926008880154948660098a01541696600a8a01541697600c600b8b01549a01549a6040519c8d5260208d015260408c015260608b015260808a015260a089015260c088015260e0870152610100860152610120850152610140840152610160830152610180820152f35b8234610dea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57612201612b37565b90602435918215610be6576020926004604061227c9461225e61224b73ffffffffffffffffffffffffffffffffffffffff61226d97169586845260058a5260028585200154612d8d565b85835260058952600c8484200154612de9565b93815260058752200154612ddc565b61271061110360015483612dc9565b604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff600a5416604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff600b5416604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760206040516b029009752660ad62af8000008152f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff600c54163303610dc0576103e8811161206f5760015580f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea576020600154604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602060405160128152f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea5760043573ffffffffffffffffffffffffffffffffffffffff600c54163303610dc057806002556b037790968dc8efffd100000080820290828204148215171561252a57906ae787216768429d21800000826125249360045504612ddc565b60035580f35b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b8261256136612c8c565b906009959495939293549260ff8460a01c16610d10578596600754946125878688612d8d565b3403610be6578561259d9661295b57505061300f565b91811580156125d3575b50506040805173ffffffffffffffffffffffffffffffffffffffff939093168352602083019390935250f35b9293509091610be6576127106125eb60015484612dc9565b046126148173ffffffffffffffffffffffffffffffffffffffff946102c8828760095416612f43565b92808516918284526005602091818352612635876004604089200154612d8d565b9685875282845261264d88600c60408a200154612de9565b9786885283855261266589600260408b200154612ddc565b9887895284865260408920916001830154808c11612951575b5061269b826126a5928594600260039701558060048601556132b8565b8087840155613264565b6006820155426007820155436008820155016126c2828254612d8d565b9055858752828452600160408820016126dc898254612ddc565b9055604051927fa9059cbb0000000000000000000000000000000000000000000000000000000084528488604461dead968760048201528c6024820152828b5af13d15601f3d1160018b5114161716156128f357908291846127416127bc9584612d8d565b6040519081528b88820152897f0daf98ca968d02ea35519e9b431a9f4185e069631b0c16f2e351cca350e12af360403393a4878952808652600660408a209182015491015460405191825286820152877fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d60403393a3612d8d565b9060016fffffffffffffffffffffffffffffffff93604051966127de88612b5a565b87528601526040850152606084015284608084015280421660a0840152431660c08301526006541690813b15610a9a576128bd839283926040519586809481937f3b39d5000000000000000000000000000000000000000000000000000000000083526004830191909160c060e082019373ffffffffffffffffffffffffffffffffffffffff808251168452602082015115156020850152604082015116604084015260608101516060840152608081015160808401528160a0820151916fffffffffffffffffffffffffffffffff80931660a0860152015116910152565b03925af19081156128e757506128d8575b50908280806125a7565b6128e190612ba5565b826128ce565b604051903d90823e3d90fd5b606485604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b9a5061269b61267e565b73ffffffffffffffffffffffffffffffffffffffff61297a9216612f43565b8880611741565b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57600435801515809103610a8b5773ffffffffffffffffffffffffffffffffffffffff600c54163303610dc0577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000006009549260a01b1691161760095580f35b8234610dea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57612a5d612b37565b600c549073ffffffffffffffffffffffffffffffffffffffff8083163303610dc0577fffffffffffffffffffffffff00000000000000000000000000000000000000009116911617600c5580f35b8234610dea57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dea57602073ffffffffffffffffffffffffffffffffffffffff60065416604051908152f35b839034610a8b57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a8b576020906004548152f35b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610b5157565b60e0810190811067ffffffffffffffff821117612b7657604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff8111612b7657604052565b6101a0810190811067ffffffffffffffff821117612b7657604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612b7657604052565b81601f82011215610b515780359067ffffffffffffffff8211612b765760405192612c6a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160185612bd6565b82845260208383010111610b5157816000926020809301838601378301015290565b9060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc830112610b515767ffffffffffffffff600435818111610b515783612cd791600401612c17565b92602435828111610b515781612cef91600401612c17565b9260443592606435818111610b515783612d0b91600401612c17565b92608435918211610b5157612d2291600401612c17565b90565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60a0910112610b515773ffffffffffffffffffffffffffffffffffffffff906004358281168103610b51579160243591604435916064359081168103610b51579060843590565b91908201809211612d9a57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810292918115918404141715612d9a57565b91908203918211612d9a57565b8115612df3570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b15612e2957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f5245454e5452414e4359000000000000000000000000000000000000000000006044820152fd5b67ffffffffffffffff8111612b765760051b60200190565b60405190612eac82612bb9565b816101806000918281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e0820152826101008201528261012082015282610140820152826101608201520152565b8051821015612f145760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080809381935af115612f5357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152fd5b919082519283825260005b848110612ffb5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201612fbc565b9190604093845192612a43908185019585871067ffffffffffffffff881117612b76576130969461305461306292613088956132ee8a39610100808b528a0190612fb1565b9088820360208a0152612fb1565b906012888801526b033b2e3c9fd0803ce800000060608801528682036080880152612fb1565b9084820360a0860152612fb1565b913060c082015260e03391015280600092039082f09182156132565773ffffffffffffffffffffffffffffffffffffffff8084169081845260056020528284207fffffffffffffffffffffffff000000000000000000000000000000000000000083818354161782556b029009752660ad62af80000060018301556b037790968dc8efffd1000000806002840155866003840155600254806004850155670de0b6b3a7640000907812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f2181118202158302156132605702049182600582015561317583613264565b9182600683015542600783015543600883015560098201903390825416179055600c60045491015584519133857fd5f9bdf12adf29dab0248c349842c3822d53ae2bb4f36352f301630d018c81398980a382526020820152827fd0988f728d8e8854015fef055fea9a0b7de3c2d6ffd2bbafd3ec8e404a3c428d853393a36006541690813b156116fd57839160448392855196879384927ffcf4ca5400000000000000000000000000000000000000000000000000000000845260048401523360248401525af191821561325657505061324d575090565b612d2290612ba5565b51903d90823e3d90fd5b8880fd5b6b033b2e3c9fd0803ce800000090670de0b6b3a764000091817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048111820215830215610b51570290808204910615150190565b670de0b6b3a7640000907812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f218111820215830215610b515702049056fe6101206040818152346107c757612a43803803809161001e82866107cc565b843982016101009283818303126107c75780516001600160401b0391908281116107c7578361004e9183016107ef565b91602090818301518181116107c757856100699185016107ef565b93868401519360ff851685036107c75760608101519260808201518181116107c757886100979184016107ef565b9760a0830151908282116107c7576100b09184016107ef565b926100c960e06100c260c0860161085e565b940161085e565b938151978389116107b157600098806100e28b54610872565b94601f95868111610765575b508a90868311600114610702578c926106f7575b50508160011b916000199060031b1c19161789555b89518481116105b8578060019b61012e8d54610872565b8681116106a9575b508a90868311600114610640578c92610635575b5050600019600383901b1c1916908b1b178a555b6080524660a052888b5189818b549161017683610872565b928383528c808401968216918260001461061a5750506001146105e0575b6101a0925003826107cc565b5190208b51888101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528d8201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815260c08101818110868211176105cc578d5251902060c05260ff19998a600a5416600a558051908482116105b8578190610240600654610872565b858111610569575b5089908583116001146104ff578b926104f4575b5050600019600383901b1c1916908a1b176006555b80519283116104e057908291610288600754610872565b82811161048f575b508791831160011461042e578892610423575b5050600019600383901b1c191690871b176007555b6001600160a01b031660e052875260025481810190811061040f57600255338352600382528583208181540190558551908152827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef833393a33382526009815260ff858320541615610390575b85855161219691826108ad833960805182610fc4015260a05182611a53015260c05182611a7a015260e0518281816106c2015281816109bf01528181610c08015281816110f501528181611225015281816113c40152611fb1015251818181610d0301526115d10152f35b600854680100000000000000008110156103fb57838101806008558110156103e757600883528183200180546001600160a01b03191633908117909155825260099052839020805490921617905538808080610325565b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b83526041600452602483fd5b634e487b7160e01b84526011600452602484fd5b0151905038806102a3565b600789528789208a94509190601f1984168a5b8a8282106104795750508411610460575b505050811b016007556102b8565b015160001960f88460031b161c19169055388080610452565b8385015186558d97909501949384019301610441565b90919250600789528789208380860160051c8201928a87106104d7575b9186958d929594930160051c01915b8281106104c9575050610290565b8b81558695508c91016104bb565b925081926104ac565b634e487b7160e01b88526041600452602488fd5b01519050388061025c565b60068c528a8c208d94509190601f1984168d5b8d82821061054a5750508411610531575b505050811b01600655610271565b015160001960f88460031b161c19169055388080610523565b91929395968291958786015181550195019301908e9594939291610512565b90915060068b52898b208580850160051c8201928c86106105af575b918e91869594930160051c01915b8281106105a1575050610248565b8d81558594508e9101610593565b92508192610585565b634e487b7160e01b8a52604160045260248afd5b634e487b7160e01b8b52604160045260248bfd5b508a8c8e8180528282205b8583106106015750506101a09350820101610194565b8091929450548385880101520191018b908e85936105eb565b60ff191687526101a094151560051b84010191506101949050565b01519050388061014a565b8d8d528b8d208e94509190601f1984168e8e5b8282106106895750508411610670575b505050811b018a5561015e565b015160001960f88460031b161c19169055388080610663565b91929395968291958786015181550195019301908f95949392918e610653565b9091508c8c528a8c208680850160051c8201928d86106106ee575b918f91869594930160051c01915b8281106106e0575050610136565b8e81558594508f91016106d2565b925081926106c4565b015190503880610102565b8c80528b8d209250601f1984168d5b8d82821061074f575050908460019594939210610736575b505050811b018955610117565b015160001960f88460031b161c19169055388080610729565b6001859682939686015181550195019301610711565b9091508b80528a8c208680850160051c8201928d86106107a8575b9085949392910160051c01905b81811061079a57506100ee565b8d815584935060010161078d565b92508192610780565b634e487b7160e01b600052604160045260246000fd5b600080fd5b601f909101601f19168101906001600160401b038211908210176107b157604052565b919080601f840112156107c75782516001600160401b0381116107b1576020906040519261082683601f19601f85011601856107cc565b8184528282870101116107c75760005b81811061084b57508260009394955001015290565b8581018301518482018401528201610836565b51906001600160a01b03821682036107c757565b90600182811c921680156108a2575b602083101461088c57565b634e487b7160e01b600052602260045260246000fd5b91607f169161088156fe6080604081815260048036101561001557600080fd5b60009260e08435811c91826302d05d3f146115875750816306fdde03146114b8578163095ea7b3146113e85781630c4efc8e1461137857816318160ddd1461133a57816323b872dd146110555781632a11ced014610fe8578163313ce56714610f8b5781633644e51514610f485781636f3921ee14610f0b57816370a0823114610ea85781637284e41614610e585781637a5b4f5914610b545781637ecebe0014610af15781638911e26b14610aae5781638e84697214610a4157816395c996411461096a57816395d89b41146108435781639e5f2602146107fe578163a9059cbb146105b9578163b569807114610584578163d4d7b19a1461051c578163d505accf146101ef57508063db04aef4146101ae5763dd62ed3e1461013857600080fd5b346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209282916101736118db565b61017b611903565b9173ffffffffffffffffffffffffffffffffffffffff8092168452865283832091168252845220549051908152f35b8280fd5b5050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906008549051908152f35b5080fd5b84915083346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576102296118db565b610231611903565b9160443590606435926084359460ff86168096036105185760ff600a5416156104f05742851061049357610263611a4e565b9473ffffffffffffffffffffffffffffffffffffffff80931696878a5260209660058852858b20998a549a60018c019055865193868a8601967f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988528c8a880152169b8c606087015289608087015260a086015260c085015260c08452830167ffffffffffffffff948482108683111761046657818852845190206101008501927f19010000000000000000000000000000000000000000000000000000000000008452610102860152610122850152604281526101608401948186109086111761043a57848752519020835261018082015260a4356101a082015260c4356101c0909101528780528490889060809060015afa15610430578651169687151580610427575b156103cc5786977f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259596975283528087208688528352818188205551908152a380f35b8360649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152fd5b50848814610389565b81513d88823e3d90fd5b60248c60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5060248c60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b60648960208551917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152fd5b8883517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b8780fd5b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760ff8160209373ffffffffffffffffffffffffffffffffffffffff6105716118db565b1681526009855220541690519015158152f35b505050346101eb576105b5906105a261059c3661198c565b90612019565b90519182916020835260208301906119c0565b0390f35b505091346107fb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb576105f26118db565b926024359060ff600a54161561067e575b508273ffffffffffffffffffffffffffffffffffffffff856106266020976120bd565b3385526003875282852061063b858254611e53565b90551692838152600386522081815401905582519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a35160018152f35b73ffffffffffffffffffffffffffffffffffffffff84517f54028f7c00000000000000000000000000000000000000000000000000000000815260209182828581847f0000000000000000000000000000000000000000000000000000000000000000165afa9182156107f15790839187936107c2575b5087517feb56a3bd0000000000000000000000000000000000000000000000000000000081523086820190815273ffffffffffffffffffffffffffffffffffffffff8b1660208201529093849291839003604001918391165afa9182156107b857859261078b575b5050156106035783517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b6107aa9250803d106107b1575b6107a281836116b0565b810190611a36565b388061075d565b503d610798565b86513d87823e3d90fd5b6107e3919350823d84116107ea575b6107db81836116b0565b810190611a0a565b91386106f5565b503d6107d1565b87513d88823e3d90fd5b80fd5b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209061083a611f64565b90519015158152f35b8385346107fb57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb57815191828260019360015494610888866115f5565b91828552602096876001821691826000146109255750506001146108c9575b5050506105b592916108ba9103856116b0565b51928284938452830190611898565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b82841061090d57505050820101816108ba6105b56108a7565b8054848a0186015288955087949093019281016108f4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b860190930193508492506108ba91506105b590506108a7565b5050346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57803591821515809303610a3d5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163303610a1757505060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a5416911617600a5580f35b517f301d76fc000000000000000000000000000000000000000000000000000000008152fd5b8380fd5b8385346107fb5790610a5b610a553661198c565b90611e74565b9092610a7083519484869586528501906119c0565b60208482036020860152602080855193848152019401925b828110610a9757505050500390f35b835185528695509381019392810192600101610a88565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209060ff600a541690519015158152f35b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb578060209273ffffffffffffffffffffffffffffffffffffffff610b446118db565b1681526005845220549051908152f35b848385346101aa57827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa578051610b9081611648565b8381528385606092836020820152838582015283808201528360808201528260a08201528260c0820152015273ffffffffffffffffffffffffffffffffffffffff9482517fbbe4f6db00000000000000000000000000000000000000000000000000000000815230858201526101a09081816024818b7f0000000000000000000000000000000000000000000000000000000000000000165afa918215610e21578792610e2b575b50508351947f06fdde0300000000000000000000000000000000000000000000000000000000865286868281305afa958615610e21578796610e05575b5086855180927f95d89b4100000000000000000000000000000000000000000000000000000000825281305afa968715610dfa578097610dd5575b505086610cbb611f64565b9160c0015193855197610ccd89611648565b30895260208901978852868901908152610ce56117d6565b828a01908152610cf36116f1565b9160808b0192835260a08b0199857f0000000000000000000000000000000000000000000000000000000000000000168b5260c08c019615158752878c0198895289519c8d9c60208e52511660208d015251610100809a8d01526101208c01610d5b91611898565b9051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe094858d830301908d0152610d9291611898565b905190838b82030160808c0152610da891611898565b9051918982030160a08a0152610dbd91611898565b95511660c08701525115159085015251908301520390f35b610df29297503d8091833e610dea81836116b0565b810190611d26565b948780610cb0565b8551903d90823e3d90fd5b610e1a9196503d8089833e610dea81836116b0565b9488610c75565b85513d89823e3d90fd5b610e4a9250803d10610e51575b610e4281836116b0565b810190611c4d565b8780610c38565b503d610e38565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576105b590610e956117d6565b9051918291602083526020830190611898565b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb578060209273ffffffffffffffffffffffffffffffffffffffff610efb6118db565b1681526003845220549051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576105b590610e956116f1565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb57602090610f84611a4e565b9051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5735916008548310156107fb575073ffffffffffffffffffffffffffffffffffffffff611046602093611926565b92905490519260031b1c168152f35b505091346107fb5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb5761108f6118db565b611097611903565b9360443560ff600a5416156111e0575b907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef918573ffffffffffffffffffffffffffffffffffffffff80951694858752602098848a958652838920837f00000000000000000000000000000000000000000000000000000000000000001690818b5287527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081868c2054036111c7575b50611152836120bd565b888a52818752848a20338b52875285858b20549182036111a4575b50505086885260038552828820611185858254611e53565b9055169586815260038452208181540190558551908152a35160018152f35b6111ad91611e53565b90888a528652838920338a5286528389205538808561116d565b898b52828852858b20908b52875280858b205538611148565b73ffffffffffffffffffffffffffffffffffffffff8551907f54028f7c00000000000000000000000000000000000000000000000000000000825260209182818681857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156113305783916112b4918991611313575b5089517feb56a3bd0000000000000000000000000000000000000000000000000000000081523088820190815273ffffffffffffffffffffffffffffffffffffffff8d1660208201529094859384928391604090910190565b0392165afa9182156107f15786926112f6575b5050156110a7575083517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b61130c9250803d106107b1576107a281836116b0565b38806112c7565b61132a9150833d85116107ea576107db81836116b0565b3861125b565b88513d89823e3d90fd5b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906002549051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b505091346107fb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb576114216118db565b906024359060ff600a54161561148f57838291602096338252875273ffffffffffffffffffffffffffffffffffffffff8282209516948582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b505050517fee90c468000000000000000000000000000000000000000000000000000000008152fd5b8385346107fb57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107fb57815191828283546114f8816115f5565b908184526020956001918760018216918260001461092557505060011461152c575050506105b592916108ba9103856116b0565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b82841061156f57505050820101816108ba6105b56108a7565b8054848a018601528895508794909301928101611556565b8590346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c9216801561163e575b602083101461160f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611604565b610100810190811067ffffffffffffffff82111761166557604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff82111761166557604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761166557604052565b6040519060008260075491611705836115f5565b808352926020906001908181169081156117935750600114611732575b5050611730925003836116b0565b565b91509260076000527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688936000925b82841061177b57506117309450505081016020013880611722565b85548885018301529485019487945092810192611760565b9050602093506117309592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013880611722565b60405190600082600654916117ea836115f5565b808352926020906001908181169081156117935750600114611814575050611730925003836116b0565b91509260066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f936000925b82841061185d57506117309450505081016020013880611722565b85548885018301529485019487945092810192611842565b60005b8381106118885750506000910152565b8181015183820152602001611878565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936118d481518092818752878088019101611875565b0116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036118fe57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff821682036118fe57565b60085481101561195d5760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60409101126118fe576004359060243590565b90815180825260208080930193019160005b8281106119e0575050505090565b835173ffffffffffffffffffffffffffffffffffffffff16855293810193928101926001016119d2565b908160209103126118fe575173ffffffffffffffffffffffffffffffffffffffff811681036118fe5790565b908160209103126118fe575180151581036118fe5790565b6000467f000000000000000000000000000000000000000000000000000000000000000003611a9c57507f000000000000000000000000000000000000000000000000000000000000000090565b60405181548291611aac826115f5565b808252816020948582019460019087600182169182600014611bf0575050600114611b97575b50611adf925003826116b0565b51902091604051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845260408301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019082821067ffffffffffffffff831117611b6a575060405251902090565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b87805286915087907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b858310611bd8575050611adf935082010138611ad2565b80548388018501528694508893909201918101611bc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168852611adf95151560051b8501019250389150611ad29050565b519073ffffffffffffffffffffffffffffffffffffffff821682036118fe57565b80916101a092839103126118fe5760405191820182811067ffffffffffffffff82111761166557604052805173ffffffffffffffffffffffffffffffffffffffff811681036118fe5782526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015190830152610120611cf7818301611c2c565b90830152610140611d09818301611c2c565b908301526101608082015190830152610180809101519082015290565b6020818303126118fe57805167ffffffffffffffff918282116118fe57019082601f830112156118fe5781519081116116655760405192611d8f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601856116b0565b818452602082840101116118fe57611dad9160208085019101611875565b90565b67ffffffffffffffff81116116655760051b60200190565b90611dd282611db0565b611ddf60405191826116b0565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611e0d8294611db0565b0190602036910137565b91908201809211611e2457565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b91908203918211611e2457565b805182101561195d5760209160051b010190565b91906008549081841015611f3657611e8c9084611e17565b90808211611f2e575b50611ea8611ea38483611e53565b611dc8565b90611eb6611ea38583611e53565b93805b828110611ec7575050509190565b80604073ffffffffffffffffffffffffffffffffffffffff611eea600194611926565b919054600392831b1c169081611f09611f038887611e53565b8a611e60565b5260009182526020522054611f27611f218584611e53565b89611e60565b5201611eb9565b905038611e95565b50506040519150611f4682611694565b6000825260405191611f5783611694565b6000835260003681379190565b73ffffffffffffffffffffffffffffffffffffffff6040517fbbe4f6db0000000000000000000000000000000000000000000000000000000081523060048201526101a0908181602481867f0000000000000000000000000000000000000000000000000000000000000000165afa90811561200d5761014092600092611ff0575b5050015116151590565b6120069250803d10610e5157610e4281836116b0565b3880611fe6565b6040513d6000823e3d90fd5b9060085490818310156120a2576120309083611e17565b9080821161209a575b50612047611ea38383611e53565b91805b8281106120575750505090565b8073ffffffffffffffffffffffffffffffffffffffff612078600193611926565b90549060031b1c1661209361208d8584611e53565b87611e60565b520161204a565b905038612039565b5050506040516120b181611694565b60008152600036813790565b9073ffffffffffffffffffffffffffffffffffffffff809216600090808252600960205260ff604083205416156120f5575b50509050565b60085493680100000000000000008510156121695761211d8560016040969701600855611926565b819291549060031b9184831b921b1916179055815260096020522060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790558038806120ef565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000187d19772e931e4f
-----Decoded View---------------
Arg [0] : initVirtualEthReserve (uint256): 1764594628672298575
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000187d19772e931e4f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,063.2 | 1.5787 | $4,836.02 |
Loading...
Loading
[ Download: CSV Export ]
[ 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.