Overview
ETH Balance
0.112 ETH
Eth Value
$372.92 (@ $3,329.65/ETH)More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Admin | 15617589 | 847 days ago | IN | 0 ETH | 0.00020106 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
14146669 | 1080 days ago | 0.004 ETH | ||||
14146669 | 1080 days ago | 0.004 ETH | ||||
14146657 | 1080 days ago | 0.004 ETH | ||||
14146655 | 1080 days ago | 0.004 ETH | ||||
14146652 | 1080 days ago | 0.004 ETH | ||||
14146652 | 1080 days ago | 0.004 ETH | ||||
14146652 | 1080 days ago | 0.004 ETH | ||||
14146652 | 1080 days ago | 0.004 ETH | ||||
14146652 | 1080 days ago | 0.004 ETH | ||||
14146638 | 1080 days ago | 0.004 ETH | ||||
14146638 | 1080 days ago | 0.004 ETH | ||||
14146634 | 1080 days ago | 0.004 ETH | ||||
14146629 | 1080 days ago | 0.004 ETH | ||||
14146625 | 1080 days ago | 0.004 ETH | ||||
14146625 | 1080 days ago | 0.004 ETH | ||||
14146617 | 1080 days ago | 0.004 ETH | ||||
14146615 | 1080 days ago | 0.004 ETH | ||||
14146613 | 1080 days ago | 0.004 ETH | ||||
14146611 | 1080 days ago | 0.004 ETH | ||||
14146606 | 1080 days ago | 0.004 ETH | ||||
14146604 | 1080 days ago | 0.004 ETH | ||||
14146601 | 1080 days ago | 0.004 ETH | ||||
14146587 | 1080 days ago | 0.004 ETH | ||||
13846932 | 1126 days ago | 0.004 ETH | ||||
13846427 | 1126 days ago | 0.004 ETH |
Loading...
Loading
Contract Name:
BonusPool2
Compiler Version
v0.5.17+commit.d19bba13
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.5.0; //import "debugutil.sol"; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; }*/ function min(uint x, uint y) internal pure returns (uint z) { z = x < y ? x : y; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrt(uint y) internal pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } } // File: @openzeppelin/contracts/math/SafeMath.sol pragma solidity ^0.5.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. * * _Available since v2.4.0._ */ 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. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 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. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: @openzeppelin/contracts/GSN/Context.sol pragma solidity ^0.5.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 GSN 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. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin/contracts/ownership/Ownable.sol pragma solidity ^0.5.0; /** * @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. * * 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. */ 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 () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _owner; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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 onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ 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: @openzeppelin/contracts/utils/Address.sol pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing 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. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @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]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } // File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol pragma solidity ^0.5.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 ERC20;` 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)); } 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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "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"); } } } pragma solidity ^0.5.16; interface ERC20Interface { function balanceOf(address user) external view returns (uint256); } contract ReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; constructor () internal { // The counter starts at one to prevent changing it from zero to a non-zero // value, which is a more expensive operation. _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call"); } } pragma solidity ^0.5.16; interface IWETH { function balanceOf(address user) external returns (uint); function approve(address to, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function deposit() external payable; function withdraw(uint) external; } pragma solidity ^0.5.16; interface ISwapPair { 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 price(address token, uint256 baseDecimal) external view returns (uint256); function initialize(address, address) external; } pragma solidity ^0.5.16; interface ISwapRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapMining() 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(uint256 amountA, uint256 reserveA, uint256 reserveB) external view returns (uint256 amountB); function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external view returns (uint256 amountOut); function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) external view returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); 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; } pragma solidity ^0.5.16; interface ISwapFactory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function feeToRate() external view returns (uint256); function initCodeHash() external view returns (bytes32); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; function setFeeToRate(uint256) external; function setInitCodeHash(bytes32) external; function sortTokens(address tokenA, address tokenB) external pure returns (address token0, address token1); function pairFor(address tokenA, address tokenB) external view returns (address pair); function getReserves(address tokenA, address tokenB) external view returns (uint256 reserveA, uint256 reserveB); function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external view returns (uint256 amountOut); function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) external view returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); } pragma solidity ^0.5.16; contract SwapETHOptimal is ReentrancyGuard{ using SafeMath for uint256; using SafeERC20 for IERC20; using Address for address; //uniswap v2 router for all networks ISwapRouter public router=ISwapRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public weth; address public lptoken; address constant bid=0x00000000000045166C45aF0FC6E4Cf31D9E14B9A; uint256 public receivedLPtoken; constructor() public { weth = router.WETH(); lptoken = ISwapFactory(router.factory()).getPair(weth, bid); } function optimalDeposit( uint256 amtA, uint256 amtB, uint256 resA, uint256 resB ) internal pure returns (uint256) { require(amtA.mul(resB) >= amtB.mul(resA), "Fail"); uint256 a = 997; uint256 b = uint256(1997).mul(resA); uint256 _c = (amtA.mul(resB)).sub(amtB.mul(resA)); uint256 c = _c.mul(1000).div(amtB.add(resB)).mul(resA); uint256 d = a.mul(c).mul(4); uint256 e = Math.sqrt(b.mul(b).add(d)); uint256 numerator = e.sub(b); uint256 denominator = a.mul(2); return numerator.div(denominator); } function doETH2UniswapStake(uint256 iETH, uint256 minLP ) internal nonReentrant { address token0; address token1; // 1. decode token and amount info, and transfer to contract. require(iETH<=address(this).balance, "Not enough ETH!"); IWETH(weth).deposit.value(iETH)(); // tokens are all ERC20 token now. ISwapPair lpToken = ISwapPair(lptoken); token0 = lpToken.token0(); token1 = lpToken.token1(); (uint256 token0Reserve, uint256 token1Reserve,) = lpToken.getReserves(); (uint256 wethReserve, uint256 bidReserve) = weth == lpToken.token0() ? (token0Reserve, token1Reserve) : (token1Reserve, token0Reserve); //no bid token is supplied by customer uint256 swapAmt = optimalDeposit(IERC20(weth).balanceOf(address(this)), 0, wethReserve, bidReserve); if(swapAmt>wethReserve.div(10)){ swapAmt=wethReserve.div(10); } require(swapAmt>0, "swapAmt must great then 0"); // 2. Compute the optimal amount of token0 and token1 to be converted. uint256 left=0; { IERC20(weth).safeApprove(address(router), 0); IERC20(weth).safeApprove(address(router), uint256(-1)); IERC20(bid).safeApprove(address(router), 0); IERC20(bid).safeApprove(address(router), uint256(-1)); // 3. swap and mint LP tokens. address[] memory path = new address[](2); (path[0], path[1]) = (weth, bid); uint[] memory am=router.swapExactTokensForTokens(swapAmt, minLP, path, address(this), now); uint256 nbid=am[1]; (,uint256 amountBid, uint256 moreLPAmount) = router.addLiquidity(weth, bid, IERC20(weth).balanceOf(address(this)), //this contract use bid as bonus,so limit bid nbid, 0, 0, address(this), now); receivedLPtoken=moreLPAmount; left=nbid.sub(amountBid); } safeUnWrapperAndAllSend(weth, msg.sender); if(left>0){ IERC20(bid).safeTransfer(msg.sender, left); } } function safeUnWrapperAndAllSend(address token, address to) internal { uint256 total = IERC20(token).balanceOf(address(this)); if (total > 0) { if (token == weth) { IWETH(weth).transfer(to, total); } else { IERC20(token).safeTransfer(to, total); } } } } contract BonusPool2 is SwapETHOptimal { address public bonusPool; address public _admin; event LOG_SETADMIN( address indexed caller, address indexed admin ); event LOG_SETPOOL( address indexed caller, address indexed pool ); event LOG_POOLETHTRANSFER( address indexed caller, uint256 balance ); event LOG_POOLLPTRANSFER( address indexed caller, uint256 balance ); constructor( address _pool ) SwapETHOptimal() public { _admin=msg.sender; bonusPool=_pool; } function () external payable {} function setAdmin(address b) onlyAdmin external { emit LOG_SETADMIN(msg.sender, b); _admin = b; } modifier onlyAdmin() { require( msg.sender == _admin, "ERR_NOT_ADMIN" ); _; } function setBonusPool(address b) onlyAdmin external { bonusPool = b; emit LOG_SETPOOL(msg.sender, b); } function swapETH2LP(uint256 iETH, uint256 minLP) onlyAdmin external{ doETH2UniswapStake(iETH, minLP); } function transferETH(address _pool) onlyAdmin external { uint256 balance=address(this).balance; (bool success, ) =address(uint160(_pool)).call.value(balance)(""); require(success,"ERR contract transfer eth to bonusPool fail,maybe gas fail"); emit LOG_POOLETHTRANSFER(msg.sender, balance); } function transferLPToken(uint256 amountLP) onlyAdmin external { uint256 balance=IERC20(lptoken).balanceOf(address(this)); require(amountLP<=balance, "Not enought balance"); IERC20(lptoken).safeTransfer(bonusPool,amountLP); emit LOG_POOLLPTRANSFER(msg.sender, balance); } function getLPAmount() external view returns(uint256){ return IERC20(lptoken).balanceOf(address(this)); } function getWethBidReserves() external view returns(uint256,uint256) { (uint256 token0Reserve, uint256 token1Reserve,) = ISwapPair(lptoken).getReserves(); (uint256 wethReserve,uint256 bidReserve ) = weth == ISwapPair(lptoken).token0() ? (token0Reserve, token1Reserve) : (token1Reserve, token0Reserve); return (wethReserve,bidReserve); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 800 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"LOG_POOLETHTRANSFER","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"LOG_POOLLPTRANSFER","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"admin","type":"address"}],"name":"LOG_SETADMIN","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"LOG_SETPOOL","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"_admin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bonusPool","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLPAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getWethBidReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lptoken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"receivedLPtoken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"router","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"b","type":"address"}],"name":"setAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"b","type":"address"}],"name":"setBonusPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"iETH","type":"uint256"},{"internalType":"uint256","name":"minLP","type":"uint256"}],"name":"swapETH2LP","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"name":"transferETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amountLP","type":"uint256"}],"name":"transferLPToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600180546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d1790553480156200003757600080fd5b5060405162001df338038062001df3833981810160405260208110156200005d57600080fd5b50516001600081905554604080516315ab88c960e31b815290516001600160a01b039092169163ad5c464891600480820192602092909190829003018186803b158015620000aa57600080fd5b505afa158015620000bf573d6000803e3d6000fd5b505050506040513d6020811015620000d657600080fd5b5051600280546001600160a01b0319166001600160a01b039283161790556001546040805163c45a015560e01b81529051919092169163c45a0155916004808301926020929190829003018186803b1580156200013257600080fd5b505afa15801562000147573d6000803e3d6000fd5b505050506040513d60208110156200015e57600080fd5b50516002546040805163e6a4390560e01b81526001600160a01b0392831660048201526d45166c45af0fc6e4cf31d9e14b9a60248201529051919092169163e6a43905916044808301926020929190829003018186803b158015620001c257600080fd5b505afa158015620001d7573d6000803e3d6000fd5b505050506040513d6020811015620001ee57600080fd5b5051600380546001600160a01b039283166001600160a01b0319918216179091556006805482163317905560058054939092169216919091179055611bba80620002396000396000f3fe6080604052600436106100d25760003560e01c8063b27520391161007f578063ee1baebc11610059578063ee1baebc14610234578063f363393b1461025e578063f4494fa314610273578063f887ea40146102a1576100d2565b8063b2752039146101b9578063d50f6bf0146101ec578063e90fd4981461021f576100d2565b80632693ee80116100b05780632693ee801461015c5780633fc8cef314610171578063704b6c0214610186576100d2565b806301bc45c9146100d45780630bbcad0a1461010557806319d258cc14610135575b005b3480156100e057600080fd5b506100e96102b6565b604080516001600160a01b039092168252519081900360200190f35b34801561011157600080fd5b506100d26004803603604081101561012857600080fd5b50803590602001356102c5565b34801561014157600080fd5b5061014a610322565b60408051918252519081900360200190f35b34801561016857600080fd5b506100e961039e565b34801561017d57600080fd5b506100e96103ad565b34801561019257600080fd5b506100d2600480360360208110156101a957600080fd5b50356001600160a01b03166103bc565b3480156101c557600080fd5b506100d2600480360360208110156101dc57600080fd5b50356001600160a01b0316610470565b3480156101f857600080fd5b506100d26004803603602081101561020f57600080fd5b50356001600160a01b0316610518565b34801561022b57600080fd5b5061014a610634565b34801561024057600080fd5b506100d26004803603602081101561025757600080fd5b503561063a565b34801561026a57600080fd5b506100e96107b4565b34801561027f57600080fd5b506102886107c3565b6040805192835260208301919091528051918290030190f35b3480156102ad57600080fd5b506100e9610901565b6006546001600160a01b031681565b6006546001600160a01b03163314610314576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b61031e8282610910565b5050565b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561036d57600080fd5b505afa158015610381573d6000803e3d6000fd5b505050506040513d602081101561039757600080fd5b5051905090565b6005546001600160a01b031681565b6002546001600160a01b031681565b6006546001600160a01b0316331461040b576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b6040516001600160a01b0382169033907fbfa680069f0f0e6a95e5ea3c7badfe8494328a6204ff7f67e11f6c008e3a3d5690600090a36006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6006546001600160a01b031633146104bf576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405133907f7959082318446c07030a54dd68217235a26890c95af69c3a39f4d0cebea6a15590600090a350565b6006546001600160a01b03163314610567576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b60405147906000906001600160a01b0384169083908381818185875af1925050503d80600081146105b4576040519150601f19603f3d011682016040523d82523d6000602084013e6105b9565b606091505b50509050806105f95760405162461bcd60e51b815260040180806020018281038252603a815260200180611aec603a913960400191505060405180910390fd5b60408051838152905133917f2d11669d7ca27707e7caf124ef4344567a7c150c44a9d7d777167a7a7777daae919081900360200190a2505050565b60045481565b6006546001600160a01b03163314610689576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156106d457600080fd5b505afa1580156106e8573d6000803e3d6000fd5b505050506040513d60208110156106fe57600080fd5b5051905080821115610757576040805162461bcd60e51b815260206004820152601360248201527f4e6f7420656e6f756768742062616c616e636500000000000000000000000000604482015290519081900360640190fd5b60055460035461077a916001600160a01b0391821691168463ffffffff6111ff16565b60408051828152905133917f78075a46e5c82db27e0af1a9caa67b1f9d8b804c875caf0b3173200d0358376c919081900360200190a25050565b6003546001600160a01b031681565b600080600080600360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561081757600080fd5b505afa15801561082b573d6000803e3d6000fd5b505050506040513d606081101561084157600080fd5b50805160209182015160035460408051630dfe168160e01b815290516dffffffffffffffffffffffffffff948516975093909216945060009384936001600160a01b0390921692630dfe16819260048083019392829003018186803b1580156108a957600080fd5b505afa1580156108bd573d6000803e3d6000fd5b505050506040513d60208110156108d357600080fd5b50516002546001600160a01b039081169116146108f15782846108f4565b83835b9096509450505050509091565b6001546001600160a01b031681565b60008054600101808255908047851115610971576040805162461bcd60e51b815260206004820152600f60248201527f4e6f7420656e6f75676820455448210000000000000000000000000000000000604482015290519081900360640190fd5b600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109c157600080fd5b505af11580156109d5573d6000803e3d6000fd5b505060035460408051630dfe168160e01b815290516001600160a01b039092169450849350630dfe16819250600480820192602092909190829003018186803b158015610a2157600080fd5b505afa158015610a35573d6000803e3d6000fd5b505050506040513d6020811015610a4b57600080fd5b50516040805163d21220a760e01b815290519194506001600160a01b0383169163d21220a791600480820192602092909190829003018186803b158015610a9157600080fd5b505afa158015610aa5573d6000803e3d6000fd5b505050506040513d6020811015610abb57600080fd5b505160408051630240bc6b60e21b8152905191935060009182916001600160a01b03851691630902f1ac91600480820192606092909190829003018186803b158015610b0657600080fd5b505afa158015610b1a573d6000803e3d6000fd5b505050506040513d6060811015610b3057600080fd5b50805160209182015160408051630dfe168160e01b815290516dffffffffffffffffffffffffffff938416965092909116935060009283926001600160a01b03881692630dfe1681926004808301939192829003018186803b158015610b9557600080fd5b505afa158015610ba9573d6000803e3d6000fd5b505050506040513d6020811015610bbf57600080fd5b50516002546001600160a01b03908116911614610bdd578284610be0565b83835b600254604080516370a0823160e01b81523060048201529051939550919350600092610c6c926001600160a01b03909216916370a08231916024808301926020929190829003018186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b505160008585611266565b9050610c7f83600a63ffffffff6113e416565b811115610c9a57610c9783600a63ffffffff6113e416565b90505b60008111610cef576040805162461bcd60e51b815260206004820152601960248201527f73776170416d74206d757374206772656174207468656e203000000000000000604482015290519081900360640190fd5b600154600254600091610d15916001600160a01b0390811691168363ffffffff61142f16565b600154600254610d3a916001600160a01b03918216911660001963ffffffff61142f16565b600154610d67906d45166c45af0fc6e4cf31d9e14b9a906001600160a01b0316600063ffffffff61142f16565b600154610d95906d45166c45af0fc6e4cf31d9e14b9a906001600160a01b031660001963ffffffff61142f16565b6040805160028082526060808301845292602083019080388339505060025482519293506001600160a01b0316916d45166c45af0fc6e4cf31d9e14b9a91508390600090610ddf57fe5b6020026020010183600181518110610df357fe5b60200260200101826001600160a01b03166001600160a01b0316815250826001600160a01b03166001600160a01b031681525050506060600160009054906101000a90046001600160a01b03166001600160a01b03166338ed1739858f8530426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015610ecc578181015183820152602001610eb4565b505050509050019650505050505050600060405180830381600087803b158015610ef557600080fd5b505af1158015610f09573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610f3257600080fd5b8101908080516040519392919084640100000000821115610f5257600080fd5b908301906020820185811115610f6757600080fd5b8251866020820283011164010000000082111715610f8457600080fd5b82525081516020918201928201910280838360005b83811015610fb1578181015183820152602001610f99565b505050509050016040525050509050600081600181518110610fcf57fe5b602090810291909101810151600154600254604080516370a0823160e01b8152306004820152905193955060009485946001600160a01b039485169463e8e337009416926d45166c45af0fc6e4cf31d9e14b9a9284926370a08231926024808201939291829003018186803b15801561104757600080fd5b505afa15801561105b573d6000803e3d6000fd5b505050506040513d602081101561107157600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b03948516600482015292909316602483015260448201526064810187905260006084820181905260a482018190523060c48301524260e483015291516101048083019360609383900390910190829087803b15801561110557600080fd5b505af1158015611119573d6000803e3d6000fd5b505050506040513d606081101561112f57600080fd5b50602081015160409091015160048190559092509050611155838363ffffffff61155716565b60025490965061117695506001600160a01b03169350339250611599915050565b801561119b5761119b6d45166c45af0fc6e4cf31d9e14b9a338363ffffffff6111ff16565b50505050505050505060005481146111fa576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790526111fa9084906116cf565b6000611278848463ffffffff61188d16565b611288868463ffffffff61188d16565b10156112c4576040805162461bcd60e51b8152602060048083019190915260248201526311985a5b60e21b604482015290519081900360640190fd5b6103e560006112db6107cd8663ffffffff61188d16565b9050600061130e6112f2888863ffffffff61188d16565b6113028a8863ffffffff61188d16565b9063ffffffff61155716565b90506000611353876113476113298b8a63ffffffff6118e616565b61133b866103e863ffffffff61188d16565b9063ffffffff6113e416565b9063ffffffff61188d16565b9050600061136c6004611347878563ffffffff61188d16565b9050600061139861139383611387888063ffffffff61188d16565b9063ffffffff6118e616565b611940565b905060006113ac828763ffffffff61155716565b905060006113c188600263ffffffff61188d16565b90506113d3828263ffffffff6113e416565b9d9c50505050505050505050505050565b600061142683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611992565b90505b92915050565b8015806114b5575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561148757600080fd5b505afa15801561149b573d6000803e3d6000fd5b505050506040513d60208110156114b157600080fd5b5051155b6114f05760405162461bcd60e51b8152600401808060200182810382526036815260200180611b506036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b1790526111fa9084906116cf565b600061142683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a34565b604080516370a0823160e01b815230600482015290516000916001600160a01b038516916370a0823191602480820192602092909190829003018186803b1580156115e357600080fd5b505afa1580156115f7573d6000803e3d6000fd5b505050506040513d602081101561160d57600080fd5b5051905080156111fa576002546001600160a01b03848116911614156116b5576002546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561168357600080fd5b505af1158015611697573d6000803e3d6000fd5b505050506040513d60208110156116ad57600080fd5b506111fa9050565b6111fa6001600160a01b038416838363ffffffff6111ff16565b6116e1826001600160a01b0316611a8e565b611732576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106117705780518252601f199092019160209182019101611751565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146117d2576040519150601f19603f3d011682016040523d82523d6000602084013e6117d7565b606091505b50915091508161182e576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156118875780806020019051602081101561184a57600080fd5b50516118875760405162461bcd60e51b815260040180806020018281038252602a815260200180611b26602a913960400191505060405180910390fd5b50505050565b60008261189c57506000611429565b828202828482816118a957fe5b04146114265760405162461bcd60e51b8152600401808060200182810382526021815260200180611acb6021913960400191505060405180910390fd5b600082820183811015611426576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006003821115611983575080600160028204015b8181101561197d5780915060028182858161196c57fe5b04018161197557fe5b049050611955565b5061198d565b811561198d575060015b919050565b60008183611a1e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119e35781810151838201526020016119cb565b50505050905090810190601f168015611a105780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611a2a57fe5b0495945050505050565b60008184841115611a865760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156119e35781810151838201526020016119cb565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611ac25750808214155b94935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745525220636f6e7472616374207472616e736665722065746820746f20626f6e7573506f6f6c206661696c2c6d6179626520676173206661696c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820ca2c25c590c67affcd2f0555c6d336e5d8834f18211d3a2238f437e4e9163ae864736f6c63430005110032000000000000000000000000c37f3a8c511329c9028b8d82f491847256b56de7
Deployed Bytecode
0x6080604052600436106100d25760003560e01c8063b27520391161007f578063ee1baebc11610059578063ee1baebc14610234578063f363393b1461025e578063f4494fa314610273578063f887ea40146102a1576100d2565b8063b2752039146101b9578063d50f6bf0146101ec578063e90fd4981461021f576100d2565b80632693ee80116100b05780632693ee801461015c5780633fc8cef314610171578063704b6c0214610186576100d2565b806301bc45c9146100d45780630bbcad0a1461010557806319d258cc14610135575b005b3480156100e057600080fd5b506100e96102b6565b604080516001600160a01b039092168252519081900360200190f35b34801561011157600080fd5b506100d26004803603604081101561012857600080fd5b50803590602001356102c5565b34801561014157600080fd5b5061014a610322565b60408051918252519081900360200190f35b34801561016857600080fd5b506100e961039e565b34801561017d57600080fd5b506100e96103ad565b34801561019257600080fd5b506100d2600480360360208110156101a957600080fd5b50356001600160a01b03166103bc565b3480156101c557600080fd5b506100d2600480360360208110156101dc57600080fd5b50356001600160a01b0316610470565b3480156101f857600080fd5b506100d26004803603602081101561020f57600080fd5b50356001600160a01b0316610518565b34801561022b57600080fd5b5061014a610634565b34801561024057600080fd5b506100d26004803603602081101561025757600080fd5b503561063a565b34801561026a57600080fd5b506100e96107b4565b34801561027f57600080fd5b506102886107c3565b6040805192835260208301919091528051918290030190f35b3480156102ad57600080fd5b506100e9610901565b6006546001600160a01b031681565b6006546001600160a01b03163314610314576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b61031e8282610910565b5050565b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561036d57600080fd5b505afa158015610381573d6000803e3d6000fd5b505050506040513d602081101561039757600080fd5b5051905090565b6005546001600160a01b031681565b6002546001600160a01b031681565b6006546001600160a01b0316331461040b576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b6040516001600160a01b0382169033907fbfa680069f0f0e6a95e5ea3c7badfe8494328a6204ff7f67e11f6c008e3a3d5690600090a36006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6006546001600160a01b031633146104bf576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405133907f7959082318446c07030a54dd68217235a26890c95af69c3a39f4d0cebea6a15590600090a350565b6006546001600160a01b03163314610567576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b60405147906000906001600160a01b0384169083908381818185875af1925050503d80600081146105b4576040519150601f19603f3d011682016040523d82523d6000602084013e6105b9565b606091505b50509050806105f95760405162461bcd60e51b815260040180806020018281038252603a815260200180611aec603a913960400191505060405180910390fd5b60408051838152905133917f2d11669d7ca27707e7caf124ef4344567a7c150c44a9d7d777167a7a7777daae919081900360200190a2505050565b60045481565b6006546001600160a01b03163314610689576040805162461bcd60e51b815260206004820152600d60248201526c22a9292fa727aa2fa0a226a4a760991b604482015290519081900360640190fd5b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156106d457600080fd5b505afa1580156106e8573d6000803e3d6000fd5b505050506040513d60208110156106fe57600080fd5b5051905080821115610757576040805162461bcd60e51b815260206004820152601360248201527f4e6f7420656e6f756768742062616c616e636500000000000000000000000000604482015290519081900360640190fd5b60055460035461077a916001600160a01b0391821691168463ffffffff6111ff16565b60408051828152905133917f78075a46e5c82db27e0af1a9caa67b1f9d8b804c875caf0b3173200d0358376c919081900360200190a25050565b6003546001600160a01b031681565b600080600080600360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561081757600080fd5b505afa15801561082b573d6000803e3d6000fd5b505050506040513d606081101561084157600080fd5b50805160209182015160035460408051630dfe168160e01b815290516dffffffffffffffffffffffffffff948516975093909216945060009384936001600160a01b0390921692630dfe16819260048083019392829003018186803b1580156108a957600080fd5b505afa1580156108bd573d6000803e3d6000fd5b505050506040513d60208110156108d357600080fd5b50516002546001600160a01b039081169116146108f15782846108f4565b83835b9096509450505050509091565b6001546001600160a01b031681565b60008054600101808255908047851115610971576040805162461bcd60e51b815260206004820152600f60248201527f4e6f7420656e6f75676820455448210000000000000000000000000000000000604482015290519081900360640190fd5b600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109c157600080fd5b505af11580156109d5573d6000803e3d6000fd5b505060035460408051630dfe168160e01b815290516001600160a01b039092169450849350630dfe16819250600480820192602092909190829003018186803b158015610a2157600080fd5b505afa158015610a35573d6000803e3d6000fd5b505050506040513d6020811015610a4b57600080fd5b50516040805163d21220a760e01b815290519194506001600160a01b0383169163d21220a791600480820192602092909190829003018186803b158015610a9157600080fd5b505afa158015610aa5573d6000803e3d6000fd5b505050506040513d6020811015610abb57600080fd5b505160408051630240bc6b60e21b8152905191935060009182916001600160a01b03851691630902f1ac91600480820192606092909190829003018186803b158015610b0657600080fd5b505afa158015610b1a573d6000803e3d6000fd5b505050506040513d6060811015610b3057600080fd5b50805160209182015160408051630dfe168160e01b815290516dffffffffffffffffffffffffffff938416965092909116935060009283926001600160a01b03881692630dfe1681926004808301939192829003018186803b158015610b9557600080fd5b505afa158015610ba9573d6000803e3d6000fd5b505050506040513d6020811015610bbf57600080fd5b50516002546001600160a01b03908116911614610bdd578284610be0565b83835b600254604080516370a0823160e01b81523060048201529051939550919350600092610c6c926001600160a01b03909216916370a08231916024808301926020929190829003018186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b505160008585611266565b9050610c7f83600a63ffffffff6113e416565b811115610c9a57610c9783600a63ffffffff6113e416565b90505b60008111610cef576040805162461bcd60e51b815260206004820152601960248201527f73776170416d74206d757374206772656174207468656e203000000000000000604482015290519081900360640190fd5b600154600254600091610d15916001600160a01b0390811691168363ffffffff61142f16565b600154600254610d3a916001600160a01b03918216911660001963ffffffff61142f16565b600154610d67906d45166c45af0fc6e4cf31d9e14b9a906001600160a01b0316600063ffffffff61142f16565b600154610d95906d45166c45af0fc6e4cf31d9e14b9a906001600160a01b031660001963ffffffff61142f16565b6040805160028082526060808301845292602083019080388339505060025482519293506001600160a01b0316916d45166c45af0fc6e4cf31d9e14b9a91508390600090610ddf57fe5b6020026020010183600181518110610df357fe5b60200260200101826001600160a01b03166001600160a01b0316815250826001600160a01b03166001600160a01b031681525050506060600160009054906101000a90046001600160a01b03166001600160a01b03166338ed1739858f8530426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015610ecc578181015183820152602001610eb4565b505050509050019650505050505050600060405180830381600087803b158015610ef557600080fd5b505af1158015610f09573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610f3257600080fd5b8101908080516040519392919084640100000000821115610f5257600080fd5b908301906020820185811115610f6757600080fd5b8251866020820283011164010000000082111715610f8457600080fd5b82525081516020918201928201910280838360005b83811015610fb1578181015183820152602001610f99565b505050509050016040525050509050600081600181518110610fcf57fe5b602090810291909101810151600154600254604080516370a0823160e01b8152306004820152905193955060009485946001600160a01b039485169463e8e337009416926d45166c45af0fc6e4cf31d9e14b9a9284926370a08231926024808201939291829003018186803b15801561104757600080fd5b505afa15801561105b573d6000803e3d6000fd5b505050506040513d602081101561107157600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b03948516600482015292909316602483015260448201526064810187905260006084820181905260a482018190523060c48301524260e483015291516101048083019360609383900390910190829087803b15801561110557600080fd5b505af1158015611119573d6000803e3d6000fd5b505050506040513d606081101561112f57600080fd5b50602081015160409091015160048190559092509050611155838363ffffffff61155716565b60025490965061117695506001600160a01b03169350339250611599915050565b801561119b5761119b6d45166c45af0fc6e4cf31d9e14b9a338363ffffffff6111ff16565b50505050505050505060005481146111fa576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790526111fa9084906116cf565b6000611278848463ffffffff61188d16565b611288868463ffffffff61188d16565b10156112c4576040805162461bcd60e51b8152602060048083019190915260248201526311985a5b60e21b604482015290519081900360640190fd5b6103e560006112db6107cd8663ffffffff61188d16565b9050600061130e6112f2888863ffffffff61188d16565b6113028a8863ffffffff61188d16565b9063ffffffff61155716565b90506000611353876113476113298b8a63ffffffff6118e616565b61133b866103e863ffffffff61188d16565b9063ffffffff6113e416565b9063ffffffff61188d16565b9050600061136c6004611347878563ffffffff61188d16565b9050600061139861139383611387888063ffffffff61188d16565b9063ffffffff6118e616565b611940565b905060006113ac828763ffffffff61155716565b905060006113c188600263ffffffff61188d16565b90506113d3828263ffffffff6113e416565b9d9c50505050505050505050505050565b600061142683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611992565b90505b92915050565b8015806114b5575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561148757600080fd5b505afa15801561149b573d6000803e3d6000fd5b505050506040513d60208110156114b157600080fd5b5051155b6114f05760405162461bcd60e51b8152600401808060200182810382526036815260200180611b506036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b1790526111fa9084906116cf565b600061142683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a34565b604080516370a0823160e01b815230600482015290516000916001600160a01b038516916370a0823191602480820192602092909190829003018186803b1580156115e357600080fd5b505afa1580156115f7573d6000803e3d6000fd5b505050506040513d602081101561160d57600080fd5b5051905080156111fa576002546001600160a01b03848116911614156116b5576002546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561168357600080fd5b505af1158015611697573d6000803e3d6000fd5b505050506040513d60208110156116ad57600080fd5b506111fa9050565b6111fa6001600160a01b038416838363ffffffff6111ff16565b6116e1826001600160a01b0316611a8e565b611732576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106117705780518252601f199092019160209182019101611751565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146117d2576040519150601f19603f3d011682016040523d82523d6000602084013e6117d7565b606091505b50915091508161182e576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156118875780806020019051602081101561184a57600080fd5b50516118875760405162461bcd60e51b815260040180806020018281038252602a815260200180611b26602a913960400191505060405180910390fd5b50505050565b60008261189c57506000611429565b828202828482816118a957fe5b04146114265760405162461bcd60e51b8152600401808060200182810382526021815260200180611acb6021913960400191505060405180910390fd5b600082820183811015611426576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006003821115611983575080600160028204015b8181101561197d5780915060028182858161196c57fe5b04018161197557fe5b049050611955565b5061198d565b811561198d575060015b919050565b60008183611a1e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119e35781810151838201526020016119cb565b50505050905090810190601f168015611a105780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611a2a57fe5b0495945050505050565b60008184841115611a865760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156119e35781810151838201526020016119cb565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611ac25750808214155b94935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745525220636f6e7472616374207472616e736665722065746820746f20626f6e7573506f6f6c206661696c2c6d6179626520676173206661696c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820ca2c25c590c67affcd2f0555c6d336e5d8834f18211d3a2238f437e4e9163ae864736f6c63430005110032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c37f3a8c511329c9028b8d82f491847256b56de7
-----Decoded View---------------
Arg [0] : _pool (address): 0xC37f3a8c511329C9028b8D82f491847256B56dE7
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c37f3a8c511329c9028b8d82f491847256b56de7
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,329.65 | 0.112 | $372.92 |
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.