Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60c06040 | 18126590 | 301 days ago | IN | Create: SmartOrderStrategy | 0 ETH | 0.02349918 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
20259571 | 2 days ago | 0.01455445 ETH | ||||
20259571 | 2 days ago | 0.01455445 ETH | ||||
20254311 | 3 days ago | 0.07 ETH | ||||
20254311 | 3 days ago | 0.07 ETH | ||||
20188288 | 12 days ago | 0.00680616 ETH | ||||
20188288 | 12 days ago | 0.00680616 ETH | ||||
20188162 | 12 days ago | 0.00187761 ETH | ||||
20188162 | 12 days ago | 0.00187761 ETH | ||||
20149592 | 18 days ago | 0.002 ETH | ||||
20149592 | 18 days ago | 0.002 ETH | ||||
20140314 | 19 days ago | 0.09 ETH | ||||
20140314 | 19 days ago | 0.09 ETH | ||||
20139664 | 19 days ago | 0.00105288 ETH | ||||
20139664 | 19 days ago | 0.00105288 ETH | ||||
20139604 | 19 days ago | 0.001 ETH | ||||
20139604 | 19 days ago | 0.001 ETH | ||||
20130667 | 20 days ago | 0.04274912 ETH | ||||
20130667 | 20 days ago | 0.04274912 ETH | ||||
20129698 | 21 days ago | 14.17104472 ETH | ||||
20129698 | 21 days ago | 14.17104472 ETH | ||||
20120752 | 22 days ago | 0.005 ETH | ||||
20120752 | 22 days ago | 0.005 ETH | ||||
20117835 | 22 days ago | 0.08112628 ETH | ||||
20117835 | 22 days ago | 0.08112628 ETH | ||||
20115635 | 22 days ago | 10.00950664 ETH |
Loading...
Loading
Contract Name:
SmartOrderStrategy
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { AdminManagement } from "./abstracts/AdminManagement.sol"; import { Asset } from "./libraries/Asset.sol"; import { Constant } from "./libraries/Constant.sol"; import { IWETH } from "./interfaces/IWETH.sol"; import { ISmartOrderStrategy } from "./interfaces/ISmartOrderStrategy.sol"; import { IStrategy } from "./interfaces/IStrategy.sol"; contract SmartOrderStrategy is ISmartOrderStrategy, AdminManagement { address public immutable weth; address public immutable genericSwap; receive() external payable {} constructor( address _owner, address _genericSwap, address _weth ) AdminManagement(_owner) { genericSwap = _genericSwap; weth = _weth; } modifier onlyGenericSwap() { if (msg.sender != genericSwap) revert NotFromGS(); _; } /// @inheritdoc IStrategy function executeStrategy( address inputToken, address outputToken, uint256 inputAmount, bytes calldata data ) external payable override onlyGenericSwap { if (inputAmount == 0) revert ZeroInput(); Operation[] memory ops = abi.decode(data, (Operation[])); if (ops.length == 0) revert EmptyOps(); // wrap eth first if (Asset.isETH(inputToken)) { if (msg.value != inputAmount) revert InvalidMsgValue(); IWETH(weth).deposit{ value: inputAmount }(); } else { if (msg.value != 0) revert InvalidMsgValue(); } uint256 opsCount = ops.length; for (uint256 i = 0; i < opsCount; ++i) { Operation memory op = ops[i]; _call(op.dest, op.inputToken, op.inputRatio, op.dataOffset, op.value, op.data); } // transfer output token back to GenericSwap // ETH first so WETH is not considered as an option of outputToken if (Asset.isETH(outputToken)) { // unwrap existing WETH if any uint256 wethBalance = IWETH(weth).balanceOf(address(this)); if (wethBalance > 0) { IWETH(weth).withdraw(wethBalance); } } uint256 selfBalance = Asset.getBalance(outputToken, address(this)); Asset.transferTo(outputToken, payable(genericSwap), selfBalance); } function _call( address _dest, address _inputToken, uint128 _inputRatio, uint128 _dataOffset, uint256 _value, bytes memory _data ) internal { if (_inputRatio > Constant.BPS_MAX) revert InvalidInputRatio(); // replace amount if ratio != 0 if (_inputRatio != 0) { uint256 inputTokenBalance = IERC20(_inputToken).balanceOf(address(this)); // calculate input amount if ratio should be applied if (_inputRatio != Constant.BPS_MAX) { inputTokenBalance = (inputTokenBalance * _inputRatio) / Constant.BPS_MAX; } assembly { mstore(add(_data, _dataOffset), inputTokenBalance) } } (bool success, bytes memory result) = _dest.call{ value: _value }(_data); if (!success) { assembly { revert(add(result, 32), mload(result)) } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 pragma solidity ^0.8.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { Ownable } from "./Ownable.sol"; import { Asset } from "../libraries/Asset.sol"; /// @title AdminManagement Contract /// @author imToken Labs abstract contract AdminManagement is Ownable { using SafeERC20 for IERC20; constructor(address _owner) Ownable(_owner) {} function approveTokens(address[] calldata tokens, address[] calldata spenders) external onlyOwner { for (uint256 i = 0; i < tokens.length; ++i) { for (uint256 j = 0; j < spenders.length; ++j) { IERC20(tokens[i]).safeApprove(spenders[j], type(uint256).max); } } } function rescueTokens(address[] calldata tokens, address recipient) external onlyOwner { for (uint256 i = 0; i < tokens.length; ++i) { uint256 selfBalance = Asset.getBalance(tokens[i], address(this)); if (selfBalance > 0) { Asset.transferTo(tokens[i], payable(recipient), selfBalance); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { Constant } from "./Constant.sol"; library Asset { using SafeERC20 for IERC20; error InsufficientBalance(); function isETH(address addr) internal pure returns (bool) { return (addr == Constant.ETH_ADDRESS || addr == Constant.ZERO_ADDRESS); } function getBalance(address asset, address owner) internal view returns (uint256) { if (isETH(asset)) { return owner.balance; } else { return IERC20(asset).balanceOf(owner); } } function transferTo( address asset, address payable to, uint256 amount ) internal { if (to == address(this) || amount == 0) { return; } if (isETH(asset)) { // @dev forward all available gas and may cause reentrancy if (address(this).balance < amount) revert InsufficientBalance(); (bool success, bytes memory result) = to.call{ value: amount }(""); if (!success) { assembly { revert(add(result, 32), mload(result)) } } } else { IERC20(asset).safeTransfer(to, amount); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library Constant { uint16 internal constant BPS_MAX = 10000; address internal constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address internal constant ZERO_ADDRESS = address(0); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface IWETH { function balanceOf(address account) external view returns (uint256); function deposit() external payable; function withdraw(uint256 amount) external; function transfer(address dst, uint256 wad) external returns (bool); function transferFrom( address src, address dst, uint256 wad ) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import { IStrategy } from "./IStrategy.sol"; /// @title ISmartOrderStrategy Interface /// @author imToken Labs interface ISmartOrderStrategy is IStrategy { error ZeroInput(); error EmptyOps(); error InvalidMsgValue(); error InvalidInputRatio(); error NotFromGS(); /// @dev The encoded operation list should be passed as `data` when calling `IStrategy.executeStrategy` struct Operation { address dest; address inputToken; uint128 inputRatio; uint128 dataOffset; uint256 value; bytes data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; /// @title IStrategy Interface /// @author imToken Labs interface IStrategy { function executeStrategy( address inputToken, address outputToken, uint256 inputAmount, bytes calldata data ) external payable; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/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; /** * @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.encodeWithSelector(token.transfer.selector, 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.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)); } /** * @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); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ 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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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). * * 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.isContract(address(token)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title Ownable Contract /// @author imToken Labs abstract contract Ownable { address public owner; address public nominatedOwner; error NotOwner(); error NotNominated(); error ZeroOwner(); error NominationExists(); event OwnerNominated(address indexed newOwner); event OwnerChanged(address indexed oldOwner, address indexed newOwner); constructor(address _owner) { if (_owner == address(0)) revert ZeroOwner(); owner = _owner; } modifier onlyOwner() { if (msg.sender != owner) revert NotOwner(); _; } /// @notice Activate new ownership /// @notice Only nominated owner can call function acceptOwnership() external { if (msg.sender != nominatedOwner) revert NotNominated(); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } /// @notice Give up the ownership /// @notice Only owner can call /// @notice Ownership cannot be recovered function renounceOwnership() external onlyOwner { if (nominatedOwner != address(0)) revert NominationExists(); emit OwnerChanged(owner, address(0)); owner = address(0); } /// @notice Nominate new owner /// @notice Only owner can call /// @param newOwner The address of the new owner function nominateNewOwner(address newOwner) external onlyOwner { nominatedOwner = newOwner; emit OwnerNominated(newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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.9.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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://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.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "remappings": [ "@openzeppelin/=lib/openzeppelin-contracts/", "forge-std/=lib/forge-std/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/" ], "optimizer": { "enabled": true, "runs": 1000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_genericSwap","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EmptyOps","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidInputRatio","type":"error"},{"inputs":[],"name":"InvalidMsgValue","type":"error"},{"inputs":[],"name":"NominationExists","type":"error"},{"inputs":[],"name":"NotFromGS","type":"error"},{"inputs":[],"name":"NotNominated","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"ZeroInput","type":"error"},{"inputs":[],"name":"ZeroOwner","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"address[]","name":"spenders","type":"address[]"}],"name":"approveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"address","name":"outputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"executeStrategy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"genericSwap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c06040523480156200001157600080fd5b50604051620017ad380380620017ad8339810160408190526200003491620000a9565b82806001600160a01b0381166200005e57604051639905827b60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392831617905592831660a052501660805250620000f3565b80516001600160a01b0381168114620000a457600080fd5b919050565b600080600060608486031215620000bf57600080fd5b620000ca846200008c565b9250620000da602085016200008c565b9150620000ea604085016200008c565b90509250925092565b60805160a0516116716200013c600039600081816101b9015281816105af01526108ff015260008181610114015281816106bb015281816107da015261088401526116716000f3fe6080604052600436106100b45760003560e01c806374ba4d361161006957806379ba50971161004e57806379ba5097146101db57806381994113146101f05780638da5cb5b1461020357600080fd5b806374ba4d3614610187578063763e2da6146101a757600080fd5b80633fc8cef31161009a5780633fc8cef31461010257806353a47bb714610152578063715018a61461017257600080fd5b8062663bf3146100c05780631627540c146100e257600080fd5b366100bb57005b600080fd5b3480156100cc57600080fd5b506100e06100db366004611143565b610223565b005b3480156100ee57600080fd5b506100e06100fd3660046111cb565b6102f0565b34801561010e57600080fd5b506101367f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b34801561015e57600080fd5b50600154610136906001600160a01b031681565b34801561017e57600080fd5b506100e0610372565b34801561019357600080fd5b506100e06101a23660046111ed565b610437565b3480156101b357600080fd5b506101367f000000000000000000000000000000000000000000000000000000000000000081565b3480156101e757600080fd5b506100e06104ef565b6100e06101fe366004611241565b6105a4565b34801561020f57600080fd5b50600054610136906001600160a01b031681565b6000546001600160a01b0316331461024e576040516330cd747160e01b815260040160405180910390fd5b60005b838110156102e95760005b828110156102d8576102c8848483818110610279576102796112dc565b905060200201602081019061028e91906111cb565b6000198888868181106102a3576102a36112dc565b90506020020160208101906102b891906111cb565b6001600160a01b0316919061092e565b6102d181611308565b905061025c565b506102e281611308565b9050610251565b5050505050565b6000546001600160a01b0316331461031b576040516330cd747160e01b815260040160405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b6000546001600160a01b0316331461039d576040516330cd747160e01b815260040160405180910390fd5b6001546001600160a01b0316156103e0576040517fcea9483800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546040516001600160a01b03909116907fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b03163314610462576040516330cd747160e01b815260040160405180910390fd5b60005b828110156104e957600061049f858584818110610484576104846112dc565b905060200201602081019061049991906111cb565b30610ae6565b905080156104d8576104d88585848181106104bc576104bc6112dc565b90506020020160208101906104d191906111cb565b8483610b7a565b506104e281611308565b9050610465565b50505050565b6001546001600160a01b03163314610533576040517f9ceae3db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154600080546040516001600160a01b0393841693909116917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a3600180546000805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b03841617909155169055565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610606576040517fb3645e1900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600003610640576040517faf458c0700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061064e828401846113b1565b9050805160000361068b576040517ff489935500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61069486610c5a565b15610732578334146106b957604051631841b4e160e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561071457600080fd5b505af1158015610728573d6000803e3d6000fd5b5050505050610751565b341561075157604051631841b4e160e01b815260040160405180910390fd5b805160005b818110156107b3576000838281518110610772576107726112dc565b602002602001015190506107a2816000015182602001518360400151846060015185608001518660a00151610c90565b506107ac81611308565b9050610756565b506107bd86610c5a565b156108eb576040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084d9190611554565b905080156108e9576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156108d057600080fd5b505af11580156108e4573d6000803e3d6000fd5b505050505b505b60006108f78730610ae6565b9050610924877f000000000000000000000000000000000000000000000000000000000000000083610b7a565b5050505050505050565b8015806109c157506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801561099b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bf9190611554565b155b610a385760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b6040516001600160a01b038316602482015260448101829052610ae19084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610e1f565b505050565b6000610af183610c5a565b15610b0757506001600160a01b03811631610b74565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa158015610b4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b719190611554565b90505b92915050565b6001600160a01b038216301480610b8f575080155b15610b9957505050565b610ba283610c5a565b15610c465780471015610be1576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114610c2f576040519150601f19603f3d011682016040523d82523d6000602084013e610c34565b606091505b5091509150816102e957805160208201fd5b610ae16001600160a01b0384168383610f07565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480610b745750506001600160a01b03161590565b6127106fffffffffffffffffffffffffffffffff85161115610cde576040517fb577d55600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6fffffffffffffffffffffffffffffffff841615610daf576040516370a0823160e01b81523060048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa158015610d3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d619190611554565b90506fffffffffffffffffffffffffffffffff851661271014610daa57612710610d9d6fffffffffffffffffffffffffffffffff87168361156d565b610da79190611584565b90505b818401525b600080876001600160a01b03168484604051610dcb91906115ca565b60006040518083038185875af1925050503d8060008114610e08576040519150601f19603f3d011682016040523d82523d6000602084013e610e0d565b606091505b50915091508161092457805160208201fd5b6000610e74826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f509092919063ffffffff16565b9050805160001480610e95575080806020019051810190610e9591906115e6565b610ae15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610a2f565b6040516001600160a01b038316602482015260448101829052610ae19084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610a7d565b6060610f5f8484600085610f67565b949350505050565b606082471015610fdf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610a2f565b600080866001600160a01b03168587604051610ffb91906115ca565b60006040518083038185875af1925050503d8060008114611038576040519150601f19603f3d011682016040523d82523d6000602084013e61103d565b606091505b509150915061104e87838387611059565b979650505050505050565b606083156110c85782516000036110c1576001600160a01b0385163b6110c15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a2f565b5081610f5f565b610f5f83838151156110dd5781518083602001fd5b8060405162461bcd60e51b8152600401610a2f9190611608565b60008083601f84011261110957600080fd5b50813567ffffffffffffffff81111561112157600080fd5b6020830191508360208260051b850101111561113c57600080fd5b9250929050565b6000806000806040858703121561115957600080fd5b843567ffffffffffffffff8082111561117157600080fd5b61117d888389016110f7565b9096509450602087013591508082111561119657600080fd5b506111a3878288016110f7565b95989497509550505050565b80356001600160a01b03811681146111c657600080fd5b919050565b6000602082840312156111dd57600080fd5b6111e6826111af565b9392505050565b60008060006040848603121561120257600080fd5b833567ffffffffffffffff81111561121957600080fd5b611225868287016110f7565b90945092506112389050602085016111af565b90509250925092565b60008060008060006080868803121561125957600080fd5b611262866111af565b9450611270602087016111af565b935060408601359250606086013567ffffffffffffffff8082111561129457600080fd5b818801915088601f8301126112a857600080fd5b8135818111156112b757600080fd5b8960208285010111156112c957600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161131a5761131a6112f2565b5060010190565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561135a5761135a611321565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561138957611389611321565b604052919050565b80356fffffffffffffffffffffffffffffffff811681146111c657600080fd5b600060208083850312156113c457600080fd5b823567ffffffffffffffff808211156113dc57600080fd5b818501915085601f8301126113f057600080fd5b81358181111561140257611402611321565b8060051b611411858201611360565b918252838101850191858101908984111561142b57600080fd5b86860192505b83831015611547578235858111156114495760008081fd5b860160c0601f19828d0381018213156114625760008081fd5b61146a611337565b6114758b85016111af565b815260406114848186016111af565b8c8301526060611495818701611391565b8284015260806114a6818801611391565b8285015260a091508187013581850152508486013594508a8511156114cb5760008081fd5b84860195508f603f8701126114e257600094508485fd5b8c86013594508a8511156114f8576114f8611321565b6115088d85601f88011601611360565b93508484528f8286880101111561151f5760008081fd5b848287018e86013760009484018d019490945250918201528352509186019190860190611431565b9998505050505050505050565b60006020828403121561156657600080fd5b5051919050565b8082028115828204841417610b7457610b746112f2565b6000826115a157634e487b7160e01b600052601260045260246000fd5b500490565b60005b838110156115c15781810151838201526020016115a9565b50506000910152565b600082516115dc8184602087016115a6565b9190910192915050565b6000602082840312156115f857600080fd5b815180151581146111e657600080fd5b60208152600082518060208401526116278160408501602087016115a6565b601f01601f1916919091016040019291505056fea2646970667358221220d1889faa0109b91f91e59b5d17b6e79266dce639cf0a7c0c7dca36f8c6fc668d64736f6c6343000811003300000000000000000000000063ef071b8a69c52a88dca4a844286aeff195129f000000000000000000000000a7e96bf2735bd33750bb504c3cc63e3770668dd4000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Deployed Bytecode
0x6080604052600436106100b45760003560e01c806374ba4d361161006957806379ba50971161004e57806379ba5097146101db57806381994113146101f05780638da5cb5b1461020357600080fd5b806374ba4d3614610187578063763e2da6146101a757600080fd5b80633fc8cef31161009a5780633fc8cef31461010257806353a47bb714610152578063715018a61461017257600080fd5b8062663bf3146100c05780631627540c146100e257600080fd5b366100bb57005b600080fd5b3480156100cc57600080fd5b506100e06100db366004611143565b610223565b005b3480156100ee57600080fd5b506100e06100fd3660046111cb565b6102f0565b34801561010e57600080fd5b506101367f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6040516001600160a01b03909116815260200160405180910390f35b34801561015e57600080fd5b50600154610136906001600160a01b031681565b34801561017e57600080fd5b506100e0610372565b34801561019357600080fd5b506100e06101a23660046111ed565b610437565b3480156101b357600080fd5b506101367f000000000000000000000000a7e96bf2735bd33750bb504c3cc63e3770668dd481565b3480156101e757600080fd5b506100e06104ef565b6100e06101fe366004611241565b6105a4565b34801561020f57600080fd5b50600054610136906001600160a01b031681565b6000546001600160a01b0316331461024e576040516330cd747160e01b815260040160405180910390fd5b60005b838110156102e95760005b828110156102d8576102c8848483818110610279576102796112dc565b905060200201602081019061028e91906111cb565b6000198888868181106102a3576102a36112dc565b90506020020160208101906102b891906111cb565b6001600160a01b0316919061092e565b6102d181611308565b905061025c565b506102e281611308565b9050610251565b5050505050565b6000546001600160a01b0316331461031b576040516330cd747160e01b815260040160405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b6000546001600160a01b0316331461039d576040516330cd747160e01b815260040160405180910390fd5b6001546001600160a01b0316156103e0576040517fcea9483800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546040516001600160a01b03909116907fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b03163314610462576040516330cd747160e01b815260040160405180910390fd5b60005b828110156104e957600061049f858584818110610484576104846112dc565b905060200201602081019061049991906111cb565b30610ae6565b905080156104d8576104d88585848181106104bc576104bc6112dc565b90506020020160208101906104d191906111cb565b8483610b7a565b506104e281611308565b9050610465565b50505050565b6001546001600160a01b03163314610533576040517f9ceae3db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154600080546040516001600160a01b0393841693909116917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a3600180546000805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b03841617909155169055565b336001600160a01b037f000000000000000000000000a7e96bf2735bd33750bb504c3cc63e3770668dd41614610606576040517fb3645e1900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600003610640576040517faf458c0700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061064e828401846113b1565b9050805160000361068b576040517ff489935500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61069486610c5a565b15610732578334146106b957604051631841b4e160e01b815260040160405180910390fd5b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561071457600080fd5b505af1158015610728573d6000803e3d6000fd5b5050505050610751565b341561075157604051631841b4e160e01b815260040160405180910390fd5b805160005b818110156107b3576000838281518110610772576107726112dc565b602002602001015190506107a2816000015182602001518360400151846060015185608001518660a00151610c90565b506107ac81611308565b9050610756565b506107bd86610c5a565b156108eb576040516370a0823160e01b81523060048201526000907f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316906370a0823190602401602060405180830381865afa158015610829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084d9190611554565b905080156108e9576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156108d057600080fd5b505af11580156108e4573d6000803e3d6000fd5b505050505b505b60006108f78730610ae6565b9050610924877f000000000000000000000000a7e96bf2735bd33750bb504c3cc63e3770668dd483610b7a565b5050505050505050565b8015806109c157506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801561099b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bf9190611554565b155b610a385760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b6040516001600160a01b038316602482015260448101829052610ae19084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610e1f565b505050565b6000610af183610c5a565b15610b0757506001600160a01b03811631610b74565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa158015610b4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b719190611554565b90505b92915050565b6001600160a01b038216301480610b8f575080155b15610b9957505050565b610ba283610c5a565b15610c465780471015610be1576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114610c2f576040519150601f19603f3d011682016040523d82523d6000602084013e610c34565b606091505b5091509150816102e957805160208201fd5b610ae16001600160a01b0384168383610f07565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480610b745750506001600160a01b03161590565b6127106fffffffffffffffffffffffffffffffff85161115610cde576040517fb577d55600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6fffffffffffffffffffffffffffffffff841615610daf576040516370a0823160e01b81523060048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa158015610d3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d619190611554565b90506fffffffffffffffffffffffffffffffff851661271014610daa57612710610d9d6fffffffffffffffffffffffffffffffff87168361156d565b610da79190611584565b90505b818401525b600080876001600160a01b03168484604051610dcb91906115ca565b60006040518083038185875af1925050503d8060008114610e08576040519150601f19603f3d011682016040523d82523d6000602084013e610e0d565b606091505b50915091508161092457805160208201fd5b6000610e74826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f509092919063ffffffff16565b9050805160001480610e95575080806020019051810190610e9591906115e6565b610ae15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610a2f565b6040516001600160a01b038316602482015260448101829052610ae19084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610a7d565b6060610f5f8484600085610f67565b949350505050565b606082471015610fdf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610a2f565b600080866001600160a01b03168587604051610ffb91906115ca565b60006040518083038185875af1925050503d8060008114611038576040519150601f19603f3d011682016040523d82523d6000602084013e61103d565b606091505b509150915061104e87838387611059565b979650505050505050565b606083156110c85782516000036110c1576001600160a01b0385163b6110c15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a2f565b5081610f5f565b610f5f83838151156110dd5781518083602001fd5b8060405162461bcd60e51b8152600401610a2f9190611608565b60008083601f84011261110957600080fd5b50813567ffffffffffffffff81111561112157600080fd5b6020830191508360208260051b850101111561113c57600080fd5b9250929050565b6000806000806040858703121561115957600080fd5b843567ffffffffffffffff8082111561117157600080fd5b61117d888389016110f7565b9096509450602087013591508082111561119657600080fd5b506111a3878288016110f7565b95989497509550505050565b80356001600160a01b03811681146111c657600080fd5b919050565b6000602082840312156111dd57600080fd5b6111e6826111af565b9392505050565b60008060006040848603121561120257600080fd5b833567ffffffffffffffff81111561121957600080fd5b611225868287016110f7565b90945092506112389050602085016111af565b90509250925092565b60008060008060006080868803121561125957600080fd5b611262866111af565b9450611270602087016111af565b935060408601359250606086013567ffffffffffffffff8082111561129457600080fd5b818801915088601f8301126112a857600080fd5b8135818111156112b757600080fd5b8960208285010111156112c957600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161131a5761131a6112f2565b5060010190565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561135a5761135a611321565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561138957611389611321565b604052919050565b80356fffffffffffffffffffffffffffffffff811681146111c657600080fd5b600060208083850312156113c457600080fd5b823567ffffffffffffffff808211156113dc57600080fd5b818501915085601f8301126113f057600080fd5b81358181111561140257611402611321565b8060051b611411858201611360565b918252838101850191858101908984111561142b57600080fd5b86860192505b83831015611547578235858111156114495760008081fd5b860160c0601f19828d0381018213156114625760008081fd5b61146a611337565b6114758b85016111af565b815260406114848186016111af565b8c8301526060611495818701611391565b8284015260806114a6818801611391565b8285015260a091508187013581850152508486013594508a8511156114cb5760008081fd5b84860195508f603f8701126114e257600094508485fd5b8c86013594508a8511156114f8576114f8611321565b6115088d85601f88011601611360565b93508484528f8286880101111561151f5760008081fd5b848287018e86013760009484018d019490945250918201528352509186019190860190611431565b9998505050505050505050565b60006020828403121561156657600080fd5b5051919050565b8082028115828204841417610b7457610b746112f2565b6000826115a157634e487b7160e01b600052601260045260246000fd5b500490565b60005b838110156115c15781810151838201526020016115a9565b50506000910152565b600082516115dc8184602087016115a6565b9190910192915050565b6000602082840312156115f857600080fd5b815180151581146111e657600080fd5b60208152600082518060208401526116278160408501602087016115a6565b601f01601f1916919091016040019291505056fea2646970667358221220d1889faa0109b91f91e59b5d17b6e79266dce639cf0a7c0c7dca36f8c6fc668d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000063ef071b8a69c52a88dca4a844286aeff195129f000000000000000000000000a7e96bf2735bd33750bb504c3cc63e3770668dd4000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
-----Decoded View---------------
Arg [0] : _owner (address): 0x63Ef071b8A69C52a88dCA4A844286Aeff195129F
Arg [1] : _genericSwap (address): 0xa7e96Bf2735BD33750Bb504C3Cc63e3770668dd4
Arg [2] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000063ef071b8a69c52a88dca4a844286aeff195129f
Arg [1] : 000000000000000000000000a7e96bf2735bd33750bb504c3cc63e3770668dd4
Arg [2] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 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.