Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17148254 | 7 days ago | 3.5 S | ||||
17148254 | 7 days ago | Contract Creation | 0 S | |||
17148254 | 7 days ago | 3.5 S | ||||
16907264 | 8 days ago | 3.5 S | ||||
16907264 | 8 days ago | Contract Creation | 0 S | |||
16907264 | 8 days ago | 3.5 S | ||||
16784234 | 9 days ago | 3.5 S | ||||
16784234 | 9 days ago | Contract Creation | 0 S | |||
16784234 | 9 days ago | 3.5 S | ||||
16783384 | 9 days ago | 3.5 S | ||||
16783384 | 9 days ago | Contract Creation | 0 S | |||
16783384 | 9 days ago | 3.5 S | ||||
16755861 | 9 days ago | 3.5 S | ||||
16755861 | 9 days ago | Contract Creation | 0 S | |||
16755861 | 9 days ago | 3.5 S | ||||
16753917 | 9 days ago | 3.5 S | ||||
16753917 | 9 days ago | Contract Creation | 0 S | |||
16753917 | 9 days ago | 3.5 S | ||||
16694672 | 9 days ago | 3.5 S | ||||
16694672 | 9 days ago | Contract Creation | 0 S | |||
16694672 | 9 days ago | 3.5 S | ||||
16670488 | 9 days ago | 3.5 S | ||||
16670488 | 9 days ago | Contract Creation | 0 S | |||
16670488 | 9 days ago | 3.5 S | ||||
16669938 | 9 days ago | 3.5 S |
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 Source Code Verified (Exact Match)
Contract Name:
SiloCreator
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "./SiloV2.sol"; // solhint-disable not-rely-on-time // solhint-disable no-empty-blocks contract SiloCreator { address public immutable factory; address public immutable automate; constructor(address _factory, address payable _automate) { factory = _factory; automate = _automate; } function createSilo( bytes memory inputData ) public payable returns (address) { require(msg.sender == factory, "not factory"); (uint256 siloID, uint256 _main) = abi.decode( inputData, (uint256, uint256) ); SiloV2 _silo = new SiloV2(siloID, _main, factory, automate); _silo.createTask{value: msg.value}(); return address(_silo); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.14; import "./Types.sol"; abstract contract AutomateModuleHelper { function _resolverModuleArg( address _resolverAddress, bytes memory _resolverData ) internal pure returns (bytes memory) { return abi.encode(_resolverAddress, _resolverData); } function _proxyModuleArg() internal pure returns (bytes memory) { return bytes(""); } function _singleExecModuleArg() internal pure returns (bytes memory) { return bytes(""); } function _web3FunctionModuleArg( string memory _web3FunctionHash, bytes memory _web3FunctionArgsHex ) internal pure returns (bytes memory) { return abi.encode(_web3FunctionHash, _web3FunctionArgsHex); } function _timeTriggerModuleArg(uint128 _start, uint128 _interval) internal pure returns (bytes memory) { bytes memory triggerConfig = abi.encode(_start, _interval); return abi.encode(TriggerType.TIME, triggerConfig); } function _cronTriggerModuleArg(string memory _expression) internal pure returns (bytes memory) { bytes memory triggerConfig = abi.encode(_expression); return abi.encode(TriggerType.CRON, triggerConfig); } function _eventTriggerModuleArg( address _address, bytes32[][] memory _topics, uint256 _blockConfirmations ) internal pure returns (bytes memory) { bytes memory triggerConfig = abi.encode( _address, _topics, _blockConfirmations ); return abi.encode(TriggerType.EVENT, triggerConfig); } function _blockTriggerModuleArg() internal pure returns (bytes memory) { bytes memory triggerConfig = abi.encode(bytes("")); return abi.encode(TriggerType.BLOCK, triggerConfig); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.14; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./Types.sol"; /** * @dev Inherit this contract to allow your smart contract to * - Make synchronous fee payments. * - Have call restrictions for functions to be automated. */ // solhint-disable private-vars-leading-underscore abstract contract AutomateReady { IAutomate public immutable automate; address public immutable dedicatedMsgSender; address private immutable feeCollector; address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /** * @dev * Only tasks created by _taskCreator defined in constructor can call * the functions with this modifier. */ modifier onlyDedicatedMsgSender() { require(msg.sender == dedicatedMsgSender, "Only dedicated msg.sender"); _; } /** * @dev * _taskCreator is the address which will create tasks for this contract. */ constructor(address _automate, address _taskCreator) { automate = IAutomate(_automate); IGelato gelato = IGelato(IAutomate(_automate).gelato()); feeCollector = gelato.feeCollector(); address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses( Module.PROXY ); address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress) .opsProxyFactory(); (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress) .getProxyOf(_taskCreator); } /** * @dev * Transfers fee to gelato for synchronous fee payments. * * _fee & _feeToken should be queried from IAutomate.getFeeDetails() */ function _transfer(uint256 _fee, address _feeToken) internal { if (_feeToken == ETH) { (bool success, ) = feeCollector.call{value: _fee}(""); require(success, "_transfer: ETH transfer failed"); } else { SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee); } } function _getFeeDetails() internal view returns (uint256 fee, address feeToken) { (fee, feeToken) = automate.getFeeDetails(); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.14; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./AutomateReady.sol"; import {AutomateModuleHelper} from "./AutomateModuleHelper.sol"; /** * @dev Inherit this contract to allow your smart contract * to be a task creator and create tasks. */ //solhint-disable const-name-snakecase //solhint-disable no-empty-blocks abstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady { using SafeERC20 for IERC20; IGelato1Balance public constant gelato1Balance = IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e); constructor(address _automate) AutomateReady(_automate, address(this)) {} function _depositFunds1Balance( uint256 _amount, address _token, address _sponsor ) internal { if (_token == ETH) { ///@dev Only deposit ETH on goerli for now. require(block.chainid == 5, "Only deposit ETH on goerli"); gelato1Balance.depositNative{value: _amount}(_sponsor); } else { ///@dev Only deposit USDC on polygon for now. require( block.chainid == 137 && _token == address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174), "Only deposit USDC on polygon" ); IERC20(_token).approve(address(gelato1Balance), _amount); gelato1Balance.depositToken(_sponsor, _token, _amount); } } function _createTask( address _execAddress, bytes memory _execDataOrSelector, ModuleData memory _moduleData, address _feeToken ) internal returns (bytes32) { return automate.createTask( _execAddress, _execDataOrSelector, _moduleData, _feeToken ); } function _cancelTask(bytes32 _taskId) internal { automate.cancelTask(_taskId); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.12; enum Module { RESOLVER, DEPRECATED_TIME, PROXY, SINGLE_EXEC, WEB3_FUNCTION, TRIGGER } enum TriggerType { TIME, CRON, EVENT, BLOCK } struct ModuleData { Module[] modules; bytes[] args; } interface IAutomate { function createTask( address execAddress, bytes calldata execDataOrSelector, ModuleData calldata moduleData, address feeToken ) external returns (bytes32 taskId); function cancelTask(bytes32 taskId) external; function getFeeDetails() external view returns (uint256, address); function gelato() external view returns (address payable); function taskModuleAddresses(Module) external view returns (address); } interface IProxyModule { function opsProxyFactory() external view returns (address); } interface IOpsProxyFactory { function getProxyOf(address account) external view returns (address, bool); } interface IGelato1Balance { function depositNative(address _sponsor) external payable; function depositToken( address _sponsor, address _token, uint256 _amount ) external; } interface IGelato { function feeCollector() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; struct ActionBalance { uint256 collateral; uint256 debt; address collateralToken; address debtToken; uint256 collateralConverted; address collateralConvertedToken; string lpUnderlyingBalances; string lpUnderlyingTokens; } interface IAction { function getConfig() external view returns (bytes memory config); function checkMaintain( bytes memory configuration ) external view returns (bool, uint256); function checkUpkeep( bytes memory configuration ) external view returns (bool); function extraInfo( bytes memory configuration ) external view returns (uint256[4] memory info); function validateConfig( bytes memory configData ) external view returns (bool); function getMetaData() external view returns (string memory); function feeName() external view returns (string memory); function name() external view returns (string memory); function usesTakeFee() external view returns (bool); function showBalances( address _silo, bytes memory _configurationData ) external view returns (ActionBalance memory); function showDust( address _silo, bytes memory _configurationData ) external view returns (address[] memory, uint256[] memory); function vaultInfo( address _silo, bytes memory configuration ) external view returns (uint256, uint256, uint256, uint256, uint256); function actionValid( bytes memory _configurationData ) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; struct PriceOracle { address oracle; uint256 actionPrice; } enum Statuses { PAUSED, DORMANT, MANAGED, UNWIND } interface ISilo { function deposit() external; function withdraw(uint256 _requestedOut) external; function maintain() external; function exitSilo(address caller) external; function adminCall(address target, bytes memory data) external; function setStrategy( address[5] memory input, bytes[] memory _configurationData, address[] memory _implementations ) external; function getConfig() external view returns (bytes memory config); function withdrawToken(address token, address recipient) external; function adjustSiloDelay(uint256 _newDelay) external; function SILO_ID() external view returns (uint256); function siloDelay() external view returns (uint256); function name() external view returns (string memory); function lastTimeMaintained() external view returns (uint256); function factory() external view returns (address); function setName(string memory name) external; function deposited() external view returns (bool); function isNew() external view returns (bool); function status() external view returns (Statuses); function setStrategyName(string memory _strategyName) external; function setStrategyCategory(uint256 _strategyCategory) external; function strategyName() external view returns (string memory); function tokenMinimum(address token) external view returns (uint256); function strategyCategory() external view returns (uint256); // function main() external view returns (uint256); // function lastPid() external view returns (uint256); function adjustStrategy( uint256 _index, bytes memory _configurationData, address _implementation ) external; function viewStrategy() external view returns (address[] memory actions, bytes[] memory configData); function highRiskAction() external view returns (bool); function showActionStackValidity() external view returns (bool, bool); function getInputTokens() external view returns (address[5] memory); function getStatus() external view returns (Statuses); function pause() external; function unpause() external; function setActive() external; function possibleReinvestSilo() external view returns (bool possible); function getExtraSiloInfo() external view returns ( uint256 strategyType, uint256 currentBalance, uint256 possibleWithdraw, uint256 availableBlock, uint256 pendingReward, uint256 lastPid ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; interface ISiloFactory is IERC721Enumerable{ function tokenMinimum(address _token) external view returns(uint _minimum); function balanceOf(address _owner) external view returns(uint); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); function managerFactory() external view returns(address); function siloMap(uint _id) external view returns(address); function tierManager() external view returns(address); function ownerOf(uint _id) external view returns(address); function siloToId(address silo) external view returns(uint); // function createSilo(address recipient) external returns(uint); function setActionStack(uint siloID, address[5] memory input, address[] memory _implementations, bytes[] memory _configurationData) external; // function withdraw(uint siloID) external; function getFeeInfo(address _action) external view returns(uint fee, address recipient); function strategyMaxGas() external view returns(uint); function strategyName(string memory _name) external view returns(uint); function getCatalogue(uint _type) external view returns(string[] memory); function getStrategyInputs(uint _id) external view returns(address[5] memory inputs); function getStrategyActions(uint _id) external view returns(address[] memory actions); function getStrategyConfigurationData(uint _id) external view returns(bytes[] memory configurationData); function useCustom(address _action) external view returns(bool); // function getFeeList(address _action) external view returns(uint[4] memory); function feeRecipient(address _action) external view returns(address); function defaultFeeList() external view returns(uint[4] memory); function defaultRecipient() external view returns(address); // function getTier(address _silo) external view returns(uint); function getFeeInfoNoTier(address _action) external view returns(uint[4] memory); function highRiskActions(address _action) external view returns(bool); function actionValid(address _action) external view returns(bool); function strategyValid(uint256 _strategyId) external view returns(bool); function skipActionValidTeamCheck(address _user) external view returns(bool); function skipActionValidLogicCheck(address _user) external view returns(bool); function isSilo(address _silo) external view returns(bool); function isSiloManager(address _silo,address _manager) external view returns(bool); function currentStrategyId() external view returns(uint); function minBalance() external view returns(uint); function mainActoins(string memory strategyName) external view returns(uint); function subFactory() external view returns(address); function referral() external view returns(address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; enum AutoStatus { NOT, PENDING, APPROVED, MANUAL, LOW, NORMAL, HIGH } interface ISiloManager { function owner() external view returns (address); function taskId() external view returns (bytes32); function getBalance() external view returns (uint96); function depositFunds() external payable; function cancelAutomate() external; function withdrawFunds() external; function topupThreshold() external view returns (uint256); function topupAmount() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {AutoStatus} from "./ISiloManager.sol"; struct ManagerInfo { address manager; bytes32 taskId; uint256 currentBalance; uint256 topupThreshold; uint256 minFunds; } interface ISiloManagerFactory { function checkManager( address _owner, address _manager ) external view returns (bool); function userToManager(address _user) external view returns (address); function isManager(address) external view returns (bool); function managerCount() external view returns (uint256); function siloFactory() external view returns (address); function getAutoStatus(address _user) external view returns (AutoStatus); function topupThreshold() external view returns (uint256); function minFunds() external view returns (uint256); function topupAmount() external view returns (uint256); function getAutomatorInfo( address _manager ) external view returns (ManagerInfo memory info); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ISiloSubFactory { function acceptTransfersFrom(address to, address from) external view returns (bool); function skipActionValidTeamCheck(address user) external view returns (bool); function skipActionValidLogicCheck(address user) external view returns (bool); function checkActionsLogicValid( address user, address[] memory _actions, bytes[] memory _configurationData ) external view returns (bool); function checkActionLogicValid( address user, address _implementation, bytes memory _configurationData ) external view returns(bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./interfaces/IAction.sol"; import "./interfaces/ISiloFactory.sol"; import "./interfaces/ISiloSubFactory.sol"; import {Statuses} from "./interfaces/ISilo.sol"; import "./interfaces/ISiloManagerFactory.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "./gelato/AutomateTaskCreator.sol"; struct ActionInfo { bytes configurationData; //things like what token addresses are involved address implementation; } contract SiloV2 is IERC721Receiver, AutomateTaskCreator { bytes32 internal taskId; Statuses internal status; address public factory; ActionInfo[10] internal strategy; uint256 internal strategySize; bytes internal configurationData; //For silos this will only ever be the input and output token address[10] internal tokensInPlay; string public name; string public strategyName; uint256 public strategyCategory; uint256 public SILO_ID; uint256 public siloDelay; //used to determine how often it is maintained uint256 public lastTimeMaintained; bool public highRiskAction; bool public deposited; bool public isNew; bool private withdrawLimitAction; uint256 internal lastPid; uint256 internal main; uint256 private withdrawBlock; uint256 private withdrawAmount; uint256 private constant MAX_UINT256 = 2 ** 256 - 1; mapping(address => uint256) public tokenMinimum; event StrategyFailed(uint256 siloID, uint256 i); event SiloAutoCall(uint256 siloID, bool mode, uint256 task); modifier onlyFactory() { require( msg.sender == factory || msg.sender == ISiloFactory(factory).subFactory(), "not factory" ); _; } modifier onlyOwner() { require( msg.sender == ISiloFactory(factory).ownerOf(SILO_ID), "not owner" ); _; } constructor( uint256 siloID, uint256 _main, address _factory, address gelatoAutomate ) AutomateTaskCreator(gelatoAutomate) { factory = _factory; SILO_ID = siloID; isNew = true; main = _main; } function setName(string memory _name) external onlyFactory { name = _name; } function adjustSiloDelay(uint256 _newDelay) external onlyFactory { //make sure delay isn't too long or too siloDelay = _newDelay; } function setStrategyName(string memory _strategyName) external onlyFactory { strategyName = _strategyName; } function setStrategyCategory( uint256 _strategyCategory ) external onlyFactory { strategyCategory = _strategyCategory; } function checkAuto() public view returns (bool autoNeeded, bool act, uint256 task) { if (status == Statuses.UNWIND) { // performData = abi.encode(true, 1); act = true; task = 1; if ( withdrawAmount > 0 && block.number >= withdrawBlock && withdrawBlock != 0 ) { autoNeeded = true; } } else { act = false; task = 0; // performData = abi.encode(false, 0); if ( siloDelay != 0 && (deposited || possibleReinvestSilo()) && status == Statuses.MANAGED ) { //If delay is zero, maintenance is only conditional based autoNeeded = (block.timestamp >= (lastTimeMaintained + siloDelay)); if (autoNeeded) { for (uint256 i; i < strategySize; ) { autoNeeded = IAction(strategy[i].implementation) .checkUpkeep(strategy[i].configurationData); if (!autoNeeded) { return (false, act, task); } unchecked { i++; } } } } if (!autoNeeded) { uint256 autoTask; //if time up keep is not needed check strategy for (uint256 i; i < strategySize; ) { if (i == 0 || (i != 0 && deposited)) { (autoNeeded, autoTask) = IAction( strategy[i].implementation ).checkMaintain(strategy[i].configurationData); if (i == 0 && autoNeeded) { (bool team, bool logic) = showActionStackValidity(); if (!logic || !team) { autoNeeded = false; } } } if (autoNeeded) { // performData = abi.encode( // false, // (i + 1) * 100 + autoTask // ); act = false; task = (i + 1) * 100 + autoTask; break; } unchecked { i++; } } } } } function createTask() external payable { require(taskId == bytes32(""), "already"); ModuleData memory moduleData = ModuleData({ modules: new Module[](2), args: new bytes[](2) }); moduleData.modules[0] = Module.RESOLVER; moduleData.modules[1] = Module.PROXY; moduleData.args[0] = _resolverModuleArg( address(this), abi.encodeCall(this.checker, ()) ); moduleData.args[1] = _proxyModuleArg(); bytes32 id = _createTask( address(this), abi.encode(this.performAuto.selector), moduleData, ETH ); taskId = id; } function checker() external view returns (bool canExec, bytes memory execPayload) { ISiloFactory SiloFactory = ISiloFactory(factory); ISiloSubFactory subFactory = ISiloSubFactory(SiloFactory.subFactory()); if (status == Statuses.PAUSED) { return (false, bytes("no call")); } if (highRiskAction) { //need to check if balance is above the min required by some percent // uint256 balance = taskTreasury.userTokenBalance(address(this), ETH); uint256 nativeBalance = address(this).balance; uint256 minBalance = ISiloManagerFactory( SiloFactory.managerFactory() ).minFunds(); if (nativeBalance < minBalance) { if (status == Statuses.MANAGED && deposited) { //high risk silo is currently managed, and manager is underfunded canExec = true; execPayload = abi.encodeCall(this.performAuto, (true, 3)); return (canExec, execPayload); //this will change the status of the silo to dormant } } else if (status == Statuses.DORMANT) { //check if balance has returned to a healthy level if (nativeBalance > minBalance && possibleReinvestSilo()) { //silo balance has returned to a healthy level and silo is dormant so re enter the strategy (bool team, bool logic) = showActionStackValidity(); if (team && logic) { canExec = true; execPayload = abi.encodeCall( this.performAuto, (false, 4) ); return (canExec, execPayload); } } } } address owner = ISiloFactory(factory).ownerOf(SILO_ID); //check to see if any actions in the strategy have been deprecated logically or by the team, and if so have manager make silo exit strategy if ( !canExec && (!subFactory.skipActionValidTeamCheck(owner) || !subFactory.skipActionValidLogicCheck(owner)) ) { (bool team, bool logic) = showActionStackValidity(); if ( (!subFactory.skipActionValidTeamCheck(owner) && !team) || (!subFactory.skipActionValidLogicCheck(owner) && !logic) ) { if (status == Statuses.MANAGED) { canExec = true; execPayload = abi.encodeCall(this.performAuto, (true, 5)); return (canExec, execPayload); } } } if (!canExec) { bool act; uint256 task; (canExec, act, task) = checkAuto(); if (canExec) { execPayload = abi.encodeCall(this.performAuto, (act, task)); return (canExec, execPayload); } } return (false, bytes("not auto")); } function performAuto(bool keeperExit, uint256 task) external { require(msg.sender == dedicatedMsgSender, "not"); if (keeperExit) { if (status != Statuses.UNWIND) { status = Statuses.DORMANT; } if (deposited) { //if there is money in the strategy then remove it _exitStrategy(0); } } else { _runStrategy(); } if (task == 306) { (, , , , , uint256 pid) = getExtraSiloInfo(); lastPid = pid; } emit SiloAutoCall(SILO_ID, keeperExit, task); (uint256 fee, address feeToken) = _getFeeDetails(); _transfer(fee, feeToken); } function showActionStackValidity() public view returns (bool, bool) { bool team = true; bool logic = true; bool tmpTeam; bool tmpLogic; for (uint256 i; i < strategySize; ) { //go through every action, and call actionValid tmpTeam = ISiloFactory(factory).actionValid( strategy[i].implementation ); tmpLogic = IAction(strategy[i].implementation).actionValid( strategy[i].configurationData ); if (!tmpTeam) { team = tmpTeam; } if (!tmpLogic) { logic = tmpLogic; } unchecked { i++; } } return (team, logic); } //Enter the strategy function deposit() external onlyFactory { uint256 gas = gasleft(); _runStrategy(); uint256 gasUsed = gas - gasleft(); if (gasUsed > ISiloFactory(factory).strategyMaxGas()) { string memory errorMessage = string( abi.encodePacked( "exceed gas limit: ", Strings.toString(gasUsed) ) ); revert(errorMessage); } } //Exit the strategy function withdraw(uint256 _requestedOut) external onlyFactory { _exitStrategy(_requestedOut); } function exitSilo(address caller) external onlyFactory { //Send all tokens to owner withdrawTokens(caller); uint256 nativeBalance = address(this).balance; if (nativeBalance > 0) { (bool success, ) = payable(caller).call{value: nativeBalance}(""); // require(success, "issue in native withdraw"); } } function withdrawToken( address token, address recipient ) external onlyFactory { IERC20 Token = IERC20(token); SafeERC20.safeTransfer( Token, recipient, Token.balanceOf(address(this)) ); } function withdrawTokens(address recipient) private { uint256 balance; IERC20 token; for (uint256 i; i < tokensInPlay.length; ) { if (tokensInPlay[i] != address(0)) { token = IERC20(tokensInPlay[i]); balance = token.balanceOf(address(this)); if (balance > 0) { SafeERC20.safeTransfer(token, recipient, balance); } } unchecked { i++; } } } //used to recover users funds if for some reason the strategy fails function adminCall(address target, bytes memory data) external onlyFactory { (bool success, ) = target.call(data); require(success, "failed"); } function updateStrategy() public onlyOwner { uint256 id = ISiloFactory(factory).strategyName(strategyName); address[5] memory cuInputs = ISiloFactory(factory).getStrategyInputs( id ); address[] memory cuActions = ISiloFactory(factory).getStrategyActions( id ); bytes[] memory cuConfigurationData = ISiloFactory(factory) .getStrategyConfigurationData(id); _setStrategy(cuInputs, cuConfigurationData, cuActions); } function setStrategy( address[5] memory _inputs, bytes[] memory _configurationData, address[] memory _implementations ) external onlyFactory { //needs to exit current strategy, if it is in one // require(status == Statuses.PAUSED, "remove assets before update"); require(!deposited, "deposited"); _setStrategy(_inputs, _configurationData, _implementations); } function _setStrategy( address[5] memory _inputs, bytes[] memory _configurationData, address[] memory _implementations ) internal { require( _configurationData.length == _implementations.length, "inputs mismatch" ); delete strategy; //deletes the current strategy address[5] memory actionInput; address[5] memory actionOutput = _inputs; address[5] memory tmpOutput; bytes memory storedConfig; highRiskAction = false; //reset it ActionInfo memory action; uint256 actionCount = _implementations.length; strategySize = actionCount; for (uint256 i; i < actionCount; ) { //Confirm inputs and outputs match storedConfig = IAction(_implementations[i]).getConfig(); if (storedConfig.length > 0) { if (i == actionCount - 1) { (actionInput) = abi.decode(storedConfig, (address[5])); tmpOutput = actionInput; } else { (actionInput, tmpOutput) = abi.decode( storedConfig, (address[5], address[5]) ); } require( IAction(_implementations[i]).validateConfig(storedConfig), "configuration invalid" ); } else { if (i == actionCount - 1) { (actionInput) = abi.decode( _configurationData[i], (address[5]) ); tmpOutput = actionInput; } else { (actionInput, tmpOutput) = abi.decode( _configurationData[i], (address[5], address[5]) ); } if ( !IAction(_implementations[i]).validateConfig( _configurationData[i] ) ) { string memory errorMessage = string( abi.encodePacked( "configuration invalid at:", Strings.toString(i) ) ); revert(errorMessage); } } require( actionInput.length == actionOutput.length, "different output/input size" ); for (uint256 j; j < actionInput.length; ) { require( actionInput[j] == actionOutput[j], "input/output mismatch" ); unchecked { j++; } } actionOutput = tmpOutput; action = ActionInfo({ configurationData: _configurationData[i], implementation: _implementations[i] }); // strategy.push(action); strategy[i] = action; if ( !highRiskAction && ISiloFactory(factory).highRiskActions(_implementations[i]) ) { highRiskAction = true; } //if we are on the last action, then set the config data for this silo if (i == actionCount - 1) { _setConfigData(_inputs, actionOutput); } if (i == 0) { _setTriggerConfigData(_configurationData[i]); } status = Statuses.MANAGED; unchecked { i++; } } (uint256 strategyType, , , , , uint256 pid) = getExtraSiloInfo(); withdrawLimitAction = strategyType == 1; lastPid = pid; } function adjustStrategy( uint256 _index, bytes memory _configurationData, address _implementation ) external onlyFactory { address[5] memory currentInputs; address[5] memory currentOutputs; address[5] memory proposedInputs; address[5] memory proposedOutputs; if (_index == strategySize - 1) { (currentInputs) = abi.decode( strategy[_index].configurationData, (address[5]) ); currentOutputs = currentInputs; (proposedInputs) = abi.decode(_configurationData, (address[5])); proposedOutputs = proposedInputs; } else { (currentInputs, currentOutputs) = abi.decode( strategy[_index].configurationData, (address[5], address[5]) ); (proposedInputs, proposedOutputs) = abi.decode( _configurationData, (address[5], address[5]) ); } //if strategy is not already high risk, then check if the new action is high risk if ( !highRiskAction && ISiloFactory(factory).highRiskActions(_implementation) ) { highRiskAction = true; } for (uint256 i; i < 5; ) { if (currentInputs[i] != proposedInputs[i]) { string memory errorMessage = string( abi.encodePacked( "current input dismatch at: ", Strings.toString(i) ) ); revert(errorMessage); } if (currentOutputs[i] != proposedOutputs[i]) { string memory errorMessage = string( abi.encodePacked( "current output dismatch at: ", Strings.toString(i) ) ); revert(errorMessage); } unchecked { i++; } } require( IAction(_implementation).validateConfig(_configurationData), "configuration invalid" ); //If above all checks out, then overwrite the strategy at _index strategy[_index] = ActionInfo({ configurationData: _configurationData, implementation: _implementation }); if (_index == 0) { _setTriggerConfigData(_configurationData); } } function pause() external onlyFactory { require(!highRiskAction, "high risk silo"); //user needs to exit using exitSiloStrategy require(status == Statuses.MANAGED, "not managed"); status = Statuses.PAUSED; } //user could flip this to managed without setting a strategy, but UI is only set up for new silos to have a strategy function unpause() external onlyFactory { require(status == Statuses.PAUSED, "not paused"); status = Statuses.MANAGED; } function setActive() external onlyFactory { require(status == Statuses.UNWIND, "not unwind"); status = Statuses.MANAGED; } function viewStrategy() external view returns (address[] memory actions, bytes[] memory configData) { actions = new address[](strategySize); configData = new bytes[](strategySize); unchecked { for (uint256 i; i < strategySize; i++) { actions[i] = strategy[i].implementation; configData[i] = strategy[i].configurationData; } } } /****************************Public Functions*****************************/ //Here so that silos match the design pattern of actions function getConfig() public view returns (bytes memory) { return configurationData; } function getInputTokens() public view returns (address[5] memory inputs) { unchecked { for (uint256 i; i < 5; i++) { inputs[i] = tokensInPlay[i]; } } } function getStatus() public view returns (Statuses) { return status; } /****************************Internal Functions*****************************/ function _investSilo() internal returns (uint256[5] memory amounts) { address[5] memory depositTokens = abi.decode( configurationData, (address[5]) ); for (uint256 i; i < 5; ) { uint256 tokenAmount; if (depositTokens[i] != address(0)) { tokenAmount = IERC20(depositTokens[i]).balanceOf(address(this)); if ( tokenAmount > 0 && tokenAmount >= tokenMinimum[depositTokens[i]] ) { amounts[i] = tokenAmount; //if tokenAmount is non zero and greater than the minimum, then set deposited to true if (!deposited) { deposited = true; } if (status == Statuses.DORMANT) { status = Statuses.MANAGED; //change it back to managed } if (isNew) { //track if a silo has ever had anything deposited into it isNew = false; } } } unchecked { i++; } } } function possibleReinvestSilo() public view returns (bool possible) { address[5] memory depositTokens = abi.decode( configurationData, (address[5]) ); // (bool team, bool logic) = showActionStackValidity(); // if (!team || !logic) { // return false; // } for (uint256 i; i < 5; ) { uint256 tokenAmount; if (depositTokens[i] != address(0)) { tokenAmount = IERC20(depositTokens[i]).balanceOf(address(this)); if ( tokenAmount > 0 && tokenAmount >= tokenMinimum[depositTokens[i]] ) { return true; } } unchecked { i++; } } return false; } function _runStrategy() internal { uint256[5] memory amounts = _investSilo(); bytes memory inputData = abi.encode(amounts); uint256 i = 1; if (strategySize < 3) { i = 0; } for (; i < strategySize; ) { (bool success, bytes memory result) = strategy[i] .implementation .delegatecall( abi.encodeWithSignature( "enter(address,bytes,bytes)", strategy[i].implementation, strategy[i].configurationData, inputData ) ); if (!success) { string memory errorMessage = string( abi.encodePacked( "strategy failed at: ", Strings.toString(i) ) ); revert(errorMessage); } inputData = result; unchecked { i++; } } lastTimeMaintained = block.timestamp; } function _exitStrategy(uint256 _requestedOut) internal returns (bool) { require(deposited, "no balance"); uint256[5] memory amounts = [_requestedOut, 0, 0, 0, 0]; bytes memory exitData = abi.encode(amounts); uint256 i = 1; uint256 length = strategySize; for (; i < length; ) { (bool success, bytes memory result) = strategy[i] .implementation .delegatecall( abi.encodeWithSignature( "exit(address,bytes,bytes)", strategy[i].implementation, strategy[i].configurationData, exitData ) ); if (!success) { string memory errorMessage = string( abi.encodePacked( "withdraw failed at: ", Strings.toString(i) ) ); revert(errorMessage); } exitData = result; unchecked { i++; } } if (withdrawLimitAction) { ( , uint256 currentBalance, uint256 possibleWithdraw, uint256 availableBlock, , ) = getExtraSiloInfo(); withdrawBlock = availableBlock; withdrawAmount = possibleWithdraw; if (status == Statuses.UNWIND) { withdrawTokens(ISiloFactory(factory).ownerOf(SILO_ID)); } if (currentBalance <= ISiloFactory(factory).minBalance()) { deposited = false; status = Statuses.DORMANT; } else { if (status != Statuses.UNWIND) { status = Statuses.UNWIND; } } } else { deposited = false; } } function getExtraSiloInfo() public view returns ( uint256 strategyType, uint256 currentBalance, uint256 possibleWithdraw, uint256 availableBlock, uint256 pendingReward, uint256 pid ) { uint256[4] memory info = IAction(strategy[main].implementation) .extraInfo(strategy[main].configurationData); pendingReward = info[0]; currentBalance = info[1]; possibleWithdraw = info[2]; availableBlock = info[3]; if (info[3] == MAX_UINT256) { return ( 2, currentBalance, possibleWithdraw, availableBlock, pendingReward, info[1] ); } else { return ( 1, currentBalance, possibleWithdraw, availableBlock, pendingReward, 0 ); } } function _setConfigData( address[5] memory _input, address[5] memory _output ) internal { configurationData = abi.encode(_input, _output); unchecked { for (uint256 i; i < 5; i++) { tokensInPlay[i] = _input[i]; tokensInPlay[i + 5] = _output[i]; } } } function _setTriggerConfigData(bytes memory configData) internal { (address[5] memory _inputs, , uint256[5] memory _triggers) = abi.decode( configData, (address[5], address[5], uint256[5]) ); unchecked { for (uint256 i; i < 5; i++) { tokenMinimum[_inputs[i]] = _triggers[i]; } } } function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } receive() external payable {} fallback() external payable {} function automateWithdraw() external onlyOwner { uint256 nativeBalance = address(this).balance; if (nativeBalance > 0) { (bool success, ) = payable(msg.sender).call{value: nativeBalance}( "" ); // require(success, "issue in native withdraw"); } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address payable","name":"_automate","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"automate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"inputData","type":"bytes"}],"name":"createSilo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c03461009b57601f61552c38819003918201601f19168301916001600160401b038311848410176100a057808492604094855283398101031261009b578051906001600160a01b038216820361009b57602001516001600160a01b038116919082900361009b5760805260a05260405161547590816100b7823960805181818160bc0152610251015260a05181818161013c01526102940152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b600090813560e01c908163049aacfe1461028057508063c45a01551461023b5763faa202f11461004257600080fd5b60203660031901126102385760043567ffffffffffffffff81116101d157366023820112156101d15780600401359067ffffffffffffffff82116102245782604051916100996020601f19601f87011601846102c3565b8383526020830193366024828401011161022057806024602093018637830101527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691338390036101ed576040828051810103126101e957604090519101519160405192615144928385019385851067ffffffffffffffff8611176101d55791859391608095936102fc86398352602083015260408201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316606082015203019082f080156101c4576001600160a01b0316803b156101d15760405163a747649360e01b815291808360048134865af19283156101c4576020936101b4575b5050604051908152f35b816101be916102c3565b386101aa565b50604051903d90823e3d90fd5b5080fd5b634e487b7160e01b87526041600452602487fd5b8380fd5b60405162461bcd60e51b815260206004820152600b60248201526a6e6f7420666163746f727960a81b6044820152606490fd5b8280fd5b634e487b7160e01b83526041600452602483fd5b80fd5b50346102385780600319360112610238576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9050346101d157816003193601126101d1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b90601f8019910116810190811067ffffffffffffffff8211176102e557604052565b634e487b7160e01b600052604160045260246000fdfe60e0806040523461026257608081615144803803809161001f8285610336565b83398101031261026257805160208201519161003d6040820161036f565b906001600160a01b03906100539060600161036f565b16608081905260405163573ea57560e01b8152602081600481855afa90811561021f576000916102ef575b506040516331056e5760e21b815290602090829060049082906001600160a01b03165afa90811561021f576000916102ae575b5060c05260405163cd3d4fb960e01b81526002600482015290602090829060249082905afa90811561021f5760009161026f575b50604051632e8743fd60e21b815290602090829060049082906001600160a01b03165afa90811561021f5760009161022b575b50604080516337b6269f60e21b815230600482015291829060249082906001600160a01b03165afa90811561021f576000916101d5575b5060a05260018054610100600160a81b03191660089290921b610100600160a81b03169190911790556025556028805462ff0000191662010000179055602a55604051614dc0908161038482396080518181816113580152818161199c01526127f1015260a0518181816118ea0152612676015260c051818181611a040152611a810152f35b906040823d604011610217575b816101ef60409383610336565b810103126102145760206102028361036f565b9201518015150361021457503861014f565b80fd5b3d91506101e2565b6040513d6000823e3d90fd5b90506020813d602011610267575b8161024660209383610336565b8101031261026257604061025b60249261036f565b9150610118565b600080fd5b3d9150610239565b90506020813d6020116102a6575b8161028a60209383610336565b8101031261026257602061029f60049261036f565b91506100e5565b3d915061027d565b90506020813d6020116102e7575b816102c960209383610336565b81010312610262576024916102df60209261036f565b9150916100b1565b3d91506102bc565b6020813d60201161032e575b8161030860209383610336565b8101031261032a5751906001600160a01b03821682036102145750602061007e565b5080fd5b3d91506102fb565b601f909101601f19168101906001600160401b0382119082101761035957604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036102625756fe6080806040526004361015610011575b005b60003560e01c908163049aacfe146127de5750806306fdde03146127365780630fa5ef7014612718578063150b7a02146126c3578063189e17e4146126a557806328f150eb146126605780632e1a7d4d146125ab5780632fddd913146121f0578063349b0cf114611fb25780633aeac4e114611e7b5780633f4ba83a14611d6d578063405d638e14611d425780634e69d56014611d1857806354934b2414611c6657806357fb1d6714611c375780635f498bdb14611b815780636e77cd06146118c6578063760a8c2a146117b55780638456cb591461167657806392edefe414611653578063a016b2cd146114a9578063a351616a14611477578063a747649314611178578063bf64a82d1461104d578063c23716ec14611028578063c39368ee1461100a578063c3f909d414610fe6578063c45a015514610fb9578063c47f002714610dbe578063cd5b07c014610964578063cf5303cf1461092c578063d0e30db01461076c578063d2e636331461068a578063d6273e68146104e6578063db11e47214610465578063df641c9c146103a7578063e173ad25146102d1578063e531fd19146102b3578063e7ccd0ad14610279578063eef49ee314610253578063f26af5c3146102135763fe75154b146101e857005b3461020e57600036600319011261020e57602060ff60285460101c166040519015158152f35b600080fd5b3461020e57600036600319011261020e5760c061022e613a14565b93604093919351958652602086015260408501526060840152608083015260a0820152f35b3461020e57600036600319011261020e57602060ff60285460081c166040519015158152f35b3461020e57602036600319011261020e576001600160a01b0361029a6128f9565b16600052602d6020526020604060002054604051908152f35b3461020e57600036600319011261020e576020602754604051908152f35b3461020e57600036600319011261020e57604051602354600090816102f582612820565b80855291600181169081156103805750600114610335575b6103318461031d81860382612890565b6040519182916020835260208301906128d4565b0390f35b60238152600080516020614d6b833981519152939250905b8082106103665750909150810160200161031d8261030d565b91926001816020925483858801015201910190929161034d565b60ff191660208087019190915292151560051b8501909201925061031d915083905061030d565b3461020e57602036600319011261020e5760015460081c6001600160a01b031633811480156103e2575b6103da90612a41565b600435602455005b50602060049160405192838092631113f57f60e01b82525afa80156104595760009061041e575b6103da91506001600160a01b031633146103d1565b506020813d602011610451575b8161043860209383612890565b8101031261020e5761044c6103da91612a2d565b610409565b3d915061042b565b6040513d6000823e3d90fd5b3461020e57600036600319011261020e5760a06040516104858282612890565b8136823760005b600581106104a457506104a260405180926129fb565bf35b600a8110156104d0576018810154600191906001600160a01b03166104c98285613174565b520161048c565b634e487b7160e01b600052603260045260246000fd5b3461020e57600036600319011261020e57601654610503816129a9565b6105106040519182612890565b81815261051c826129a9565b602082019290601f1901368437610532816129a9565b906105406040519283612890565b808252601f1961054f826129a9565b0160005b81811061067757505060005b8181106106115750506040519283926040840190604085525180915260608401919060005b8181106105ef575050508281036020840152815180825260208201916020808360051b8301019401926000915b8383106105be5786860387f35b9193955091936020806105dd600193601f1986820301875289516128d4565b970193019301909286959492936105b1565b82516001600160a01b0316845286955060209384019390920191600101610584565b600a819593949510156104d05780610650610657600193841b848060a01b03600382015416610640858b613160565b5260405192838092600201612b54565b0382612890565b6106618287613160565b5261066c8186613160565b50019392919361055f565b6060602082860181019190915201610553565b3461020e57602036600319011261020e576106a36128f9565b60015460081c6001600160a01b031633811480156106f5575b6106c69150612a41565b6106cf81614c4b565b4790816106d857005b6000918291829182916001600160a01b03165af15061000f612dd3565b50602060049160405192838092631113f57f60e01b82525afa801561045957600090610731575b6106c691506001600160a01b031633146106bc565b506020813d602011610764575b8161074b60209383612890565b8101031261020e5761075f6106c691612a2d565b61071c565b3d915061073e565b3461020e57600036600319011261020e5760015460081c6001600160a01b031633811480156108b5575b6107a09150612a41565b5a6107a9614792565b5a810390811161089f57600154604051636ce58a3960e11b8152906020908290600490829060081c6001600160a01b03165afa9081156104595760009161086d575b5081116107f457005b61080061086991614a20565b6108496032604051809371032bc31b2b2b21033b0b9903634b6b4ba1d160751b602083015261083881518092602086860191016128b1565b81010301601f198101835282612890565b60405162461bcd60e51b81526020600482015291829160248301906128d4565b0390fd5b90506020813d602011610897575b8161088860209383612890565b8101031261020e5751826107eb565b3d915061087b565b634e487b7160e01b600052601160045260246000fd5b50602060049160405192838092631113f57f60e01b82525afa8015610459576000906108f1575b6107a091506001600160a01b03163314610796565b506020813d602011610924575b8161090b60209383612890565b8101031261020e5761091f6107a091612a2d565b6108dc565b3d91506108fe565b3461020e57600036600319011261020e57610945613430565b90610331604051928392151583526040602084015260408301906128d4565b3461020e57606036600319011261020e576004356024356001600160401b03811161020e5761099790369060040161298b565b906044356001600160a01b0381169081900361020e5760015460081c6001600160a01b03163381148015610d4c575b6109cf90612a41565b60405160a0919060006109e28483612890565b50823682375060405160006109f78483612890565b5082368237506040516000610a0c8483612890565b5082368237506040516000610a218483612890565b508236823750601654600019810190811161089f578403610cfc57600a8410156104d057604051610a5c81610650818860011b600201612b54565b8051810190838183031261020e57602080610a7993019101612bd7565b91829086518701908782031261020e576020610a99910160208801612bd7565b80925b6028549060ff8216159081610c8c575b50610c7c575b5060005b60058110610b7c5787878760405163a913b88160e01b81526020600482015260208180610ae660248201886128d4565b0381855afa801561045957600090610b41575b610b0391506132bf565b60405190610b108261285a565b8382526020820152600a8210156104d057610b31908260011b600201613303565b15610b3857005b61000f90614b8f565b506020813d602011610b74575b81610b5b60209383612890565b8101031261020e57610b6f610b0391612c68565b610af9565b3d9150610b4e565b6001600160a01b03610b8e8287613174565b51166001600160a01b03610ba28385613174565b511603610c2d576001600160a01b03610bbb8285613174565b51166001600160a01b03610bcf8387613174565b511603610bde57600101610ab6565b610bea61086991614a20565b610849603c60405180937f63757272656e74206f7574707574206469736d617463682061743a2000000000602083015261083881518092602086860191016128b1565b610c3961086991614a20565b610849603b60405180937f63757272656e7420696e707574206469736d617463682061743a200000000000602083015261083881518092602086860191016128b1565b60ff191660011760285587610ab2565b6024915060209060405192838092637435d6f760e01b82528b60048301525afa90811561045957600091610cc2575b5089610aac565b90506020813d602011610cf4575b81610cdd60209383612890565b8101031261020e57610cee90612c68565b89610cbb565b3d9150610cd0565b9050600a8310156104d057610d30604051610d2181610650818860011b600201612b54565b6020808251830101910161329b565b919091610d46602087518801016020880161329b565b92610a9c565b50604051631113f57f60e01b8152602081600481855afa801561045957600090610d83575b6001600160a01b0316331490506109c6565b506020813d602011610db6575b81610d9d60209383612890565b8101031261020e57610db16109cf91612a2d565b610d71565b3d9150610d90565b3461020e57610dcc366129c0565b60015460081c6001600160a01b03163381148015610f42575b610def9150612a41565b80516001600160401b038111610f2c57610e0a602254612820565b601f8111610ed2575b50602091601f8211600114610e5457610e449260009183610e49575b50508160011b916000199060031b1c19161790565b602255005b015190508380610e2f565b601f1982169260226000527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e5109160005b858110610eba57508360019510610ea1575b505050811b01602255005b015160001960f88460031b161c19169055828080610e96565b91926020600181928685015181550194019201610e84565b6022600052610f1c907f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510601f840160051c81019160208510610f22575b601f0160051c0190612e03565b82610e13565b9091508190610f0f565b634e487b7160e01b600052604160045260246000fd5b50602060049160405192838092631113f57f60e01b82525afa801561045957600090610f7e575b610def91506001600160a01b03163314610de5565b506020813d602011610fb1575b81610f9860209383612890565b8101031261020e57610fac610def91612a2d565b610f69565b3d9150610f8b565b3461020e57600036600319011261020e5760015460405160089190911c6001600160a01b03168152602090f35b3461020e57600036600319011261020e5761033160405161031d8161065081612ab3565b3461020e57600036600319011261020e576020602454604051908152f35b3461020e57600036600319011261020e576020611043613185565b6040519015158152f35b3461020e57604036600319011261020e576110666128f9565b6024356001600160401b03811161020e5761108590369060040161298b565b60018060a01b0360015460081c168033149081156110f5575b50906000926110ad8493612a41565b82602083519301915af16110bf612dd3565b50156110c757005b60405162461bcd60e51b815260206004820152600660248201526519985a5b195960d21b6044820152606490fd5b604051631113f57f60e01b81529150602090829060049082905afa90811561045957600091611132575b506001600160a01b03163314600061109e565b9190506020823d602011611170575b8161114e60209383612890565b8101031261020e576000926110ad6111668594612a2d565b929350509261111f565b3d9150611141565b600036600319011261020e5760005461144857606060405161119a8282612890565b60028152601f1982013660208301376040519060606111b98184612890565b6002835283908390601f190160005b818110611438576040516112d8858560006111f58a6111e68761285a565b80875260208701938452613143565b5260026112028551613150565b5261126661124661125460405163cf5303cf60e01b60208201526004815261122b602482612890565b604051928391306020840152604080840152878301906128d4565b03601f198101835282612890565b82519061126082613143565b52613143565b50602093849261129260405161127c8682612890565b6000815284519061128c82613150565b52613150565b506040519263373be68360e11b858501528484526112b1604085612890565b604051633323b46760e01b81523060048201526080602482015295869460848601906128d4565b926003198585030160448601528560408501915193604086528451809352850193019060005b8181106113f45750505051918481830391015281518082528482019185808360051b8301019401926000915b8383106113c657505073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60648601525050508190038160007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af191821561045957600092611398575b6000839055005b90809250813d83116113bf575b6113af8183612890565b8101031261020e57518180611391565b503d6113a5565b9295509295806113e360019396601f1986820301875289516128d4565b97019301930187959387959261132a565b92949650929080955051906006821015611422578881600193829352019501910190869492889694926112fe565b634e487b7160e01b600052602160045260246000fd5b60208184018101859052016111c8565b60405162461bcd60e51b8152602060048201526007602482015266616c726561647960c81b6044820152606490fd5b3461020e57600036600319011261020e576060611492612e27565b906040519215158352151560208301526040820152f35b3461020e576114b7366129c0565b60015460081c6001600160a01b031633811480156115dc575b6114da9150612a41565b80516001600160401b038111610f2c576114f5602354612820565b601f811161159f575b50602091601f82116001146115335761152e9260009183610e495750508160011b916000199060031b1c19161790565b602355005b601f198216926023600052600080516020614d6b8339815191529160005b8581106115875750836001951061156e575b505050811b01602355005b015160001960f88460031b161c19169055828080611563565b91926020600181928685015181550194019201611551565b60236000526115d690600080516020614d6b833981519152601f840160051c81019160208510610f2257601f0160051c0190612e03565b826114fe565b50602060049160405192838092631113f57f60e01b82525afa801561045957600090611618575b6114da91506001600160a01b031633146114d0565b506020813d60201161164b575b8161163260209383612890565b8101031261020e576116466114da91612a2d565b611603565b3d9150611625565b3461020e57600036600319011261020e57602060ff602854166040519015158152f35b3461020e57600036600319011261020e57600154600881901c6001600160a01b0316338114801561173e575b6116ac9150612a41565b60ff602854166117085760ff166004811015611422576002036116d5576001805460ff19169055005b60405162461bcd60e51b815260206004820152600b60248201526a1b9bdd081b585b9859d95960aa1b6044820152606490fd5b60405162461bcd60e51b815260206004820152600e60248201526d68696768207269736b2073696c6f60901b6044820152606490fd5b50602060049160405192838092631113f57f60e01b82525afa80156104595760009061177a575b6116ac91506001600160a01b031633146116a2565b506020813d6020116117ad575b8161179460209383612890565b8101031261020e576117a86116ac91612a2d565b611765565b3d9150611787565b3461020e57600036600319011261020e576001546001600160a01b03600882901c1633811491908215611844575b506117ef60ff92612a41565b166004811015611422576003036118125761000f600260ff196001541617600155565b60405162461bcd60e51b815260206004820152600a6024820152691b9bdd081d5b9dda5b9960b21b6044820152606490fd5b604051631113f57f60e01b81529250602090839060049082905afa91821561045957600092611886575b506001600160a01b03919091163314906117ef6117e3565b91506020823d6020116118be575b816118a160209383612890565b8101031261020e576117ef6118b760ff93612a2d565b925061186e565b3d9150611894565b3461020e57604036600319011261020e5760043580151580820361020e57602435917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303611b565715611b245760ff60015416906004821015611422577f84a2401bd1b19b99661ef428440a33df125822e97cf2dc91257d873e07f803a592600360609303611b0e575b60ff60285460081c16611b00575b6101328114611aea575b6025549160405192835260208301526040820152a160408051635c08631b60e11b815290816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa8015610459576000918291611aa6575b506001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8103611a7a57506000808080937f00000000000000000000000000000000000000000000000000000000000000005af1611a2d612dd3565b5015611a3557005b60405162461bcd60e51b815260206004820152601e60248201527f5f7472616e736665723a20455448207472616e73666572206661696c656400006044820152606490fd5b9061000f917f0000000000000000000000000000000000000000000000000000000000000000906146eb565b9190506040823d604011611ae2575b81611ac260409383612890565b81010312611adf5750611ad9602082519201612a2d565b826119d6565b80fd5b3d9150611ab5565b611af2613a14565b945050505050602955611972565b611b08613b8b565b50611968565b611b1f600160ff1981541617600155565b61195a565b6060907f84a2401bd1b19b99661ef428440a33df125822e97cf2dc91257d873e07f803a592611b51614792565b611968565b60405162461bcd60e51b81526020600482015260036024820152621b9bdd60ea1b6044820152606490fd5b3461020e57600036600319011261020e5760018060a01b0360015460081c1660206025546024604051809481936331a9108f60e11b835260048301525afa801561045957600090611bfc575b611be291506001600160a01b03163314612a7b565b4780611bea57005b600080808093335af15061000f612dd3565b506020813d602011611c2f575b81611c1660209383612890565b8101031261020e57611c2a611be291612a2d565b611bcd565b3d9150611c09565b3461020e57600036600319011261020e576020604051737506c12a824d73d9b08564d5afc22c949434755e8152f35b3461020e57602036600319011261020e5760015460081c6001600160a01b03163381148015611ca1575b611c9990612a41565b600435602655005b50602060049160405192838092631113f57f60e01b82525afa801561045957600090611cdd575b611c9991506001600160a01b03163314611c90565b506020813d602011611d10575b81611cf760209383612890565b8101031261020e57611d0b611c9991612a2d565b611cc8565b3d9150611cea565b3461020e57600036600319011261020e5760ff600154166040516004821015611422576020918152f35b3461020e57600036600319011261020e576040611d5d612c75565b8251911515825215156020820152f35b3461020e57600036600319011261020e576001546001600160a01b03600882901c1633811491908215611df9575b50611da760ff92612a41565b16600481101561142257611dc75761000f600260ff196001541617600155565b60405162461bcd60e51b815260206004820152600a6024820152691b9bdd081c185d5cd95960b21b6044820152606490fd5b604051631113f57f60e01b81529250602090839060049082905afa91821561045957600092611e3b575b506001600160a01b0391909116331490611da7611d9b565b91506020823d602011611e73575b81611e5660209383612890565b8101031261020e57611da7611e6c60ff93612a2d565b9250611e23565b3d9150611e49565b3461020e57604036600319011261020e57611e946128f9565b611e9c61290f565b60015490919060081c6001600160a01b03163381148015611f3b575b611ec29150612a41565b6040516370a0823160e01b8152306004820152916001600160a01b039190911690602083602481855afa91821561045957600092611f05575b61000f93506146eb565b91506020833d602011611f33575b81611f2060209383612890565b8101031261020e5761000f925191611efb565b3d9150611f13565b50602060049160405192838092631113f57f60e01b82525afa801561045957600090611f77575b611ec291506001600160a01b03163314611eb8565b506020813d602011611faa575b81611f9160209383612890565b8101031261020e57611fa5611ec291612a2d565b611f62565b3d9150611f84565b3461020e5760e036600319011261020e57366023121561020e57604051611fda60a082612890565b803660a41161020e576004905b60a482106121d8578260a4356001600160401b03811161020e573660238201121561020e57806004013561201a816129a9565b916120286040519384612890565b8183526024602084019260051b8201019036821161020e5760248101925b8284106121a9578560c435866001600160401b03821161020e573660238301121561020e5781600401359161207a836129a9565b926120886040519485612890565b8084526024602085019160051b8301019136831161020e57602401905b82821061219157505060015460081c6001600160a01b03169050338114801561211a575b6120d39150612a41565b60ff60285460081c166120e95761000f92613f31565b60405162461bcd60e51b815260206004820152600960248201526819195c1bdcda5d195960ba1b6044820152606490fd5b50602060049160405192838092631113f57f60e01b82525afa801561045957600090612156575b6120d391506001600160a01b031633146120c9565b506020813d602011612189575b8161217060209383612890565b8101031261020e576121846120d391612a2d565b612141565b3d9150612163565b6020809161219e84612925565b8152019101906120a5565b83356001600160401b03811161020e576020916121cd83926024369187010161298b565b815201930192612046565b602080916121e584612925565b815201910190611fe7565b3461020e57600036600319011261020e5760018060a01b0360015460081c16602554604051906331a9108f60e11b82526004820152602081602481855afa801561045957600090612570575b61225191506001600160a01b03163314612a7b565b60405163e3429bb360e01b81526020600482015260008160235461227481612820565b9081602484015260018116908160001461254e5750600114612505575b50806020920381855afa908115610459576000916124d3575b50604051637dbfd74960e11b81526004810182905260a081602481865afa9081156104595760009161249a575b50604051632131d8a960e01b81526004810183905291600083602481875afa928315610459576000936123fc575b5060009060246040518096819363044990b560e41b835260048301525afa9081156104595760009161233c575b61000f9350613f31565b903d8082863e61234c8186612890565b8401936020818603126123f4578051906001600160401b0382116123f8570184601f820112156123f4578051612381816129a9565b9261238f6040519485612890565b81845260208085019260051b840101928784116123f45760208101925b8484106123c357505050505061000f935090612332565b83516001600160401b0381116123f0576020916123e58b848094870101612c26565b8152019301926123ac565b8380fd5b5080fd5b8280fd5b9290923d8083833e61240e8183612890565b8101906020818303126123f8578051906001600160401b0382116123f0570181601f820112156123f857805190612444826129a9565b936124526040519586612890565b82855260208086019360051b830101938411611adf5750602001905b828210612482575050506000909290612305565b6020809161248f84612a2d565b81520191019061246e565b905060a03d60a0116124cc575b6124b18183612890565b810160a08282031261020e576124c691612bd7565b836122d7565b503d6124a7565b906020823d6020116124fd575b816124ed60209383612890565b81010312611adf575051826122aa565b3d91506124e0565b60236000908152919250600080516020614d6b8339815191525b81831061253457505081016044019080612291565b80548386016044015284935060209092019160010161251f565b60ff191660448085019190915291151560051b83019091019250819050612291565b506020813d6020116125a3575b8161258a60209383612890565b8101031261020e5761259e61225191612a2d565b61223c565b3d915061257d565b3461020e57602036600319011261020e5760015460081c6001600160a01b031633811480156125e9575b6125de90612a41565b61000f600435613e4f565b50602060049160405192838092631113f57f60e01b82525afa801561045957600090612625575b6125de91506001600160a01b031633146125d5565b506020813d602011612658575b8161263f60209383612890565b8101031261020e576126536125de91612a2d565b612610565b3d9150612632565b3461020e57600036600319011261020e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461020e57600036600319011261020e576020602554604051908152f35b3461020e57608036600319011261020e576126dc6128f9565b506126e561290f565b506064356001600160401b03811161020e5761270590369060040161298b565b50604051630a85bd0160e11b8152602090f35b3461020e57600036600319011261020e576020602654604051908152f35b3461020e57600036600319011261020e576040516022546000908161275a82612820565b80855291600181169081156103805750600114612781576103318461031d81860382612890565b602281527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510939250905b8082106127c45750909150810160200161031d8261030d565b9192600181602092548385880101520191019092916127ab565b3461020e57600036600319011261020e577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b90600182811c92168015612850575b602083101461283a57565b634e487b7160e01b600052602260045260246000fd5b91607f169161282f565b604081019081106001600160401b03821117610f2c57604052565b60a081019081106001600160401b03821117610f2c57604052565b90601f801991011681019081106001600160401b03821117610f2c57604052565b60005b8381106128c45750506000910152565b81810151838201526020016128b4565b906020916128ed815180928185528580860191016128b1565b601f01601f1916010190565b600435906001600160a01b038216820361020e57565b602435906001600160a01b038216820361020e57565b35906001600160a01b038216820361020e57565b6001600160401b038111610f2c57601f01601f191660200190565b92919261296082612939565b9161296e6040519384612890565b82948184528183011161020e578281602093846000960137010152565b9080601f8301121561020e578160206129a693359101612954565b90565b6001600160401b038111610f2c5760051b60200190565b602060031982011261020e57600435906001600160401b03821161020e578060238301121561020e578160246129a693600401359101612954565b906000905b60058210612a0d57505050565b82516001600160a01b031681526020928301926001929092019101612a00565b51906001600160a01b038216820361020e57565b15612a4857565b60405162461bcd60e51b815260206004820152600b60248201526a6e6f7420666163746f727960a81b6044820152606490fd5b15612a8257565b60405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606490fd5b60175460009291612ac382612820565b8082529160018116908115612b385750600114612ade575050565b601760009081529293509091907fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c155b838310612b1e575060209250010190565b600181602092949394548385870101520191019190612b0d565b9050602093945060ff929192191683830152151560051b010190565b60009291815491612b6483612820565b8083529260018116908115612bba5750600114612b8057505050565b60009081526020812093945091925b838310612ba0575060209250010190565b600181602092949394548385870101520191019190612b8f565b915050602093945060ff929192191683830152151560051b010190565b9080601f8301121561020e5760405191612bf260a084612890565b829060a0810192831161020e57905b828210612c0e5750505090565b60208091612c1b84612a2d565b815201910190612c01565b81601f8201121561020e578051612c3c81612939565b92612c4a6040519485612890565b8184526020828401011161020e576129a691602080850191016128b1565b5190811515820361020e57565b60165460018054909291839160081c6001600160a01b03169060005b818110612c9f575050509190565b600a8110156104d057600181901b6003810154604051630b46ca7b60e41b81526001600160a01b039091166004820181905291602082602481895afa91821561045957600092612d8f575b50602090612d17936040518080968194630395834f60e11b83528660048401526024830190600201612b54565b03915afa91821561045957600092612d54575b508015612d4c575b508015612d43575b50600101612c91565b95506001612d3a565b945038612d32565b90916020823d8211612d87575b81612d6e60209383612890565b81010312611adf5750612d8090612c68565b9038612d2a565b3d9150612d61565b90916020823d8211612dcb575b81612da960209383612890565b81010312611adf5750612d179291612dc2602092612c68565b92935090612cea565b3d9150612d9c565b3d15612dfe573d90612de482612939565b91612df26040519384612890565b82523d6000602084013e565b606090565b818110612e0e575050565b60008155600101612e03565b9190820180921161089f57565b60009060ff6001541660048110156114225760038103612e7c57506001908190602c54151580612e70575b80612e65575b612e5f575b565b92508192565b50602b541515612e58565b50602b54431015612e52565b60009160009160265490811515908161311d575b81613112575b5061301f575b508315612ea557565b6016546000805b828110612eb857505050565b801580801580613002575b50612f07575b5086612ed757600101612eac565b9293509350506000926001820180921161089f5760648202918083046064149015171561089f576129a691612e1a565b96509050600a8110156104d0578060011b90612f54604060018060a01b03600385015416936000948251808095819463022c86eb60e11b8352602060048401526024830190600201612b54565b03915afa8015612ff75783918491612fb8575b50928198899281612fb0575b50612f7f575b50612ec9565b9050612f89612c75565b15908115612fa7575b50612f9f575b8790612f79565b965038612f98565b90501538612f92565b905038612f73565b9150506040813d8211612fef575b81612fd360409383612890565b810103126123f8576020612fe682612c68565b91015138612f67565b3d9150612fc6565b6040513d85823e3d90fd5b905080613010575b38612ec3565b5060ff60285460081c1661300a565b61302d919450602754612e1a565b421015928361303d575b38612e9c565b60006016545b808210613051575050613037565b909450600a8510156104d0578461309d9560011b602060018060a01b036003830154169160009260405180809b8194636e04ff0d60e01b83528660048401526024830190600201612b54565b03915afa9687156131055781976130c6575b5086156130c0575060010190613043565b95505050565b9096506020813d82116130fd575b816130e160209383612890565b810103126130f9576130f290612c68565b95386130af565b8680fd5b3d91506130d4565b50604051903d90823e3d90fd5b600291501438612e96565b905060ff60285460081c168015613135575b90612e90565b5061313e613185565b61312f565b8051156104d05760200190565b8051600110156104d05760400190565b80518210156104d05760209160051b010190565b9060058110156104d05760051b0190565b6040516131958161065081612ab3565b805181019060a08183031261020e576020806131b393019101612bd7565b60005b600581106131c5575050600090565b6001600160a01b036131d78284613174565b51166131e6575b6001016131b6565b602460206001600160a01b036131fc8486613174565b5116604051928380926370a0823160e01b82523060048301525afa9081156104595760009161326a575b50801515908161323e575b50156131de575050600190565b90506001600160a01b036132528385613174565b5116600052602d602052604060002054111538613231565b906020823d8211613293575b8161328360209383612890565b81010312611adf57505138613226565b3d9150613276565b91906101408382031261020e578060a06132b86129a69386612bd7565b9401612bd7565b156132c657565b60405162461bcd60e51b815260206004820152601560248201527418dbdb999a59dd5c985d1a5bdb881a5b9d985b1a59605a1b6044820152606490fd5b919080519283516001600160401b038111610f2c576133228254612820565b601f81116133fe575b506020601f821160011461339557908061336092600195969760009261338a5750508160011b916000199060031b1c19161790565b81555b0190602060018060a01b03910151166bffffffffffffffffffffffff60a01b825416179055565b015190503880610e2f565b601f1982169583600052816000209660005b8181106133e657509160019596979184879594106133cd575b505050811b018155613363565b015160001960f88460031b161c191690553880806133c0565b838301518955600190980197602093840193016133a7565b61342a90836000526020600020601f840160051c81019160208510610f2257601f0160051c0190612e03565b3861332b565b600154604051631113f57f60e01b8152600091600881901c6001600160a01b031691602081600481865afa8015610459576000906139da575b60ff92909216926004841015929091506001600160a01b0316826114225783156139ac5760285460ff81166137f3575b5060206025546024604051809581936331a9108f60e11b835260048301525afa918215610459576000926137b7575b508415806136c6575b613553575b505050501561350a575b604051906134ef604083612890565b60088252676e6f74206175746f60c01b602083015260009190565b613512612e27565b8291939261352357505090506134e0565b6040519363373be68360e11b60208601521515602485015260448401526044835261354f606484612890565b9190565b61355b612c75565b60405163276a479b60e11b81526001600160a01b0390941660048501819052919390929190602081602481865afa9081156104595760009161368c575b50159384613683575b5083156135ff575b5050506135b8575b80806134d6565b611422576002146135ca5738806135b1565b506040519063373be68360e11b60208301526001602483015260056044830152604482526135f9606483612890565b60019190565b602091929350602460405180948193632ac5308160e11b835260048301525afa90811561045957600091613649575b50159081613640575b503880806135a9565b90501538613637565b90506020813d60201161367b575b8161366460209383612890565b8101031261020e5761367590612c68565b3861362e565b3d9150613657565b159350386135a1565b90506020813d6020116136be575b816136a760209383612890565b8101031261020e576136b890612c68565b38613598565b3d915061369a565b5060405163276a479b60e11b81526001600160a01b0383166004820181905290602081602481865afa9081156104595760009161377d575b501590811561370e575b506134d1565b905060405190632ac5308160e11b82526004820152602081602481855afa90811561045957600091613743575b501538613708565b90506020813d602011613775575b8161375e60209383612890565b8101031261020e5761376f90612c68565b3861373b565b3d9150613751565b90506020813d6020116137af575b8161379860209383612890565b8101031261020e576137a990612c68565b386136fe565b3d915061378b565b9091506020813d6020116137eb575b816137d360209383612890565b8101031261020e576137e490612a2d565b90386134c8565b3d91506137c6565b60405163d9398c7360e01b81524790602081600481885afa9081156104595760009161396d575b5060405163e21a74b960e01b815290602090829060049082906001600160a01b03165afa9081156104595760009161393b575b50808210156138b557505083611422576002851490816138a7575b50613874575b38613499565b50505050506040519063373be68360e11b60208301526001602483015260036044830152604482526135f9606483612890565b60ff915060081c1638613868565b600095509150600186146138cb575b505061386e565b118061392d575b6138de575b38806138c4565b6138e6612c75565b81613925575b50156138d75750505050506040519063373be68360e11b60208301526000602483015260046044830152604482526135f9606483612890565b9050386138ec565b50613936613185565b6138d2565b906020823d602011613965575b8161395560209383612890565b81010312611adf5750513861384d565b3d9150613948565b90506020813d6020116139a4575b8161398860209383612890565b8101031261020e57602061399d600492612a2d565b915061381a565b3d915061397b565b5050505050604051906139c0604083612890565b60078252661b9bc818d85b1b60ca1b602083015260009190565b506020813d602011613a0c575b816139f460209383612890565b8101031261020e57613a0760ff91612a2d565b613469565b3d91506139e7565b602a54600a8110156104d057613a609060011b608060018060a01b0360038301541691600092604051808096819463b076cfdd60e01b8352602060048401526024830190600201612b54565b03915afa918215613105578192613aae575b508151602083019384519460606040860151950193845194600019905114600014613aa257505160029594939291565b60019695949392909150565b90915060803d608011613b20575b613ac68183612890565b81016080828203126123f85780601f830112156123f85760405191613aec608084612890565b829060808101928311613b1c57905b828210613b0c575050509038613a72565b8151815260209182019101613afb565b8480fd5b503d613abc565b919060a08301926000905b60058210613b3f57505050565b6020806001928551815201930191019091613b32565b6001600160a01b0390911681526060602082018190526129a6939192613b7d91840190612b54565b9160408184039101526128d4565b60009060ff60285460081c1615613e1d57611246613bdd604051613bae81612875565b600081526000602082015260006040820152600060608201526000608082015260405192839160208301613b27565b6001601654915b828210613d735750505060285460ff8160181c16600014613d695750613c08613a14565b5050602b55602c5560015490915060ff8116600481101561142257600314613cdf575b506001546040516318b770eb60e31b81529091602082600481600887901c6001600160a01b03165afa91821561045957600092613cab575b5011613c86575061ff001960285416602855612e5d600160ff1981541617600155565b60ff16600481101561142257600314612e5d57612e5d600360ff196001541617600155565b9091506020813d602011613cd7575b81613cc760209383612890565b8101031261020e57519038613c63565b3d9150613cba565b6025546040516331a9108f60e11b81526004810191909152906020908290602490829060081c6001600160a01b03165afa801561045957600090613d2e575b613d289150614c4b565b38613c2b565b506020813d602011613d61575b81613d4860209383612890565b8101031261020e57613d5c613d2891612a2d565b613d1e565b3d9150613d3b565b61ff001916602855565b600a8210156104d057600080918360011b611246613dba60018060a01b0360038401541693604051928391602083019563ec6cf1eb60e01b87526002018760248501613b55565b51915af4613dc6612dd3565b9015613dd757600190910190613be4565b610869613de383614a20565b610849603460405180937303bb4ba34323930bb903330b4b632b21030ba1d160651b602083015261083881518092602086860191016128b1565b60405162461bcd60e51b815260206004820152600a6024820152696e6f2062616c616e636560b01b6044820152606490fd5b9060009160ff60285460081c1615613e1d57613ea26112469160405190613e7582612875565b81526000602082015260006040820152600060608201526000608082015260405192839160208301613b27565b6001601654915b828210613ecd5750505060285460ff8160181c16600014613d695750613c08613a14565b600a8210156104d057600080918360011b611246613f1460018060a01b0360038401541693604051928391602083019563ec6cf1eb60e01b87526002018760248501613b55565b51915af4613f20612dd3565b9015613dd757600190910190613ea9565b91909182518251036146b35760025b60168110614649575060405160a0906000613f5b8383612890565b50813682375081600060405190613f728483612890565b50823682375060ff196028541660285560006020604051613f928161285a565b60608152015283519384601655600091600019860193868511935b878110613fec57505050505050505050613fc5613a14565b94935050505063ff0000006001602854921460181b169063ff000000191617602855602955565b60049260006001600160a01b036140038488613160565b5116604051958680926330fe427560e21b82525afa93841561045957600094614607575b5083518690156144c35761089f578187036144a35783518401838582031261020e576020614059910160208601612bd7565b90614098602083965b6001600160a01b03614074878b613160565b5116604051808095819463a913b88160e01b835286600484015260248301906128d4565b03915afa801561045957600090614469575b6140b491506132bf565b60005b600581106143f757505050826140cd828b613160565b516001600160a01b036140e08488613160565b5116604051916140ef8361285a565b82526020820152600a8310156104d05761410f908360011b600201613303565b8560285460ff81161580614367575b614357575b5061089f5786821461416b575b508060019115614153575b61414d600260ff196001541617600155565b01613fad565b614166614160828c613160565b51614b8f565b61413b565b60405161417b602082018a6129fb565b61418860c08201836129fb565b610140815261419961016082612890565b8051906001600160401b038211610f2c576141b5601754612820565b601f8111614308575b50602090601f8311600114614282576141ef92916000918361338a5750508160011b916000199060031b1c19161790565b6017555b60005b600581106142045750614130565b6001600160a01b03614216828b613174565b5116600a8210156104d0576018820180546001600160a01b0319166001600160a01b039283161790556142498284613174565b511690600a6005820110156104d057601d810180546001600160a01b0319166001600160a01b03909316929092179091556001016141f6565b90601f1983169160176000527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c159260005b8181106142f057509084600195949392106142d7575b505050811b016017556141f3565b015160001960f88460031b161c191690553880806142c9565b929360206001819287860151815501950193016142b3565b6017600052614351907fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15601f850160051c81019160208610610f2257601f0160051c0190612e03565b386141be565b60ff191660011760285538614123565b5060015460081c6001600160a01b039081169250602090614388868a613160565b5116602460405180958193637435d6f760e01b835260048301525afa80156104595788926000916143ba575b5061411e565b9192506020823d82116143ef575b816143d560209383612890565b81010312611adf5750906143e98892612c68565b386143b4565b3d91506143c8565b6001600160a01b036144098285613174565b51166001600160a01b0361441d8385613174565b51160361442c576001016140b7565b60405162461bcd60e51b81526020600482015260156024820152740d2dce0eae85edeeae8e0eae840dad2e6dac2e8c6d605b1b6044820152606490fd5b6020823d821161449b575b8161448160209383612890565b81010312611adf57506144966140b491612c68565b6140aa565b3d9150614474565b926020936140986144bb86845185010187850161329b565b969093614062565b90935061089f578086036145e4576144db818a613160565b518051810190838183031261020e576020806144f993019101612bd7565b80935b61454460208c614520866001600160a01b03614518828d613160565b511692613160565b5190604051808095819463a913b88160e01b835286600484015260248301906128d4565b03915afa908115610459576000916145ab575b506140b45761086961456884614a20565b610849603960405180937f636f6e66696775726174696f6e20696e76616c69642061743a00000000000000602083015261083881518092602086860191016128b1565b906020823d82116145dc575b816145c460209383612890565b81010312611adf57506145d690612c68565b38614557565b3d91506145b7565b6146016145f1828b613160565b516020808251830101910161329b565b936144fc565b90933d8082843e6146188184612890565b8201916020818403126123f4578051916001600160401b038311611adf5750614642929101612c26565b9238614027565b8061465660029254612820565b8061466a575b506000600182015501613f40565b601f81116001146146815750600081555b3861465c565b6146a090826000526001601f6020600020920160051c82019101612e03565b806000526000602081208183555561467b565b60405162461bcd60e51b815260206004820152601060248201526f0d2dce0eae8e64040dad2e6dac2e8c6d60831b6044820152606490fd5b600061474592819260405195602087019263a9059cbb60e01b845260018060a01b03166024880152604487015260448652614727606487612890565b60018060a01b031694519082865af161473e612dd3565b9083614d09565b805190811515918261476f575b505061475b5750565b635274afe760e01b60005260045260246000fd5b819250906020918101031261020e57602061478a9101612c68565b153880614752565b60405160a06147a18183612890565b803683376040516147b58161065081612ab3565b80518101918183031261020e576020806147d193019101612bd7565b60005b600581106148ca5750506147f46112469160405192839160208301613b27565b6001916003601654106148c1575b91905b6016548210156148b957600a8210156104d057600080918360011b61124661485660018060a01b03600384015416936040519283916020830195636989890360e01b87526002018760248501613b55565b51915af4614862612dd3565b901561487357600190910190614805565b61086961487f83614a20565b6108496034604051809373039ba3930ba32b3bc903330b4b632b21030ba1d160651b602083015261083881518092602086860191016128b1565b505042602755565b60009250614802565b6001600160a01b036148dc8284613174565b51166148eb575b6001016147d4565b602460206001600160a01b036149018486613174565b5116604051928380926370a0823160e01b82523060048301525afa908115610459576000916149ef575b50801515806149c4575b614940575b506148e3565b61494a8285613174565b5260285460ff8160081c16156149b2575b5060ff6001541690600482101561142257600180921461499b575b60285460ff8160101c1661498c575b509061493a565b62ff0000191660285538614985565b6149ad600260ff196001541617600155565b614976565b61ff001916610100176028553861495b565b506001600160a01b036149d78385613174565b5116600052602d602052604060002054811015614935565b906020823d8211614a18575b81614a0860209383612890565b81010312611adf5750513861492b565b3d91506149fb565b8060009172184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b821015614b6c575b806d04ee2d6d415b85acef8100000000600a921015614b51575b662386f26fc10000811015614b3d575b6305f5e100811015614b2c575b612710811015614b1d575b6064811015614b0f575b1015614b04575b600a60216001840193614aa885612939565b94614ab66040519687612890565b808652614ac5601f1991612939565b013660208701378401015b60001901916f181899199a1a9b1b9c1cb0b131b232b360811b8282061a8353048015614aff57600a9091614ad0565b505090565b600190910190614a96565b606460029104930192614a8f565b61271060049104930192614a85565b6305f5e10060089104930192614a7a565b662386f26fc1000060109104930192614a6d565b6d04ee2d6d415b85acef810000000060209104930192614a5d565b506040915072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8104614a43565b805181016101e0826020830192031261020e57614baf8160208401612bd7565b90614bbd8160c08501612bd7565b508061017f8401121561020e5760405192614bd960a085612890565b8390610200810192831161020e5761016001905b828210614c3b5750505060005b60058110614c0757505050565b80614c1460019285613174565b51828060a01b03614c258386613174565b5116600052602d60205260406000205501614bfa565b8151815260209182019101614bed565b6000915b600a831015614d045760188301546001600160a01b031692600084614c7a575b506001019250614c4f565b506040516370a0823160e01b815230600482015293602085602481845afa94851561045957600095614cce575b5084846001949596614cbd575b94935050614c6f565b614cc6926146eb565b388085614cb4565b6020813d8211614cfc575b81614ce660209383612890565b81010312614cf8575194506001614ca7565b8580fd5b3d9150614cd9565b915050565b90614d2f5750805115614d1e57805190602001fd5b630a12f52160e11b60005260046000fd5b81511580614d61575b614d40575090565b639996b31560e01b60009081526001600160a01b0391909116600452602490fd5b50803b15614d3856fed57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f4230a264697066735822122038e541fbb266852c990b99dbd458bc4a9ad5428f933246f630022093a25ed90164736f6c634300081c0033a26469706673582212205d9f3edad66223e0b6d7dd31f97388efc7cc89a8f853d046712a34020ceb43bd64736f6c634300081c0033000000000000000000000000bf0f3fc5750c4b9f36f827aa85587e400a157aef000000000000000000000000afd37d0558255aa687167560cd3aaeea75c2841e
Deployed Bytecode
0x608080604052600436101561001357600080fd5b600090813560e01c908163049aacfe1461028057508063c45a01551461023b5763faa202f11461004257600080fd5b60203660031901126102385760043567ffffffffffffffff81116101d157366023820112156101d15780600401359067ffffffffffffffff82116102245782604051916100996020601f19601f87011601846102c3565b8383526020830193366024828401011161022057806024602093018637830101527f000000000000000000000000bf0f3fc5750c4b9f36f827aa85587e400a157aef6001600160a01b031691338390036101ed576040828051810103126101e957604090519101519160405192615144928385019385851067ffffffffffffffff8611176101d55791859391608095936102fc86398352602083015260408201527f000000000000000000000000afd37d0558255aa687167560cd3aaeea75c2841e6001600160a01b0316606082015203019082f080156101c4576001600160a01b0316803b156101d15760405163a747649360e01b815291808360048134865af19283156101c4576020936101b4575b5050604051908152f35b816101be916102c3565b386101aa565b50604051903d90823e3d90fd5b5080fd5b634e487b7160e01b87526041600452602487fd5b8380fd5b60405162461bcd60e51b815260206004820152600b60248201526a6e6f7420666163746f727960a81b6044820152606490fd5b8280fd5b634e487b7160e01b83526041600452602483fd5b80fd5b50346102385780600319360112610238576040517f000000000000000000000000bf0f3fc5750c4b9f36f827aa85587e400a157aef6001600160a01b03168152602090f35b9050346101d157816003193601126101d1577f000000000000000000000000afd37d0558255aa687167560cd3aaeea75c2841e6001600160a01b03168152602090f35b90601f8019910116810190811067ffffffffffffffff8211176102e557604052565b634e487b7160e01b600052604160045260246000fdfe60e0806040523461026257608081615144803803809161001f8285610336565b83398101031261026257805160208201519161003d6040820161036f565b906001600160a01b03906100539060600161036f565b16608081905260405163573ea57560e01b8152602081600481855afa90811561021f576000916102ef575b506040516331056e5760e21b815290602090829060049082906001600160a01b03165afa90811561021f576000916102ae575b5060c05260405163cd3d4fb960e01b81526002600482015290602090829060249082905afa90811561021f5760009161026f575b50604051632e8743fd60e21b815290602090829060049082906001600160a01b03165afa90811561021f5760009161022b575b50604080516337b6269f60e21b815230600482015291829060249082906001600160a01b03165afa90811561021f576000916101d5575b5060a05260018054610100600160a81b03191660089290921b610100600160a81b03169190911790556025556028805462ff0000191662010000179055602a55604051614dc0908161038482396080518181816113580152818161199c01526127f1015260a0518181816118ea0152612676015260c051818181611a040152611a810152f35b906040823d604011610217575b816101ef60409383610336565b810103126102145760206102028361036f565b9201518015150361021457503861014f565b80fd5b3d91506101e2565b6040513d6000823e3d90fd5b90506020813d602011610267575b8161024660209383610336565b8101031261026257604061025b60249261036f565b9150610118565b600080fd5b3d9150610239565b90506020813d6020116102a6575b8161028a60209383610336565b8101031261026257602061029f60049261036f565b91506100e5565b3d915061027d565b90506020813d6020116102e7575b816102c960209383610336565b81010312610262576024916102df60209261036f565b9150916100b1565b3d91506102bc565b6020813d60201161032e575b8161030860209383610336565b8101031261032a5751906001600160a01b03821682036102145750602061007e565b5080fd5b3d91506102fb565b601f909101601f19168101906001600160401b0382119082101761035957604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036102625756fe6080806040526004361015610011575b005b60003560e01c908163049aacfe146127de5750806306fdde03146127365780630fa5ef7014612718578063150b7a02146126c3578063189e17e4146126a557806328f150eb146126605780632e1a7d4d146125ab5780632fddd913146121f0578063349b0cf114611fb25780633aeac4e114611e7b5780633f4ba83a14611d6d578063405d638e14611d425780634e69d56014611d1857806354934b2414611c6657806357fb1d6714611c375780635f498bdb14611b815780636e77cd06146118c6578063760a8c2a146117b55780638456cb591461167657806392edefe414611653578063a016b2cd146114a9578063a351616a14611477578063a747649314611178578063bf64a82d1461104d578063c23716ec14611028578063c39368ee1461100a578063c3f909d414610fe6578063c45a015514610fb9578063c47f002714610dbe578063cd5b07c014610964578063cf5303cf1461092c578063d0e30db01461076c578063d2e636331461068a578063d6273e68146104e6578063db11e47214610465578063df641c9c146103a7578063e173ad25146102d1578063e531fd19146102b3578063e7ccd0ad14610279578063eef49ee314610253578063f26af5c3146102135763fe75154b146101e857005b3461020e57600036600319011261020e57602060ff60285460101c166040519015158152f35b600080fd5b3461020e57600036600319011261020e5760c061022e613a14565b93604093919351958652602086015260408501526060840152608083015260a0820152f35b3461020e57600036600319011261020e57602060ff60285460081c166040519015158152f35b3461020e57602036600319011261020e576001600160a01b0361029a6128f9565b16600052602d6020526020604060002054604051908152f35b3461020e57600036600319011261020e576020602754604051908152f35b3461020e57600036600319011261020e57604051602354600090816102f582612820565b80855291600181169081156103805750600114610335575b6103318461031d81860382612890565b6040519182916020835260208301906128d4565b0390f35b60238152600080516020614d6b833981519152939250905b8082106103665750909150810160200161031d8261030d565b91926001816020925483858801015201910190929161034d565b60ff191660208087019190915292151560051b8501909201925061031d915083905061030d565b3461020e57602036600319011261020e5760015460081c6001600160a01b031633811480156103e2575b6103da90612a41565b600435602455005b50602060049160405192838092631113f57f60e01b82525afa80156104595760009061041e575b6103da91506001600160a01b031633146103d1565b506020813d602011610451575b8161043860209383612890565b8101031261020e5761044c6103da91612a2d565b610409565b3d915061042b565b6040513d6000823e3d90fd5b3461020e57600036600319011261020e5760a06040516104858282612890565b8136823760005b600581106104a457506104a260405180926129fb565bf35b600a8110156104d0576018810154600191906001600160a01b03166104c98285613174565b520161048c565b634e487b7160e01b600052603260045260246000fd5b3461020e57600036600319011261020e57601654610503816129a9565b6105106040519182612890565b81815261051c826129a9565b602082019290601f1901368437610532816129a9565b906105406040519283612890565b808252601f1961054f826129a9565b0160005b81811061067757505060005b8181106106115750506040519283926040840190604085525180915260608401919060005b8181106105ef575050508281036020840152815180825260208201916020808360051b8301019401926000915b8383106105be5786860387f35b9193955091936020806105dd600193601f1986820301875289516128d4565b970193019301909286959492936105b1565b82516001600160a01b0316845286955060209384019390920191600101610584565b600a819593949510156104d05780610650610657600193841b848060a01b03600382015416610640858b613160565b5260405192838092600201612b54565b0382612890565b6106618287613160565b5261066c8186613160565b50019392919361055f565b6060602082860181019190915201610553565b3461020e57602036600319011261020e576106a36128f9565b60015460081c6001600160a01b031633811480156106f5575b6106c69150612a41565b6106cf81614c4b565b4790816106d857005b6000918291829182916001600160a01b03165af15061000f612dd3565b50602060049160405192838092631113f57f60e01b82525afa801561045957600090610731575b6106c691506001600160a01b031633146106bc565b506020813d602011610764575b8161074b60209383612890565b8101031261020e5761075f6106c691612a2d565b61071c565b3d915061073e565b3461020e57600036600319011261020e5760015460081c6001600160a01b031633811480156108b5575b6107a09150612a41565b5a6107a9614792565b5a810390811161089f57600154604051636ce58a3960e11b8152906020908290600490829060081c6001600160a01b03165afa9081156104595760009161086d575b5081116107f457005b61080061086991614a20565b6108496032604051809371032bc31b2b2b21033b0b9903634b6b4ba1d160751b602083015261083881518092602086860191016128b1565b81010301601f198101835282612890565b60405162461bcd60e51b81526020600482015291829160248301906128d4565b0390fd5b90506020813d602011610897575b8161088860209383612890565b8101031261020e5751826107eb565b3d915061087b565b634e487b7160e01b600052601160045260246000fd5b50602060049160405192838092631113f57f60e01b82525afa8015610459576000906108f1575b6107a091506001600160a01b03163314610796565b506020813d602011610924575b8161090b60209383612890565b8101031261020e5761091f6107a091612a2d565b6108dc565b3d91506108fe565b3461020e57600036600319011261020e57610945613430565b90610331604051928392151583526040602084015260408301906128d4565b3461020e57606036600319011261020e576004356024356001600160401b03811161020e5761099790369060040161298b565b906044356001600160a01b0381169081900361020e5760015460081c6001600160a01b03163381148015610d4c575b6109cf90612a41565b60405160a0919060006109e28483612890565b50823682375060405160006109f78483612890565b5082368237506040516000610a0c8483612890565b5082368237506040516000610a218483612890565b508236823750601654600019810190811161089f578403610cfc57600a8410156104d057604051610a5c81610650818860011b600201612b54565b8051810190838183031261020e57602080610a7993019101612bd7565b91829086518701908782031261020e576020610a99910160208801612bd7565b80925b6028549060ff8216159081610c8c575b50610c7c575b5060005b60058110610b7c5787878760405163a913b88160e01b81526020600482015260208180610ae660248201886128d4565b0381855afa801561045957600090610b41575b610b0391506132bf565b60405190610b108261285a565b8382526020820152600a8210156104d057610b31908260011b600201613303565b15610b3857005b61000f90614b8f565b506020813d602011610b74575b81610b5b60209383612890565b8101031261020e57610b6f610b0391612c68565b610af9565b3d9150610b4e565b6001600160a01b03610b8e8287613174565b51166001600160a01b03610ba28385613174565b511603610c2d576001600160a01b03610bbb8285613174565b51166001600160a01b03610bcf8387613174565b511603610bde57600101610ab6565b610bea61086991614a20565b610849603c60405180937f63757272656e74206f7574707574206469736d617463682061743a2000000000602083015261083881518092602086860191016128b1565b610c3961086991614a20565b610849603b60405180937f63757272656e7420696e707574206469736d617463682061743a200000000000602083015261083881518092602086860191016128b1565b60ff191660011760285587610ab2565b6024915060209060405192838092637435d6f760e01b82528b60048301525afa90811561045957600091610cc2575b5089610aac565b90506020813d602011610cf4575b81610cdd60209383612890565b8101031261020e57610cee90612c68565b89610cbb565b3d9150610cd0565b9050600a8310156104d057610d30604051610d2181610650818860011b600201612b54565b6020808251830101910161329b565b919091610d46602087518801016020880161329b565b92610a9c565b50604051631113f57f60e01b8152602081600481855afa801561045957600090610d83575b6001600160a01b0316331490506109c6565b506020813d602011610db6575b81610d9d60209383612890565b8101031261020e57610db16109cf91612a2d565b610d71565b3d9150610d90565b3461020e57610dcc366129c0565b60015460081c6001600160a01b03163381148015610f42575b610def9150612a41565b80516001600160401b038111610f2c57610e0a602254612820565b601f8111610ed2575b50602091601f8211600114610e5457610e449260009183610e49575b50508160011b916000199060031b1c19161790565b602255005b015190508380610e2f565b601f1982169260226000527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e5109160005b858110610eba57508360019510610ea1575b505050811b01602255005b015160001960f88460031b161c19169055828080610e96565b91926020600181928685015181550194019201610e84565b6022600052610f1c907f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510601f840160051c81019160208510610f22575b601f0160051c0190612e03565b82610e13565b9091508190610f0f565b634e487b7160e01b600052604160045260246000fd5b50602060049160405192838092631113f57f60e01b82525afa801561045957600090610f7e575b610def91506001600160a01b03163314610de5565b506020813d602011610fb1575b81610f9860209383612890565b8101031261020e57610fac610def91612a2d565b610f69565b3d9150610f8b565b3461020e57600036600319011261020e5760015460405160089190911c6001600160a01b03168152602090f35b3461020e57600036600319011261020e5761033160405161031d8161065081612ab3565b3461020e57600036600319011261020e576020602454604051908152f35b3461020e57600036600319011261020e576020611043613185565b6040519015158152f35b3461020e57604036600319011261020e576110666128f9565b6024356001600160401b03811161020e5761108590369060040161298b565b60018060a01b0360015460081c168033149081156110f5575b50906000926110ad8493612a41565b82602083519301915af16110bf612dd3565b50156110c757005b60405162461bcd60e51b815260206004820152600660248201526519985a5b195960d21b6044820152606490fd5b604051631113f57f60e01b81529150602090829060049082905afa90811561045957600091611132575b506001600160a01b03163314600061109e565b9190506020823d602011611170575b8161114e60209383612890565b8101031261020e576000926110ad6111668594612a2d565b929350509261111f565b3d9150611141565b600036600319011261020e5760005461144857606060405161119a8282612890565b60028152601f1982013660208301376040519060606111b98184612890565b6002835283908390601f190160005b818110611438576040516112d8858560006111f58a6111e68761285a565b80875260208701938452613143565b5260026112028551613150565b5261126661124661125460405163cf5303cf60e01b60208201526004815261122b602482612890565b604051928391306020840152604080840152878301906128d4565b03601f198101835282612890565b82519061126082613143565b52613143565b50602093849261129260405161127c8682612890565b6000815284519061128c82613150565b52613150565b506040519263373be68360e11b858501528484526112b1604085612890565b604051633323b46760e01b81523060048201526080602482015295869460848601906128d4565b926003198585030160448601528560408501915193604086528451809352850193019060005b8181106113f45750505051918481830391015281518082528482019185808360051b8301019401926000915b8383106113c657505073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60648601525050508190038160007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af191821561045957600092611398575b6000839055005b90809250813d83116113bf575b6113af8183612890565b8101031261020e57518180611391565b503d6113a5565b9295509295806113e360019396601f1986820301875289516128d4565b97019301930187959387959261132a565b92949650929080955051906006821015611422578881600193829352019501910190869492889694926112fe565b634e487b7160e01b600052602160045260246000fd5b60208184018101859052016111c8565b60405162461bcd60e51b8152602060048201526007602482015266616c726561647960c81b6044820152606490fd5b3461020e57600036600319011261020e576060611492612e27565b906040519215158352151560208301526040820152f35b3461020e576114b7366129c0565b60015460081c6001600160a01b031633811480156115dc575b6114da9150612a41565b80516001600160401b038111610f2c576114f5602354612820565b601f811161159f575b50602091601f82116001146115335761152e9260009183610e495750508160011b916000199060031b1c19161790565b602355005b601f198216926023600052600080516020614d6b8339815191529160005b8581106115875750836001951061156e575b505050811b01602355005b015160001960f88460031b161c19169055828080611563565b91926020600181928685015181550194019201611551565b60236000526115d690600080516020614d6b833981519152601f840160051c81019160208510610f2257601f0160051c0190612e03565b826114fe565b50602060049160405192838092631113f57f60e01b82525afa801561045957600090611618575b6114da91506001600160a01b031633146114d0565b506020813d60201161164b575b8161163260209383612890565b8101031261020e576116466114da91612a2d565b611603565b3d9150611625565b3461020e57600036600319011261020e57602060ff602854166040519015158152f35b3461020e57600036600319011261020e57600154600881901c6001600160a01b0316338114801561173e575b6116ac9150612a41565b60ff602854166117085760ff166004811015611422576002036116d5576001805460ff19169055005b60405162461bcd60e51b815260206004820152600b60248201526a1b9bdd081b585b9859d95960aa1b6044820152606490fd5b60405162461bcd60e51b815260206004820152600e60248201526d68696768207269736b2073696c6f60901b6044820152606490fd5b50602060049160405192838092631113f57f60e01b82525afa80156104595760009061177a575b6116ac91506001600160a01b031633146116a2565b506020813d6020116117ad575b8161179460209383612890565b8101031261020e576117a86116ac91612a2d565b611765565b3d9150611787565b3461020e57600036600319011261020e576001546001600160a01b03600882901c1633811491908215611844575b506117ef60ff92612a41565b166004811015611422576003036118125761000f600260ff196001541617600155565b60405162461bcd60e51b815260206004820152600a6024820152691b9bdd081d5b9dda5b9960b21b6044820152606490fd5b604051631113f57f60e01b81529250602090839060049082905afa91821561045957600092611886575b506001600160a01b03919091163314906117ef6117e3565b91506020823d6020116118be575b816118a160209383612890565b8101031261020e576117ef6118b760ff93612a2d565b925061186e565b3d9150611894565b3461020e57604036600319011261020e5760043580151580820361020e57602435917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303611b565715611b245760ff60015416906004821015611422577f84a2401bd1b19b99661ef428440a33df125822e97cf2dc91257d873e07f803a592600360609303611b0e575b60ff60285460081c16611b00575b6101328114611aea575b6025549160405192835260208301526040820152a160408051635c08631b60e11b815290816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa8015610459576000918291611aa6575b506001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8103611a7a57506000808080937f00000000000000000000000000000000000000000000000000000000000000005af1611a2d612dd3565b5015611a3557005b60405162461bcd60e51b815260206004820152601e60248201527f5f7472616e736665723a20455448207472616e73666572206661696c656400006044820152606490fd5b9061000f917f0000000000000000000000000000000000000000000000000000000000000000906146eb565b9190506040823d604011611ae2575b81611ac260409383612890565b81010312611adf5750611ad9602082519201612a2d565b826119d6565b80fd5b3d9150611ab5565b611af2613a14565b945050505050602955611972565b611b08613b8b565b50611968565b611b1f600160ff1981541617600155565b61195a565b6060907f84a2401bd1b19b99661ef428440a33df125822e97cf2dc91257d873e07f803a592611b51614792565b611968565b60405162461bcd60e51b81526020600482015260036024820152621b9bdd60ea1b6044820152606490fd5b3461020e57600036600319011261020e5760018060a01b0360015460081c1660206025546024604051809481936331a9108f60e11b835260048301525afa801561045957600090611bfc575b611be291506001600160a01b03163314612a7b565b4780611bea57005b600080808093335af15061000f612dd3565b506020813d602011611c2f575b81611c1660209383612890565b8101031261020e57611c2a611be291612a2d565b611bcd565b3d9150611c09565b3461020e57600036600319011261020e576020604051737506c12a824d73d9b08564d5afc22c949434755e8152f35b3461020e57602036600319011261020e5760015460081c6001600160a01b03163381148015611ca1575b611c9990612a41565b600435602655005b50602060049160405192838092631113f57f60e01b82525afa801561045957600090611cdd575b611c9991506001600160a01b03163314611c90565b506020813d602011611d10575b81611cf760209383612890565b8101031261020e57611d0b611c9991612a2d565b611cc8565b3d9150611cea565b3461020e57600036600319011261020e5760ff600154166040516004821015611422576020918152f35b3461020e57600036600319011261020e576040611d5d612c75565b8251911515825215156020820152f35b3461020e57600036600319011261020e576001546001600160a01b03600882901c1633811491908215611df9575b50611da760ff92612a41565b16600481101561142257611dc75761000f600260ff196001541617600155565b60405162461bcd60e51b815260206004820152600a6024820152691b9bdd081c185d5cd95960b21b6044820152606490fd5b604051631113f57f60e01b81529250602090839060049082905afa91821561045957600092611e3b575b506001600160a01b0391909116331490611da7611d9b565b91506020823d602011611e73575b81611e5660209383612890565b8101031261020e57611da7611e6c60ff93612a2d565b9250611e23565b3d9150611e49565b3461020e57604036600319011261020e57611e946128f9565b611e9c61290f565b60015490919060081c6001600160a01b03163381148015611f3b575b611ec29150612a41565b6040516370a0823160e01b8152306004820152916001600160a01b039190911690602083602481855afa91821561045957600092611f05575b61000f93506146eb565b91506020833d602011611f33575b81611f2060209383612890565b8101031261020e5761000f925191611efb565b3d9150611f13565b50602060049160405192838092631113f57f60e01b82525afa801561045957600090611f77575b611ec291506001600160a01b03163314611eb8565b506020813d602011611faa575b81611f9160209383612890565b8101031261020e57611fa5611ec291612a2d565b611f62565b3d9150611f84565b3461020e5760e036600319011261020e57366023121561020e57604051611fda60a082612890565b803660a41161020e576004905b60a482106121d8578260a4356001600160401b03811161020e573660238201121561020e57806004013561201a816129a9565b916120286040519384612890565b8183526024602084019260051b8201019036821161020e5760248101925b8284106121a9578560c435866001600160401b03821161020e573660238301121561020e5781600401359161207a836129a9565b926120886040519485612890565b8084526024602085019160051b8301019136831161020e57602401905b82821061219157505060015460081c6001600160a01b03169050338114801561211a575b6120d39150612a41565b60ff60285460081c166120e95761000f92613f31565b60405162461bcd60e51b815260206004820152600960248201526819195c1bdcda5d195960ba1b6044820152606490fd5b50602060049160405192838092631113f57f60e01b82525afa801561045957600090612156575b6120d391506001600160a01b031633146120c9565b506020813d602011612189575b8161217060209383612890565b8101031261020e576121846120d391612a2d565b612141565b3d9150612163565b6020809161219e84612925565b8152019101906120a5565b83356001600160401b03811161020e576020916121cd83926024369187010161298b565b815201930192612046565b602080916121e584612925565b815201910190611fe7565b3461020e57600036600319011261020e5760018060a01b0360015460081c16602554604051906331a9108f60e11b82526004820152602081602481855afa801561045957600090612570575b61225191506001600160a01b03163314612a7b565b60405163e3429bb360e01b81526020600482015260008160235461227481612820565b9081602484015260018116908160001461254e5750600114612505575b50806020920381855afa908115610459576000916124d3575b50604051637dbfd74960e11b81526004810182905260a081602481865afa9081156104595760009161249a575b50604051632131d8a960e01b81526004810183905291600083602481875afa928315610459576000936123fc575b5060009060246040518096819363044990b560e41b835260048301525afa9081156104595760009161233c575b61000f9350613f31565b903d8082863e61234c8186612890565b8401936020818603126123f4578051906001600160401b0382116123f8570184601f820112156123f4578051612381816129a9565b9261238f6040519485612890565b81845260208085019260051b840101928784116123f45760208101925b8484106123c357505050505061000f935090612332565b83516001600160401b0381116123f0576020916123e58b848094870101612c26565b8152019301926123ac565b8380fd5b5080fd5b8280fd5b9290923d8083833e61240e8183612890565b8101906020818303126123f8578051906001600160401b0382116123f0570181601f820112156123f857805190612444826129a9565b936124526040519586612890565b82855260208086019360051b830101938411611adf5750602001905b828210612482575050506000909290612305565b6020809161248f84612a2d565b81520191019061246e565b905060a03d60a0116124cc575b6124b18183612890565b810160a08282031261020e576124c691612bd7565b836122d7565b503d6124a7565b906020823d6020116124fd575b816124ed60209383612890565b81010312611adf575051826122aa565b3d91506124e0565b60236000908152919250600080516020614d6b8339815191525b81831061253457505081016044019080612291565b80548386016044015284935060209092019160010161251f565b60ff191660448085019190915291151560051b83019091019250819050612291565b506020813d6020116125a3575b8161258a60209383612890565b8101031261020e5761259e61225191612a2d565b61223c565b3d915061257d565b3461020e57602036600319011261020e5760015460081c6001600160a01b031633811480156125e9575b6125de90612a41565b61000f600435613e4f565b50602060049160405192838092631113f57f60e01b82525afa801561045957600090612625575b6125de91506001600160a01b031633146125d5565b506020813d602011612658575b8161263f60209383612890565b8101031261020e576126536125de91612a2d565b612610565b3d9150612632565b3461020e57600036600319011261020e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461020e57600036600319011261020e576020602554604051908152f35b3461020e57608036600319011261020e576126dc6128f9565b506126e561290f565b506064356001600160401b03811161020e5761270590369060040161298b565b50604051630a85bd0160e11b8152602090f35b3461020e57600036600319011261020e576020602654604051908152f35b3461020e57600036600319011261020e576040516022546000908161275a82612820565b80855291600181169081156103805750600114612781576103318461031d81860382612890565b602281527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e510939250905b8082106127c45750909150810160200161031d8261030d565b9192600181602092548385880101520191019092916127ab565b3461020e57600036600319011261020e577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b90600182811c92168015612850575b602083101461283a57565b634e487b7160e01b600052602260045260246000fd5b91607f169161282f565b604081019081106001600160401b03821117610f2c57604052565b60a081019081106001600160401b03821117610f2c57604052565b90601f801991011681019081106001600160401b03821117610f2c57604052565b60005b8381106128c45750506000910152565b81810151838201526020016128b4565b906020916128ed815180928185528580860191016128b1565b601f01601f1916010190565b600435906001600160a01b038216820361020e57565b602435906001600160a01b038216820361020e57565b35906001600160a01b038216820361020e57565b6001600160401b038111610f2c57601f01601f191660200190565b92919261296082612939565b9161296e6040519384612890565b82948184528183011161020e578281602093846000960137010152565b9080601f8301121561020e578160206129a693359101612954565b90565b6001600160401b038111610f2c5760051b60200190565b602060031982011261020e57600435906001600160401b03821161020e578060238301121561020e578160246129a693600401359101612954565b906000905b60058210612a0d57505050565b82516001600160a01b031681526020928301926001929092019101612a00565b51906001600160a01b038216820361020e57565b15612a4857565b60405162461bcd60e51b815260206004820152600b60248201526a6e6f7420666163746f727960a81b6044820152606490fd5b15612a8257565b60405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606490fd5b60175460009291612ac382612820565b8082529160018116908115612b385750600114612ade575050565b601760009081529293509091907fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c155b838310612b1e575060209250010190565b600181602092949394548385870101520191019190612b0d565b9050602093945060ff929192191683830152151560051b010190565b60009291815491612b6483612820565b8083529260018116908115612bba5750600114612b8057505050565b60009081526020812093945091925b838310612ba0575060209250010190565b600181602092949394548385870101520191019190612b8f565b915050602093945060ff929192191683830152151560051b010190565b9080601f8301121561020e5760405191612bf260a084612890565b829060a0810192831161020e57905b828210612c0e5750505090565b60208091612c1b84612a2d565b815201910190612c01565b81601f8201121561020e578051612c3c81612939565b92612c4a6040519485612890565b8184526020828401011161020e576129a691602080850191016128b1565b5190811515820361020e57565b60165460018054909291839160081c6001600160a01b03169060005b818110612c9f575050509190565b600a8110156104d057600181901b6003810154604051630b46ca7b60e41b81526001600160a01b039091166004820181905291602082602481895afa91821561045957600092612d8f575b50602090612d17936040518080968194630395834f60e11b83528660048401526024830190600201612b54565b03915afa91821561045957600092612d54575b508015612d4c575b508015612d43575b50600101612c91565b95506001612d3a565b945038612d32565b90916020823d8211612d87575b81612d6e60209383612890565b81010312611adf5750612d8090612c68565b9038612d2a565b3d9150612d61565b90916020823d8211612dcb575b81612da960209383612890565b81010312611adf5750612d179291612dc2602092612c68565b92935090612cea565b3d9150612d9c565b3d15612dfe573d90612de482612939565b91612df26040519384612890565b82523d6000602084013e565b606090565b818110612e0e575050565b60008155600101612e03565b9190820180921161089f57565b60009060ff6001541660048110156114225760038103612e7c57506001908190602c54151580612e70575b80612e65575b612e5f575b565b92508192565b50602b541515612e58565b50602b54431015612e52565b60009160009160265490811515908161311d575b81613112575b5061301f575b508315612ea557565b6016546000805b828110612eb857505050565b801580801580613002575b50612f07575b5086612ed757600101612eac565b9293509350506000926001820180921161089f5760648202918083046064149015171561089f576129a691612e1a565b96509050600a8110156104d0578060011b90612f54604060018060a01b03600385015416936000948251808095819463022c86eb60e11b8352602060048401526024830190600201612b54565b03915afa8015612ff75783918491612fb8575b50928198899281612fb0575b50612f7f575b50612ec9565b9050612f89612c75565b15908115612fa7575b50612f9f575b8790612f79565b965038612f98565b90501538612f92565b905038612f73565b9150506040813d8211612fef575b81612fd360409383612890565b810103126123f8576020612fe682612c68565b91015138612f67565b3d9150612fc6565b6040513d85823e3d90fd5b905080613010575b38612ec3565b5060ff60285460081c1661300a565b61302d919450602754612e1a565b421015928361303d575b38612e9c565b60006016545b808210613051575050613037565b909450600a8510156104d0578461309d9560011b602060018060a01b036003830154169160009260405180809b8194636e04ff0d60e01b83528660048401526024830190600201612b54565b03915afa9687156131055781976130c6575b5086156130c0575060010190613043565b95505050565b9096506020813d82116130fd575b816130e160209383612890565b810103126130f9576130f290612c68565b95386130af565b8680fd5b3d91506130d4565b50604051903d90823e3d90fd5b600291501438612e96565b905060ff60285460081c168015613135575b90612e90565b5061313e613185565b61312f565b8051156104d05760200190565b8051600110156104d05760400190565b80518210156104d05760209160051b010190565b9060058110156104d05760051b0190565b6040516131958161065081612ab3565b805181019060a08183031261020e576020806131b393019101612bd7565b60005b600581106131c5575050600090565b6001600160a01b036131d78284613174565b51166131e6575b6001016131b6565b602460206001600160a01b036131fc8486613174565b5116604051928380926370a0823160e01b82523060048301525afa9081156104595760009161326a575b50801515908161323e575b50156131de575050600190565b90506001600160a01b036132528385613174565b5116600052602d602052604060002054111538613231565b906020823d8211613293575b8161328360209383612890565b81010312611adf57505138613226565b3d9150613276565b91906101408382031261020e578060a06132b86129a69386612bd7565b9401612bd7565b156132c657565b60405162461bcd60e51b815260206004820152601560248201527418dbdb999a59dd5c985d1a5bdb881a5b9d985b1a59605a1b6044820152606490fd5b919080519283516001600160401b038111610f2c576133228254612820565b601f81116133fe575b506020601f821160011461339557908061336092600195969760009261338a5750508160011b916000199060031b1c19161790565b81555b0190602060018060a01b03910151166bffffffffffffffffffffffff60a01b825416179055565b015190503880610e2f565b601f1982169583600052816000209660005b8181106133e657509160019596979184879594106133cd575b505050811b018155613363565b015160001960f88460031b161c191690553880806133c0565b838301518955600190980197602093840193016133a7565b61342a90836000526020600020601f840160051c81019160208510610f2257601f0160051c0190612e03565b3861332b565b600154604051631113f57f60e01b8152600091600881901c6001600160a01b031691602081600481865afa8015610459576000906139da575b60ff92909216926004841015929091506001600160a01b0316826114225783156139ac5760285460ff81166137f3575b5060206025546024604051809581936331a9108f60e11b835260048301525afa918215610459576000926137b7575b508415806136c6575b613553575b505050501561350a575b604051906134ef604083612890565b60088252676e6f74206175746f60c01b602083015260009190565b613512612e27565b8291939261352357505090506134e0565b6040519363373be68360e11b60208601521515602485015260448401526044835261354f606484612890565b9190565b61355b612c75565b60405163276a479b60e11b81526001600160a01b0390941660048501819052919390929190602081602481865afa9081156104595760009161368c575b50159384613683575b5083156135ff575b5050506135b8575b80806134d6565b611422576002146135ca5738806135b1565b506040519063373be68360e11b60208301526001602483015260056044830152604482526135f9606483612890565b60019190565b602091929350602460405180948193632ac5308160e11b835260048301525afa90811561045957600091613649575b50159081613640575b503880806135a9565b90501538613637565b90506020813d60201161367b575b8161366460209383612890565b8101031261020e5761367590612c68565b3861362e565b3d9150613657565b159350386135a1565b90506020813d6020116136be575b816136a760209383612890565b8101031261020e576136b890612c68565b38613598565b3d915061369a565b5060405163276a479b60e11b81526001600160a01b0383166004820181905290602081602481865afa9081156104595760009161377d575b501590811561370e575b506134d1565b905060405190632ac5308160e11b82526004820152602081602481855afa90811561045957600091613743575b501538613708565b90506020813d602011613775575b8161375e60209383612890565b8101031261020e5761376f90612c68565b3861373b565b3d9150613751565b90506020813d6020116137af575b8161379860209383612890565b8101031261020e576137a990612c68565b386136fe565b3d915061378b565b9091506020813d6020116137eb575b816137d360209383612890565b8101031261020e576137e490612a2d565b90386134c8565b3d91506137c6565b60405163d9398c7360e01b81524790602081600481885afa9081156104595760009161396d575b5060405163e21a74b960e01b815290602090829060049082906001600160a01b03165afa9081156104595760009161393b575b50808210156138b557505083611422576002851490816138a7575b50613874575b38613499565b50505050506040519063373be68360e11b60208301526001602483015260036044830152604482526135f9606483612890565b60ff915060081c1638613868565b600095509150600186146138cb575b505061386e565b118061392d575b6138de575b38806138c4565b6138e6612c75565b81613925575b50156138d75750505050506040519063373be68360e11b60208301526000602483015260046044830152604482526135f9606483612890565b9050386138ec565b50613936613185565b6138d2565b906020823d602011613965575b8161395560209383612890565b81010312611adf5750513861384d565b3d9150613948565b90506020813d6020116139a4575b8161398860209383612890565b8101031261020e57602061399d600492612a2d565b915061381a565b3d915061397b565b5050505050604051906139c0604083612890565b60078252661b9bc818d85b1b60ca1b602083015260009190565b506020813d602011613a0c575b816139f460209383612890565b8101031261020e57613a0760ff91612a2d565b613469565b3d91506139e7565b602a54600a8110156104d057613a609060011b608060018060a01b0360038301541691600092604051808096819463b076cfdd60e01b8352602060048401526024830190600201612b54565b03915afa918215613105578192613aae575b508151602083019384519460606040860151950193845194600019905114600014613aa257505160029594939291565b60019695949392909150565b90915060803d608011613b20575b613ac68183612890565b81016080828203126123f85780601f830112156123f85760405191613aec608084612890565b829060808101928311613b1c57905b828210613b0c575050509038613a72565b8151815260209182019101613afb565b8480fd5b503d613abc565b919060a08301926000905b60058210613b3f57505050565b6020806001928551815201930191019091613b32565b6001600160a01b0390911681526060602082018190526129a6939192613b7d91840190612b54565b9160408184039101526128d4565b60009060ff60285460081c1615613e1d57611246613bdd604051613bae81612875565b600081526000602082015260006040820152600060608201526000608082015260405192839160208301613b27565b6001601654915b828210613d735750505060285460ff8160181c16600014613d695750613c08613a14565b5050602b55602c5560015490915060ff8116600481101561142257600314613cdf575b506001546040516318b770eb60e31b81529091602082600481600887901c6001600160a01b03165afa91821561045957600092613cab575b5011613c86575061ff001960285416602855612e5d600160ff1981541617600155565b60ff16600481101561142257600314612e5d57612e5d600360ff196001541617600155565b9091506020813d602011613cd7575b81613cc760209383612890565b8101031261020e57519038613c63565b3d9150613cba565b6025546040516331a9108f60e11b81526004810191909152906020908290602490829060081c6001600160a01b03165afa801561045957600090613d2e575b613d289150614c4b565b38613c2b565b506020813d602011613d61575b81613d4860209383612890565b8101031261020e57613d5c613d2891612a2d565b613d1e565b3d9150613d3b565b61ff001916602855565b600a8210156104d057600080918360011b611246613dba60018060a01b0360038401541693604051928391602083019563ec6cf1eb60e01b87526002018760248501613b55565b51915af4613dc6612dd3565b9015613dd757600190910190613be4565b610869613de383614a20565b610849603460405180937303bb4ba34323930bb903330b4b632b21030ba1d160651b602083015261083881518092602086860191016128b1565b60405162461bcd60e51b815260206004820152600a6024820152696e6f2062616c616e636560b01b6044820152606490fd5b9060009160ff60285460081c1615613e1d57613ea26112469160405190613e7582612875565b81526000602082015260006040820152600060608201526000608082015260405192839160208301613b27565b6001601654915b828210613ecd5750505060285460ff8160181c16600014613d695750613c08613a14565b600a8210156104d057600080918360011b611246613f1460018060a01b0360038401541693604051928391602083019563ec6cf1eb60e01b87526002018760248501613b55565b51915af4613f20612dd3565b9015613dd757600190910190613ea9565b91909182518251036146b35760025b60168110614649575060405160a0906000613f5b8383612890565b50813682375081600060405190613f728483612890565b50823682375060ff196028541660285560006020604051613f928161285a565b60608152015283519384601655600091600019860193868511935b878110613fec57505050505050505050613fc5613a14565b94935050505063ff0000006001602854921460181b169063ff000000191617602855602955565b60049260006001600160a01b036140038488613160565b5116604051958680926330fe427560e21b82525afa93841561045957600094614607575b5083518690156144c35761089f578187036144a35783518401838582031261020e576020614059910160208601612bd7565b90614098602083965b6001600160a01b03614074878b613160565b5116604051808095819463a913b88160e01b835286600484015260248301906128d4565b03915afa801561045957600090614469575b6140b491506132bf565b60005b600581106143f757505050826140cd828b613160565b516001600160a01b036140e08488613160565b5116604051916140ef8361285a565b82526020820152600a8310156104d05761410f908360011b600201613303565b8560285460ff81161580614367575b614357575b5061089f5786821461416b575b508060019115614153575b61414d600260ff196001541617600155565b01613fad565b614166614160828c613160565b51614b8f565b61413b565b60405161417b602082018a6129fb565b61418860c08201836129fb565b610140815261419961016082612890565b8051906001600160401b038211610f2c576141b5601754612820565b601f8111614308575b50602090601f8311600114614282576141ef92916000918361338a5750508160011b916000199060031b1c19161790565b6017555b60005b600581106142045750614130565b6001600160a01b03614216828b613174565b5116600a8210156104d0576018820180546001600160a01b0319166001600160a01b039283161790556142498284613174565b511690600a6005820110156104d057601d810180546001600160a01b0319166001600160a01b03909316929092179091556001016141f6565b90601f1983169160176000527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c159260005b8181106142f057509084600195949392106142d7575b505050811b016017556141f3565b015160001960f88460031b161c191690553880806142c9565b929360206001819287860151815501950193016142b3565b6017600052614351907fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15601f850160051c81019160208610610f2257601f0160051c0190612e03565b386141be565b60ff191660011760285538614123565b5060015460081c6001600160a01b039081169250602090614388868a613160565b5116602460405180958193637435d6f760e01b835260048301525afa80156104595788926000916143ba575b5061411e565b9192506020823d82116143ef575b816143d560209383612890565b81010312611adf5750906143e98892612c68565b386143b4565b3d91506143c8565b6001600160a01b036144098285613174565b51166001600160a01b0361441d8385613174565b51160361442c576001016140b7565b60405162461bcd60e51b81526020600482015260156024820152740d2dce0eae85edeeae8e0eae840dad2e6dac2e8c6d605b1b6044820152606490fd5b6020823d821161449b575b8161448160209383612890565b81010312611adf57506144966140b491612c68565b6140aa565b3d9150614474565b926020936140986144bb86845185010187850161329b565b969093614062565b90935061089f578086036145e4576144db818a613160565b518051810190838183031261020e576020806144f993019101612bd7565b80935b61454460208c614520866001600160a01b03614518828d613160565b511692613160565b5190604051808095819463a913b88160e01b835286600484015260248301906128d4565b03915afa908115610459576000916145ab575b506140b45761086961456884614a20565b610849603960405180937f636f6e66696775726174696f6e20696e76616c69642061743a00000000000000602083015261083881518092602086860191016128b1565b906020823d82116145dc575b816145c460209383612890565b81010312611adf57506145d690612c68565b38614557565b3d91506145b7565b6146016145f1828b613160565b516020808251830101910161329b565b936144fc565b90933d8082843e6146188184612890565b8201916020818403126123f4578051916001600160401b038311611adf5750614642929101612c26565b9238614027565b8061465660029254612820565b8061466a575b506000600182015501613f40565b601f81116001146146815750600081555b3861465c565b6146a090826000526001601f6020600020920160051c82019101612e03565b806000526000602081208183555561467b565b60405162461bcd60e51b815260206004820152601060248201526f0d2dce0eae8e64040dad2e6dac2e8c6d60831b6044820152606490fd5b600061474592819260405195602087019263a9059cbb60e01b845260018060a01b03166024880152604487015260448652614727606487612890565b60018060a01b031694519082865af161473e612dd3565b9083614d09565b805190811515918261476f575b505061475b5750565b635274afe760e01b60005260045260246000fd5b819250906020918101031261020e57602061478a9101612c68565b153880614752565b60405160a06147a18183612890565b803683376040516147b58161065081612ab3565b80518101918183031261020e576020806147d193019101612bd7565b60005b600581106148ca5750506147f46112469160405192839160208301613b27565b6001916003601654106148c1575b91905b6016548210156148b957600a8210156104d057600080918360011b61124661485660018060a01b03600384015416936040519283916020830195636989890360e01b87526002018760248501613b55565b51915af4614862612dd3565b901561487357600190910190614805565b61086961487f83614a20565b6108496034604051809373039ba3930ba32b3bc903330b4b632b21030ba1d160651b602083015261083881518092602086860191016128b1565b505042602755565b60009250614802565b6001600160a01b036148dc8284613174565b51166148eb575b6001016147d4565b602460206001600160a01b036149018486613174565b5116604051928380926370a0823160e01b82523060048301525afa908115610459576000916149ef575b50801515806149c4575b614940575b506148e3565b61494a8285613174565b5260285460ff8160081c16156149b2575b5060ff6001541690600482101561142257600180921461499b575b60285460ff8160101c1661498c575b509061493a565b62ff0000191660285538614985565b6149ad600260ff196001541617600155565b614976565b61ff001916610100176028553861495b565b506001600160a01b036149d78385613174565b5116600052602d602052604060002054811015614935565b906020823d8211614a18575b81614a0860209383612890565b81010312611adf5750513861492b565b3d91506149fb565b8060009172184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b821015614b6c575b806d04ee2d6d415b85acef8100000000600a921015614b51575b662386f26fc10000811015614b3d575b6305f5e100811015614b2c575b612710811015614b1d575b6064811015614b0f575b1015614b04575b600a60216001840193614aa885612939565b94614ab66040519687612890565b808652614ac5601f1991612939565b013660208701378401015b60001901916f181899199a1a9b1b9c1cb0b131b232b360811b8282061a8353048015614aff57600a9091614ad0565b505090565b600190910190614a96565b606460029104930192614a8f565b61271060049104930192614a85565b6305f5e10060089104930192614a7a565b662386f26fc1000060109104930192614a6d565b6d04ee2d6d415b85acef810000000060209104930192614a5d565b506040915072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8104614a43565b805181016101e0826020830192031261020e57614baf8160208401612bd7565b90614bbd8160c08501612bd7565b508061017f8401121561020e5760405192614bd960a085612890565b8390610200810192831161020e5761016001905b828210614c3b5750505060005b60058110614c0757505050565b80614c1460019285613174565b51828060a01b03614c258386613174565b5116600052602d60205260406000205501614bfa565b8151815260209182019101614bed565b6000915b600a831015614d045760188301546001600160a01b031692600084614c7a575b506001019250614c4f565b506040516370a0823160e01b815230600482015293602085602481845afa94851561045957600095614cce575b5084846001949596614cbd575b94935050614c6f565b614cc6926146eb565b388085614cb4565b6020813d8211614cfc575b81614ce660209383612890565b81010312614cf8575194506001614ca7565b8580fd5b3d9150614cd9565b915050565b90614d2f5750805115614d1e57805190602001fd5b630a12f52160e11b60005260046000fd5b81511580614d61575b614d40575090565b639996b31560e01b60009081526001600160a01b0391909116600452602490fd5b50803b15614d3856fed57b2b5166478fd4318d2acc6cc2c704584312bdd8781b32d5d06abda57f4230a264697066735822122038e541fbb266852c990b99dbd458bc4a9ad5428f933246f630022093a25ed90164736f6c634300081c0033a26469706673582212205d9f3edad66223e0b6d7dd31f97388efc7cc89a8f853d046712a34020ceb43bd64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bf0f3fc5750c4b9f36f827aa85587e400a157aef000000000000000000000000afd37d0558255aa687167560cd3aaeea75c2841e
-----Decoded View---------------
Arg [0] : _factory (address): 0xBf0f3Fc5750c4B9f36f827AA85587e400A157aEF
Arg [1] : _automate (address): 0xafd37d0558255aA687167560cd3AaeEa75c2841E
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000bf0f3fc5750c4b9f36f827aa85587e400a157aef
Arg [1] : 000000000000000000000000afd37d0558255aa687167560cd3aaeea75c2841e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ 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.