Source Code
Overview
ETH Balance
ETH Value
$0.00Latest 25 from a total of 31,230 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Swap Exact ETH F... | 13135483 | 357 days ago | IN | 0.001 ETH | 0.00001059 | ||||
| Swap Exact ETH F... | 12006953 | 402 days ago | IN | 0.00036 ETH | 0.00000776 | ||||
| Swap Exact Token... | 11758177 | 412 days ago | IN | 0 ETH | 0.00001952 | ||||
| Swap Exact Token... | 11758168 | 412 days ago | IN | 0 ETH | 0.00001952 | ||||
| Swap Exact Token... | 11758158 | 412 days ago | IN | 0 ETH | 0.00001957 | ||||
| Swap Exact Token... | 11758144 | 412 days ago | IN | 0 ETH | 0.00001832 | ||||
| Swap Exact Token... | 11758121 | 412 days ago | IN | 0 ETH | 0.00001957 | ||||
| Swap Exact Token... | 11758112 | 412 days ago | IN | 0 ETH | 0.00001957 | ||||
| Swap Exact Token... | 11758102 | 412 days ago | IN | 0 ETH | 0.00001924 | ||||
| Swap Exact Token... | 11737055 | 413 days ago | IN | 0 ETH | 0.00002616 | ||||
| Swap Exact Token... | 11714796 | 414 days ago | IN | 0 ETH | 0.00001953 | ||||
| Swap Exact Token... | 11568302 | 419 days ago | IN | 0 ETH | 0.00002237 | ||||
| Swap Exact Token... | 11524574 | 421 days ago | IN | 0 ETH | 0.00001964 | ||||
| Swap Exact Token... | 11484140 | 422 days ago | IN | 0 ETH | 0.00003416 | ||||
| Swap Exact ETH F... | 11367106 | 426 days ago | IN | 0.00003 ETH | 0.0000196 | ||||
| Swap Exact ETH F... | 11339523 | 427 days ago | IN | 0.003 ETH | 0.00001799 | ||||
| Swap Exact Token... | 11143200 | 434 days ago | IN | 0 ETH | 0.00006307 | ||||
| Swap Exact Token... | 11031916 | 438 days ago | IN | 0 ETH | 0.00003269 | ||||
| Swap Exact Token... | 11031483 | 438 days ago | IN | 0 ETH | 0.00003919 | ||||
| Swap Exact Token... | 11031317 | 438 days ago | IN | 0 ETH | 0.00003546 | ||||
| Swap Exact Token... | 11031144 | 438 days ago | IN | 0 ETH | 0.00003082 | ||||
| Swap Exact Token... | 11018143 | 439 days ago | IN | 0 ETH | 0.00003643 | ||||
| Swap Exact Token... | 11017275 | 439 days ago | IN | 0 ETH | 0.00003283 | ||||
| Swap Exact Token... | 11006055 | 439 days ago | IN | 0 ETH | 0.00001853 | ||||
| Swap Exact Token... | 11002280 | 439 days ago | IN | 0 ETH | 0.00002489 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 13135483 | 357 days ago | 0.001 ETH | ||||
| 12006953 | 402 days ago | 0.00036 ETH | ||||
| 11758177 | 412 days ago | 0.00001407 ETH | ||||
| 11758177 | 412 days ago | 0.00001407 ETH | ||||
| 11758177 | 412 days ago | 0.00349004 ETH | ||||
| 11758177 | 412 days ago | 0.00351818 ETH | ||||
| 11758168 | 412 days ago | 0.00009806 ETH | ||||
| 11758168 | 412 days ago | 0.00009806 ETH | ||||
| 11758168 | 412 days ago | 0.02432047 ETH | ||||
| 11758168 | 412 days ago | 0.0245166 ETH | ||||
| 11758158 | 412 days ago | 0.00009911 ETH | ||||
| 11758158 | 412 days ago | 0.00009911 ETH | ||||
| 11758158 | 412 days ago | 0.02458122 ETH | ||||
| 11758158 | 412 days ago | 0.02477946 ETH | ||||
| 11758144 | 412 days ago | 0.00009932 ETH | ||||
| 11758144 | 412 days ago | 0.00009932 ETH | ||||
| 11758144 | 412 days ago | 0.02463157 ETH | ||||
| 11758144 | 412 days ago | 0.02483021 ETH | ||||
| 11758121 | 412 days ago | 0.00010139 ETH | ||||
| 11758121 | 412 days ago | 0.00010139 ETH | ||||
| 11758121 | 412 days ago | 0.02514495 ETH | ||||
| 11758121 | 412 days ago | 0.02534773 ETH | ||||
| 11758112 | 412 days ago | 0.00010365 ETH | ||||
| 11758112 | 412 days ago | 0.00010365 ETH | ||||
| 11758112 | 412 days ago | 0.0257069 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
IggySwapRouter
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.17;
import { OwnableWithManagers } from "../access/OwnableWithManagers.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
interface IStats {
function addWeiSpent(address user_, uint256 weiSpent_) external;
}
interface IUniswapV2Factory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Pair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IUniswapV2Router02 {
function WETH() external pure returns (address);
function factory() external pure returns (address);
function getAmountsOut(uint amountIn, address[] memory path) external view returns (uint[] memory amounts);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
interface IWETH {
function deposit() external payable;
function withdraw(uint) external;
}
/// @title Iggy swap router contract
/// @author Tempe Techie
/// @notice Contract that helps an Iggy frontend to swap tokens (custom because it's specific to a particular frontend)
contract IggySwapRouter is OwnableWithManagers {
using SafeERC20 for IERC20;
address public feeChangerAddress; // a special role that is allowed to change fees and share amounts
address public frontendAddress; // address of a DAO/community which runs the frontend
address public iggyAddress;
address public routerAddress; // DEX router address
address public stakingAddress; // staking contract address
address public statsAddress; // stats middleware contract address
address public immutable wethAddress;
uint256 public constant MAX_BPS = 10_000;
uint256 public swapFee = 80; // 0.8% default fee
uint256 public referrerShare = 1000; // 10% share of the swap fee (in bips)
uint256 public stakingShare = 8000; // in bips
// after referrer & staking shares are deducted, the rest goes to the frontend operator and iggy based on the following frontendShare:
uint256 public frontendShare = 5000; // 50% share of the swap fee in bips (after referrer & staking shares are deducted)
// MODIFIERS
modifier onlyFeeChanger() {
require(msg.sender == feeChangerAddress, "IggySwap: Sender is not the Fee Changer");
_;
}
// CONSTRUCTOR
constructor(
address _frontendAddress,
address _iggyAddress,
address _routerAddress,
address _stakingAddress,
address _statsAddress,
uint256 _swapFee,
uint256 _stakingShare,
uint256 _frontendShare
) {
frontendAddress = _frontendAddress;
iggyAddress = _iggyAddress;
routerAddress = _routerAddress;
stakingAddress = _stakingAddress;
statsAddress = _statsAddress;
swapFee = _swapFee;
stakingShare = _stakingShare;
frontendShare = _frontendShare;
feeChangerAddress = msg.sender;
wethAddress = IUniswapV2Router02(_routerAddress).WETH();
}
// RECEIVE
receive() external payable {}
// READ PUBLIC/EXTERNAL
/// @notice Get the amount of tokens and ETH to receive when removing liquidity
/// @dev This is useful to calculate min amount of tokens and ETH, but consider reducing it by slippage on your frontend
function calculateETHAndTokensToReceive(
address _token, // token to receive after removing liquidity
uint256 _liquidity
) external view returns (uint256 amountToken, uint256 amountETH) {
address factoryAddress = IUniswapV2Router02(routerAddress).factory();
address pair = IUniswapV2Factory(factoryAddress).getPair(_token, wethAddress);
(address token0,) = _sortTokens(_token, wethAddress);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(pair).getReserves();
(uint256 reserveToken, uint256 reserveETH) = _token == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
uint256 lpTotalSupply = IERC20(pair).totalSupply();
amountToken = (reserveToken * _liquidity) / lpTotalSupply;
amountETH = (reserveETH * _liquidity) / lpTotalSupply;
}
/// @notice Calculate the amount of ETH needed to add liquidity
/// @dev This is useful to calculate min amount of ETH, but consider reducing it by slippage on your frontend
function calculateETHForLiquidity(address addressToken, uint256 amountToken) external view returns (uint256) {
address factoryAddress = IUniswapV2Router02(routerAddress).factory();
address pair = IUniswapV2Factory(factoryAddress).getPair(addressToken, wethAddress);
if (pair == address(0)) {
return 0;
}
(address token0,) = _sortTokens(addressToken, wethAddress);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(pair).getReserves();
(uint256 reserveToken, uint256 reserveETH) = addressToken == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
return (amountToken * reserveETH) / reserveToken; // return amount of ETH needed to add/remove liquidity
}
/// @notice Preview the amount of tokens that would be received for a given swap
function getAmountsOut(
uint amountIn,
address[] memory path
) public view returns (uint[] memory amounts) {
amounts = _getTokensAmountOut(amountIn, path);
amounts[amounts.length - 1] = amounts[amounts.length - 1] - _getFeeAmount(amounts[amounts.length - 1]); // deduce swap fee from amount out
}
/// @notice Get LP (pair) token address for a given pair of tokens
function getLpTokenAddress(address tokenA, address tokenB) external view returns (address) {
if (tokenA == address(0)) {
tokenA = wethAddress;
}
if (tokenB == address(0)) {
tokenB = wethAddress;
}
return IUniswapV2Factory(IUniswapV2Router02(routerAddress).factory()).getPair(tokenA, tokenB);
}
/// @notice Calculates the price impact of a swap (in bips)
function getPriceImpact(
address tokenIn,
address tokenOut,
uint amountIn
) external view returns (uint) {
if (tokenIn == address(0)) {
tokenIn = wethAddress;
}
if (tokenOut == address(0)) {
tokenOut = wethAddress;
}
if (tokenIn == tokenOut) {
return 0;
}
// get factory address from router
address factoryAddress = IUniswapV2Router02(routerAddress).factory();
// get reserves for both tokens (reserve is a token total amount in a pool)
(uint reserveIn, uint reserveOut) = _getReserves(factoryAddress, tokenIn, tokenOut);
uint k = reserveIn * reserveOut; // calculate a constant k (x * y = k, standard Uniswap V2 formula)
// calculate the amount of tokens user would receive if they swapped
uint newReserveOut = k / (reserveIn + amountIn);
uint amountOut = reserveOut - newReserveOut;
return (amountOut * MAX_BPS) / newReserveOut; // return price impact in bips
}
// WRITE PUBLIC/EXTERNAL
/// @notice Add liquidity to a pool (both tokens must be ERC-20 tokens)
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity) {
// transfer tokens to this contract
IERC20(tokenA).safeTransferFrom(msg.sender, address(this), amountADesired);
IERC20(tokenB).safeTransferFrom(msg.sender, address(this), amountBDesired);
// approve tokens to be spent by router
IERC20(tokenA).approve(routerAddress, amountADesired);
IERC20(tokenB).approve(routerAddress, amountBDesired);
// add liquidity
(amountA, amountB, liquidity) = IUniswapV2Router02(routerAddress).addLiquidity(
tokenA,
tokenB,
amountADesired,
amountBDesired,
amountAMin,
amountBMin,
to,
deadline
);
}
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity) {
// transfer tokens to this contract
IERC20(token).safeTransferFrom(msg.sender, address(this), amountTokenDesired);
// approve tokens to be spent by router
IERC20(token).approve(routerAddress, amountTokenDesired);
// add liquidity
(amountToken, amountETH, liquidity) = IUniswapV2Router02(routerAddress).addLiquidityETH{value: msg.value}(
token,
amountTokenDesired,
amountTokenMin,
amountETHMin,
to,
deadline
);
}
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB) {
// get factory address from router
address factoryAddress = IUniswapV2Router02(routerAddress).factory();
// get LP token address
address pair = IUniswapV2Factory(factoryAddress).getPair(tokenA, tokenB);
// transfer liquidity tokens to this contract
IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);
// approve tokens to be spent by router
IERC20(pair).approve(routerAddress, liquidity);
// remove liquidity
(amountA, amountB) = IUniswapV2Router02(routerAddress).removeLiquidity(
tokenA,
tokenB,
liquidity,
amountAMin,
amountBMin,
to,
deadline
);
}
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH) {
// get factory address from router
address factoryAddress = IUniswapV2Router02(routerAddress).factory();
// get LP token address
address pair = IUniswapV2Factory(factoryAddress).getPair(token, wethAddress);
// transfer liquidity tokens to this contract
IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);
// approve tokens to be spent by router
IERC20(pair).approve(routerAddress, liquidity);
// remove liquidity
(amountToken, amountETH) = IUniswapV2Router02(routerAddress).removeLiquidityETH(
token,
liquidity,
amountTokenMin,
amountETHMin,
to,
deadline
);
}
/// @notice Swap exact ERC-20 tokens for ERC-20 tokens
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin, // amount out deducted by slippage
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts) {
IERC20(path[0]).safeTransferFrom(msg.sender, address(this), amountIn); // send user's tokens to this contract
amounts = _swap(amountIn, amountOutMin, path, to, deadline, address(0), false); // no referrer
}
/// @notice Swap exact ERC-20 tokens for ERC-20 tokens (with referrer)
function swapExactTokensForTokensWithReferrer(
uint amountIn,
uint amountOutMin, // amount out deducted by slippage
address[] calldata path,
address to,
uint deadline,
address referrer
) external returns (uint[] memory amounts) {
IERC20(path[0]).safeTransferFrom(msg.sender, address(this), amountIn); // send user's tokens to this contract
amounts = _swap(amountIn, amountOutMin, path, to, deadline, referrer, false);
}
/// @notice Swap exact ERC-20 tokens for ETH
function swapExactTokensForETH(
uint amountIn,
uint amountOutMin,
address[] memory path,
address to,
uint deadline
) external returns (uint[] memory amounts) {
IERC20(path[0]).safeTransferFrom(msg.sender, address(this), amountIn); // send user's tokens to this contract
if (path[path.length - 1] == address(0)) {
path[path.length - 1] = wethAddress;
}
amounts = _swap(amountIn, amountOutMin, path, to, deadline, address(0), true); // no referrer
}
/// @notice Swap exact ERC-20 tokens for ETH (with referrer)
function swapExactTokensForETHWithReferrer(
uint amountIn,
uint amountOutMin,
address[] memory path,
address to,
uint deadline,
address referrer
) external returns (uint[] memory amounts) {
IERC20(path[0]).safeTransferFrom(msg.sender, address(this), amountIn); // send user's tokens to this contract
if (path[path.length - 1] == address(0)) {
path[path.length - 1] = wethAddress;
}
amounts = _swap(amountIn, amountOutMin, path, to, deadline, referrer, true);
}
/// @notice Swap exact ETH for ERC-20 tokens
function swapExactETHForTokens(
uint amountOutMin,
address[] memory path,
address to,
uint deadline
) external payable returns (uint[] memory amounts) {
require(msg.value > 0, "IggySwap: Native coin amount is zero");
IWETH(wethAddress).deposit{value: msg.value}(); // convert ETH to WETH
if (path[0] == address(0)) {
path[0] = wethAddress;
}
amounts = _swap(msg.value, amountOutMin, path, to, deadline, address(0), false); // no referrer
}
/// @notice Swap exact ETH for ERC-20 tokens (with referrer)
function swapExactETHForTokensWithReferrer(
uint amountOutMin,
address[] memory path,
address to,
uint deadline,
address referrer
) external payable returns (uint[] memory amounts) {
require(msg.value > 0, "IggySwap: Native coin amount is zero");
IWETH(wethAddress).deposit{value: msg.value}(); // convert ETH to WETH
if (path[0] == address(0)) {
path[0] = wethAddress;
}
amounts = _swap(msg.value, amountOutMin, path, to, deadline, referrer, false);
}
// FEE CHANGER
function changeFeeChangerAddress(address _newFeeChangerAddress) external onlyFeeChanger {
feeChangerAddress = _newFeeChangerAddress;
}
function changeFrontendShare(uint256 _newFrontendShare) external onlyFeeChanger {
require(_newFrontendShare <= MAX_BPS, "IggySwap: Frontend share is greater than MAX_BPS");
frontendShare = _newFrontendShare;
}
function changeReferrerShare(uint256 _newReferrerShare) external onlyFeeChanger {
require(_newReferrerShare <= MAX_BPS, "IggySwap: Referrer share is greater than MAX_BPS");
referrerShare = _newReferrerShare;
}
function changeStakingShare(uint256 _newStakingShare) external onlyFeeChanger {
require(_newStakingShare <= MAX_BPS, "IggySwap: Staking share is greater than MAX_BPS");
stakingShare = _newStakingShare;
}
function changeSwapFee(uint256 _newSwapFee) external onlyFeeChanger {
require(_newSwapFee <= MAX_BPS, "IggySwap: Swap fee is greater than MAX_BPS");
swapFee = _newSwapFee;
}
// FRONTEND OWNER
/// @notice Change frontend address
function changeFrontendAddress(address _newFrontendAddress) external {
require(msg.sender == frontendAddress, "IggySwap: Sender is not the frontend owner");
frontendAddress = _newFrontendAddress;
}
// IGGY
/// @notice Change Iggy address
function changeIggyAddress(address _newIggyAddress) external {
require(msg.sender == iggyAddress, "IggySwap: Sender is not Iggy");
iggyAddress = _newIggyAddress;
}
// OWNER
/// @notice Change router address
function changeRouterAddress(address _newRouterAddress) external onlyManagerOrOwner {
routerAddress = _newRouterAddress;
}
/// @notice Change staking address
function changeStakingAddress(address _newStakingAddress) external onlyManagerOrOwner {
stakingAddress = _newStakingAddress;
}
/// @notice Change stats address
function changeStatsAddress(address _newStatsAddress) external onlyManagerOrOwner {
statsAddress = _newStatsAddress;
}
/// @notice Recover any ERC-20 token mistakenly sent to this contract address
function recoverERC20(address tokenAddress_, uint256 tokenAmount_, address recipient_) external onlyManagerOrOwner {
IERC20(tokenAddress_).safeTransfer(recipient_, tokenAmount_);
}
/// @notice Recover native coins from contract
function recoverETH() external onlyManagerOrOwner {
(bool success, ) = owner().call{value: address(this).balance}("");
require(success, "Failed to recover native coins from contract");
}
// INTERNAL - READ
function _getFeeAmount(uint _amount) internal view returns (uint) {
return (_amount * swapFee) / MAX_BPS;
}
// fetches and sorts the reserves for a pair
function _getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
(address token0,) = _sortTokens(tokenA, tokenB);
address pair = IUniswapV2Factory(factory).getPair(tokenA, tokenB);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(pair).getReserves();
(reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
}
function _getTokensAmountOut(
uint amountIn,
address[] memory path
) internal view returns(uint[] memory amounts) {
if (path[0] == address(0)) {
path[0] = wethAddress;
}
if (path[path.length - 1] == address(0)) {
path[path.length - 1] = wethAddress;
}
return IUniswapV2Router02(routerAddress).getAmountsOut(amountIn, path);
}
function _sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');
}
// INTERNAL - WRITE
function _swap(
uint amountIn,
uint amountOutMin, // amount out deducted by slippage
address[] memory path,
address to,
uint deadline,
address referrer,
bool convertToNative
) internal returns (uint[] memory amounts) {
IERC20(path[0]).approve(routerAddress, amountIn); // approve router to spend tokens
// make the swap via router
amounts = IUniswapV2Router02(routerAddress).swapExactTokensForTokens(
amountIn,
amountOutMin,
path,
address(this), // initially the receiver is this contract (tokens will be later transferred to the recipient and to fee receivers)
deadline
);
uint256 _amountOut = amounts[amounts.length - 1]; // total amount out (including fee)
uint256 _feeAmount = _getFeeAmount(_amountOut); // swap fee amount
require((_amountOut - _feeAmount) >= amountOutMin, "IggySwap: Amount out is less than the minimum amount out");
address tokenOut = path[path.length - 1]; // receiving token address
// transfer tokens to the recipient (deduct the fee)
if (convertToNative && tokenOut == wethAddress) {
// if: tokenOut is the native coin (ETH)
IWETH(tokenOut).withdraw(_amountOut); // convert WETH to ETH
(bool sentWeth, ) = to.call{value: (_amountOut - _feeAmount)}("");
require(sentWeth, "Failed to send native coins to the recipient");
// if there's a referrer, send them a share of the fee
uint256 referrerShareAmountNative;
if (referrer != address(0) && referrerShare > 0) {
referrerShareAmountNative = (_feeAmount * referrerShare) / MAX_BPS;
(bool sentWethReferrer, ) = referrer.call{value: referrerShareAmountNative}("");
require(sentWethReferrer, "Failed to send native coins to the referrer");
_feeAmount -= referrerShareAmountNative; // deduct referrer's share from the fee
if (statsAddress != address(0)) {
IStats(statsAddress).addWeiSpent(referrer, referrerShareAmountNative); // add referrer's share to stats
}
}
// if there's a staking contract, send them a share of the fee
if (stakingAddress != address(0) && stakingShare > 0) {
uint256 stakingShareAmountNative = (_feeAmount * stakingShare) / MAX_BPS;
(bool sentWethStaking, ) = stakingAddress.call{value: stakingShareAmountNative}("");
require(sentWethStaking, "Failed to send native coins to the staking contract");
_feeAmount -= stakingShareAmountNative; // deduct staking contract's share from the fee
}
// send a share of the fee to the frontend operator
if (frontendAddress != address(0) && frontendShare > 0) {
uint256 frontendShareAmountNative = (_feeAmount * frontendShare) / MAX_BPS;
(bool sentWethFrontend, ) = frontendAddress.call{value: frontendShareAmountNative}("");
require(sentWethFrontend, "Failed to send native coins to the frontend operator");
}
// send the rest to Iggy
(bool sentWethIggy, ) = iggyAddress.call{value: address(this).balance}("");
require(sentWethIggy, "Failed to send native coins to Iggy");
// add user's fee (without referral's share) to stats
if (statsAddress != address(0)) {
IStats(statsAddress).addWeiSpent(to, _feeAmount-referrerShareAmountNative);
}
} else {
// else: tokenOut is NOT the native coin
IERC20(tokenOut).safeTransfer(to, (_amountOut - _feeAmount));
// if there's a referrer, send them a share of the fee
if (referrer != address(0) && referrerShare > 0) {
uint256 referrerShareAmount = (_feeAmount * referrerShare) / MAX_BPS;
IERC20(tokenOut).safeTransfer(referrer, referrerShareAmount);
_feeAmount -= referrerShareAmount; // deduct referrer's share from the fee
}
// note that staking share is not taken here, because staking contract only accepts native coins (ETH)
if (frontendAddress != address(0) && frontendShare > 0) {
// calculate frontend and iggy fee share amounts
uint256 frontendShareAmount = (_feeAmount * frontendShare) / MAX_BPS;
// transfer tokens to fee receivers
IERC20(tokenOut).safeTransfer(frontendAddress, frontendShareAmount); // send part of the fee to the frontend operator
}
// find the remaining balance of tokenOut (to avoid leaving dust in the contract)
uint256 tokenOutRemainingBalance = IERC20(tokenOut).balanceOf(address(this));
// send the rest of the fee to iggy
IERC20(tokenOut).safeTransfer(iggyAddress, tokenOutRemainingBalance);
}
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.17;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
/**
@title Extended Ownable contract with managers functionality
@author Tempe Techie
*/
abstract contract OwnableWithManagers is Ownable {
address[] public managers; // array of managers
mapping (address => bool) public isManager; // mapping of managers
// MODIFIERS
modifier onlyManagerOrOwner() {
require(isManager[msg.sender] || msg.sender == owner(), "OwnableWithManagers: caller is not a manager or owner");
_;
}
// EVENTS
event ManagerAdd(address indexed owner_, address indexed manager_);
event ManagerRemove(address indexed owner_, address indexed manager_);
// READ
function getManagers() external view returns (address[] memory) {
return managers;
}
function getManagersLength() external view returns (uint256) {
return managers.length;
}
// MANAGER
function removeYourselfAsManager() external onlyManagerOrOwner {
address manager_ = msg.sender;
isManager[manager_] = false;
uint256 length = managers.length;
for (uint256 i = 0; i < length;) {
if (managers[i] == manager_) {
managers[i] = managers[length - 1];
managers.pop();
emit ManagerRemove(msg.sender, manager_);
return;
}
unchecked {
i++;
}
}
}
// OWNER
function addManager(address manager_) external onlyOwner {
require(!isManager[manager_], "OwnableWithManagers: manager already added");
isManager[manager_] = true;
managers.push(manager_);
emit ManagerAdd(msg.sender, manager_);
}
function removeManagerByAddress(address manager_) external onlyOwner {
isManager[manager_] = false;
uint256 length = managers.length;
for (uint256 i = 0; i < length;) {
if (managers[i] == manager_) {
managers[i] = managers[length - 1];
managers.pop();
emit ManagerRemove(msg.sender, manager_);
return;
}
unchecked {
i++;
}
}
}
function removeManagerByIndex(uint256 index_) external onlyOwner {
emit ManagerRemove(msg.sender, managers[index_]);
isManager[managers[index_]] = false;
managers[index_] = managers[managers.length - 1];
managers.pop();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0-rc.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0-rc.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
* 0 before setting it to a non-zero value.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0-rc.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0-rc.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0-rc.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_frontendAddress","type":"address"},{"internalType":"address","name":"_iggyAddress","type":"address"},{"internalType":"address","name":"_routerAddress","type":"address"},{"internalType":"address","name":"_stakingAddress","type":"address"},{"internalType":"address","name":"_statsAddress","type":"address"},{"internalType":"uint256","name":"_swapFee","type":"uint256"},{"internalType":"uint256","name":"_stakingShare","type":"uint256"},{"internalType":"uint256","name":"_frontendShare","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner_","type":"address"},{"indexed":true,"internalType":"address","name":"manager_","type":"address"}],"name":"ManagerAdd","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner_","type":"address"},{"indexed":true,"internalType":"address","name":"manager_","type":"address"}],"name":"ManagerRemove","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"MAX_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"manager_","type":"address"}],"name":"addManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_liquidity","type":"uint256"}],"name":"calculateETHAndTokensToReceive","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addressToken","type":"address"},{"internalType":"uint256","name":"amountToken","type":"uint256"}],"name":"calculateETHForLiquidity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newFeeChangerAddress","type":"address"}],"name":"changeFeeChangerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newFrontendAddress","type":"address"}],"name":"changeFrontendAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newFrontendShare","type":"uint256"}],"name":"changeFrontendShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newIggyAddress","type":"address"}],"name":"changeIggyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newReferrerShare","type":"uint256"}],"name":"changeReferrerShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRouterAddress","type":"address"}],"name":"changeRouterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newStakingAddress","type":"address"}],"name":"changeStakingAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newStakingShare","type":"uint256"}],"name":"changeStakingShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newStatsAddress","type":"address"}],"name":"changeStatsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSwapFee","type":"uint256"}],"name":"changeSwapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeChangerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"frontendAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"frontendShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"getLpTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getManagers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getManagersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"getPriceImpact","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"iggyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"managers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress_","type":"address"},{"internalType":"uint256","name":"tokenAmount_","type":"uint256"},{"internalType":"address","name":"recipient_","type":"address"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"referrerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"manager_","type":"address"}],"name":"removeManagerByAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"removeManagerByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeYourselfAsManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"routerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"statsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"swapExactETHForTokensWithReferrer","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"swapExactTokensForETHWithReferrer","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"referrer","type":"address"}],"name":"swapExactTokensForTokensWithReferrer","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wethAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60a060405260506009556103e8600a55611f40600b55611388600c553480156200002857600080fd5b5060405162004927380380620049278339810160408190526200004b91620001b1565b620000563362000144565b600480546001600160a01b03808b166001600160a01b0319928316178355600580548b8316908416179055600680548a83169084168117909155600780548a841690851617905560088054928916928416929092179091556009869055600b859055600c849055600380549092163317909155604080516315ab88c960e31b81529051919263ad5c46489282820192602092908290030181865afa15801562000103573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012991906200023e565b6001600160a01b031660805250620002639650505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001ac57600080fd5b919050565b600080600080600080600080610100898b031215620001cf57600080fd5b620001da8962000194565b9750620001ea60208a0162000194565b9650620001fa60408a0162000194565b95506200020a60608a0162000194565b94506200021a60808a0162000194565b935060a0890151925060c0890151915060e089015190509295985092959890939650565b6000602082840312156200025157600080fd5b6200025c8262000194565b9392505050565b60805161462a620002fd60003960008181610521015281816109cd01528181610dc90152818161103a015281816110bd01528181611324015281816113b0015281816113e2015281816117cf01528181611877015281816118fe015281816119a601528181611fb601528181611fe8015281816126b00152818161274c01528181612c090152818161369f0152613734015261462a6000f3fe6080604052600436106102cd5760003560e01c806381db0a4911610175578063cf42feac116100dc578063ebb27cf211610095578063f3ae24151161006f578063f3ae24151461089c578063f559b275146108dc578063f883a696146108fc578063fd967f471461091c57600080fd5b8063ebb27cf214610849578063f2fde38b14610869578063f305d7191461088957600080fd5b8063cf42feac14610779578063d06ca61f14610799578063d570fb34146107b9578063d7b4be24146107ce578063e34cbb78146107ee578063e8e337001461080e57600080fd5b8063a8d088bb1161012e578063a8d088bb146106c2578063b51609b4146106e4578063b6dcc2d714610704578063b700230914610724578063b99420e914610739578063baa2abde1461075957600080fd5b806381db0a49146106185780638da5cb5b146106385780638df0e5741461065657806399903bc214610676578063a23d00b114610696578063a50f13d8146106ac57600080fd5b8063350b0553116102345780635ab5de8a116101ed578063715018a6116101c7578063715018a6146105c757806372518df5146105dc57806373361063146105f25780637ff36ab51461060557600080fd5b80635ab5de8a14610567578063632a40c614610587578063696c6131146105a757600080fd5b8063350b05531461048f57806338ed1739146104af5780633941456c146104cf5780633d39c260146104ef5780634f0e0ef31461050f57806354cf2aeb1461054357600080fd5b80632d06177a116102865780632d06177a146103b75780632d46f2ba146103d75780632e2b469b146103f75780632f22d2dc1461042f578063325db6201461044f5780633268cc561461046f57600080fd5b806302751cec146102d957806304db6e68146103135780630614117a14610335578063069c9f761461034a57806318cbafe51461036a5780632125959b1461039757600080fd5b366102d457005b600080fd5b3480156102e557600080fd5b506102f96102f4366004613a91565b610932565b604080519283526020830191909152015b60405180910390f35b34801561031f57600080fd5b5061033361032e366004613aef565b610b61565b005b34801561034157600080fd5b50610333610bd0565b34801561035657600080fd5b50610333610365366004613aef565b610ccf565b34801561037657600080fd5b5061038a610385366004613beb565b610d4b565b60405161030a9190613c56565b3480156103a357600080fd5b506103336103b2366004613aef565b610e43565b3480156103c357600080fd5b506103336103d2366004613aef565b610e8f565b3480156103e357600080fd5b506102f96103f2366004613c9a565b610f9f565b34801561040357600080fd5b50600354610417906001600160a01b031681565b6040516001600160a01b03909116815260200161030a565b34801561043b57600080fd5b5061033361044a366004613cc6565b61122d565b34801561045b57600080fd5b5061038a61046a366004613cdf565b6112c7565b34801561047b57600080fd5b50600654610417906001600160a01b031681565b34801561049b57600080fd5b506104176104aa366004613d5f565b61139e565b3480156104bb57600080fd5b5061038a6104ca366004613ddd565b6114f8565b3480156104db57600080fd5b50600454610417906001600160a01b031681565b3480156104fb57600080fd5b5061041761050a366004613cc6565b61157b565b34801561051b57600080fd5b506104177f000000000000000000000000000000000000000000000000000000000000000081565b34801561054f57600080fd5b5061055960095481565b60405190815260200161030a565b34801561057357600080fd5b50610333610582366004613aef565b6115a5565b34801561059357600080fd5b50600854610417906001600160a01b031681565b3480156105b357600080fd5b506103336105c2366004613cc6565b611703565b3480156105d357600080fd5b50610333611797565b3480156105e857600080fd5b50610559600c5481565b61038a610600366004613e50565b6117ab565b61038a610613366004613ec8565b6118da565b34801561062457600080fd5b50610333610633366004613aef565b611a12565b34801561064457600080fd5b506000546001600160a01b0316610417565b34801561066257600080fd5b50610333610671366004613cc6565b611a78565b34801561068257600080fd5b50610333610691366004613aef565b611b12565b3480156106a257600080fd5b50610559600a5481565b3480156106b857600080fd5b50610559600b5481565b3480156106ce57600080fd5b506106d7611ba1565b60405161030a9190613f6d565b3480156106f057600080fd5b506103336106ff366004613f80565b611c03565b34801561071057600080fd5b5061033361071f366004613aef565b611c5b565b34801561073057600080fd5b50610333611cc1565b34801561074557600080fd5b50600554610417906001600160a01b031681565b34801561076557600080fd5b506102f9610774366004613fc2565b611d74565b34801561078557600080fd5b50610559610794366004614034565b611fa4565b3480156107a557600080fd5b5061038a6107b4366004614075565b612109565b3480156107c557600080fd5b50600154610559565b3480156107da57600080fd5b50600754610417906001600160a01b031681565b3480156107fa57600080fd5b5061038a6108093660046140bc565b6121a8565b34801561081a57600080fd5b5061082e610829366004614143565b612211565b6040805193845260208401929092529082015260600161030a565b34801561085557600080fd5b50610333610864366004613cc6565b6123e6565b34801561087557600080fd5b50610333610884366004613aef565b61247f565b61082e610897366004613a91565b6124f5565b3480156108a857600080fd5b506108cc6108b7366004613aef565b60026020526000908152604090205460ff1681565b604051901515815260200161030a565b3480156108e857600080fd5b506105596108f7366004613c9a565b612617565b34801561090857600080fd5b50610333610917366004613cc6565b61283d565b34801561092857600080fd5b5061055961271081565b6000806000600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561098a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ae91906141bf565b60405163e6a4390560e01b81526001600160a01b038b811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015291925060009183169063e6a4390590604401602060405180830381865afa158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4691906141bf565b9050610a5d6001600160a01b03821633308c612994565b60065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018b90529082169063095ea7b3906044016020604051808303816000875af1158015610ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad491906141dc565b50600654604051629d473b60e21b81526001600160a01b03909116906302751cec90610b0e908d908d908d908d908d908d906004016141fe565b60408051808303816000875af1158015610b2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b509190614239565b909b909a5098505050505050505050565b3360009081526002602052604090205460ff1680610b8957506000546001600160a01b031633145b610bae5760405162461bcd60e51b8152600401610ba59061425d565b60405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526002602052604090205460ff1680610bf857506000546001600160a01b031633145b610c145760405162461bcd60e51b8152600401610ba59061425d565b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610c61576040519150601f19603f3d011682016040523d82523d6000602084013e610c66565b606091505b5050905080610ccc5760405162461bcd60e51b815260206004820152602c60248201527f4661696c656420746f207265636f766572206e617469766520636f696e73206660448201526b1c9bdb4818dbdb9d1c9858dd60a21b6064820152608401610ba5565b50565b6005546001600160a01b03163314610d295760405162461bcd60e51b815260206004820152601c60248201527f49676779537761703a2053656e646572206973206e6f742049676779000000006044820152606401610ba5565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6060610d8733308887600081518110610d6657610d666142b2565b60200260200101516001600160a01b0316612994909392919063ffffffff16565b60006001600160a01b03168460018651610da191906142de565b81518110610db157610db16142b2565b60200260200101516001600160a01b031603610e28577f00000000000000000000000000000000000000000000000000000000000000008460018651610df791906142de565b81518110610e0757610e076142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b610e39868686868660006001612a05565b9695505050505050565b6003546001600160a01b03163314610e6d5760405162461bcd60e51b8152600401610ba5906142f1565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b610e9761335d565b6001600160a01b03811660009081526002602052604090205460ff1615610f135760405162461bcd60e51b815260206004820152602a60248201527f4f776e61626c65576974684d616e61676572733a206d616e6167657220616c726044820152691958591e48185919195960b21b6064820152608401610ba5565b6001600160a01b038116600081815260026020526040808220805460ff19166001908117909155805480820182559083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b031916841790555133917ffef4b799044e6259138adfd04ab1cca8b2442cc484dd25672ae344fa8a9e208b91a350565b6000806000600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101b91906141bf565b60405163e6a4390560e01b81526001600160a01b0387811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015291925060009183169063e6a4390590604401602060405180830381865afa15801561108f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b391906141bf565b905060006110e1877f00000000000000000000000000000000000000000000000000000000000000006133b7565b509050600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015611125573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111499190614354565b506001600160701b031691506001600160701b03169150600080846001600160a01b03168b6001600160a01b031614611183578284611186565b83835b915091506000866001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ee9190614399565b9050806111fb8c856143b2565b61120591906143c9565b9950806112128c846143b2565b61121c91906143c9565b985050505050505050509250929050565b6003546001600160a01b031633146112575760405162461bcd60e51b8152600401610ba5906142f1565b6127108111156112c25760405162461bcd60e51b815260206004820152603060248201527f49676779537761703a2046726f6e74656e64207368617265206973206772656160448201526f746572207468616e204d41585f42505360801b6064820152608401610ba5565b600c55565b60606112e233308988600081518110610d6657610d666142b2565b60006001600160a01b031685600187516112fc91906142de565b8151811061130c5761130c6142b2565b60200260200101516001600160a01b031603611383577f0000000000000000000000000000000000000000000000000000000000000000856001875161135291906142de565b81518110611362576113626142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b6113938787878787876001612a05565b979650505050505050565b60006001600160a01b0383166113d2577f000000000000000000000000000000000000000000000000000000000000000092505b6001600160a01b038216611404577f000000000000000000000000000000000000000000000000000000000000000091505b600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147b91906141bf565b60405163e6a4390560e01b81526001600160a01b0385811660048301528481166024830152919091169063e6a4390590604401602060405180830381865afa1580156114cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ef91906141bf565b90505b92915050565b606061153933308988886000818110611513576115136142b2565b90506020020160208101906115289190613aef565b6001600160a01b0316929190612994565b611393878787878080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a9350899250905080612a05565b6001818154811061158b57600080fd5b6000918252602090912001546001600160a01b0316905081565b6115ad61335d565b6001600160a01b0381166000908152600260205260408120805460ff19169055600154905b818110156116fe57826001600160a01b0316600182815481106115f7576115f76142b2565b6000918252602090912001546001600160a01b0316036116f657600161161d81846142de565b8154811061162d5761162d6142b2565b600091825260209091200154600180546001600160a01b039092169183908110611659576116596142b2565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001805480611698576116986143eb565b600082815260208120820160001990810180546001600160a01b03191690559091019091556040516001600160a01b0385169133917fc322b4d5159f72837eec184e14dde68867f91c6da39449fb9829f42121fc704d9190a3505050565b6001016115d2565b505050565b6003546001600160a01b0316331461172d5760405162461bcd60e51b8152600401610ba5906142f1565b6127108111156117925760405162461bcd60e51b815260206004820152602a60248201527f49676779537761703a2053776170206665652069732067726561746572207468604482015269616e204d41585f42505360b01b6064820152608401610ba5565b600955565b61179f61335d565b6117a960006134ae565b565b6060600034116117cd5760405162461bcd60e51b8152600401610ba590614401565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561182857600080fd5b505af115801561183c573d6000803e3d6000fd5b505050505060006001600160a01b03168560008151811061185f5761185f6142b2565b60200260200101516001600160a01b0316036118ca577f0000000000000000000000000000000000000000000000000000000000000000856000815181106118a9576118a96142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b610e393487878787876000612a05565b6060600034116118fc5760405162461bcd60e51b8152600401610ba590614401565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561195757600080fd5b505af115801561196b573d6000803e3d6000fd5b505050505060006001600160a01b03168460008151811061198e5761198e6142b2565b60200260200101516001600160a01b0316036119f9577f0000000000000000000000000000000000000000000000000000000000000000846000815181106119d8576119d86142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b611a093486868686600080612a05565b95945050505050565b3360009081526002602052604090205460ff1680611a3a57506000546001600160a01b031633145b611a565760405162461bcd60e51b8152600401610ba59061425d565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314611aa25760405162461bcd60e51b8152600401610ba5906142f1565b612710811115611b0d5760405162461bcd60e51b815260206004820152603060248201527f49676779537761703a205265666572726572207368617265206973206772656160448201526f746572207468616e204d41585f42505360801b6064820152608401610ba5565b600a55565b6004546001600160a01b03163314611b7f5760405162461bcd60e51b815260206004820152602a60248201527f49676779537761703a2053656e646572206973206e6f74207468652066726f6e6044820152693a32b7321037bbb732b960b11b6064820152608401610ba5565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60606001805480602002602001604051908101604052809291908181526020018280548015611bf957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bdb575b5050505050905090565b3360009081526002602052604090205460ff1680611c2b57506000546001600160a01b031633145b611c475760405162461bcd60e51b8152600401610ba59061425d565b6116fe6001600160a01b03841682846134fe565b3360009081526002602052604090205460ff1680611c8357506000546001600160a01b031633145b611c9f5760405162461bcd60e51b8152600401610ba59061425d565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526002602052604090205460ff1680611ce957506000546001600160a01b031633145b611d055760405162461bcd60e51b8152600401610ba59061425d565b336000818152600260205260408120805460ff19169055600154905b818110156116fe57826001600160a01b031660018281548110611d4657611d466142b2565b6000918252602090912001546001600160a01b031603611d6c57600161161d81846142de565b600101611d21565b6000806000600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df091906141bf565b60405163e6a4390560e01b81526001600160a01b038c811660048301528b8116602483015291925060009183169063e6a4390590604401602060405180830381865afa158015611e44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6891906141bf565b9050611e7f6001600160a01b03821633308c612994565b60065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018b90529082169063095ea7b3906044016020604051808303816000875af1158015611ed2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef691906141dc565b50600654604051635d5155ef60e11b81526001600160a01b038d811660048301528c81166024830152604482018c9052606482018b9052608482018a905288811660a483015260c482018890529091169063baa2abde9060e40160408051808303816000875af1158015611f6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f929190614239565b909c909b509950505050505050505050565b60006001600160a01b038416611fd8577f000000000000000000000000000000000000000000000000000000000000000093505b6001600160a01b03831661200a577f000000000000000000000000000000000000000000000000000000000000000092505b826001600160a01b0316846001600160a01b03160361202b57506000612102565b6006546040805163c45a015560e01b815290516000926001600160a01b03169163c45a01559160048083019260209291908290030181865afa158015612075573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209991906141bf565b90506000806120a983888861352e565b909250905060006120ba82846143b2565b905060006120c88785614445565b6120d290836143c9565b905060006120e082856142de565b9050816120ef612710836143b2565b6120f991906143c9565b96505050505050505b9392505050565b60606121158383613667565b9050612146816001835161212991906142de565b81518110612139576121396142b2565b602002602001015161380a565b816001835161215591906142de565b81518110612165576121656142b2565b602002602001015161217791906142de565b816001835161218691906142de565b81518110612196576121966142b2565b60200260200101818152505092915050565b60606121c333308a89896000818110611513576115136142b2565b612205888888888080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508b93508a9250899150612a05565b98975050505050505050565b6000808061222a6001600160a01b038c1633308c612994565b61223f6001600160a01b038b1633308b612994565b60065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018b9052908c169063095ea7b3906044016020604051808303816000875af1158015612292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b691906141dc565b5060065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018a9052908b169063095ea7b3906044016020604051808303816000875af115801561230a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232e91906141dc565b5060065460405162e8e33760e81b81526001600160a01b038d811660048301528c81166024830152604482018c9052606482018b9052608482018a905260a4820189905287811660c483015260e482018790529091169063e8e3370090610104016060604051808303816000875af11580156123ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d29190614458565b919d909c50909a5098505050505050505050565b6003546001600160a01b031633146124105760405162461bcd60e51b8152600401610ba5906142f1565b61271081111561247a5760405162461bcd60e51b815260206004820152602f60248201527f49676779537761703a205374616b696e6720736861726520697320677265617460448201526e6572207468616e204d41585f42505360881b6064820152608401610ba5565b600b55565b61248761335d565b6001600160a01b0381166124ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ba5565b610ccc816134ae565b6000808061250e6001600160a01b038a1633308b612994565b60065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018a9052908a169063095ea7b3906044016020604051808303816000875af1158015612561573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061258591906141dc565b5060065460405163f305d71960e01b81526001600160a01b039091169063f305d7199034906125c2908d908d908d908d908d908d906004016141fe565b60606040518083038185885af11580156125e0573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906126059190614458565b919b909a509098509650505050505050565b600080600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561266d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269191906141bf565b60405163e6a4390560e01b81526001600160a01b0386811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015291925060009183169063e6a4390590604401602060405180830381865afa158015612705573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272991906141bf565b90506001600160a01b038116612744576000925050506114f2565b6000612770867f00000000000000000000000000000000000000000000000000000000000000006133b7565b509050600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156127b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d89190614354565b506001600160701b031691506001600160701b03169150600080846001600160a01b03168a6001600160a01b031614612812578284612815565b83835b909250905081612825828b6143b2565b61282f91906143c9565b9a9950505050505050505050565b61284561335d565b60018181548110612858576128586142b2565b60009182526020822001546040516001600160a01b039091169133917fc322b4d5159f72837eec184e14dde68867f91c6da39449fb9829f42121fc704d9190a3600060026000600184815481106128b1576128b16142b2565b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff1916911515919091179055600180546128f49082906142de565b81548110612904576129046142b2565b600091825260209091200154600180546001600160a01b039092169183908110612930576129306142b2565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600180548061296f5761296f6143eb565b600082815260209020810160001990810180546001600160a01b031916905501905550565b6040516001600160a01b03808516602483015283166044820152606481018290526129ff9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613827565b50505050565b606085600081518110612a1a57612a1a6142b2565b602090810291909101015160065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018b905291169063095ea7b3906044016020604051808303816000875af1158015612a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9b91906141dc565b506006546040516338ed173960e01b81526001600160a01b03909116906338ed173990612ad4908b908b908b9030908b90600401614486565b6000604051808303816000875af1158015612af3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612b1b91908101906144c2565b905060008160018351612b2e91906142de565b81518110612b3e57612b3e6142b2565b602002602001015190506000612b538261380a565b905088612b6082846142de565b1015612bd45760405162461bcd60e51b815260206004820152603860248201527f49676779537761703a20416d6f756e74206f7574206973206c6573732074686160448201527f6e20746865206d696e696d756d20616d6f756e74206f757400000000000000006064820152608401610ba5565b60008860018a51612be591906142de565b81518110612bf557612bf56142b2565b60200260200101519050848015612c3d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316145b156131e957604051632e1a7d4d60e01b8152600481018490526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b158015612c8457600080fd5b505af1158015612c98573d6000803e3d6000fd5b505050506000886001600160a01b03168385612cb491906142de565b604051600081818185875af1925050503d8060008114612cf0576040519150601f19603f3d011682016040523d82523d6000602084013e612cf5565b606091505b5050905080612d495760405162461bcd60e51b815260206004820152602c60248201526000805160206145d583398151915260448201526b1a19481c9958da5c1a595b9d60a21b6064820152608401610ba5565b60006001600160a01b03881615801590612d6557506000600a54115b15612eb357612710600a5485612d7b91906143b2565b612d8591906143c9565b90506000886001600160a01b03168260405160006040518083038185875af1925050503d8060008114612dd4576040519150601f19603f3d011682016040523d82523d6000602084013e612dd9565b606091505b5050905080612e2c5760405162461bcd60e51b815260206004820152602b60248201526000805160206145d583398151915260448201526a3432903932b332b93932b960a91b6064820152608401610ba5565b612e3682866142de565b6008549095506001600160a01b031615612eb157600854604051630761f29d60e31b81526001600160a01b038b811660048301526024820185905290911690633b0f94e890604401600060405180830381600087803b158015612e9857600080fd5b505af1158015612eac573d6000803e3d6000fd5b505050505b505b6007546001600160a01b031615801590612ecf57506000600b54115b15612fb2576000612710600b5486612ee791906143b2565b612ef191906143c9565b6007546040519192506000916001600160a01b039091169083908381818185875af1925050503d8060008114612f43576040519150601f19603f3d011682016040523d82523d6000602084013e612f48565b606091505b5050905080612fa35760405162461bcd60e51b815260206004820152603360248201526000805160206145d58339815191526044820152721a19481cdd185ada5b99c818dbdb9d1c9858dd606a1b6064820152608401610ba5565b612fad82876142de565b955050505b6004546001600160a01b031615801590612fce57506000600c54115b156130a6576000612710600c5486612fe691906143b2565b612ff091906143c9565b6004546040519192506000916001600160a01b039091169083908381818185875af1925050503d8060008114613042576040519150601f19603f3d011682016040523d82523d6000602084013e613047565b606091505b50509050806130a35760405162461bcd60e51b815260206004820152603460248201526000805160206145d5833981519152604482015273343290333937b73a32b7321037b832b930ba37b960611b6064820152608401610ba5565b50505b6005546040516000916001600160a01b03169047908381818185875af1925050503d80600081146130f3576040519150601f19603f3d011682016040523d82523d6000602084013e6130f8565b606091505b50509050806131555760405162461bcd60e51b815260206004820152602360248201527f4661696c656420746f2073656e64206e617469766520636f696e7320746f204960448201526267677960e81b6064820152608401610ba5565b6008546001600160a01b0316156131e1576008546001600160a01b0316633b0f94e88c61318285896142de565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156131c857600080fd5b505af11580156131dc573d6000803e3d6000fd5b505050505b50505061334f565b613208886131f784866142de565b6001600160a01b03841691906134fe565b6001600160a01b0386161580159061322257506000600a54115b15613268576000612710600a548461323a91906143b2565b61324491906143c9565b905061325a6001600160a01b03831688836134fe565b61326481846142de565b9250505b6004546001600160a01b03161580159061328457506000600c54115b156132c5576000612710600c548461329c91906143b2565b6132a691906143c9565b6004549091506132c3906001600160a01b038481169116836134fe565b505b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561330c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133309190614399565b60055490915061334d906001600160a01b038481169116836134fe565b505b505050979650505050505050565b6000546001600160a01b031633146117a95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ba5565b600080826001600160a01b0316846001600160a01b0316036134295760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a204944454e544943414c5f41444452604482015264455353455360d81b6064820152608401610ba5565b826001600160a01b0316846001600160a01b03161061344957828461344c565b83835b90925090506001600160a01b0382166134a75760405162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f4144445245535300006044820152606401610ba5565b9250929050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0383166024820152604481018290526116fe90849063a9059cbb60e01b906064016129c8565b600080600061353d85856133b7565b5060405163e6a4390560e01b81526001600160a01b038781166004830152868116602483015291925060009188169063e6a4390590604401602060405180830381865afa158015613592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135b691906141bf565b9050600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156135f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061361d9190614354565b506001600160701b031691506001600160701b03169150836001600160a01b0316886001600160a01b031614613654578082613657565b81815b909a909950975050505050505050565b606060006001600160a01b031682600081518110613687576136876142b2565b60200260200101516001600160a01b0316036136f2577f0000000000000000000000000000000000000000000000000000000000000000826000815181106136d1576136d16142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b60006001600160a01b0316826001845161370c91906142de565b8151811061371c5761371c6142b2565b60200260200101516001600160a01b031603613793577f0000000000000000000000000000000000000000000000000000000000000000826001845161376291906142de565b81518110613772576137726142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b60065460405163d06ca61f60e01b81526001600160a01b039091169063d06ca61f906137c59086908690600401614548565b600060405180830381865afa1580156137e2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114ef91908101906144c2565b60006127106009548361381d91906143b2565b6114f291906143c9565b600061387c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166138fc9092919063ffffffff16565b905080516000148061389d57508080602001905181019061389d91906141dc565b6116fe5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ba5565b606061390b8484600085613913565b949350505050565b6060824710156139745760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ba5565b600080866001600160a01b031685876040516139909190614585565b60006040518083038185875af1925050503d80600081146139cd576040519150601f19603f3d011682016040523d82523d6000602084013e6139d2565b606091505b50915091506113938783838760608315613a4d578251600003613a46576001600160a01b0385163b613a465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ba5565b508161390b565b61390b8383815115613a625781518083602001fd5b8060405162461bcd60e51b8152600401610ba591906145a1565b6001600160a01b0381168114610ccc57600080fd5b60008060008060008060c08789031215613aaa57600080fd5b8635613ab581613a7c565b95506020870135945060408701359350606087013592506080870135613ada81613a7c565b8092505060a087013590509295509295509295565b600060208284031215613b0157600080fd5b813561210281613a7c565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613b4b57613b4b613b0c565b604052919050565b600067ffffffffffffffff821115613b6d57613b6d613b0c565b5060051b60200190565b600082601f830112613b8857600080fd5b81356020613b9d613b9883613b53565b613b22565b82815260059290921b84018101918181019086841115613bbc57600080fd5b8286015b84811015613be0578035613bd381613a7c565b8352918301918301613bc0565b509695505050505050565b600080600080600060a08688031215613c0357600080fd5b8535945060208601359350604086013567ffffffffffffffff811115613c2857600080fd5b613c3488828901613b77565b9350506060860135613c4581613a7c565b949793965091946080013592915050565b6020808252825182820181905260009190848201906040850190845b81811015613c8e57835183529284019291840191600101613c72565b50909695505050505050565b60008060408385031215613cad57600080fd5b8235613cb881613a7c565b946020939093013593505050565b600060208284031215613cd857600080fd5b5035919050565b60008060008060008060c08789031215613cf857600080fd5b8635955060208701359450604087013567ffffffffffffffff811115613d1d57600080fd5b613d2989828a01613b77565b9450506060870135613d3a81613a7c565b92506080870135915060a0870135613d5181613a7c565b809150509295509295509295565b60008060408385031215613d7257600080fd5b8235613d7d81613a7c565b91506020830135613d8d81613a7c565b809150509250929050565b60008083601f840112613daa57600080fd5b50813567ffffffffffffffff811115613dc257600080fd5b6020830191508360208260051b85010111156134a757600080fd5b60008060008060008060a08789031215613df657600080fd5b8635955060208701359450604087013567ffffffffffffffff811115613e1b57600080fd5b613e2789828a01613d98565b9095509350506060870135613e3b81613a7c565b80925050608087013590509295509295509295565b600080600080600060a08688031215613e6857600080fd5b85359450602086013567ffffffffffffffff811115613e8657600080fd5b613e9288828901613b77565b9450506040860135613ea381613a7c565b9250606086013591506080860135613eba81613a7c565b809150509295509295909350565b60008060008060808587031215613ede57600080fd5b84359350602085013567ffffffffffffffff811115613efc57600080fd5b613f0887828801613b77565b9350506040850135613f1981613a7c565b9396929550929360600135925050565b600081518084526020808501945080840160005b83811015613f625781516001600160a01b031687529582019590820190600101613f3d565b509495945050505050565b6020815260006114ef6020830184613f29565b600080600060608486031215613f9557600080fd5b8335613fa081613a7c565b9250602084013591506040840135613fb781613a7c565b809150509250925092565b600080600080600080600060e0888a031215613fdd57600080fd5b8735613fe881613a7c565b96506020880135613ff881613a7c565b955060408801359450606088013593506080880135925060a088013561401d81613a7c565b8092505060c0880135905092959891949750929550565b60008060006060848603121561404957600080fd5b833561405481613a7c565b9250602084013561406481613a7c565b929592945050506040919091013590565b6000806040838503121561408857600080fd5b82359150602083013567ffffffffffffffff8111156140a657600080fd5b6140b285828601613b77565b9150509250929050565b600080600080600080600060c0888a0312156140d757600080fd5b8735965060208801359550604088013567ffffffffffffffff8111156140fc57600080fd5b6141088a828b01613d98565b909650945050606088013561411c81613a7c565b92506080880135915060a088013561413381613a7c565b8091505092959891949750929550565b600080600080600080600080610100898b03121561416057600080fd5b883561416b81613a7c565b9750602089013561417b81613a7c565b965060408901359550606089013594506080890135935060a0890135925060c08901356141a781613a7c565b8092505060e089013590509295985092959890939650565b6000602082840312156141d157600080fd5b815161210281613a7c565b6000602082840312156141ee57600080fd5b8151801515811461210257600080fd5b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b6000806040838503121561424c57600080fd5b505080516020909101519092909150565b60208082526035908201527f4f776e61626c65576974684d616e61676572733a2063616c6c6572206973206e60408201527437ba10309036b0b730b3b2b91037b91037bbb732b960591b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156114f2576114f26142c8565b60208082526027908201527f49676779537761703a2053656e646572206973206e6f7420746865204665652060408201526621b430b733b2b960c91b606082015260800190565b80516001600160701b038116811461434f57600080fd5b919050565b60008060006060848603121561436957600080fd5b61437284614338565b925061438060208501614338565b9150604084015163ffffffff81168114613fb757600080fd5b6000602082840312156143ab57600080fd5b5051919050565b80820281158282048414176114f2576114f26142c8565b6000826143e657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b60208082526024908201527f49676779537761703a204e617469766520636f696e20616d6f756e74206973206040820152637a65726f60e01b606082015260800190565b808201808211156114f2576114f26142c8565b60008060006060848603121561446d57600080fd5b8351925060208401519150604084015190509250925092565b85815284602082015260a0604082015260006144a560a0830186613f29565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156144d557600080fd5b825167ffffffffffffffff8111156144ec57600080fd5b8301601f810185136144fd57600080fd5b805161450b613b9882613b53565b81815260059190911b8201830190838101908783111561452a57600080fd5b928401925b828410156113935783518252928401929084019061452f565b82815260406020820152600061390b6040830184613f29565b60005b8381101561457c578181015183820152602001614564565b50506000910152565b60008251614597818460208701614561565b9190910192915050565b60208152600082518060208401526145c0816040850160208701614561565b601f01601f1916919091016040019291505056fe4661696c656420746f2073656e64206e617469766520636f696e7320746f2074a2646970667358221220e4126536849e5b41709afba9bbb373199e30f2c67859f25ee003d1dd6a943ebf64736f6c634300081100330000000000000000000000001e7487b34cdef80536f70e085ac875d7b7cc6812000000000000000000000000e08033d0bdbcebe7e619c3ae165e7957ab577961000000000000000000000000d8ea8e35b2fcf37fcbd7933436b1a9b7ce7108bf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b61bed21a502519bf49da543f84ceefe0196dd2b000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001388
Deployed Bytecode
0x6080604052600436106102cd5760003560e01c806381db0a4911610175578063cf42feac116100dc578063ebb27cf211610095578063f3ae24151161006f578063f3ae24151461089c578063f559b275146108dc578063f883a696146108fc578063fd967f471461091c57600080fd5b8063ebb27cf214610849578063f2fde38b14610869578063f305d7191461088957600080fd5b8063cf42feac14610779578063d06ca61f14610799578063d570fb34146107b9578063d7b4be24146107ce578063e34cbb78146107ee578063e8e337001461080e57600080fd5b8063a8d088bb1161012e578063a8d088bb146106c2578063b51609b4146106e4578063b6dcc2d714610704578063b700230914610724578063b99420e914610739578063baa2abde1461075957600080fd5b806381db0a49146106185780638da5cb5b146106385780638df0e5741461065657806399903bc214610676578063a23d00b114610696578063a50f13d8146106ac57600080fd5b8063350b0553116102345780635ab5de8a116101ed578063715018a6116101c7578063715018a6146105c757806372518df5146105dc57806373361063146105f25780637ff36ab51461060557600080fd5b80635ab5de8a14610567578063632a40c614610587578063696c6131146105a757600080fd5b8063350b05531461048f57806338ed1739146104af5780633941456c146104cf5780633d39c260146104ef5780634f0e0ef31461050f57806354cf2aeb1461054357600080fd5b80632d06177a116102865780632d06177a146103b75780632d46f2ba146103d75780632e2b469b146103f75780632f22d2dc1461042f578063325db6201461044f5780633268cc561461046f57600080fd5b806302751cec146102d957806304db6e68146103135780630614117a14610335578063069c9f761461034a57806318cbafe51461036a5780632125959b1461039757600080fd5b366102d457005b600080fd5b3480156102e557600080fd5b506102f96102f4366004613a91565b610932565b604080519283526020830191909152015b60405180910390f35b34801561031f57600080fd5b5061033361032e366004613aef565b610b61565b005b34801561034157600080fd5b50610333610bd0565b34801561035657600080fd5b50610333610365366004613aef565b610ccf565b34801561037657600080fd5b5061038a610385366004613beb565b610d4b565b60405161030a9190613c56565b3480156103a357600080fd5b506103336103b2366004613aef565b610e43565b3480156103c357600080fd5b506103336103d2366004613aef565b610e8f565b3480156103e357600080fd5b506102f96103f2366004613c9a565b610f9f565b34801561040357600080fd5b50600354610417906001600160a01b031681565b6040516001600160a01b03909116815260200161030a565b34801561043b57600080fd5b5061033361044a366004613cc6565b61122d565b34801561045b57600080fd5b5061038a61046a366004613cdf565b6112c7565b34801561047b57600080fd5b50600654610417906001600160a01b031681565b34801561049b57600080fd5b506104176104aa366004613d5f565b61139e565b3480156104bb57600080fd5b5061038a6104ca366004613ddd565b6114f8565b3480156104db57600080fd5b50600454610417906001600160a01b031681565b3480156104fb57600080fd5b5061041761050a366004613cc6565b61157b565b34801561051b57600080fd5b506104177f000000000000000000000000530000000000000000000000000000000000000481565b34801561054f57600080fd5b5061055960095481565b60405190815260200161030a565b34801561057357600080fd5b50610333610582366004613aef565b6115a5565b34801561059357600080fd5b50600854610417906001600160a01b031681565b3480156105b357600080fd5b506103336105c2366004613cc6565b611703565b3480156105d357600080fd5b50610333611797565b3480156105e857600080fd5b50610559600c5481565b61038a610600366004613e50565b6117ab565b61038a610613366004613ec8565b6118da565b34801561062457600080fd5b50610333610633366004613aef565b611a12565b34801561064457600080fd5b506000546001600160a01b0316610417565b34801561066257600080fd5b50610333610671366004613cc6565b611a78565b34801561068257600080fd5b50610333610691366004613aef565b611b12565b3480156106a257600080fd5b50610559600a5481565b3480156106b857600080fd5b50610559600b5481565b3480156106ce57600080fd5b506106d7611ba1565b60405161030a9190613f6d565b3480156106f057600080fd5b506103336106ff366004613f80565b611c03565b34801561071057600080fd5b5061033361071f366004613aef565b611c5b565b34801561073057600080fd5b50610333611cc1565b34801561074557600080fd5b50600554610417906001600160a01b031681565b34801561076557600080fd5b506102f9610774366004613fc2565b611d74565b34801561078557600080fd5b50610559610794366004614034565b611fa4565b3480156107a557600080fd5b5061038a6107b4366004614075565b612109565b3480156107c557600080fd5b50600154610559565b3480156107da57600080fd5b50600754610417906001600160a01b031681565b3480156107fa57600080fd5b5061038a6108093660046140bc565b6121a8565b34801561081a57600080fd5b5061082e610829366004614143565b612211565b6040805193845260208401929092529082015260600161030a565b34801561085557600080fd5b50610333610864366004613cc6565b6123e6565b34801561087557600080fd5b50610333610884366004613aef565b61247f565b61082e610897366004613a91565b6124f5565b3480156108a857600080fd5b506108cc6108b7366004613aef565b60026020526000908152604090205460ff1681565b604051901515815260200161030a565b3480156108e857600080fd5b506105596108f7366004613c9a565b612617565b34801561090857600080fd5b50610333610917366004613cc6565b61283d565b34801561092857600080fd5b5061055961271081565b6000806000600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561098a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ae91906141bf565b60405163e6a4390560e01b81526001600160a01b038b811660048301527f00000000000000000000000053000000000000000000000000000000000000048116602483015291925060009183169063e6a4390590604401602060405180830381865afa158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4691906141bf565b9050610a5d6001600160a01b03821633308c612994565b60065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018b90529082169063095ea7b3906044016020604051808303816000875af1158015610ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad491906141dc565b50600654604051629d473b60e21b81526001600160a01b03909116906302751cec90610b0e908d908d908d908d908d908d906004016141fe565b60408051808303816000875af1158015610b2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b509190614239565b909b909a5098505050505050505050565b3360009081526002602052604090205460ff1680610b8957506000546001600160a01b031633145b610bae5760405162461bcd60e51b8152600401610ba59061425d565b60405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526002602052604090205460ff1680610bf857506000546001600160a01b031633145b610c145760405162461bcd60e51b8152600401610ba59061425d565b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610c61576040519150601f19603f3d011682016040523d82523d6000602084013e610c66565b606091505b5050905080610ccc5760405162461bcd60e51b815260206004820152602c60248201527f4661696c656420746f207265636f766572206e617469766520636f696e73206660448201526b1c9bdb4818dbdb9d1c9858dd60a21b6064820152608401610ba5565b50565b6005546001600160a01b03163314610d295760405162461bcd60e51b815260206004820152601c60248201527f49676779537761703a2053656e646572206973206e6f742049676779000000006044820152606401610ba5565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6060610d8733308887600081518110610d6657610d666142b2565b60200260200101516001600160a01b0316612994909392919063ffffffff16565b60006001600160a01b03168460018651610da191906142de565b81518110610db157610db16142b2565b60200260200101516001600160a01b031603610e28577f00000000000000000000000053000000000000000000000000000000000000048460018651610df791906142de565b81518110610e0757610e076142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b610e39868686868660006001612a05565b9695505050505050565b6003546001600160a01b03163314610e6d5760405162461bcd60e51b8152600401610ba5906142f1565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b610e9761335d565b6001600160a01b03811660009081526002602052604090205460ff1615610f135760405162461bcd60e51b815260206004820152602a60248201527f4f776e61626c65576974684d616e61676572733a206d616e6167657220616c726044820152691958591e48185919195960b21b6064820152608401610ba5565b6001600160a01b038116600081815260026020526040808220805460ff19166001908117909155805480820182559083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b031916841790555133917ffef4b799044e6259138adfd04ab1cca8b2442cc484dd25672ae344fa8a9e208b91a350565b6000806000600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101b91906141bf565b60405163e6a4390560e01b81526001600160a01b0387811660048301527f00000000000000000000000053000000000000000000000000000000000000048116602483015291925060009183169063e6a4390590604401602060405180830381865afa15801561108f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b391906141bf565b905060006110e1877f00000000000000000000000053000000000000000000000000000000000000046133b7565b509050600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015611125573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111499190614354565b506001600160701b031691506001600160701b03169150600080846001600160a01b03168b6001600160a01b031614611183578284611186565b83835b915091506000866001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ee9190614399565b9050806111fb8c856143b2565b61120591906143c9565b9950806112128c846143b2565b61121c91906143c9565b985050505050505050509250929050565b6003546001600160a01b031633146112575760405162461bcd60e51b8152600401610ba5906142f1565b6127108111156112c25760405162461bcd60e51b815260206004820152603060248201527f49676779537761703a2046726f6e74656e64207368617265206973206772656160448201526f746572207468616e204d41585f42505360801b6064820152608401610ba5565b600c55565b60606112e233308988600081518110610d6657610d666142b2565b60006001600160a01b031685600187516112fc91906142de565b8151811061130c5761130c6142b2565b60200260200101516001600160a01b031603611383577f0000000000000000000000005300000000000000000000000000000000000004856001875161135291906142de565b81518110611362576113626142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b6113938787878787876001612a05565b979650505050505050565b60006001600160a01b0383166113d2577f000000000000000000000000530000000000000000000000000000000000000492505b6001600160a01b038216611404577f000000000000000000000000530000000000000000000000000000000000000491505b600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147b91906141bf565b60405163e6a4390560e01b81526001600160a01b0385811660048301528481166024830152919091169063e6a4390590604401602060405180830381865afa1580156114cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ef91906141bf565b90505b92915050565b606061153933308988886000818110611513576115136142b2565b90506020020160208101906115289190613aef565b6001600160a01b0316929190612994565b611393878787878080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a9350899250905080612a05565b6001818154811061158b57600080fd5b6000918252602090912001546001600160a01b0316905081565b6115ad61335d565b6001600160a01b0381166000908152600260205260408120805460ff19169055600154905b818110156116fe57826001600160a01b0316600182815481106115f7576115f76142b2565b6000918252602090912001546001600160a01b0316036116f657600161161d81846142de565b8154811061162d5761162d6142b2565b600091825260209091200154600180546001600160a01b039092169183908110611659576116596142b2565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001805480611698576116986143eb565b600082815260208120820160001990810180546001600160a01b03191690559091019091556040516001600160a01b0385169133917fc322b4d5159f72837eec184e14dde68867f91c6da39449fb9829f42121fc704d9190a3505050565b6001016115d2565b505050565b6003546001600160a01b0316331461172d5760405162461bcd60e51b8152600401610ba5906142f1565b6127108111156117925760405162461bcd60e51b815260206004820152602a60248201527f49676779537761703a2053776170206665652069732067726561746572207468604482015269616e204d41585f42505360b01b6064820152608401610ba5565b600955565b61179f61335d565b6117a960006134ae565b565b6060600034116117cd5760405162461bcd60e51b8152600401610ba590614401565b7f00000000000000000000000053000000000000000000000000000000000000046001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561182857600080fd5b505af115801561183c573d6000803e3d6000fd5b505050505060006001600160a01b03168560008151811061185f5761185f6142b2565b60200260200101516001600160a01b0316036118ca577f0000000000000000000000005300000000000000000000000000000000000004856000815181106118a9576118a96142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b610e393487878787876000612a05565b6060600034116118fc5760405162461bcd60e51b8152600401610ba590614401565b7f00000000000000000000000053000000000000000000000000000000000000046001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561195757600080fd5b505af115801561196b573d6000803e3d6000fd5b505050505060006001600160a01b03168460008151811061198e5761198e6142b2565b60200260200101516001600160a01b0316036119f9577f0000000000000000000000005300000000000000000000000000000000000004846000815181106119d8576119d86142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b611a093486868686600080612a05565b95945050505050565b3360009081526002602052604090205460ff1680611a3a57506000546001600160a01b031633145b611a565760405162461bcd60e51b8152600401610ba59061425d565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314611aa25760405162461bcd60e51b8152600401610ba5906142f1565b612710811115611b0d5760405162461bcd60e51b815260206004820152603060248201527f49676779537761703a205265666572726572207368617265206973206772656160448201526f746572207468616e204d41585f42505360801b6064820152608401610ba5565b600a55565b6004546001600160a01b03163314611b7f5760405162461bcd60e51b815260206004820152602a60248201527f49676779537761703a2053656e646572206973206e6f74207468652066726f6e6044820152693a32b7321037bbb732b960b11b6064820152608401610ba5565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60606001805480602002602001604051908101604052809291908181526020018280548015611bf957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bdb575b5050505050905090565b3360009081526002602052604090205460ff1680611c2b57506000546001600160a01b031633145b611c475760405162461bcd60e51b8152600401610ba59061425d565b6116fe6001600160a01b03841682846134fe565b3360009081526002602052604090205460ff1680611c8357506000546001600160a01b031633145b611c9f5760405162461bcd60e51b8152600401610ba59061425d565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526002602052604090205460ff1680611ce957506000546001600160a01b031633145b611d055760405162461bcd60e51b8152600401610ba59061425d565b336000818152600260205260408120805460ff19169055600154905b818110156116fe57826001600160a01b031660018281548110611d4657611d466142b2565b6000918252602090912001546001600160a01b031603611d6c57600161161d81846142de565b600101611d21565b6000806000600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df091906141bf565b60405163e6a4390560e01b81526001600160a01b038c811660048301528b8116602483015291925060009183169063e6a4390590604401602060405180830381865afa158015611e44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6891906141bf565b9050611e7f6001600160a01b03821633308c612994565b60065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018b90529082169063095ea7b3906044016020604051808303816000875af1158015611ed2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef691906141dc565b50600654604051635d5155ef60e11b81526001600160a01b038d811660048301528c81166024830152604482018c9052606482018b9052608482018a905288811660a483015260c482018890529091169063baa2abde9060e40160408051808303816000875af1158015611f6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f929190614239565b909c909b509950505050505050505050565b60006001600160a01b038416611fd8577f000000000000000000000000530000000000000000000000000000000000000493505b6001600160a01b03831661200a577f000000000000000000000000530000000000000000000000000000000000000492505b826001600160a01b0316846001600160a01b03160361202b57506000612102565b6006546040805163c45a015560e01b815290516000926001600160a01b03169163c45a01559160048083019260209291908290030181865afa158015612075573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209991906141bf565b90506000806120a983888861352e565b909250905060006120ba82846143b2565b905060006120c88785614445565b6120d290836143c9565b905060006120e082856142de565b9050816120ef612710836143b2565b6120f991906143c9565b96505050505050505b9392505050565b60606121158383613667565b9050612146816001835161212991906142de565b81518110612139576121396142b2565b602002602001015161380a565b816001835161215591906142de565b81518110612165576121656142b2565b602002602001015161217791906142de565b816001835161218691906142de565b81518110612196576121966142b2565b60200260200101818152505092915050565b60606121c333308a89896000818110611513576115136142b2565b612205888888888080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508b93508a9250899150612a05565b98975050505050505050565b6000808061222a6001600160a01b038c1633308c612994565b61223f6001600160a01b038b1633308b612994565b60065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018b9052908c169063095ea7b3906044016020604051808303816000875af1158015612292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b691906141dc565b5060065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018a9052908b169063095ea7b3906044016020604051808303816000875af115801561230a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232e91906141dc565b5060065460405162e8e33760e81b81526001600160a01b038d811660048301528c81166024830152604482018c9052606482018b9052608482018a905260a4820189905287811660c483015260e482018790529091169063e8e3370090610104016060604051808303816000875af11580156123ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d29190614458565b919d909c50909a5098505050505050505050565b6003546001600160a01b031633146124105760405162461bcd60e51b8152600401610ba5906142f1565b61271081111561247a5760405162461bcd60e51b815260206004820152602f60248201527f49676779537761703a205374616b696e6720736861726520697320677265617460448201526e6572207468616e204d41585f42505360881b6064820152608401610ba5565b600b55565b61248761335d565b6001600160a01b0381166124ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ba5565b610ccc816134ae565b6000808061250e6001600160a01b038a1633308b612994565b60065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018a9052908a169063095ea7b3906044016020604051808303816000875af1158015612561573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061258591906141dc565b5060065460405163f305d71960e01b81526001600160a01b039091169063f305d7199034906125c2908d908d908d908d908d908d906004016141fe565b60606040518083038185885af11580156125e0573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906126059190614458565b919b909a509098509650505050505050565b600080600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561266d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269191906141bf565b60405163e6a4390560e01b81526001600160a01b0386811660048301527f00000000000000000000000053000000000000000000000000000000000000048116602483015291925060009183169063e6a4390590604401602060405180830381865afa158015612705573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272991906141bf565b90506001600160a01b038116612744576000925050506114f2565b6000612770867f00000000000000000000000053000000000000000000000000000000000000046133b7565b509050600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156127b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d89190614354565b506001600160701b031691506001600160701b03169150600080846001600160a01b03168a6001600160a01b031614612812578284612815565b83835b909250905081612825828b6143b2565b61282f91906143c9565b9a9950505050505050505050565b61284561335d565b60018181548110612858576128586142b2565b60009182526020822001546040516001600160a01b039091169133917fc322b4d5159f72837eec184e14dde68867f91c6da39449fb9829f42121fc704d9190a3600060026000600184815481106128b1576128b16142b2565b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff1916911515919091179055600180546128f49082906142de565b81548110612904576129046142b2565b600091825260209091200154600180546001600160a01b039092169183908110612930576129306142b2565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600180548061296f5761296f6143eb565b600082815260209020810160001990810180546001600160a01b031916905501905550565b6040516001600160a01b03808516602483015283166044820152606481018290526129ff9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613827565b50505050565b606085600081518110612a1a57612a1a6142b2565b602090810291909101015160065460405163095ea7b360e01b81526001600160a01b039182166004820152602481018b905291169063095ea7b3906044016020604051808303816000875af1158015612a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9b91906141dc565b506006546040516338ed173960e01b81526001600160a01b03909116906338ed173990612ad4908b908b908b9030908b90600401614486565b6000604051808303816000875af1158015612af3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612b1b91908101906144c2565b905060008160018351612b2e91906142de565b81518110612b3e57612b3e6142b2565b602002602001015190506000612b538261380a565b905088612b6082846142de565b1015612bd45760405162461bcd60e51b815260206004820152603860248201527f49676779537761703a20416d6f756e74206f7574206973206c6573732074686160448201527f6e20746865206d696e696d756d20616d6f756e74206f757400000000000000006064820152608401610ba5565b60008860018a51612be591906142de565b81518110612bf557612bf56142b2565b60200260200101519050848015612c3d57507f00000000000000000000000053000000000000000000000000000000000000046001600160a01b0316816001600160a01b0316145b156131e957604051632e1a7d4d60e01b8152600481018490526001600160a01b03821690632e1a7d4d90602401600060405180830381600087803b158015612c8457600080fd5b505af1158015612c98573d6000803e3d6000fd5b505050506000886001600160a01b03168385612cb491906142de565b604051600081818185875af1925050503d8060008114612cf0576040519150601f19603f3d011682016040523d82523d6000602084013e612cf5565b606091505b5050905080612d495760405162461bcd60e51b815260206004820152602c60248201526000805160206145d583398151915260448201526b1a19481c9958da5c1a595b9d60a21b6064820152608401610ba5565b60006001600160a01b03881615801590612d6557506000600a54115b15612eb357612710600a5485612d7b91906143b2565b612d8591906143c9565b90506000886001600160a01b03168260405160006040518083038185875af1925050503d8060008114612dd4576040519150601f19603f3d011682016040523d82523d6000602084013e612dd9565b606091505b5050905080612e2c5760405162461bcd60e51b815260206004820152602b60248201526000805160206145d583398151915260448201526a3432903932b332b93932b960a91b6064820152608401610ba5565b612e3682866142de565b6008549095506001600160a01b031615612eb157600854604051630761f29d60e31b81526001600160a01b038b811660048301526024820185905290911690633b0f94e890604401600060405180830381600087803b158015612e9857600080fd5b505af1158015612eac573d6000803e3d6000fd5b505050505b505b6007546001600160a01b031615801590612ecf57506000600b54115b15612fb2576000612710600b5486612ee791906143b2565b612ef191906143c9565b6007546040519192506000916001600160a01b039091169083908381818185875af1925050503d8060008114612f43576040519150601f19603f3d011682016040523d82523d6000602084013e612f48565b606091505b5050905080612fa35760405162461bcd60e51b815260206004820152603360248201526000805160206145d58339815191526044820152721a19481cdd185ada5b99c818dbdb9d1c9858dd606a1b6064820152608401610ba5565b612fad82876142de565b955050505b6004546001600160a01b031615801590612fce57506000600c54115b156130a6576000612710600c5486612fe691906143b2565b612ff091906143c9565b6004546040519192506000916001600160a01b039091169083908381818185875af1925050503d8060008114613042576040519150601f19603f3d011682016040523d82523d6000602084013e613047565b606091505b50509050806130a35760405162461bcd60e51b815260206004820152603460248201526000805160206145d5833981519152604482015273343290333937b73a32b7321037b832b930ba37b960611b6064820152608401610ba5565b50505b6005546040516000916001600160a01b03169047908381818185875af1925050503d80600081146130f3576040519150601f19603f3d011682016040523d82523d6000602084013e6130f8565b606091505b50509050806131555760405162461bcd60e51b815260206004820152602360248201527f4661696c656420746f2073656e64206e617469766520636f696e7320746f204960448201526267677960e81b6064820152608401610ba5565b6008546001600160a01b0316156131e1576008546001600160a01b0316633b0f94e88c61318285896142de565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156131c857600080fd5b505af11580156131dc573d6000803e3d6000fd5b505050505b50505061334f565b613208886131f784866142de565b6001600160a01b03841691906134fe565b6001600160a01b0386161580159061322257506000600a54115b15613268576000612710600a548461323a91906143b2565b61324491906143c9565b905061325a6001600160a01b03831688836134fe565b61326481846142de565b9250505b6004546001600160a01b03161580159061328457506000600c54115b156132c5576000612710600c548461329c91906143b2565b6132a691906143c9565b6004549091506132c3906001600160a01b038481169116836134fe565b505b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561330c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133309190614399565b60055490915061334d906001600160a01b038481169116836134fe565b505b505050979650505050505050565b6000546001600160a01b031633146117a95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ba5565b600080826001600160a01b0316846001600160a01b0316036134295760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a204944454e544943414c5f41444452604482015264455353455360d81b6064820152608401610ba5565b826001600160a01b0316846001600160a01b03161061344957828461344c565b83835b90925090506001600160a01b0382166134a75760405162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f4144445245535300006044820152606401610ba5565b9250929050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0383166024820152604481018290526116fe90849063a9059cbb60e01b906064016129c8565b600080600061353d85856133b7565b5060405163e6a4390560e01b81526001600160a01b038781166004830152868116602483015291925060009188169063e6a4390590604401602060405180830381865afa158015613592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135b691906141bf565b9050600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156135f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061361d9190614354565b506001600160701b031691506001600160701b03169150836001600160a01b0316886001600160a01b031614613654578082613657565b81815b909a909950975050505050505050565b606060006001600160a01b031682600081518110613687576136876142b2565b60200260200101516001600160a01b0316036136f2577f0000000000000000000000005300000000000000000000000000000000000004826000815181106136d1576136d16142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b60006001600160a01b0316826001845161370c91906142de565b8151811061371c5761371c6142b2565b60200260200101516001600160a01b031603613793577f0000000000000000000000005300000000000000000000000000000000000004826001845161376291906142de565b81518110613772576137726142b2565b60200260200101906001600160a01b031690816001600160a01b0316815250505b60065460405163d06ca61f60e01b81526001600160a01b039091169063d06ca61f906137c59086908690600401614548565b600060405180830381865afa1580156137e2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114ef91908101906144c2565b60006127106009548361381d91906143b2565b6114f291906143c9565b600061387c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166138fc9092919063ffffffff16565b905080516000148061389d57508080602001905181019061389d91906141dc565b6116fe5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ba5565b606061390b8484600085613913565b949350505050565b6060824710156139745760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ba5565b600080866001600160a01b031685876040516139909190614585565b60006040518083038185875af1925050503d80600081146139cd576040519150601f19603f3d011682016040523d82523d6000602084013e6139d2565b606091505b50915091506113938783838760608315613a4d578251600003613a46576001600160a01b0385163b613a465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ba5565b508161390b565b61390b8383815115613a625781518083602001fd5b8060405162461bcd60e51b8152600401610ba591906145a1565b6001600160a01b0381168114610ccc57600080fd5b60008060008060008060c08789031215613aaa57600080fd5b8635613ab581613a7c565b95506020870135945060408701359350606087013592506080870135613ada81613a7c565b8092505060a087013590509295509295509295565b600060208284031215613b0157600080fd5b813561210281613a7c565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613b4b57613b4b613b0c565b604052919050565b600067ffffffffffffffff821115613b6d57613b6d613b0c565b5060051b60200190565b600082601f830112613b8857600080fd5b81356020613b9d613b9883613b53565b613b22565b82815260059290921b84018101918181019086841115613bbc57600080fd5b8286015b84811015613be0578035613bd381613a7c565b8352918301918301613bc0565b509695505050505050565b600080600080600060a08688031215613c0357600080fd5b8535945060208601359350604086013567ffffffffffffffff811115613c2857600080fd5b613c3488828901613b77565b9350506060860135613c4581613a7c565b949793965091946080013592915050565b6020808252825182820181905260009190848201906040850190845b81811015613c8e57835183529284019291840191600101613c72565b50909695505050505050565b60008060408385031215613cad57600080fd5b8235613cb881613a7c565b946020939093013593505050565b600060208284031215613cd857600080fd5b5035919050565b60008060008060008060c08789031215613cf857600080fd5b8635955060208701359450604087013567ffffffffffffffff811115613d1d57600080fd5b613d2989828a01613b77565b9450506060870135613d3a81613a7c565b92506080870135915060a0870135613d5181613a7c565b809150509295509295509295565b60008060408385031215613d7257600080fd5b8235613d7d81613a7c565b91506020830135613d8d81613a7c565b809150509250929050565b60008083601f840112613daa57600080fd5b50813567ffffffffffffffff811115613dc257600080fd5b6020830191508360208260051b85010111156134a757600080fd5b60008060008060008060a08789031215613df657600080fd5b8635955060208701359450604087013567ffffffffffffffff811115613e1b57600080fd5b613e2789828a01613d98565b9095509350506060870135613e3b81613a7c565b80925050608087013590509295509295509295565b600080600080600060a08688031215613e6857600080fd5b85359450602086013567ffffffffffffffff811115613e8657600080fd5b613e9288828901613b77565b9450506040860135613ea381613a7c565b9250606086013591506080860135613eba81613a7c565b809150509295509295909350565b60008060008060808587031215613ede57600080fd5b84359350602085013567ffffffffffffffff811115613efc57600080fd5b613f0887828801613b77565b9350506040850135613f1981613a7c565b9396929550929360600135925050565b600081518084526020808501945080840160005b83811015613f625781516001600160a01b031687529582019590820190600101613f3d565b509495945050505050565b6020815260006114ef6020830184613f29565b600080600060608486031215613f9557600080fd5b8335613fa081613a7c565b9250602084013591506040840135613fb781613a7c565b809150509250925092565b600080600080600080600060e0888a031215613fdd57600080fd5b8735613fe881613a7c565b96506020880135613ff881613a7c565b955060408801359450606088013593506080880135925060a088013561401d81613a7c565b8092505060c0880135905092959891949750929550565b60008060006060848603121561404957600080fd5b833561405481613a7c565b9250602084013561406481613a7c565b929592945050506040919091013590565b6000806040838503121561408857600080fd5b82359150602083013567ffffffffffffffff8111156140a657600080fd5b6140b285828601613b77565b9150509250929050565b600080600080600080600060c0888a0312156140d757600080fd5b8735965060208801359550604088013567ffffffffffffffff8111156140fc57600080fd5b6141088a828b01613d98565b909650945050606088013561411c81613a7c565b92506080880135915060a088013561413381613a7c565b8091505092959891949750929550565b600080600080600080600080610100898b03121561416057600080fd5b883561416b81613a7c565b9750602089013561417b81613a7c565b965060408901359550606089013594506080890135935060a0890135925060c08901356141a781613a7c565b8092505060e089013590509295985092959890939650565b6000602082840312156141d157600080fd5b815161210281613a7c565b6000602082840312156141ee57600080fd5b8151801515811461210257600080fd5b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b6000806040838503121561424c57600080fd5b505080516020909101519092909150565b60208082526035908201527f4f776e61626c65576974684d616e61676572733a2063616c6c6572206973206e60408201527437ba10309036b0b730b3b2b91037b91037bbb732b960591b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156114f2576114f26142c8565b60208082526027908201527f49676779537761703a2053656e646572206973206e6f7420746865204665652060408201526621b430b733b2b960c91b606082015260800190565b80516001600160701b038116811461434f57600080fd5b919050565b60008060006060848603121561436957600080fd5b61437284614338565b925061438060208501614338565b9150604084015163ffffffff81168114613fb757600080fd5b6000602082840312156143ab57600080fd5b5051919050565b80820281158282048414176114f2576114f26142c8565b6000826143e657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b60208082526024908201527f49676779537761703a204e617469766520636f696e20616d6f756e74206973206040820152637a65726f60e01b606082015260800190565b808201808211156114f2576114f26142c8565b60008060006060848603121561446d57600080fd5b8351925060208401519150604084015190509250925092565b85815284602082015260a0604082015260006144a560a0830186613f29565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156144d557600080fd5b825167ffffffffffffffff8111156144ec57600080fd5b8301601f810185136144fd57600080fd5b805161450b613b9882613b53565b81815260059190911b8201830190838101908783111561452a57600080fd5b928401925b828410156113935783518252928401929084019061452f565b82815260406020820152600061390b6040830184613f29565b60005b8381101561457c578181015183820152602001614564565b50506000910152565b60008251614597818460208701614561565b9190910192915050565b60208152600082518060208401526145c0816040850160208701614561565b601f01601f1916919091016040019291505056fe4661696c656420746f2073656e64206e617469766520636f696e7320746f2074a2646970667358221220e4126536849e5b41709afba9bbb373199e30f2c67859f25ee003d1dd6a943ebf64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001e7487b34cdef80536f70e085ac875d7b7cc6812000000000000000000000000e08033d0bdbcebe7e619c3ae165e7957ab577961000000000000000000000000d8ea8e35b2fcf37fcbd7933436b1a9b7ce7108bf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b61bed21a502519bf49da543f84ceefe0196dd2b000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001388
-----Decoded View---------------
Arg [0] : _frontendAddress (address): 0x1e7487b34CDeF80536F70e085AC875d7b7cC6812
Arg [1] : _iggyAddress (address): 0xE08033d0bDBcEbE7e619c3aE165E7957Ab577961
Arg [2] : _routerAddress (address): 0xD8EA8E35b2fCf37FcBd7933436B1A9b7cE7108Bf
Arg [3] : _stakingAddress (address): 0x0000000000000000000000000000000000000000
Arg [4] : _statsAddress (address): 0xb61bed21a502519bF49DA543f84cEEFe0196dD2b
Arg [5] : _swapFee (uint256): 80
Arg [6] : _stakingShare (uint256): 0
Arg [7] : _frontendShare (uint256): 5000
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000001e7487b34cdef80536f70e085ac875d7b7cc6812
Arg [1] : 000000000000000000000000e08033d0bdbcebe7e619c3ae165e7957ab577961
Arg [2] : 000000000000000000000000d8ea8e35b2fcf37fcbd7933436b1a9b7ce7108bf
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 000000000000000000000000b61bed21a502519bf49da543f84ceefe0196dd2b
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000050
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000001388
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.