Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
SiloAuthorizer
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "../../auth/FarmingBaseACL.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface ISiloRouter { // Enum representing different action types enum ActionType { Deposit, // Deposit tokens Mint, // Mint (create tokens/shares) Repay, // Repay debt RepayShares // Repay shares instead of a specific amount } /// @notice Struct representing additional action parameters /// @dev This includes amount and asset type struct AnyAction { uint256 amount; // Amount for the action (e.g., deposit or mint) uint8 assetType; // Asset type indicator (e.g., 0 or 1) } /// @notice Struct describing a single action struct Action { ActionType actionType; // Type of action (Deposit, Mint, Repay, RepayShares) address silo; // Address of the Silo contract being interacted with IERC20 asset; // Token used for the action bytes options; // Additional encoded parameters (using abi.encode with AnyAction) } /// @notice Function to execute one or more actions in batch /// @param actions Array of actions to be executed function execute(Action[] calldata actions) external payable; } contract SiloAuthorizer is FarmingBaseACL { bytes32 public constant NAME = "SiloAuthorizer"; uint256 public constant VERSION = 1; address public immutable ROUTER = 0x22AacdEc57b13911dE9f188CF69633cC537BdB76; // @notice Constructor for SiloAuthorizer /// @param _owner The owner address ( Safe wallet address) /// @param _caller The address caller (Cobo account) constructor(address _owner, address _caller) FarmingBaseACL(_owner, _caller) {} /// @notice Function to execute SiloRouter actions. /// @dev This function is callable only by the ROUTER via a delegate call (as ensured by onlyContract modifier) /// @param actions An array of actions to execute via SiloRouter function execute(ISiloRouter.Action[] calldata actions) public view onlyContract(ROUTER) { // The actual execution is handled by the SiloRouter. // This function exists solely to satisfy the delegate call requirements from Cobo. } function withdraw(uint256 _shares, address _receiver, address _owner) public view { _checkRecipient(_receiver); _checkRecipient(_owner); } function deposit(uint256 _shares, address _receiver, address _owner) public view { _checkRecipient(_receiver); _checkRecipient(_owner); } function redeem(uint256 _shares, address _receiver, address _owner) public view { _checkRecipient(_receiver); _checkRecipient(_owner); } function repay(uint256 _assetAmount, address _borrower) public view { _checkRecipient(_borrower); } /// @notice Returns the list of contract addresses for which permissions have been granted. /// This includes the ROUTER and all pool addresses from the whitelist (farmPoolAddressWhitelist). /// @return _contracts Array of authorized contract addresses. function contracts() public view override returns (address[] memory _contracts) { // Retrieve the pool addresses from the whitelist using the inherited getter address[] memory poolAddresses = this.getPoolAddressWhiteList(); // Total contracts count: 1 (for ROUTER) plus the number of pool addresses uint256 totalContracts = 1 + poolAddresses.length; // Initialize a new array with the total number of authorized contracts _contracts = new address[](totalContracts); // First element is always the ROUTER contract _contracts[0] = ROUTER; // Append each pool address from the whitelist to the authorized contracts array for (uint256 i = 0; i < poolAddresses.length; i++) { _contracts[i + 1] = poolAddresses[i]; } } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "../base/BaseACL.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; abstract contract FarmingBaseACL is BaseACL { using EnumerableSet for EnumerableSet.UintSet; using EnumerableSet for EnumerableSet.AddressSet; //roles => pool id whitelist EnumerableSet.UintSet farmPoolIdWhitelist; EnumerableSet.AddressSet farmPoolAddressWhitelist; //events event AddPoolAddressWhitelist(address indexed _poolAddress, address indexed user); event RemovePoolAddressWhitelist(address indexed _poolAddress, address indexed user); event AddPoolIdWhitelist(uint256 indexed _poolId, address indexed user); event RemovePoolIdWhitelist(uint256 indexed _poolId, address indexed user); constructor(address _owner, address _caller) BaseACL(_owner, _caller) {} function addPoolIds(uint256[] calldata _poolIds) external onlyOwner { for (uint256 i = 0; i < _poolIds.length; i++) { if (farmPoolIdWhitelist.add(_poolIds[i])) { emit AddPoolIdWhitelist(_poolIds[i], msg.sender); } } } function removePoolIds(uint256[] calldata _poolIds) external onlyOwner { for (uint256 i = 0; i < _poolIds.length; i++) { if (farmPoolIdWhitelist.remove(_poolIds[i])) { emit RemovePoolIdWhitelist(_poolIds[i], msg.sender); } } } function addPoolAddresses(address[] calldata _poolAddresses) external onlyOwner { for (uint256 i = 0; i < _poolAddresses.length; i++) { if (farmPoolAddressWhitelist.add(_poolAddresses[i])) { emit AddPoolAddressWhitelist(_poolAddresses[i], msg.sender); } } } function removePoolAddresses(address[] calldata _poolAddresses) external onlyOwner { for (uint256 i = 0; i < _poolAddresses.length; i++) { if (farmPoolAddressWhitelist.remove(_poolAddresses[i])) { emit RemovePoolAddressWhitelist(_poolAddresses[i], msg.sender); } } } function getPoolIdWhiteList() external view returns (uint256[] memory) { return farmPoolIdWhitelist.values(); } function getPoolAddressWhiteList() external view returns (address[] memory) { return farmPoolAddressWhitelist.values(); } function _checkAllowPoolId(uint256 _poolId) internal view { require(farmPoolIdWhitelist.contains(_poolId), "pool id not allowed"); } function _checkAllowPoolAddress(address _poolAddress) internal view { require(farmPoolAddressWhitelist.contains(_poolAddress), "pool address not allowed"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "./BaseAuthorizer.sol"; /// @title BaseACL - Basic ACL template which uses the call-self trick to perform function and parameters check. /// @author Cobo Safe Dev Team https://www.cobo.com/ /// @dev Steps to extend this: /// 1. Set the NAME, VERSION, TYPE. /// 2. Write ACL functions according the target contract. /// 3. Add a constructor. eg: /// `constructor(address _owner, address _caller) BaseACL(_owner, _caller) {}` /// 4. Override `contracts()` to only target contracts that you checks. Transactions //// whose `to` address is not in the list will revert. /// 5. (Optional) If state changing operation in the checking method is required, /// override `_preExecCheck()` to change `staticcall` to `call`. /// /// NOTE for ACL developers: /// 1. The checking functions can be defined extractly the same as the target method /// to control thus developers do not bother to write a lot `abi.decode` code. /// 2. Checking funtions should NOT contain return value, use `require` to perform check. /// 3. BaseACL may serve for multiple target contracts. /// - Implement contracts() to manage the target contracts set. /// - Use `onlyContract` modifier or check `_txn().to` in checking functions. /// 4. `onlyOwner` modifier should be used for customized setter functions. abstract contract BaseACL is BaseAuthorizer { using EnumerableSet for EnumerableSet.Bytes32Set; /// @dev Set such constants in sub contract. // bytes32 public constant NAME = "BaseACL"; // bytes32 public constant override TYPE = "ACLType"; // uint256 public constant VERSION = 0; /// Only preExecCheck is used in BaseACL and hint is not supported. uint256 public constant flag = AuthFlags.HAS_PRE_CHECK_MASK; constructor(address _owner, address _caller) BaseAuthorizer(_owner, _caller) {} /// Internal functions. function _parseReturnData( bool success, bytes memory revertData ) internal pure returns (AuthorizerReturnData memory authData) { if (success) { // ACL checking functions should not return any bytes which differs from normal view functions. require(revertData.length == 0, Errors.ACL_FUNC_RETURNS_NON_EMPTY); authData.result = AuthResult.SUCCESS; } else { if (revertData.length < 68) { // 4(Error sig) + 32(offset) + 32(length) authData.message = string(revertData); } else { assembly { // Slice the sighash. revertData := add(revertData, 0x04) } authData.message = abi.decode(revertData, (string)); } } } function _contractCheck(TransactionData calldata transaction) internal virtual returns (bool result) { // This works as a catch-all check. Sample but safer. address to = transaction.to; address[] memory _contracts = contracts(); for (uint i = 0; i < _contracts.length; i++) { if (to == _contracts[i]) return true; } return false; } function _packTxn(TransactionData calldata transaction) internal pure virtual returns (bytes memory) { bytes memory txnData = abi.encode(transaction); bytes memory callDataSize = abi.encode(transaction.data.length); return abi.encodePacked(transaction.data, txnData, callDataSize); } function _unpackTxn() internal pure virtual returns (TransactionData memory transaction) { uint256 end = msg.data.length; uint256 callDataSize = abi.decode(msg.data[end - 32:end], (uint256)); transaction = abi.decode(msg.data[callDataSize:], (TransactionData)); } // @dev Only valid in self-call checking functions. function _txn() internal pure virtual returns (TransactionData memory transaction) { return _unpackTxn(); } function _preExecCheck( TransactionData calldata transaction ) internal virtual override returns (AuthorizerReturnData memory authData) { if (!_contractCheck(transaction)) { authData.result = AuthResult.FAILED; authData.message = Errors.NOT_IN_CONTRACT_LIST; return authData; } (bool success, bytes memory revertData) = address(this).staticcall(_packTxn(transaction)); return _parseReturnData(success, revertData); } function _postExecCheck( TransactionData calldata transaction, TransactionResult calldata callResult, AuthorizerReturnData calldata preData ) internal virtual override returns (AuthorizerReturnData memory authData) { authData.result = AuthResult.SUCCESS; } // Internal view functions. // Utilities for checking functions. function _checkRecipient(address _recipient) internal view { require(_recipient == _txn().from, "Invalid recipient"); } function _checkContract(address _contract) internal view { require(_contract == _txn().to, "Invalid contract"); } // Modifiers. modifier onlyContract(address _contract) { _checkContract(_contract); _; } /// External functions /// @dev Implement your own access control checking functions here. // example: // function transfer(address to, uint256 amount) // onlyContract(USDT_ADDR) // external view // { // require(amount > 0 & amount < 10000, "amount not in range"); // } /// @dev Override this cause it is used by `_preExecCheck`. /// @notice Target contracts this BaseACL controls. function contracts() public view virtual returns (address[] memory _contracts) {} fallback() external virtual { revert(Errors.METHOD_NOT_ALLOW); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "./BaseOwnable.sol"; import "../Errors.sol"; import "../../interfaces/IAuthorizer.sol"; import "../../interfaces/IAccount.sol"; import "../../interfaces/IRoleManager.sol"; /// @title BaseAuthorizer - A basic pausable authorizer with caller restriction. /// @author Cobo Safe Dev Team https://www.cobo.com/ /// @dev Base contract to extend to implement specific authorizer. abstract contract BaseAuthorizer is IAuthorizer, BaseOwnable { /// @dev Override such constants while extending BaseAuthorizer. bool public paused = false; // Often used for off-chain system. // Each contract instance has its own value. bytes32 public tag = ""; // The caller which is able to call this contract's pre/postExecProcess // and pre/postExecCheck having side-effect. // It is usually the account or the parent authorizer(set) on higher level. address public caller; // This is the account this authorizer works for. // Currently only used to lookup `roleManager`. // If not used it is OK to keep it unset. address public account; event CallerSet(address indexed caller); event AccountSet(address indexed account); event TagSet(bytes32 indexed tag); event PausedSet(bool indexed status); constructor(address _owner, address _caller) BaseOwnable(_owner) { caller = _caller; } function initialize(address _owner, address _caller) public { initialize(_owner); caller = _caller; emit CallerSet(_caller); } function initialize(address _owner, address _caller, address _account) public { initialize(_owner, _caller); account = _account; emit AccountSet(_account); } modifier onlyCaller() virtual { require(msg.sender == caller, Errors.INVALID_CALLER); _; } /// @notice Change the caller. /// @param _caller the caller which calls the authorizer. function setCaller(address _caller) external onlyOwner { require(_caller != address(0), "Invalid caller"); caller = _caller; emit CallerSet(_caller); } /// @notice Change the account. /// @param _account the account which the authorizer get role manager from. function setAccount(address _account) external onlyOwner { require(_account != address(0), "Invalid account"); account = _account; emit AccountSet(_account); } /// @notice Change the tag for the contract instance. /// @dev For off-chain index. /// @param _tag the tag function setTag(bytes32 _tag) external onlyOwner { tag = _tag; emit TagSet(_tag); } /// @notice Set the pause status. Authorizer just denies all when paused. /// @param _paused the paused status: true or false. function setPaused(bool _paused) external onlyOwner { paused = _paused; emit PausedSet(_paused); } /// @dev `onlyCaller` check is forced on pre/post Check/Process handlers /// to prevent attackers from polluting our data by calling this directly. /// @notice Check if the transaction can be executed. /// @return authData Return check status, error message and other data. function preExecCheck( TransactionData calldata transaction ) external virtual onlyCaller returns (AuthorizerReturnData memory authData) { if (paused) { authData.result = AuthResult.FAILED; authData.message = Errors.AUTHORIZER_PAUSED; } else { authData = _preExecCheck(transaction); } } /// @notice Check after transaction execution. /// @param callResult Transaction call status and return data. function postExecCheck( TransactionData calldata transaction, TransactionResult calldata callResult, AuthorizerReturnData calldata preData ) external virtual onlyCaller returns (AuthorizerReturnData memory authData) { if (paused) { authData.result = AuthResult.FAILED; authData.message = Errors.AUTHORIZER_PAUSED; } else { authData = _postExecCheck(transaction, callResult, preData); } } /// @dev Perform actions before the transaction execution. function preExecProcess(TransactionData calldata transaction) external virtual onlyCaller { if (!paused) _preExecProcess(transaction); } /// @dev Perform actions after the transaction execution. function postExecProcess( TransactionData calldata transaction, TransactionResult calldata callResult ) external virtual onlyCaller { if (!paused) _postExecProcess(transaction, callResult); } /// @dev Extract the roles of the delegate. If no roleManager set return empty lists. function _getRoleManager() internal view returns (address roleManager) { require(account != address(0), Errors.ACCOUNT_NOT_SET); roleManager = IAccount(account).roleManager(); require(roleManager != address(0), Errors.ROLE_MANAGER_NOT_SET); } function _getRoles(TransactionData calldata transaction) internal view returns (bytes32[] memory roles) { address roleManager = _getRoleManager(); roles = IRoleManager(roleManager).getRoles(transaction.delegate); } /// @dev Call `roleManager` to validate the role of delegate. function _hasRole(TransactionData calldata transaction, bytes32 role) internal view returns (bool) { address roleManager = _getRoleManager(); return IRoleManager(roleManager).hasRole(transaction.delegate, role); } /// @dev Override these functions to while extending this contract. function _preExecCheck( TransactionData calldata transaction ) internal virtual returns (AuthorizerReturnData memory authData) {} function _postExecCheck( TransactionData calldata transaction, TransactionResult calldata callResult, AuthorizerReturnData calldata preData ) internal virtual returns (AuthorizerReturnData memory) {} function _preExecProcess(TransactionData calldata transaction) internal virtual {} function _postExecProcess( TransactionData calldata transaction, TransactionResult calldata callResult ) internal virtual {} /// @dev Override this if you implement new type of authorizer. function TYPE() external view virtual returns (bytes32) { return AuthType.COMMON; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "../Errors.sol"; import "./BaseVersion.sol"; /// @title BaseOwnable - Simple ownership access control contract. /// @author Cobo Safe Dev Team https://www.cobo.com/ /// @dev Can be used in both proxy and non-proxy mode. abstract contract BaseOwnable is BaseVersion { address public owner; address public pendingOwner; bool private initialized = false; event PendingOwnerSet(address indexed to); event NewOwnerSet(address indexed owner); modifier onlyOwner() { require(owner == msg.sender, Errors.CALLER_IS_NOT_OWNER); _; } /// @dev `owner` is set by argument, thus the owner can any address. /// When used in non-proxy mode, `initialize` can not be called /// after deployment. constructor(address _owner) { initialize(_owner); } /// @dev When used in proxy mode, `initialize` can be called by anyone /// to claim the ownership. /// This function can be called only once. function initialize(address _owner) public { require(!initialized, "Already initialized"); _setOwner(_owner); initialized = true; } /// @notice User should ensure the corrent owner address set, or the /// ownership may be transferred to blackhole. It is recommended to /// take a safer way with setPendingOwner() + acceptOwner(). function transferOwnership(address newOwner) external onlyOwner { require(newOwner != address(0), "New Owner is zero"); _setOwner(newOwner); } /// @notice The original owner calls `setPendingOwner(newOwner)` and the new /// owner calls `acceptOwner()` to take the ownership. function setPendingOwner(address to) external onlyOwner { pendingOwner = to; emit PendingOwnerSet(pendingOwner); } function acceptOwner() external { require(msg.sender == pendingOwner); _setOwner(pendingOwner); } /// @notice Make the contract immutable. function renounceOwnership() external onlyOwner { _setOwner(address(0)); } // Internal functions /// @dev Clear pendingOwner to prevent from reclaiming the ownership. function _setOwner(address _owner) internal { owner = _owner; pendingOwner = address(0); emit NewOwnerSet(owner); } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; /// @dev Common errors. This helps reducing the contract size. library Errors { // "E1"; // Call/Static-call failed. string constant CALL_FAILED = "E2"; // Argument's type not supported in View Variant. string constant INVALID_VIEW_ARG_SOL_TYPE = "E3"; // Invalid length for variant raw data. string constant INVALID_VARIANT_RAW_DATA = "E4"; // "E5"; // Invalid variant type. string constant INVALID_VAR_TYPE = "E6"; // Rule not exists string constant RULE_NOT_EXISTS = "E7"; // Variant name not found. string constant VAR_NAME_NOT_FOUND = "E8"; // Rule: v1/v2 solType mismatch string constant SOL_TYPE_MISMATCH = "E9"; // "E10"; // Invalid rule OP. string constant INVALID_RULE_OP = "E11"; // "E12"; // "E13"; // "E14"; // "E15"; // "E16"; // "E17"; // "E18"; // "E19"; // "E20"; // checkCmpOp: OP not support string constant CMP_OP_NOT_SUPPORT = "E21"; // checkBySolType: Invalid op for bool string constant INVALID_BOOL_OP = "E22"; // checkBySolType: Invalid op string constant CHECK_INVALID_OP = "E23"; // Invalid solidity type. string constant INVALID_SOL_TYPE = "E24"; // computeBySolType: invalid vm op string constant INVALID_VM_BOOL_OP = "E25"; // computeBySolType: invalid vm arith op string constant INVALID_VM_ARITH_OP = "E26"; // onlyCaller: Invalid caller string constant INVALID_CALLER = "E27"; // "E28"; // Side-effect is not allowed here. string constant SIDE_EFFECT_NOT_ALLOWED = "E29"; // Invalid variant count for the rule op. string constant INVALID_VAR_COUNT = "E30"; // extractCallData: Invalid op. string constant INVALID_EXTRACTOR_OP = "E31"; // extractCallData: Invalid array index. string constant INVALID_ARRAY_INDEX = "E32"; // extractCallData: No extract op. string constant NO_EXTRACT_OP = "E33"; // extractCallData: No extract path. string constant NO_EXTRACT_PATH = "E34"; // BaseOwnable: caller is not owner string constant CALLER_IS_NOT_OWNER = "E35"; // BaseOwnable: Already initialized string constant ALREADY_INITIALIZED = "E36"; // "E37"; // "E38"; // BaseACL: ACL check method should not return anything. string constant ACL_FUNC_RETURNS_NON_EMPTY = "E39"; // "E40"; // BaseAccount: Invalid delegate. string constant INVALID_DELEGATE = "E41"; // RootAuthorizer: delegateCallAuthorizer not set string constant DELEGATE_CALL_AUTH_NOT_SET = "E42"; // RootAuthorizer: callAuthorizer not set. string constant CALL_AUTH_NOT_SET = "E43"; // BaseAccount: Authorizer not set. string constant AUTHORIZER_NOT_SET = "E44"; // BaseAccount: Invalid authorizer flag. string constant INVALID_AUTHORIZER_FLAG = "E45"; // BaseAuthorizer: Authorizer paused. string constant AUTHORIZER_PAUSED = "E46"; // Authorizer set: Invalid hint. string constant INVALID_HINT = "E47"; // Authorizer set: All auth deny. string constant ALL_AUTH_FAILED = "E48"; // BaseACL: Method not allow. string constant METHOD_NOT_ALLOW = "E49"; // AuthorizerUnionSet: Invalid hint collected. string constant INVALID_HINT_COLLECTED = "E50"; // AuthorizerSet: Empty auth set string constant EMPTY_AUTH_SET = "E51"; // AuthorizerSet: hint not implement. string constant HINT_NOT_IMPLEMENT = "E52"; // RoleAuthorizer: Empty role set string constant EMPTY_ROLE_SET = "E53"; // RoleAuthorizer: No auth for the role string constant NO_AUTH_FOR_THE_ROLE = "E54"; // BaseACL: No in contract white list. string constant NOT_IN_CONTRACT_LIST = "E55"; // BaseACL: Same process not allowed to install twice. string constant SAME_PROCESS_TWICE = "E56"; // BaseAuthorizer: Account not set (then can not find roleManger) string constant ACCOUNT_NOT_SET = "E57"; // BaseAuthorizer: roleManger not set string constant ROLE_MANAGER_NOT_SET = "E58"; }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "../src/Types.sol"; interface IAuthorizer { function flag() external view returns (uint256 authFlags); function setCaller(address _caller) external; function preExecCheck(TransactionData calldata transaction) external returns (AuthorizerReturnData memory authData); function postExecCheck( TransactionData calldata transaction, TransactionResult calldata callResult, AuthorizerReturnData calldata preAuthData ) external returns (AuthorizerReturnData memory authData); function preExecProcess(TransactionData calldata transaction) external; function postExecProcess(TransactionData calldata transaction, TransactionResult calldata callResult) external; } interface IAuthorizerSupportingHint is IAuthorizer { // When IAuthorizer(auth).flag().supportHint() == true; function collectHint( AuthorizerReturnData calldata preAuthData, AuthorizerReturnData calldata postAuthData ) external view returns (bytes memory hint); }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "../src/Types.sol"; interface IAccount { function execTransaction(CallData calldata callData) external returns (TransactionResult memory result); function execTransactions( CallData[] calldata callDataList ) external returns (TransactionResult[] memory resultList); function setAuthorizer(address _authorizer) external; function setRoleManager(address _roleManager) external; function addDelegate(address _delegate) external; function addDelegates(address[] calldata _delegates) external; /// @dev Sub instance should override this to set `from` for transaction /// @return account The address for the contract wallet, also the /// `msg.sender` address which send the transaction. function getAccountAddress() external view returns (address account); function roleManager() external view returns (address _roleManager); function authorizer() external view returns (address _authorizer); }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "../src/Types.sol"; interface IRoleManager { function getRoles(address delegate) external view returns (bytes32[] memory); function hasRole(address delegate, bytes32 role) external view returns (bool); } interface IFlatRoleManager is IRoleManager { function addRoles(bytes32[] calldata roles) external; function grantRoles(bytes32[] calldata roles, address[] calldata delegates) external; function revokeRoles(bytes32[] calldata roles, address[] calldata delegates) external; function getDelegates() external view returns (address[] memory); function getAllRoles() external view returns (bytes32[] memory); }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; import "../../interfaces/IVersion.sol"; /// @title BaseVersion - Provides version information /// @author Cobo Safe Dev Team https://www.cobo.com/ /// @dev /// Implement NAME() and VERSION() methods according to IVersion interface. /// /// Or just: /// bytes32 public constant NAME = "<Your contract name>"; /// uint256 public constant VERSION = <Your contract version>; /// /// Change the NAME when writing new kind of contract. /// Change the VERSION when upgrading existing contract. abstract contract BaseVersion is IVersion { /// @dev Convert to `string` which looks prettier on Etherscan viewer. function _NAME() external view virtual returns (string memory) { return string(abi.encodePacked(this.NAME())); } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; struct CallData { uint256 flag; // 0x1 delegate call, 0x0 call. address to; uint256 value; bytes data; // calldata bytes hint; bytes extra; // for future support: signatures etc. } struct TransactionData { address from; // `msg.sender` who performs the transaction a.k.a wallet address. address delegate; // Delegate who calls executeTransactions(). // Same as CallData uint256 flag; // 0x1 delegate call, 0x0 call. address to; uint256 value; bytes data; // calldata bytes hint; bytes extra; } /// @dev Use enum instead of bool in case of when other status, like PENDING, /// is needed in the future. enum AuthResult { FAILED, SUCCESS } struct AuthorizerReturnData { AuthResult result; string message; bytes data; // Authorizer return data. usually used for hint purpose. } struct TransactionResult { bool success; // Call status. bytes data; // Return/Revert data. bytes hint; } library TxFlags { uint256 internal constant DELEGATE_CALL_MASK = 0x1; // 1 for delegatecall, 0 for call uint256 internal constant ALLOW_REVERT_MASK = 0x2; // 1 for allow, 0 for not function isDelegateCall(uint256 flag) internal pure returns (bool) { return flag & DELEGATE_CALL_MASK > 0; } function allowsRevert(uint256 flag) internal pure returns (bool) { return flag & ALLOW_REVERT_MASK > 0; } } library AuthType { bytes32 internal constant FUNC = "FunctionType"; bytes32 internal constant TRANSFER = "TransferType"; bytes32 internal constant DEX = "DexType"; bytes32 internal constant LENDING = "LendingType"; bytes32 internal constant COMMON = "CommonType"; bytes32 internal constant SET = "SetType"; bytes32 internal constant VM = "VM"; } library AuthFlags { uint256 internal constant HAS_PRE_CHECK_MASK = 0x1; uint256 internal constant HAS_POST_CHECK_MASK = 0x2; uint256 internal constant HAS_PRE_PROC_MASK = 0x4; uint256 internal constant HAS_POST_PROC_MASK = 0x8; uint256 internal constant SUPPORT_HINT_MASK = 0x40; uint256 internal constant FULL_MODE = HAS_PRE_CHECK_MASK | HAS_POST_CHECK_MASK | HAS_PRE_PROC_MASK | HAS_POST_PROC_MASK; function isValid(uint256 flag) internal pure returns (bool) { // At least one check handler is activated. return hasPreCheck(flag) || hasPostCheck(flag); } function hasPreCheck(uint256 flag) internal pure returns (bool) { return flag & HAS_PRE_CHECK_MASK > 0; } function hasPostCheck(uint256 flag) internal pure returns (bool) { return flag & HAS_POST_CHECK_MASK > 0; } function hasPreProcess(uint256 flag) internal pure returns (bool) { return flag & HAS_PRE_PROC_MASK > 0; } function hasPostProcess(uint256 flag) internal pure returns (bool) { return flag & HAS_POST_PROC_MASK > 0; } function supportHint(uint256 flag) internal pure returns (bool) { return flag & SUPPORT_HINT_MASK > 0; } } // For Rule VM. // For each VariantType, an extractor should be implement. enum VariantType { INVALID, // Mark for delete. EXTRACT_CALLDATA, // extract calldata by path bytes. NAME, // name for user-defined variant. RAW, // encoded solidity values. VIEW, // staticcall view non-side-effect function and get return value. CALL, // call state changing function and get returned value. RULE, // rule expression. ANY } // How the data should be decoded. enum SolidityType { _invalid, // Mark for delete. _any, _bytes, _bool, ///// START 1 ///// Generated by gen_rulelib.py (start) _address, _uint256, _int256, ///// Generated by gen_rulelib.py (end) ///// END 1 _end } // A common operand in rule. struct Variant { VariantType varType; SolidityType solType; bytes data; } library VarName { bytes5 internal constant TEMP = "temp."; function isTemp(bytes32 name) internal pure returns (bool) { return bytes5(name) == TEMP; } } // OpCode for rule expression which returns v0. enum OP { INVALID, // One opnd. VAR, // v1 NOT, // !v1 // Two opnds. // checkBySolType() which returns boolean. EQ, // v1 == v2 NE, // v1 != v2 GT, // v1 > v2 GE, // v1 >= v2 LT, // v1 < v2 LE, // v1 <= v2 IN, // v1 in [...] NOTIN, // v1 not in [...] // computeBySolType() which returns bytes (with same solType) AND, // v1 & v2 OR, // v1 | v2 ADD, // v1 + v2 SUB, // v1 - v2 MUL, // v1 * v2 DIV, // v1 / v2 MOD, // v1 % v2 // Three opnds. IF, // v1? v2: v3 // Side-effect ones. ASSIGN, // v1 := v2 VM, // rule list bytes. NOP // as end. } struct Rule { OP op; Variant[] vars; }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.19; interface IVersion { function NAME() external view returns (bytes32 name); function VERSION() external view returns (uint256 version); }
{ "remappings": [ "@openzeppelin/=lib/openzeppelin-contracts/", "forge-std/=lib/forge-std/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_caller","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"AccountSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_poolAddress","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"AddPoolAddressWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_poolId","type":"uint256"},{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"AddPoolIdWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"CallerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"NewOwnerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"PausedSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"PendingOwnerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_poolAddress","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"RemovePoolAddressWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_poolId","type":"uint256"},{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"RemovePoolIdWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"tag","type":"bytes32"}],"name":"TagSet","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROUTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TYPE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"account","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_poolAddresses","type":"address[]"}],"name":"addPoolAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_poolIds","type":"uint256[]"}],"name":"addPoolIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"caller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contracts","outputs":[{"internalType":"address[]","name":"_contracts","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum ISiloRouter.ActionType","name":"actionType","type":"uint8"},{"internalType":"address","name":"silo","type":"address"},{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"bytes","name":"options","type":"bytes"}],"internalType":"struct ISiloRouter.Action[]","name":"actions","type":"tuple[]"}],"name":"execute","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flag","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolAddressWhiteList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolIdWhiteList","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_caller","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_caller","type":"address"},{"internalType":"address","name":"_account","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"uint256","name":"flag","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"hint","type":"bytes"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct TransactionData","name":"transaction","type":"tuple"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"hint","type":"bytes"}],"internalType":"struct TransactionResult","name":"callResult","type":"tuple"},{"components":[{"internalType":"enum AuthResult","name":"result","type":"uint8"},{"internalType":"string","name":"message","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct AuthorizerReturnData","name":"preData","type":"tuple"}],"name":"postExecCheck","outputs":[{"components":[{"internalType":"enum AuthResult","name":"result","type":"uint8"},{"internalType":"string","name":"message","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct AuthorizerReturnData","name":"authData","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"uint256","name":"flag","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"hint","type":"bytes"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct TransactionData","name":"transaction","type":"tuple"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"hint","type":"bytes"}],"internalType":"struct TransactionResult","name":"callResult","type":"tuple"}],"name":"postExecProcess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"uint256","name":"flag","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"hint","type":"bytes"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct TransactionData","name":"transaction","type":"tuple"}],"name":"preExecCheck","outputs":[{"components":[{"internalType":"enum AuthResult","name":"result","type":"uint8"},{"internalType":"string","name":"message","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct AuthorizerReturnData","name":"authData","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"uint256","name":"flag","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"hint","type":"bytes"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct TransactionData","name":"transaction","type":"tuple"}],"name":"preExecProcess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"redeem","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_poolAddresses","type":"address[]"}],"name":"removePoolAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_poolIds","type":"uint256[]"}],"name":"removePoolIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assetAmount","type":"uint256"},{"internalType":"address","name":"_borrower","type":"address"}],"name":"repay","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"setAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_caller","type":"address"}],"name":"setCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"setPendingOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tag","type":"bytes32"}],"name":"setTag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tag","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a03461010d57601f611f9338819003918201601f19168301916001600160401b0383118484101761011157808492604094855283398101031261010d57610052602061004b83610125565b9201610125565b6001545f80546001600160a01b0319166001600160a01b03909416938417815560405193907f038720101b9ced74445432ced46c7e5e4c80202669153dd67d226c66a0aa477b9080a26001600160b01b031916600160a01b176001555f600255600380546001600160a01b0319166001600160a01b03929092169190911790557322aacdec57b13911de9f188cf69633cc537bdb76608052611e59908161013a82396080518181816105d501528181610e5101526113170152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b038216820361010d5756fe60806040526004361015610019575b341561156d575b5f80fd5b5f3560e01c806308dbebf61461027a57806316c38b3c146102755780631fd6d9591461027057806329f6d57c1461026b5780632e2d29841461020c57806332fe7b26146102665780633e92ef78146102615780633ff7916c1461025c578063485cc9551461025757806351f91066146102525780635b72ec831461024d5780635c975abb146102485780635cb81a0d146102435780635dab24201461023e5780636c0f79b614610239578063715018a6146102345780637a796db41461022f5780637c4c833b1461022a578063890eba68146101cb5780638da5cb5b146102255780639d5228e814610220578063a3f4df7e1461021b578063acb7081514610216578063b460af941461020c578063b695e2ef14610211578063ba0876521461020c578063bb24fe8a14610207578063beb92f5514610202578063c0c53b8b146101fd578063c3cd3eda146101f8578063c42069ec146101f3578063c4d66de8146101ee578063d58c3fc3146101e9578063e30c3978146101e4578063ebbc4965146101df578063f2660027146101da578063f2fde38b146101d5578063fc9c8d39146101d05763ffa1ad740361000e575b610b00565b6110db565b611056565b610fe3565b610fb6565b610f8e565b610f80565b610f31565b610eb8565b610e29565b610dab565b610cfa565b610cd2565b610589565b610c7c565b610c5c565b610c30565b610b9f565b610b1b565b610aa7565b6109de565b61096e565b610953565b61092b565b61089f565b61087a565b6107fa565b61079b565b610769565b6106bd565b61063d565b6105c0565b6104d7565b61042d565b61035f565b6102b7565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9060206102b492818152019061027f565b90565b34610015575f366003190112610015576040516351fa6fbf60e11b8152602081600481305afa90811561035a575f91610326575b610322610308610316846040519283916020830160209181520190565b03601f198101835282611117565b604051918291826102a3565b0390f35b90506020813d602011610352575b8161034160209383611117565b8101031261001557516103086102eb565b3d9150610334565b61113d565b3461001557602036600319011261001557600435801515809103610015575f5461039c906001600160a01b0316610394611173565b903314611194565b6001805460ff60a81b191660a883901b60ff60a81b161790557f40db37ff5c0bdc2c427fbb2078c8f24afea940abac0e3c23bb4ea3bf2da2b2125f80a2005b906020600319830112610015576004356001600160401b0381116100155760040182601f82011215610015578035926001600160401b038411610015576020808301928560051b010111610015579190565b346100155761043b366103db565b5f54909190610455906001600160a01b0316610394611173565b5f5b82811061046057005b8061047761047160019386866111d8565b35611871565b610482575b01610457565b61048d8185856111d8565b3533907facdd6aba368bd3361860dcb4f5e9def4d6935ce550436e3ce90ee6cdd5910f795f80a361047c565b6001600160a01b0381160361001557565b35906104d5826104b9565b565b34610015576020366003190112610015576004356104f4816104b9565b5f5461050b906001600160a01b0316610394611173565b6001600160a01b0316801561055257600480546001600160a01b031916821790557f195359283029fbdb9a24519b1ec07caf1677655529bf99dc1634c1e8b28811805f80a2005b60405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081858d8dbdd5b9d608a1b6044820152606490fd5b34610015576060366003190112610015576105be6024356105a9816104b9565b6105b9604435916105b9836104b9565b6115ad565b005b34610015575f366003190112610015576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b60206040818301928281528451809452019201905f5b8181106106275750505090565b825184526020938401939092019160010161061a565b34610015575f3660031901126100155760405180602060055491828152019060055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0905f5b8181106106a7576103228561069b81870382611117565b60405191829182610604565b8254845260209093019260019283019201610684565b34610015576106cb366103db565b5f549091906106e5906001600160a01b0316610394611173565b5f5b8281106106f057005b8061071761070160019386866111d8565b3561070b816104b9565b838060a01b0316611ae8565b610722575b016106e7565b61072d8185856111d8565b35610737816104b9565b3390838060a01b03167f5c67bd19bae53975fd875da73cc5116c5040fd57ba2771340ad6b5ff18e12f0b5f80a361071c565b34610015576040366003190112610015576105be600435610789816104b9565b60243590610796826104b9565b6111ed565b34610015575f366003190112610015576020600254604051908152f35b60206040818301928281528451809452019201905f5b8181106107db5750505090565b82516001600160a01b03168452602093840193909201916001016107ce565b34610015575f3660031901126100155760405180602060075491828152019060075f527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688905f5b818110610864576103228561085881870382611117565b604051918291826107b8565b8254845260209093019260019283019201610841565b34610015575f36600319011261001557602060ff60015460a81c166040519015158152f35b34610015576108ad366103db565b5f549091906108c7906001600160a01b0316610394611173565b5f5b8281106108d257005b806108e96108e360019386866111d8565b35611b89565b6108f4575b016108c9565b6108ff8185856111d8565b3533907f4317a31e7a2d9600dfde2005ba8c5dfd4c0849b8772a28891ea543fc997ed4355f80a36108ee565b34610015575f366003190112610015576004546040516001600160a01b039091168152602090f35b34610015575f366003190112610015576103226108586112da565b34610015575f366003190112610015575f54610995906001600160a01b0316610394611173565b6001600160601b0360a01b5f54165f556001600160601b0360a01b600154166001555f7f038720101b9ced74445432ced46c7e5e4c80202669153dd67d226c66a0aa477b8180a2005b34610015576109ec366103db565b5f54909190610a06906001600160a01b0316610394611173565b5f5b828110610a1157005b80610a38610a2260019386866111d8565b35610a2c816104b9565b838060a01b03166118e6565b610a43575b01610a08565b610a4e8185856111d8565b35610a58816104b9565b3390838060a01b03167f9dba6d66383f9ab187c7e2a59620f98f7b46fd0060f7b905ed1ddc6370ce0ca95f80a3610a3d565b90816101009103126100155790565b908160609103126100155790565b34610015576040366003190112610015576004356001600160401b03811161001557610ad7903690600401610a8a565b506024356001600160401b03811161001557610af7903690600401610a99565b506105be611452565b34610015575f36600319011261001557602060405160018152f35b34610015575f366003190112610015575f546040516001600160a01b039091168152602090f35b90602082528051916002831015610b8b576102b49260208201526040610b766020840151606083850152608084019061027f565b920151906060601f198285030191015261027f565b634e487b7160e01b5f52602160045260245ffd5b34610015576060366003190112610015576004356001600160401b03811161001557610bcf903690600401610a8a565b6024356001600160401b03811161001557610bee903690600401610a99565b90604435906001600160401b0382116100155761032292610c16610c24933690600401610a99565b91610c1f61146a565b611499565b60405191829182610b42565b34610015575f366003190112610015576040516d29b4b637a0baba3437b934bd32b960911b8152602090f35b34610015576040366003190112610015576105be6024356105b9816104b9565b34610015576020366003190112610015575f5460043590610ca8906001600160a01b0316610394611173565b806002557fef711e3eb06966d227e22eb4fa0302550dcd7257cf69b537cf4d37af53ea9cda5f80a2005b34610015575f3660031901126100155760405169436f6d6d6f6e5479706560b01b8152602090f35b3461001557602036600319011261001557600435610d17816104b9565b5f54610d2e906001600160a01b0316610394611173565b6001600160a01b03168015610d7557600380546001600160a01b031916821790557fac431eb831269b53b41991f6cbfbfc93f4baa395996a8170abac93962b5a358e5f80a2005b60405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b0b63632b960911b6044820152606490fd5b3461001557606036600319011261001557600435610dc8816104b9565b610de4602435610dd7816104b9565b60443592610796846104b9565b600480546001600160a01b0319166001600160a01b039290921691821790557f195359283029fbdb9a24519b1ec07caf1677655529bf99dc1634c1e8b28811805f80a2005b3461001557610e37366103db565b506001600160a01b0390506060610e4c6119a3565b0151167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031603610e8057005b60405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a590818dbdb9d1c9858dd60821b6044820152606490fd5b3461001557602036600319011261001557600435610ed5816104b9565b5f54610eec906001600160a01b0316610394611173565b600180546001600160a01b0319166001600160a01b039290921691821790557f68f49b346b94582a8b5f9d10e3fe3365318fe8f191ff8dce7c59c6cad06b02f55f80a2005b34610015576020366003190112610015576105be600435610f51816104b9565b611507565b602060031982011261001557600435906001600160401b038211610015576102b491600401610a8a565b3461001557610af736610f56565b34610015575f366003190112610015576001546040516001600160a01b039091168152602090f35b34610015575f366003190112610015576001546001600160a01b031633819003610015576105be9061160a565b3461001557610322610ff436610f56565b610ffc61146a565b61101a60018060a01b03600354163314611014611431565b90611194565b9060ff60015460a81c165f1461104757505f81526110366114e6565b602082015260405191829182610b42565b611051915061168b565b610c24565b3461001557602036600319011261001557600435611073816104b9565b5f5461108a906001600160a01b0316610394611173565b6001600160a01b038116156110a2576105be9061160a565b60405162461bcd60e51b81526020600482015260116024820152704e6577204f776e6572206973207a65726f60781b6044820152606490fd5b34610015575f366003190112610015576003546040516001600160a01b039091168152602090f35b634e487b7160e01b5f52604160045260245ffd5b90601f801991011681019081106001600160401b0382111761113857604052565b611103565b6040513d5f823e3d90fd5b604051906104d561010083611117565b6001600160401b03811161113857601f01601f191660200190565b60405190611182604083611117565b600382526245333560e81b6020830152565b1561119c5750565b60405162461bcd60e51b8152602060048201529081906111c090602483019061027f565b0390fd5b634e487b7160e01b5f52603260045260245ffd5b91908110156111e85760051b0190565b6111c4565b6111f690611507565b600380546001600160a01b0319166001600160a01b039290921691821790557fac431eb831269b53b41991f6cbfbfc93f4baa395996a8170abac93962b5a358e5f80a2565b6001600160401b0381116111385760051b60200190565b634e487b7160e01b5f52601160045260245ffd5b600101908160011161127457565b611252565b906001820180921161127457565b906112918261123b565b61129e6040519182611117565b82815280926112af601f199161123b565b0190602036910137565b8051156111e85760200190565b80518210156111e85760209160051b010190565b604051635b72ec8360e01b8152905f82600481305afa91821561035a575f92611395575b5061131161130c8351611266565b611287565b9161134e7f000000000000000000000000000000000000000000000000000000000000000061133f856112b9565b6001600160a01b039091169052565b5f5b8151811015611391578061138b61137961136c600194866112c6565b516001600160a01b031690565b61133f61138584611279565b886112c6565b01611350565b5050565b9091503d805f833e6113a78183611117565b810190602081830312610015578051906001600160401b03821161001557019080601f830112156100155781516113dd8161123b565b926113eb6040519485611117565b81845260208085019260051b82010192831161001557602001905b82821061141757505050905f6112fe565b602080918351611426816104b9565b815201910190611406565b60405190611440604083611117565b600382526245323760e81b6020830152565b6104d560018060a01b03600354163314611014611431565b60405190606082018281106001600160401b038211176111385760405260606040835f81528260208201520152565b925050506114b560018060a01b03600354163314611014611431565b60015460a81c60ff16156114d6575f81526114ce6114e6565b602082015290565b506114df61146a565b6001815290565b604051906114f5604083611117565b6003825262229a1b60e91b6020830152565b60ff60015460a01c166115325761151d9061160a565b6001805460ff60a01b1916600160a01b179055565b60405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606490fd5b6111c060405161157e604082611117565b600381526245343960e81b602082015260405191829162461bcd60e51b8352602060048401818152019061027f565b6001600160a01b036115bd6119a3565b51166001600160a01b03909116036115d157565b60405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a59081c9958da5c1a595b9d607a1b6044820152606490fd5b60018060a01b0316806001600160601b0360a01b5f5416175f556001600160601b0360a01b600154166001557f038720101b9ced74445432ced46c7e5e4c80202669153dd67d226c66a0aa477b5f80a2565b3d15611686573d9061166d82611158565b9161167b6040519384611117565b82523d5f602084013e565b606090565b61169361146a565b61169c82611c0e565b1561181457505f806117fb6117fb6118016102b4956103086117d36117e6604051936020808601526116e1604086016116d4836104ca565b6001600160a01b03169052565b6117006116f0602083016104ca565b6001600160a01b03166060870152565b60408101356080860152611729611719606083016104ca565b6001600160a01b031660a0870152565b608081013560c086015260a08101906117b0866117a261178261176261174f8787611c69565b61010060e0870152610140860191611c9a565b61176f60c0870187611c69565b858303603f190161010087015290611c9a565b61178f60e0860186611c69565b848303603f190161012086015290611c9a565b03601f198101885287611117565b6117e16117bd8383611cba565b9050604051958691602083019190602083019252565b03601f198101865285611117565b611cba565b96909360405196879560208701998a91611cec565b90611cf9565b5190305afa61180e61165c565b90611d2c565b90505f8152604051611827604082611117565b600381526245353560e81b6020820152602082015290565b80548210156111e8575f5260205f2001905f90565b9161186d9183549060031b91821b915f19901b19161790565b9055565b805f52600660205260405f2054155f146118e157600554600160401b81101561113857600181016005556005548110156111e8577f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0018190556005545f9182526006602052604090912055600190565b505f90565b805f52600860205260405f2054155f146118e157600754600160401b81101561113857600181016007556007548110156111e8577fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018190556007545f9182526008602052604090912055600190565b6040519061010082018281106001600160401b0382111761113857604052606060e0835f81525f60208201525f60408201525f838201525f60808201528260a08201528260c08201520152565b6119ab611956565b506119b4611956565b50601f193601368111611274573536811161001557803603810190602081830312610015578035906001600160401b038211610015570161010081830312610015576119fe611148565b91611a08826104ca565b8352611a16602083016104ca565b602084015260408201356040840152611a31606083016104ca565b60608401526080820135608084015260a08201356001600160401b0381116100155781611a5f918401611ddd565b60a084015260c08201356001600160401b0381116100155781611a83918401611ddd565b60c084015260e08201356001600160401b03811161001557611aa59201611ddd565b60e082015290565b80548015611ad4575f190190611ac3828261183f565b8154905f199060031b1b1916905555565b634e487b7160e01b5f52603160045260245ffd5b5f81815260086020526040902054908115611b83575f19820190828211611274576007545f198101939084116112745783835f95611b429503611b48575b505050611b336007611aad565b6008905f5260205260405f2090565b55600190565b611b33611b7491611b6a611b60611b7a95600761183f565b90549060031b1c90565b928391600761183f565b90611854565b555f8080611b26565b50505f90565b5f81815260066020526040902054908115611b83575f19820190828211611274576005545f198101939084116112745783835f95611b429503611be3575b505050611bd46005611aad565b6006905f5260205260405f2090565b611bd4611b7491611bfb611b60611c0595600561183f565b928391600561183f565b555f8080611bc7565b60600135611c1b816104b9565b611c236112da565b906001600160a01b03165f5b8251811015611c62576001600160a01b03611c4a82856112c6565b51168214611c5a57600101611c2f565b505050600190565b5050505f90565b9035601e19823603018112156100155701602081359101916001600160401b03821161001557813603831361001557565b908060209392818452848401375f828201840152601f01601f1916010190565b903590601e198136030182121561001557018035906001600160401b0382116100155760200191813603831361001557565b908092918237015f815290565b805191908290602001825e015f815290565b60405190611d1a604083611117565b600382526245333960e81b6020830152565b9190611d3661146a565b9215611d5057611d4a905115611014611d0b565b60018252565b60448151105f14611d62576020830152565b6004810151810160248101919060209082900312610015576024810151906001600160401b03821161001557018160438201121561001557602481015190611da982611158565b92611db76040519485611117565b8284526044828401011161001557815f926044602093018386015e830101526020830152565b81601f8201121561001557803590611df482611158565b92611e026040519485611117565b8284526020838301011161001557815f92602080930183860137830101529056fea26469706673582212202ed7311f81015067646c4d15d37a3f5497e1fd187673a221c09efbe612ed2a9e64736f6c634300081a003300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361015610019575b341561156d575b5f80fd5b5f3560e01c806308dbebf61461027a57806316c38b3c146102755780631fd6d9591461027057806329f6d57c1461026b5780632e2d29841461020c57806332fe7b26146102665780633e92ef78146102615780633ff7916c1461025c578063485cc9551461025757806351f91066146102525780635b72ec831461024d5780635c975abb146102485780635cb81a0d146102435780635dab24201461023e5780636c0f79b614610239578063715018a6146102345780637a796db41461022f5780637c4c833b1461022a578063890eba68146101cb5780638da5cb5b146102255780639d5228e814610220578063a3f4df7e1461021b578063acb7081514610216578063b460af941461020c578063b695e2ef14610211578063ba0876521461020c578063bb24fe8a14610207578063beb92f5514610202578063c0c53b8b146101fd578063c3cd3eda146101f8578063c42069ec146101f3578063c4d66de8146101ee578063d58c3fc3146101e9578063e30c3978146101e4578063ebbc4965146101df578063f2660027146101da578063f2fde38b146101d5578063fc9c8d39146101d05763ffa1ad740361000e575b610b00565b6110db565b611056565b610fe3565b610fb6565b610f8e565b610f80565b610f31565b610eb8565b610e29565b610dab565b610cfa565b610cd2565b610589565b610c7c565b610c5c565b610c30565b610b9f565b610b1b565b610aa7565b6109de565b61096e565b610953565b61092b565b61089f565b61087a565b6107fa565b61079b565b610769565b6106bd565b61063d565b6105c0565b6104d7565b61042d565b61035f565b6102b7565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9060206102b492818152019061027f565b90565b34610015575f366003190112610015576040516351fa6fbf60e11b8152602081600481305afa90811561035a575f91610326575b610322610308610316846040519283916020830160209181520190565b03601f198101835282611117565b604051918291826102a3565b0390f35b90506020813d602011610352575b8161034160209383611117565b8101031261001557516103086102eb565b3d9150610334565b61113d565b3461001557602036600319011261001557600435801515809103610015575f5461039c906001600160a01b0316610394611173565b903314611194565b6001805460ff60a81b191660a883901b60ff60a81b161790557f40db37ff5c0bdc2c427fbb2078c8f24afea940abac0e3c23bb4ea3bf2da2b2125f80a2005b906020600319830112610015576004356001600160401b0381116100155760040182601f82011215610015578035926001600160401b038411610015576020808301928560051b010111610015579190565b346100155761043b366103db565b5f54909190610455906001600160a01b0316610394611173565b5f5b82811061046057005b8061047761047160019386866111d8565b35611871565b610482575b01610457565b61048d8185856111d8565b3533907facdd6aba368bd3361860dcb4f5e9def4d6935ce550436e3ce90ee6cdd5910f795f80a361047c565b6001600160a01b0381160361001557565b35906104d5826104b9565b565b34610015576020366003190112610015576004356104f4816104b9565b5f5461050b906001600160a01b0316610394611173565b6001600160a01b0316801561055257600480546001600160a01b031916821790557f195359283029fbdb9a24519b1ec07caf1677655529bf99dc1634c1e8b28811805f80a2005b60405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081858d8dbdd5b9d608a1b6044820152606490fd5b34610015576060366003190112610015576105be6024356105a9816104b9565b6105b9604435916105b9836104b9565b6115ad565b005b34610015575f366003190112610015576040517f00000000000000000000000022aacdec57b13911de9f188cf69633cc537bdb766001600160a01b03168152602090f35b60206040818301928281528451809452019201905f5b8181106106275750505090565b825184526020938401939092019160010161061a565b34610015575f3660031901126100155760405180602060055491828152019060055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0905f5b8181106106a7576103228561069b81870382611117565b60405191829182610604565b8254845260209093019260019283019201610684565b34610015576106cb366103db565b5f549091906106e5906001600160a01b0316610394611173565b5f5b8281106106f057005b8061071761070160019386866111d8565b3561070b816104b9565b838060a01b0316611ae8565b610722575b016106e7565b61072d8185856111d8565b35610737816104b9565b3390838060a01b03167f5c67bd19bae53975fd875da73cc5116c5040fd57ba2771340ad6b5ff18e12f0b5f80a361071c565b34610015576040366003190112610015576105be600435610789816104b9565b60243590610796826104b9565b6111ed565b34610015575f366003190112610015576020600254604051908152f35b60206040818301928281528451809452019201905f5b8181106107db5750505090565b82516001600160a01b03168452602093840193909201916001016107ce565b34610015575f3660031901126100155760405180602060075491828152019060075f527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688905f5b818110610864576103228561085881870382611117565b604051918291826107b8565b8254845260209093019260019283019201610841565b34610015575f36600319011261001557602060ff60015460a81c166040519015158152f35b34610015576108ad366103db565b5f549091906108c7906001600160a01b0316610394611173565b5f5b8281106108d257005b806108e96108e360019386866111d8565b35611b89565b6108f4575b016108c9565b6108ff8185856111d8565b3533907f4317a31e7a2d9600dfde2005ba8c5dfd4c0849b8772a28891ea543fc997ed4355f80a36108ee565b34610015575f366003190112610015576004546040516001600160a01b039091168152602090f35b34610015575f366003190112610015576103226108586112da565b34610015575f366003190112610015575f54610995906001600160a01b0316610394611173565b6001600160601b0360a01b5f54165f556001600160601b0360a01b600154166001555f7f038720101b9ced74445432ced46c7e5e4c80202669153dd67d226c66a0aa477b8180a2005b34610015576109ec366103db565b5f54909190610a06906001600160a01b0316610394611173565b5f5b828110610a1157005b80610a38610a2260019386866111d8565b35610a2c816104b9565b838060a01b03166118e6565b610a43575b01610a08565b610a4e8185856111d8565b35610a58816104b9565b3390838060a01b03167f9dba6d66383f9ab187c7e2a59620f98f7b46fd0060f7b905ed1ddc6370ce0ca95f80a3610a3d565b90816101009103126100155790565b908160609103126100155790565b34610015576040366003190112610015576004356001600160401b03811161001557610ad7903690600401610a8a565b506024356001600160401b03811161001557610af7903690600401610a99565b506105be611452565b34610015575f36600319011261001557602060405160018152f35b34610015575f366003190112610015575f546040516001600160a01b039091168152602090f35b90602082528051916002831015610b8b576102b49260208201526040610b766020840151606083850152608084019061027f565b920151906060601f198285030191015261027f565b634e487b7160e01b5f52602160045260245ffd5b34610015576060366003190112610015576004356001600160401b03811161001557610bcf903690600401610a8a565b6024356001600160401b03811161001557610bee903690600401610a99565b90604435906001600160401b0382116100155761032292610c16610c24933690600401610a99565b91610c1f61146a565b611499565b60405191829182610b42565b34610015575f366003190112610015576040516d29b4b637a0baba3437b934bd32b960911b8152602090f35b34610015576040366003190112610015576105be6024356105b9816104b9565b34610015576020366003190112610015575f5460043590610ca8906001600160a01b0316610394611173565b806002557fef711e3eb06966d227e22eb4fa0302550dcd7257cf69b537cf4d37af53ea9cda5f80a2005b34610015575f3660031901126100155760405169436f6d6d6f6e5479706560b01b8152602090f35b3461001557602036600319011261001557600435610d17816104b9565b5f54610d2e906001600160a01b0316610394611173565b6001600160a01b03168015610d7557600380546001600160a01b031916821790557fac431eb831269b53b41991f6cbfbfc93f4baa395996a8170abac93962b5a358e5f80a2005b60405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b0b63632b960911b6044820152606490fd5b3461001557606036600319011261001557600435610dc8816104b9565b610de4602435610dd7816104b9565b60443592610796846104b9565b600480546001600160a01b0319166001600160a01b039290921691821790557f195359283029fbdb9a24519b1ec07caf1677655529bf99dc1634c1e8b28811805f80a2005b3461001557610e37366103db565b506001600160a01b0390506060610e4c6119a3565b0151167f00000000000000000000000022aacdec57b13911de9f188cf69633cc537bdb766001600160a01b031603610e8057005b60405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a590818dbdb9d1c9858dd60821b6044820152606490fd5b3461001557602036600319011261001557600435610ed5816104b9565b5f54610eec906001600160a01b0316610394611173565b600180546001600160a01b0319166001600160a01b039290921691821790557f68f49b346b94582a8b5f9d10e3fe3365318fe8f191ff8dce7c59c6cad06b02f55f80a2005b34610015576020366003190112610015576105be600435610f51816104b9565b611507565b602060031982011261001557600435906001600160401b038211610015576102b491600401610a8a565b3461001557610af736610f56565b34610015575f366003190112610015576001546040516001600160a01b039091168152602090f35b34610015575f366003190112610015576001546001600160a01b031633819003610015576105be9061160a565b3461001557610322610ff436610f56565b610ffc61146a565b61101a60018060a01b03600354163314611014611431565b90611194565b9060ff60015460a81c165f1461104757505f81526110366114e6565b602082015260405191829182610b42565b611051915061168b565b610c24565b3461001557602036600319011261001557600435611073816104b9565b5f5461108a906001600160a01b0316610394611173565b6001600160a01b038116156110a2576105be9061160a565b60405162461bcd60e51b81526020600482015260116024820152704e6577204f776e6572206973207a65726f60781b6044820152606490fd5b34610015575f366003190112610015576003546040516001600160a01b039091168152602090f35b634e487b7160e01b5f52604160045260245ffd5b90601f801991011681019081106001600160401b0382111761113857604052565b611103565b6040513d5f823e3d90fd5b604051906104d561010083611117565b6001600160401b03811161113857601f01601f191660200190565b60405190611182604083611117565b600382526245333560e81b6020830152565b1561119c5750565b60405162461bcd60e51b8152602060048201529081906111c090602483019061027f565b0390fd5b634e487b7160e01b5f52603260045260245ffd5b91908110156111e85760051b0190565b6111c4565b6111f690611507565b600380546001600160a01b0319166001600160a01b039290921691821790557fac431eb831269b53b41991f6cbfbfc93f4baa395996a8170abac93962b5a358e5f80a2565b6001600160401b0381116111385760051b60200190565b634e487b7160e01b5f52601160045260245ffd5b600101908160011161127457565b611252565b906001820180921161127457565b906112918261123b565b61129e6040519182611117565b82815280926112af601f199161123b565b0190602036910137565b8051156111e85760200190565b80518210156111e85760209160051b010190565b604051635b72ec8360e01b8152905f82600481305afa91821561035a575f92611395575b5061131161130c8351611266565b611287565b9161134e7f00000000000000000000000022aacdec57b13911de9f188cf69633cc537bdb7661133f856112b9565b6001600160a01b039091169052565b5f5b8151811015611391578061138b61137961136c600194866112c6565b516001600160a01b031690565b61133f61138584611279565b886112c6565b01611350565b5050565b9091503d805f833e6113a78183611117565b810190602081830312610015578051906001600160401b03821161001557019080601f830112156100155781516113dd8161123b565b926113eb6040519485611117565b81845260208085019260051b82010192831161001557602001905b82821061141757505050905f6112fe565b602080918351611426816104b9565b815201910190611406565b60405190611440604083611117565b600382526245323760e81b6020830152565b6104d560018060a01b03600354163314611014611431565b60405190606082018281106001600160401b038211176111385760405260606040835f81528260208201520152565b925050506114b560018060a01b03600354163314611014611431565b60015460a81c60ff16156114d6575f81526114ce6114e6565b602082015290565b506114df61146a565b6001815290565b604051906114f5604083611117565b6003825262229a1b60e91b6020830152565b60ff60015460a01c166115325761151d9061160a565b6001805460ff60a01b1916600160a01b179055565b60405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606490fd5b6111c060405161157e604082611117565b600381526245343960e81b602082015260405191829162461bcd60e51b8352602060048401818152019061027f565b6001600160a01b036115bd6119a3565b51166001600160a01b03909116036115d157565b60405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a59081c9958da5c1a595b9d607a1b6044820152606490fd5b60018060a01b0316806001600160601b0360a01b5f5416175f556001600160601b0360a01b600154166001557f038720101b9ced74445432ced46c7e5e4c80202669153dd67d226c66a0aa477b5f80a2565b3d15611686573d9061166d82611158565b9161167b6040519384611117565b82523d5f602084013e565b606090565b61169361146a565b61169c82611c0e565b1561181457505f806117fb6117fb6118016102b4956103086117d36117e6604051936020808601526116e1604086016116d4836104ca565b6001600160a01b03169052565b6117006116f0602083016104ca565b6001600160a01b03166060870152565b60408101356080860152611729611719606083016104ca565b6001600160a01b031660a0870152565b608081013560c086015260a08101906117b0866117a261178261176261174f8787611c69565b61010060e0870152610140860191611c9a565b61176f60c0870187611c69565b858303603f190161010087015290611c9a565b61178f60e0860186611c69565b848303603f190161012086015290611c9a565b03601f198101885287611117565b6117e16117bd8383611cba565b9050604051958691602083019190602083019252565b03601f198101865285611117565b611cba565b96909360405196879560208701998a91611cec565b90611cf9565b5190305afa61180e61165c565b90611d2c565b90505f8152604051611827604082611117565b600381526245353560e81b6020820152602082015290565b80548210156111e8575f5260205f2001905f90565b9161186d9183549060031b91821b915f19901b19161790565b9055565b805f52600660205260405f2054155f146118e157600554600160401b81101561113857600181016005556005548110156111e8577f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0018190556005545f9182526006602052604090912055600190565b505f90565b805f52600860205260405f2054155f146118e157600754600160401b81101561113857600181016007556007548110156111e8577fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018190556007545f9182526008602052604090912055600190565b6040519061010082018281106001600160401b0382111761113857604052606060e0835f81525f60208201525f60408201525f838201525f60808201528260a08201528260c08201520152565b6119ab611956565b506119b4611956565b50601f193601368111611274573536811161001557803603810190602081830312610015578035906001600160401b038211610015570161010081830312610015576119fe611148565b91611a08826104ca565b8352611a16602083016104ca565b602084015260408201356040840152611a31606083016104ca565b60608401526080820135608084015260a08201356001600160401b0381116100155781611a5f918401611ddd565b60a084015260c08201356001600160401b0381116100155781611a83918401611ddd565b60c084015260e08201356001600160401b03811161001557611aa59201611ddd565b60e082015290565b80548015611ad4575f190190611ac3828261183f565b8154905f199060031b1b1916905555565b634e487b7160e01b5f52603160045260245ffd5b5f81815260086020526040902054908115611b83575f19820190828211611274576007545f198101939084116112745783835f95611b429503611b48575b505050611b336007611aad565b6008905f5260205260405f2090565b55600190565b611b33611b7491611b6a611b60611b7a95600761183f565b90549060031b1c90565b928391600761183f565b90611854565b555f8080611b26565b50505f90565b5f81815260066020526040902054908115611b83575f19820190828211611274576005545f198101939084116112745783835f95611b429503611be3575b505050611bd46005611aad565b6006905f5260205260405f2090565b611bd4611b7491611bfb611b60611c0595600561183f565b928391600561183f565b555f8080611bc7565b60600135611c1b816104b9565b611c236112da565b906001600160a01b03165f5b8251811015611c62576001600160a01b03611c4a82856112c6565b51168214611c5a57600101611c2f565b505050600190565b5050505f90565b9035601e19823603018112156100155701602081359101916001600160401b03821161001557813603831361001557565b908060209392818452848401375f828201840152601f01601f1916010190565b903590601e198136030182121561001557018035906001600160401b0382116100155760200191813603831361001557565b908092918237015f815290565b805191908290602001825e015f815290565b60405190611d1a604083611117565b600382526245333960e81b6020830152565b9190611d3661146a565b9215611d5057611d4a905115611014611d0b565b60018252565b60448151105f14611d62576020830152565b6004810151810160248101919060209082900312610015576024810151906001600160401b03821161001557018160438201121561001557602481015190611da982611158565b92611db76040519485611117565b8284526044828401011161001557815f926044602093018386015e830101526020830152565b81601f8201121561001557803590611df482611158565b92611e026040519485611117565b8284526020838301011161001557815f92602080930183860137830101529056fea26469706673582212202ed7311f81015067646c4d15d37a3f5497e1fd187673a221c09efbe612ed2a9e64736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0x0000000000000000000000000000000000000000
Arg [1] : _caller (address): 0x0000000000000000000000000000000000000000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.