Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Para Swap | 20708637 | 535 days ago | IN | 0.001 ETH | 0.00012711 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Deposit | 20708637 | 535 days ago | 0.001 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ParaSameSwap
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 100 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./libs/BytesLib.sol";
interface IUniswapV2Router02 {
function WETH() external pure returns (address);
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;
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 getAmountsOut(
uint amountIn,
address[] calldata path
) external view returns (uint[] memory amounts);
}
interface IV3SwapRouter {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
function exactInputSingle(
ExactInputSingleParams calldata params
) external payable returns (uint256 amountOut);
struct ExactInputParams {
bytes path;
address recipient;
uint256 amountIn;
uint256 amountOutMinimum;
}
function exactInput(
ExactInputParams calldata params
) external payable returns (uint256 amountOut);
struct ExactOutputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 amountOut;
uint256 amountInMaximum;
uint160 sqrtPriceLimitX96;
}
function exactOutputSingle(
ExactOutputSingleParams calldata params
) external payable returns (uint256 amountIn);
struct ExactOutputParams {
bytes path;
address recipient;
uint256 amountOut;
uint256 amountInMaximum;
}
function exactOutput(
ExactOutputParams calldata params
) external payable returns (uint256 amountIn);
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external;
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to
) external payable returns (uint256 amountOut);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to
) external payable returns (uint256 amountIn);
function WETH9() external view returns (address);
}
interface IWETH is IERC20 {
function deposit() external payable;
function withdraw(uint amount) external;
}
contract ParaSameSwap is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
using BytesLib for bytes;
address public immutable paraRouter;
IUniswapV2Router02 public immutable v2Router;
IV3SwapRouter public immutable v3Router;
address public wethToken;
address public feeReceiver;
uint256 public platformFee; // Fee must be by 1000, so if you want 5% this will be 5000
uint256 public constant feeBps = 1000; // 1000 is 1% so we can have many decimals
uint256 public constant MAX_PLATFORM_FEE = 2000;
error FailedCall();
////================= Events ===================////
event SwapExecuted(
address indexed tokenIn,
address indexed tokenOut,
uint amountIn,
uint amountOut
);
event FeeReceiverSet(
address indexed _oldReceiver,
address indexed _newReceiver
);
event FeeSent(address feeReceiver, uint256 amount);
constructor(
address _paraRouter,
address _v2Router,
address _v3Router,
address _wethToken,
uint256 _fee,
address _feeReceiver
) Ownable(msg.sender) {
paraRouter = _paraRouter;
v2Router = IUniswapV2Router02(_v2Router);
v3Router = IV3SwapRouter(_v3Router);
wethToken = _wethToken;
platformFee = _fee;
feeReceiver = _feeReceiver;
}
function changeFeeData(
uint256 _fee,
address _feeReceiver
) external onlyOwner {
require(
_fee <= MAX_PLATFORM_FEE,
"Platform fee exceeds the maximum limit"
);
platformFee = _fee;
address oldReceiver = feeReceiver;
feeReceiver = _feeReceiver;
emit FeeReceiverSet(oldReceiver, _feeReceiver);
}
function paraSwap(
address _tokenA,
address _tokenB,
bool _isETHIn,
bool _isETHOut,
uint256 _amountIn,
bytes calldata _data,
bytes calldata _feeData
) public payable nonReentrant {
if (_isETHIn) {
require(msg.value > 0, "invalid eth amount");
_amountIn = msg.value;
IWETH(wethToken).deposit{value: msg.value}();
} else {
uint256 beforeTransfer = IERC20(_tokenA).balanceOf(address(this));
IERC20(_tokenA).safeTransferFrom(
msg.sender,
address(this),
_amountIn
);
uint256 afterTransfer = IERC20(_tokenA).balanceOf(address(this));
_amountIn = afterTransfer - beforeTransfer;
checkAndApproveAll(_tokenA, paraRouter, _amountIn);
}
uint256 feeAmount = (_amountIn * platformFee) / (feeBps * 100);
uint256 amountIn = _amountIn - feeAmount;
uint256 amountOut;
if (_isETHOut) {
uint256 beforeBalance = address(msg.sender).balance;
(bool success, ) = paraRouter.call(_data);
require(success, "Call to paraswap router failed");
uint256 afterBalance = address(msg.sender).balance;
amountOut = afterBalance - beforeBalance;
} else {
uint256 beforeBalance = IERC20(_tokenB).balanceOf(
address(msg.sender)
);
(bool success, ) = paraRouter.call(_data);
require(success, "Call to paraswap router failed");
uint256 afterBalance = IERC20(_tokenB).balanceOf(
address(msg.sender)
);
amountOut = afterBalance - beforeBalance;
}
(bool feeSuccess, ) = paraRouter.call(_feeData);
require(feeSuccess, "Call to paraswap router failed in Fee");
emit SwapExecuted(_tokenA, _tokenB, amountIn, amountOut);
}
function swapOnce(
address _tokenA,
address _tokenB,
bool _unwrappETH,
uint256 _amountIn,
uint256 _minAmountOutV2,
uint256 _minAmountOutV3,
uint8 _buyOneTwoOrThree, // 1 means buy only v2, 2 means buy v3 only, 3 means buy first v2 then v3, 4 means buy first v3 then v2
address[] memory _pathV2,
bytes memory _pathV3,
bool isWethIn
) public payable nonReentrant {
// ETH -> Token
if (!isWethIn && _tokenA == wethToken) {
require(msg.value > 0, "invalid msg.value");
IWETH(wethToken).deposit{value: msg.value}();
} else {
require(msg.value == 0, "invalid msg.value");
uint256 beforeTransfer = IERC20(_tokenA).balanceOf(address(this));
IERC20(_tokenA).safeTransferFrom(
msg.sender,
address(this),
_amountIn
);
uint256 afterTransfer = IERC20(_tokenA).balanceOf(address(this));
_amountIn = afterTransfer - beforeTransfer;
}
uint256 amountIn = (msg.value > 0 ? msg.value : _amountIn);
uint256 output;
if (_buyOneTwoOrThree == 1) {
uint256 feeAmount = (amountIn * platformFee) / (feeBps * 100);
if (_pathV2[0] != wethToken) {
// WETH => Token
address[] memory path = new address[](2);
path[0] = _pathV2[0];
path[1] = wethToken;
v2Swap(path, feeAmount, 0);
}
output = v2Swap(_pathV2, amountIn - feeAmount, _minAmountOutV2);
} else if (_buyOneTwoOrThree == 2) {
uint256 feeAmount = (amountIn * platformFee) / (feeBps * 100);
if (_pathV3.toAddress(0) == wethToken) {
// WETH => output Token
output = v3Swap(
_tokenA,
_pathV3,
amountIn - feeAmount,
_minAmountOutV3
);
} else if (
_pathV3.toAddress(23) == wethToken && _tokenB == wethToken
) {
// Token => WETH
output = v3Swap(_tokenA, _pathV3, amountIn, _minAmountOutV3);
feeAmount = (output * platformFee) / (feeBps * 100);
output = output - feeAmount;
} else {
// Token => WETH (stable coins) => Token
v3Swap(_tokenA, _pathV3.slice(0, 43), feeAmount, 0);
output = v3Swap(
_tokenA,
_pathV3,
amountIn - feeAmount,
_minAmountOutV3
);
}
} else if (_buyOneTwoOrThree == 3) {
output = v2Swap(_pathV2, amountIn, _minAmountOutV2);
uint256 feeAmount = (output * platformFee) / (feeBps * 100);
output = v3Swap(
_pathV2[_pathV2.length - 1],
_pathV3,
output - feeAmount,
_minAmountOutV3
);
} else if (_buyOneTwoOrThree == 4) {
output = v3Swap(_tokenA, _pathV3, amountIn, _minAmountOutV3);
uint256 feeAmount = (output * platformFee) / (feeBps * 100);
output = v2Swap(_pathV2, output - feeAmount, _minAmountOutV2);
}
if (_unwrappETH) {
IWETH(wethToken).withdraw(output);
// payable(msg.sender).transfer(output);
(bool success, ) = msg.sender.call{value: output}("");
if (!success) {
revert FailedCall();
}
} else {
IERC20(_tokenB).safeTransfer(msg.sender, output);
}
if (IWETH(wethToken).balanceOf(address(this)) > 0) {
IWETH(wethToken).withdraw(
IWETH(wethToken).balanceOf(address(this))
);
payable(feeReceiver).transfer(address(this).balance);
emit FeeSent(feeReceiver, address(this).balance);
}
emit SwapExecuted(_tokenA, _tokenB, _amountIn, output);
}
function checkAndApproveAll(
address _token,
address _target,
uint256 _amountToCheck
) internal {
if (IERC20(_token).allowance(address(this), _target) < _amountToCheck) {
IERC20(_token).forceApprove(_target, 0);
IERC20(_token).forceApprove(_target, _amountToCheck);
}
}
function v2Swap(
address[] memory _path,
uint256 _amountIn,
uint256 _minAmountOut // Slippage in base of 1000 meaning 10 is 1% and 1 is 0.1% where 1000 is 1
) internal returns (uint256) {
address tokenOut = _path[_path.length - 1];
checkAndApproveAll(_path[0], address(v2Router), _amountIn);
uint256 initial = IERC20(tokenOut).balanceOf(address(this));
v2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
_amountIn,
_minAmountOut,
_path,
address(this),
block.timestamp + 1 hours
);
uint256 finalAmount = IERC20(tokenOut).balanceOf(address(this));
return finalAmount - initial;
}
function v3Swap(
address _tokenIn,
bytes memory _path,
uint256 _amountIn,
uint256 _minAmountOut
) internal returns (uint256 amountOutput) {
checkAndApproveAll(_tokenIn, address(v3Router), _amountIn);
IV3SwapRouter.ExactInputParams memory params = IV3SwapRouter
.ExactInputParams(_path, address(this), _amountIn, _minAmountOut);
amountOutput = v3Router.exactInput(params);
}
function recoverStuckETH(address payable _beneficiary) public onlyOwner {
// _beneficiary.transfer(address(this).balance);
(bool success, ) = _beneficiary.call{value: address(this).balance}("");
if (!success) {
revert FailedCall();
}
}
function recoverStuckTokens(address _token) external onlyOwner {
uint256 amount = IERC20(_token).balanceOf(address(this));
IERC20(_token).safeTransfer(owner(), amount);
}
receive() external payable {}
fallback() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @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 {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @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.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
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].
*
* CAUTION: See Security Considerations above.
*/
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 v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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;
/**
* @dev An operation with an ERC20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @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);
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @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;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}// SPDX-License-Identifier: GPL-2.0-or-later
/*
* @title Solidity Bytes Arrays Utils
* @author Gonçalo Sá <goncalo.sa@consensys.net>
*
* @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
* The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
*/
pragma solidity =0.8.20;
library BytesLib {
function slice(
bytes memory _bytes,
uint256 _start,
uint256 _length
) internal pure returns (bytes memory) {
require(_length + 31 >= _length, 'slice_overflow');
require(_start + _length >= _start, 'slice_overflow');
require(_bytes.length >= _start + _length, 'slice_outOfBounds');
bytes memory tempBytes;
assembly {
switch iszero(_length)
case 0 {
// Get a location of some free memory and store it in tempBytes as
// Solidity does for memory variables.
tempBytes := mload(0x40)
// The first word of the slice result is potentially a partial
// word read from the original array. To read it, we calculate
// the length of that partial word and start copying that many
// bytes into the array. The first word we copy will start with
// data we don't care about, but the last `lengthmod` bytes will
// land at the beginning of the contents of the new array. When
// we're done copying, we overwrite the full first word with
// the actual length of the slice.
let lengthmod := and(_length, 31)
// The multiplication in the next line is necessary
// because when slicing multiples of 32 bytes (lengthmod == 0)
// the following copy loop was copying the origin's length
// and then ending prematurely not copying everything it should.
let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
let end := add(mc, _length)
for {
// The multiplication in the next line has the same exact purpose
// as the one above.
let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
} lt(mc, end) {
mc := add(mc, 0x20)
cc := add(cc, 0x20)
} {
mstore(mc, mload(cc))
}
mstore(tempBytes, _length)
//update free-memory pointer
//allocating the array padded to 32 bytes like the compiler does now
mstore(0x40, and(add(mc, 31), not(31)))
}
//if we want a zero-length slice let's just return a zero-length array
default {
tempBytes := mload(0x40)
//zero out the 32 bytes slice we are about to return
//we need to do it because Solidity does not garbage collect
mstore(tempBytes, 0)
mstore(0x40, add(tempBytes, 0x20))
}
}
return tempBytes;
}
function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
require(_start + 20 >= _start, 'toAddress_overflow');
require(_bytes.length >= _start + 20, 'toAddress_outOfBounds');
address tempAddress;
assembly {
tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
}
return tempAddress;
}
function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) {
require(_start + 3 >= _start, 'toUint24_overflow');
require(_bytes.length >= _start + 3, 'toUint24_outOfBounds');
uint24 tempUint;
assembly {
tempUint := mload(add(add(_bytes, 0x3), _start))
}
return tempUint;
}
}{
"optimizer": {
"enabled": true,
"runs": 100
},
"viaIR": true,
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_paraRouter","type":"address"},{"internalType":"address","name":"_v2Router","type":"address"},{"internalType":"address","name":"_v3Router","type":"address"},{"internalType":"address","name":"_wethToken","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"address","name":"_feeReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_oldReceiver","type":"address"},{"indexed":true,"internalType":"address","name":"_newReceiver","type":"address"}],"name":"FeeReceiverSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeReceiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeSent","type":"event"},{"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":"tokenIn","type":"address"},{"indexed":true,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"SwapExecuted","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"MAX_PLATFORM_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"address","name":"_feeReceiver","type":"address"}],"name":"changeFeeData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":[],"name":"paraRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenA","type":"address"},{"internalType":"address","name":"_tokenB","type":"address"},{"internalType":"bool","name":"_isETHIn","type":"bool"},{"internalType":"bool","name":"_isETHOut","type":"bool"},{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes","name":"_feeData","type":"bytes"}],"name":"paraSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"platformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_beneficiary","type":"address"}],"name":"recoverStuckETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverStuckTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenA","type":"address"},{"internalType":"address","name":"_tokenB","type":"address"},{"internalType":"bool","name":"_unwrappETH","type":"bool"},{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"uint256","name":"_minAmountOutV2","type":"uint256"},{"internalType":"uint256","name":"_minAmountOutV3","type":"uint256"},{"internalType":"uint8","name":"_buyOneTwoOrThree","type":"uint8"},{"internalType":"address[]","name":"_pathV2","type":"address[]"},{"internalType":"bytes","name":"_pathV3","type":"bytes"},{"internalType":"bool","name":"isWethIn","type":"bool"}],"name":"swapOnce","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"v2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"v3Router","outputs":[{"internalType":"contract IV3SwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60e0346200017c57601f62001f9438819003918201601f19168301916001600160401b03831184841017620001815780849260c0946040528339810103126200017c576200004d8162000197565b906200005c6020820162000197565b6200006a6040830162000197565b92620000796060840162000197565b926200008d60a06080830151920162000197565b91331562000163576000549460018060a01b03199533878216176000556040519760018060a01b03809781958294833391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3600180556080521660a0521660c0521684600254161760025560045516906003541617600355611de79081620001ad8239608051818181610143015281816104d701528181610523015261073b015260a051818181610af5015281816119150152611a55015260c05181818161018801528181611b9c0152611c430152f35b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036200017c5756fe60806040526004361015610018575b361561001657005b005b60003560e01c8063046d293c146101185780630dc913061461011357806324a9d8531461010e57806326232a2e146101095780633998a681146101045780634b57b0be146100ff5780634be55d1f146100fa5780636899cb70146100f55780637006d4ee146100f0578063715018a6146100eb5780638da5cb5b146100e6578063b3f00674146100e1578063c1424869146100dc578063d8b499cd146100d7578063deadbc14146100d25763f2fde38b0361000e57610b24565b610adf565b610a45565b610838565b61080f565b6107e6565b610788565b61038b565b6102e9565b610249565b61020f565b6101f2565b6101d4565b6101b7565b610172565b61012d565b600091031261012857565b600080fd5b34610128576000366003190112610128576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610128576000366003190112610128576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346101285760003660031901126101285760206040516103e88152f35b34610128576000366003190112610128576020600454604051908152f35b346101285760003660031901126101285760206040516107d08152f35b34610128576000366003190112610128576002546040516001600160a01b039091168152602090f35b6001600160a01b0381160361012857565b346101285760203660031901126101285760043561026681610238565b61026e610bb0565b6040516370a0823160e01b8152306004820152906001600160a01b03908116602083602481845afa9182156102e457610016936000936102b4575b506000541690611553565b6102d691935060203d81116102dd575b6102ce8183610952565b810190610bdc565b91386102a9565b503d6102c4565b610beb565b346101285760203660031901126101285760043561030681610238565b61030e610bb0565b60008080808094479060018060a01b03165af1610329610c90565b50156103325780f35b60405163d6bda27560e01b8152600490fd5b8015150361012857565b610124359061035c82610344565b565b9181601f84011215610128578235916001600160401b038311610128576020838186019501011161012857565b60e03660031901126101285760048035906103a582610238565b6024356103b181610238565b6044356103bd81610344565b606435916103ca83610344565b6084356001600160401b0360a435818111610128576103ec903690880161035e565b95909160c43590811161012857610406903690890161035e565b939095610411610eab565b156106a55750610422341515610c2e565b60025434906104479061043b906001600160a01b031681565b6001600160a01b031690565b803b1561012857600082918a60405180958193630d0e30db60e41b83525af19182156102e4576104959261068c575b505b61048f6104868a5483610c6f565b620186a0900490565b90610c21565b966000911561057957505060006105529261050d82936105068480600080516020611d928339815191529b3331946104d260405180938193610c82565b0390827f00000000000000000000000000000000000000000000000000000000000000005af1610500610c90565b50610cc0565b3331610c21565b955b61051e60405180938193610c82565b0390827f00000000000000000000000000000000000000000000000000000000000000005af161054c610c90565b50610d0c565b6040805194855260208501929092526001600160a01b03908116941692a361001660018055565b6040516370a0823160e01b808252338383019081529198939560209590946001600160a01b0389169390919087908c90819083010381875afa9a8b156102e457889b610653575b50916105e1888089989795946105fb9a97956104d260405180938193610c82565b604051908152339281019283529586928391829160200190565b03915afa9384156102e457600080516020611d92833981519152976105529560009586956106309492610636575b5050610c21565b9561050f565b61064c9250803d106102dd576102ce8183610952565b3880610629565b87969593919b50888088969461067b6105e1946105fb9c3d8b116102dd576102ce8183610952565b9e94969899509496995050506105c0565b8061069961069f9261091f565b8061011d565b38610476565b6040516370a0823160e01b808252308a830190815290926020926001600160a01b038d169284908290819083010381865afa9283156102e4576107159585938e93600096610765575b506106fb90303385610d66565b604051908152309281019283529586928391829160200190565b03915afa80156102e4576104959361073593600092610636575050610c21565b610760817f00000000000000000000000000000000000000000000000000000000000000008c611594565b610478565b6106fb91965061078190863d88116102dd576102ce8183610952565b95906106ee565b34610128576000806003193601126107e3576107a2610bb0565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b34610128576000366003190112610128576000546040516001600160a01b039091168152602090f35b34610128576000366003190112610128576003546040516001600160a01b039091168152602090f35b346101285760403660031901126101285760243560043561085882610238565b610860610bb0565b6107d081116108b557600455600380546001600160a01b039283166001600160a01b0319821681179092559091167f49bc8f1c292131e71bfca22660d0716072ff2442b58d72840474dd83a390411c600080a3005b60405162461bcd60e51b815260206004820152602660248201527f506c6174666f726d20666565206578636565647320746865206d6178696d756d604482015265081b1a5b5a5d60d21b6064820152608490fd5b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161093257604052565b610909565b608081019081106001600160401b0382111761093257604052565b90601f801991011681019081106001600160401b0382111761093257604052565b9080601f83011215610128578135906001600160401b038211610932578160051b604051936020936109a785840187610952565b85528380860192820101928311610128578301905b8282106109ca575050505090565b83809183356109d881610238565b8152019101906109bc565b6001600160401b03811161093257601f01601f191660200190565b81601f8201121561012857803590610a15826109e3565b92610a236040519485610952565b8284526020838301011161012857816000926020809301838601378301015290565b61014036600319011261012857600435610a5e81610238565b60243590610a6b82610238565b60443591610a7883610344565b60c4359260ff84168403610128576001600160401b039360e43585811161012857610aa7903690600401610973565b916101043595861161012857610ac46100169636906004016109fe565b93610acd61034e565b9560a435926084359260643592610ece565b34610128576000366003190112610128576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461012857602036600319011261012857600435610b4181610238565b610b49610bb0565b6001600160a01b039081168015610b9757600080546001600160a01b03198116831782559092167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b604051631e4fbdf760e01b815260006004820152602490fd5b6000546001600160a01b03163303610bc457565b60405163118cdaa760e01b8152336004820152602490fd5b90816020910312610128575190565b6040513d6000823e3d90fd5b634e487b7160e01b600052601160045260246000fd5b600019810191908211610c1c57565b610bf7565b91908203918211610c1c57565b15610c3557565b60405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a5908195d1a08185b5bdd5b9d60721b6044820152606490fd5b81810292918115918404141715610c1c57565b908092918237016000815290565b3d15610cbb573d90610ca1826109e3565b91610caf6040519384610952565b82523d6000602084013e565b606090565b15610cc757565b60405162461bcd60e51b815260206004820152601e60248201527f43616c6c20746f20706172617377617020726f75746572206661696c656400006044820152606490fd5b15610d1357565b60405162461bcd60e51b815260206004820152602560248201527f43616c6c20746f20706172617377617020726f75746572206661696c656420696044820152646e2046656560d81b6064820152608490fd5b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a08101918183106001600160401b038411176109325761035c92604052610dd6565b908160209103126101285751610dd381610344565b90565b600080610dff9260018060a01b03169360208151910182865af1610df8610c90565b9083610e48565b8051908115159182610e2d575b5050610e155750565b60249060405190635274afe760e01b82526004820152fd5b610e409250602080918301019101610dbe565b153880610e0c565b90610e6f5750805115610e5d57805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610ea2575b610e80575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b15610e78565b600260015414610ebc576002600155565b604051633ee5aeb560e01b8152600490fd5b989790969295949195610edf610eab565b8098158061147a575b156113cc5750610ef93415156114a0565b600254610f109061043b906001600160a01b031681565b803b1561012857600060049160405192838092630d0e30db60e41b825234905af180156102e4576113b9575b505b34156113b25734945b60009060ff16600181036112535750505050610fa9610faf93610f6f61048660045483610c6f565b90610f89610f7c856114e0565b516001600160a01b031690565b6002546001600160a01b0390811691849116829003611206575050610c21565b90611a20565b905b156111ed57600254610fcd9061043b906001600160a01b031681565b803b1561012857604051632e1a7d4d60e01b815260048101839052906000908290602490829084905af180156102e4576111da575b50600080808084335af1611014610c90565b5015610332575b6002546110329061043b906001600160a01b031681565b6040516370a0823160e01b808252306004830152602092918381602481865afa9081156102e4576000916111bd575b506110a4575b5050604080519485526020850192909252506001600160a01b039182169390911691600080516020611d928339815191529190a361035c60018055565b6040519081523060048201528281602481855afa9283156102e45760009361119e575b5050803b1561012857604051632e1a7d4d60e01b815260048101929092526000908290602490829084905af180156102e45761118b575b50600080808061111b61043b61043b60035460018060a01b031690565b4790828215611182575bf1156102e457600354604080516001600160a01b039092168252476020830152600080516020611d9283398151915293917f58793df5f4d270351f09efd433db93c69432142b69dc7ee38195fc630478c79f9190a1913880611067565b506108fc611125565b806106996111989261091f565b386110fe565b6111b5929350803d106102dd576102ce8183610952565b9038806110c7565b6111d49150843d86116102dd576102ce8183610952565b38611061565b806106996111e79261091f565b38611002565b61120181336001600160a01b038516611553565b61101b565b61124b91611246611215611527565b9161123d611225610f7c8b6114e0565b61122e856114e0565b6001600160a01b039091169052565b61122e83611503565b6118e2565b503882610629565b92949193919260028103611326575050505061127461048660045485610c6f565b61127d82611d67565b600254611292906001600160a01b031661043b565b6001600160a01b0391821681036112bf5750506112b2906112b994610c21565b9087611c2c565b90610fb1565b80826112ca86611d80565b1614918261131a575b5050156112f95750906112b9926112ea9288611c2c565b61048f61048660045483610c6f565b806112b9946113146112b29361130e86611ca4565b8c611b85565b50610c21565b881614905038806112d3565b9296959193926003810361137b5750506113486112b995966113759285611a20565b9261136f610f7c61135e61048660045488610c6f565b926113698151610c0d565b90611513565b93610c21565b91611c2c565b9096949290600414611392575b5050505050610fb1565b6113a7959650916112ea91610fa9938b611c2c565b903880808080611388565b8794610f47565b806106996113c69261091f565b38610f3c565b9097506113d934156114a0565b6040516370a0823160e01b808252306004830152602092916001600160a01b038c16918482602481865afa9384156102e4578592600095611457575b5061142290303386610d66565b60405190815230600482015291829060249082905afa9081156102e45761145193600092610636575050610c21565b96610f3e565b61142291955061147390843d86116102dd576102ce8183610952565b9490611415565b50600254611490906001600160a01b031661043b565b6001600160a01b038b1614610ee8565b156114a757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964206d73672e76616c756560781b6044820152606490fd5b8051156114ed5760200190565b634e487b7160e01b600052603260045260246000fd5b8051600110156114ed5760400190565b80518210156114ed5760209160051b010190565b60405190606082018281106001600160401b038211176109325760405260028252604082602036910137565b60405163a9059cbb60e01b60208201526001600160a01b0392909216602483015260448083019390935291815261035c9161158f606483610952565b610dd6565b604051636eb1769f60e11b81523060048201526001600160a01b038084166024830152602094939216908481604481855afa80156102e45784916000916116eb575b50106115e3575b50505050565b60405163095ea7b360e01b8582018181526001600160a01b038516602484015260006044808501829052845261165597929392601f1992909190819061162a606487610952565b85519082895af1611639610c90565b816116bb575b50806116b1575b1561165e575b50505050611708565b388080806115dd565b604051908101939093526001600160a01b0385166024840152600060448401526116a8926116a29161169c9082606481015b03908101835282610952565b84610dd6565b82610dd6565b3880808061164c565b50843b1515611646565b805180159250839083156116d3575b5050503861163f565b6116e39350820181019101610dbe565b3882816116ca565b6117029150863d88116102dd576102ce8183610952565b386115d6565b60405163095ea7b360e01b602082018181526001600160a01b0385166024840152604480840196909652948252939092601f1991611747606486610952565b84516001600160a01b03851691600091829182855af190611766610c90565b826117cc575b50816117c1575b5015611781575b5050505050565b60405160208101959095526001600160a01b03166024850152600060448501526117b79361158f916116a2908260648101611690565b388080808061177a565b90503b151538611773565b805191925081159182156117e4575b5050903861176c565b6117f79250602080918301019101610dbe565b38806117db565b90610e108201809211610c1c57565b91909493929460a0830190835260209060008285015260a0604085015282518091528160c0850193019160005b82811061185b5750505050906080919460018060a01b031660608201520152565b83516001600160a01b03168552938101939281019260010161183a565b9291909594939560a084019084526020918285015260a0604085015282518091528160c0850193019160005b8281106118c55750505050906080919460018060a01b031660608201520152565b83516001600160a01b0316855293810193928101926001016118a4565b6118f8610f7c6118f28351610c0d565b83611513565b91611905610f7c836114e0565b9260018060a01b039061193c83837f0000000000000000000000000000000000000000000000000000000000000000168097611594565b6040516370a0823160e01b8082523060048301526020969195939092169392908686602481885afa9586156102e457600096611a01575b5061197d426117fe565b90803b15610128576119ac946000809460405197889586948593635c11d79560e01b855230916004860161180d565b03925af19182156102e45785926119ee575b5060405190815230600482015291829060249082905afa9081156102e457610dd393600092610636575050610c21565b806106996119fb9261091f565b386119be565b611a19919650873d89116102dd576102ce8183610952565b9438611973565b9190611a38610f7c611a328551610c0d565b85611513565b92611a45610f7c826114e0565b9360018060a01b0390611a7c84837f0000000000000000000000000000000000000000000000000000000000000000168098611594565b6040516370a0823160e01b80825230600483015260209791969290931694908787602481895afa9687156102e457600097611aea575b50611abc426117fe565b94813b1561012857600080946119ac60405198899687958694635c11d79560e01b8652309260048701611878565b611b02919750883d8a116102dd576102ce8183610952565b9538611ab2565b60208082528251608082840152805160a084018190529194939060005b838110611b71575050606090611b5560c095966000878688010152820151604086019060018060a01b03169052565b60408101518483015201516080830152601f01601f1916010190565b81810187015185820160c001528601611b26565b611bfe90602092600094611bc38160018060a01b037f0000000000000000000000000000000000000000000000000000000000000000168095611594565b60405191611bd083610937565b82523085830152604082015284606082015260405194858094819363b858183f60e01b835260048301611b09565b03925af19081156102e457600091611c14575090565b610dd3915060203d81116102dd576102ce8183610952565b611bfe91600094602094611c6a8160018060a01b037f0000000000000000000000000000000000000000000000000000000000000000168096611594565b60405192611c7784610937565b835230868401526040830152606082015260405194858094819363b858183f60e01b835260048301611b09565b602b815110611cea5760405190600b8083019101603683015b808310611cd7575050602b8252601f01601f191660405290565b9091825181526020809101920190611cbd565b60405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606490fd5b15611d2a57565b60405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606490fd5b602090611d78601482511015611d23565b015160601c90565b603790611d78602b82511015611d2356fedd36740e2a012d93061a0d99eaa9107860955de4e90027d3cf465a055026c407a264697066735822122084f35eb70cc30f63279c5e4ddf5f300c921d72b0e1a8d298d87438638efe58d564736f6c634300081400330000000000000000000000006a000f20005980200259b80c51020030400010680000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e1ff5a4c489b11e094bfbb5d23c6d4597a3a79ad
Deployed Bytecode
0x60806040526004361015610018575b361561001657005b005b60003560e01c8063046d293c146101185780630dc913061461011357806324a9d8531461010e57806326232a2e146101095780633998a681146101045780634b57b0be146100ff5780634be55d1f146100fa5780636899cb70146100f55780637006d4ee146100f0578063715018a6146100eb5780638da5cb5b146100e6578063b3f00674146100e1578063c1424869146100dc578063d8b499cd146100d7578063deadbc14146100d25763f2fde38b0361000e57610b24565b610adf565b610a45565b610838565b61080f565b6107e6565b610788565b61038b565b6102e9565b610249565b61020f565b6101f2565b6101d4565b6101b7565b610172565b61012d565b600091031261012857565b600080fd5b34610128576000366003190112610128576040517f0000000000000000000000006a000f20005980200259b80c51020030400010686001600160a01b03168152602090f35b34610128576000366003190112610128576040517f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc456001600160a01b03168152602090f35b346101285760003660031901126101285760206040516103e88152f35b34610128576000366003190112610128576020600454604051908152f35b346101285760003660031901126101285760206040516107d08152f35b34610128576000366003190112610128576002546040516001600160a01b039091168152602090f35b6001600160a01b0381160361012857565b346101285760203660031901126101285760043561026681610238565b61026e610bb0565b6040516370a0823160e01b8152306004820152906001600160a01b03908116602083602481845afa9182156102e457610016936000936102b4575b506000541690611553565b6102d691935060203d81116102dd575b6102ce8183610952565b810190610bdc565b91386102a9565b503d6102c4565b610beb565b346101285760203660031901126101285760043561030681610238565b61030e610bb0565b60008080808094479060018060a01b03165af1610329610c90565b50156103325780f35b60405163d6bda27560e01b8152600490fd5b8015150361012857565b610124359061035c82610344565b565b9181601f84011215610128578235916001600160401b038311610128576020838186019501011161012857565b60e03660031901126101285760048035906103a582610238565b6024356103b181610238565b6044356103bd81610344565b606435916103ca83610344565b6084356001600160401b0360a435818111610128576103ec903690880161035e565b95909160c43590811161012857610406903690890161035e565b939095610411610eab565b156106a55750610422341515610c2e565b60025434906104479061043b906001600160a01b031681565b6001600160a01b031690565b803b1561012857600082918a60405180958193630d0e30db60e41b83525af19182156102e4576104959261068c575b505b61048f6104868a5483610c6f565b620186a0900490565b90610c21565b966000911561057957505060006105529261050d82936105068480600080516020611d928339815191529b3331946104d260405180938193610c82565b0390827f0000000000000000000000006a000f20005980200259b80c51020030400010685af1610500610c90565b50610cc0565b3331610c21565b955b61051e60405180938193610c82565b0390827f0000000000000000000000006a000f20005980200259b80c51020030400010685af161054c610c90565b50610d0c565b6040805194855260208501929092526001600160a01b03908116941692a361001660018055565b6040516370a0823160e01b808252338383019081529198939560209590946001600160a01b0389169390919087908c90819083010381875afa9a8b156102e457889b610653575b50916105e1888089989795946105fb9a97956104d260405180938193610c82565b604051908152339281019283529586928391829160200190565b03915afa9384156102e457600080516020611d92833981519152976105529560009586956106309492610636575b5050610c21565b9561050f565b61064c9250803d106102dd576102ce8183610952565b3880610629565b87969593919b50888088969461067b6105e1946105fb9c3d8b116102dd576102ce8183610952565b9e94969899509496995050506105c0565b8061069961069f9261091f565b8061011d565b38610476565b6040516370a0823160e01b808252308a830190815290926020926001600160a01b038d169284908290819083010381865afa9283156102e4576107159585938e93600096610765575b506106fb90303385610d66565b604051908152309281019283529586928391829160200190565b03915afa80156102e4576104959361073593600092610636575050610c21565b610760817f0000000000000000000000006a000f20005980200259b80c51020030400010688c611594565b610478565b6106fb91965061078190863d88116102dd576102ce8183610952565b95906106ee565b34610128576000806003193601126107e3576107a2610bb0565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b34610128576000366003190112610128576000546040516001600160a01b039091168152602090f35b34610128576000366003190112610128576003546040516001600160a01b039091168152602090f35b346101285760403660031901126101285760243560043561085882610238565b610860610bb0565b6107d081116108b557600455600380546001600160a01b039283166001600160a01b0319821681179092559091167f49bc8f1c292131e71bfca22660d0716072ff2442b58d72840474dd83a390411c600080a3005b60405162461bcd60e51b815260206004820152602660248201527f506c6174666f726d20666565206578636565647320746865206d6178696d756d604482015265081b1a5b5a5d60d21b6064820152608490fd5b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161093257604052565b610909565b608081019081106001600160401b0382111761093257604052565b90601f801991011681019081106001600160401b0382111761093257604052565b9080601f83011215610128578135906001600160401b038211610932578160051b604051936020936109a785840187610952565b85528380860192820101928311610128578301905b8282106109ca575050505090565b83809183356109d881610238565b8152019101906109bc565b6001600160401b03811161093257601f01601f191660200190565b81601f8201121561012857803590610a15826109e3565b92610a236040519485610952565b8284526020838301011161012857816000926020809301838601378301015290565b61014036600319011261012857600435610a5e81610238565b60243590610a6b82610238565b60443591610a7883610344565b60c4359260ff84168403610128576001600160401b039360e43585811161012857610aa7903690600401610973565b916101043595861161012857610ac46100169636906004016109fe565b93610acd61034e565b9560a435926084359260643592610ece565b34610128576000366003190112610128576040517f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03168152602090f35b3461012857602036600319011261012857600435610b4181610238565b610b49610bb0565b6001600160a01b039081168015610b9757600080546001600160a01b03198116831782559092167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b604051631e4fbdf760e01b815260006004820152602490fd5b6000546001600160a01b03163303610bc457565b60405163118cdaa760e01b8152336004820152602490fd5b90816020910312610128575190565b6040513d6000823e3d90fd5b634e487b7160e01b600052601160045260246000fd5b600019810191908211610c1c57565b610bf7565b91908203918211610c1c57565b15610c3557565b60405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a5908195d1a08185b5bdd5b9d60721b6044820152606490fd5b81810292918115918404141715610c1c57565b908092918237016000815290565b3d15610cbb573d90610ca1826109e3565b91610caf6040519384610952565b82523d6000602084013e565b606090565b15610cc757565b60405162461bcd60e51b815260206004820152601e60248201527f43616c6c20746f20706172617377617020726f75746572206661696c656400006044820152606490fd5b15610d1357565b60405162461bcd60e51b815260206004820152602560248201527f43616c6c20746f20706172617377617020726f75746572206661696c656420696044820152646e2046656560d81b6064820152608490fd5b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a08101918183106001600160401b038411176109325761035c92604052610dd6565b908160209103126101285751610dd381610344565b90565b600080610dff9260018060a01b03169360208151910182865af1610df8610c90565b9083610e48565b8051908115159182610e2d575b5050610e155750565b60249060405190635274afe760e01b82526004820152fd5b610e409250602080918301019101610dbe565b153880610e0c565b90610e6f5750805115610e5d57805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610ea2575b610e80575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b15610e78565b600260015414610ebc576002600155565b604051633ee5aeb560e01b8152600490fd5b989790969295949195610edf610eab565b8098158061147a575b156113cc5750610ef93415156114a0565b600254610f109061043b906001600160a01b031681565b803b1561012857600060049160405192838092630d0e30db60e41b825234905af180156102e4576113b9575b505b34156113b25734945b60009060ff16600181036112535750505050610fa9610faf93610f6f61048660045483610c6f565b90610f89610f7c856114e0565b516001600160a01b031690565b6002546001600160a01b0390811691849116829003611206575050610c21565b90611a20565b905b156111ed57600254610fcd9061043b906001600160a01b031681565b803b1561012857604051632e1a7d4d60e01b815260048101839052906000908290602490829084905af180156102e4576111da575b50600080808084335af1611014610c90565b5015610332575b6002546110329061043b906001600160a01b031681565b6040516370a0823160e01b808252306004830152602092918381602481865afa9081156102e4576000916111bd575b506110a4575b5050604080519485526020850192909252506001600160a01b039182169390911691600080516020611d928339815191529190a361035c60018055565b6040519081523060048201528281602481855afa9283156102e45760009361119e575b5050803b1561012857604051632e1a7d4d60e01b815260048101929092526000908290602490829084905af180156102e45761118b575b50600080808061111b61043b61043b60035460018060a01b031690565b4790828215611182575bf1156102e457600354604080516001600160a01b039092168252476020830152600080516020611d9283398151915293917f58793df5f4d270351f09efd433db93c69432142b69dc7ee38195fc630478c79f9190a1913880611067565b506108fc611125565b806106996111989261091f565b386110fe565b6111b5929350803d106102dd576102ce8183610952565b9038806110c7565b6111d49150843d86116102dd576102ce8183610952565b38611061565b806106996111e79261091f565b38611002565b61120181336001600160a01b038516611553565b61101b565b61124b91611246611215611527565b9161123d611225610f7c8b6114e0565b61122e856114e0565b6001600160a01b039091169052565b61122e83611503565b6118e2565b503882610629565b92949193919260028103611326575050505061127461048660045485610c6f565b61127d82611d67565b600254611292906001600160a01b031661043b565b6001600160a01b0391821681036112bf5750506112b2906112b994610c21565b9087611c2c565b90610fb1565b80826112ca86611d80565b1614918261131a575b5050156112f95750906112b9926112ea9288611c2c565b61048f61048660045483610c6f565b806112b9946113146112b29361130e86611ca4565b8c611b85565b50610c21565b881614905038806112d3565b9296959193926003810361137b5750506113486112b995966113759285611a20565b9261136f610f7c61135e61048660045488610c6f565b926113698151610c0d565b90611513565b93610c21565b91611c2c565b9096949290600414611392575b5050505050610fb1565b6113a7959650916112ea91610fa9938b611c2c565b903880808080611388565b8794610f47565b806106996113c69261091f565b38610f3c565b9097506113d934156114a0565b6040516370a0823160e01b808252306004830152602092916001600160a01b038c16918482602481865afa9384156102e4578592600095611457575b5061142290303386610d66565b60405190815230600482015291829060249082905afa9081156102e45761145193600092610636575050610c21565b96610f3e565b61142291955061147390843d86116102dd576102ce8183610952565b9490611415565b50600254611490906001600160a01b031661043b565b6001600160a01b038b1614610ee8565b156114a757565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964206d73672e76616c756560781b6044820152606490fd5b8051156114ed5760200190565b634e487b7160e01b600052603260045260246000fd5b8051600110156114ed5760400190565b80518210156114ed5760209160051b010190565b60405190606082018281106001600160401b038211176109325760405260028252604082602036910137565b60405163a9059cbb60e01b60208201526001600160a01b0392909216602483015260448083019390935291815261035c9161158f606483610952565b610dd6565b604051636eb1769f60e11b81523060048201526001600160a01b038084166024830152602094939216908481604481855afa80156102e45784916000916116eb575b50106115e3575b50505050565b60405163095ea7b360e01b8582018181526001600160a01b038516602484015260006044808501829052845261165597929392601f1992909190819061162a606487610952565b85519082895af1611639610c90565b816116bb575b50806116b1575b1561165e575b50505050611708565b388080806115dd565b604051908101939093526001600160a01b0385166024840152600060448401526116a8926116a29161169c9082606481015b03908101835282610952565b84610dd6565b82610dd6565b3880808061164c565b50843b1515611646565b805180159250839083156116d3575b5050503861163f565b6116e39350820181019101610dbe565b3882816116ca565b6117029150863d88116102dd576102ce8183610952565b386115d6565b60405163095ea7b360e01b602082018181526001600160a01b0385166024840152604480840196909652948252939092601f1991611747606486610952565b84516001600160a01b03851691600091829182855af190611766610c90565b826117cc575b50816117c1575b5015611781575b5050505050565b60405160208101959095526001600160a01b03166024850152600060448501526117b79361158f916116a2908260648101611690565b388080808061177a565b90503b151538611773565b805191925081159182156117e4575b5050903861176c565b6117f79250602080918301019101610dbe565b38806117db565b90610e108201809211610c1c57565b91909493929460a0830190835260209060008285015260a0604085015282518091528160c0850193019160005b82811061185b5750505050906080919460018060a01b031660608201520152565b83516001600160a01b03168552938101939281019260010161183a565b9291909594939560a084019084526020918285015260a0604085015282518091528160c0850193019160005b8281106118c55750505050906080919460018060a01b031660608201520152565b83516001600160a01b0316855293810193928101926001016118a4565b6118f8610f7c6118f28351610c0d565b83611513565b91611905610f7c836114e0565b9260018060a01b039061193c83837f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d168097611594565b6040516370a0823160e01b8082523060048301526020969195939092169392908686602481885afa9586156102e457600096611a01575b5061197d426117fe565b90803b15610128576119ac946000809460405197889586948593635c11d79560e01b855230916004860161180d565b03925af19182156102e45785926119ee575b5060405190815230600482015291829060249082905afa9081156102e457610dd393600092610636575050610c21565b806106996119fb9261091f565b386119be565b611a19919650873d89116102dd576102ce8183610952565b9438611973565b9190611a38610f7c611a328551610c0d565b85611513565b92611a45610f7c826114e0565b9360018060a01b0390611a7c84837f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d168098611594565b6040516370a0823160e01b80825230600483015260209791969290931694908787602481895afa9687156102e457600097611aea575b50611abc426117fe565b94813b1561012857600080946119ac60405198899687958694635c11d79560e01b8652309260048701611878565b611b02919750883d8a116102dd576102ce8183610952565b9538611ab2565b60208082528251608082840152805160a084018190529194939060005b838110611b71575050606090611b5560c095966000878688010152820151604086019060018060a01b03169052565b60408101518483015201516080830152601f01601f1916010190565b81810187015185820160c001528601611b26565b611bfe90602092600094611bc38160018060a01b037f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45168095611594565b60405191611bd083610937565b82523085830152604082015284606082015260405194858094819363b858183f60e01b835260048301611b09565b03925af19081156102e457600091611c14575090565b610dd3915060203d81116102dd576102ce8183610952565b611bfe91600094602094611c6a8160018060a01b037f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45168096611594565b60405192611c7784610937565b835230868401526040830152606082015260405194858094819363b858183f60e01b835260048301611b09565b602b815110611cea5760405190600b8083019101603683015b808310611cd7575050602b8252601f01601f191660405290565b9091825181526020809101920190611cbd565b60405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606490fd5b15611d2a57565b60405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606490fd5b602090611d78601482511015611d23565b015160601c90565b603790611d78602b82511015611d2356fedd36740e2a012d93061a0d99eaa9107860955de4e90027d3cf465a055026c407a264697066735822122084f35eb70cc30f63279c5e4ddf5f300c921d72b0e1a8d298d87438638efe58d564736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006a000f20005980200259b80c51020030400010680000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e1ff5a4c489b11e094bfbb5d23c6d4597a3a79ad
-----Decoded View---------------
Arg [0] : _paraRouter (address): 0x6A000F20005980200259B80c5102003040001068
Arg [1] : _v2Router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [2] : _v3Router (address): 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
Arg [3] : _wethToken (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [4] : _fee (uint256): 500
Arg [5] : _feeReceiver (address): 0xe1Ff5a4C489B11E094BFBB5d23c6d4597a3a79AD
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000006a000f20005980200259b80c5102003040001068
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [2] : 00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45
Arg [3] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [5] : 000000000000000000000000e1ff5a4c489b11e094bfbb5d23c6d4597a3a79ad
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.