Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 88 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Zap And Stake ET... | 20499237 | 58 days ago | IN | 0.00833406 ETH | 0.00147271 | ||||
Zap And Stake ET... | 18649225 | 317 days ago | IN | 0.0241 ETH | 0.01400272 | ||||
Zap And Stake ET... | 18649224 | 317 days ago | IN | 0.0241 ETH | 0.01482742 | ||||
Zap And Stake ET... | 18649215 | 317 days ago | IN | 0.0483 ETH | 0.01562823 | ||||
Zap And Stake YD... | 18289916 | 367 days ago | IN | 0 ETH | 0.00112066 | ||||
Zap And Stake YD... | 18154998 | 386 days ago | IN | 0 ETH | 0.00693014 | ||||
Zap And Stake YD... | 18146934 | 387 days ago | IN | 0 ETH | 0.00950053 | ||||
Zap And Stake ET... | 17499895 | 478 days ago | IN | 0.50543589 ETH | 0.01100738 | ||||
Zap And Stake ET... | 17475605 | 481 days ago | IN | 0.73625618 ETH | 0.0122631 | ||||
Zap And Stake ET... | 17333049 | 501 days ago | IN | 0.50814684 ETH | 0.02232923 | ||||
Zap And Stake ET... | 17328728 | 502 days ago | IN | 1 ETH | 0.02448032 | ||||
Zap And Stake ET... | 17157340 | 526 days ago | IN | 0.97 ETH | 0.02764871 | ||||
Zap And Stake ET... | 17142070 | 528 days ago | IN | 1.04 ETH | 0.02595359 | ||||
Zap And Stake ET... | 17134018 | 530 days ago | IN | 1.1 ETH | 0.02905027 | ||||
Zap And Stake ET... | 17133847 | 530 days ago | IN | 1 ETH | 0.02816486 | ||||
Zap And Stake YD... | 16987622 | 550 days ago | IN | 0 ETH | 0.02234955 | ||||
Zap And Stake YD... | 16987614 | 550 days ago | IN | 0 ETH | 0.02122238 | ||||
Zap And Stake ET... | 16960074 | 554 days ago | IN | 0.2 ETH | 0.01531091 | ||||
Zap And Stake YD... | 16822820 | 573 days ago | IN | 0 ETH | 0.01945561 | ||||
Zap And Stake ET... | 16807938 | 576 days ago | IN | 0.27628589 ETH | 0.01823665 | ||||
Zap And Stake YD... | 16729276 | 587 days ago | IN | 0 ETH | 0.02820829 | ||||
Zap And Stake ET... | 16532236 | 614 days ago | IN | 0.02163725 ETH | 0.01016698 | ||||
Zap And Stake YD... | 16531606 | 614 days ago | IN | 0 ETH | 0.01335011 | ||||
Zap And Stake ET... | 16530152 | 615 days ago | IN | 2.47560108 ETH | 0.01822464 | ||||
Zap And Stake ET... | 16528739 | 615 days ago | IN | 0.62849261 ETH | 0.02027595 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20499237 | 58 days ago | 0.00001221 ETH | ||||
20499237 | 58 days ago | 0.00001221 ETH | ||||
20499237 | 58 days ago | 0.00416703 ETH | ||||
20499237 | 58 days ago | 0.00416703 ETH | ||||
18649225 | 317 days ago | 0.0241 ETH | ||||
18649224 | 317 days ago | 0.0241 ETH | ||||
18649215 | 317 days ago | 0.0483 ETH | ||||
18154998 | 386 days ago | 0.29781489 ETH | ||||
18154998 | 386 days ago | 0.29781489 ETH | ||||
18146934 | 387 days ago | 0.06520522 ETH | ||||
18146934 | 387 days ago | 0.06520522 ETH | ||||
17499895 | 478 days ago | 0.00579313 ETH | ||||
17499895 | 478 days ago | 0.00579313 ETH | ||||
17499895 | 478 days ago | 0.50543589 ETH | ||||
17475605 | 481 days ago | 0.00050451 ETH | ||||
17475605 | 481 days ago | 0.00050451 ETH | ||||
17475605 | 481 days ago | 0.36812809 ETH | ||||
17475605 | 481 days ago | 0.36812809 ETH | ||||
17333049 | 501 days ago | 0.22057307 ETH | ||||
17333049 | 501 days ago | 0.22057307 ETH | ||||
17333049 | 501 days ago | 0.50814684 ETH | ||||
17328728 | 502 days ago | 0.00050156 ETH | ||||
17328728 | 502 days ago | 0.00050156 ETH | ||||
17328728 | 502 days ago | 0.5 ETH | ||||
17328728 | 502 days ago | 0.5 ETH |
Loading...
Loading
Contract Name:
slYDFZapper
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/****************************************************************************************************** Staked Yieldification Liquidity Zapper Website: https://yieldification.com Twitter: https://twitter.com/yieldification Telegram: https://t.me/yieldification ******************************************************************************************************/ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.16; import '@openzeppelin/contracts/interfaces/IERC20.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol'; import './interfaces/IslYDF.sol'; contract slYDFZapper is IERC721Receiver { address _uniswapRouter; IERC20 ydf; IslYDF _slYDF; event ZapETHOnly(address indexed user, uint256 amountETH); event ZapYDFOnly(address indexed user, uint256 amountYDF); event ZapETHAndYDF( address indexed user, uint256 amountETH, uint256 amountYDF ); constructor( address _router, address _ydf, address __slYDF ) { _uniswapRouter = _router; ydf = IERC20(_ydf); _slYDF = IslYDF(__slYDF); } function onERC721Received( address, /* operator */ address, /* from */ uint256, /* tokenId */ bytes calldata /* data */ ) external pure returns (bytes4) { return this.onERC721Received.selector; } function zapAndStakeETHOnly( uint256 _minTokensToReceive, // should assume full msg.value is swapped uint256 _lockOptIndex ) external payable { require(msg.value > 0, 'need to provide ETH to zap'); uint256 _ethBalBefore = address(this).balance - msg.value; uint256 _ydfBalanceBefore = ydf.balanceOf(address(this)); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(_uniswapRouter); // swap half the ETH for YDF address[] memory path = new address[](2); path[0] = _uniswapV2Router.WETH(); path[1] = address(ydf); _uniswapV2Router.swapExactETHForTokens{ value: msg.value / 2 }( _minTokensToReceive / 2, path, address(this), block.timestamp ); _addAndStakeLp( msg.sender, ydf.balanceOf(address(this)) - _ydfBalanceBefore, msg.value / 2, _lockOptIndex ); _returnExcessETH(msg.sender, _ethBalBefore); _returnExcessYDF(msg.sender, _ydfBalanceBefore); emit ZapETHOnly(msg.sender, msg.value); } function zapAndStakeETHAndYDF(uint256 _amountYDF, uint256 _lockOptIndex) external payable { require(msg.value > 0, 'need to provide ETH to zap'); uint256 _ethBalBefore = address(this).balance - msg.value; uint256 _ydfBalBefore = ydf.balanceOf(address(this)); ydf.transferFrom(msg.sender, address(this), _amountYDF); uint256 _ydfToProcess = ydf.balanceOf(address(this)) - _ydfBalBefore; _addAndStakeLp(msg.sender, _ydfToProcess, msg.value, _lockOptIndex); _returnExcessETH(msg.sender, _ethBalBefore); _returnExcessYDF(msg.sender, _ydfBalBefore); emit ZapETHAndYDF(msg.sender, msg.value, _amountYDF); } function zapAndStakeYDFOnly( uint256 _amountYDF, uint256 _minETHToReceive, // should assume full _amountYDF is swapped uint256 _lockOptIndex ) external { require( _lockOptIndex > 0, 'cannot zap and stake YDF only without lockup period' ); uint256 _ethBalBefore = address(this).balance; uint256 _ydfBalBefore = ydf.balanceOf(address(this)); ydf.transferFrom(msg.sender, address(this), _amountYDF); uint256 _ydfToProcess = ydf.balanceOf(address(this)) - _ydfBalBefore; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(_uniswapRouter); // swap half the YDF for ETH address[] memory path = new address[](2); path[0] = address(ydf); path[1] = _uniswapV2Router.WETH(); ydf.approve(address(_uniswapV2Router), _ydfToProcess / 2); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( _ydfToProcess / 2, _minETHToReceive / 2, path, address(this), block.timestamp ); _addAndStakeLp( msg.sender, _ydfToProcess / 2, address(this).balance - _ethBalBefore, _lockOptIndex ); _returnExcessETH(msg.sender, _ethBalBefore); _returnExcessYDF(msg.sender, _ydfBalBefore); emit ZapYDFOnly(msg.sender, _amountYDF); } function _addAndStakeLp( address _user, uint256 _amountYDF, uint256 _amounETH, uint256 _lockOptIndex ) internal { ydf.approve(address(_slYDF), _amountYDF); _slYDF.zapAndStakeETHAndYDF{ value: _amounETH }(_amountYDF, _lockOptIndex); uint256[] memory _tokenIds = _slYDF.getAllUserOwned(address(this)); uint256 _tokenId = _tokenIds[0]; _slYDF.transferFrom(address(this), _user, _tokenId); } function _returnExcessETH(address _user, uint256 _initialBal) internal { if (address(this).balance > _initialBal) { payable(_user).call{ value: address(this).balance - _initialBal }(''); require(address(this).balance >= _initialBal, 'took too much'); } } function _returnExcessYDF(address _user, uint256 _initialBal) internal { uint256 _currentBal = ydf.balanceOf(address(this)); if (_currentBal > _initialBal) { ydf.transfer(_user, _currentBal - _initialBal); require(ydf.balanceOf(address(this)) >= _initialBal, 'took too much'); } } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import '@openzeppelin/contracts/interfaces/IERC721.sol'; /** * @dev YDF Liquidity Staking */ interface IslYDF is IERC721 { function getAllUserOwned(address wallet) external view returns (uint256[] memory); function zapAndStakeETHAndYDF(uint256 amountYDF, uint256 lockOption) external payable; }
// 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); }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) pragma solidity ^0.8.0; import "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "metadata": { "bytecodeHash": "none" }, "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":"_router","type":"address"},{"internalType":"address","name":"_ydf","type":"address"},{"internalType":"address","name":"__slYDF","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountYDF","type":"uint256"}],"name":"ZapETHAndYDF","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"}],"name":"ZapETHOnly","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountYDF","type":"uint256"}],"name":"ZapYDFOnly","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountYDF","type":"uint256"},{"internalType":"uint256","name":"_lockOptIndex","type":"uint256"}],"name":"zapAndStakeETHAndYDF","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minTokensToReceive","type":"uint256"},{"internalType":"uint256","name":"_lockOptIndex","type":"uint256"}],"name":"zapAndStakeETHOnly","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountYDF","type":"uint256"},{"internalType":"uint256","name":"_minETHToReceive","type":"uint256"},{"internalType":"uint256","name":"_lockOptIndex","type":"uint256"}],"name":"zapAndStakeYDFOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516112f13803806112f183398101604081905261002f9161008d565b600080546001600160a01b039485166001600160a01b0319918216179091556001805493851693821693909317909255600280549190931691161790556100d0565b80516001600160a01b038116811461008857600080fd5b919050565b6000806000606084860312156100a257600080fd5b6100ab84610071565b92506100b960208501610071565b91506100c760408501610071565b90509250925092565b611212806100df6000396000f3fe6080604052600436106100435760003560e01c8063150b7a021461004f5780633d9a0aee1461009857806342d2c88f146100ba578063fc4d530e146100cd57600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b5061007b61006a366004610ed1565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200160405180910390f35b3480156100a457600080fd5b506100b86100b3366004610f70565b6100e0565b005b6100b86100c8366004610f9c565b61052a565b6100b86100db366004610f9c565b61084a565b600081116101515760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f74207a617020616e64207374616b6520594446206f6e6c792077696044820152721d1a1bdd5d081b1bd8dadd5c081c195c9a5bd9606a1b60648201526084015b60405180910390fd5b6001546040516370a0823160e01b815230600482015247916000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561019e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c29190610fbe565b6001546040516323b872dd60e01b8152336004820152306024820152604481018890529192506001600160a01b0316906323b872dd906064016020604051808303816000875af115801561021a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023e9190610fd7565b506001546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561028c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b09190610fbe565b6102ba9190611000565b600080546040805160028082526060820183529495506001600160a01b039092169390602083019080368337505060015482519293506001600160a01b03169183915060009061030c5761030c61103d565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561036a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038e9190611053565b816001815181106103a1576103a161103d565b6001600160a01b0392831660209182029290920101526001541663095ea7b3836103cc600287611070565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610417573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043b9190610fd7565b506001600160a01b03821663791ac947610456600286611070565b61046160028b611070565b8430426040518663ffffffff1660e01b81526004016104849594939291906110d6565b600060405180830381600087803b15801561049e57600080fd5b505af11580156104b2573d6000803e3d6000fd5b505050506104d7336002856104c79190611070565b6104d18847611000565b89610a74565b6104e13386610c63565b6104eb3385610d07565b60405188815233907f7d82a7b27d2f386680538cdf25e37b76e37510b6eeaf0887957e3d58b936b7259060200160405180910390a25050505050505050565b6000341161057a5760405162461bcd60e51b815260206004820152601a60248201527f6e65656420746f2070726f766964652045544820746f207a61700000000000006044820152606401610148565b60006105863447611000565b6001546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f89190610fbe565b600080546040805160028082526060820183529495506001600160a01b039092169390602083019080368337019050509050816001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068c9190611053565b8160008151811061069f5761069f61103d565b6001600160a01b03928316602091820292909201015260018054835192169183919081106106cf576106cf61103d565b6001600160a01b0392831660209182029290920101528216637ff36ab56106f7600234611070565b61070260028a611070565b8430426040518663ffffffff1660e01b81526004016107249493929190611112565b60006040518083038185885af1158015610742573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405261076b9190810190611147565b506001546040516370a0823160e01b81523060048201526107f991339186916001600160a01b0316906370a0823190602401602060405180830381865afa1580156107ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107de9190610fbe565b6107e89190611000565b6107f3600234611070565b88610a74565b6108033385610c63565b61080d3384610d07565b60405134815233907fb98c98b4f058b374c87dd1f31e5498f4ddd9d2f4dba23d85b46b74c8b824e5de9060200160405180910390a2505050505050565b6000341161089a5760405162461bcd60e51b815260206004820152601a60248201527f6e65656420746f2070726f766964652045544820746f207a61700000000000006044820152606401610148565b60006108a63447611000565b6001546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156108f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109189190610fbe565b6001546040516323b872dd60e01b8152336004820152306024820152604481018790529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610970573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109949190610fd7565b506001546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a069190610fbe565b610a109190611000565b9050610a1e33823487610a74565b610a283384610c63565b610a323383610d07565b604080513481526020810187905233917f57d96d1a8731e24963447fac76cd0a983b86d598a94815f2ec6caa1f22afeb92910160405180910390a25050505050565b60015460025460405163095ea7b360e01b81526001600160a01b0391821660048201526024810186905291169063095ea7b3906044016020604051808303816000875af1158015610ac9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aed9190610fd7565b50600254604051637e26a98760e11b815260048101859052602481018390526001600160a01b039091169063fc4d530e9084906044016000604051808303818588803b158015610b3c57600080fd5b505af1158015610b50573d6000803e3d6000fd5b50506002546040516001622bff6560e11b03198152306004820152600094506001600160a01b03909116925063ffa801369150602401600060405180830381865afa158015610ba3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bcb9190810190611147565b9050600081600081518110610be257610be261103d565b60209081029190910101516002546040516323b872dd60e01b81523060048201526001600160a01b038981166024830152604482018490529293509116906323b872dd90606401600060405180830381600087803b158015610c4357600080fd5b505af1158015610c57573d6000803e3d6000fd5b50505050505050505050565b80471115610d03576001600160a01b038216610c7f8247611000565b604051600081818185875af1925050503d8060008114610cbb576040519150601f19603f3d011682016040523d82523d6000602084013e610cc0565b606091505b50505080471015610d035760405162461bcd60e51b815260206004820152600d60248201526c0e8deded640e8dede40daeac6d609b1b6044820152606401610148565b5050565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610d50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d749190610fbe565b905081811115610eb4576001546001600160a01b031663a9059cbb84610d9a8585611000565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610de5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e099190610fd7565b506001546040516370a0823160e01b815230600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e769190610fbe565b1015610eb45760405162461bcd60e51b815260206004820152600d60248201526c0e8deded640e8dede40daeac6d609b1b6044820152606401610148565b505050565b6001600160a01b0381168114610ece57600080fd5b50565b600080600080600060808688031215610ee957600080fd5b8535610ef481610eb9565b94506020860135610f0481610eb9565b935060408601359250606086013567ffffffffffffffff80821115610f2857600080fd5b818801915088601f830112610f3c57600080fd5b813581811115610f4b57600080fd5b896020828501011115610f5d57600080fd5b9699959850939650602001949392505050565b600080600060608486031215610f8557600080fd5b505081359360208301359350604090920135919050565b60008060408385031215610faf57600080fd5b50508035926020909101359150565b600060208284031215610fd057600080fd5b5051919050565b600060208284031215610fe957600080fd5b81518015158114610ff957600080fd5b9392505050565b8181038181111561102157634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561106557600080fd5b8151610ff981610eb9565b60008261108d57634e487b7160e01b600052601260045260246000fd5b500490565b600081518084526020808501945080840160005b838110156110cb5781516001600160a01b0316875295820195908201906001016110a6565b509495945050505050565b85815284602082015260a0604082015260006110f560a0830186611092565b6001600160a01b0394909416606083015250608001529392505050565b84815260806020820152600061112b6080830186611092565b6001600160a01b03949094166040830152506060015292915050565b6000602080838503121561115a57600080fd5b825167ffffffffffffffff8082111561117257600080fd5b818501915085601f83011261118657600080fd5b81518181111561119857611198611027565b8060051b604051601f19603f830116810181811085821117156111bd576111bd611027565b6040529182528482019250838101850191888311156111db57600080fd5b938501935b828510156111f9578451845293850193928501926111e0565b9897505050505050505056fea164736f6c6343000810000a0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000030dcba0405004cf124045793e1933c798af9e66a00000000000000000000000064cff2e42ea7f2283c31ba6d108a4038454168b5
Deployed Bytecode
0x6080604052600436106100435760003560e01c8063150b7a021461004f5780633d9a0aee1461009857806342d2c88f146100ba578063fc4d530e146100cd57600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b5061007b61006a366004610ed1565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200160405180910390f35b3480156100a457600080fd5b506100b86100b3366004610f70565b6100e0565b005b6100b86100c8366004610f9c565b61052a565b6100b86100db366004610f9c565b61084a565b600081116101515760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f74207a617020616e64207374616b6520594446206f6e6c792077696044820152721d1a1bdd5d081b1bd8dadd5c081c195c9a5bd9606a1b60648201526084015b60405180910390fd5b6001546040516370a0823160e01b815230600482015247916000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561019e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c29190610fbe565b6001546040516323b872dd60e01b8152336004820152306024820152604481018890529192506001600160a01b0316906323b872dd906064016020604051808303816000875af115801561021a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023e9190610fd7565b506001546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561028c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b09190610fbe565b6102ba9190611000565b600080546040805160028082526060820183529495506001600160a01b039092169390602083019080368337505060015482519293506001600160a01b03169183915060009061030c5761030c61103d565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561036a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038e9190611053565b816001815181106103a1576103a161103d565b6001600160a01b0392831660209182029290920101526001541663095ea7b3836103cc600287611070565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610417573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043b9190610fd7565b506001600160a01b03821663791ac947610456600286611070565b61046160028b611070565b8430426040518663ffffffff1660e01b81526004016104849594939291906110d6565b600060405180830381600087803b15801561049e57600080fd5b505af11580156104b2573d6000803e3d6000fd5b505050506104d7336002856104c79190611070565b6104d18847611000565b89610a74565b6104e13386610c63565b6104eb3385610d07565b60405188815233907f7d82a7b27d2f386680538cdf25e37b76e37510b6eeaf0887957e3d58b936b7259060200160405180910390a25050505050505050565b6000341161057a5760405162461bcd60e51b815260206004820152601a60248201527f6e65656420746f2070726f766964652045544820746f207a61700000000000006044820152606401610148565b60006105863447611000565b6001546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f89190610fbe565b600080546040805160028082526060820183529495506001600160a01b039092169390602083019080368337019050509050816001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068c9190611053565b8160008151811061069f5761069f61103d565b6001600160a01b03928316602091820292909201015260018054835192169183919081106106cf576106cf61103d565b6001600160a01b0392831660209182029290920101528216637ff36ab56106f7600234611070565b61070260028a611070565b8430426040518663ffffffff1660e01b81526004016107249493929190611112565b60006040518083038185885af1158015610742573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405261076b9190810190611147565b506001546040516370a0823160e01b81523060048201526107f991339186916001600160a01b0316906370a0823190602401602060405180830381865afa1580156107ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107de9190610fbe565b6107e89190611000565b6107f3600234611070565b88610a74565b6108033385610c63565b61080d3384610d07565b60405134815233907fb98c98b4f058b374c87dd1f31e5498f4ddd9d2f4dba23d85b46b74c8b824e5de9060200160405180910390a2505050505050565b6000341161089a5760405162461bcd60e51b815260206004820152601a60248201527f6e65656420746f2070726f766964652045544820746f207a61700000000000006044820152606401610148565b60006108a63447611000565b6001546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156108f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109189190610fbe565b6001546040516323b872dd60e01b8152336004820152306024820152604481018790529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610970573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109949190610fd7565b506001546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a069190610fbe565b610a109190611000565b9050610a1e33823487610a74565b610a283384610c63565b610a323383610d07565b604080513481526020810187905233917f57d96d1a8731e24963447fac76cd0a983b86d598a94815f2ec6caa1f22afeb92910160405180910390a25050505050565b60015460025460405163095ea7b360e01b81526001600160a01b0391821660048201526024810186905291169063095ea7b3906044016020604051808303816000875af1158015610ac9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aed9190610fd7565b50600254604051637e26a98760e11b815260048101859052602481018390526001600160a01b039091169063fc4d530e9084906044016000604051808303818588803b158015610b3c57600080fd5b505af1158015610b50573d6000803e3d6000fd5b50506002546040516001622bff6560e11b03198152306004820152600094506001600160a01b03909116925063ffa801369150602401600060405180830381865afa158015610ba3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bcb9190810190611147565b9050600081600081518110610be257610be261103d565b60209081029190910101516002546040516323b872dd60e01b81523060048201526001600160a01b038981166024830152604482018490529293509116906323b872dd90606401600060405180830381600087803b158015610c4357600080fd5b505af1158015610c57573d6000803e3d6000fd5b50505050505050505050565b80471115610d03576001600160a01b038216610c7f8247611000565b604051600081818185875af1925050503d8060008114610cbb576040519150601f19603f3d011682016040523d82523d6000602084013e610cc0565b606091505b50505080471015610d035760405162461bcd60e51b815260206004820152600d60248201526c0e8deded640e8dede40daeac6d609b1b6044820152606401610148565b5050565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610d50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d749190610fbe565b905081811115610eb4576001546001600160a01b031663a9059cbb84610d9a8585611000565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610de5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e099190610fd7565b506001546040516370a0823160e01b815230600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e769190610fbe565b1015610eb45760405162461bcd60e51b815260206004820152600d60248201526c0e8deded640e8dede40daeac6d609b1b6044820152606401610148565b505050565b6001600160a01b0381168114610ece57600080fd5b50565b600080600080600060808688031215610ee957600080fd5b8535610ef481610eb9565b94506020860135610f0481610eb9565b935060408601359250606086013567ffffffffffffffff80821115610f2857600080fd5b818801915088601f830112610f3c57600080fd5b813581811115610f4b57600080fd5b896020828501011115610f5d57600080fd5b9699959850939650602001949392505050565b600080600060608486031215610f8557600080fd5b505081359360208301359350604090920135919050565b60008060408385031215610faf57600080fd5b50508035926020909101359150565b600060208284031215610fd057600080fd5b5051919050565b600060208284031215610fe957600080fd5b81518015158114610ff957600080fd5b9392505050565b8181038181111561102157634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561106557600080fd5b8151610ff981610eb9565b60008261108d57634e487b7160e01b600052601260045260246000fd5b500490565b600081518084526020808501945080840160005b838110156110cb5781516001600160a01b0316875295820195908201906001016110a6565b509495945050505050565b85815284602082015260a0604082015260006110f560a0830186611092565b6001600160a01b0394909416606083015250608001529392505050565b84815260806020820152600061112b6080830186611092565b6001600160a01b03949094166040830152506060015292915050565b6000602080838503121561115a57600080fd5b825167ffffffffffffffff8082111561117257600080fd5b818501915085601f83011261118657600080fd5b81518181111561119857611198611027565b8060051b604051601f19603f830116810181811085821117156111bd576111bd611027565b6040529182528482019250838101850191888311156111db57600080fd5b938501935b828510156111f9578451845293850193928501926111e0565b9897505050505050505056fea164736f6c6343000810000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000030dcba0405004cf124045793e1933c798af9e66a00000000000000000000000064cff2e42ea7f2283c31ba6d108a4038454168b5
-----Decoded View---------------
Arg [0] : _router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [1] : _ydf (address): 0x30dcBa0405004cF124045793E1933C798Af9E66a
Arg [2] : __slYDF (address): 0x64cff2e42ea7f2283c31Ba6d108a4038454168b5
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [1] : 00000000000000000000000030dcba0405004cf124045793e1933c798af9e66a
Arg [2] : 00000000000000000000000064cff2e42ea7f2283c31ba6d108a4038454168b5
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 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.