Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 15300003 | 709 days ago | IN | Create: ControllerLib | 0 ETH | 0.04687381 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ControllerLib
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol"; import "../../common/Basic.sol"; import "../automation/AutomationCallable.sol"; import "../automation/IAutomation.sol"; import "../../adapters/IAdapterManager.sol"; interface IWalletFactory { function createSubAccount( address _adapterManager, address _autoExecutor, bytes memory _data ) external payable returns (address); } contract ControllerLib is Initializable, OwnableUpgradeable, Basic, AutomationCallable, IERC3156FlashBorrower { using SafeERC20 for IERC20; address public immutable implementationAddress; address public adapterManager; bool public advancedOptionEnable; address public walletFactory; address public currentAdapter; mapping(address => bool) public isSubAccount; event NewAccount(address owner, address account); event ResetAccount( address adapterManager, address autoExecutor, address walletFactory ); event SetAdvancedOption(bool); event NewSubAccount(address _subAccount); event WithdrawAssets( address[] _tokens, address _receiver, uint256[] _amounts ); event ApproveToken(IERC20 _token, address _spender, uint256 _amount); event ApproveTokens( IERC20[] _tokens, address[] _spenders, uint256[] _amounts ); event OnFlashLoan( address _initiator, address _token, uint256 _amount, uint256 _fee ); constructor() { implementationAddress = address(this); } modifier onlyProxy() { require(address(this) != implementationAddress, "!proxy"); _; } function initialize( address _owner, address _autoExecutor, address _adapterManager ) public initializer onlyProxy { __Ownable_init(); _setAutomation(_autoExecutor); adapterManager = _adapterManager; walletFactory = msg.sender; emit NewAccount(_owner, address(this)); } function reinitialize( address _adapterManager, address _autoExecutor, address _walletFactory ) external onlyOwner onlyProxy { if (_adapterManager != address(0)) { adapterManager = _adapterManager; } if (_autoExecutor != address(0)) { _setAutomation(_autoExecutor); } if (_walletFactory != address(0)) { walletFactory = _walletFactory; } emit ResetAccount(_adapterManager, _autoExecutor, _walletFactory); } function getVersion() external pure returns (string memory) { return "v0.3"; } function _fallbackForAdapter() internal { (bool success, bytes memory returnData) = currentAdapter.delegatecall( msg.data ); require(success, string(returnData)); currentAdapter = address(0); } fallback() external payable { require( msg.sender == currentAdapter, "Not allowed: caller is not the currentAdapter" ); _fallbackForAdapter(); } modifier onlyAutomationOrOwner() { require( // autoExecutor or owner autoExecutor == msg.sender || owner() == msg.sender, "Permit: caller is not the Permit" ); _; } function setCurrentAdapter(address _currentAdapter) internal { require( IAdapterManager(adapterManager).adapterIsAvailable(_currentAdapter), "Invalid currentAdapter!" ); currentAdapter = _currentAdapter; } function createSubAccount(bytes memory _data, uint256 _costETH) external payable onlyOwner returns (address newSubAccount) { newSubAccount = IWalletFactory(walletFactory).createSubAccount{ value: _costETH + msg.value }(adapterManager, autoExecutor, _data); isSubAccount[newSubAccount] = true; emit NewSubAccount(newSubAccount); } //callback only for callOnAdapter so far function _callOnAdapter(bytes memory _callBytes, bool _isNeedCallback) internal returns (bytes memory returnData) { (address adapter, uint256 costETH, , ) = abi.decode( _callBytes, (address, uint256, bytes4, bytes) ); if (_isNeedCallback) { setCurrentAdapter(adapter); } returnData = IAdapterManager(adapterManager).execute{ value: costETH + msg.value }(_callBytes); if (_isNeedCallback) { require(currentAdapter == address(0), "!not reset"); } } function _delegatecallOnAdapter(bytes memory _callBytes) internal returns (bytes memory) { (address adapter, bytes memory callData) = abi.decode( _callBytes, (address, bytes) ); require( IAdapterManager(adapterManager).adapterIsAvailable(adapter), "Permission verification failed!" ); (bool success, bytes memory returnData) = adapter.delegatecall( callData ); require(success, string(returnData)); return returnData; } function _executeOnAdapter( bytes memory _callBytes, bool _callType, bool _isNeedCallback ) internal returns (bytes memory returnData) { returnData = _callType ? _delegatecallOnAdapter(_callBytes) : _callOnAdapter(_callBytes, _isNeedCallback); } function _multiCall( bool[] memory _callType, bytes[] memory _callArgs, bool[] memory _isNeedCallback ) internal { require( _callType.length == _callArgs.length && _callArgs.length == _isNeedCallback.length ); for (uint256 i; i < _callArgs.length; i++) { _executeOnAdapter(_callArgs[i], _callType[i], _isNeedCallback[i]); } } function executeOnAdapter(bytes memory _callBytes, bool _callType) external payable onlyAutomationOrOwner returns (bytes memory) { return _executeOnAdapter(_callBytes, _callType, false); } function multiCall( bool[] memory _callType, bytes[] memory _callArgs, bool[] memory _isNeedCallback ) external payable onlyAutomationOrOwner { _multiCall(_callType, _callArgs, _isNeedCallback); } function _callDirectly( address _target, bytes calldata _callArgs, uint256 _amountETH ) internal { (bool success, bytes memory returnData) = _target.call{ value: _amountETH + msg.value }(_callArgs); require(success, string(returnData)); } function callDirectly( address _target, bytes calldata _callArgs, uint256 _amountETH ) external payable onlyOwner { require(advancedOptionEnable, "Not allowed!"); _callDirectly(_target, _callArgs, _amountETH); } function callOnSubAccount( address _target, bytes calldata _callArgs, uint256 _amountETH ) external payable onlyAutomationOrOwner { require(isSubAccount[_target], "Not my subAccount!"); _callDirectly(_target, _callArgs, _amountETH); } function setAdvancedOption(bool val) external onlyOwner { advancedOptionEnable = val; emit SetAdvancedOption(advancedOptionEnable); } function _transferAsset( address _token, uint256 _amount, address _receiver ) internal { if (_token == ethAddr) { uint256 _balance = address(this).balance; require(_balance >= _amount, "not enough ETH balance"); safeTransferETH(_receiver, _amount); } else { uint256 _balance = IERC20(_token).balanceOf(address(this)); require(_balance >= _amount, "not enough token balance"); IERC20(_token).safeTransfer(_receiver, _amount); } } function _transferAssets( address[] memory _tokens, uint256[] memory _amounts, address _receiver ) internal { require(_tokens.length == _amounts.length, "withdraw length error."); for (uint256 i = 0; i < _tokens.length; i++) { _transferAsset(_tokens[i], _amounts[i], _receiver); } } function withdrawAssets( address[] memory _tokens, address _receiver, uint256[] memory _amounts ) external onlyOwner { if (_receiver != owner() && !isSubAccount[_receiver]) { require(advancedOptionEnable, "Not allowed!"); } _transferAssets(_tokens, _amounts, _receiver); emit WithdrawAssets(_tokens, _receiver, _amounts); } function approve( IERC20 _token, address _spender, uint256 _amount ) external onlyAutomationOrOwner { _token.safeApprove(_spender, 0); _token.safeApprove(_spender, _amount); emit ApproveToken(_token, _spender, _amount); } function approveTokens( IERC20[] memory _tokens, address[] memory _spenders, uint256[] memory _amounts ) external onlyAutomationOrOwner { require( _tokens.length == _amounts.length && _spenders.length == _amounts.length, "approve length error." ); for (uint256 i = 0; i < _tokens.length; i++) { _tokens[i].safeApprove(_spenders[i], 0); _tokens[i].safeApprove(_spenders[i], _amounts[i]); } emit ApproveTokens(_tokens, _spenders, _amounts); } function onFlashLoan( address _initiator, address _token, uint256 _amount, uint256 _fee, bytes calldata _data ) external override returns (bytes32) { require(autoExecutor == _initiator, "Initiator verification failed."); require( msg.sender == IAutomation(autoExecutor).getLoanProvider(address(this)), "FlashLoan verification failed." ); ( bool[] memory _callType, bytes[] memory _callArgs, bool[] memory _isNeedCallback ) = abi.decode(_data, (bool[], bytes[], bool[])); _multiCall(_callType, _callArgs, _isNeedCallback); // Handle native token. IERC20 borrow = IERC20(_token); borrow.safeApprove(msg.sender, 0); borrow.safeApprove(msg.sender, _amount + _fee); emit OnFlashLoan(_initiator, _token, _amount, _fee); return keccak256("ERC3156FlashBorrower.onFlashLoan"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashBorrower.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC3156 FlashBorrower, as defined in * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. * * _Available since v4.1._ */ interface IERC3156FlashBorrower { /** * @dev Receive a flash loan. * @param initiator The initiator of the loan. * @param token The loan currency. * @param amount The amount of tokens lent. * @param fee The additional amount of tokens to repay. * @param data Arbitrary data structure, intended to contain user-defined parameters. * @return The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan" */ function onFlashLoan( address initiator, address token, uint256 amount, uint256 fee, bytes calldata data ) external returns (bytes32); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; abstract contract Basic { using SafeERC20 for IERC20; /** * @dev Return ethereum address */ address internal constant ethAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /// @dev Return Wrapped ETH address address internal constant wethAddr = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; function safeTransferETH(address to, uint256 value) internal { if (value != 0) { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, "helper::safeTransferETH: ETH transfer failed"); } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; contract AutomationCallable is Initializable { address public autoExecutor; event ChangeAutomation(address oldExecutor, address newExecutor); function _setAutomation(address newExecutor) internal { address oldExecutor = autoExecutor; autoExecutor = newExecutor; emit ChangeAutomation(oldExecutor, newExecutor); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.0 <0.9.0; interface IAutomation { function getLoanProvider(address account) external view returns (address); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.0 <0.9.0; interface IAdapterManager { function execute(bytes calldata callArgs) external payable returns (bytes memory); function maxReservedBits() external view returns (uint256); function adaptersIndex(address adapter) external view returns (uint256); function maxIndex() external view returns (uint256); function adapterIsAvailable(address) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
{ "optimizer": { "enabled": true, "runs": 10000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC20","name":"_token","type":"address"},{"indexed":false,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ApproveToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC20[]","name":"_tokens","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"_spenders","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"ApproveTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldExecutor","type":"address"},{"indexed":false,"internalType":"address","name":"newExecutor","type":"address"}],"name":"ChangeAutomation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"NewAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_subAccount","type":"address"}],"name":"NewSubAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_initiator","type":"address"},{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"OnFlashLoan","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":false,"internalType":"address","name":"adapterManager","type":"address"},{"indexed":false,"internalType":"address","name":"autoExecutor","type":"address"},{"indexed":false,"internalType":"address","name":"walletFactory","type":"address"}],"name":"ResetAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"SetAdvancedOption","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_tokens","type":"address[]"},{"indexed":false,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"WithdrawAssets","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"adapterManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"advancedOptionEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"_tokens","type":"address[]"},{"internalType":"address[]","name":"_spenders","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"approveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoExecutor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"bytes","name":"_callArgs","type":"bytes"},{"internalType":"uint256","name":"_amountETH","type":"uint256"}],"name":"callDirectly","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"bytes","name":"_callArgs","type":"bytes"},{"internalType":"uint256","name":"_amountETH","type":"uint256"}],"name":"callOnSubAccount","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256","name":"_costETH","type":"uint256"}],"name":"createSubAccount","outputs":[{"internalType":"address","name":"newSubAccount","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"currentAdapter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_callBytes","type":"bytes"},{"internalType":"bool","name":"_callType","type":"bool"}],"name":"executeOnAdapter","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"implementationAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_autoExecutor","type":"address"},{"internalType":"address","name":"_adapterManager","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isSubAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool[]","name":"_callType","type":"bool[]"},{"internalType":"bytes[]","name":"_callArgs","type":"bytes[]"},{"internalType":"bool[]","name":"_isNeedCallback","type":"bool[]"}],"name":"multiCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_initiator","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onFlashLoan","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adapterManager","type":"address"},{"internalType":"address","name":"_autoExecutor","type":"address"},{"internalType":"address","name":"_walletFactory","type":"address"}],"name":"reinitialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"val","type":"bool"}],"name":"setAdvancedOption","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"walletFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"withdrawAssets","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5030608052608051612fc261003e60003960008181610440015281816108c801526110040152612fc26000f3fe6080604052600436106101805760003560e01c806395bb2d86116100d6578063c5c036991161007f578063e1f21c6711610059578063e1f21c67146104f2578063f1fbc32014610512578063f2fde38b1461052557610180565b8063c5c0369914610482578063d42c0e55146104a2578063d89d73f2146104c257610180565b8063b6e7cc44116100b0578063b6e7cc441461041b578063b97a23191461042e578063c0c53b8b1461046257610180565b806395bb2d86146103d5578063a3b52381146103e8578063b1ad37341461040857610180565b806362e8fbca11610138578063887d379711610112578063887d3797146103775780638da5cb5b146103975780638db2bc2b146103b557610180565b806362e8fbca146103005780636400e38514610342578063715018a61461036257610180565b806332418366116101695780633241836614610295578063405f301d146102cd5780635c5dcec7146102e057610180565b80630d8e6e2c1461020f57806323e30c8b14610267575b6068546001600160a01b031633146102055760405162461bcd60e51b815260206004820152602d60248201527f4e6f7420616c6c6f7765643a2063616c6c6572206973206e6f7420746865206360448201527f757272656e74416461707465720000000000000000000000000000000000000060648201526084015b60405180910390fd5b61020d610545565b005b34801561021b57600080fd5b5060408051808201909152600481527f76302e330000000000000000000000000000000000000000000000000000000060208201525b60405161025e919061245a565b60405180910390f35b34801561027357600080fd5b506102876102823660046124cb565b6105fb565b60405190815260200161025e565b3480156102a157600080fd5b506066546102b5906001600160a01b031681565b6040516001600160a01b03909116815260200161025e565b61020d6102db366004612702565b610827565b3480156102ec57600080fd5b506065546102b5906001600160a01b031681565b34801561030c57600080fd5b506066546103329074010000000000000000000000000000000000000000900460ff1681565b604051901515815260200161025e565b34801561034e57600080fd5b5061020d61035d3660046127f9565b6108b5565b34801561036e57600080fd5b5061020d610a29565b34801561038357600080fd5b5061020d610392366004612903565b610a3d565b3480156103a357600080fd5b506033546001600160a01b03166102b5565b3480156103c157600080fd5b5061020d6103d03660046129df565b610c05565b6102516103e3366004612a40565b610cf1565b3480156103f457600080fd5b506068546102b5906001600160a01b031681565b61020d610416366004612a92565b610d85565b61020d610429366004612a92565b610e7d565b34801561043a57600080fd5b506102b57f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b5061020d61047d3660046127f9565b610eef565b34801561048e57600080fd5b506067546102b5906001600160a01b031681565b3480156104ae57600080fd5b5061020d6104bd366004612aee565b611167565b3480156104ce57600080fd5b506103326104dd366004612b0b565b60696020526000908152604090205460ff1681565b3480156104fe57600080fd5b5061020d61050d366004612b28565b6111f6565b6102b5610520366004612b69565b6112e5565b34801561053157600080fd5b5061020d610540366004612b0b565b611428565b60685460405160009182916001600160a01b03909116906105699083903690612bae565b600060405180830381855af49150503d80600081146105a4576040519150601f19603f3d011682016040523d82523d6000602084013e6105a9565b606091505b50915091508181906105ce5760405162461bcd60e51b81526004016101fc919061245a565b5050606880547fffffffffffffffffffffffff000000000000000000000000000000000000000016905550565b6065546000906001600160a01b0388811691161461065b5760405162461bcd60e51b815260206004820152601e60248201527f496e69746961746f7220766572696669636174696f6e206661696c65642e000060448201526064016101fc565b6065546040517f7b67a87a0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0390911690637b67a87a9060240160206040518083038186803b1580156106b757600080fd5b505afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190612bbe565b6001600160a01b0316336001600160a01b03161461074f5760405162461bcd60e51b815260206004820152601e60248201527f466c6173684c6f616e20766572696669636174696f6e206661696c65642e000060448201526064016101fc565b6000808061075f85870187612702565b9250925092506107708383836114b8565b886107866001600160a01b038216336000611548565b6107a5336107948a8c612c0a565b6001600160a01b0384169190611548565b604080516001600160a01b03808e1682528c1660208201529081018a9052606081018990527fe89ed9dff37d0839f03c31b726da0ac3a135628cffc1522e2aecfebda62901ee9060800160405180910390a1507f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a9950505050505050505050565b6065546001600160a01b031633148061085957503361084e6033546001600160a01b031690565b6001600160a01b0316145b6108a55760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b6108b08383836114b8565b505050565b6108bd611723565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156109365760405162461bcd60e51b815260206004820152600660248201527f2170726f7879000000000000000000000000000000000000000000000000000060448201526064016101fc565b6001600160a01b0383161561097957606680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385161790555b6001600160a01b03821615610991576109918261177d565b6001600160a01b038116156109d457606780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383161790555b604080516001600160a01b03808616825280851660208301528316918101919091527f67891dff85ae8098fdc91abdef9ed30dbd1594e09b5a873425c4c5fae3b90b05906060015b60405180910390a1505050565b610a31611723565b610a3b60006117f6565b565b6065546001600160a01b0316331480610a6f575033610a646033546001600160a01b031690565b6001600160a01b0316145b610abb5760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b80518351148015610acd575080518251145b610b195760405162461bcd60e51b815260206004820152601560248201527f617070726f7665206c656e677468206572726f722e000000000000000000000060448201526064016101fc565b60005b8351811015610bd157610b76838281518110610b3a57610b3a612c22565b60200260200101516000868481518110610b5657610b56612c22565b60200260200101516001600160a01b03166115489092919063ffffffff16565b610bbf838281518110610b8b57610b8b612c22565b6020026020010151838381518110610ba557610ba5612c22565b6020026020010151868481518110610b5657610b56612c22565b80610bc981612c51565b915050610b1c565b507f0c241f17c45588d0915faa0a3c154a4f543c8ca7ba3041999859d3445df3a341838383604051610a1c93929190612cfe565b610c0d611723565b6033546001600160a01b03838116911614801590610c4457506001600160a01b03821660009081526069602052604090205460ff16155b15610cb35760665474010000000000000000000000000000000000000000900460ff16610cb35760405162461bcd60e51b815260206004820152600c60248201527f4e6f7420616c6c6f77656421000000000000000000000000000000000000000060448201526064016101fc565b610cbe838284611860565b7fead71e0d91c879b56eceece36db1b5b6a8327f4d6baa7da82628ceae22d40b5f838383604051610a1c93929190612d73565b6065546060906001600160a01b0316331480610d26575033610d1b6033546001600160a01b031690565b6001600160a01b0316145b610d725760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b610d7e8383600061190c565b9392505050565b6065546001600160a01b0316331480610db7575033610dac6033546001600160a01b031690565b6001600160a01b0316145b610e035760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b6001600160a01b03841660009081526069602052604090205460ff16610e6b5760405162461bcd60e51b815260206004820152601260248201527f4e6f74206d79207375624163636f756e7421000000000000000000000000000060448201526064016101fc565b610e7784848484611933565b50505050565b610e85611723565b60665474010000000000000000000000000000000000000000900460ff16610e6b5760405162461bcd60e51b815260206004820152600c60248201527f4e6f7420616c6c6f77656421000000000000000000000000000000000000000060448201526064016101fc565b600054610100900460ff1615808015610f0f5750600054600160ff909116105b80610f295750303b158015610f29575060005460ff166001145b610f9b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101fc565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610ff957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156110725760405162461bcd60e51b815260206004820152600660248201527f2170726f7879000000000000000000000000000000000000000000000000000060448201526064016101fc565b61107a6119ca565b6110838361177d565b606680546001600160a01b038481167fffffffffffffffffffffffff00000000000000000000000000000000000000009283161790925560678054909116331790556040805191861682523060208301527f14cb25cca821184a88389fa7823ef6a4cd65897a89cbdcf5169542b8d790478b910160405180910390a18015610e7757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b61116f611723565b606680547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000008315158102919091179182905560405160ff9190920416151581527fc677f7fe897200d1c5b3e4756f7edfabe272970d8dd7adb0d7e45ce8af109e569060200160405180910390a150565b6065546001600160a01b031633148061122857503361121d6033546001600160a01b031690565b6001600160a01b0316145b6112745760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b6112896001600160a01b038416836000611548565b61129d6001600160a01b0384168383611548565b604080516001600160a01b038086168252841660208201529081018290527feded619173dbb378903f97d44ecec898a1c4876f445ae551e063113aef58b47190606001610a1c565b60006112ef611723565b6067546001600160a01b0316637e74a2be61130a3485612c0a565b6066546065546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152611358926001600160a01b039081169216908990600401612da7565b6020604051808303818588803b15801561137157600080fd5b505af1158015611385573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906113aa9190612bbe565b6001600160a01b03811660008181526069602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182529192507f27544d06a0ea95f929c76afff129ca5f619f5937bbf5e7f6df9889978415ea33910160405180910390a192915050565b611430611723565b6001600160a01b0381166114ac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101fc565b6114b5816117f6565b50565b815183511480156114ca575080518251145b6114d357600080fd5b60005b8251811015610e77576115358382815181106114f4576114f4612c22565b602002602001015185838151811061150e5761150e612c22565b602002602001015184848151811061152857611528612c22565b602002602001015161190c565b508061154081612c51565b9150506114d6565b8015806115ea57506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156115b057600080fd5b505afa1580156115c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e89190612ddc565b155b61165c5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016101fc565b6040516001600160a01b0383166024820152604481018290526108b09084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611a4f565b6033546001600160a01b03163314610a3b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101fc565b606580546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f738f2952bbd931a8d0c8c19b15cc051850f9b988a696db9df283b5721f9dccf3910160405180910390a15050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b81518351146118b15760405162461bcd60e51b815260206004820152601660248201527f7769746864726177206c656e677468206572726f722e0000000000000000000060448201526064016101fc565b60005b8351811015610e77576118fa8482815181106118d2576118d2612c22565b60200260200101518483815181106118ec576118ec612c22565b602002602001015184611b34565b8061190481612c51565b9150506118b4565b6060826119225761191d8483611cad565b61192b565b61192b84611df0565b949350505050565b6000806001600160a01b03861661194a3485612c0a565b868660405161195a929190612bae565b60006040518083038185875af1925050503d8060008114611997576040519150601f19603f3d011682016040523d82523d6000602084013e61199c565b606091505b50915091508181906119c15760405162461bcd60e51b81526004016101fc919061245a565b50505050505050565b600054610100900460ff16611a475760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101fc565b610a3b611f7c565b6000611aa4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120029092919063ffffffff16565b8051909150156108b05780806020019051810190611ac29190612df5565b6108b05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101fc565b6001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611bb4574782811015611baa5760405162461bcd60e51b815260206004820152601660248201527f6e6f7420656e6f756768204554482062616c616e63650000000000000000000060448201526064016101fc565b610e778284612011565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038516906370a082319060240160206040518083038186803b158015611c0f57600080fd5b505afa158015611c23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c479190612ddc565b905082811015611c995760405162461bcd60e51b815260206004820152601860248201527f6e6f7420656e6f75676820746f6b656e2062616c616e6365000000000000000060448201526064016101fc565b610e776001600160a01b03851683856120fe565b606060008084806020019051810190611cc69190612e57565b5050915091508315611cdb57611cdb82612147565b6066546001600160a01b03166309c5eabe611cf63484612c0a565b876040518363ffffffff1660e01b8152600401611d13919061245a565b6000604051808303818588803b158015611d2c57600080fd5b505af1158015611d40573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611d879190810190612eea565b92508315611de8576068546001600160a01b031615611de85760405162461bcd60e51b815260206004820152600a60248201527f216e6f742072657365740000000000000000000000000000000000000000000060448201526064016101fc565b505092915050565b606060008083806020019051810190611e099190612f1f565b6066546040517f4bfd6cf40000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529395509193509190911690634bfd6cf49060240160206040518083038186803b158015611e6e57600080fd5b505afa158015611e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea69190612df5565b611ef25760405162461bcd60e51b815260206004820152601f60248201527f5065726d697373696f6e20766572696669636174696f6e206661696c6564210060448201526064016101fc565b600080836001600160a01b031683604051611f0d9190612f70565b600060405180830381855af49150503d8060008114611f48576040519150601f19603f3d011682016040523d82523d6000602084013e611f4d565b606091505b5091509150818190611f725760405162461bcd60e51b81526004016101fc919061245a565b5095945050505050565b600054610100900460ff16611ff95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101fc565b610a3b336117f6565b606061192b8484600085612263565b80156120fa57604080516000808252602082019092526001600160a01b0384169083906040516120419190612f70565b60006040518083038185875af1925050503d806000811461207e576040519150601f19603f3d011682016040523d82523d6000602084013e612083565b606091505b50509050806108b05760405162461bcd60e51b815260206004820152602c60248201527f68656c7065723a3a736166655472616e736665724554483a204554482074726160448201527f6e73666572206661696c6564000000000000000000000000000000000000000060648201526084016101fc565b5050565b6040516001600160a01b0383166024820152604481018290526108b09084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016116a1565b6066546040517f4bfd6cf40000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015290911690634bfd6cf49060240160206040518083038186803b1580156121a557600080fd5b505afa1580156121b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121dd9190612df5565b6122295760405162461bcd60e51b815260206004820152601760248201527f496e76616c69642063757272656e74416461707465722100000000000000000060448201526064016101fc565b606880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6060824710156122db5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016101fc565b6001600160a01b0385163b6123325760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101fc565b600080866001600160a01b0316858760405161234e9190612f70565b60006040518083038185875af1925050503d806000811461238b576040519150601f19603f3d011682016040523d82523d6000602084013e612390565b606091505b50915091506123a08282866123ab565b979650505050505050565b606083156123ba575081610d7e565b8251156123ca5782518084602001fd5b8160405162461bcd60e51b81526004016101fc919061245a565b60005b838110156123ff5781810151838201526020016123e7565b83811115610e775750506000910152565b600081518084526124288160208601602086016123e4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610d7e6020830184612410565b6001600160a01b03811681146114b557600080fd5b60008083601f84011261249457600080fd5b50813567ffffffffffffffff8111156124ac57600080fd5b6020830191508360208285010111156124c457600080fd5b9250929050565b60008060008060008060a087890312156124e457600080fd5b86356124ef8161246d565b955060208701356124ff8161246d565b94506040870135935060608701359250608087013567ffffffffffffffff81111561252957600080fd5b61253589828a01612482565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156125bd576125bd612547565b604052919050565b600067ffffffffffffffff8211156125df576125df612547565b5060051b60200190565b80151581146114b557600080fd5b600082601f83011261260857600080fd5b8135602061261d612618836125c5565b612576565b82815260059290921b8401810191818101908684111561263c57600080fd5b8286015b84811015612660578035612653816125e9565b8352918301918301612640565b509695505050505050565b600067ffffffffffffffff82111561268557612685612547565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f8301126126c257600080fd5b81356126d06126188261266b565b8181528460208386010111156126e557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561271757600080fd5b833567ffffffffffffffff8082111561272f57600080fd5b61273b878388016125f7565b945060209150818601358181111561275257600080fd5b8601601f8101881361276357600080fd5b8035612771612618826125c5565b81815260059190911b8201840190848101908a83111561279057600080fd5b8584015b838110156127c8578035868111156127ac5760008081fd5b6127ba8d89838901016126b1565b845250918601918601612794565b50965050505060408601359150808211156127e257600080fd5b506127ef868287016125f7565b9150509250925092565b60008060006060848603121561280e57600080fd5b83356128198161246d565b925060208401356128298161246d565b915060408401356128398161246d565b809150509250925092565b600082601f83011261285557600080fd5b81356020612865612618836125c5565b82815260059290921b8401810191818101908684111561288457600080fd5b8286015b8481101561266057803561289b8161246d565b8352918301918301612888565b600082601f8301126128b957600080fd5b813560206128c9612618836125c5565b82815260059290921b840181019181810190868411156128e857600080fd5b8286015b8481101561266057803583529183019183016128ec565b60008060006060848603121561291857600080fd5b833567ffffffffffffffff8082111561293057600080fd5b818601915086601f83011261294457600080fd5b81356020612954612618836125c5565b82815260059290921b8401810191818101908a84111561297357600080fd5b948201945b8386101561299a57853561298b8161246d565b82529482019490820190612978565b975050870135925050808211156129b057600080fd5b6129bc87838801612844565b935060408601359150808211156129d257600080fd5b506127ef868287016128a8565b6000806000606084860312156129f457600080fd5b833567ffffffffffffffff80821115612a0c57600080fd5b612a1887838801612844565b945060208601359150612a2a8261246d565b909250604085013590808211156129d257600080fd5b60008060408385031215612a5357600080fd5b823567ffffffffffffffff811115612a6a57600080fd5b612a76858286016126b1565b9250506020830135612a87816125e9565b809150509250929050565b60008060008060608587031215612aa857600080fd5b8435612ab38161246d565b9350602085013567ffffffffffffffff811115612acf57600080fd5b612adb87828801612482565b9598909750949560400135949350505050565b600060208284031215612b0057600080fd5b8135610d7e816125e9565b600060208284031215612b1d57600080fd5b8135610d7e8161246d565b600080600060608486031215612b3d57600080fd5b8335612b488161246d565b92506020840135612b588161246d565b929592945050506040919091013590565b60008060408385031215612b7c57600080fd5b823567ffffffffffffffff811115612b9357600080fd5b612b9f858286016126b1565b95602094909401359450505050565b8183823760009101908152919050565b600060208284031215612bd057600080fd5b8151610d7e8161246d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612c1d57612c1d612bdb565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612c8357612c83612bdb565b5060010190565b600081518084526020808501945080840160005b83811015612cc35781516001600160a01b031687529582019590820190600101612c9e565b509495945050505050565b600081518084526020808501945080840160005b83811015612cc357815187529582019590820190600101612ce2565b606080825284519082018190526000906020906080840190828801845b82811015612d405781516001600160a01b031684529284019290840190600101612d1b565b50505083810382850152612d548187612c8a565b9150508281036040840152612d698185612cce565b9695505050505050565b606081526000612d866060830186612c8a565b6001600160a01b03851660208401528281036040840152612d698185612cce565b60006001600160a01b03808616835280851660208401525060606040830152612dd36060830184612410565b95945050505050565b600060208284031215612dee57600080fd5b5051919050565b600060208284031215612e0757600080fd5b8151610d7e816125e9565b600082601f830112612e2357600080fd5b8151612e316126188261266b565b818152846020838601011115612e4657600080fd5b61192b8260208301602087016123e4565b60008060008060808587031215612e6d57600080fd5b8451612e788161246d565b6020860151604087015191955093507fffffffff0000000000000000000000000000000000000000000000000000000081168114612eb557600080fd5b606086015190925067ffffffffffffffff811115612ed257600080fd5b612ede87828801612e12565b91505092959194509250565b600060208284031215612efc57600080fd5b815167ffffffffffffffff811115612f1357600080fd5b61192b84828501612e12565b60008060408385031215612f3257600080fd5b8251612f3d8161246d565b602084015190925067ffffffffffffffff811115612f5a57600080fd5b612f6685828601612e12565b9150509250929050565b60008251612f828184602087016123e4565b919091019291505056fea264697066735822122069bc698ecaf711076dfee0600df0c1df3f59422159c74e8db74f7ce98a677e3764736f6c63430008090033
Deployed Bytecode
0x6080604052600436106101805760003560e01c806395bb2d86116100d6578063c5c036991161007f578063e1f21c6711610059578063e1f21c67146104f2578063f1fbc32014610512578063f2fde38b1461052557610180565b8063c5c0369914610482578063d42c0e55146104a2578063d89d73f2146104c257610180565b8063b6e7cc44116100b0578063b6e7cc441461041b578063b97a23191461042e578063c0c53b8b1461046257610180565b806395bb2d86146103d5578063a3b52381146103e8578063b1ad37341461040857610180565b806362e8fbca11610138578063887d379711610112578063887d3797146103775780638da5cb5b146103975780638db2bc2b146103b557610180565b806362e8fbca146103005780636400e38514610342578063715018a61461036257610180565b806332418366116101695780633241836614610295578063405f301d146102cd5780635c5dcec7146102e057610180565b80630d8e6e2c1461020f57806323e30c8b14610267575b6068546001600160a01b031633146102055760405162461bcd60e51b815260206004820152602d60248201527f4e6f7420616c6c6f7765643a2063616c6c6572206973206e6f7420746865206360448201527f757272656e74416461707465720000000000000000000000000000000000000060648201526084015b60405180910390fd5b61020d610545565b005b34801561021b57600080fd5b5060408051808201909152600481527f76302e330000000000000000000000000000000000000000000000000000000060208201525b60405161025e919061245a565b60405180910390f35b34801561027357600080fd5b506102876102823660046124cb565b6105fb565b60405190815260200161025e565b3480156102a157600080fd5b506066546102b5906001600160a01b031681565b6040516001600160a01b03909116815260200161025e565b61020d6102db366004612702565b610827565b3480156102ec57600080fd5b506065546102b5906001600160a01b031681565b34801561030c57600080fd5b506066546103329074010000000000000000000000000000000000000000900460ff1681565b604051901515815260200161025e565b34801561034e57600080fd5b5061020d61035d3660046127f9565b6108b5565b34801561036e57600080fd5b5061020d610a29565b34801561038357600080fd5b5061020d610392366004612903565b610a3d565b3480156103a357600080fd5b506033546001600160a01b03166102b5565b3480156103c157600080fd5b5061020d6103d03660046129df565b610c05565b6102516103e3366004612a40565b610cf1565b3480156103f457600080fd5b506068546102b5906001600160a01b031681565b61020d610416366004612a92565b610d85565b61020d610429366004612a92565b610e7d565b34801561043a57600080fd5b506102b57f000000000000000000000000ce672de0d2d38944716c21bca7db1164685af2ac81565b34801561046e57600080fd5b5061020d61047d3660046127f9565b610eef565b34801561048e57600080fd5b506067546102b5906001600160a01b031681565b3480156104ae57600080fd5b5061020d6104bd366004612aee565b611167565b3480156104ce57600080fd5b506103326104dd366004612b0b565b60696020526000908152604090205460ff1681565b3480156104fe57600080fd5b5061020d61050d366004612b28565b6111f6565b6102b5610520366004612b69565b6112e5565b34801561053157600080fd5b5061020d610540366004612b0b565b611428565b60685460405160009182916001600160a01b03909116906105699083903690612bae565b600060405180830381855af49150503d80600081146105a4576040519150601f19603f3d011682016040523d82523d6000602084013e6105a9565b606091505b50915091508181906105ce5760405162461bcd60e51b81526004016101fc919061245a565b5050606880547fffffffffffffffffffffffff000000000000000000000000000000000000000016905550565b6065546000906001600160a01b0388811691161461065b5760405162461bcd60e51b815260206004820152601e60248201527f496e69746961746f7220766572696669636174696f6e206661696c65642e000060448201526064016101fc565b6065546040517f7b67a87a0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0390911690637b67a87a9060240160206040518083038186803b1580156106b757600080fd5b505afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190612bbe565b6001600160a01b0316336001600160a01b03161461074f5760405162461bcd60e51b815260206004820152601e60248201527f466c6173684c6f616e20766572696669636174696f6e206661696c65642e000060448201526064016101fc565b6000808061075f85870187612702565b9250925092506107708383836114b8565b886107866001600160a01b038216336000611548565b6107a5336107948a8c612c0a565b6001600160a01b0384169190611548565b604080516001600160a01b03808e1682528c1660208201529081018a9052606081018990527fe89ed9dff37d0839f03c31b726da0ac3a135628cffc1522e2aecfebda62901ee9060800160405180910390a1507f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a9950505050505050505050565b6065546001600160a01b031633148061085957503361084e6033546001600160a01b031690565b6001600160a01b0316145b6108a55760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b6108b08383836114b8565b505050565b6108bd611723565b306001600160a01b037f000000000000000000000000ce672de0d2d38944716c21bca7db1164685af2ac1614156109365760405162461bcd60e51b815260206004820152600660248201527f2170726f7879000000000000000000000000000000000000000000000000000060448201526064016101fc565b6001600160a01b0383161561097957606680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385161790555b6001600160a01b03821615610991576109918261177d565b6001600160a01b038116156109d457606780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383161790555b604080516001600160a01b03808616825280851660208301528316918101919091527f67891dff85ae8098fdc91abdef9ed30dbd1594e09b5a873425c4c5fae3b90b05906060015b60405180910390a1505050565b610a31611723565b610a3b60006117f6565b565b6065546001600160a01b0316331480610a6f575033610a646033546001600160a01b031690565b6001600160a01b0316145b610abb5760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b80518351148015610acd575080518251145b610b195760405162461bcd60e51b815260206004820152601560248201527f617070726f7665206c656e677468206572726f722e000000000000000000000060448201526064016101fc565b60005b8351811015610bd157610b76838281518110610b3a57610b3a612c22565b60200260200101516000868481518110610b5657610b56612c22565b60200260200101516001600160a01b03166115489092919063ffffffff16565b610bbf838281518110610b8b57610b8b612c22565b6020026020010151838381518110610ba557610ba5612c22565b6020026020010151868481518110610b5657610b56612c22565b80610bc981612c51565b915050610b1c565b507f0c241f17c45588d0915faa0a3c154a4f543c8ca7ba3041999859d3445df3a341838383604051610a1c93929190612cfe565b610c0d611723565b6033546001600160a01b03838116911614801590610c4457506001600160a01b03821660009081526069602052604090205460ff16155b15610cb35760665474010000000000000000000000000000000000000000900460ff16610cb35760405162461bcd60e51b815260206004820152600c60248201527f4e6f7420616c6c6f77656421000000000000000000000000000000000000000060448201526064016101fc565b610cbe838284611860565b7fead71e0d91c879b56eceece36db1b5b6a8327f4d6baa7da82628ceae22d40b5f838383604051610a1c93929190612d73565b6065546060906001600160a01b0316331480610d26575033610d1b6033546001600160a01b031690565b6001600160a01b0316145b610d725760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b610d7e8383600061190c565b9392505050565b6065546001600160a01b0316331480610db7575033610dac6033546001600160a01b031690565b6001600160a01b0316145b610e035760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b6001600160a01b03841660009081526069602052604090205460ff16610e6b5760405162461bcd60e51b815260206004820152601260248201527f4e6f74206d79207375624163636f756e7421000000000000000000000000000060448201526064016101fc565b610e7784848484611933565b50505050565b610e85611723565b60665474010000000000000000000000000000000000000000900460ff16610e6b5760405162461bcd60e51b815260206004820152600c60248201527f4e6f7420616c6c6f77656421000000000000000000000000000000000000000060448201526064016101fc565b600054610100900460ff1615808015610f0f5750600054600160ff909116105b80610f295750303b158015610f29575060005460ff166001145b610f9b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101fc565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610ff957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b306001600160a01b037f000000000000000000000000ce672de0d2d38944716c21bca7db1164685af2ac1614156110725760405162461bcd60e51b815260206004820152600660248201527f2170726f7879000000000000000000000000000000000000000000000000000060448201526064016101fc565b61107a6119ca565b6110838361177d565b606680546001600160a01b038481167fffffffffffffffffffffffff00000000000000000000000000000000000000009283161790925560678054909116331790556040805191861682523060208301527f14cb25cca821184a88389fa7823ef6a4cd65897a89cbdcf5169542b8d790478b910160405180910390a18015610e7757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b61116f611723565b606680547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000008315158102919091179182905560405160ff9190920416151581527fc677f7fe897200d1c5b3e4756f7edfabe272970d8dd7adb0d7e45ce8af109e569060200160405180910390a150565b6065546001600160a01b031633148061122857503361121d6033546001600160a01b031690565b6001600160a01b0316145b6112745760405162461bcd60e51b815260206004820181905260248201527f5065726d69743a2063616c6c6572206973206e6f7420746865205065726d697460448201526064016101fc565b6112896001600160a01b038416836000611548565b61129d6001600160a01b0384168383611548565b604080516001600160a01b038086168252841660208201529081018290527feded619173dbb378903f97d44ecec898a1c4876f445ae551e063113aef58b47190606001610a1c565b60006112ef611723565b6067546001600160a01b0316637e74a2be61130a3485612c0a565b6066546065546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152611358926001600160a01b039081169216908990600401612da7565b6020604051808303818588803b15801561137157600080fd5b505af1158015611385573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906113aa9190612bbe565b6001600160a01b03811660008181526069602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182529192507f27544d06a0ea95f929c76afff129ca5f619f5937bbf5e7f6df9889978415ea33910160405180910390a192915050565b611430611723565b6001600160a01b0381166114ac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101fc565b6114b5816117f6565b50565b815183511480156114ca575080518251145b6114d357600080fd5b60005b8251811015610e77576115358382815181106114f4576114f4612c22565b602002602001015185838151811061150e5761150e612c22565b602002602001015184848151811061152857611528612c22565b602002602001015161190c565b508061154081612c51565b9150506114d6565b8015806115ea57506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156115b057600080fd5b505afa1580156115c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e89190612ddc565b155b61165c5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016101fc565b6040516001600160a01b0383166024820152604481018290526108b09084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611a4f565b6033546001600160a01b03163314610a3b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101fc565b606580546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f738f2952bbd931a8d0c8c19b15cc051850f9b988a696db9df283b5721f9dccf3910160405180910390a15050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b81518351146118b15760405162461bcd60e51b815260206004820152601660248201527f7769746864726177206c656e677468206572726f722e0000000000000000000060448201526064016101fc565b60005b8351811015610e77576118fa8482815181106118d2576118d2612c22565b60200260200101518483815181106118ec576118ec612c22565b602002602001015184611b34565b8061190481612c51565b9150506118b4565b6060826119225761191d8483611cad565b61192b565b61192b84611df0565b949350505050565b6000806001600160a01b03861661194a3485612c0a565b868660405161195a929190612bae565b60006040518083038185875af1925050503d8060008114611997576040519150601f19603f3d011682016040523d82523d6000602084013e61199c565b606091505b50915091508181906119c15760405162461bcd60e51b81526004016101fc919061245a565b50505050505050565b600054610100900460ff16611a475760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101fc565b610a3b611f7c565b6000611aa4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120029092919063ffffffff16565b8051909150156108b05780806020019051810190611ac29190612df5565b6108b05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101fc565b6001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611bb4574782811015611baa5760405162461bcd60e51b815260206004820152601660248201527f6e6f7420656e6f756768204554482062616c616e63650000000000000000000060448201526064016101fc565b610e778284612011565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038516906370a082319060240160206040518083038186803b158015611c0f57600080fd5b505afa158015611c23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c479190612ddc565b905082811015611c995760405162461bcd60e51b815260206004820152601860248201527f6e6f7420656e6f75676820746f6b656e2062616c616e6365000000000000000060448201526064016101fc565b610e776001600160a01b03851683856120fe565b606060008084806020019051810190611cc69190612e57565b5050915091508315611cdb57611cdb82612147565b6066546001600160a01b03166309c5eabe611cf63484612c0a565b876040518363ffffffff1660e01b8152600401611d13919061245a565b6000604051808303818588803b158015611d2c57600080fd5b505af1158015611d40573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611d879190810190612eea565b92508315611de8576068546001600160a01b031615611de85760405162461bcd60e51b815260206004820152600a60248201527f216e6f742072657365740000000000000000000000000000000000000000000060448201526064016101fc565b505092915050565b606060008083806020019051810190611e099190612f1f565b6066546040517f4bfd6cf40000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529395509193509190911690634bfd6cf49060240160206040518083038186803b158015611e6e57600080fd5b505afa158015611e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea69190612df5565b611ef25760405162461bcd60e51b815260206004820152601f60248201527f5065726d697373696f6e20766572696669636174696f6e206661696c6564210060448201526064016101fc565b600080836001600160a01b031683604051611f0d9190612f70565b600060405180830381855af49150503d8060008114611f48576040519150601f19603f3d011682016040523d82523d6000602084013e611f4d565b606091505b5091509150818190611f725760405162461bcd60e51b81526004016101fc919061245a565b5095945050505050565b600054610100900460ff16611ff95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101fc565b610a3b336117f6565b606061192b8484600085612263565b80156120fa57604080516000808252602082019092526001600160a01b0384169083906040516120419190612f70565b60006040518083038185875af1925050503d806000811461207e576040519150601f19603f3d011682016040523d82523d6000602084013e612083565b606091505b50509050806108b05760405162461bcd60e51b815260206004820152602c60248201527f68656c7065723a3a736166655472616e736665724554483a204554482074726160448201527f6e73666572206661696c6564000000000000000000000000000000000000000060648201526084016101fc565b5050565b6040516001600160a01b0383166024820152604481018290526108b09084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016116a1565b6066546040517f4bfd6cf40000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015290911690634bfd6cf49060240160206040518083038186803b1580156121a557600080fd5b505afa1580156121b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121dd9190612df5565b6122295760405162461bcd60e51b815260206004820152601760248201527f496e76616c69642063757272656e74416461707465722100000000000000000060448201526064016101fc565b606880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6060824710156122db5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016101fc565b6001600160a01b0385163b6123325760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101fc565b600080866001600160a01b0316858760405161234e9190612f70565b60006040518083038185875af1925050503d806000811461238b576040519150601f19603f3d011682016040523d82523d6000602084013e612390565b606091505b50915091506123a08282866123ab565b979650505050505050565b606083156123ba575081610d7e565b8251156123ca5782518084602001fd5b8160405162461bcd60e51b81526004016101fc919061245a565b60005b838110156123ff5781810151838201526020016123e7565b83811115610e775750506000910152565b600081518084526124288160208601602086016123e4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610d7e6020830184612410565b6001600160a01b03811681146114b557600080fd5b60008083601f84011261249457600080fd5b50813567ffffffffffffffff8111156124ac57600080fd5b6020830191508360208285010111156124c457600080fd5b9250929050565b60008060008060008060a087890312156124e457600080fd5b86356124ef8161246d565b955060208701356124ff8161246d565b94506040870135935060608701359250608087013567ffffffffffffffff81111561252957600080fd5b61253589828a01612482565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156125bd576125bd612547565b604052919050565b600067ffffffffffffffff8211156125df576125df612547565b5060051b60200190565b80151581146114b557600080fd5b600082601f83011261260857600080fd5b8135602061261d612618836125c5565b612576565b82815260059290921b8401810191818101908684111561263c57600080fd5b8286015b84811015612660578035612653816125e9565b8352918301918301612640565b509695505050505050565b600067ffffffffffffffff82111561268557612685612547565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f8301126126c257600080fd5b81356126d06126188261266b565b8181528460208386010111156126e557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561271757600080fd5b833567ffffffffffffffff8082111561272f57600080fd5b61273b878388016125f7565b945060209150818601358181111561275257600080fd5b8601601f8101881361276357600080fd5b8035612771612618826125c5565b81815260059190911b8201840190848101908a83111561279057600080fd5b8584015b838110156127c8578035868111156127ac5760008081fd5b6127ba8d89838901016126b1565b845250918601918601612794565b50965050505060408601359150808211156127e257600080fd5b506127ef868287016125f7565b9150509250925092565b60008060006060848603121561280e57600080fd5b83356128198161246d565b925060208401356128298161246d565b915060408401356128398161246d565b809150509250925092565b600082601f83011261285557600080fd5b81356020612865612618836125c5565b82815260059290921b8401810191818101908684111561288457600080fd5b8286015b8481101561266057803561289b8161246d565b8352918301918301612888565b600082601f8301126128b957600080fd5b813560206128c9612618836125c5565b82815260059290921b840181019181810190868411156128e857600080fd5b8286015b8481101561266057803583529183019183016128ec565b60008060006060848603121561291857600080fd5b833567ffffffffffffffff8082111561293057600080fd5b818601915086601f83011261294457600080fd5b81356020612954612618836125c5565b82815260059290921b8401810191818101908a84111561297357600080fd5b948201945b8386101561299a57853561298b8161246d565b82529482019490820190612978565b975050870135925050808211156129b057600080fd5b6129bc87838801612844565b935060408601359150808211156129d257600080fd5b506127ef868287016128a8565b6000806000606084860312156129f457600080fd5b833567ffffffffffffffff80821115612a0c57600080fd5b612a1887838801612844565b945060208601359150612a2a8261246d565b909250604085013590808211156129d257600080fd5b60008060408385031215612a5357600080fd5b823567ffffffffffffffff811115612a6a57600080fd5b612a76858286016126b1565b9250506020830135612a87816125e9565b809150509250929050565b60008060008060608587031215612aa857600080fd5b8435612ab38161246d565b9350602085013567ffffffffffffffff811115612acf57600080fd5b612adb87828801612482565b9598909750949560400135949350505050565b600060208284031215612b0057600080fd5b8135610d7e816125e9565b600060208284031215612b1d57600080fd5b8135610d7e8161246d565b600080600060608486031215612b3d57600080fd5b8335612b488161246d565b92506020840135612b588161246d565b929592945050506040919091013590565b60008060408385031215612b7c57600080fd5b823567ffffffffffffffff811115612b9357600080fd5b612b9f858286016126b1565b95602094909401359450505050565b8183823760009101908152919050565b600060208284031215612bd057600080fd5b8151610d7e8161246d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612c1d57612c1d612bdb565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612c8357612c83612bdb565b5060010190565b600081518084526020808501945080840160005b83811015612cc35781516001600160a01b031687529582019590820190600101612c9e565b509495945050505050565b600081518084526020808501945080840160005b83811015612cc357815187529582019590820190600101612ce2565b606080825284519082018190526000906020906080840190828801845b82811015612d405781516001600160a01b031684529284019290840190600101612d1b565b50505083810382850152612d548187612c8a565b9150508281036040840152612d698185612cce565b9695505050505050565b606081526000612d866060830186612c8a565b6001600160a01b03851660208401528281036040840152612d698185612cce565b60006001600160a01b03808616835280851660208401525060606040830152612dd36060830184612410565b95945050505050565b600060208284031215612dee57600080fd5b5051919050565b600060208284031215612e0757600080fd5b8151610d7e816125e9565b600082601f830112612e2357600080fd5b8151612e316126188261266b565b818152846020838601011115612e4657600080fd5b61192b8260208301602087016123e4565b60008060008060808587031215612e6d57600080fd5b8451612e788161246d565b6020860151604087015191955093507fffffffff0000000000000000000000000000000000000000000000000000000081168114612eb557600080fd5b606086015190925067ffffffffffffffff811115612ed257600080fd5b612ede87828801612e12565b91505092959194509250565b600060208284031215612efc57600080fd5b815167ffffffffffffffff811115612f1357600080fd5b61192b84828501612e12565b60008060408385031215612f3257600080fd5b8251612f3d8161246d565b602084015190925067ffffffffffffffff811115612f5a57600080fd5b612f6685828601612e12565b9150509250929050565b60008251612f828184602087016123e4565b919091019291505056fea264697066735822122069bc698ecaf711076dfee0600df0c1df3f59422159c74e8db74f7ce98a677e3764736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BASE | 100.00% | $4,061.07 | 7.9305 | $32,206.34 |
[ 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.