More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,068 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 19354258 | 297 days ago | IN | 0 ETH | 0.00120216 | ||||
Swap Exact ETH F... | 18811148 | 373 days ago | IN | 0.05 ETH | 0.00486517 | ||||
Swap Exact ETH F... | 18809062 | 373 days ago | IN | 0.0001 ETH | 0.0073785 | ||||
Swap Exact ETH F... | 18806789 | 374 days ago | IN | 0.1 ETH | 0.00822115 | ||||
Swap Exact Token... | 18806675 | 374 days ago | IN | 0 ETH | 0.00825006 | ||||
Swap Exact ETH F... | 18802781 | 374 days ago | IN | 0.1 ETH | 0.00654009 | ||||
Swap Exact ETH F... | 18799761 | 375 days ago | IN | 0.0111 ETH | 0.01945442 | ||||
Swap Exact ETH F... | 18798360 | 375 days ago | IN | 0.001 ETH | 0.00555744 | ||||
Swap Exact ETH F... | 18798357 | 375 days ago | IN | 0.0001 ETH | 0.00538658 | ||||
Swap Exact ETH F... | 18791793 | 376 days ago | IN | 0.1 ETH | 0.01080316 | ||||
Swap Exact ETH F... | 18791064 | 376 days ago | IN | 0.1 ETH | 0.00902167 | ||||
Swap Exact ETH F... | 18790994 | 376 days ago | IN | 0.0001 ETH | 0.00933311 | ||||
Swap Exact ETH F... | 18790349 | 376 days ago | IN | 0.1 ETH | 0.00823877 | ||||
Swap Exact ETH F... | 18782866 | 377 days ago | IN | 0.02 ETH | 0.00930956 | ||||
Swap Exact ETH F... | 18782431 | 377 days ago | IN | 0.1 ETH | 0.00844068 | ||||
Swap Exact ETH F... | 18779666 | 377 days ago | IN | 0.022 ETH | 0.0091606 | ||||
Swap Exact ETH F... | 18773665 | 378 days ago | IN | 0.0333 ETH | 0.00839384 | ||||
Swap Exact Token... | 18772849 | 378 days ago | IN | 0 ETH | 0.01263859 | ||||
Swap Exact ETH F... | 18766697 | 379 days ago | IN | 0.1 ETH | 0.00693558 | ||||
Swap Exact ETH F... | 18765798 | 379 days ago | IN | 0.01 ETH | 0.00829122 | ||||
Swap Exact ETH F... | 18765661 | 379 days ago | IN | 0.1 ETH | 0.00698233 | ||||
Swap Exact ETH F... | 18764214 | 380 days ago | IN | 0.01 ETH | 0.00803532 | ||||
Swap Exact ETH F... | 18761690 | 380 days ago | IN | 0.01 ETH | 0.00548295 | ||||
Swap Exact ETH F... | 18760222 | 380 days ago | IN | 0.0005 ETH | 0.00701656 | ||||
Swap Exact ETH F... | 18758841 | 380 days ago | IN | 0.0001 ETH | 0.00457081 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18811148 | 373 days ago | 0.0495 ETH | ||||
18811148 | 373 days ago | 0.0005 ETH | ||||
18809062 | 373 days ago | 0.000099 ETH | ||||
18809062 | 373 days ago | 0.000001 ETH | ||||
18806789 | 374 days ago | 0.099 ETH | ||||
18806789 | 374 days ago | 0.001 ETH | ||||
18802781 | 374 days ago | 0.099 ETH | ||||
18802781 | 374 days ago | 0.001 ETH | ||||
18799761 | 375 days ago | 0.010989 ETH | ||||
18799761 | 375 days ago | 0.000111 ETH | ||||
18798360 | 375 days ago | 0.00099 ETH | ||||
18798360 | 375 days ago | 0.00001 ETH | ||||
18798357 | 375 days ago | 0.000099 ETH | ||||
18798357 | 375 days ago | 0.000001 ETH | ||||
18791793 | 376 days ago | 0.099 ETH | ||||
18791793 | 376 days ago | 0.001 ETH | ||||
18791064 | 376 days ago | 0.099 ETH | ||||
18791064 | 376 days ago | 0.001 ETH | ||||
18790994 | 376 days ago | 0.000099 ETH | ||||
18790994 | 376 days ago | 0.000001 ETH | ||||
18790349 | 376 days ago | 0.099 ETH | ||||
18790349 | 376 days ago | 0.001 ETH | ||||
18782866 | 377 days ago | 0.0198 ETH | ||||
18782866 | 377 days ago | 0.0002 ETH | ||||
18782431 | 377 days ago | 0.099 ETH |
Loading...
Loading
Contract Name:
UniswapV2Proxy
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {IUniswapV2Router02} from "v2-periphery/interfaces/IUniswapV2Router02.sol"; /** * @title UniswapProxy * @notice A universal proxy contract to uniswapv2 based swap contracts. This contract routes user requests to uniswap contract addresss with additional capability such as fee processing. */ contract UniswapV2Proxy is Ownable { using SafeERC20 for IERC20; address public feeReceiver; event SetFeeReceiver(address indexed oldFeeReceiver, address indexed newFeeReceiver); event RecoverETH(address indexed receiver, uint256 amount); event RecoverERC20(address indexed receiver, address indexed tokenAddress, uint256 amount); /** * @notice ensures that the deadline is not exceeding block timestamp */ modifier ensure(uint deadline) { require(deadline >= block.timestamp, "UniswapV2Router: EXPIRED"); _; } constructor(address _feeReceiver) { feeReceiver = _feeReceiver; } /** * @notice set new feeReceiver address */ function setFeeReceiver(address _feeReceiver) external onlyOwner { emit SetFeeReceiver(feeReceiver, _feeReceiver); feeReceiver = _feeReceiver; } /** * @notice routes the call to uniswap's swapExactTokensForTokens method * @dev except the params router, feeAmount and feeReceiver, all the params are same as uniswap and the structure follows to all the remaining functions * @param router uniswap router address * @param feeAmount feeAmount in the units of fromToken */ function swapExactTokensForTokens( address router, uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external ensure(deadline) { address fromToken = path[0]; _beforeTokenSwap(router, fromToken, amountIn, feeAmount); //swap IUniswapV2Router02(router).swapExactTokensForTokens(amountIn, amountOutMin, path, to, deadline); _afterTokenSwap(fromToken, feeAmount); } function swapTokensForExactTokens( address router, uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external ensure(deadline) { address fromToken = path[0]; _beforeTokenSwap(router, fromToken, amountInMax, feeAmount); IUniswapV2Router02(router).swapTokensForExactTokens(amountOut, amountInMax, path, to, deadline); _afterTokenSwap(fromToken, feeAmount); } function swapExactETHForTokens( address router, uint amountOutMin, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external payable ensure(deadline) { // transfer the feeAmount to receiver first, rest amount is available for swap require(msg.value > feeAmount, "insufficient amount"); // send platform fee to receiver address if (feeReceiver != address(0) && feeAmount > 0) { payable(feeReceiver).transfer(feeAmount); } //swap IUniswapV2Router02(router).swapExactETHForTokens{value: address(this).balance}( amountOutMin, path, to, deadline ); uint256 refundEthAmount = address(this).balance; if (refundEthAmount > 0) { payable(msg.sender).transfer(refundEthAmount); } } function swapExactTokensForTokensSupportingFeeOnTransferTokens( address router, uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external ensure(deadline) { address fromToken = path[0]; _beforeTokenSwap(router, fromToken, amountIn, feeAmount); //swap IUniswapV2Router02(router).swapExactTokensForTokensSupportingFeeOnTransferTokens( amountIn, amountOutMin, path, to, deadline ); _afterTokenSwap(fromToken, feeAmount); } function swapExactETHForTokensSupportingFeeOnTransferTokens( address router, uint amountOutMin, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external payable ensure(deadline) { // transfer the feeAmount to receiver first, rest amount is available for swap require(msg.value > feeAmount, "insufficient amount"); // send platform fee to receiver address if (feeReceiver != address(0) && feeAmount > 0) { payable(feeReceiver).transfer(feeAmount); } //swap IUniswapV2Router02(router).swapExactETHForTokensSupportingFeeOnTransferTokens{ value: address(this).balance }(amountOutMin, path, to, deadline); uint256 refundEthAmount = address(this).balance; if (refundEthAmount > 0) { payable(msg.sender).transfer(refundEthAmount); } } function swapExactTokensForETHSupportingFeeOnTransferTokens( address router, uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external ensure(deadline) { address fromToken = path[0]; _beforeTokenSwap(router, fromToken, amountIn, feeAmount); //swap IUniswapV2Router02(router).swapExactTokensForETHSupportingFeeOnTransferTokens( amountIn, amountOutMin, path, to, deadline ); _afterTokenSwap(fromToken, feeAmount); } function swapTokensForExactETH( address router, uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external { address fromToken = path[0]; _beforeTokenSwap(router, fromToken, amountInMax, feeAmount); IUniswapV2Router02(router).swapTokensForExactETH(amountOut, amountInMax, path, to, deadline); _afterTokenSwap(fromToken, feeAmount); } function swapExactTokensForETH( address router, uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external ensure(deadline) { address fromToken = path[0]; _beforeTokenSwap(router, fromToken, amountIn, feeAmount); IUniswapV2Router02(router).swapExactTokensForETH(amountIn, amountOutMin, path, to, deadline); _afterTokenSwap(fromToken, feeAmount); } /** * @notice swaps ETH(native blockchain currency) to dest token address * @dev available amount to swap = msg.value - feeAmount */ function swapETHForExactTokens( address router, uint amountOut, address[] calldata path, address to, uint deadline, uint256 feeAmount ) external payable ensure(deadline) { // transfer the feeAmount to receiver first, rest amount is available for swap require(msg.value > feeAmount, "insufficient amount"); // send platform fee to receiver address if (feeReceiver != address(0) && feeAmount > 0) { payable(feeReceiver).transfer(feeAmount); } //swap IUniswapV2Router02(router).swapETHForExactTokens{value: address(this).balance}( amountOut, path, to, deadline ); // refund the remaining ETH after swap to the user uint256 refundEthAmount = address(this).balance; if (refundEthAmount > 0) { payable(msg.sender).transfer(refundEthAmount); } } /** * @notice preprocessing before token swap on uniswap * @dev fetch the fromToken amount from user and approves to spend on uniswap * @param router uniswap router address * @param token fromToken address * @param amountIn amount to swap * @param feeAmount platform fees in fromToken units */ function _beforeTokenSwap(address router, address token, uint amountIn, uint256 feeAmount) internal { // transfer erc20 from user to proxy contract IERC20(token).safeTransferFrom(msg.sender, address(this), amountIn + feeAmount); // approve token to spend on behalf of proxy contract IERC20(token).approve(address(router), amountIn); } /** * @notice post processing after token swap on uniswap * @dev sends feeAmount to receiver and sends back sender the remaining balance of amountIn after swap * @param token fromToken address * @param feeAmount platform fees in fromToken units */ function _afterTokenSwap(address token, uint256 feeAmount) internal { // return fees to feeCollector if (feeReceiver != address(0) && feeAmount > 0) { IERC20(token).safeTransfer(feeReceiver, feeAmount); } // Refund remaining amount to msg.sender uint256 balance = IERC20(token).balanceOf(address(this)); if (balance > 0) { IERC20(token).safeTransfer(msg.sender, balance); } } /** * @notice recover accidently sent ERC20 tokens to the contract * @param tokenAddress address of the erc20 token contract */ function recoverERC20(address tokenAddress) external onlyOwner { IERC20 token = IERC20(tokenAddress); uint256 balance = token.balanceOf(address(this)); if (balance > 0) { token.transfer(msg.sender, balance); } emit RecoverERC20(msg.sender, tokenAddress, balance); } /** * @notice recover accidently sent ETH to the contract */ function recoverETH() external onlyOwner { uint256 balance = address(this).balance; if (balance > 0) { payable(msg.sender).transfer(balance); } emit RecoverETH(msg.sender, balance); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // 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 (last updated v4.7.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.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); } }
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 // 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 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.7.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 functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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; } }
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); }
{ "remappings": [ "solmate/src/=lib/solmate/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "solidity-datetime/contracts/=lib/solidity-datetime/contracts/", "v2-periphery/=lib/v2-periphery/contracts/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "v2-periphery/=lib/v2-periphery/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_feeReceiver","type":"address"}],"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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoverERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoverETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldFeeReceiver","type":"address"},{"indexed":true,"internalType":"address","name":"newFeeReceiver","type":"address"}],"name":"SetFeeReceiver","type":"event"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeReceiver","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapETHForExactTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapExactETHForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapExactTokensForETHSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapTokensForExactETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"swapTokensForExactTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161179c38038061179c83398101604081905261002f916100ad565b6100383361005d565b600180546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b6116b0806100ec6000396000f3fe6080604052600436106100f75760003560e01c80639c7d88b41161008a578063dbf41b3c11610059578063dbf41b3c1461026b578063efdcd9741461027e578063f2fde38b1461029e578063ffc18f0a146102be57600080fd5b80639c7d88b4146101eb5780639e8c708e1461020b578063a78e03361461022b578063b3f006741461024b57600080fd5b806367d5b7ec116100c657806367d5b7ec1461016d5780636a3629221461018d578063715018a6146101a05780638da5cb5b146101b557600080fd5b8063012538f41461010357806305ab9868146101255780630614117a146101385780635f5951d11461014d57600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5061012361011e366004611273565b6102de565b005b6101236101333660046112fe565b6103d4565b34801561014457600080fd5b5061012361052c565b34801561015957600080fd5b50610123610168366004611273565b6105a2565b34801561017957600080fd5b50610123610188366004611273565b61066d565b61012361019b3660046112fe565b6106fc565b3480156101ac57600080fd5b506101236107cd565b3480156101c157600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b3480156101f757600080fd5b50610123610206366004611273565b6107e1565b34801561021757600080fd5b50610123610226366004611380565b610870565b34801561023757600080fd5b50610123610246366004611273565b6109a5565b34801561025757600080fd5b506001546101cf906001600160a01b031681565b6101236102793660046112fe565b610a34565b34801561028a57600080fd5b50610123610299366004611380565b610b6e565b3480156102aa57600080fd5b506101236102b9366004611380565b610bd2565b3480156102ca57600080fd5b506101236102d9366004611273565b610c4b565b81428110156103085760405162461bcd60e51b81526004016102ff9061139b565b60405180910390fd5b60008686600081811061031d5761031d6113d2565b90506020020160208101906103329190611380565b90506103408a828b86610d0b565b6040516318cbafe560e01b81526001600160a01b038b16906318cbafe590610376908c908c908c908c908c908c9060040161142f565b6000604051808303816000875af1158015610395573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103bd9190810190611483565b506103c88184610da6565b50505050505050505050565b81428110156103f55760405162461bcd60e51b81526004016102ff9061139b565b8134116104145760405162461bcd60e51b81526004016102ff90611541565b6001546001600160a01b03161580159061042e5750600082115b1561046f576001546040516001600160a01b039091169083156108fc029084906000818181858888f1935050505015801561046d573d6000803e3d6000fd5b505b604051637ff36ab560e01b81526001600160a01b03891690637ff36ab59047906104a5908b908b908b908b908b9060040161156e565b60006040518083038185885af11580156104c3573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526104ec9190810190611483565b5047801561052157604051339082156108fc029083906000818181858888f193505050501580156103c8573d6000803e3d6000fd5b505050505050505050565b610534610e6b565b47801561056a57604051339082156108fc029083906000818181858888f19350505050158015610568573d6000803e3d6000fd5b505b60405181815233907f5419a4ef885e316747ab9e6774ece1fe5071b8be0d4cde03ec1cb05dc7a21a789060200160405180910390a250565b81428110156105c35760405162461bcd60e51b81526004016102ff9061139b565b6000868660008181106105d8576105d86113d2565b90506020020160208101906105ed9190611380565b90506105fb8a828b86610d0b565b604051635c11d79560e01b81526001600160a01b038b1690635c11d79590610631908c908c908c908c908c908c9060040161142f565b600060405180830381600087803b15801561064b57600080fd5b505af115801561065f573d6000803e3d6000fd5b505050506103c88184610da6565b814281101561068e5760405162461bcd60e51b81526004016102ff9061139b565b6000868660008181106106a3576106a36113d2565b90506020020160208101906106b89190611380565b90506106c68a828a86610d0b565b604051634401edf760e11b81526001600160a01b038b1690638803dbee90610376908c908c908c908c908c908c9060040161142f565b814281101561071d5760405162461bcd60e51b81526004016102ff9061139b565b81341161073c5760405162461bcd60e51b81526004016102ff90611541565b6001546001600160a01b0316158015906107565750600082115b15610797576001546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015610795573d6000803e3d6000fd5b505b60405163fb3bdb4160e01b81526001600160a01b0389169063fb3bdb419047906104a5908b908b908b908b908b9060040161156e565b6107d5610e6b565b6107df6000610ec5565b565b81428110156108025760405162461bcd60e51b81526004016102ff9061139b565b600086866000818110610817576108176113d2565b905060200201602081019061082c9190611380565b905061083a8a828b86610d0b565b60405163791ac94760e01b81526001600160a01b038b169063791ac94790610631908c908c908c908c908c908c9060040161142f565b610878610e6b565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156108c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e591906115a5565b905080156109605760405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af115801561093a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095e91906115be565b505b6040518181526001600160a01b0384169033907f6e0216a77a5b0aae083152882a2e812b20c2045a361c64e79c88190de8da27269060200160405180910390a3505050565b81428110156109c65760405162461bcd60e51b81526004016102ff9061139b565b6000868660008181106109db576109db6113d2565b90506020020160208101906109f09190611380565b90506109fe8a828b86610d0b565b6040516338ed173960e01b81526001600160a01b038b16906338ed173990610376908c908c908c908c908c908c9060040161142f565b8142811015610a555760405162461bcd60e51b81526004016102ff9061139b565b813411610a745760405162461bcd60e51b81526004016102ff90611541565b6001546001600160a01b031615801590610a8e5750600082115b15610acf576001546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015610acd573d6000803e3d6000fd5b505b60405163b6f9de9560e01b81526001600160a01b0389169063b6f9de95904790610b05908b908b908b908b908b9060040161156e565b6000604051808303818588803b158015610b1e57600080fd5b505af1158015610b32573d6000803e3d6000fd5b504793505082159150610521905057604051339082156108fc029083906000818181858888f193505050501580156103c8573d6000803e3d6000fd5b610b76610e6b565b6001546040516001600160a01b038084169216907f1b092cca381ac00a07e1226c164f47c475d212f5e55699475a7f411811f77dd490600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b610bda610e6b565b6001600160a01b038116610c3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ff565b610c4881610ec5565b50565b600085856000818110610c6057610c606113d2565b9050602002016020810190610c759190611380565b9050610c8389828985610d0b565b604051632512eca560e11b81526001600160a01b038a1690634a25d94a90610cb9908b908b908b908b908b908b9060040161142f565b6000604051808303816000875af1158015610cd8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d009190810190611483565b506105218183610da6565b610d2c3330610d1a84866115e0565b6001600160a01b038716929190610f15565b60405163095ea7b360e01b81526001600160a01b0385811660048301526024820184905284169063095ea7b3906044016020604051808303816000875af1158015610d7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9f91906115be565b5050505050565b6001546001600160a01b031615801590610dc05750600081115b15610ddf57600154610ddf906001600160a01b03848116911683610f86565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4a91906115a5565b90508015610e6657610e666001600160a01b0384163383610f86565b505050565b6000546001600160a01b031633146107df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102ff565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f809085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610fb6565b50505050565b6040516001600160a01b038316602482015260448101829052610e6690849063a9059cbb60e01b90606401610f49565b600061100b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110889092919063ffffffff16565b805190915015610e66578080602001905181019061102991906115be565b610e665760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102ff565b606061109784846000856110a1565b90505b9392505050565b6060824710156111025760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102ff565b6001600160a01b0385163b6111595760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102ff565b600080866001600160a01b03168587604051611175919061162b565b60006040518083038185875af1925050503d80600081146111b2576040519150601f19603f3d011682016040523d82523d6000602084013e6111b7565b606091505b50915091506111c78282866111d2565b979650505050505050565b606083156111e157508161109a565b8251156111f15782518084602001fd5b8160405162461bcd60e51b81526004016102ff9190611647565b80356001600160a01b038116811461122257600080fd5b919050565b60008083601f84011261123957600080fd5b50813567ffffffffffffffff81111561125157600080fd5b6020830191508360208260051b850101111561126c57600080fd5b9250929050565b60008060008060008060008060e0898b03121561128f57600080fd5b6112988961120b565b97506020890135965060408901359550606089013567ffffffffffffffff8111156112c257600080fd5b6112ce8b828c01611227565b90965094506112e1905060808a0161120b565b925060a0890135915060c089013590509295985092959890939650565b600080600080600080600060c0888a03121561131957600080fd5b6113228861120b565b965060208801359550604088013567ffffffffffffffff81111561134557600080fd5b6113518a828b01611227565b909650945061136490506060890161120b565b92506080880135915060a0880135905092959891949750929550565b60006020828403121561139257600080fd5b61109a8261120b565b60208082526018908201527f556e69737761705632526f757465723a20455850495245440000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b8183526000602080850194508260005b85811015611424576001600160a01b036114118361120b565b16875295820195908201906001016113f8565b509495945050505050565b86815285602082015260a06040820152600061144f60a0830186886113e8565b6001600160a01b039490941660608301525060800152949350505050565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561149657600080fd5b825167ffffffffffffffff808211156114ae57600080fd5b818501915085601f8301126114c257600080fd5b8151818111156114d4576114d461146d565b8060051b604051601f19603f830116810181811085821117156114f9576114f961146d565b60405291825284820192508381018501918883111561151757600080fd5b938501935b828510156115355784518452938501939285019261151c565b98975050505050505050565b6020808252601390820152721a5b9cdd59999a58da595b9d08185b5bdd5b9d606a1b604082015260600190565b8581526080602082015260006115886080830186886113e8565b6001600160a01b0394909416604083015250606001529392505050565b6000602082840312156115b757600080fd5b5051919050565b6000602082840312156115d057600080fd5b8151801515811461109a57600080fd5b8082018082111561160157634e487b7160e01b600052601160045260246000fd5b92915050565b60005b8381101561162257818101518382015260200161160a565b50506000910152565b6000825161163d818460208701611607565b9190910192915050565b6020815260008251806020840152611666816040850160208701611607565b601f01601f1916919091016040019291505056fea2646970667358221220b3b7c00512eb03772d598a544652effb71c275085d073b95e2b2b028be59988e64736f6c634300081200330000000000000000000000001f81b85bd58bba5878c45d28fab5877e22979134
Deployed Bytecode
0x6080604052600436106100f75760003560e01c80639c7d88b41161008a578063dbf41b3c11610059578063dbf41b3c1461026b578063efdcd9741461027e578063f2fde38b1461029e578063ffc18f0a146102be57600080fd5b80639c7d88b4146101eb5780639e8c708e1461020b578063a78e03361461022b578063b3f006741461024b57600080fd5b806367d5b7ec116100c657806367d5b7ec1461016d5780636a3629221461018d578063715018a6146101a05780638da5cb5b146101b557600080fd5b8063012538f41461010357806305ab9868146101255780630614117a146101385780635f5951d11461014d57600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5061012361011e366004611273565b6102de565b005b6101236101333660046112fe565b6103d4565b34801561014457600080fd5b5061012361052c565b34801561015957600080fd5b50610123610168366004611273565b6105a2565b34801561017957600080fd5b50610123610188366004611273565b61066d565b61012361019b3660046112fe565b6106fc565b3480156101ac57600080fd5b506101236107cd565b3480156101c157600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b3480156101f757600080fd5b50610123610206366004611273565b6107e1565b34801561021757600080fd5b50610123610226366004611380565b610870565b34801561023757600080fd5b50610123610246366004611273565b6109a5565b34801561025757600080fd5b506001546101cf906001600160a01b031681565b6101236102793660046112fe565b610a34565b34801561028a57600080fd5b50610123610299366004611380565b610b6e565b3480156102aa57600080fd5b506101236102b9366004611380565b610bd2565b3480156102ca57600080fd5b506101236102d9366004611273565b610c4b565b81428110156103085760405162461bcd60e51b81526004016102ff9061139b565b60405180910390fd5b60008686600081811061031d5761031d6113d2565b90506020020160208101906103329190611380565b90506103408a828b86610d0b565b6040516318cbafe560e01b81526001600160a01b038b16906318cbafe590610376908c908c908c908c908c908c9060040161142f565b6000604051808303816000875af1158015610395573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103bd9190810190611483565b506103c88184610da6565b50505050505050505050565b81428110156103f55760405162461bcd60e51b81526004016102ff9061139b565b8134116104145760405162461bcd60e51b81526004016102ff90611541565b6001546001600160a01b03161580159061042e5750600082115b1561046f576001546040516001600160a01b039091169083156108fc029084906000818181858888f1935050505015801561046d573d6000803e3d6000fd5b505b604051637ff36ab560e01b81526001600160a01b03891690637ff36ab59047906104a5908b908b908b908b908b9060040161156e565b60006040518083038185885af11580156104c3573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526104ec9190810190611483565b5047801561052157604051339082156108fc029083906000818181858888f193505050501580156103c8573d6000803e3d6000fd5b505050505050505050565b610534610e6b565b47801561056a57604051339082156108fc029083906000818181858888f19350505050158015610568573d6000803e3d6000fd5b505b60405181815233907f5419a4ef885e316747ab9e6774ece1fe5071b8be0d4cde03ec1cb05dc7a21a789060200160405180910390a250565b81428110156105c35760405162461bcd60e51b81526004016102ff9061139b565b6000868660008181106105d8576105d86113d2565b90506020020160208101906105ed9190611380565b90506105fb8a828b86610d0b565b604051635c11d79560e01b81526001600160a01b038b1690635c11d79590610631908c908c908c908c908c908c9060040161142f565b600060405180830381600087803b15801561064b57600080fd5b505af115801561065f573d6000803e3d6000fd5b505050506103c88184610da6565b814281101561068e5760405162461bcd60e51b81526004016102ff9061139b565b6000868660008181106106a3576106a36113d2565b90506020020160208101906106b89190611380565b90506106c68a828a86610d0b565b604051634401edf760e11b81526001600160a01b038b1690638803dbee90610376908c908c908c908c908c908c9060040161142f565b814281101561071d5760405162461bcd60e51b81526004016102ff9061139b565b81341161073c5760405162461bcd60e51b81526004016102ff90611541565b6001546001600160a01b0316158015906107565750600082115b15610797576001546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015610795573d6000803e3d6000fd5b505b60405163fb3bdb4160e01b81526001600160a01b0389169063fb3bdb419047906104a5908b908b908b908b908b9060040161156e565b6107d5610e6b565b6107df6000610ec5565b565b81428110156108025760405162461bcd60e51b81526004016102ff9061139b565b600086866000818110610817576108176113d2565b905060200201602081019061082c9190611380565b905061083a8a828b86610d0b565b60405163791ac94760e01b81526001600160a01b038b169063791ac94790610631908c908c908c908c908c908c9060040161142f565b610878610e6b565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156108c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e591906115a5565b905080156109605760405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af115801561093a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095e91906115be565b505b6040518181526001600160a01b0384169033907f6e0216a77a5b0aae083152882a2e812b20c2045a361c64e79c88190de8da27269060200160405180910390a3505050565b81428110156109c65760405162461bcd60e51b81526004016102ff9061139b565b6000868660008181106109db576109db6113d2565b90506020020160208101906109f09190611380565b90506109fe8a828b86610d0b565b6040516338ed173960e01b81526001600160a01b038b16906338ed173990610376908c908c908c908c908c908c9060040161142f565b8142811015610a555760405162461bcd60e51b81526004016102ff9061139b565b813411610a745760405162461bcd60e51b81526004016102ff90611541565b6001546001600160a01b031615801590610a8e5750600082115b15610acf576001546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015610acd573d6000803e3d6000fd5b505b60405163b6f9de9560e01b81526001600160a01b0389169063b6f9de95904790610b05908b908b908b908b908b9060040161156e565b6000604051808303818588803b158015610b1e57600080fd5b505af1158015610b32573d6000803e3d6000fd5b504793505082159150610521905057604051339082156108fc029083906000818181858888f193505050501580156103c8573d6000803e3d6000fd5b610b76610e6b565b6001546040516001600160a01b038084169216907f1b092cca381ac00a07e1226c164f47c475d212f5e55699475a7f411811f77dd490600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b610bda610e6b565b6001600160a01b038116610c3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ff565b610c4881610ec5565b50565b600085856000818110610c6057610c606113d2565b9050602002016020810190610c759190611380565b9050610c8389828985610d0b565b604051632512eca560e11b81526001600160a01b038a1690634a25d94a90610cb9908b908b908b908b908b908b9060040161142f565b6000604051808303816000875af1158015610cd8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d009190810190611483565b506105218183610da6565b610d2c3330610d1a84866115e0565b6001600160a01b038716929190610f15565b60405163095ea7b360e01b81526001600160a01b0385811660048301526024820184905284169063095ea7b3906044016020604051808303816000875af1158015610d7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9f91906115be565b5050505050565b6001546001600160a01b031615801590610dc05750600081115b15610ddf57600154610ddf906001600160a01b03848116911683610f86565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4a91906115a5565b90508015610e6657610e666001600160a01b0384163383610f86565b505050565b6000546001600160a01b031633146107df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102ff565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f809085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610fb6565b50505050565b6040516001600160a01b038316602482015260448101829052610e6690849063a9059cbb60e01b90606401610f49565b600061100b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110889092919063ffffffff16565b805190915015610e66578080602001905181019061102991906115be565b610e665760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102ff565b606061109784846000856110a1565b90505b9392505050565b6060824710156111025760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102ff565b6001600160a01b0385163b6111595760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102ff565b600080866001600160a01b03168587604051611175919061162b565b60006040518083038185875af1925050503d80600081146111b2576040519150601f19603f3d011682016040523d82523d6000602084013e6111b7565b606091505b50915091506111c78282866111d2565b979650505050505050565b606083156111e157508161109a565b8251156111f15782518084602001fd5b8160405162461bcd60e51b81526004016102ff9190611647565b80356001600160a01b038116811461122257600080fd5b919050565b60008083601f84011261123957600080fd5b50813567ffffffffffffffff81111561125157600080fd5b6020830191508360208260051b850101111561126c57600080fd5b9250929050565b60008060008060008060008060e0898b03121561128f57600080fd5b6112988961120b565b97506020890135965060408901359550606089013567ffffffffffffffff8111156112c257600080fd5b6112ce8b828c01611227565b90965094506112e1905060808a0161120b565b925060a0890135915060c089013590509295985092959890939650565b600080600080600080600060c0888a03121561131957600080fd5b6113228861120b565b965060208801359550604088013567ffffffffffffffff81111561134557600080fd5b6113518a828b01611227565b909650945061136490506060890161120b565b92506080880135915060a0880135905092959891949750929550565b60006020828403121561139257600080fd5b61109a8261120b565b60208082526018908201527f556e69737761705632526f757465723a20455850495245440000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b8183526000602080850194508260005b85811015611424576001600160a01b036114118361120b565b16875295820195908201906001016113f8565b509495945050505050565b86815285602082015260a06040820152600061144f60a0830186886113e8565b6001600160a01b039490941660608301525060800152949350505050565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561149657600080fd5b825167ffffffffffffffff808211156114ae57600080fd5b818501915085601f8301126114c257600080fd5b8151818111156114d4576114d461146d565b8060051b604051601f19603f830116810181811085821117156114f9576114f961146d565b60405291825284820192508381018501918883111561151757600080fd5b938501935b828510156115355784518452938501939285019261151c565b98975050505050505050565b6020808252601390820152721a5b9cdd59999a58da595b9d08185b5bdd5b9d606a1b604082015260600190565b8581526080602082015260006115886080830186886113e8565b6001600160a01b0394909416604083015250606001529392505050565b6000602082840312156115b757600080fd5b5051919050565b6000602082840312156115d057600080fd5b8151801515811461109a57600080fd5b8082018082111561160157634e487b7160e01b600052601160045260246000fd5b92915050565b60005b8381101561162257818101518382015260200161160a565b50506000910152565b6000825161163d818460208701611607565b9190910192915050565b6020815260008251806020840152611666816040850160208701611607565b601f01601f1916919091016040019291505056fea2646970667358221220b3b7c00512eb03772d598a544652effb71c275085d073b95e2b2b028be59988e64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001f81b85bd58bba5878c45d28fab5877e22979134
-----Decoded View---------------
Arg [0] : _feeReceiver (address): 0x1f81B85bd58Bba5878C45d28fAB5877E22979134
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001f81b85bd58bba5878c45d28fab5877e22979134
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.