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
|
|||||
---|---|---|---|---|---|---|---|---|---|
Start | 18042728 | 495 days ago | IN | 0 ETH | 0.00237858 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18052245 | 493 days ago | 0.00037465 ETH | ||||
18052245 | 493 days ago | 0.00037465 ETH | ||||
18052245 | 493 days ago | 0.015 ETH | ||||
18052245 | 493 days ago | 0.015 ETH | ||||
18051940 | 493 days ago | 0.00150073 ETH | ||||
18051940 | 493 days ago | 0.00150073 ETH | ||||
18051940 | 493 days ago | 0.06 ETH | ||||
18051940 | 493 days ago | 0.06 ETH | ||||
18050737 | 493 days ago | 0.00087441 ETH | ||||
18050737 | 493 days ago | 0.00087441 ETH | ||||
18050737 | 493 days ago | 0.035 ETH | ||||
18050737 | 493 days ago | 0.035 ETH | ||||
18050278 | 494 days ago | 0.00250005 ETH | ||||
18050278 | 494 days ago | 0.00250005 ETH | ||||
18050278 | 494 days ago | 0.1 ETH | ||||
18050278 | 494 days ago | 0.1 ETH | ||||
18048439 | 494 days ago | 0.0024994 ETH | ||||
18048439 | 494 days ago | 0.0024994 ETH | ||||
18048439 | 494 days ago | 0.1 ETH | ||||
18048439 | 494 days ago | 0.1 ETH | ||||
18048382 | 494 days ago | 0.00074916 ETH | ||||
18048382 | 494 days ago | 0.00074916 ETH | ||||
18048382 | 494 days ago | 0.03 ETH | ||||
18048382 | 494 days ago | 0.03 ETH | ||||
18048333 | 494 days ago | 0.00074916 ETH |
Loading...
Loading
Contract Name:
Zap
Compiler Version
v0.8.1+commit.df193b15
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.1; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {IPair} from "./IPair.sol"; import {IUniswapV2Router02} from "./IUniswapV2Router02.sol"; import {IWETH} from "./IWETH.sol"; import {Babylonian} from "./Babylonian.sol"; interface IToken { function setIsAddingLP(uint) external; } contract Zap is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; IWETH public WETH; IUniswapV2Router02 public router; uint256 public constant MAX_INT = 2**256 - 1; uint256 public constant MINIMUM_AMOUNT = 1000; uint256 public maxZapReverseRatio; address private routerAddress; address private WETHAddress; address public LPAddress; address public TokenAddress; receive() external payable { assert(msg.sender == WETHAddress); } constructor( address _WETHAddress, address _router, uint256 _maxZapReverseRatio ) { WETHAddress = _WETHAddress; WETH = IWETH(_WETHAddress); routerAddress = _router; router = IUniswapV2Router02(_router); maxZapReverseRatio = _maxZapReverseRatio; } function start(address _LPAddress, address _TokenAddress) external onlyOwner { assert(LPAddress == address(0)); LPAddress = _LPAddress; TokenAddress = _TokenAddress; } function updateMaxZapInverseRatio(uint256 _maxZapInverseRatio) external onlyOwner { maxZapReverseRatio = _maxZapInverseRatio; } function zapInETH(address receiver) external payable nonReentrant returns (uint, uint) { require(msg.value >= MINIMUM_AMOUNT, "Zap: Amount too low"); WETH.deposit{value: msg.value}(); address _TokenAddress = TokenAddress; address _WETHAddress = WETHAddress; address[] memory path = new address[](2); path[0] = _WETHAddress; path[1] = _TokenAddress; uint256 swapAmountIn; { address token0; address token1; if (_TokenAddress < _WETHAddress) { token0 = _TokenAddress; token1 = _WETHAddress; } else { token1 = _TokenAddress; token0 = _WETHAddress; } { (uint256 reserveA, uint256 reserveB, ) = IPair(LPAddress).getReserves(); require((reserveA >= MINIMUM_AMOUNT) && (reserveB >= MINIMUM_AMOUNT), "Zap: Reserves too low"); if (token0 == _WETHAddress) { swapAmountIn = _calculateAmountToSwap(msg.value, reserveA, reserveB); require(reserveA / swapAmountIn >= maxZapReverseRatio, "Zap: Quantity higher than limit"); } else { swapAmountIn = _calculateAmountToSwap(msg.value, reserveB, reserveA); require(reserveB / swapAmountIn >= maxZapReverseRatio, "Zap: Quantity higher than limit"); } } } _approveTokenIfNeeded(_WETHAddress); router.swapExactTokensForTokens( swapAmountIn, 0, path, address(this), block.timestamp ); _approveTokenIfNeeded(_TokenAddress); IToken(_TokenAddress).setIsAddingLP(1); (, , uint lpTokenReceived) = router.addLiquidity( path[0], path[1], IERC20(path[0]).balanceOf(address(this)), IERC20(path[1]).balanceOf(address(this)), 1, 1, receiver, block.timestamp ); IToken(_TokenAddress).setIsAddingLP(2); uint wethBalance = WETH.balanceOf(address(this)); if (wethBalance > 0) { WETH.withdraw(wethBalance); (bool success, ) = payable(msg.sender).call{value: wethBalance}(""); require(success, "unable to send value, recipient may have reverted"); } return (lpTokenReceived, wethBalance); } function _approveTokenIfNeeded(address _token) private { if (IERC20(_token).allowance(address(this), routerAddress) < 1e24) { IERC20(_token).safeApprove(routerAddress, MAX_INT); } } function _calculateAmountToSwap( uint256 _token0AmountIn, uint256 _reserve0, uint256 _reserve1 ) private view returns (uint256 amountToSwap) { uint256 halfToken0Amount = _token0AmountIn / 2; uint256 nominator = router.getAmountOut(halfToken0Amount, _reserve0, _reserve1); uint256 denominator = router.quote( halfToken0Amount, _reserve0 + halfToken0Amount, _reserve1 - nominator ); amountToSwap = _token0AmountIn - Babylonian.sqrt((halfToken0Amount * halfToken0Amount * nominator) / denominator); return amountToSwap; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions 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 virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @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 making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; 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' 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://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"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.1; /* * @author Uniswap * @notice Library from Uniswap */ library Babylonian { function sqrt(uint256 x) internal pure returns (uint256) { if (x == 0) return 0; uint256 xx = x; uint256 r = 1; if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; } if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; } if (xx >= 0x100000000) { xx >>= 32; r <<= 16; } if (xx >= 0x10000) { xx >>= 16; r <<= 8; } if (xx >= 0x100) { xx >>= 8; r <<= 4; } if (xx >= 0x10) { xx >>= 4; r <<= 2; } if (xx >= 0x8) { r <<= 1; } r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; uint256 r1 = x / r; return (r < r1 ? r : r1); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.5.0; interface IPair { 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; function initialize(address, address) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.1; interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); 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 getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountOut); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.5.0; interface IWETH { function deposit() external payable; function transfer(address to, uint256 value) external returns (bool); function withdraw(uint256) external; function balanceOf(address) external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_WETHAddress","type":"address"},{"internalType":"address","name":"_router","type":"address"},{"internalType":"uint256","name":"_maxZapReverseRatio","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"LPAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_INT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxZapReverseRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_LPAddress","type":"address"},{"internalType":"address","name":"_TokenAddress","type":"address"}],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxZapInverseRatio","type":"uint256"}],"name":"updateMaxZapInverseRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"zapInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001b2338038062001b2383398101604081905262000034916200010f565b62000048620000426200009e565b620000a2565b60018055600680546001600160a01b039485166001600160a01b0319918216811790925560028054821690921790915560058054939094169281168317909355600380549093169091179091556004556200014f565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200010a57600080fd5b919050565b60008060006060848603121562000124578283fd5b6200012f84620000f2565b92506200013f60208501620000f2565b9150604084015190509250925092565b6119c4806200015f6000396000f3fe6080604052600436106100c65760003560e01c8063715018a61161007f578063c2cba30611610059578063c2cba306146101f0578063f2fde38b14610205578063f34c72cd14610225578063f887ea4014610246576100f5565b8063715018a6146101b15780638da5cb5b146101c6578063ad5c4648146101db576100f5565b8063098d3228146100fa5780630f4e4e6314610125578063120f2eda1461013a578063257d9bb81461015c5780632b4652eb146101715780633ccfe88714610191576100f5565b366100f5576006546001600160a01b031633146100f357634e487b7160e01b600052600160045260246000fd5b005b600080fd5b34801561010657600080fd5b5061010f61025b565b60405161011c9190611541565b60405180910390f35b34801561013157600080fd5b5061010f610261565b34801561014657600080fd5b5061014f610267565b60405161011c91906114b1565b34801561016857600080fd5b5061010f610276565b34801561017d57600080fd5b506100f361018c366004611435565b61027c565b34801561019d57600080fd5b506100f36101ac3660046112d6565b610289565b3480156101bd57600080fd5b506100f36102e6565b3480156101d257600080fd5b5061014f6102fa565b3480156101e757600080fd5b5061014f610309565b3480156101fc57600080fd5b5061014f610318565b34801561021157600080fd5b506100f36102203660046112b5565b610327565b6102386102333660046112b5565b61036a565b60405161011c9291906118a0565b34801561025257600080fd5b5061014f610b65565b60001981565b60045481565b6007546001600160a01b031681565b6103e881565b610284610b74565b600455565b610291610b74565b6007546001600160a01b0316156102b857634e487b7160e01b600052600160045260246000fd5b600780546001600160a01b039384166001600160a01b03199182161790915560088054929093169116179055565b6102ee610b74565b6102f86000610bb3565b565b6000546001600160a01b031690565b6002546001600160a01b031681565b6008546001600160a01b031681565b61032f610b74565b6001600160a01b03811661035e5760405162461bcd60e51b81526004016103559061157d565b60405180910390fd5b61036781610bb3565b50565b600080610375610c03565b6103e83410156103975760405162461bcd60e51b815260040161035590611803565b600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156103e757600080fd5b505af11580156103fb573d6000803e3d6000fd5b5050600854600654604080516002808252606082019092526001600160a01b03938416965092909116935060009250816020016020820280368337019050509050818160008151811061045e57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b03168152505082816001815181106104a057634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250506000806000846001600160a01b0316866001600160a01b031610156104e95750849050836104ef565b50839050845b600080600760009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561054057600080fd5b505afa158015610554573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057891906113e7565b506001600160701b031691506001600160701b031691506103e882101580156105a357506103e88110155b6105bf5760405162461bcd60e51b81526004016103559061165a565b866001600160a01b0316846001600160a01b03161415610617576105e4348383610c2d565b6004549095506105f486846118dc565b10156106125760405162461bcd60e51b8152600401610355906116be565b610650565b610622348284610c2d565b60045490955061063286836118dc565b10156106505760405162461bcd60e51b8152600401610355906116be565b5050505061065d83610d9e565b6003546040516338ed173960e01b81526001600160a01b03909116906338ed173990610696908490600090879030904290600401611830565b600060405180830381600087803b1580156106b057600080fd5b505af11580156106c4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106ec9190810190611308565b506106f684610d9e565b604051630104b7f560e61b81526001600160a01b0385169063412dfd409061072390600190600401611541565b600060405180830381600087803b15801561073d57600080fd5b505af1158015610751573d6000803e3d6000fd5b50506003548451600093506001600160a01b03909116915063e8e33700908590849061078d57634e487b7160e01b600052603260045260246000fd5b6020026020010151856001815181106107b657634e487b7160e01b600052603260045260246000fd5b6020026020010151866000815181106107df57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161081291906114b1565b60206040518083038186803b15801561082a57600080fd5b505afa15801561083e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610862919061144d565b8760018151811061088357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016108b691906114b1565b60206040518083038186803b1580156108ce57600080fd5b505afa1580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610906919061144d565b6001808f426040518963ffffffff1660e01b815260040161092e9897969594939291906114df565b606060405180830381600087803b15801561094857600080fd5b505af115801561095c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109809190611465565b604051630104b7f560e61b81529093506001600160a01b038816925063412dfd4091506109b290600290600401611541565b600060405180830381600087803b1580156109cc57600080fd5b505af11580156109e0573d6000803e3d6000fd5b50506002546040516370a0823160e01b8152600093506001600160a01b0390911691506370a0823190610a179030906004016114b1565b60206040518083038186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a67919061144d565b90508015610b4f57600254604051632e1a7d4d60e01b81526001600160a01b0390911690632e1a7d4d90610a9f908490600401611541565b600060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b505050506000336001600160a01b031682604051610aea906114ae565b60006040518083038185875af1925050503d8060008114610b27576040519150601f19603f3d011682016040523d82523d6000602084013e610b2c565b606091505b5050905080610b4d5760405162461bcd60e51b815260040161035590611609565b505b909650945050505050610b60610e4f565b915091565b6003546001600160a01b031681565b610b7c610e55565b6001600160a01b0316610b8d6102fa565b6001600160a01b0316146102f85760405162461bcd60e51b815260040161035590611689565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001541415610c265760405162461bcd60e51b815260040161035590611776565b6002600155565b600080610c3b6002866118dc565b600354604051630153543560e21b81529192506000916001600160a01b039091169063054d50d490610c75908590899089906004016118ae565b60206040518083038186803b158015610c8d57600080fd5b505afa158015610ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc5919061144d565b6003549091506000906001600160a01b031663ad615dec84610ce7818a6118c4565b610cf1868a61191b565b6040518463ffffffff1660e01b8152600401610d0f939291906118ae565b60206040518083038186803b158015610d2757600080fd5b505afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5f919061144d565b9050610d898183610d7086806118fc565b610d7a91906118fc565b610d8491906118dc565b610e59565b610d93908861191b565b979650505050505050565b600554604051636eb1769f60e11b815269d3c21bcecceda1000000916001600160a01b038085169263dd62ed3e92610ddd9230929116906004016114c5565b60206040518083038186803b158015610df557600080fd5b505afa158015610e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2d919061144d565b101561036757600554610367906001600160a01b038381169116600019610fd9565b60018055565b3390565b600081610e6857506000610fd4565b816001600160801b8210610e815760809190911c9060401b5b680100000000000000008210610e9c5760409190911c9060201b5b6401000000008210610eb35760209190911c9060101b5b620100008210610ec85760109190911c9060081b5b6101008210610edc5760089190911c9060041b5b60108210610eef5760049190911c9060021b5b60088210610efb5760011b5b6001610f0782866118dc565b610f1190836118c4565b901c90506001610f2182866118dc565b610f2b90836118c4565b901c90506001610f3b82866118dc565b610f4590836118c4565b901c90506001610f5582866118dc565b610f5f90836118c4565b901c90506001610f6f82866118dc565b610f7990836118c4565b901c90506001610f8982866118dc565b610f9390836118c4565b901c90506001610fa382866118dc565b610fad90836118c4565b901c90506000610fbd82866118dc565b9050808210610fcc5780610fce565b815b93505050505b919050565b8015806110615750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e9061100f90309086906004016114c5565b60206040518083038186803b15801561102757600080fd5b505afa15801561103b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105f919061144d565b155b61107d5760405162461bcd60e51b8152600401610355906117ad565b6110d38363095ea7b360e01b848460405160240161109c929190611528565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526110d8565b505050565b600061112d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111679092919063ffffffff16565b8051909150156110d3578080602001905181019061114b91906113c7565b6110d35760405162461bcd60e51b81526004016103559061172c565b6060611176848460008561117e565b949350505050565b6060824710156111a05760405162461bcd60e51b8152600401610355906115c3565b600080866001600160a01b031685876040516111bc9190611492565b60006040518083038185875af1925050503d80600081146111f9576040519150601f19603f3d011682016040523d82523d6000602084013e6111fe565b606091505b5091509150610d93878383876060831561124457825161123d576112218561124e565b61123d5760405162461bcd60e51b8152600401610355906116f5565b5081611176565b611176838361125d565b6001600160a01b03163b151590565b81511561126d5781518083602001fd5b8060405162461bcd60e51b8152600401610355919061154a565b80356001600160a01b0381168114610fd457600080fd5b80516001600160701b0381168114610fd457600080fd5b6000602082840312156112c6578081fd5b6112cf82611287565b9392505050565b600080604083850312156112e8578081fd5b6112f183611287565b91506112ff60208401611287565b90509250929050565b6000602080838503121561131a578182fd5b825167ffffffffffffffff80821115611331578384fd5b818501915085601f830112611344578384fd5b81518181111561135657611356611978565b838102604051601f19603f8301168101818110858211171561137a5761137a611978565b604052828152858101935084860182860187018a1015611398578788fd5b8795505b838610156113ba57805185526001959095019493860193860161139c565b5098975050505050505050565b6000602082840312156113d8578081fd5b815180151581146112cf578182fd5b6000806000606084860312156113fb578081fd5b6114048461129e565b92506114126020850161129e565b9150604084015163ffffffff8116811461142a578182fd5b809150509250925092565b600060208284031215611446578081fd5b5035919050565b60006020828403121561145e578081fd5b5051919050565b600080600060608486031215611479578283fd5b8351925060208401519150604084015190509250925092565b600082516114a4818460208701611932565b9190910192915050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b6000602082528251806020840152611569816040850160208701611932565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526031908201527f756e61626c6520746f2073656e642076616c75652c20726563697069656e74206040820152701b585e481a185d99481c995d995c9d1959607a1b606082015260800190565b6020808252601590820152745a61703a20526573657276657320746f6f206c6f7760581b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5a61703a205175616e7469747920686967686572207468616e206c696d697400604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252601390820152725a61703a20416d6f756e7420746f6f206c6f7760681b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b8181101561187f5784516001600160a01b03168352938301939183019160010161185a565b50506001600160a01b03969096166060850152505050608001529392505050565b918252602082015260400190565b9283526020830191909152604082015260600190565b600082198211156118d7576118d7611962565b500190565b6000826118f757634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561191657611916611962565b500290565b60008282101561192d5761192d611962565b500390565b60005b8381101561194d578181015183820152602001611935565b8381111561195c576000848401525b50505050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220c102cc9f62fa3aea5d6f05edb55dab83d2d88fae612ba797d61f1211a2a876d564736f6c63430008010033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000000000000000000000000000000000000000000a
Deployed Bytecode
0x6080604052600436106100c65760003560e01c8063715018a61161007f578063c2cba30611610059578063c2cba306146101f0578063f2fde38b14610205578063f34c72cd14610225578063f887ea4014610246576100f5565b8063715018a6146101b15780638da5cb5b146101c6578063ad5c4648146101db576100f5565b8063098d3228146100fa5780630f4e4e6314610125578063120f2eda1461013a578063257d9bb81461015c5780632b4652eb146101715780633ccfe88714610191576100f5565b366100f5576006546001600160a01b031633146100f357634e487b7160e01b600052600160045260246000fd5b005b600080fd5b34801561010657600080fd5b5061010f61025b565b60405161011c9190611541565b60405180910390f35b34801561013157600080fd5b5061010f610261565b34801561014657600080fd5b5061014f610267565b60405161011c91906114b1565b34801561016857600080fd5b5061010f610276565b34801561017d57600080fd5b506100f361018c366004611435565b61027c565b34801561019d57600080fd5b506100f36101ac3660046112d6565b610289565b3480156101bd57600080fd5b506100f36102e6565b3480156101d257600080fd5b5061014f6102fa565b3480156101e757600080fd5b5061014f610309565b3480156101fc57600080fd5b5061014f610318565b34801561021157600080fd5b506100f36102203660046112b5565b610327565b6102386102333660046112b5565b61036a565b60405161011c9291906118a0565b34801561025257600080fd5b5061014f610b65565b60001981565b60045481565b6007546001600160a01b031681565b6103e881565b610284610b74565b600455565b610291610b74565b6007546001600160a01b0316156102b857634e487b7160e01b600052600160045260246000fd5b600780546001600160a01b039384166001600160a01b03199182161790915560088054929093169116179055565b6102ee610b74565b6102f86000610bb3565b565b6000546001600160a01b031690565b6002546001600160a01b031681565b6008546001600160a01b031681565b61032f610b74565b6001600160a01b03811661035e5760405162461bcd60e51b81526004016103559061157d565b60405180910390fd5b61036781610bb3565b50565b600080610375610c03565b6103e83410156103975760405162461bcd60e51b815260040161035590611803565b600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156103e757600080fd5b505af11580156103fb573d6000803e3d6000fd5b5050600854600654604080516002808252606082019092526001600160a01b03938416965092909116935060009250816020016020820280368337019050509050818160008151811061045e57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b03168152505082816001815181106104a057634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250506000806000846001600160a01b0316866001600160a01b031610156104e95750849050836104ef565b50839050845b600080600760009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561054057600080fd5b505afa158015610554573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057891906113e7565b506001600160701b031691506001600160701b031691506103e882101580156105a357506103e88110155b6105bf5760405162461bcd60e51b81526004016103559061165a565b866001600160a01b0316846001600160a01b03161415610617576105e4348383610c2d565b6004549095506105f486846118dc565b10156106125760405162461bcd60e51b8152600401610355906116be565b610650565b610622348284610c2d565b60045490955061063286836118dc565b10156106505760405162461bcd60e51b8152600401610355906116be565b5050505061065d83610d9e565b6003546040516338ed173960e01b81526001600160a01b03909116906338ed173990610696908490600090879030904290600401611830565b600060405180830381600087803b1580156106b057600080fd5b505af11580156106c4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106ec9190810190611308565b506106f684610d9e565b604051630104b7f560e61b81526001600160a01b0385169063412dfd409061072390600190600401611541565b600060405180830381600087803b15801561073d57600080fd5b505af1158015610751573d6000803e3d6000fd5b50506003548451600093506001600160a01b03909116915063e8e33700908590849061078d57634e487b7160e01b600052603260045260246000fd5b6020026020010151856001815181106107b657634e487b7160e01b600052603260045260246000fd5b6020026020010151866000815181106107df57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161081291906114b1565b60206040518083038186803b15801561082a57600080fd5b505afa15801561083e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610862919061144d565b8760018151811061088357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016108b691906114b1565b60206040518083038186803b1580156108ce57600080fd5b505afa1580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610906919061144d565b6001808f426040518963ffffffff1660e01b815260040161092e9897969594939291906114df565b606060405180830381600087803b15801561094857600080fd5b505af115801561095c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109809190611465565b604051630104b7f560e61b81529093506001600160a01b038816925063412dfd4091506109b290600290600401611541565b600060405180830381600087803b1580156109cc57600080fd5b505af11580156109e0573d6000803e3d6000fd5b50506002546040516370a0823160e01b8152600093506001600160a01b0390911691506370a0823190610a179030906004016114b1565b60206040518083038186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a67919061144d565b90508015610b4f57600254604051632e1a7d4d60e01b81526001600160a01b0390911690632e1a7d4d90610a9f908490600401611541565b600060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b505050506000336001600160a01b031682604051610aea906114ae565b60006040518083038185875af1925050503d8060008114610b27576040519150601f19603f3d011682016040523d82523d6000602084013e610b2c565b606091505b5050905080610b4d5760405162461bcd60e51b815260040161035590611609565b505b909650945050505050610b60610e4f565b915091565b6003546001600160a01b031681565b610b7c610e55565b6001600160a01b0316610b8d6102fa565b6001600160a01b0316146102f85760405162461bcd60e51b815260040161035590611689565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001541415610c265760405162461bcd60e51b815260040161035590611776565b6002600155565b600080610c3b6002866118dc565b600354604051630153543560e21b81529192506000916001600160a01b039091169063054d50d490610c75908590899089906004016118ae565b60206040518083038186803b158015610c8d57600080fd5b505afa158015610ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc5919061144d565b6003549091506000906001600160a01b031663ad615dec84610ce7818a6118c4565b610cf1868a61191b565b6040518463ffffffff1660e01b8152600401610d0f939291906118ae565b60206040518083038186803b158015610d2757600080fd5b505afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5f919061144d565b9050610d898183610d7086806118fc565b610d7a91906118fc565b610d8491906118dc565b610e59565b610d93908861191b565b979650505050505050565b600554604051636eb1769f60e11b815269d3c21bcecceda1000000916001600160a01b038085169263dd62ed3e92610ddd9230929116906004016114c5565b60206040518083038186803b158015610df557600080fd5b505afa158015610e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2d919061144d565b101561036757600554610367906001600160a01b038381169116600019610fd9565b60018055565b3390565b600081610e6857506000610fd4565b816001600160801b8210610e815760809190911c9060401b5b680100000000000000008210610e9c5760409190911c9060201b5b6401000000008210610eb35760209190911c9060101b5b620100008210610ec85760109190911c9060081b5b6101008210610edc5760089190911c9060041b5b60108210610eef5760049190911c9060021b5b60088210610efb5760011b5b6001610f0782866118dc565b610f1190836118c4565b901c90506001610f2182866118dc565b610f2b90836118c4565b901c90506001610f3b82866118dc565b610f4590836118c4565b901c90506001610f5582866118dc565b610f5f90836118c4565b901c90506001610f6f82866118dc565b610f7990836118c4565b901c90506001610f8982866118dc565b610f9390836118c4565b901c90506001610fa382866118dc565b610fad90836118c4565b901c90506000610fbd82866118dc565b9050808210610fcc5780610fce565b815b93505050505b919050565b8015806110615750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e9061100f90309086906004016114c5565b60206040518083038186803b15801561102757600080fd5b505afa15801561103b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105f919061144d565b155b61107d5760405162461bcd60e51b8152600401610355906117ad565b6110d38363095ea7b360e01b848460405160240161109c929190611528565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526110d8565b505050565b600061112d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111679092919063ffffffff16565b8051909150156110d3578080602001905181019061114b91906113c7565b6110d35760405162461bcd60e51b81526004016103559061172c565b6060611176848460008561117e565b949350505050565b6060824710156111a05760405162461bcd60e51b8152600401610355906115c3565b600080866001600160a01b031685876040516111bc9190611492565b60006040518083038185875af1925050503d80600081146111f9576040519150601f19603f3d011682016040523d82523d6000602084013e6111fe565b606091505b5091509150610d93878383876060831561124457825161123d576112218561124e565b61123d5760405162461bcd60e51b8152600401610355906116f5565b5081611176565b611176838361125d565b6001600160a01b03163b151590565b81511561126d5781518083602001fd5b8060405162461bcd60e51b8152600401610355919061154a565b80356001600160a01b0381168114610fd457600080fd5b80516001600160701b0381168114610fd457600080fd5b6000602082840312156112c6578081fd5b6112cf82611287565b9392505050565b600080604083850312156112e8578081fd5b6112f183611287565b91506112ff60208401611287565b90509250929050565b6000602080838503121561131a578182fd5b825167ffffffffffffffff80821115611331578384fd5b818501915085601f830112611344578384fd5b81518181111561135657611356611978565b838102604051601f19603f8301168101818110858211171561137a5761137a611978565b604052828152858101935084860182860187018a1015611398578788fd5b8795505b838610156113ba57805185526001959095019493860193860161139c565b5098975050505050505050565b6000602082840312156113d8578081fd5b815180151581146112cf578182fd5b6000806000606084860312156113fb578081fd5b6114048461129e565b92506114126020850161129e565b9150604084015163ffffffff8116811461142a578182fd5b809150509250925092565b600060208284031215611446578081fd5b5035919050565b60006020828403121561145e578081fd5b5051919050565b600080600060608486031215611479578283fd5b8351925060208401519150604084015190509250925092565b600082516114a4818460208701611932565b9190910192915050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b6000602082528251806020840152611569816040850160208701611932565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526031908201527f756e61626c6520746f2073656e642076616c75652c20726563697069656e74206040820152701b585e481a185d99481c995d995c9d1959607a1b606082015260800190565b6020808252601590820152745a61703a20526573657276657320746f6f206c6f7760581b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5a61703a205175616e7469747920686967686572207468616e206c696d697400604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252601390820152725a61703a20416d6f756e7420746f6f206c6f7760681b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b8181101561187f5784516001600160a01b03168352938301939183019160010161185a565b50506001600160a01b03969096166060850152505050608001529392505050565b918252602082015260400190565b9283526020830191909152604082015260600190565b600082198211156118d7576118d7611962565b500190565b6000826118f757634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561191657611916611962565b500290565b60008282101561192d5761192d611962565b500390565b60005b8381101561194d578181015183820152602001611935565b8381111561195c576000848401525b50505050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220c102cc9f62fa3aea5d6f05edb55dab83d2d88fae612ba797d61f1211a2a876d564736f6c63430008010033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000000000000000000000000000000000000000000a
-----Decoded View---------------
Arg [0] : _WETHAddress (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [2] : _maxZapReverseRatio (uint256): 10
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.