Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 10987362 | 1439 days ago | IN | 0 ETH | 0.04518376 |
Loading...
Loading
Contract Name:
PickleSwap
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-10-04 */ // hevm: flattened sources of src/pickle-swap.sol pragma solidity >=0.4.23 >=0.6.0 <0.7.0 >=0.6.2 <0.7.0 >=0.6.7 <0.7.0; ////// src/interfaces/uniswapv2.sol // SPDX-License-Identifier: MIT /* pragma solidity ^0.6.2; */ interface UniswapRouterV2 { function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); 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 swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); } interface IUniswapV2Pair { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 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 (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 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 (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Burn( address indexed sender, uint256 amount0, uint256 amount1, address indexed to ); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); 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 (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function burn(address to) external returns (uint256 amount0, uint256 amount1); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; } interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function createPair(address tokenA, address tokenB) external returns (address pair); } ////// src/lib/safe-math.sol /* pragma solidity ^0.6.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; } } ////// src/lib/erc20.sol // File: contracts/GSN/Context.sol /* pragma solidity ^0.6.0; */ /* import "./safe-math.sol"; */ /* * @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. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: contracts/token/ERC20/IERC20.sol /** * @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/utils/Address.sol /** * @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"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); 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/token/ERC20/ERC20.sol /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } /** * @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"); } } } ////// src/pickle-swap.sol /* pragma solidity ^0.6.7; */ /* import "./lib/erc20.sol"; */ /* import "./interfaces/uniswapv2.sol"; */ contract PickleSwap { using SafeERC20 for IERC20; UniswapRouterV2 router = UniswapRouterV2( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; function convertWETHPair( address fromLP, address toLP, uint256 value ) public { IUniswapV2Pair fromPair = IUniswapV2Pair(fromLP); IUniswapV2Pair toPair = IUniswapV2Pair(toLP); // Only for WETH/<TOKEN> pairs if (!(fromPair.token0() == weth || fromPair.token1() == weth)) { revert("!eth-from"); } if (!(toPair.token0() == weth || toPair.token1() == weth)) { revert("!eth-to"); } // Get non-eth token from pairs address _from = fromPair.token0() != weth ? fromPair.token0() : fromPair.token1(); address _to = toPair.token0() != weth ? toPair.token0() : toPair.token1(); // Transfer IERC20(fromLP).safeTransferFrom(msg.sender, address(this), value); // Remove liquidity IERC20(fromLP).safeApprove(address(router), 0); IERC20(fromLP).safeApprove(address(router), value); router.removeLiquidity( fromPair.token0(), fromPair.token1(), value, 0, 0, address(this), now + 60 ); // Convert to target token address[] memory path = new address[](3); path[0] = _from; path[1] = weth; path[2] = _to; IERC20(_from).safeApprove(address(router), 0); IERC20(_from).safeApprove(address(router), uint256(-1)); router.swapExactTokensForTokens( IERC20(_from).balanceOf(address(this)), 0, path, address(this), now + 60 ); // Supply liquidity IERC20(weth).safeApprove(address(router), 0); IERC20(weth).safeApprove(address(router), uint256(-1)); IERC20(_to).safeApprove(address(router), 0); IERC20(_to).safeApprove(address(router), uint256(-1)); router.addLiquidity( weth, _to, IERC20(weth).balanceOf(address(this)), IERC20(_to).balanceOf(address(this)), 0, 0, msg.sender, now + 60 ); // Refund sender any remaining tokens IERC20(weth).safeTransfer( msg.sender, IERC20(weth).balanceOf(address(this)) ); IERC20(_to).safeTransfer(msg.sender, IERC20(_to).balanceOf(address(this))); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"fromLP","type":"address"},{"internalType":"address","name":"toLP","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"convertWETHPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d17905534801561003657600080fd5b50611318806100466000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633fc8cef31461003b578063db52f4201461005f575b600080fd5b610043610097565b604080516001600160a01b039092168252519081900360200190f35b6100956004803603606081101561007557600080fd5b506001600160a01b038135811691602081013590911690604001356100a9565b005b60008051602061126383398151915281565b600083905060008390506000805160206112638339815191526001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561010457600080fd5b505afa158015610118573d6000803e3d6000fd5b505050506040513d602081101561012e57600080fd5b50516001600160a01b031614806101c857506000805160206112638339815191526001600160a01b0316826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561019157600080fd5b505afa1580156101a5573d6000803e3d6000fd5b505050506040513d60208110156101bb57600080fd5b50516001600160a01b0316145b610205576040805162461bcd60e51b8152602060048201526009602482015268216574682d66726f6d60b81b604482015290519081900360640190fd5b6000805160206112638339815191526001600160a01b0316816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561025657600080fd5b505afa15801561026a573d6000803e3d6000fd5b505050506040513d602081101561028057600080fd5b50516001600160a01b0316148061031a57506000805160206112638339815191526001600160a01b0316816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e357600080fd5b505afa1580156102f7573d6000803e3d6000fd5b505050506040513d602081101561030d57600080fd5b50516001600160a01b0316145b610355576040805162461bcd60e51b8152602060048201526007602482015266216574682d746f60c81b604482015290519081900360640190fd5b60006000805160206112638339815191526001600160a01b0316836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156103a857600080fd5b505afa1580156103bc573d6000803e3d6000fd5b505050506040513d60208110156103d257600080fd5b50516001600160a01b0316141561044d57826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561041c57600080fd5b505afa158015610430573d6000803e3d6000fd5b505050506040513d602081101561044657600080fd5b50516104b3565b826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561048657600080fd5b505afa15801561049a573d6000803e3d6000fd5b505050506040513d60208110156104b057600080fd5b50515b905060006000805160206112638339815191526001600160a01b0316836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b50516001600160a01b031614156105ad57826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561057c57600080fd5b505afa158015610590573d6000803e3d6000fd5b505050506040513d60208110156105a657600080fd5b5051610613565b826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e657600080fd5b505afa1580156105fa573d6000803e3d6000fd5b505050506040513d602081101561061057600080fd5b50515b905061062a6001600160a01b038816333088610e23565b60008054610645916001600160a01b038a8116921690610e83565b60005461065f906001600160a01b03898116911687610e83565b60008054906101000a90046001600160a01b03166001600160a01b031663baa2abde856001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156106ba57600080fd5b505afa1580156106ce573d6000803e3d6000fd5b505050506040513d60208110156106e457600080fd5b50516040805163d21220a760e01b815290516001600160a01b0389169163d21220a7916004808301926020929190829003018186803b15801561072657600080fd5b505afa15801561073a573d6000803e3d6000fd5b505050506040513d602081101561075057600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201899052600060648301819052608483018190523060a4840152603c420160c4840152815160e4808501949192918390030190829087803b1580156107c757600080fd5b505af11580156107db573d6000803e3d6000fd5b505050506040513d60408110156107f157600080fd5b505060408051600380825260808201909252606091602082018380368337019050509050828160008151811061082357fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506000805160206112638339815191528160018151811061085f57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061088d57fe5b6001600160a01b039283166020918202929092010152600080546108b79286811692911690610e83565b6000546108d3906001600160a01b038581169116600019610e83565b600054604080516370a0823160e01b815230600482015290516001600160a01b03928316926338ed173992908716916370a0823191602480820192602092909190829003018186803b15801561092857600080fd5b505afa15801561093c573d6000803e3d6000fd5b505050506040513d602081101561095257600080fd5b50516040516001600160e01b031960e084901b168152600481018281526000602483018190523060648401819052603c42016084850181905260a060448601908152895160a4870152895193958a95939492939260c490910190602087810191028083838b5b838110156109d05781810151838201526020016109b8565b505050509050019650505050505050600060405180830381600087803b1580156109f957600080fd5b505af1158015610a0d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a3657600080fd5b8101908080516040519392919084640100000000821115610a5657600080fd5b908301906020820185811115610a6b57600080fd5b8251866020820283011164010000000082111715610a8857600080fd5b82525081516020918201928201910280838360005b83811015610ab5578181015183820152602001610a9d565b5050505091909101604052505060008054610aec945060008051602061126383398151915293506001600160a01b03169150610e83565b600054610b1490600080516020611263833981519152906001600160a01b0316600019610e83565b60008054610b2f916001600160a01b03858116921690610e83565b600054610b4b906001600160a01b038481169116600019610e83565b600054604080516370a0823160e01b815230600482015290516001600160a01b039092169163e8e337009160008051602061126383398151915291869183916370a0823191602480820192602092909190829003018186803b158015610bb057600080fd5b505afa158015610bc4573d6000803e3d6000fd5b505050506040513d6020811015610bda57600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b038916916370a08231916024808301926020929190829003018186803b158015610c2257600080fd5b505afa158015610c36573d6000803e3d6000fd5b505050506040513d6020811015610c4c57600080fd5b5051604080516001600160e01b031960e088901b1681526001600160a01b0395861660048201529390941660248401526044830191909152606482015260006084820181905260a482018190523360c4830152603c420160e483015291516101048083019360609383900390910190829087803b158015610ccc57600080fd5b505af1158015610ce0573d6000803e3d6000fd5b505050506040513d6060811015610cf657600080fd5b5050604080516370a0823160e01b81523060048201529051610d8b913391600080516020611263833981519152916370a08231916024808301926020929190829003018186803b158015610d4957600080fd5b505afa158015610d5d573d6000803e3d6000fd5b505050506040513d6020811015610d7357600080fd5b50516000805160206112638339815191529190610f9b565b610e1933836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610ddc57600080fd5b505afa158015610df0573d6000803e3d6000fd5b505050506040513d6020811015610e0657600080fd5b50516001600160a01b0385169190610f9b565b5050505050505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610e7d908590610fe9565b50505050565b801580610f09575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015610edb57600080fd5b505afa158015610eef573d6000803e3d6000fd5b505050506040513d6020811015610f0557600080fd5b5051155b610f445760405162461bcd60e51b81526004018080602001828103825260368152602001806112ad6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610f96908490610fe9565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610f969084905b606061103e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661109a9092919063ffffffff16565b805190915015610f965780806020019051602081101561105d57600080fd5b5051610f965760405162461bcd60e51b815260040180806020018281038252602a815260200180611283602a913960400191505060405180910390fd5b60606110a984846000856110b1565b949350505050565b60606110bc8561125c565b61110d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061114c5780518252601f19909201916020918201910161112d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146111ae576040519150601f19603f3d011682016040523d82523d6000602084013e6111b3565b606091505b509150915081156111c75791506110a99050565b8051156111d75780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611221578181015183820152602001611209565b50505050905090810190601f16801561124e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212202323caf665514f5c72f7a0804a2f4a8831222a90cb4850f4e666c2523404eccb64736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80633fc8cef31461003b578063db52f4201461005f575b600080fd5b610043610097565b604080516001600160a01b039092168252519081900360200190f35b6100956004803603606081101561007557600080fd5b506001600160a01b038135811691602081013590911690604001356100a9565b005b60008051602061126383398151915281565b600083905060008390506000805160206112638339815191526001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561010457600080fd5b505afa158015610118573d6000803e3d6000fd5b505050506040513d602081101561012e57600080fd5b50516001600160a01b031614806101c857506000805160206112638339815191526001600160a01b0316826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561019157600080fd5b505afa1580156101a5573d6000803e3d6000fd5b505050506040513d60208110156101bb57600080fd5b50516001600160a01b0316145b610205576040805162461bcd60e51b8152602060048201526009602482015268216574682d66726f6d60b81b604482015290519081900360640190fd5b6000805160206112638339815191526001600160a01b0316816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561025657600080fd5b505afa15801561026a573d6000803e3d6000fd5b505050506040513d602081101561028057600080fd5b50516001600160a01b0316148061031a57506000805160206112638339815191526001600160a01b0316816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e357600080fd5b505afa1580156102f7573d6000803e3d6000fd5b505050506040513d602081101561030d57600080fd5b50516001600160a01b0316145b610355576040805162461bcd60e51b8152602060048201526007602482015266216574682d746f60c81b604482015290519081900360640190fd5b60006000805160206112638339815191526001600160a01b0316836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156103a857600080fd5b505afa1580156103bc573d6000803e3d6000fd5b505050506040513d60208110156103d257600080fd5b50516001600160a01b0316141561044d57826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561041c57600080fd5b505afa158015610430573d6000803e3d6000fd5b505050506040513d602081101561044657600080fd5b50516104b3565b826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561048657600080fd5b505afa15801561049a573d6000803e3d6000fd5b505050506040513d60208110156104b057600080fd5b50515b905060006000805160206112638339815191526001600160a01b0316836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b50516001600160a01b031614156105ad57826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561057c57600080fd5b505afa158015610590573d6000803e3d6000fd5b505050506040513d60208110156105a657600080fd5b5051610613565b826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e657600080fd5b505afa1580156105fa573d6000803e3d6000fd5b505050506040513d602081101561061057600080fd5b50515b905061062a6001600160a01b038816333088610e23565b60008054610645916001600160a01b038a8116921690610e83565b60005461065f906001600160a01b03898116911687610e83565b60008054906101000a90046001600160a01b03166001600160a01b031663baa2abde856001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156106ba57600080fd5b505afa1580156106ce573d6000803e3d6000fd5b505050506040513d60208110156106e457600080fd5b50516040805163d21220a760e01b815290516001600160a01b0389169163d21220a7916004808301926020929190829003018186803b15801561072657600080fd5b505afa15801561073a573d6000803e3d6000fd5b505050506040513d602081101561075057600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201899052600060648301819052608483018190523060a4840152603c420160c4840152815160e4808501949192918390030190829087803b1580156107c757600080fd5b505af11580156107db573d6000803e3d6000fd5b505050506040513d60408110156107f157600080fd5b505060408051600380825260808201909252606091602082018380368337019050509050828160008151811061082357fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506000805160206112638339815191528160018151811061085f57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061088d57fe5b6001600160a01b039283166020918202929092010152600080546108b79286811692911690610e83565b6000546108d3906001600160a01b038581169116600019610e83565b600054604080516370a0823160e01b815230600482015290516001600160a01b03928316926338ed173992908716916370a0823191602480820192602092909190829003018186803b15801561092857600080fd5b505afa15801561093c573d6000803e3d6000fd5b505050506040513d602081101561095257600080fd5b50516040516001600160e01b031960e084901b168152600481018281526000602483018190523060648401819052603c42016084850181905260a060448601908152895160a4870152895193958a95939492939260c490910190602087810191028083838b5b838110156109d05781810151838201526020016109b8565b505050509050019650505050505050600060405180830381600087803b1580156109f957600080fd5b505af1158015610a0d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a3657600080fd5b8101908080516040519392919084640100000000821115610a5657600080fd5b908301906020820185811115610a6b57600080fd5b8251866020820283011164010000000082111715610a8857600080fd5b82525081516020918201928201910280838360005b83811015610ab5578181015183820152602001610a9d565b5050505091909101604052505060008054610aec945060008051602061126383398151915293506001600160a01b03169150610e83565b600054610b1490600080516020611263833981519152906001600160a01b0316600019610e83565b60008054610b2f916001600160a01b03858116921690610e83565b600054610b4b906001600160a01b038481169116600019610e83565b600054604080516370a0823160e01b815230600482015290516001600160a01b039092169163e8e337009160008051602061126383398151915291869183916370a0823191602480820192602092909190829003018186803b158015610bb057600080fd5b505afa158015610bc4573d6000803e3d6000fd5b505050506040513d6020811015610bda57600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b038916916370a08231916024808301926020929190829003018186803b158015610c2257600080fd5b505afa158015610c36573d6000803e3d6000fd5b505050506040513d6020811015610c4c57600080fd5b5051604080516001600160e01b031960e088901b1681526001600160a01b0395861660048201529390941660248401526044830191909152606482015260006084820181905260a482018190523360c4830152603c420160e483015291516101048083019360609383900390910190829087803b158015610ccc57600080fd5b505af1158015610ce0573d6000803e3d6000fd5b505050506040513d6060811015610cf657600080fd5b5050604080516370a0823160e01b81523060048201529051610d8b913391600080516020611263833981519152916370a08231916024808301926020929190829003018186803b158015610d4957600080fd5b505afa158015610d5d573d6000803e3d6000fd5b505050506040513d6020811015610d7357600080fd5b50516000805160206112638339815191529190610f9b565b610e1933836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610ddc57600080fd5b505afa158015610df0573d6000803e3d6000fd5b505050506040513d6020811015610e0657600080fd5b50516001600160a01b0385169190610f9b565b5050505050505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610e7d908590610fe9565b50505050565b801580610f09575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015610edb57600080fd5b505afa158015610eef573d6000803e3d6000fd5b505050506040513d6020811015610f0557600080fd5b5051155b610f445760405162461bcd60e51b81526004018080602001828103825260368152602001806112ad6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610f96908490610fe9565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610f969084905b606061103e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661109a9092919063ffffffff16565b805190915015610f965780806020019051602081101561105d57600080fd5b5051610f965760405162461bcd60e51b815260040180806020018281038252602a815260200180611283602a913960400191505060405180910390fd5b60606110a984846000856110b1565b949350505050565b60606110bc8561125c565b61110d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061114c5780518252601f19909201916020918201910161112d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146111ae576040519150601f19603f3d011682016040523d82523d6000602084013e6111b3565b606091505b509150915081156111c75791506110a99050565b8051156111d75780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611221578181015183820152602001611209565b50505050905090810190601f16801561124e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212202323caf665514f5c72f7a0804a2f4a8831222a90cb4850f4e666c2523404eccb64736f6c634300060c0033
Deployed Bytecode Sourcemap
35685:2765:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35856:73;;;:::i;:::-;;;;-1:-1:-1;;;;;35856:73:0;;;;;;;;;;;;;;35938:2509;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;35938:2509:0;;;;;;;;;;;;;;;;;:::i;:::-;;35856:73;-1:-1:-1;;;;;;;;;;;35856:73:0;:::o;35938:2509::-;36060:23;36101:6;36060:48;;36119:21;36158:4;36119:44;;-1:-1:-1;;;;;;;;;;;;;;;;36222:25:0;:8;-1:-1:-1;;;;;36222:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36222:17:0;-1:-1:-1;;;;;36222:25:0;;;:54;;;-1:-1:-1;;;;;;;;;;;;;;;;36251:25:0;:8;-1:-1:-1;;;;;36251:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36251:17:0;-1:-1:-1;;;;;36251:25:0;;36222:54;36216:109;;36294:19;;;-1:-1:-1;;;36294:19:0;;;;;;;;;;;;-1:-1:-1;;;36294:19:0;;;;;;;;;;;;;;36216:109;-1:-1:-1;;;;;;;;;;;;;;;;36341:23:0;:6;-1:-1:-1;;;;;36341:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36341:15:0;-1:-1:-1;;;;;36341:23:0;;;:50;;;-1:-1:-1;;;;;;;;;;;;;;;;36368:23:0;:6;-1:-1:-1;;;;;36368:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36368:15:0;-1:-1:-1;;;;;36368:23:0;;36341:50;36335:103;;36409:17;;;-1:-1:-1;;;36409:17:0;;;;;;;;;;;;-1:-1:-1;;;36409:17:0;;;;;;;;;;;;;;36335:103;36491:13;-1:-1:-1;;;;;;;;;;;;;;;;36507:25:0;:8;-1:-1:-1;;;;;36507:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36507:17:0;-1:-1:-1;;;;;36507:25:0;;;:91;;36581:8;-1:-1:-1;;;;;36581:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36581:17:0;36507:91;;;36548:8;-1:-1:-1;;;;;36548:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36548:17:0;36507:91;36491:107;;36611:11;-1:-1:-1;;;;;;;;;;;;;;;;36625:23:0;:6;-1:-1:-1;;;;;36625:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36625:15:0;-1:-1:-1;;;;;36625:23:0;;;:85;;36695:6;-1:-1:-1;;;;;36695:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36695:15:0;36625:85;;;36664:6;-1:-1:-1;;;;;36664:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36664:15:0;36625:85;36611:99;-1:-1:-1;36744:65:0;-1:-1:-1;;;;;36744:31:0;;36776:10;36796:4;36803:5;36744:31;:65::i;:::-;36886:6;;;36851:46;;-1:-1:-1;;;;;36851:26:0;;;;36886:6;;36851:26;:46::i;:::-;36943:6;;36908:50;;-1:-1:-1;;;;;36908:26:0;;;;36943:6;36952:5;36908:26;:50::i;:::-;36969:6;;;;;;;;-1:-1:-1;;;;;36969:6:0;-1:-1:-1;;;;;36969:22:0;;37006:8;-1:-1:-1;;;;;37006:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37006:17:0;37038;;;-1:-1:-1;;;37038:17:0;;;;-1:-1:-1;;;;;37038:15:0;;;;;:17;;;;;37006;;37038;;;;;;;:15;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37038:17:0;36969:200;;;-1:-1:-1;;;;;;36969:200:0;;;;;;;-1:-1:-1;;;;;36969:200:0;;;;;;;;;;;;;;;;;;;;;37090:1;36969:200;;;;;;;;;;;;37130:4;36969:200;;;;37156:2;37150:3;:8;36969:200;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;37242:16:0;;;37256:1;37242:16;;;;;;;;;37218:21;;37242:16;;;37218:21;;37242:16;;;;;-1:-1:-1;37242:16:0;37218:40;;37279:5;37269:4;37274:1;37269:7;;;;;;;;;;;;;:15;-1:-1:-1;;;;;37269:15:0;;;-1:-1:-1;;;;;37269:15:0;;;;;-1:-1:-1;;;;;;;;;;;37295:4:0;37300:1;37295:7;;;;;;;;;;;;;:14;-1:-1:-1;;;;;37295:14:0;;;-1:-1:-1;;;;;37295:14:0;;;;;37330:3;37320:4;37325:1;37320:7;;;;;;;;-1:-1:-1;;;;;37320:13:0;;;:7;;;;;;;;;:13;37380:6;;;37346:45;;:25;;;;37380:6;;;37346:25;:45::i;:::-;37436:6;;37402:55;;-1:-1:-1;;;;;37402:25:0;;;;37436:6;-1:-1:-1;;37402:25:0;:55::i;:::-;37468:6;;37514:38;;;-1:-1:-1;;;37514:38:0;;37546:4;37514:38;;;;;;-1:-1:-1;;;;;37468:6:0;;;;:31;;37514:23;;;;;;:38;;;;;;;;;;;;;;;:23;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37514:38:0;37468:181;;-1:-1:-1;;;;;;37468:181:0;;;;;;;;;;;;;37567:1;37468:181;;;;;;37610:4;37468:181;;;;;;37636:2;37630:3;:8;37468:181;;;;;;;;;;;;;;;;;;;;;37567:1;;37583:4;;37610;;37630:8;;37468:181;;;;;;37514:38;37468:181;;;;;;;;37567:1;37468:181;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;37468:181:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37468:181:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;37468:181:0;;;;;;-1:-1:-1;;37724:6:0;;;37691:44;;-1:-1:-1;;;;;;;;;;;;35887:42:0;-1:-1:-1;;;;;;37724:6:0;;-1:-1:-1;37691:24:0;:44::i;:::-;37779:6;;37746:54;;-1:-1:-1;;;;;;;;;;;35887:42:0;-1:-1:-1;;;;;37779:6:0;-1:-1:-1;;37746:24:0;:54::i;:::-;37845:6;;;37813:43;;-1:-1:-1;;;;;37813:23:0;;;;37845:6;;37813:23;:43::i;:::-;37899:6;;37867:53;;-1:-1:-1;;;;;37867:23:0;;;;37899:6;-1:-1:-1;;37867:23:0;:53::i;:::-;37931:6;;38002:37;;;-1:-1:-1;;;38002:37:0;;38033:4;38002:37;;;;;;-1:-1:-1;;;;;37931:6:0;;;;:19;;-1:-1:-1;;;;;;;;;;;35887:42:0;37984:3;;35887:42;;38002:22;;:37;;;;;;;;;;;;;;;35887:42;38002:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38002:37:0;38054:36;;;-1:-1:-1;;;38054:36:0;;38084:4;38054:36;;;;;;-1:-1:-1;;;;;38054:21:0;;;;;:36;;;;;38002:37;;38054:36;;;;;;;:21;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38054:36:0;37931:250;;;-1:-1:-1;;;;;;37931:250:0;;;;;;;-1:-1:-1;;;;;37931:250:0;;;;;;;;;;;;;;;;;;;;;;;;;;38105:1;37931:250;;;;;;;;;;;;38137:10;37931:250;;;;38168:2;38162:3;:8;37931:250;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;37931:250:0;38306:37;;-1:-1:-1;;;38306:37:0;;38337:4;38306:37;;;;;;38241:113;;38281:10;;-1:-1:-1;;;;;;;;;;;35887:42:0;38306:22;;:37;;;;;37931:250;;38306:37;;;;;;;35887:42;38306:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38306:37:0;-1:-1:-1;;;;;;;;;;;35887:42:0;38241:113;:25;:113::i;:::-;38365:74;38390:10;38409:3;-1:-1:-1;;;;;38402:21:0;;38432:4;38402:36;;;;;;;;;;;;;-1:-1:-1;;;;;38402:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38402:36:0;-1:-1:-1;;;;;38365:24:0;;;:74;:24;:74::i;:::-;35938:2509;;;;;;;;:::o;32653:205::-;32781:68;;;-1:-1:-1;;;;;32781:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;32781:68:0;-1:-1:-1;;;32781:68:0;;;32754:96;;32774:5;;32754:19;:96::i;:::-;32653:205;;;;:::o;33127:622::-;33497:10;;;33496:62;;-1:-1:-1;33513:39:0;;;-1:-1:-1;;;33513:39:0;;33537:4;33513:39;;;;-1:-1:-1;;;;;33513:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33513:39:0;:44;33496:62;33488:152;;;;-1:-1:-1;;;33488:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33678:62;;;-1:-1:-1;;;;;33678:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33678:62:0;-1:-1:-1;;;33678:62:0;;;33651:90;;33671:5;;33651:19;:90::i;:::-;33127:622;;;:::o;32468:177::-;32578:58;;;-1:-1:-1;;;;;32578:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;32578:58:0;-1:-1:-1;;;32578:58:0;;;32551:86;;32571:5;;34773:761;35197:23;35223:69;35251:4;35223:69;;;;;;;;;;;;;;;;;35231:5;-1:-1:-1;;;;;35223:27:0;;;:69;;;;;:::i;:::-;35307:17;;35197:95;;-1:-1:-1;35307:21:0;35303:224;;35449:10;35438:30;;;;;;;;;;;;;;;-1:-1:-1;35438:30:0;35430:85;;;;-1:-1:-1;;;35430:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18594:196;18697:12;18729:53;18752:6;18760:4;18766:1;18769:12;18729:22;:53::i;:::-;18722:60;18594:196;-1:-1:-1;;;;18594:196:0:o;19971:979::-;20101:12;20134:18;20145:6;20134:10;:18::i;:::-;20126:60;;;;;-1:-1:-1;;;20126:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;20260:12;20274:23;20301:6;-1:-1:-1;;;;;20301:11:0;20321:8;20332:4;20301:36;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;20301:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20259:78;;;;20352:7;20348:595;;;20383:10;-1:-1:-1;20376:17:0;;-1:-1:-1;20376:17:0;20348:595;20497:17;;:21;20493:439;;20760:10;20754:17;20821:15;20808:10;20804:2;20800:19;20793:44;20708:148;20903:12;20896:20;;-1:-1:-1;;;20896:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15676:422;16043:20;16082:8;;;15676:422::o
Swarm Source
ipfs://2323caf665514f5c72f7a0804a2f4a8831222a90cb4850f4e666c2523404eccb
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.