Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Update Whitelist | 22675573 | 160 days ago | IN | 0 ETH | 0.0003432 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OCT_Convert
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 10 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "../../ZivoeLocker.sol";
import "../../../lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";
interface IZivoeGlobals_OCT_Convert {
/// @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 Returns the address of the ZivoeTrancheToken ($zJTT) contract.
function zJTT() external view returns (address);
/// @notice Returns the address of the ZivoeTrancheToken ($zSTT) contract.
function zSTT() external view returns (address);
/// @notice Returns the address of the ZivoeTranches contract.
function ZVT() external view returns (address);
/// @notice Handles WEI standardization of a given asset amount (i.e. 6 decimal precision => 18 decimal precision).
/// @param amount The amount of a given "asset".
/// @param asset The asset (ERC-20) from which to standardize the amount to WEI.
/// @return standardizedAmount The input "amount" standardized to 18 decimals.
function standardize(uint256 amount, address asset) external view returns (uint256 standardizedAmount);
}
interface IZivoeTranches_OCT_Convert {
/// @notice Deposit stablecoins into the senior tranche.
function depositSenior(uint256 amount, address asset) external;
}
interface IERC20Burn_OCT_Convert {
/// @notice Burns tokens.
function burn(uint256 amount) external;
}
/// @notice This contract converts zJTT to zSTT, and allows zSTT withdrawals.
contract OCT_Convert is ZivoeLocker, ReentrancyGuard {
using SafeERC20 for IERC20;
// ---------------------
// State Variables
// ---------------------
address public immutable GBL; /// @dev The ZivoeGlobals contract.
/// @dev Whitelist for converters, managed by keepers.
mapping(address => bool) public isDepositor;
// -----------------
// Constructor
// -----------------
/// @notice Initializes the OCT_YDL 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 convertTranche().
event TrancheConverted(
address stablecoin,
address caller,
uint amount
);
/// @notice Emitted during withdrawTranche().
event TrancheWithdrawn(
address stablecoin,
address caller,
uint amount
);
// ---------------
// 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 Updates whitelist.
/// @dev Restricted to keepers.
/// @param user The address to add/remove from whitelist.
/// @param status The new status of user (true = accepted, false = rejected).
function updateWhitelist(address user, bool status) external {
require(IZivoeGlobals_OCT_Convert(GBL).isKeeper(_msgSender()));
isDepositor[user] = status;
}
/// @notice Converts zJTT to zSTT.
/// @param amount The amount of stablecoin to use for conversion.
/// @param stablecoin The stablecoin to use for conversion (will be transferred here from ZivoeDAO)
function convertTranche(uint amount, address stablecoin) external nonReentrant {
address caller = _msgSender();
address zJTT = IZivoeGlobals_OCT_Convert(GBL).zJTT();
address zSTT = IZivoeGlobals_OCT_Convert(GBL).zSTT();
uint standardizedAmount = IZivoeGlobals_OCT_Convert(GBL).standardize(amount, stablecoin);
// Whitelist check.
require(isDepositor[caller]);
// Transfer zJTT from user to locker
IERC20(zJTT).safeTransferFrom(caller, address(this), standardizedAmount);
// Burn zJTT
IERC20Burn_OCT_Convert(zJTT).burn(standardizedAmount);
// Mint zSTT with stablecoin specified (handle precision of stablecoin)
address ZVT = IZivoeGlobals_OCT_Convert(GBL).ZVT();
IZivoeTranches_OCT_Convert(ZVT).depositSenior(amount, stablecoin);
// Transfer zSTT to user (alternatively, deposit to vault via router, then transfer to user)
IERC20(zSTT).safeTransfer(caller, standardizedAmount);
// Emit event log
emit TrancheConverted(stablecoin, caller, amount);
}
/// @notice Converts zSTT to stablecoins.
function withdrawTranche(uint amount, address stablecoin) external nonReentrant {
address caller = _msgSender();
address zSTT = IZivoeGlobals_OCT_Convert(GBL).zSTT();
uint standardizedAmount = IZivoeGlobals_OCT_Convert(GBL).standardize(amount, stablecoin);
// Transfer zSTT from user to locker
IERC20(zSTT).safeTransferFrom(caller, address(this), standardizedAmount);
// Burn zSTT
IERC20Burn_OCT_Convert(zSTT).burn(standardizedAmount);
// Transfer specified stablecoin to user
IERC20(stablecoin).safeTransfer(caller, amount);
// Emit event log
emit TrancheWithdrawn(stablecoin, caller, amount);
}
}// 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 "./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
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"DAO","type":"address"},{"internalType":"address","name":"_GBL","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"stablecoin","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TrancheConverted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"stablecoin","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TrancheWithdrawn","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":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"stablecoin","type":"address"}],"name":"convertTranche","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isDepositor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[{"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"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"updateWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"stablecoin","type":"address"}],"name":"withdrawTranche","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a060405234801561001057600080fd5b5060405161223d38038061223d83398101604081905261002f91610223565b61003833610057565b60018055610045826100a7565b6001600160a01b031660805250610256565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6100af6101ab565b600054600160a01b900460ff161561010e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b656460448201526064015b60405180910390fd5b6001600160a01b03811661018c576040805162461bcd60e51b81526020600482015260248101919091527f4f776e61626c654c6f636b65643a3a7472616e736665724f776e65727368697060448201527f416e644c6f636b2829206e65774f776e6572203d3d20616464726573732830296064820152608401610105565b6000805460ff60a01b1916600160a01b1790556101a881610057565b50565b6000546001600160a01b031633146102055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610105565b565b80516001600160a01b038116811461021e57600080fd5b919050565b6000806040838503121561023657600080fd5b61023f83610207565b915061024d60208401610207565b90509250929050565b608051611f9b6102a2600039600081816102b20152818161046d0152818161090f0152818161099501528181610a1b01528181610b4301528181610e1b0152610ea10152611f9b6000f3fe608060405234801561001057600080fd5b50600436106101c25760003560e01c806301ffc9a7146101c75780630d392cd9146101ef5780631205217614610204578063150b7a021461021757806315e98744146102435780631852b38314610256578063191658741461025d5780631d9389e914610270578063215cccdd146102835780632f08d48b146102835780632f70d1ba1461028a5780633c117244146102565780633ce8d432146102ad5780633eda81ad14610283578063422b2018146102e157806342315632146102f4578063448fd00c1461030757806358289c7e1461031a57806364c77735146102835780636a7ab9af1461032d578063715018a6146103405780638b648ee2146102565780638da5cb5b14610348578063a4a3e79d14610283578063acdafff114610350578063b0607cf814610256578063b892bcc014610363578063bc197c8114610376578063cd45e1fb14610395578063cf10b7ab14610256578063cf309012146103a8578063d284af94146103bc578063d8f2a78b146103cf578063dd913bdb14610256578063e7f4462914610283578063f23a6e61146103e2578063f2fde38b14610401578063fd76f59d14610414575b600080fd5b6101da6101d53660046116eb565b610427565b60405190151581526020015b60405180910390f35b6102026101fd36600461173f565b61045e565b005b6102026102123660046117c0565b61051f565b61022a6102253660046118d0565b610591565b6040516001600160e01b031990911681526020016101e6565b61020261025136600461197f565b6105a2565b60006101da565b61020261026b366004611a18565b610702565b61020261027e3660046117c0565b6107f9565b60016101da565b6101da610298366004611a77565b60026020526000908152604090205460ff1681565b6102d47f000000000000000000000000000000000000000000000000000000000000000081565b6040516101e69190611a94565b6102026102ef366004611aa8565b610864565b6102026103023660046117c0565b6108d3565b610202610315366004611b54565b6108fe565b610202610328366004611a77565b610c88565b61020261033b36600461197f565b610d45565b610202610dbd565b6102d4610dfb565b61020261035e366004611b54565b610e0a565b61020261037136600461197f565b610ffb565b61022a610384366004611bed565b63bc197c8160e01b95945050505050565b6102026103a3366004611c9a565b611151565b6000546101da90600160a01b900460ff1681565b6102026103ca36600461197f565b6111e7565b6102026103dd3660046117c0565b611238565b61022a6103f0366004611cee565b63f23a6e6160e01b95945050505050565b61020261040f366004611a77565b61125c565b610202610422366004611aa8565b6112fd565b60006001600160e01b03198216630271189760e51b148061045857506301ffc9a760e01b6001600160e01b03198316145b92915050565b6040516335d2155560e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636ba42aaa906104aa903390600401611a94565b602060405180830381865afa1580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611d56565b6104f457600080fd5b6001600160a01b03919091166000908152600260205260409020805460ff1916911515919091179055565b61052761136a565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724552433732604482015273312829202163616e50756c6c455243373231282960601b60648201526084015b60405180910390fd5b630a85bd0160e11b5b949350505050565b6105aa61136a565b60405162461bcd60e51b815260206004820152603e60248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724d756c746960448201527f4552433732312829202163616e50756c6c4d756c7469455243373231282900006064820152608401610588565b858110156106f95786868281811061063257610632611dd0565b90506020020160208101906106479190611a77565b6001600160a01b031663b88d4fde3061065e610dfb565b88888681811061067057610670611dd0565b9050602002013587878781811061068957610689611dd0565b905060200281019061069b9190611de6565b6040518663ffffffff1660e01b81526004016106bb959493929190611d9c565b600060405180830381600087803b1580156106d557600080fd5b505af11580156106e9573d6000803e3d6000fd5b5050600190920191506106189050565b50505050505050565b61070a61136a565b60005b838110156107f2576107ea610720610dfb565b86868481811061073257610732611dd0565b90506020020160208101906107479190611a77565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016107729190611a94565b602060405180830381865afa15801561078f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b39190611e2c565b8787858181106107c5576107c5611dd0565b90506020020160208101906107da9190611a77565b6001600160a01b031691906113c9565b60010161070d565b5050505050565b61080161136a565b60405162461bcd60e51b815260206004820152603260248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724552433732312860448201527129202163616e50757368455243373231282960701b6064820152608401610588565b61086c61136a565b60405162461bcd60e51b815260206004820152603660248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b6572455243313160448201527535352829202163616e50756c6c45524331313535282960501b6064820152608401610588565b6108db61136a565b6108f86108e6610dfb565b6001600160a01b03861690308661142c565b50505050565b61090661144d565b600033905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639699177c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098f9190611e45565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c5f4f7b06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a159190611e45565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc3c1da587876040518363ffffffff1660e01b8152600401610a67929190611e62565b602060405180830381865afa158015610a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa89190611e2c565b6001600160a01b03851660009081526002602052604090205490915060ff16610ad057600080fd5b610ae56001600160a01b03841685308461142c565b604051630852cd8d60e31b8152600481018290526001600160a01b038416906342966c6890602401600060405180830381600087803b158015610b2757600080fd5b505af1158015610b3b573d6000803e3d6000fd5b5050505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638aa256526040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc39190611e45565b604051634515d4e960e11b81529091506001600160a01b03821690638a2ba9d290610bf4908a908a90600401611e62565b600060405180830381600087803b158015610c0e57600080fd5b505af1158015610c22573d6000803e3d6000fd5b50610c3b925050506001600160a01b03841686846113c9565b7f1421ee1d8626ff158a67d2826bd29d5710396ecb1dc7a187f9f12b830ae8ee3e868689604051610c6e93929190611e79565b60405180910390a15050505050610c8460018055565b5050565b610c9061136a565b600054600160a01b900460ff1615610cba5760405162461bcd60e51b815260040161058890611e9d565b6001600160a01b038116610d26576040805162461bcd60e51b8152602060048201526024810191909152600080516020611f4683398151915260448201527f416e644c6f636b2829206e65774f776e6572203d3d20616464726573732830296064820152608401610588565b6000805460ff60a01b1916600160a01b179055610d42816114a6565b50565b610d4d61136a565b60005b858110156106f957610db5610d63610dfb565b30878785818110610d7657610d76611dd0565b905060200201358a8a86818110610d8f57610d8f611dd0565b9050602002016020810190610da49190611a77565b6001600160a01b031692919061142c565b600101610d50565b610dc561136a565b600054600160a01b900460ff1615610def5760405162461bcd60e51b815260040161058890611e9d565b610df960006114a6565b565b6000546001600160a01b031690565b610e1261144d565b600033905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c5f4f7b06040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b9190611e45565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc3c1da586866040518363ffffffff1660e01b8152600401610eed929190611e62565b602060405180830381865afa158015610f0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2e9190611e2c565b9050610f456001600160a01b03831684308461142c565b604051630852cd8d60e31b8152600481018290526001600160a01b038316906342966c6890602401600060405180830381600087803b158015610f8757600080fd5b505af1158015610f9b573d6000803e3d6000fd5b50610fb4925050506001600160a01b03851684876113c9565b7fa5ff98532a1f9493a760628a77a4d4382c93e4568e6fddfa4dd80ff0359eebc4848487604051610fe793929190611e79565b60405180910390a1505050610c8460018055565b61100361136a565b60405162461bcd60e51b815260206004820152603c60248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724d756c7469455260448201527b433732312829202163616e507573684d756c7469455243373231282960201b6064820152608401610588565b858110156106f95786868281811061108a5761108a611dd0565b905060200201602081019061109f9190611a77565b6001600160a01b031663b88d4fde6110b5610dfb565b308888868181106110c8576110c8611dd0565b905060200201358787878181106110e1576110e1611dd0565b90506020028101906110f39190611de6565b6040518663ffffffff1660e01b8152600401611113959493929190611d9c565b600060405180830381600087803b15801561112d57600080fd5b505af1158015611141573d6000803e3d6000fd5b5050600190920191506110709050565b61115961136a565b6111e2611164610dfb565b6040516370a0823160e01b81526001600160a01b038616906370a0823190611190903090600401611a94565b602060405180830381865afa1580156111ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d19190611e2c565b6001600160a01b03861691906113c9565b505050565b6111ef61136a565b60005b858110156106f957611230611205610dfb565b86868481811061121757611217611dd0565b905060200201358989858181106107c5576107c5611dd0565b6001016111f2565b61124061136a565b6108f861124b610dfb565b6001600160a01b03861690856113c9565b61126461136a565b600054600160a01b900460ff161561128e5760405162461bcd60e51b815260040161058890611e9d565b6001600160a01b0381166112f45760405162461bcd60e51b81526020600482015260396024820152600080516020611f468339815191526044820152782829206e65774f776e6572203d3d206164647265737328302960381b6064820152608401610588565b610d42816114a6565b61130561136a565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b6572455243313135356044820152732829202163616e5075736845524331313535282960601b6064820152608401610588565b33611373610dfb565b6001600160a01b031614610df95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b6040516001600160a01b0383166024820152604481018290526111e290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526114f6565b6108f8846323b872dd60e01b8585856040516024016113f593929190611e79565b60026001540361149f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610588565b6002600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061154b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115c89092919063ffffffff16565b8051909150156111e257808060200190518101906115699190611d56565b6111e25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610588565b606061059a848460008585600080866001600160a01b031685876040516115ef9190611ef6565b60006040518083038185875af1925050503d806000811461162c576040519150601f19603f3d011682016040523d82523d6000602084013e611631565b606091505b50915091506116428783838761164d565b979650505050505050565b606083156116bc5782516000036116b5576001600160a01b0385163b6116b55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610588565b508161059a565b61059a83838151156116d15781518083602001fd5b8060405162461bcd60e51b81526004016105889190611f12565b6000602082840312156116fd57600080fd5b81356001600160e01b03198116811461171557600080fd5b9392505050565b6001600160a01b0381168114610d4257600080fd5b8015158114610d4257600080fd5b6000806040838503121561175257600080fd5b823561175d8161171c565b9150602083013561176d81611731565b809150509250929050565b60008083601f84011261178a57600080fd5b5081356001600160401b038111156117a157600080fd5b6020830191508360208285010111156117b957600080fd5b9250929050565b600080600080606085870312156117d657600080fd5b84356117e18161171c565b93506020850135925060408501356001600160401b0381111561180357600080fd5b61180f87828801611778565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156118595761185961181b565b604052919050565b600082601f83011261187257600080fd5b81356001600160401b0381111561188b5761188b61181b565b61189e601f8201601f1916602001611831565b8181528460208386010111156118b357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156118e657600080fd5b84356118f18161171c565b935060208501356119018161171c565b92506040850135915060608501356001600160401b0381111561192357600080fd5b61192f87828801611861565b91505092959194509250565b60008083601f84011261194d57600080fd5b5081356001600160401b0381111561196457600080fd5b6020830191508360208260051b85010111156117b957600080fd5b6000806000806000806060878903121561199857600080fd5b86356001600160401b03808211156119af57600080fd5b6119bb8a838b0161193b565b909850965060208901359150808211156119d457600080fd5b6119e08a838b0161193b565b909650945060408901359150808211156119f957600080fd5b50611a0689828a0161193b565b979a9699509497509295939492505050565b60008060008060408587031215611a2e57600080fd5b84356001600160401b0380821115611a4557600080fd5b611a518883890161193b565b90965094506020870135915080821115611a6a57600080fd5b5061180f8782880161193b565b600060208284031215611a8957600080fd5b81356117158161171c565b6001600160a01b0391909116815260200190565b60008060008060008060006080888a031215611ac357600080fd5b8735611ace8161171c565b965060208801356001600160401b0380821115611aea57600080fd5b611af68b838c0161193b565b909850965060408a0135915080821115611b0f57600080fd5b611b1b8b838c0161193b565b909650945060608a0135915080821115611b3457600080fd5b50611b418a828b01611778565b989b979a50959850939692959293505050565b60008060408385031215611b6757600080fd5b82359150602083013561176d8161171c565b600082601f830112611b8a57600080fd5b813560206001600160401b03821115611ba557611ba561181b565b8160051b611bb4828201611831565b9283528481018201928281019087851115611bce57600080fd5b83870192505b8483101561164257823582529183019190830190611bd4565b600080600080600060a08688031215611c0557600080fd5b8535611c108161171c565b94506020860135611c208161171c565b935060408601356001600160401b0380821115611c3c57600080fd5b611c4889838a01611b79565b94506060880135915080821115611c5e57600080fd5b611c6a89838a01611b79565b93506080880135915080821115611c8057600080fd5b50611c8d88828901611861565b9150509295509295909350565b600080600060408486031215611caf57600080fd5b8335611cba8161171c565b925060208401356001600160401b03811115611cd557600080fd5b611ce186828701611778565b9497909650939450505050565b600080600080600060a08688031215611d0657600080fd5b8535611d118161171c565b94506020860135611d218161171c565b9350604086013592506060860135915060808601356001600160401b03811115611d4a57600080fd5b611c8d88828901611861565b600060208284031215611d6857600080fd5b815161171581611731565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03868116825285166020820152604081018490526080606082018190526000906116429083018486611d73565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611dfd57600080fd5b8301803591506001600160401b03821115611e1757600080fd5b6020019150368190038213156117b957600080fd5b600060208284031215611e3e57600080fd5b5051919050565b600060208284031215611e5757600080fd5b81516117158161171c565b9182526001600160a01b0316602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020808252818101527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b6564604082015260600190565b60005b83811015611eed578181015183820152602001611ed5565b50506000910152565b60008251611f08818460208701611ed2565b9190910192915050565b6020815260008251806020840152611f31816040850160208701611ed2565b601f01601f1916919091016040019291505056fe4f776e61626c654c6f636b65643a3a7472616e736665724f776e657273686970a2646970667358221220bd9886ffa361930b79bae4ba36fa6f1a32164b9b21192d99dfe4807a8fa1128064736f6c63430008190033000000000000000000000000b65a66621d7de34afec9b9ac0755133051550dd7000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da66
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c25760003560e01c806301ffc9a7146101c75780630d392cd9146101ef5780631205217614610204578063150b7a021461021757806315e98744146102435780631852b38314610256578063191658741461025d5780631d9389e914610270578063215cccdd146102835780632f08d48b146102835780632f70d1ba1461028a5780633c117244146102565780633ce8d432146102ad5780633eda81ad14610283578063422b2018146102e157806342315632146102f4578063448fd00c1461030757806358289c7e1461031a57806364c77735146102835780636a7ab9af1461032d578063715018a6146103405780638b648ee2146102565780638da5cb5b14610348578063a4a3e79d14610283578063acdafff114610350578063b0607cf814610256578063b892bcc014610363578063bc197c8114610376578063cd45e1fb14610395578063cf10b7ab14610256578063cf309012146103a8578063d284af94146103bc578063d8f2a78b146103cf578063dd913bdb14610256578063e7f4462914610283578063f23a6e61146103e2578063f2fde38b14610401578063fd76f59d14610414575b600080fd5b6101da6101d53660046116eb565b610427565b60405190151581526020015b60405180910390f35b6102026101fd36600461173f565b61045e565b005b6102026102123660046117c0565b61051f565b61022a6102253660046118d0565b610591565b6040516001600160e01b031990911681526020016101e6565b61020261025136600461197f565b6105a2565b60006101da565b61020261026b366004611a18565b610702565b61020261027e3660046117c0565b6107f9565b60016101da565b6101da610298366004611a77565b60026020526000908152604090205460ff1681565b6102d47f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da6681565b6040516101e69190611a94565b6102026102ef366004611aa8565b610864565b6102026103023660046117c0565b6108d3565b610202610315366004611b54565b6108fe565b610202610328366004611a77565b610c88565b61020261033b36600461197f565b610d45565b610202610dbd565b6102d4610dfb565b61020261035e366004611b54565b610e0a565b61020261037136600461197f565b610ffb565b61022a610384366004611bed565b63bc197c8160e01b95945050505050565b6102026103a3366004611c9a565b611151565b6000546101da90600160a01b900460ff1681565b6102026103ca36600461197f565b6111e7565b6102026103dd3660046117c0565b611238565b61022a6103f0366004611cee565b63f23a6e6160e01b95945050505050565b61020261040f366004611a77565b61125c565b610202610422366004611aa8565b6112fd565b60006001600160e01b03198216630271189760e51b148061045857506301ffc9a760e01b6001600160e01b03198316145b92915050565b6040516335d2155560e11b81527f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b031690636ba42aaa906104aa903390600401611a94565b602060405180830381865afa1580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611d56565b6104f457600080fd5b6001600160a01b03919091166000908152600260205260409020805460ff1916911515919091179055565b61052761136a565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724552433732604482015273312829202163616e50756c6c455243373231282960601b60648201526084015b60405180910390fd5b630a85bd0160e11b5b949350505050565b6105aa61136a565b60405162461bcd60e51b815260206004820152603e60248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b65724d756c746960448201527f4552433732312829202163616e50756c6c4d756c7469455243373231282900006064820152608401610588565b858110156106f95786868281811061063257610632611dd0565b90506020020160208101906106479190611a77565b6001600160a01b031663b88d4fde3061065e610dfb565b88888681811061067057610670611dd0565b9050602002013587878781811061068957610689611dd0565b905060200281019061069b9190611de6565b6040518663ffffffff1660e01b81526004016106bb959493929190611d9c565b600060405180830381600087803b1580156106d557600080fd5b505af11580156106e9573d6000803e3d6000fd5b5050600190920191506106189050565b50505050505050565b61070a61136a565b60005b838110156107f2576107ea610720610dfb565b86868481811061073257610732611dd0565b90506020020160208101906107479190611a77565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016107729190611a94565b602060405180830381865afa15801561078f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b39190611e2c565b8787858181106107c5576107c5611dd0565b90506020020160208101906107da9190611a77565b6001600160a01b031691906113c9565b60010161070d565b5050505050565b61080161136a565b60405162461bcd60e51b815260206004820152603260248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724552433732312860448201527129202163616e50757368455243373231282960701b6064820152608401610588565b61086c61136a565b60405162461bcd60e51b815260206004820152603660248201527f5a69766f654c6f636b65723a3a70756c6c46726f6d4c6f636b6572455243313160448201527535352829202163616e50756c6c45524331313535282960501b6064820152608401610588565b6108db61136a565b6108f86108e6610dfb565b6001600160a01b03861690308661142c565b50505050565b61090661144d565b600033905060007f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b0316639699177c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098f9190611e45565b905060007f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b031663c5f4f7b06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a159190611e45565b905060007f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b031663dc3c1da587876040518363ffffffff1660e01b8152600401610a67929190611e62565b602060405180830381865afa158015610a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa89190611e2c565b6001600160a01b03851660009081526002602052604090205490915060ff16610ad057600080fd5b610ae56001600160a01b03841685308461142c565b604051630852cd8d60e31b8152600481018290526001600160a01b038416906342966c6890602401600060405180830381600087803b158015610b2757600080fd5b505af1158015610b3b573d6000803e3d6000fd5b5050505060007f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b0316638aa256526040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc39190611e45565b604051634515d4e960e11b81529091506001600160a01b03821690638a2ba9d290610bf4908a908a90600401611e62565b600060405180830381600087803b158015610c0e57600080fd5b505af1158015610c22573d6000803e3d6000fd5b50610c3b925050506001600160a01b03841686846113c9565b7f1421ee1d8626ff158a67d2826bd29d5710396ecb1dc7a187f9f12b830ae8ee3e868689604051610c6e93929190611e79565b60405180910390a15050505050610c8460018055565b5050565b610c9061136a565b600054600160a01b900460ff1615610cba5760405162461bcd60e51b815260040161058890611e9d565b6001600160a01b038116610d26576040805162461bcd60e51b8152602060048201526024810191909152600080516020611f4683398151915260448201527f416e644c6f636b2829206e65774f776e6572203d3d20616464726573732830296064820152608401610588565b6000805460ff60a01b1916600160a01b179055610d42816114a6565b50565b610d4d61136a565b60005b858110156106f957610db5610d63610dfb565b30878785818110610d7657610d76611dd0565b905060200201358a8a86818110610d8f57610d8f611dd0565b9050602002016020810190610da49190611a77565b6001600160a01b031692919061142c565b600101610d50565b610dc561136a565b600054600160a01b900460ff1615610def5760405162461bcd60e51b815260040161058890611e9d565b610df960006114a6565b565b6000546001600160a01b031690565b610e1261144d565b600033905060007f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b031663c5f4f7b06040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b9190611e45565b905060007f000000000000000000000000ea537eb0bbcc7783bdf7c595bf9371984583da666001600160a01b031663dc3c1da586866040518363ffffffff1660e01b8152600401610eed929190611e62565b602060405180830381865afa158015610f0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2e9190611e2c565b9050610f456001600160a01b03831684308461142c565b604051630852cd8d60e31b8152600481018290526001600160a01b038316906342966c6890602401600060405180830381600087803b158015610f8757600080fd5b505af1158015610f9b573d6000803e3d6000fd5b50610fb4925050506001600160a01b03851684876113c9565b7fa5ff98532a1f9493a760628a77a4d4382c93e4568e6fddfa4dd80ff0359eebc4848487604051610fe793929190611e79565b60405180910390a1505050610c8460018055565b61100361136a565b60405162461bcd60e51b815260206004820152603c60248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b65724d756c7469455260448201527b433732312829202163616e507573684d756c7469455243373231282960201b6064820152608401610588565b858110156106f95786868281811061108a5761108a611dd0565b905060200201602081019061109f9190611a77565b6001600160a01b031663b88d4fde6110b5610dfb565b308888868181106110c8576110c8611dd0565b905060200201358787878181106110e1576110e1611dd0565b90506020028101906110f39190611de6565b6040518663ffffffff1660e01b8152600401611113959493929190611d9c565b600060405180830381600087803b15801561112d57600080fd5b505af1158015611141573d6000803e3d6000fd5b5050600190920191506110709050565b61115961136a565b6111e2611164610dfb565b6040516370a0823160e01b81526001600160a01b038616906370a0823190611190903090600401611a94565b602060405180830381865afa1580156111ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d19190611e2c565b6001600160a01b03861691906113c9565b505050565b6111ef61136a565b60005b858110156106f957611230611205610dfb565b86868481811061121757611217611dd0565b905060200201358989858181106107c5576107c5611dd0565b6001016111f2565b61124061136a565b6108f861124b610dfb565b6001600160a01b03861690856113c9565b61126461136a565b600054600160a01b900460ff161561128e5760405162461bcd60e51b815260040161058890611e9d565b6001600160a01b0381166112f45760405162461bcd60e51b81526020600482015260396024820152600080516020611f468339815191526044820152782829206e65774f776e6572203d3d206164647265737328302960381b6064820152608401610588565b610d42816114a6565b61130561136a565b60405162461bcd60e51b815260206004820152603460248201527f5a69766f654c6f636b65723a3a70757368546f4c6f636b6572455243313135356044820152732829202163616e5075736845524331313535282960601b6064820152608401610588565b33611373610dfb565b6001600160a01b031614610df95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b6040516001600160a01b0383166024820152604481018290526111e290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526114f6565b6108f8846323b872dd60e01b8585856040516024016113f593929190611e79565b60026001540361149f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610588565b6002600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061154b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115c89092919063ffffffff16565b8051909150156111e257808060200190518101906115699190611d56565b6111e25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610588565b606061059a848460008585600080866001600160a01b031685876040516115ef9190611ef6565b60006040518083038185875af1925050503d806000811461162c576040519150601f19603f3d011682016040523d82523d6000602084013e611631565b606091505b50915091506116428783838761164d565b979650505050505050565b606083156116bc5782516000036116b5576001600160a01b0385163b6116b55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610588565b508161059a565b61059a83838151156116d15781518083602001fd5b8060405162461bcd60e51b81526004016105889190611f12565b6000602082840312156116fd57600080fd5b81356001600160e01b03198116811461171557600080fd5b9392505050565b6001600160a01b0381168114610d4257600080fd5b8015158114610d4257600080fd5b6000806040838503121561175257600080fd5b823561175d8161171c565b9150602083013561176d81611731565b809150509250929050565b60008083601f84011261178a57600080fd5b5081356001600160401b038111156117a157600080fd5b6020830191508360208285010111156117b957600080fd5b9250929050565b600080600080606085870312156117d657600080fd5b84356117e18161171c565b93506020850135925060408501356001600160401b0381111561180357600080fd5b61180f87828801611778565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156118595761185961181b565b604052919050565b600082601f83011261187257600080fd5b81356001600160401b0381111561188b5761188b61181b565b61189e601f8201601f1916602001611831565b8181528460208386010111156118b357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156118e657600080fd5b84356118f18161171c565b935060208501356119018161171c565b92506040850135915060608501356001600160401b0381111561192357600080fd5b61192f87828801611861565b91505092959194509250565b60008083601f84011261194d57600080fd5b5081356001600160401b0381111561196457600080fd5b6020830191508360208260051b85010111156117b957600080fd5b6000806000806000806060878903121561199857600080fd5b86356001600160401b03808211156119af57600080fd5b6119bb8a838b0161193b565b909850965060208901359150808211156119d457600080fd5b6119e08a838b0161193b565b909650945060408901359150808211156119f957600080fd5b50611a0689828a0161193b565b979a9699509497509295939492505050565b60008060008060408587031215611a2e57600080fd5b84356001600160401b0380821115611a4557600080fd5b611a518883890161193b565b90965094506020870135915080821115611a6a57600080fd5b5061180f8782880161193b565b600060208284031215611a8957600080fd5b81356117158161171c565b6001600160a01b0391909116815260200190565b60008060008060008060006080888a031215611ac357600080fd5b8735611ace8161171c565b965060208801356001600160401b0380821115611aea57600080fd5b611af68b838c0161193b565b909850965060408a0135915080821115611b0f57600080fd5b611b1b8b838c0161193b565b909650945060608a0135915080821115611b3457600080fd5b50611b418a828b01611778565b989b979a50959850939692959293505050565b60008060408385031215611b6757600080fd5b82359150602083013561176d8161171c565b600082601f830112611b8a57600080fd5b813560206001600160401b03821115611ba557611ba561181b565b8160051b611bb4828201611831565b9283528481018201928281019087851115611bce57600080fd5b83870192505b8483101561164257823582529183019190830190611bd4565b600080600080600060a08688031215611c0557600080fd5b8535611c108161171c565b94506020860135611c208161171c565b935060408601356001600160401b0380821115611c3c57600080fd5b611c4889838a01611b79565b94506060880135915080821115611c5e57600080fd5b611c6a89838a01611b79565b93506080880135915080821115611c8057600080fd5b50611c8d88828901611861565b9150509295509295909350565b600080600060408486031215611caf57600080fd5b8335611cba8161171c565b925060208401356001600160401b03811115611cd557600080fd5b611ce186828701611778565b9497909650939450505050565b600080600080600060a08688031215611d0657600080fd5b8535611d118161171c565b94506020860135611d218161171c565b9350604086013592506060860135915060808601356001600160401b03811115611d4a57600080fd5b611c8d88828901611861565b600060208284031215611d6857600080fd5b815161171581611731565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b03868116825285166020820152604081018490526080606082018190526000906116429083018486611d73565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611dfd57600080fd5b8301803591506001600160401b03821115611e1757600080fd5b6020019150368190038213156117b957600080fd5b600060208284031215611e3e57600080fd5b5051919050565b600060208284031215611e5757600080fd5b81516117158161171c565b9182526001600160a01b0316602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020808252818101527f4f776e61626c654c6f636b65643a3a756e6c6f636b65642829206c6f636b6564604082015260600190565b60005b83811015611eed578181015183820152602001611ed5565b50506000910152565b60008251611f08818460208701611ed2565b9190910192915050565b6020815260008251806020840152611f31816040850160208701611ed2565b601f01601f1916919091016040019291505056fe4f776e61626c654c6f636b65643a3a7472616e736665724f776e657273686970a2646970667358221220bd9886ffa361930b79bae4ba36fa6f1a32164b9b21192d99dfe4807a8fa1128064736f6c63430008190033
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.