Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Latest 4 from a total of 4 transactions
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
OCT_DAO
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 10 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "../Utility/ZivoeSwapper.sol";
import "../../ZivoeLocker.sol";
import "../../../lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";
interface IZivoeGlobals_OCT_DAO {
/// @notice Returns the address of ZivoeDAO.
function DAO() external view returns (address);
/// @notice Returns true if an address is whitelisted as a keeper.
/// @return keeper Equals "true" if address is a keeper, "false" if not.
function isKeeper(address) external view returns (bool keeper);
}
/// @notice This contract converts assets and forwards them to the DAO.
contract OCT_DAO is ZivoeLocker, ZivoeSwapper, ReentrancyGuard {
using SafeERC20 for IERC20;
// ---------------------
// State Variables
// ---------------------
address public immutable GBL; /// @dev The ZivoeGlobals contract.
// -----------------
// Constructor
// -----------------
/// @notice Initializes the OCT_DAO contract.
/// @param DAO The administrator of this contract (intended to be ZivoeDAO).
/// @param _GBL The ZivoeGlobals contract.
constructor(address DAO, address _GBL) {
transferOwnershipAndLock(DAO);
GBL = _GBL;
}
// ------------
// Events
// ------------
/// @notice Emitted during convertAndForward().
/// @param asset The "asset" being converted.
/// @param toAsset The ERC20 that we are converting "asset" to.
/// @param amountFrom The amount being converted.
/// @param amountTo The amount received from conversion.
event AssetConvertedForwarded(address indexed asset, address indexed toAsset, uint256 amountFrom, uint256 amountTo);
// ---------------
// Functions
// ---------------
/// @notice Permission for owner to call pushToLocker().
function canPush() public override pure returns (bool) { return true; }
/// @notice Permission for owner to call pushToLockerMulti().
function canPushMulti() public override pure returns (bool) { return true; }
/// @notice Permission for owner to call pullFromLocker().
function canPull() public override pure returns (bool) { return true; }
/// @notice Permission for owner to call pullFromLockerMulti().
function canPullMulti() public override pure returns (bool) { return true; }
/// @notice Permission for owner to call pullFromLockerPartial().
function canPullPartial() public override pure returns (bool) { return true; }
/// @notice Permission for owner to call pullFromLockerMultiPartial().
function canPullMultiPartial() public override pure returns (bool) { return true; }
/// @notice Converts an asset and forwards it to the DAO.
/// @param asset The asset to convert.
/// @param toAsset The ERC20 that we are converting "asset" to.
/// @param data The payload containing conversion data, consumed by 1INCH_V5.
function convertAndForward(address asset, address toAsset, bytes calldata data) external nonReentrant {
require(
IZivoeGlobals_OCT_DAO(GBL).isKeeper(_msgSender()),
"OCT_DAO::convertAndForward !isKeeper(_msgSender())"
);
uint256 amountFrom = IERC20(asset).balanceOf(address(this));
IERC20(asset).safeIncreaseAllowance(router1INCH_V5, amountFrom);
convertAsset(asset, toAsset, amountFrom, data);
if (IERC20(asset).allowance(address(this), router1INCH_V5) > 0) {
IERC20(asset).safeDecreaseAllowance(router1INCH_V5, IERC20(asset).allowance(address(this), router1INCH_V5));
}
uint balToAsset = IERC20(toAsset).balanceOf(address(this));
emit AssetConvertedForwarded(asset, toAsset, amountFrom, balToAsset);
IERC20(toAsset).safeTransfer(IZivoeGlobals_OCT_DAO(GBL).DAO(), balToAsset);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*
* _Available since v3.1._
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the amount of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `amount`.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev _Available since v3.1._
*/
interface IERC1155Receiver is IERC165 {
/**
* @dev Handles the receipt of a single ERC1155 token type. This function is
* called at the end of a `safeTransferFrom` after the balance has been updated.
*
* NOTE: To accept the transfer, this must return
* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
* (i.e. 0xf23a6e61, or its own function selector).
*
* @param operator The address which initiated the transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param id The ID of the token being transferred
* @param value The amount of tokens being transferred
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
*/
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);
/**
* @dev Handles the receipt of a multiple ERC1155 token types. This function
* is called at the end of a `safeBatchTransferFrom` after the balances have
* been updated.
*
* NOTE: To accept the transfer(s), this must return
* `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
* (i.e. 0xbc197c81, or its own function selector).
*
* @param operator The address which initiated the batch transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param ids An array containing ids of each token being transferred (order and length must match values array)
* @param values An array containing amounts of each token being transferred (order and length must match ids array)
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
*/
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)
pragma solidity ^0.8.0;
import "./ERC1155Receiver.sol";
/**
* Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
*
* IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
* stuck.
*
* @dev _Available since v3.1._
*/
contract ERC1155Holder is ERC1155Receiver {
function onERC1155Received(
address,
address,
uint256,
uint256,
bytes memory
) public virtual override returns (bytes4) {
return this.onERC1155Received.selector;
}
function onERC1155BatchReceived(
address,
address,
uint256[] memory,
uint256[] memory,
bytes memory
) public virtual override returns (bytes4) {
return this.onERC1155BatchReceived.selector;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)
pragma solidity ^0.8.0;
import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";
/**
* @dev _Available since v3.1._
*/
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../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 caller.
*
* 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 v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @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 v4.4.1 (token/ERC721/utils/ERC721Holder.sol)
pragma solidity ^0.8.0;
import "../IERC721Receiver.sol";
/**
* @dev Implementation of the {IERC721Receiver} interface.
*
* Accepts all token transfers.
* Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
*/
contract ERC721Holder is IERC721Receiver {
/**
* @dev See {IERC721Receiver-onERC721Received}.
*
* Always returns `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address,
address,
uint256,
bytes memory
) public virtual override returns (bytes4) {
return this.onERC721Received.selector;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @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: UNLICENSED
pragma solidity ^0.8.17;
import "../../lib/openzeppelin-contracts/contracts/access/Ownable.sol";
abstract contract OwnableLocked is Ownable {
bool public locked; /// @dev A variable "locked" that prevents future ownership transfer.
/**
* @dev Throws if called by any account other than the owner.
*/
modifier unlocked() {
require(!locked, "OwnableLocked::unlocked() locked");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner and if !locked.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public override(Ownable) onlyOwner unlocked { _transferOwnership(address(0)); }
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner and if !locked.
*/
function transferOwnership(address newOwner) public override(Ownable) onlyOwner unlocked {
require(newOwner != address(0), "OwnableLocked::transferOwnership() newOwner == address(0)");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner and if !locked.
*/
function transferOwnershipAndLock(address newOwner) public onlyOwner unlocked {
require(newOwner != address(0), "OwnableLocked::transferOwnershipAndLock() newOwner == address(0)");
locked = true;
_transferOwnership(newOwner);
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "../../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "../../../lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
interface IUniswapV2Pool_ZivoeSwapper {
/// @notice Will return the address of the token at index 0.
/// @return token0 The address of the token at index 0.
function token0() external view returns (address);
/// @notice Will return the address of the token at index 1.
/// @return token1 The address of the token at index 1.
function token1() external view returns (address);
}
interface IUniswapV3Pool_ZivoeSwapper {
/// @notice Will return the address of the token at index 0.
/// @return token0 The address of the token at index 0.
function token0() external view returns (address token0);
/// @notice Will return the address of the token at index 1.
/// @return token1 The address of the token at index 1.
function token1() external view returns (address token1);
}
/// @notice OneInchPrototype contract integrates with 1INCH to support custom data input.
contract ZivoeSwapper {
using SafeERC20 for IERC20;
// ---------------------
// State Variables
// ---------------------
address public immutable router1INCH_V5 = 0x1111111254EEB25477B68fb85Ed929f73A960582; /// @dev The 1INCH v5 Router.
uint256 private constant _ONE_FOR_ZERO_MASK = 1 << 255;
uint256 private constant _REVERSE_MASK = 0x8000000000000000000000000000000000000000000000000000000000000000;
struct OrderRFQ {
// Lowest 64 bits is the order id, next 64 bits is the expiration timestamp.
// Highest bit is unwrap WETH flag which is set on taker's side.
// [unwrap eth(1 bit) | unused (127 bits) | expiration timestamp(64 bits) | orderId (64 bits)]
uint256 info;
address makerAsset;
address takerAsset;
address maker;
address allowedSender; // Equals address(0) on public orders.
uint256 makingAmount;
uint256 takingAmount;
}
struct SwapDescription {
IERC20 srcToken;
IERC20 dstToken;
address payable srcReceiver;
address payable dstReceiver;
uint256 amount;
uint256 minReturnAmount;
uint256 flags;
}
// -----------------
// Constructor
// -----------------
/// @notice Initializes the ZivoeSwapper contract.
constructor() { }
// ---------------
// Functions
// ---------------
/// @notice Will validate the data retrieved from 1inch API triggering a swap() function in 1inch router.
/// @dev The swap() function will execute a swap through multiple sources.
/// @dev "12aa3caf": "swap(address,(address,address,address,address,uint256,uint256,uint256),bytes,bytes)"
function handle_validation_12aa3caf(bytes calldata data, address assetIn, address assetOut, uint256 amountIn) internal view {
(, SwapDescription memory _b,) = abi.decode(data[4:], (address, SwapDescription, bytes));
require(address(_b.srcToken) == assetIn, "ZivoeSwapper::handle_validation_12aa3caf() address(_b.srcToken) != assetIn");
require(address(_b.dstToken) == assetOut, "ZivoeSwapper::handle_validation_12aa3caf() address(_b.dstToken) != assetOut");
require(_b.amount == amountIn, "ZivoeSwapper::handle_validation_12aa3caf() _b.amount != amountIn");
require(_b.dstReceiver == address(this), "ZivoeSwapper::handle_validation_12aa3caf() _b.dstReceiver != address(this)");
}
/// @notice Will validate the data retrieved from 1inch API triggering an uniswapV3Swap() function in 1inch router.
/// @dev The uniswapV3Swap() function will execute a swap through Uniswap V3 pools.
/// @dev "e449022e": "uniswapV3Swap(uint256,uint256,uint256[])"
function handle_validation_e449022e(bytes calldata data, address assetIn, address assetOut, uint256 amountIn) internal view {
(uint256 _a,, uint256[] memory _c) = abi.decode(data[4:], (uint256, uint256, uint256[]));
require(_a == amountIn, "ZivoeSwapper::handle_validation_e449022e() _a != amountIn");
bool zeroForOne_0 = _c[0] & _ONE_FOR_ZERO_MASK == 0;
bool zeroForOne_CLENGTH = _c[_c.length - 1] & _ONE_FOR_ZERO_MASK == 0;
if (zeroForOne_0) {
require(IUniswapV3Pool_ZivoeSwapper(address(uint160(uint256(_c[0])))).token0() == assetIn,
"ZivoeSwapper::handle_validation_e449022e() IUniswapV3Pool_ZivoeSwapper(address(uint160(uint256(_c[0])))).token0() != assetIn");
}
else {
require(IUniswapV3Pool_ZivoeSwapper(address(uint160(uint256(_c[0])))).token1() == assetIn,
"ZivoeSwapper::handle_validation_e449022e() IUniswapV3Pool_ZivoeSwapper(address(uint160(uint256(_c[0])))).token1() != assetIn");
}
if (zeroForOne_CLENGTH) {
require(IUniswapV3Pool_ZivoeSwapper(address(uint160(uint256(_c[_c.length - 1])))).token1() == assetOut,
"ZivoeSwapper::handle_validation_e449022e() IUniswapV3Pool_ZivoeSwapper(address(uint160(uint256(_c[_c.length - 1])))).token1() != assetOut");
}
else {
require(IUniswapV3Pool_ZivoeSwapper(address(uint160(uint256(_c[_c.length - 1])))).token0() == assetOut,
"ZivoeSwapper::handle_validation_e449022e() IUniswapV3Pool_ZivoeSwapper(address(uint160(uint256(_c[_c.length - 1])))).token0() != assetOut");
}
}
/// @notice Will validate the data retrieved from 1inch API triggering an unoswap() function in 1inch router.
/// @dev The unoswap() function will execute a swap through Uniswap V2 pools or similar.
/// @dev "0502b1c5": "unoswap(address,uint256,uint256,uint256[])"
function handle_validation_0502b1c5(bytes calldata data, address assetIn, address assetOut, uint256 amountIn) internal view {
(address _a, uint256 _b,, uint256[] memory _d) = abi.decode(data[4:], (address, uint256, uint256, uint256[]));
require(_a == assetIn, "ZivoeSwapper::handle_validation_0502b1c5() _a != assetIn");
require(_b == amountIn, "ZivoeSwapper::handle_validation_0502b1c5() _b != amountIn");
bool zeroForOne_0;
bool zeroForOne_DLENGTH;
uint256 info_0 = _d[0];
uint256 info_DLENGTH = _d[_d.length - 1];
assembly {
zeroForOne_0 := and(info_0, _REVERSE_MASK)
zeroForOne_DLENGTH := and(info_DLENGTH, _REVERSE_MASK)
}
if (zeroForOne_0) {
require(IUniswapV2Pool_ZivoeSwapper(address(uint160(uint256(_d[0])))).token1() == assetIn,
"ZivoeSwapper::handle_validation_0502b1c5() IUniswapV2Pool_ZivoeSwapper(address(uint160(uint256(_d[0])))).token1() != assetIn");
}
else {
require(IUniswapV2Pool_ZivoeSwapper(address(uint160(uint256(_d[0])))).token0() == assetIn,
"ZivoeSwapper::handle_validation_0502b1c5() IUniswapV2Pool_ZivoeSwapper(address(uint160(uint256(_d[0])))).token0() != assetIn");
}
if (zeroForOne_DLENGTH) {
require(IUniswapV2Pool_ZivoeSwapper(address(uint160(uint256(_d[_d.length - 1])))).token0() == assetOut,
"ZivoeSwapper::handle_validation_0502b1c5() IUniswapV2Pool_ZivoeSwapper(address(uint160(uint256(_d[_d.length - 1])))).token0() != assetOut");
}
else {
require(IUniswapV2Pool_ZivoeSwapper(address(uint160(uint256(_d[_d.length - 1])))).token1() == assetOut,
"ZivoeSwapper::handle_validation_0502b1c5() IUniswapV2Pool_ZivoeSwapper(address(uint160(uint256(_d[_d.length - 1])))).token1() != assetOut");
}
}
/// @notice Will validate the data retrieved from 1inch API triggering a fillOrderRFQ() function in 1inch router.
/// @dev The fillOrderRFQ() function will execute a swap through limit orders.
/// @dev "3eca9c0a": "fillOrderRFQ((uint256,address,address,address,address,uint256,uint256),bytes,uint256)"
function handle_validation_3eca9c0a(bytes calldata data, address assetIn, address assetOut, uint256 amountIn) internal pure {
(OrderRFQ memory _a,,) = abi.decode(data[4:], (OrderRFQ, bytes, uint256));
require(address(_a.takerAsset) == assetIn, "ZivoeSwapper::handle_validation_3eca9c0a() address(_a.takerAsset) != assetIn");
require(address(_a.makerAsset) == assetOut, "ZivoeSwapper::handle_validation_3eca9c0a() address(_a.makerAsset) != assetOut");
require(_a.takingAmount == amountIn, "ZivoeSwapper::handle_validation_3eca9c0a() _a.takingAmount != amountIn");
}
/// @notice Executes a conversion via 1INCH v5.
/// @param assetIn The asset that will be converted.
/// @param assetOut The asset that "assetIn" will be converted to.
/// @param amountIn The amount of "assetIn" that will be converted.
/// @param data Payload for 1INCH v5 router, data regarding swap.
function convertAsset(
address assetIn,
address assetOut,
uint256 amountIn,
bytes calldata data
) internal {
// Handle validation.
bytes4 sig = bytes4(data[:4]);
if (sig == bytes4(keccak256("swap(address,(address,address,address,address,uint256,uint256,uint256),bytes,bytes)"))) {
handle_validation_12aa3caf(data, assetIn, assetOut, amountIn);
}
else if (sig == bytes4(keccak256("uniswapV3Swap(uint256,uint256,uint256[])"))) {
handle_validation_e449022e(data, assetIn, assetOut, amountIn);
}
else if (sig == bytes4(keccak256("unoswap(address,uint256,uint256,uint256[])"))) {
handle_validation_0502b1c5(data, assetIn, assetOut, amountIn);
}
else if (sig == bytes4(keccak256("fillOrderRFQ((uint256,address,address,address,address,uint256,uint256),bytes,uint256)"))) {
handle_validation_3eca9c0a(data, assetIn, assetOut, amountIn);
}
else { revert(); }
// Execute swap.
(bool succ,) = address(router1INCH_V5).call(data);
require(succ, "ZivoeSwapper::convertAsset() !succ");
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "./libraries/OwnableLocked.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Holder.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol";
import "../lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol";
/// @notice This contract standardizes communication between the DAO and lockers.
abstract contract ZivoeLocker is OwnableLocked, ERC1155Holder, ERC721Holder {
using SafeERC20 for IERC20;
// -----------------
// Constructor
// -----------------
/// @notice Initializes the ZivoeLocker contract.
constructor() {}
// ---------------
// Functions
// ---------------
/// @notice Permission for calling pushToLocker().
function canPush() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pullFromLocker().
function canPull() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pullFromLockerPartial().
function canPullPartial() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pushToLockerMulti().
function canPushMulti() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pullFromLockerMulti().
function canPullMulti() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pullFromLockerMultiPartial().
function canPullMultiPartial() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pushToLockerERC721().
function canPushERC721() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pullFromLockerERC721().
function canPullERC721() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pushToLockerMultiERC721().
function canPushMultiERC721() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pullFromLockerMultiERC721().
function canPullMultiERC721() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pushToLockerERC1155().
function canPushERC1155() public virtual view returns (bool) { return false; }
/// @notice Permission for calling pullFromLockerERC1155().
function canPullERC1155() public virtual view returns (bool) { return false; }
/// @notice Migrates specific amount of ERC20 from owner() to locker.
/// @param asset The asset to migrate.
/// @param amount The amount of "asset" to migrate.
/// @param data Accompanying transaction data.
function pushToLocker(address asset, uint256 amount, bytes calldata data) external virtual onlyOwner {
require(canPush(), "ZivoeLocker::pushToLocker() !canPush()");
IERC20(asset).safeTransferFrom(owner(), address(this), amount);
}
/// @notice Migrates entire ERC20 balance from locker to owner().
/// @param asset The asset to migrate.
/// @param data Accompanying transaction data.
function pullFromLocker(address asset, bytes calldata data) external virtual onlyOwner {
require(canPull(), "ZivoeLocker::pullFromLocker() !canPull()");
IERC20(asset).safeTransfer(owner(), IERC20(asset).balanceOf(address(this)));
}
/// @notice Migrates specific amount of ERC20 from locker to owner().
/// @param asset The asset to migrate.
/// @param amount The amount of "asset" to migrate.
/// @param data Accompanying transaction data.
function pullFromLockerPartial(address asset, uint256 amount, bytes calldata data) external virtual onlyOwner {
require(canPullPartial(), "ZivoeLocker::pullFromLockerPartial() !canPullPartial()");
IERC20(asset).safeTransfer(owner(), amount);
}
/// @notice Migrates specific amounts of ERC20s from owner() to locker.
/// @param assets The assets to migrate.
/// @param amounts The amounts of "assets" to migrate, corresponds to "assets" by position in array.
/// @param data Accompanying transaction data.
function pushToLockerMulti(
address[] calldata assets, uint256[] calldata amounts, bytes[] calldata data
) external virtual onlyOwner {
require(canPushMulti(), "ZivoeLocker::pushToLockerMulti() !canPushMulti()");
for (uint256 i = 0; i < assets.length; i++) {
IERC20(assets[i]).safeTransferFrom(owner(), address(this), amounts[i]);
}
}
/// @notice Migrates full amount of ERC20s from locker to owner().
/// @param assets The assets to migrate.
/// @param data Accompanying transaction data.
function pullFromLockerMulti(address[] calldata assets, bytes[] calldata data) external virtual onlyOwner {
require(canPullMulti(), "ZivoeLocker::pullFromLockerMulti() !canPullMulti()");
for (uint256 i = 0; i < assets.length; i++) {
IERC20(assets[i]).safeTransfer(owner(), IERC20(assets[i]).balanceOf(address(this)));
}
}
/// @notice Migrates specific amounts of ERC20s from locker to owner().
/// @param assets The assets to migrate.
/// @param amounts The amounts of "assets" to migrate, corresponds to "assets" by position in array.
/// @param data Accompanying transaction data.
function pullFromLockerMultiPartial(
address[] calldata assets, uint256[] calldata amounts, bytes[] calldata data
) external virtual onlyOwner {
require(canPullMultiPartial(), "ZivoeLocker::pullFromLockerMultiPartial() !canPullMultiPartial()");
for (uint256 i = 0; i < assets.length; i++) {
IERC20(assets[i]).safeTransfer(owner(), amounts[i]);
}
}
/// @notice Migrates an ERC721 from owner() to locker.
/// @param asset The NFT contract.
/// @param tokenId The ID of the NFT to migrate.
/// @param data Accompanying transaction data.
function pushToLockerERC721(address asset, uint256 tokenId, bytes calldata data) external virtual onlyOwner {
require(canPushERC721(), "ZivoeLocker::pushToLockerERC721() !canPushERC721()");
IERC721(asset).safeTransferFrom(owner(), address(this), tokenId, data);
}
/// @notice Migrates an ERC721 from locker to owner().
/// @param asset The NFT contract.
/// @param tokenId The ID of the NFT to migrate.
/// @param data Accompanying transaction data.
function pullFromLockerERC721(address asset, uint256 tokenId, bytes calldata data) external virtual onlyOwner {
require(canPullERC721(), "ZivoeLocker::pullFromLockerERC721() !canPullERC721()");
IERC721(asset).safeTransferFrom(address(this), owner(), tokenId, data);
}
/// @notice Migrates ERC721s from owner() to locker.
/// @param assets The NFT contracts.
/// @param tokenIds The IDs of the NFTs to migrate.
/// @param data Accompanying transaction data.
function pushToLockerMultiERC721(
address[] calldata assets, uint256[] calldata tokenIds, bytes[] calldata data
) external virtual onlyOwner {
require(canPushMultiERC721(), "ZivoeLocker::pushToLockerMultiERC721() !canPushMultiERC721()");
for (uint256 i = 0; i < assets.length; i++) {
IERC721(assets[i]).safeTransferFrom(owner(), address(this), tokenIds[i], data[i]);
}
}
/// @notice Migrates ERC721s from locker to owner().
/// @param assets The NFT contracts.
/// @param tokenIds The IDs of the NFTs to migrate.
/// @param data Accompanying transaction data.
function pullFromLockerMultiERC721(
address[] calldata assets, uint256[] calldata tokenIds, bytes[] calldata data
) external virtual onlyOwner {
require(canPullMultiERC721(), "ZivoeLocker::pullFromLockerMultiERC721() !canPullMultiERC721()");
for (uint256 i = 0; i < assets.length; i++) {
IERC721(assets[i]).safeTransferFrom(address(this), owner(), tokenIds[i], data[i]);
}
}
/// @notice Migrates ERC1155 assets from owner() to locker.
/// @param asset The ERC1155 contract.
/// @param ids The IDs of the assets within the ERC1155 to migrate.
/// @param amounts The amounts to migrate.
/// @param data Accompanying transaction data.
function pushToLockerERC1155(
address asset, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data
) external virtual onlyOwner {
require(canPushERC1155(), "ZivoeLocker::pushToLockerERC1155() !canPushERC1155()");
IERC1155(asset).safeBatchTransferFrom(owner(), address(this), ids, amounts, data);
}
/// @notice Migrates ERC1155 assets from locker to owner().
/// @param asset The ERC1155 contract.
/// @param ids The IDs of the assets within the ERC1155 to migrate.
/// @param amounts The amounts to migrate.
/// @param data Accompanying transaction data.
function pullFromLockerERC1155(
address asset, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data
) external virtual onlyOwner {
require(canPullERC1155(), "ZivoeLocker::pullFromLockerERC1155() !canPullERC1155()");
IERC1155(asset).safeBatchTransferFrom(address(this), owner(), ids, amounts, data);
}
}{
"optimizer": {
"enabled": true,
"runs": 10
},
"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":"DAO","type":"address"},{"internalType":"address","name":"_GBL","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"toAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountFrom","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountTo","type":"uint256"}],"name":"AssetConvertedForwarded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"GBL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPull","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPullERC1155","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPullERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPullMulti","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPullMultiERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPullMultiPartial","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPullPartial","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPush","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPushERC1155","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPushERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPushMulti","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canPushMultiERC721","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"toAsset","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"convertAndForward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pullFromLocker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pullFromLockerERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pullFromLockerERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pullFromLockerMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pullFromLockerMultiERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pullFromLockerMultiPartial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pullFromLockerPartial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pushToLocker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pushToLockerERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"pushToLockerERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pushToLockerMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"pushToLockerMultiERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router1INCH_V5","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnershipAndLock","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60c0604052731111111254eeb25477b68fb85ed929f73a9605826080523480156200002957600080fd5b50604051620036e3380380620036e38339810160408190526200004c916200024f565b620000573362000079565b600180556200006682620000c9565b6001600160a01b031660a0525062000287565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000d3620001d4565b600054600160a01b900460ff1615620001335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b656460448201526064015b60405180910390fd5b6001600160a01b038116620001b3576040805162461bcd60e51b81526020600482015260248101919091527f4f776e61626c654c6f636b65643a3a7472616e736665724f776e65727368697060448201527f416e644c6f636b2829206e65774f776e6572203d3d206164647265737328302960648201526084016200012a565b6000805460ff60a01b1916600160a01b179055620001d18162000079565b50565b6000546001600160a01b03163314620002305760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200012a565b565b80516001600160a01b03811681146200024a57600080fd5b919050565b600080604083850312156200026357600080fd5b6200026e8362000232565b91506200027e6020840162000232565b90509250929050565b60805160a051613405620002de60003960008181610266015281816109b90152610d7a0152600081816102c001528181610b1f01528181610b7a01528181610bee01528181610c1f015261148001526134056000f3fe608060405234801561001057600080fd5b50600436106101ac5760003560e01c806301ffc9a7146101b157806312052176146101d9578063150b7a02146101ee57806315e987441461021a5780631852b3831461022d57806319165874146102345780631d9389e914610247578063215cccdd1461025a5780632f08d48b1461025a5780633c1172441461022d5780633ce8d432146102615780633eda81ad1461025a578063422b20181461029557806342315632146102a85780634ca7e164146102bb57806358289c7e146102e257806364c777351461025a5780636a7ab9af146102f5578063715018a6146103085780638b648ee21461022d5780638da5cb5b146103105780639b81aa5d14610318578063a4a3e79d1461025a578063b0607cf81461022d578063b892bcc01461032b578063bc197c811461033e578063cd45e1fb1461035d578063cf10b7ab1461022d578063cf30901214610370578063d284af9414610384578063d8f2a78b14610397578063dd913bdb1461022d578063e7f446291461025a578063f23a6e61146103aa578063f2fde38b146103c9578063fd76f59d146103dc575b600080fd5b6101c46101bf3660046127d0565b6103ef565b60405190151581526020015b60405180910390f35b6101ec6101e736600461285e565b610426565b005b6102016101fc366004612996565b610498565b6040516001600160e01b031990911681526020016101d0565b6101ec610228366004612a45565b6104a9565b60006101c4565b6101ec610242366004612ade565b610610565b6101ec61025536600461285e565b610711565b60016101c4565b6102887f000000000000000000000000000000000000000000000000000000000000000081565b6040516101d09190612b3d565b6101ec6102a3366004612b51565b61077c565b6101ec6102b636600461285e565b6107eb565b6102887f000000000000000000000000000000000000000000000000000000000000000081565b6101ec6102f0366004612bfd565b610816565b6101ec610303366004612a45565b6108d3565b6101ec610955565b610288610993565b6101ec610326366004612c1a565b6109a2565b6101ec610339366004612a45565b610e16565b61020161034c366004612cda565b63bc197c8160e01b95945050505050565b6101ec61036b366004612d87565b610f73565b6000546101c490600160a01b900460ff1681565b6101ec610392366004612a45565b611009565b6101ec6103a536600461285e565b611064565b6102016103b8366004612ddb565b63f23a6e6160e01b95945050505050565b6101ec6103d7366004612bfd565b611088565b6101ec6103ea366004612b51565b611129565b60006001600160e01b03198216630271189760e51b148061042057506301ffc9a760e01b6001600160e01b03198316145b92915050565b61042e611196565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724552433732604482015273312829202163616e50756c6c455243373231282960601b60648201526084015b60405180910390fd5b630a85bd0160e11b5b949350505050565b6104b1611196565b60405162461bcd60e51b815260206004820152603e60248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724d756c746960448201527f4552433732312829202163616e50756c6c4d756c746945524337323128290000606482015260840161048f565b858110156106075786868281811061053957610539612ea0565b905060200201602081019061054e9190612bfd565b6001600160a01b031663b88d4fde30610565610993565b88888681811061057757610577612ea0565b9050602002013587878781811061059057610590612ea0565b90506020028101906105a29190612eb6565b6040518663ffffffff1660e01b81526004016105c2959493929190612e6c565b600060405180830381600087803b1580156105dc57600080fd5b505af11580156105f0573d6000803e3d6000fd5b5050505080806105ff90612f12565b91505061051f565b50505050505050565b610618611196565b60005b8381101561070a576106f861062e610993565b86868481811061064057610640612ea0565b90506020020160208101906106559190612bfd565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106809190612b3d565b602060405180830381865afa15801561069d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c19190612f2b565b8787858181106106d3576106d3612ea0565b90506020020160208101906106e89190612bfd565b6001600160a01b031691906111f5565b8061070281612f12565b91505061061b565b5050505050565b610719611196565b60405162461bcd60e51b815260206004820152603260248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724552433732312860448201527129202163616e50757368455243373231282960701b606482015260840161048f565b610784611196565b60405162461bcd60e51b815260206004820152603660248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b6572455243313160448201527535352829202163616e50756c6c45524331313535282960501b606482015260840161048f565b6107f3611196565b6108106107fe610993565b6001600160a01b03861690308661124b565b50505050565b61081e611196565b600054600160a01b900460ff16156108485760405162461bcd60e51b815260040161048f90612f44565b6001600160a01b0381166108b4576040805162461bcd60e51b815260206004820152602481019190915260008051602061337083398151915260448201527f416e644c6f636b2829206e65774f776e6572203d3d2061646472657373283029606482015260840161048f565b6000805460ff60a01b1916600160a01b1790556108d081611283565b50565b6108db611196565b60005b85811015610607576109436108f1610993565b3087878581811061090457610904612ea0565b905060200201358a8a8681811061091d5761091d612ea0565b90506020020160208101906109329190612bfd565b6001600160a01b031692919061124b565b8061094d81612f12565b9150506108de565b61095d611196565b600054600160a01b900460ff16156109875760405162461bcd60e51b815260040161048f90612f44565b6109916000611283565b565b6000546001600160a01b031690565b6109aa6112d3565b6040516335d2155560e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636ba42aaa906109f6903390600401612b3d565b602060405180830381865afa158015610a13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a379190612f79565b610a9e5760405162461bcd60e51b815260206004820152603260248201527f4f43545f44414f3a3a636f6e76657274416e64466f7277617264202169734b6560448201527165706572285f6d736753656e64657228292960701b606482015260840161048f565b6040516370a0823160e01b81526000906001600160a01b038616906370a0823190610acd903090600401612b3d565b602060405180830381865afa158015610aea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0e9190612f2b565b9050610b446001600160a01b0386167f00000000000000000000000000000000000000000000000000000000000000008361132c565b610b5185858386866113c9565b604051636eb1769f60e11b81526000906001600160a01b0387169063dd62ed3e90610ba29030907f000000000000000000000000000000000000000000000000000000000000000090600401612f9b565b602060405180830381865afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be39190612f2b565b1115610cad57610cad7f0000000000000000000000000000000000000000000000000000000000000000866001600160a01b031663dd62ed3e307f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b8152600401610c5b929190612f9b565b602060405180830381865afa158015610c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9c9190612f2b565b6001600160a01b0388169190611556565b6040516370a0823160e01b81526000906001600160a01b038616906370a0823190610cdc903090600401612b3d565b602060405180830381865afa158015610cf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1d9190612f2b565b9050846001600160a01b0316866001600160a01b03167f3627f5796ad0fa38c773bf68bc867f86dbb986f46caaf74e2426fabad4517c698484604051610d6d929190918252602082015260400190565b60405180910390a3610e0b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166398fabd3a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfa9190612fb5565b6001600160a01b03871690836111f5565b505061081060018055565b610e1e611196565b60405162461bcd60e51b815260206004820152603c60248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724d756c7469455260448201527b433732312829202163616e507573684d756c7469455243373231282960201b606482015260840161048f565b8581101561060757868682818110610ea557610ea5612ea0565b9050602002016020810190610eba9190612bfd565b6001600160a01b031663b88d4fde610ed0610993565b30888886818110610ee357610ee3612ea0565b90506020020135878787818110610efc57610efc612ea0565b9050602002810190610f0e9190612eb6565b6040518663ffffffff1660e01b8152600401610f2e959493929190612e6c565b600060405180830381600087803b158015610f4857600080fd5b505af1158015610f5c573d6000803e3d6000fd5b505050508080610f6b90612f12565b915050610e8b565b610f7b611196565b611004610f86610993565b6040516370a0823160e01b81526001600160a01b038616906370a0823190610fb2903090600401612b3d565b602060405180830381865afa158015610fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff39190612f2b565b6001600160a01b03861691906111f5565b505050565b611011611196565b60005b8581101561060757611052611027610993565b86868481811061103957611039612ea0565b905060200201358989858181106106d3576106d3612ea0565b8061105c81612f12565b915050611014565b61106c611196565b610810611077610993565b6001600160a01b03861690856111f5565b611090611196565b600054600160a01b900460ff16156110ba5760405162461bcd60e51b815260040161048f90612f44565b6001600160a01b0381166111205760405162461bcd60e51b815260206004820152603960248201526000805160206133708339815191526044820152782829206e65774f776e6572203d3d206164647265737328302960381b606482015260840161048f565b6108d081611283565b611131611196565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b6572455243313135356044820152732829202163616e5075736845524331313535282960601b606482015260840161048f565b3361119f610993565b6001600160a01b0316146109915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161048f565b6110048363a9059cbb60e01b8484604051602401611214929190612fd2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611652565b6040516001600160a01b03808516602483015283166044820152606481018290526108109085906323b872dd60e01b90608401611214565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002600154036113255760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161048f565b6002600155565b600081846001600160a01b031663dd62ed3e30866040518363ffffffff1660e01b815260040161135d929190612f9b565b602060405180830381865afa15801561137a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139e9190612f2b565b6113a89190612feb565b90506108108463095ea7b360e01b8584604051602401611214929190612fd2565b60006113d86004828486612ffe565b6113e191613028565b905063ed55c35160e01b6001600160e01b031982160161140d576114088383888888611724565b61147c565b630ddb7ee960e11b6001600160e01b0319821601611432576114088383888888611951565b63fafd4e3b60e01b6001600160e01b0319821601611457576114088383888888611ee9565b63609ab1fb60e11b6001600160e01b03198216016101ac5761140883838888886124fa565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031684846040516114b8929190613058565b6000604051808303816000865af19150503d80600081146114f5576040519150601f19603f3d011682016040523d82523d6000602084013e6114fa565b606091505b50509050806106075760405162461bcd60e51b815260206004820152602260248201527f5a69766f65537761707065723a3a636f6e766572744173736574282920217375604482015261636360f01b606482015260840161048f565b604051636eb1769f60e11b81526000906001600160a01b0385169063dd62ed3e906115879030908790600401612f9b565b602060405180830381865afa1580156115a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c89190612f2b565b90508181101561162c5760405162461bcd60e51b815260206004820152602960248201527f5361666545524332303a2064656372656173656420616c6c6f77616e63652062604482015268656c6f77207a65726f60b81b606482015260840161048f565b6040518282039061070a90869063095ea7b360e01b906112149088908690602401612fd2565b60006116a7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166126ad9092919063ffffffff16565b80519091501561100457808060200190518101906116c59190612f79565b6110045760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161048f565b60006117338560048189612ffe565b8101906117409190613068565b50915050836001600160a01b031681600001516001600160a01b0316146117d05760405162461bcd60e51b815260206004820152604a602482015260008051602061335083398151915260448201527f313261613363616628292061646472657373285f622e737263546f6b656e2920606482015269109e9030b9b9b2ba24b760b11b608482015260a40161048f565b826001600160a01b031681602001516001600160a01b03161461185d5760405162461bcd60e51b815260206004820152604b602482015260008051602061335083398151915260448201527f313261613363616628292061646472657373285f622e647374546f6b656e292060648201526a084f48185cdcd95d13dd5d60aa1b608482015260a40161048f565b818160800151146118c6576040805162461bcd60e51b815260206004820152602481019190915260008051602061335083398151915260448201527f31326161336361662829205f622e616d6f756e7420213d20616d6f756e74496e606482015260840161048f565b60608101516001600160a01b031630146119495760405162461bcd60e51b815260206004820152604a602482015260008051602061335083398151915260448201527f31326161336361662829205f622e647374526563656976657220213d206164646064820152697265737328746869732960b01b608482015260a40161048f565b505050505050565b600080611961866004818a612ffe565b81019061196e9190613143565b92505091508282146119d25760405162461bcd60e51b81526020600482015260396024820152600080516020613350833981519152604482015278329a1a1c981919329414902fb090109e9030b6b7bab73a24b760391b606482015260840161048f565b6000600160ff1b826000815181106119ec576119ec612ea0565b60200260200101511660001490506000600160ff1b8360018551611a109190613188565b81518110611a2057611a20612ea0565b60200260200101511660001490508115611b5057866001600160a01b031683600081518110611a5157611a51612ea0565b60200260200101516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aba9190612fb5565b6001600160a01b031614611b4b5760405162461bcd60e51b815260206004820152607c6024820152600080516020613350833981519152604482015260008051602061339083398151915260648201526000805160206133b083398151915260848201527b31ad982e94949494973a37b5b2b718141490109e9030b9b9b2ba24b760211b60a482015260c40161048f565b611c67565b866001600160a01b031683600081518110611b6d57611b6d612ea0565b60200260200101516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd69190612fb5565b6001600160a01b031614611c675760405162461bcd60e51b815260206004820152607c6024820152600080516020613350833981519152604482015260008051602061339083398151915260648201526000805160206133b083398151915260848201527b31ad982e94949494973a37b5b2b718941490109e9030b9b9b2ba24b760211b60a482015260c40161048f565b8015611da857856001600160a01b03168360018551611c869190613188565b81518110611c9657611c96612ea0565b60200260200101516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cff9190612fb5565b6001600160a01b031614611da35760405162461bcd60e51b81526020600482015260896024820152600080516020613350833981519152604482015260008051602061339083398151915260648201526000805160206133b083398151915260848201527f635b5f632e6c656e677468202d20315d292929292e746f6b656e31282920213d60a48201526808185cdcd95d13dd5d60ba1b60c482015260e40161048f565b611ede565b856001600160a01b03168360018551611dc19190613188565b81518110611dd157611dd1612ea0565b60200260200101516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3a9190612fb5565b6001600160a01b031614611ede5760405162461bcd60e51b81526020600482015260896024820152600080516020613350833981519152604482015260008051602061339083398151915260648201526000805160206133b083398151915260848201527f635b5f632e6c656e677468202d20315d292929292e746f6b656e30282920213d60a48201526808185cdcd95d13dd5d60ba1b60c482015260e40161048f565b505050505050505050565b60008080611efa876004818b612ffe565b810190611f07919061319b565b93505092509250856001600160a01b0316836001600160a01b031614611f7e5760405162461bcd60e51b81526020600482015260386024820152600080516020613350833981519152604482015277181a98193118b19a9414902fb090109e9030b9b9b2ba24b760411b606482015260840161048f565b838214611fdd5760405162461bcd60e51b81526020600482015260396024820152600080516020613350833981519152604482015278181a98193118b19a9414902fb110109e9030b6b7bab73a24b760391b606482015260840161048f565b600080600083600081518110611ff557611ff5612ea0565b60200260200101519050600084600186516120109190613188565b8151811061202057612020612ea0565b60200260200101519050600160ff1b82169350600160ff1b81169250831561215e57896001600160a01b03168560008151811061205f5761205f612ea0565b60200260200101516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c89190612fb5565b6001600160a01b0316146121595760405162461bcd60e51b815260206004820152607c6024820152600080516020613350833981519152604482015260008051602061333083398151915260648201526000805160206133b083398151915260848201527b322d982e94949494973a37b5b2b718941490109e9030b9b9b2ba24b760211b60a482015260c40161048f565b612275565b896001600160a01b03168560008151811061217b5761217b612ea0565b60200260200101516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190612fb5565b6001600160a01b0316146122755760405162461bcd60e51b815260206004820152607c6024820152600080516020613350833981519152604482015260008051602061333083398151915260648201526000805160206133b083398151915260848201527b322d982e94949494973a37b5b2b718141490109e9030b9b9b2ba24b760211b60a482015260c40161048f565b82156123b657886001600160a01b031685600187516122949190613188565b815181106122a4576122a4612ea0565b60200260200101516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230d9190612fb5565b6001600160a01b0316146123b15760405162461bcd60e51b81526020600482015260896024820152600080516020613350833981519152604482015260008051602061333083398151915260648201526000805160206133b083398151915260848201527f645b5f642e6c656e677468202d20315d292929292e746f6b656e30282920213d60a48201526808185cdcd95d13dd5d60ba1b60c482015260e40161048f565b6124ec565b886001600160a01b031685600187516123cf9190613188565b815181106123df576123df612ea0565b60200260200101516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612424573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124489190612fb5565b6001600160a01b0316146124ec5760405162461bcd60e51b81526020600482015260896024820152600080516020613350833981519152604482015260008051602061333083398151915260648201526000805160206133b083398151915260848201527f645b5f642e6c656e677468202d20315d292929292e746f6b656e31282920213d60a48201526808185cdcd95d13dd5d60ba1b60c482015260e40161048f565b505050505050505050505050565b60006125098560048189612ffe565b81019061251691906131f1565b50509050836001600160a01b031681604001516001600160a01b0316146125a85760405162461bcd60e51b815260206004820152604c602482015260008051602061335083398151915260448201527f336563613963306128292061646472657373285f612e74616b6572417373657460648201526b1490109e9030b9b9b2ba24b760a11b608482015260a40161048f565b826001600160a01b031681602001516001600160a01b0316146126375760405162461bcd60e51b815260206004820152604d602482015260008051602061335083398151915260448201527f336563613963306128292061646472657373285f612e6d616b6572417373657460648201526c0a48084f48185cdcd95d13dd5d609a1b608482015260a40161048f565b818160c00151146119495760405162461bcd60e51b8152602060048201526046602482015260008051602061335083398151915260448201527f33656361396330612829205f612e74616b696e67416d6f756e7420213d20616d60648201526537bab73a24b760d11b608482015260a40161048f565b60606104a1848460008585600080866001600160a01b031685876040516126d491906132e0565b60006040518083038185875af1925050503d8060008114612711576040519150601f19603f3d011682016040523d82523d6000602084013e612716565b606091505b509150915061272787838387612732565b979650505050505050565b606083156127a157825160000361279a576001600160a01b0385163b61279a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161048f565b50816104a1565b6104a183838151156127b65781518083602001fd5b8060405162461bcd60e51b815260040161048f91906132fc565b6000602082840312156127e257600080fd5b81356001600160e01b0319811681146127fa57600080fd5b9392505050565b6001600160a01b03811681146108d057600080fd5b60008083601f84011261282857600080fd5b5081356001600160401b0381111561283f57600080fd5b60208301915083602082850101111561285757600080fd5b9250929050565b6000806000806060858703121561287457600080fd5b843561287f81612801565b93506020850135925060408501356001600160401b038111156128a157600080fd5b6128ad87828801612816565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156128f1576128f16128b9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561291f5761291f6128b9565b604052919050565b600082601f83011261293857600080fd5b81356001600160401b03811115612951576129516128b9565b612964601f8201601f19166020016128f7565b81815284602083860101111561297957600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156129ac57600080fd5b84356129b781612801565b935060208501356129c781612801565b92506040850135915060608501356001600160401b038111156129e957600080fd5b6129f587828801612927565b91505092959194509250565b60008083601f840112612a1357600080fd5b5081356001600160401b03811115612a2a57600080fd5b6020830191508360208260051b850101111561285757600080fd5b60008060008060008060608789031215612a5e57600080fd5b86356001600160401b0380821115612a7557600080fd5b612a818a838b01612a01565b90985096506020890135915080821115612a9a57600080fd5b612aa68a838b01612a01565b90965094506040890135915080821115612abf57600080fd5b50612acc89828a01612a01565b979a9699509497509295939492505050565b60008060008060408587031215612af457600080fd5b84356001600160401b0380821115612b0b57600080fd5b612b1788838901612a01565b90965094506020870135915080821115612b3057600080fd5b506128ad87828801612a01565b6001600160a01b0391909116815260200190565b60008060008060008060006080888a031215612b6c57600080fd5b8735612b7781612801565b965060208801356001600160401b0380821115612b9357600080fd5b612b9f8b838c01612a01565b909850965060408a0135915080821115612bb857600080fd5b612bc48b838c01612a01565b909650945060608a0135915080821115612bdd57600080fd5b50612bea8a828b01612816565b989b979a50959850939692959293505050565b600060208284031215612c0f57600080fd5b81356127fa81612801565b60008060008060608587031215612c3057600080fd5b8435612c3b81612801565b93506020850135612c4b81612801565b925060408501356001600160401b038111156128a157600080fd5b600082601f830112612c7757600080fd5b813560206001600160401b03821115612c9257612c926128b9565b8160051b612ca18282016128f7565b9283528481018201928281019087851115612cbb57600080fd5b83870192505b8483101561272757823582529183019190830190612cc1565b600080600080600060a08688031215612cf257600080fd5b8535612cfd81612801565b94506020860135612d0d81612801565b935060408601356001600160401b0380821115612d2957600080fd5b612d3589838a01612c66565b94506060880135915080821115612d4b57600080fd5b612d5789838a01612c66565b93506080880135915080821115612d6d57600080fd5b50612d7a88828901612927565b9150509295509295909350565b600080600060408486031215612d9c57600080fd5b8335612da781612801565b925060208401356001600160401b03811115612dc257600080fd5b612dce86828701612816565b9497909650939450505050565b600080600080600060a08688031215612df357600080fd5b8535612dfe81612801565b94506020860135612e0e81612801565b9350604086013592506060860135915060808601356001600160401b03811115612e3757600080fd5b612d7a88828901612927565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03868116825285166020820152604081018490526080606082018190526000906127279083018486612e43565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612ecd57600080fd5b8301803591506001600160401b03821115612ee757600080fd5b60200191503681900382131561285757600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612f2457612f24612efc565b5060010190565b600060208284031215612f3d57600080fd5b5051919050565b6020808252818101527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b6564604082015260600190565b600060208284031215612f8b57600080fd5b815180151581146127fa57600080fd5b6001600160a01b0392831681529116602082015260400190565b600060208284031215612fc757600080fd5b81516127fa81612801565b6001600160a01b03929092168252602082015260400190565b8082018082111561042057610420612efc565b6000808585111561300e57600080fd5b8386111561301b57600080fd5b5050820193919092039150565b6001600160e01b031981358181169160048510156130505780818660040360031b1b83161692505b505092915050565b8183823760009101908152919050565b600080600083850361012081121561307f57600080fd5b843561308a81612801565b935060e0601f198201121561309e57600080fd5b506130a76128cf565b60208501356130b581612801565b815260408501356130c581612801565b602082015260608501356130d881612801565b604082015260808501356130eb81612801565b606082015260a085810135608083015260c0808701359183019190915260e08601359082015291506101008401356001600160401b0381111561312d57600080fd5b61313986828701612927565b9150509250925092565b60008060006060848603121561315857600080fd5b833592506020840135915060408401356001600160401b0381111561317c57600080fd5b61313986828701612c66565b8181038181111561042057610420612efc565b600080600080608085870312156131b157600080fd5b84356131bc81612801565b9350602085013592506040850135915060608501356001600160401b038111156131e557600080fd5b6129f587828801612c66565b600080600083850361012081121561320857600080fd5b60e081121561321657600080fd5b5061321f6128cf565b84358152602085013561323181612801565b6020820152604085013561324481612801565b6040820152606085013561325781612801565b6060820152608085013561326a81612801565b608082015260a0858101359082015260c08086013590820152925060e08401356001600160401b0381111561329e57600080fd5b6132aa86828701612927565b92505061010084013590509250925092565b60005b838110156132d75781810151838201526020016132bf565b50506000910152565b600082516132f28184602087016132bc565b9190910192915050565b602081526000825180602084015261331b8160408501602087016132bc565b601f01601f1916919091016040019291505056fe303530326231633528292049556e69737761705632506f6f6c5f5a69766f65535a69766f65537761707065723a3a68616e646c655f76616c69646174696f6e5f4f776e61626c654c6f636b65643a3a7472616e736665724f776e657273686970653434393032326528292049556e69737761705633506f6f6c5f5a69766f655377617070657228616464726573732875696e743136302875696e74323536285fa264697066735822122088f1fb318632a1462eaa1eb5a581d3f8a39656eae0258591d33a6bbc4a6a762e64736f6c63430008110033000000000000000000000000b65a66621d7de34afec9b9ac0755133051550dd7000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da66
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101ac5760003560e01c806301ffc9a7146101b157806312052176146101d9578063150b7a02146101ee57806315e987441461021a5780631852b3831461022d57806319165874146102345780631d9389e914610247578063215cccdd1461025a5780632f08d48b1461025a5780633c1172441461022d5780633ce8d432146102615780633eda81ad1461025a578063422b20181461029557806342315632146102a85780634ca7e164146102bb57806358289c7e146102e257806364c777351461025a5780636a7ab9af146102f5578063715018a6146103085780638b648ee21461022d5780638da5cb5b146103105780639b81aa5d14610318578063a4a3e79d1461025a578063b0607cf81461022d578063b892bcc01461032b578063bc197c811461033e578063cd45e1fb1461035d578063cf10b7ab1461022d578063cf30901214610370578063d284af9414610384578063d8f2a78b14610397578063dd913bdb1461022d578063e7f446291461025a578063f23a6e61146103aa578063f2fde38b146103c9578063fd76f59d146103dc575b600080fd5b6101c46101bf3660046127d0565b6103ef565b60405190151581526020015b60405180910390f35b6101ec6101e736600461285e565b610426565b005b6102016101fc366004612996565b610498565b6040516001600160e01b031990911681526020016101d0565b6101ec610228366004612a45565b6104a9565b60006101c4565b6101ec610242366004612ade565b610610565b6101ec61025536600461285e565b610711565b60016101c4565b6102887f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da6681565b6040516101d09190612b3d565b6101ec6102a3366004612b51565b61077c565b6101ec6102b636600461285e565b6107eb565b6102887f0000000000000000000000001111111254eeb25477b68fb85ed929f73a96058281565b6101ec6102f0366004612bfd565b610816565b6101ec610303366004612a45565b6108d3565b6101ec610955565b610288610993565b6101ec610326366004612c1a565b6109a2565b6101ec610339366004612a45565b610e16565b61020161034c366004612cda565b63bc197c8160e01b95945050505050565b6101ec61036b366004612d87565b610f73565b6000546101c490600160a01b900460ff1681565b6101ec610392366004612a45565b611009565b6101ec6103a536600461285e565b611064565b6102016103b8366004612ddb565b63f23a6e6160e01b95945050505050565b6101ec6103d7366004612bfd565b611088565b6101ec6103ea366004612b51565b611129565b60006001600160e01b03198216630271189760e51b148061042057506301ffc9a760e01b6001600160e01b03198316145b92915050565b61042e611196565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724552433732604482015273312829202163616e50756c6c455243373231282960601b60648201526084015b60405180910390fd5b630a85bd0160e11b5b949350505050565b6104b1611196565b60405162461bcd60e51b815260206004820152603e60248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724d756c746960448201527f4552433732312829202163616e50756c6c4d756c746945524337323128290000606482015260840161048f565b858110156106075786868281811061053957610539612ea0565b905060200201602081019061054e9190612bfd565b6001600160a01b031663b88d4fde30610565610993565b88888681811061057757610577612ea0565b9050602002013587878781811061059057610590612ea0565b90506020028101906105a29190612eb6565b6040518663ffffffff1660e01b81526004016105c2959493929190612e6c565b600060405180830381600087803b1580156105dc57600080fd5b505af11580156105f0573d6000803e3d6000fd5b5050505080806105ff90612f12565b91505061051f565b50505050505050565b610618611196565b60005b8381101561070a576106f861062e610993565b86868481811061064057610640612ea0565b90506020020160208101906106559190612bfd565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106809190612b3d565b602060405180830381865afa15801561069d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c19190612f2b565b8787858181106106d3576106d3612ea0565b90506020020160208101906106e89190612bfd565b6001600160a01b031691906111f5565b8061070281612f12565b91505061061b565b5050505050565b610719611196565b60405162461bcd60e51b815260206004820152603260248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724552433732312860448201527129202163616e50757368455243373231282960701b606482015260840161048f565b610784611196565b60405162461bcd60e51b815260206004820152603660248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b6572455243313160448201527535352829202163616e50756c6c45524331313535282960501b606482015260840161048f565b6107f3611196565b6108106107fe610993565b6001600160a01b03861690308661124b565b50505050565b61081e611196565b600054600160a01b900460ff16156108485760405162461bcd60e51b815260040161048f90612f44565b6001600160a01b0381166108b4576040805162461bcd60e51b815260206004820152602481019190915260008051602061337083398151915260448201527f416e644c6f636b2829206e65774f776e6572203d3d2061646472657373283029606482015260840161048f565b6000805460ff60a01b1916600160a01b1790556108d081611283565b50565b6108db611196565b60005b85811015610607576109436108f1610993565b3087878581811061090457610904612ea0565b905060200201358a8a8681811061091d5761091d612ea0565b90506020020160208101906109329190612bfd565b6001600160a01b031692919061124b565b8061094d81612f12565b9150506108de565b61095d611196565b600054600160a01b900460ff16156109875760405162461bcd60e51b815260040161048f90612f44565b6109916000611283565b565b6000546001600160a01b031690565b6109aa6112d3565b6040516335d2155560e11b81527f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b031690636ba42aaa906109f6903390600401612b3d565b602060405180830381865afa158015610a13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a379190612f79565b610a9e5760405162461bcd60e51b815260206004820152603260248201527f4f43545f44414f3a3a636f6e76657274416e64466f7277617264202169734b6560448201527165706572285f6d736753656e64657228292960701b606482015260840161048f565b6040516370a0823160e01b81526000906001600160a01b038616906370a0823190610acd903090600401612b3d565b602060405180830381865afa158015610aea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0e9190612f2b565b9050610b446001600160a01b0386167f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605828361132c565b610b5185858386866113c9565b604051636eb1769f60e11b81526000906001600160a01b0387169063dd62ed3e90610ba29030907f0000000000000000000000001111111254eeb25477b68fb85ed929f73a96058290600401612f9b565b602060405180830381865afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be39190612f2b565b1115610cad57610cad7f0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582866001600160a01b031663dd62ed3e307f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605826040518363ffffffff1660e01b8152600401610c5b929190612f9b565b602060405180830381865afa158015610c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9c9190612f2b565b6001600160a01b0388169190611556565b6040516370a0823160e01b81526000906001600160a01b038616906370a0823190610cdc903090600401612b3d565b602060405180830381865afa158015610cf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1d9190612f2b565b9050846001600160a01b0316866001600160a01b03167f3627f5796ad0fa38c773bf68bc867f86dbb986f46caaf74e2426fabad4517c698484604051610d6d929190918252602082015260400190565b60405180910390a3610e0b7f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b03166398fabd3a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfa9190612fb5565b6001600160a01b03871690836111f5565b505061081060018055565b610e1e611196565b60405162461bcd60e51b815260206004820152603c60248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724d756c7469455260448201527b433732312829202163616e507573684d756c7469455243373231282960201b606482015260840161048f565b8581101561060757868682818110610ea557610ea5612ea0565b9050602002016020810190610eba9190612bfd565b6001600160a01b031663b88d4fde610ed0610993565b30888886818110610ee357610ee3612ea0565b90506020020135878787818110610efc57610efc612ea0565b9050602002810190610f0e9190612eb6565b6040518663ffffffff1660e01b8152600401610f2e959493929190612e6c565b600060405180830381600087803b158015610f4857600080fd5b505af1158015610f5c573d6000803e3d6000fd5b505050508080610f6b90612f12565b915050610e8b565b610f7b611196565b611004610f86610993565b6040516370a0823160e01b81526001600160a01b038616906370a0823190610fb2903090600401612b3d565b602060405180830381865afa158015610fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff39190612f2b565b6001600160a01b03861691906111f5565b505050565b611011611196565b60005b8581101561060757611052611027610993565b86868481811061103957611039612ea0565b905060200201358989858181106106d3576106d3612ea0565b8061105c81612f12565b915050611014565b61106c611196565b610810611077610993565b6001600160a01b03861690856111f5565b611090611196565b600054600160a01b900460ff16156110ba5760405162461bcd60e51b815260040161048f90612f44565b6001600160a01b0381166111205760405162461bcd60e51b815260206004820152603960248201526000805160206133708339815191526044820152782829206e65774f776e6572203d3d206164647265737328302960381b606482015260840161048f565b6108d081611283565b611131611196565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b6572455243313135356044820152732829202163616e5075736845524331313535282960601b606482015260840161048f565b3361119f610993565b6001600160a01b0316146109915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161048f565b6110048363a9059cbb60e01b8484604051602401611214929190612fd2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611652565b6040516001600160a01b03808516602483015283166044820152606481018290526108109085906323b872dd60e01b90608401611214565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002600154036113255760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161048f565b6002600155565b600081846001600160a01b031663dd62ed3e30866040518363ffffffff1660e01b815260040161135d929190612f9b565b602060405180830381865afa15801561137a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139e9190612f2b565b6113a89190612feb565b90506108108463095ea7b360e01b8584604051602401611214929190612fd2565b60006113d86004828486612ffe565b6113e191613028565b905063ed55c35160e01b6001600160e01b031982160161140d576114088383888888611724565b61147c565b630ddb7ee960e11b6001600160e01b0319821601611432576114088383888888611951565b63fafd4e3b60e01b6001600160e01b0319821601611457576114088383888888611ee9565b63609ab1fb60e11b6001600160e01b03198216016101ac5761140883838888886124fa565b60007f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605826001600160a01b031684846040516114b8929190613058565b6000604051808303816000865af19150503d80600081146114f5576040519150601f19603f3d011682016040523d82523d6000602084013e6114fa565b606091505b50509050806106075760405162461bcd60e51b815260206004820152602260248201527f5a69766f65537761707065723a3a636f6e766572744173736574282920217375604482015261636360f01b606482015260840161048f565b604051636eb1769f60e11b81526000906001600160a01b0385169063dd62ed3e906115879030908790600401612f9b565b602060405180830381865afa1580156115a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c89190612f2b565b90508181101561162c5760405162461bcd60e51b815260206004820152602960248201527f5361666545524332303a2064656372656173656420616c6c6f77616e63652062604482015268656c6f77207a65726f60b81b606482015260840161048f565b6040518282039061070a90869063095ea7b360e01b906112149088908690602401612fd2565b60006116a7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166126ad9092919063ffffffff16565b80519091501561100457808060200190518101906116c59190612f79565b6110045760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161048f565b60006117338560048189612ffe565b8101906117409190613068565b50915050836001600160a01b031681600001516001600160a01b0316146117d05760405162461bcd60e51b815260206004820152604a602482015260008051602061335083398151915260448201527f313261613363616628292061646472657373285f622e737263546f6b656e2920606482015269109e9030b9b9b2ba24b760b11b608482015260a40161048f565b826001600160a01b031681602001516001600160a01b03161461185d5760405162461bcd60e51b815260206004820152604b602482015260008051602061335083398151915260448201527f313261613363616628292061646472657373285f622e647374546f6b656e292060648201526a084f48185cdcd95d13dd5d60aa1b608482015260a40161048f565b818160800151146118c6576040805162461bcd60e51b815260206004820152602481019190915260008051602061335083398151915260448201527f31326161336361662829205f622e616d6f756e7420213d20616d6f756e74496e606482015260840161048f565b60608101516001600160a01b031630146119495760405162461bcd60e51b815260206004820152604a602482015260008051602061335083398151915260448201527f31326161336361662829205f622e647374526563656976657220213d206164646064820152697265737328746869732960b01b608482015260a40161048f565b505050505050565b600080611961866004818a612ffe565b81019061196e9190613143565b92505091508282146119d25760405162461bcd60e51b81526020600482015260396024820152600080516020613350833981519152604482015278329a1a1c981919329414902fb090109e9030b6b7bab73a24b760391b606482015260840161048f565b6000600160ff1b826000815181106119ec576119ec612ea0565b60200260200101511660001490506000600160ff1b8360018551611a109190613188565b81518110611a2057611a20612ea0565b60200260200101511660001490508115611b5057866001600160a01b031683600081518110611a5157611a51612ea0565b60200260200101516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aba9190612fb5565b6001600160a01b031614611b4b5760405162461bcd60e51b815260206004820152607c6024820152600080516020613350833981519152604482015260008051602061339083398151915260648201526000805160206133b083398151915260848201527b31ad982e94949494973a37b5b2b718141490109e9030b9b9b2ba24b760211b60a482015260c40161048f565b611c67565b866001600160a01b031683600081518110611b6d57611b6d612ea0565b60200260200101516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd69190612fb5565b6001600160a01b031614611c675760405162461bcd60e51b815260206004820152607c6024820152600080516020613350833981519152604482015260008051602061339083398151915260648201526000805160206133b083398151915260848201527b31ad982e94949494973a37b5b2b718941490109e9030b9b9b2ba24b760211b60a482015260c40161048f565b8015611da857856001600160a01b03168360018551611c869190613188565b81518110611c9657611c96612ea0565b60200260200101516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cff9190612fb5565b6001600160a01b031614611da35760405162461bcd60e51b81526020600482015260896024820152600080516020613350833981519152604482015260008051602061339083398151915260648201526000805160206133b083398151915260848201527f635b5f632e6c656e677468202d20315d292929292e746f6b656e31282920213d60a48201526808185cdcd95d13dd5d60ba1b60c482015260e40161048f565b611ede565b856001600160a01b03168360018551611dc19190613188565b81518110611dd157611dd1612ea0565b60200260200101516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3a9190612fb5565b6001600160a01b031614611ede5760405162461bcd60e51b81526020600482015260896024820152600080516020613350833981519152604482015260008051602061339083398151915260648201526000805160206133b083398151915260848201527f635b5f632e6c656e677468202d20315d292929292e746f6b656e30282920213d60a48201526808185cdcd95d13dd5d60ba1b60c482015260e40161048f565b505050505050505050565b60008080611efa876004818b612ffe565b810190611f07919061319b565b93505092509250856001600160a01b0316836001600160a01b031614611f7e5760405162461bcd60e51b81526020600482015260386024820152600080516020613350833981519152604482015277181a98193118b19a9414902fb090109e9030b9b9b2ba24b760411b606482015260840161048f565b838214611fdd5760405162461bcd60e51b81526020600482015260396024820152600080516020613350833981519152604482015278181a98193118b19a9414902fb110109e9030b6b7bab73a24b760391b606482015260840161048f565b600080600083600081518110611ff557611ff5612ea0565b60200260200101519050600084600186516120109190613188565b8151811061202057612020612ea0565b60200260200101519050600160ff1b82169350600160ff1b81169250831561215e57896001600160a01b03168560008151811061205f5761205f612ea0565b60200260200101516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c89190612fb5565b6001600160a01b0316146121595760405162461bcd60e51b815260206004820152607c6024820152600080516020613350833981519152604482015260008051602061333083398151915260648201526000805160206133b083398151915260848201527b322d982e94949494973a37b5b2b718941490109e9030b9b9b2ba24b760211b60a482015260c40161048f565b612275565b896001600160a01b03168560008151811061217b5761217b612ea0565b60200260200101516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190612fb5565b6001600160a01b0316146122755760405162461bcd60e51b815260206004820152607c6024820152600080516020613350833981519152604482015260008051602061333083398151915260648201526000805160206133b083398151915260848201527b322d982e94949494973a37b5b2b718141490109e9030b9b9b2ba24b760211b60a482015260c40161048f565b82156123b657886001600160a01b031685600187516122949190613188565b815181106122a4576122a4612ea0565b60200260200101516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230d9190612fb5565b6001600160a01b0316146123b15760405162461bcd60e51b81526020600482015260896024820152600080516020613350833981519152604482015260008051602061333083398151915260648201526000805160206133b083398151915260848201527f645b5f642e6c656e677468202d20315d292929292e746f6b656e30282920213d60a48201526808185cdcd95d13dd5d60ba1b60c482015260e40161048f565b6124ec565b886001600160a01b031685600187516123cf9190613188565b815181106123df576123df612ea0565b60200260200101516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612424573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124489190612fb5565b6001600160a01b0316146124ec5760405162461bcd60e51b81526020600482015260896024820152600080516020613350833981519152604482015260008051602061333083398151915260648201526000805160206133b083398151915260848201527f645b5f642e6c656e677468202d20315d292929292e746f6b656e31282920213d60a48201526808185cdcd95d13dd5d60ba1b60c482015260e40161048f565b505050505050505050505050565b60006125098560048189612ffe565b81019061251691906131f1565b50509050836001600160a01b031681604001516001600160a01b0316146125a85760405162461bcd60e51b815260206004820152604c602482015260008051602061335083398151915260448201527f336563613963306128292061646472657373285f612e74616b6572417373657460648201526b1490109e9030b9b9b2ba24b760a11b608482015260a40161048f565b826001600160a01b031681602001516001600160a01b0316146126375760405162461bcd60e51b815260206004820152604d602482015260008051602061335083398151915260448201527f336563613963306128292061646472657373285f612e6d616b6572417373657460648201526c0a48084f48185cdcd95d13dd5d609a1b608482015260a40161048f565b818160c00151146119495760405162461bcd60e51b8152602060048201526046602482015260008051602061335083398151915260448201527f33656361396330612829205f612e74616b696e67416d6f756e7420213d20616d60648201526537bab73a24b760d11b608482015260a40161048f565b60606104a1848460008585600080866001600160a01b031685876040516126d491906132e0565b60006040518083038185875af1925050503d8060008114612711576040519150601f19603f3d011682016040523d82523d6000602084013e612716565b606091505b509150915061272787838387612732565b979650505050505050565b606083156127a157825160000361279a576001600160a01b0385163b61279a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161048f565b50816104a1565b6104a183838151156127b65781518083602001fd5b8060405162461bcd60e51b815260040161048f91906132fc565b6000602082840312156127e257600080fd5b81356001600160e01b0319811681146127fa57600080fd5b9392505050565b6001600160a01b03811681146108d057600080fd5b60008083601f84011261282857600080fd5b5081356001600160401b0381111561283f57600080fd5b60208301915083602082850101111561285757600080fd5b9250929050565b6000806000806060858703121561287457600080fd5b843561287f81612801565b93506020850135925060408501356001600160401b038111156128a157600080fd5b6128ad87828801612816565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156128f1576128f16128b9565b60405290565b604051601f8201601f191681016001600160401b038111828210171561291f5761291f6128b9565b604052919050565b600082601f83011261293857600080fd5b81356001600160401b03811115612951576129516128b9565b612964601f8201601f19166020016128f7565b81815284602083860101111561297957600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156129ac57600080fd5b84356129b781612801565b935060208501356129c781612801565b92506040850135915060608501356001600160401b038111156129e957600080fd5b6129f587828801612927565b91505092959194509250565b60008083601f840112612a1357600080fd5b5081356001600160401b03811115612a2a57600080fd5b6020830191508360208260051b850101111561285757600080fd5b60008060008060008060608789031215612a5e57600080fd5b86356001600160401b0380821115612a7557600080fd5b612a818a838b01612a01565b90985096506020890135915080821115612a9a57600080fd5b612aa68a838b01612a01565b90965094506040890135915080821115612abf57600080fd5b50612acc89828a01612a01565b979a9699509497509295939492505050565b60008060008060408587031215612af457600080fd5b84356001600160401b0380821115612b0b57600080fd5b612b1788838901612a01565b90965094506020870135915080821115612b3057600080fd5b506128ad87828801612a01565b6001600160a01b0391909116815260200190565b60008060008060008060006080888a031215612b6c57600080fd5b8735612b7781612801565b965060208801356001600160401b0380821115612b9357600080fd5b612b9f8b838c01612a01565b909850965060408a0135915080821115612bb857600080fd5b612bc48b838c01612a01565b909650945060608a0135915080821115612bdd57600080fd5b50612bea8a828b01612816565b989b979a50959850939692959293505050565b600060208284031215612c0f57600080fd5b81356127fa81612801565b60008060008060608587031215612c3057600080fd5b8435612c3b81612801565b93506020850135612c4b81612801565b925060408501356001600160401b038111156128a157600080fd5b600082601f830112612c7757600080fd5b813560206001600160401b03821115612c9257612c926128b9565b8160051b612ca18282016128f7565b9283528481018201928281019087851115612cbb57600080fd5b83870192505b8483101561272757823582529183019190830190612cc1565b600080600080600060a08688031215612cf257600080fd5b8535612cfd81612801565b94506020860135612d0d81612801565b935060408601356001600160401b0380821115612d2957600080fd5b612d3589838a01612c66565b94506060880135915080821115612d4b57600080fd5b612d5789838a01612c66565b93506080880135915080821115612d6d57600080fd5b50612d7a88828901612927565b9150509295509295909350565b600080600060408486031215612d9c57600080fd5b8335612da781612801565b925060208401356001600160401b03811115612dc257600080fd5b612dce86828701612816565b9497909650939450505050565b600080600080600060a08688031215612df357600080fd5b8535612dfe81612801565b94506020860135612e0e81612801565b9350604086013592506060860135915060808601356001600160401b03811115612e3757600080fd5b612d7a88828901612927565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03868116825285166020820152604081018490526080606082018190526000906127279083018486612e43565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612ecd57600080fd5b8301803591506001600160401b03821115612ee757600080fd5b60200191503681900382131561285757600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612f2457612f24612efc565b5060010190565b600060208284031215612f3d57600080fd5b5051919050565b6020808252818101527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b6564604082015260600190565b600060208284031215612f8b57600080fd5b815180151581146127fa57600080fd5b6001600160a01b0392831681529116602082015260400190565b600060208284031215612fc757600080fd5b81516127fa81612801565b6001600160a01b03929092168252602082015260400190565b8082018082111561042057610420612efc565b6000808585111561300e57600080fd5b8386111561301b57600080fd5b5050820193919092039150565b6001600160e01b031981358181169160048510156130505780818660040360031b1b83161692505b505092915050565b8183823760009101908152919050565b600080600083850361012081121561307f57600080fd5b843561308a81612801565b935060e0601f198201121561309e57600080fd5b506130a76128cf565b60208501356130b581612801565b815260408501356130c581612801565b602082015260608501356130d881612801565b604082015260808501356130eb81612801565b606082015260a085810135608083015260c0808701359183019190915260e08601359082015291506101008401356001600160401b0381111561312d57600080fd5b61313986828701612927565b9150509250925092565b60008060006060848603121561315857600080fd5b833592506020840135915060408401356001600160401b0381111561317c57600080fd5b61313986828701612c66565b8181038181111561042057610420612efc565b600080600080608085870312156131b157600080fd5b84356131bc81612801565b9350602085013592506040850135915060608501356001600160401b038111156131e557600080fd5b6129f587828801612c66565b600080600083850361012081121561320857600080fd5b60e081121561321657600080fd5b5061321f6128cf565b84358152602085013561323181612801565b6020820152604085013561324481612801565b6040820152606085013561325781612801565b6060820152608085013561326a81612801565b608082015260a0858101359082015260c08086013590820152925060e08401356001600160401b0381111561329e57600080fd5b6132aa86828701612927565b92505061010084013590509250925092565b60005b838110156132d75781810151838201526020016132bf565b50506000910152565b600082516132f28184602087016132bc565b9190910192915050565b602081526000825180602084015261331b8160408501602087016132bc565b601f01601f1916919091016040019291505056fe303530326231633528292049556e69737761705632506f6f6c5f5a69766f65535a69766f65537761707065723a3a68616e646c655f76616c69646174696f6e5f4f776e61626c654c6f636b65643a3a7472616e736665724f776e657273686970653434393032326528292049556e69737761705633506f6f6c5f5a69766f655377617070657228616464726573732875696e743136302875696e74323536285fa264697066735822122088f1fb318632a1462eaa1eb5a581d3f8a39656eae0258591d33a6bbc4a6a762e64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b65a66621d7de34afec9b9ac0755133051550dd7000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da66
-----Decoded View---------------
Arg [0] : DAO (address): 0xB65a66621D7dE34afec9b9AC0755133051550dD7
Arg [1] : _GBL (address): 0xEa537eB0bBcC7783bDF7c595bF9371984583dA66
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b65a66621d7de34afec9b9ac0755133051550dd7
Arg [1] : 000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da66
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
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.