Polygon Sponsored slots available. Book your slot here!
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 169,698 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Beef Out And Swa... | 50480128 | 512 days ago | IN | 0 POL | 0.03413195 | ||||
Beef Out And Swa... | 50459338 | 512 days ago | IN | 0 POL | 0.02742418 | ||||
Beef Out And Swa... | 50362190 | 515 days ago | IN | 0 POL | 0.0152268 | ||||
Beef Out | 50332290 | 515 days ago | IN | 0 POL | 0.18235652 | ||||
Beef In | 50257303 | 517 days ago | IN | 0 POL | 0.02962108 | ||||
Beef In | 50164399 | 519 days ago | IN | 0 POL | 0.04528675 | ||||
Beef Out And Swa... | 50141208 | 520 days ago | IN | 0 POL | 0.01582878 | ||||
Beef Out | 50114882 | 521 days ago | IN | 0 POL | 0.01255753 | ||||
Beef Out | 50088474 | 521 days ago | IN | 0 POL | 0.01585722 | ||||
Beef Out | 50056638 | 522 days ago | IN | 0 POL | 0.03769175 | ||||
Beef Out And Swa... | 50031649 | 523 days ago | IN | 0 POL | 0.47462207 | ||||
Beef Out And Swa... | 50026704 | 523 days ago | IN | 0 POL | 0.50328595 | ||||
Beef Out And Swa... | 49938752 | 525 days ago | IN | 0 POL | 0.02543361 | ||||
Beef Out And Swa... | 49936927 | 525 days ago | IN | 0 POL | 0.05287168 | ||||
Beef Out And Swa... | 49928053 | 525 days ago | IN | 0 POL | 0.04862637 | ||||
Beef Out And Swa... | 49891626 | 526 days ago | IN | 0 POL | 0.01388464 | ||||
Beef Out And Swa... | 49874025 | 527 days ago | IN | 0 POL | 0.01426795 | ||||
Beef Out And Swa... | 49868627 | 527 days ago | IN | 0 POL | 0.03050893 | ||||
Beef Out And Swa... | 49828357 | 528 days ago | IN | 0 POL | 0.02577771 | ||||
Beef Out | 49806082 | 528 days ago | IN | 0 POL | 0.03050636 | ||||
Beef Out And Swa... | 49744886 | 530 days ago | IN | 0 POL | 0.0849827 | ||||
Beef Out And Swa... | 49738323 | 530 days ago | IN | 0 POL | 0.08041833 | ||||
Beef Out And Swa... | 49703511 | 531 days ago | IN | 0 POL | 0.08641833 | ||||
Beef Out And Swa... | 49560214 | 535 days ago | IN | 0 POL | 0.01598822 | ||||
Beef In | 49542736 | 535 days ago | IN | 0 POL | 0.07184463 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
50480128 | 512 days ago | 0.02137349 POL | ||||
50480128 | 512 days ago | 0.02137349 POL | ||||
50459338 | 512 days ago | 1.64451438 POL | ||||
50459338 | 512 days ago | 1.64451438 POL | ||||
50362190 | 515 days ago | 9.40530048 POL | ||||
50362190 | 515 days ago | 9.40530048 POL | ||||
50141208 | 520 days ago | 21.20760129 POL | ||||
50141208 | 520 days ago | 21.20760129 POL | ||||
50088474 | 521 days ago | 7.05037634 POL | ||||
50088474 | 521 days ago | 7.05037634 POL | ||||
50026704 | 523 days ago | 30.06767809 POL | ||||
50026704 | 523 days ago | 30.06767809 POL | ||||
49938752 | 525 days ago | 13.56526929 POL | ||||
49938752 | 525 days ago | 13.56526929 POL | ||||
49936927 | 525 days ago | 111.48823126 POL | ||||
49936927 | 525 days ago | 111.48823126 POL | ||||
49928053 | 525 days ago | 162.53034487 POL | ||||
49928053 | 525 days ago | 162.53034487 POL | ||||
49891626 | 526 days ago | 7.03376713 POL | ||||
49891626 | 526 days ago | 7.03376713 POL | ||||
49868627 | 527 days ago | 176.01160411 POL | ||||
49868627 | 527 days ago | 176.01160411 POL | ||||
49828357 | 528 days ago | 8.67097688 POL | ||||
49828357 | 528 days ago | 8.67097688 POL | ||||
49744886 | 530 days ago | 1.0671165 POL |
Loading...
Loading
Contract Name:
BeefyUniV2Zap
Compiler Version
v0.7.0+commit.9e61f92b
Contract Source Code (Solidity)
/** *Submitted for verification at polygonscan.com on 2021-06-30 */ // SPDX-License-Identifier: MIT // File: contracts/BIFI/zap/IUniswapV2Pair.sol pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // File: contracts/BIFI/zap/Babylonian.sol pragma solidity >=0.4.0; // computes square roots using the babylonian method // https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method library Babylonian { // credit for this implementation goes to // https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687 function sqrt(uint256 x) internal pure returns (uint256) { if (x == 0) return 0; // this block is equivalent to r = uint256(1) << (BitMath.mostSignificantBit(x) / 2); // however that code costs significantly more gas uint256 xx = x; uint256 r = 1; if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; } if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; } if (xx >= 0x100000000) { xx >>= 32; r <<= 16; } if (xx >= 0x10000) { xx >>= 16; r <<= 8; } if (xx >= 0x100) { xx >>= 8; r <<= 4; } if (xx >= 0x10) { xx >>= 4; r <<= 2; } if (xx >= 0x8) { r <<= 1; } r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; // Seven iterations should be enough uint256 r1 = x / r; return (r < r1 ? r : r1); } } // File: contracts/BIFI/zap/IERC20.sol pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/BIFI/zap/SafeMath.sol pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: contracts/BIFI/zap/Address.sol pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: contracts/BIFI/zap/SafeERC20.sol pragma solidity >=0.6.0 <0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // 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' // solhint-disable-next-line max-line-length 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)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: contracts/BIFI/zap/LowGasSafeMath.sol pragma solidity >=0.7.0; /// @title Optimized overflow and underflow safe math operations /// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost library LowGasSafeMath { /// @notice Returns x + y, reverts if sum overflows uint256 /// @param x The augend /// @param y The addend /// @return z The sum of x and y function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x); } /// @notice Returns x - y, reverts if underflows /// @param x The minuend /// @param y The subtrahend /// @return z The difference of x and y function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x); } /// @notice Returns x * y, reverts if overflows /// @param x The multiplicand /// @param y The multiplier /// @return z The product of x and y function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(x == 0 || (z = x * y) / x == y); } /// @notice Returns x + y, reverts if overflows or underflows /// @param x The augend /// @param y The addend /// @return z The sum of x and y function add(int256 x, int256 y) internal pure returns (int256 z) { require((z = x + y) >= x == (y >= 0)); } /// @notice Returns x - y, reverts if overflows or underflows /// @param x The minuend /// @param y The subtrahend /// @return z The difference of x and y function sub(int256 x, int256 y) internal pure returns (int256 z) { require((z = x - y) <= x == (y >= 0)); } } // File: contracts/BIFI/zap/IUniswapV2Router01.sol pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } // File: contracts/BIFI/zap/IUniswapV2Router02.sol pragma solidity >=0.6.2; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } // File: contracts/BIFI/zap/BeefyUniV2Zap.sol // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // @author Wivern for Beefy.Finance // @notice This contract adds liquidity to Uniswap V2 compatible liquidity pair pools and stake. pragma solidity >=0.7.0; interface IWETH is IERC20 { function deposit() external payable; function withdraw(uint256 wad) external; } interface IBeefyVaultV6 is IERC20 { function deposit(uint256 amount) external; function withdraw(uint256 shares) external; function want() external pure returns (address); } contract BeefyUniV2Zap { using LowGasSafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IBeefyVaultV6; IUniswapV2Router02 public immutable router; address public immutable WETH; uint256 public constant minimumAmount = 1000; constructor(address _router, address _WETH) { router = IUniswapV2Router02(_router); WETH = _WETH; } receive() external payable { assert(msg.sender == WETH); } function beefInETH (address beefyVault, uint256 tokenAmountOutMin) external payable { require(msg.value >= minimumAmount, 'Beefy: Insignificant input amount'); IWETH(WETH).deposit{value: msg.value}(); _swapAndStake(beefyVault, tokenAmountOutMin, WETH); } function beefIn (address beefyVault, uint256 tokenAmountOutMin, address tokenIn, uint256 tokenInAmount) external { require(tokenInAmount >= minimumAmount, 'Beefy: Insignificant input amount'); require(IERC20(tokenIn).allowance(msg.sender, address(this)) >= tokenInAmount, 'Beefy: Input token is not approved'); IERC20(tokenIn).safeTransferFrom(msg.sender, address(this), tokenInAmount); _swapAndStake(beefyVault, tokenAmountOutMin, tokenIn); } function beefOut (address beefyVault, uint256 withdrawAmount) external { (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault); IERC20(beefyVault).safeTransferFrom(msg.sender, address(this), withdrawAmount); vault.withdraw(withdrawAmount); if (pair.token0() != WETH && pair.token1() != WETH) { return _removeLiqudity(address(pair), msg.sender); } _removeLiqudity(address(pair), address(this)); address[] memory tokens = new address[](2); tokens[0] = pair.token0(); tokens[1] = pair.token1(); _returnAssets(tokens); } function beefOutAndSwap(address beefyVault, uint256 withdrawAmount, address desiredToken, uint256 desiredTokenOutMin) external { (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault); address token0 = pair.token0(); address token1 = pair.token1(); require(token0 == desiredToken || token1 == desiredToken, 'Beefy: desired token not present in liqudity pair'); vault.safeTransferFrom(msg.sender, address(this), withdrawAmount); vault.withdraw(withdrawAmount); _removeLiqudity(address(pair), address(this)); address swapToken = token1 == desiredToken ? token0 : token1; address[] memory path = new address[](2); path[0] = swapToken; path[1] = desiredToken; _approveTokenIfNeeded(path[0], address(router)); router.swapExactTokensForTokens(IERC20(swapToken).balanceOf(address(this)), desiredTokenOutMin, path, address(this), block.timestamp); _returnAssets(path); } function _removeLiqudity(address pair, address to) private { IERC20(pair).safeTransfer(pair, IERC20(pair).balanceOf(address(this))); (uint256 amount0, uint256 amount1) = IUniswapV2Pair(pair).burn(to); require(amount0 >= minimumAmount, 'UniswapV2Router: INSUFFICIENT_A_AMOUNT'); require(amount1 >= minimumAmount, 'UniswapV2Router: INSUFFICIENT_B_AMOUNT'); } function _getVaultPair (address beefyVault) private view returns (IBeefyVaultV6 vault, IUniswapV2Pair pair) { vault = IBeefyVaultV6(beefyVault); pair = IUniswapV2Pair(vault.want()); require(pair.factory() == router.factory(), 'Beefy: Incompatible liquidity pair factory'); } function _swapAndStake(address beefyVault, uint256 tokenAmountOutMin, address tokenIn) private { (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault); (uint256 reserveA, uint256 reserveB,) = pair.getReserves(); require(reserveA > minimumAmount && reserveB > minimumAmount, 'Beefy: Liquidity pair reserves too low'); bool isInputA = pair.token0() == tokenIn; require(isInputA || pair.token1() == tokenIn, 'Beefy: Input token not present in liqudity pair'); address[] memory path = new address[](2); path[0] = tokenIn; path[1] = isInputA ? pair.token1() : pair.token0(); uint256 fullInvestment = IERC20(tokenIn).balanceOf(address(this)); uint256 swapAmountIn; if (isInputA) { swapAmountIn = _getSwapAmount(fullInvestment, reserveA, reserveB); } else { swapAmountIn = _getSwapAmount(fullInvestment, reserveB, reserveA); } _approveTokenIfNeeded(path[0], address(router)); uint256[] memory swapedAmounts = router .swapExactTokensForTokens(swapAmountIn, tokenAmountOutMin, path, address(this), block.timestamp); _approveTokenIfNeeded(path[1], address(router)); (,, uint256 amountLiquidity) = router .addLiquidity(path[0], path[1], fullInvestment.sub(swapedAmounts[0]), swapedAmounts[1], 1, 1, address(this), block.timestamp); _approveTokenIfNeeded(address(pair), address(vault)); vault.deposit(amountLiquidity); vault.safeTransfer(msg.sender, vault.balanceOf(address(this))); _returnAssets(path); } function _returnAssets(address[] memory tokens) private { uint256 balance; for (uint256 i; i < tokens.length; i++) { balance = IERC20(tokens[i]).balanceOf(address(this)); if (balance > 0) { if (tokens[i] == WETH) { IWETH(WETH).withdraw(balance); (bool success,) = msg.sender.call{value: balance}(new bytes(0)); require(success, 'Beefy: ETH transfer failed'); } else { IERC20(tokens[i]).safeTransfer(msg.sender, balance); } } } } function _getSwapAmount(uint256 investmentA, uint256 reserveA, uint256 reserveB) private view returns (uint256 swapAmount) { uint256 halfInvestment = investmentA / 2; uint256 nominator = router.getAmountOut(halfInvestment, reserveA, reserveB); uint256 denominator = router.quote(halfInvestment, reserveA.add(halfInvestment), reserveB.sub(nominator)); swapAmount = investmentA.sub(Babylonian.sqrt(halfInvestment * halfInvestment * nominator / denominator)); } function estimateSwap(address beefyVault, address tokenIn, uint256 fullInvestmentIn) public view returns(uint256 swapAmountIn, uint256 swapAmountOut, address swapTokenOut) { checkWETH(); (, IUniswapV2Pair pair) = _getVaultPair(beefyVault); bool isInputA = pair.token0() == tokenIn; require(isInputA || pair.token1() == tokenIn, 'Beefy: Input token not present in liqudity pair'); (uint256 reserveA, uint256 reserveB,) = pair.getReserves(); (reserveA, reserveB) = isInputA ? (reserveA, reserveB) : (reserveB, reserveA); swapAmountIn = _getSwapAmount(fullInvestmentIn, reserveA, reserveB); swapAmountOut = router.getAmountOut(swapAmountIn, reserveA, reserveB); swapTokenOut = isInputA ? pair.token1() : pair.token0(); } function checkWETH() public view returns (bool isValid) { isValid = WETH == router.WETH(); require(isValid, 'Beefy: WETH address not matching Router.WETH()'); } function _approveTokenIfNeeded(address token, address spender) private { if (IERC20(token).allowance(address(this), spender) == 0) { IERC20(token).safeApprove(spender, uint256(~0)); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"tokenAmountOutMin","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"tokenInAmount","type":"uint256"}],"name":"beefIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"tokenAmountOutMin","type":"uint256"}],"name":"beefInETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"beefOut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"withdrawAmount","type":"uint256"},{"internalType":"address","name":"desiredToken","type":"address"},{"internalType":"uint256","name":"desiredTokenOutMin","type":"uint256"}],"name":"beefOutAndSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkWETH","outputs":[{"internalType":"bool","name":"isValid","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"fullInvestmentIn","type":"uint256"}],"name":"estimateSwap","outputs":[{"internalType":"uint256","name":"swapAmountIn","type":"uint256"},{"internalType":"uint256","name":"swapAmountOut","type":"uint256"},{"internalType":"address","name":"swapTokenOut","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c060405234801561001057600080fd5b50604051612a9e380380612a9e8339818101604052604081101561003357600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c6129cc6100d260003980609a5280610b4d5280610bc65280610c775280610d6b5280610e0c528061101d52806117f752806118445250806104b252806108c152806108e75280610bf252806111665280611210528061134a52806113f65280611e085280611fb252506129cc6000f3fe60806040526004361061008a5760003560e01c8063a28c361b11610059578063a28c361b146101ce578063ad5c464814610207578063bb0c829814610238578063f5d07b601461025f578063f887ea40146102a6576100c3565b80633f2f869a146100c857806351c9cf911461013257806370fae20d146101795780638437fabe146101a5576100c3565b366100c357336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c157fe5b005b600080fd5b3480156100d457600080fd5b5061010b600480360360608110156100eb57600080fd5b506001600160a01b038135811691602081013590911690604001356102bb565b6040805193845260208401929092526001600160a01b031682820152519081900360600190f35b34801561013e57600080fd5b506100c16004803603608081101561015557600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610636565b6100c16004803603604081101561018f57600080fd5b506001600160a01b038135169060200135610b0a565b3480156101b157600080fd5b506101ba610bee565b604080519115158252519081900360200190f35b3480156101da57600080fd5b506100c1600480360360408110156101f157600080fd5b506001600160a01b038135169060200135610ce5565b34801561021357600080fd5b5061021c61101b565b604080516001600160a01b039092168252519081900360200190f35b34801561024457600080fd5b5061024d61103f565b60408051918252519081900360200190f35b34801561026b57600080fd5b506100c16004803603608081101561028257600080fd5b506001600160a01b0381358116916020810135916040820135169060600135611045565b3480156102b257600080fd5b5061021c611164565b60008060006102c8610bee565b5060006102d487611188565b9150506000866001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561031c57600080fd5b505afa158015610330573d6000803e3d6000fd5b505050506040513d602081101561034657600080fd5b50516001600160a01b031614905080806103d55750866001600160a01b0316826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561039e57600080fd5b505afa1580156103b2573d6000803e3d6000fd5b505050506040513d60208110156103c857600080fd5b50516001600160a01b0316145b6104105760405162461bcd60e51b815260040180806020018281038252602f815260200180612887602f913960400191505060405180910390fd5b600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561044c57600080fd5b505afa158015610460573d6000803e3d6000fd5b505050506040513d606081101561047657600080fd5b5080516020909101516001600160701b0391821693501690508261049b57808261049e565b81815b90925090506104ae88838361133d565b96507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663054d50d48884846040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561052457600080fd5b505afa158015610538573d6000803e3d6000fd5b505050506040513d602081101561054e57600080fd5b50519550826105c157836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561059057600080fd5b505afa1580156105a4573d6000803e3d6000fd5b505050506040513d60208110156105ba57600080fd5b5051610627565b836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156105fa57600080fd5b505afa15801561060e573d6000803e3d6000fd5b505050506040513d602081101561062457600080fd5b50515b94505050505093509350939050565b60008061064286611188565b915091506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561068157600080fd5b505afa158015610695573d6000803e3d6000fd5b505050506040513d60208110156106ab57600080fd5b50516040805163d21220a760e01b815290519192506000916001600160a01b0385169163d21220a7916004808301926020929190829003018186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d602081101561071d57600080fd5b505190506001600160a01b03828116908716148061074c5750856001600160a01b0316816001600160a01b0316145b6107875760405162461bcd60e51b81526004018080602001828103825260318152602001806128b66031913960400191505060405180910390fd5b61079c6001600160a01b03851633308a6114cb565b836001600160a01b0316632e1a7d4d886040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156107e257600080fd5b505af11580156107f6573d6000803e3d6000fd5b505050506108048330611525565b6000866001600160a01b0316826001600160a01b0316146108255781610827565b825b604080516002808252606080830184529394509091602083019080368337019050509050818160008151811061085957fe5b60200260200101906001600160a01b031690816001600160a01b031681525050878160018151811061088757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506108e5816000815181106108b757fe5b60200260200101517f00000000000000000000000000000000000000000000000000000000000000006116be565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338ed1739836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561096157600080fd5b505afa158015610975573d6000803e3d6000fd5b505050506040513d602081101561098b57600080fd5b50516040516001600160e01b031960e084901b16815260048101828152602482018c90523060648301819052426084840181905260a060448501908152885160a486015288518f958a95929160c4909101906020878101910280838360005b83811015610a025781810151838201526020016109ea565b505050509050019650505050505050600060405180830381600087803b158015610a2b57600080fd5b505af1158015610a3f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a6857600080fd5b8101908080516040519392919084640100000000821115610a8857600080fd5b908301906020820185811115610a9d57600080fd5b8251866020820283011164010000000082111715610aba57600080fd5b82525081516020918201928201910280838360005b83811015610ae7578181015183820152602001610acf565b5050505090500160405250505050610afe81611754565b50505050505050505050565b6103e8341015610b4b5760405162461bcd60e51b81526004018080602001828103825260218152602001806127a46021913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ba657600080fd5b505af1158015610bba573d6000803e3d6000fd5b5050505050610bea82827f0000000000000000000000000000000000000000000000000000000000000000611a02565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6020811015610c7357600080fd5b50517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116911614905080610ce25760405162461bcd60e51b815260040180806020018281038252602e8152602001806127c5602e913960400191505060405180910390fd5b90565b600080610cf184611188565b9092509050610d0b6001600160a01b0385163330866114cb565b816001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610dcc57600080fd5b505afa158015610de0573d6000803e3d6000fd5b505050506040513d6020811015610df657600080fd5b50516001600160a01b031614801590610ea557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6d57600080fd5b505afa158015610e81573d6000803e3d6000fd5b505050506040513d6020811015610e9757600080fd5b50516001600160a01b031614155b15610ebb57610eb48133611525565b5050610bea565b610ec58130611525565b6040805160028082526060808301845292602083019080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1e57600080fd5b505afa158015610f32573d6000803e3d6000fd5b505050506040513d6020811015610f4857600080fd5b505181518290600090610f5757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610fb057600080fd5b505afa158015610fc4573d6000803e3d6000fd5b505050506040513d6020811015610fda57600080fd5b5051815182906001908110610feb57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505061101481611754565b5050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6103e881565b6103e88110156110865760405162461bcd60e51b81526004018080602001828103825260218152602001806127a46021913960400191505060405180910390fd5b60408051636eb1769f60e11b8152336004820152306024820152905182916001600160a01b0385169163dd62ed3e91604480820192602092909190829003018186803b1580156110d557600080fd5b505afa1580156110e9573d6000803e3d6000fd5b505050506040513d60208110156110ff57600080fd5b5051101561113e5760405162461bcd60e51b81526004018080602001828103825260228152602001806128656022913960400191505060405180910390fd5b6111536001600160a01b0383163330846114cb565b61115e848484611a02565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080829150816001600160a01b0316631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c757600080fd5b505afa1580156111db573d6000803e3d6000fd5b505050506040513d60208110156111f157600080fd5b50516040805163c45a015560e01b815290519192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163c45a015591600480820192602092909190829003018186803b15801561125757600080fd5b505afa15801561126b573d6000803e3d6000fd5b505050506040513d602081101561128157600080fd5b50516040805163c45a015560e01b815290516001600160a01b039283169284169163c45a0155916004808301926020929190829003018186803b1580156112c757600080fd5b505afa1580156112db573d6000803e3d6000fd5b505050506040513d60208110156112f157600080fd5b50516001600160a01b0316146113385760405162461bcd60e51b815260040180806020018281038252602a8152602001806128e7602a913960400191505060405180910390fd5b915091565b60008060028504905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663054d50d48387876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b1580156113bc57600080fd5b505afa1580156113d0573d6000803e3d6000fd5b505050506040513d60208110156113e657600080fd5b5051905060006001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ad615dec84611426898261220b565b6114308987612221565b6040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561147257600080fd5b505afa158015611486573d6000803e3d6000fd5b505050506040513d602081101561149c57600080fd5b505190506114c06114b9828580028502816114b357fe5b04612231565b8890612221565b979650505050505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261115e908590612379565b6115b382836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561157657600080fd5b505afa15801561158a573d6000803e3d6000fd5b505050506040513d60208110156115a057600080fd5b50516001600160a01b038516919061242a565b600080836001600160a01b03166389afcb44846040518263ffffffff1660e01b815260040180826001600160a01b031681526020019150506040805180830381600087803b15801561160457600080fd5b505af1158015611618573d6000803e3d6000fd5b505050506040513d604081101561162e57600080fd5b50805160209091015190925090506103e882101561167d5760405162461bcd60e51b81526004018080602001828103825260268152602001806129116026913960400191505060405180910390fd5b6103e881101561115e5760405162461bcd60e51b81526004018080602001828103825260268152602001806128196026913960400191505060405180910390fd5b60408051636eb1769f60e11b81523060048201526001600160a01b03838116602483015291519184169163dd62ed3e91604480820192602092909190829003018186803b15801561170e57600080fd5b505afa158015611722573d6000803e3d6000fd5b505050506040513d602081101561173857600080fd5b5051610bea57610bea6001600160a01b0383168260001961247c565b6000805b82518110156119fd5782818151811061176d57fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b5051915081156119f5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031683828151811061182b57fe5b60200260200101516001600160a01b031614156119c4577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156118a857600080fd5b505af11580156118bc573d6000803e3d6000fd5b505060408051600080825260208201928390528151909450339350869290819081908082805b602083106119015780518252601f1990920191602091820191016118e2565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611963576040519150601f19603f3d011682016040523d82523d6000602084013e611968565b606091505b50509050806119be576040805162461bcd60e51b815260206004820152601a60248201527f42656566793a20455448207472616e73666572206661696c6564000000000000604482015290519081900360640190fd5b506119f5565b6119f533838584815181106119d557fe5b60200260200101516001600160a01b031661242a9092919063ffffffff16565b600101611758565b505050565b600080611a0e85611188565b91509150600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6060811015611a7857600080fd5b5080516020909101516001600160701b0391821693501690506103e882118015611aa357506103e881115b611ade5760405162461bcd60e51b81526004018080602001828103825260268152602001806127f36026913960400191505060405180910390fd5b6000856001600160a01b0316846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2357600080fd5b505afa158015611b37573d6000803e3d6000fd5b505050506040513d6020811015611b4d57600080fd5b50516001600160a01b03161490508080611bdc5750856001600160a01b0316846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba557600080fd5b505afa158015611bb9573d6000803e3d6000fd5b505050506040513d6020811015611bcf57600080fd5b50516001600160a01b0316145b611c175760405162461bcd60e51b815260040180806020018281038252602f815260200180612887602f913960400191505060405180910390fd5b60408051600280825260608083018452926020830190803683370190505090508681600081518110611c4557fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081611cd457846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611ca357600080fd5b505afa158015611cb7573d6000803e3d6000fd5b505050506040513d6020811015611ccd57600080fd5b5051611d3a565b846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0d57600080fd5b505afa158015611d21573d6000803e3d6000fd5b505050506040513d6020811015611d3757600080fd5b50515b81600181518110611d4757fe5b6001600160a01b03928316602091820292909201810191909152604080516370a0823160e01b815230600482015290516000938b16926370a082319260248082019391829003018186803b158015611d9e57600080fd5b505afa158015611db2573d6000803e3d6000fd5b505050506040513d6020811015611dc857600080fd5b5051905060008315611de657611ddf82878761133d565b9050611df4565b611df182868861133d565b90505b611e04836000815181106108b757fe5b60607f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338ed1739838d8730426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611eaa578181015183820152602001611e92565b505050509050019650505050505050600060405180830381600087803b158015611ed357600080fd5b505af1158015611ee7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f1057600080fd5b8101908080516040519392919084640100000000821115611f3057600080fd5b908301906020820185811115611f4557600080fd5b8251866020820283011164010000000082111715611f6257600080fd5b82525081516020918201928201910280838360005b83811015611f8f578181015183820152602001611f77565b505050509050016040525050509050611fae846001815181106108b757fe5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e8e3370086600081518110611fec57fe5b60200260200101518760018151811061200157fe5b60200260200101516120308660008151811061201957fe5b60200260200101518961222190919063ffffffff16565b8660018151811061203d57fe5b602002602001015160018030426040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200198505050505050505050606060405180830381600087803b1580156120cc57600080fd5b505af11580156120e0573d6000803e3d6000fd5b505050506040513d60608110156120f657600080fd5b50604001519050612107898b6116be565b896001600160a01b031663b6b55f25826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561214d57600080fd5b505af1158015612161573d6000803e3d6000fd5b505050506121f3338b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156121b657600080fd5b505afa1580156121ca573d6000803e3d6000fd5b505050506040513d60208110156121e057600080fd5b50516001600160a01b038d16919061242a565b6121fc85611754565b50505050505050505050505050565b8082018281101561221b57600080fd5b92915050565b8082038281111561221b57600080fd5b60008161224057506000612374565b816001600160801b82106122595760809190911c9060401b5b6801000000000000000082106122745760409190911c9060201b5b640100000000821061228b5760209190911c9060101b5b6201000082106122a05760109190911c9060081b5b61010082106122b45760089190911c9060041b5b601082106122c75760049190911c9060021b5b600882106122d35760011b5b60018185816122de57fe5b048201901c905060018185816122f057fe5b048201901c9050600181858161230257fe5b048201901c9050600181858161231457fe5b048201901c9050600181858161232657fe5b048201901c9050600181858161233857fe5b048201901c9050600181858161234a57fe5b048201901c9050600081858161235c57fe5b04905080821061236c578061236e565b815b93505050505b919050565b60606123ce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661258f9092919063ffffffff16565b8051909150156119fd578080602001905160208110156123ed57600080fd5b50516119fd5760405162461bcd60e51b815260040180806020018281038252602a815260200180612937602a913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526119fd908490612379565b801580612502575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156124d457600080fd5b505afa1580156124e8573d6000803e3d6000fd5b505050506040513d60208110156124fe57600080fd5b5051155b61253d5760405162461bcd60e51b81526004018080602001828103825260368152602001806129616036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526119fd908490612379565b606061259e84846000856125a8565b90505b9392505050565b6060824710156125e95760405162461bcd60e51b815260040180806020018281038252602681526020018061283f6026913960400191505060405180910390fd5b6125f2856126f9565b612643576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106126825780518252601f199092019160209182019101612663565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146126e4576040519150601f19603f3d011682016040523d82523d6000602084013e6126e9565b606091505b50915091506114c08282866126ff565b3b151590565b6060831561270e5750816125a1565b82511561271e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612768578181015183820152602001612750565b50505050905090810190601f1680156127955780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe42656566793a20496e7369676e69666963616e7420696e70757420616d6f756e7442656566793a20574554482061646472657373206e6f74206d61746368696e6720526f757465722e57455448282942656566793a204c6971756964697479207061697220726573657276657320746f6f206c6f77556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c42656566793a20496e70757420746f6b656e206973206e6f7420617070726f76656442656566793a20496e70757420746f6b656e206e6f742070726573656e7420696e206c69717564697479207061697242656566793a206465736972656420746f6b656e206e6f742070726573656e7420696e206c69717564697479207061697242656566793a20496e636f6d70617469626c65206c6971756964697479207061697220666163746f7279556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e545361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212201820f479943c0e522ebeee9f31fc0890ee5b3116243a648fa64579ab7ce5c58e64736f6c63430007000033000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
Deployed Bytecode
0x60806040526004361061008a5760003560e01c8063a28c361b11610059578063a28c361b146101ce578063ad5c464814610207578063bb0c829814610238578063f5d07b601461025f578063f887ea40146102a6576100c3565b80633f2f869a146100c857806351c9cf911461013257806370fae20d146101795780638437fabe146101a5576100c3565b366100c357336001600160a01b037f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf127016146100c157fe5b005b600080fd5b3480156100d457600080fd5b5061010b600480360360608110156100eb57600080fd5b506001600160a01b038135811691602081013590911690604001356102bb565b6040805193845260208401929092526001600160a01b031682820152519081900360600190f35b34801561013e57600080fd5b506100c16004803603608081101561015557600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610636565b6100c16004803603604081101561018f57600080fd5b506001600160a01b038135169060200135610b0a565b3480156101b157600080fd5b506101ba610bee565b604080519115158252519081900360200190f35b3480156101da57600080fd5b506100c1600480360360408110156101f157600080fd5b506001600160a01b038135169060200135610ce5565b34801561021357600080fd5b5061021c61101b565b604080516001600160a01b039092168252519081900360200190f35b34801561024457600080fd5b5061024d61103f565b60408051918252519081900360200190f35b34801561026b57600080fd5b506100c16004803603608081101561028257600080fd5b506001600160a01b0381358116916020810135916040820135169060600135611045565b3480156102b257600080fd5b5061021c611164565b60008060006102c8610bee565b5060006102d487611188565b9150506000866001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561031c57600080fd5b505afa158015610330573d6000803e3d6000fd5b505050506040513d602081101561034657600080fd5b50516001600160a01b031614905080806103d55750866001600160a01b0316826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561039e57600080fd5b505afa1580156103b2573d6000803e3d6000fd5b505050506040513d60208110156103c857600080fd5b50516001600160a01b0316145b6104105760405162461bcd60e51b815260040180806020018281038252602f815260200180612887602f913960400191505060405180910390fd5b600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561044c57600080fd5b505afa158015610460573d6000803e3d6000fd5b505050506040513d606081101561047657600080fd5b5080516020909101516001600160701b0391821693501690508261049b57808261049e565b81815b90925090506104ae88838361133d565b96507f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff6001600160a01b031663054d50d48884846040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561052457600080fd5b505afa158015610538573d6000803e3d6000fd5b505050506040513d602081101561054e57600080fd5b50519550826105c157836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561059057600080fd5b505afa1580156105a4573d6000803e3d6000fd5b505050506040513d60208110156105ba57600080fd5b5051610627565b836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156105fa57600080fd5b505afa15801561060e573d6000803e3d6000fd5b505050506040513d602081101561062457600080fd5b50515b94505050505093509350939050565b60008061064286611188565b915091506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561068157600080fd5b505afa158015610695573d6000803e3d6000fd5b505050506040513d60208110156106ab57600080fd5b50516040805163d21220a760e01b815290519192506000916001600160a01b0385169163d21220a7916004808301926020929190829003018186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d602081101561071d57600080fd5b505190506001600160a01b03828116908716148061074c5750856001600160a01b0316816001600160a01b0316145b6107875760405162461bcd60e51b81526004018080602001828103825260318152602001806128b66031913960400191505060405180910390fd5b61079c6001600160a01b03851633308a6114cb565b836001600160a01b0316632e1a7d4d886040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156107e257600080fd5b505af11580156107f6573d6000803e3d6000fd5b505050506108048330611525565b6000866001600160a01b0316826001600160a01b0316146108255781610827565b825b604080516002808252606080830184529394509091602083019080368337019050509050818160008151811061085957fe5b60200260200101906001600160a01b031690816001600160a01b031681525050878160018151811061088757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506108e5816000815181106108b757fe5b60200260200101517f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff6116be565b7f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff6001600160a01b03166338ed1739836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561096157600080fd5b505afa158015610975573d6000803e3d6000fd5b505050506040513d602081101561098b57600080fd5b50516040516001600160e01b031960e084901b16815260048101828152602482018c90523060648301819052426084840181905260a060448501908152885160a486015288518f958a95929160c4909101906020878101910280838360005b83811015610a025781810151838201526020016109ea565b505050509050019650505050505050600060405180830381600087803b158015610a2b57600080fd5b505af1158015610a3f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a6857600080fd5b8101908080516040519392919084640100000000821115610a8857600080fd5b908301906020820185811115610a9d57600080fd5b8251866020820283011164010000000082111715610aba57600080fd5b82525081516020918201928201910280838360005b83811015610ae7578181015183820152602001610acf565b5050505090500160405250505050610afe81611754565b50505050505050505050565b6103e8341015610b4b5760405162461bcd60e51b81526004018080602001828103825260218152602001806127a46021913960400191505060405180910390fd5b7f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ba657600080fd5b505af1158015610bba573d6000803e3d6000fd5b5050505050610bea82827f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270611a02565b5050565b60007f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6020811015610c7357600080fd5b50517f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b03908116911614905080610ce25760405162461bcd60e51b815260040180806020018281038252602e8152602001806127c5602e913960400191505060405180910390fd5b90565b600080610cf184611188565b9092509050610d0b6001600160a01b0385163330866114cb565b816001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b505050507f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b0316816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610dcc57600080fd5b505afa158015610de0573d6000803e3d6000fd5b505050506040513d6020811015610df657600080fd5b50516001600160a01b031614801590610ea557507f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b0316816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6d57600080fd5b505afa158015610e81573d6000803e3d6000fd5b505050506040513d6020811015610e9757600080fd5b50516001600160a01b031614155b15610ebb57610eb48133611525565b5050610bea565b610ec58130611525565b6040805160028082526060808301845292602083019080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1e57600080fd5b505afa158015610f32573d6000803e3d6000fd5b505050506040513d6020811015610f4857600080fd5b505181518290600090610f5757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610fb057600080fd5b505afa158015610fc4573d6000803e3d6000fd5b505050506040513d6020811015610fda57600080fd5b5051815182906001908110610feb57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505061101481611754565b5050505050565b7f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b6103e881565b6103e88110156110865760405162461bcd60e51b81526004018080602001828103825260218152602001806127a46021913960400191505060405180910390fd5b60408051636eb1769f60e11b8152336004820152306024820152905182916001600160a01b0385169163dd62ed3e91604480820192602092909190829003018186803b1580156110d557600080fd5b505afa1580156110e9573d6000803e3d6000fd5b505050506040513d60208110156110ff57600080fd5b5051101561113e5760405162461bcd60e51b81526004018080602001828103825260228152602001806128656022913960400191505060405180910390fd5b6111536001600160a01b0383163330846114cb565b61115e848484611a02565b50505050565b7f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b600080829150816001600160a01b0316631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c757600080fd5b505afa1580156111db573d6000803e3d6000fd5b505050506040513d60208110156111f157600080fd5b50516040805163c45a015560e01b815290519192506001600160a01b037f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff169163c45a015591600480820192602092909190829003018186803b15801561125757600080fd5b505afa15801561126b573d6000803e3d6000fd5b505050506040513d602081101561128157600080fd5b50516040805163c45a015560e01b815290516001600160a01b039283169284169163c45a0155916004808301926020929190829003018186803b1580156112c757600080fd5b505afa1580156112db573d6000803e3d6000fd5b505050506040513d60208110156112f157600080fd5b50516001600160a01b0316146113385760405162461bcd60e51b815260040180806020018281038252602a8152602001806128e7602a913960400191505060405180910390fd5b915091565b60008060028504905060007f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff6001600160a01b031663054d50d48387876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b1580156113bc57600080fd5b505afa1580156113d0573d6000803e3d6000fd5b505050506040513d60208110156113e657600080fd5b5051905060006001600160a01b037f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff1663ad615dec84611426898261220b565b6114308987612221565b6040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561147257600080fd5b505afa158015611486573d6000803e3d6000fd5b505050506040513d602081101561149c57600080fd5b505190506114c06114b9828580028502816114b357fe5b04612231565b8890612221565b979650505050505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261115e908590612379565b6115b382836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561157657600080fd5b505afa15801561158a573d6000803e3d6000fd5b505050506040513d60208110156115a057600080fd5b50516001600160a01b038516919061242a565b600080836001600160a01b03166389afcb44846040518263ffffffff1660e01b815260040180826001600160a01b031681526020019150506040805180830381600087803b15801561160457600080fd5b505af1158015611618573d6000803e3d6000fd5b505050506040513d604081101561162e57600080fd5b50805160209091015190925090506103e882101561167d5760405162461bcd60e51b81526004018080602001828103825260268152602001806129116026913960400191505060405180910390fd5b6103e881101561115e5760405162461bcd60e51b81526004018080602001828103825260268152602001806128196026913960400191505060405180910390fd5b60408051636eb1769f60e11b81523060048201526001600160a01b03838116602483015291519184169163dd62ed3e91604480820192602092909190829003018186803b15801561170e57600080fd5b505afa158015611722573d6000803e3d6000fd5b505050506040513d602081101561173857600080fd5b5051610bea57610bea6001600160a01b0383168260001961247c565b6000805b82518110156119fd5782818151811061176d57fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b5051915081156119f5577f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b031683828151811061182b57fe5b60200260200101516001600160a01b031614156119c4577f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12706001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156118a857600080fd5b505af11580156118bc573d6000803e3d6000fd5b505060408051600080825260208201928390528151909450339350869290819081908082805b602083106119015780518252601f1990920191602091820191016118e2565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611963576040519150601f19603f3d011682016040523d82523d6000602084013e611968565b606091505b50509050806119be576040805162461bcd60e51b815260206004820152601a60248201527f42656566793a20455448207472616e73666572206661696c6564000000000000604482015290519081900360640190fd5b506119f5565b6119f533838584815181106119d557fe5b60200260200101516001600160a01b031661242a9092919063ffffffff16565b600101611758565b505050565b600080611a0e85611188565b91509150600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6060811015611a7857600080fd5b5080516020909101516001600160701b0391821693501690506103e882118015611aa357506103e881115b611ade5760405162461bcd60e51b81526004018080602001828103825260268152602001806127f36026913960400191505060405180910390fd5b6000856001600160a01b0316846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2357600080fd5b505afa158015611b37573d6000803e3d6000fd5b505050506040513d6020811015611b4d57600080fd5b50516001600160a01b03161490508080611bdc5750856001600160a01b0316846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba557600080fd5b505afa158015611bb9573d6000803e3d6000fd5b505050506040513d6020811015611bcf57600080fd5b50516001600160a01b0316145b611c175760405162461bcd60e51b815260040180806020018281038252602f815260200180612887602f913960400191505060405180910390fd5b60408051600280825260608083018452926020830190803683370190505090508681600081518110611c4557fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081611cd457846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611ca357600080fd5b505afa158015611cb7573d6000803e3d6000fd5b505050506040513d6020811015611ccd57600080fd5b5051611d3a565b846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0d57600080fd5b505afa158015611d21573d6000803e3d6000fd5b505050506040513d6020811015611d3757600080fd5b50515b81600181518110611d4757fe5b6001600160a01b03928316602091820292909201810191909152604080516370a0823160e01b815230600482015290516000938b16926370a082319260248082019391829003018186803b158015611d9e57600080fd5b505afa158015611db2573d6000803e3d6000fd5b505050506040513d6020811015611dc857600080fd5b5051905060008315611de657611ddf82878761133d565b9050611df4565b611df182868861133d565b90505b611e04836000815181106108b757fe5b60607f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff6001600160a01b03166338ed1739838d8730426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611eaa578181015183820152602001611e92565b505050509050019650505050505050600060405180830381600087803b158015611ed357600080fd5b505af1158015611ee7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f1057600080fd5b8101908080516040519392919084640100000000821115611f3057600080fd5b908301906020820185811115611f4557600080fd5b8251866020820283011164010000000082111715611f6257600080fd5b82525081516020918201928201910280838360005b83811015611f8f578181015183820152602001611f77565b505050509050016040525050509050611fae846001815181106108b757fe5b60007f000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff6001600160a01b031663e8e3370086600081518110611fec57fe5b60200260200101518760018151811061200157fe5b60200260200101516120308660008151811061201957fe5b60200260200101518961222190919063ffffffff16565b8660018151811061203d57fe5b602002602001015160018030426040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200198505050505050505050606060405180830381600087803b1580156120cc57600080fd5b505af11580156120e0573d6000803e3d6000fd5b505050506040513d60608110156120f657600080fd5b50604001519050612107898b6116be565b896001600160a01b031663b6b55f25826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561214d57600080fd5b505af1158015612161573d6000803e3d6000fd5b505050506121f3338b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156121b657600080fd5b505afa1580156121ca573d6000803e3d6000fd5b505050506040513d60208110156121e057600080fd5b50516001600160a01b038d16919061242a565b6121fc85611754565b50505050505050505050505050565b8082018281101561221b57600080fd5b92915050565b8082038281111561221b57600080fd5b60008161224057506000612374565b816001600160801b82106122595760809190911c9060401b5b6801000000000000000082106122745760409190911c9060201b5b640100000000821061228b5760209190911c9060101b5b6201000082106122a05760109190911c9060081b5b61010082106122b45760089190911c9060041b5b601082106122c75760049190911c9060021b5b600882106122d35760011b5b60018185816122de57fe5b048201901c905060018185816122f057fe5b048201901c9050600181858161230257fe5b048201901c9050600181858161231457fe5b048201901c9050600181858161232657fe5b048201901c9050600181858161233857fe5b048201901c9050600181858161234a57fe5b048201901c9050600081858161235c57fe5b04905080821061236c578061236e565b815b93505050505b919050565b60606123ce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661258f9092919063ffffffff16565b8051909150156119fd578080602001905160208110156123ed57600080fd5b50516119fd5760405162461bcd60e51b815260040180806020018281038252602a815260200180612937602a913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526119fd908490612379565b801580612502575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156124d457600080fd5b505afa1580156124e8573d6000803e3d6000fd5b505050506040513d60208110156124fe57600080fd5b5051155b61253d5760405162461bcd60e51b81526004018080602001828103825260368152602001806129616036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526119fd908490612379565b606061259e84846000856125a8565b90505b9392505050565b6060824710156125e95760405162461bcd60e51b815260040180806020018281038252602681526020018061283f6026913960400191505060405180910390fd5b6125f2856126f9565b612643576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106126825780518252601f199092019160209182019101612663565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146126e4576040519150601f19603f3d011682016040523d82523d6000602084013e6126e9565b606091505b50915091506114c08282866126ff565b3b151590565b6060831561270e5750816125a1565b82511561271e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612768578181015183820152602001612750565b50505050905090810190601f1680156127955780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe42656566793a20496e7369676e69666963616e7420696e70757420616d6f756e7442656566793a20574554482061646472657373206e6f74206d61746368696e6720526f757465722e57455448282942656566793a204c6971756964697479207061697220726573657276657320746f6f206c6f77556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c42656566793a20496e70757420746f6b656e206973206e6f7420617070726f76656442656566793a20496e70757420746f6b656e206e6f742070726573656e7420696e206c69717564697479207061697242656566793a206465736972656420746f6b656e206e6f742070726573656e7420696e206c69717564697479207061697242656566793a20496e636f6d70617469626c65206c6971756964697479207061697220666163746f7279556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e545361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212201820f479943c0e522ebeee9f31fc0890ee5b3116243a648fa64579ab7ce5c58e64736f6c63430007000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
-----Decoded View---------------
Arg [0] : _router (address): 0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff
Arg [1] : _WETH (address): 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff
Arg [1] : 0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.