Source Code
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
PreOrder
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 10000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol";
import "openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol";
import "openzeppelin-contracts-upgradeable/contracts/utils/PausableUpgradeable.sol";
import "./custom1155.sol";
contract PreOrder is
OwnableUpgradeable,
PausableUpgradeable,
UUPSUpgradeable,
CustomERC1155
{
// Gnosis Safe to receive the preorder payments
address payable public gnosisSafe;
// Storages the data for each tier
// Number of tiers is configurable upon initialization
// * - tiers[0] -> TierData for Tier 0
// * - tiers[1] -> TierData for Tier 1
// ....
// * - tiers[n] -> TierData for Tier n
mapping(uint8 => TierData) public tiers;
// Configurable parameters for each tier
struct TierConfig {
uint128 costWei;
uint32 maxSupply;
}
// Store the metaData for each tier
struct TierData {
// cost in wei to mint a token of this tier
uint128 costWei;
// max supply of tokens for this tier
uint32 maxSupply;
// number of tokens minted for this tier
uint32 mintCount;
// starting id for this tier
uint32 startId;
}
// Contract owner is the timelock, admin role needed to eeform timely actions on the contract
address public admin;
// eETH can also be used as a payment
address public eEthToken;
// NFT metadata storage location
string public baseURI;
enum Type {
PRE_ORDER,
CRYPTO_ORDER,
FIAT_ORDER
}
address public fiatMinter;
// Event emitted when a PreOrder is processed
event PreOrderMint(
address indexed buyer,
uint256 indexed tier,
uint256 amount,
uint256 tokenId
);
// Event emitted when a Order is processed
event OrderCryptoMint(
address indexed buyer,
uint256 indexed tier,
uint256 amount,
uint256 tokenId
);
// Event emitted when a Order is placed via Apple/Google
event OrderFiatMint(
address indexed buyer,
uint256 indexed tier,
uint256 amount,
uint256 tokenId
);
function initialize(
address initialOwner,
address _gnosisSafe,
address _admin,
address _eEthToken,
string memory _baseURI,
TierConfig[] memory tierConfigArray,
address _fiatMinter
) public initializer {
require(
initialOwner != address(0),
"Incorrect address for initialOwner"
);
require(_gnosisSafe != address(0), "Incorrect address for gnosisSafe");
require(_admin != address(0), "Incorrect address for admin");
require(_eEthToken != address(0), "Incorrect address for eEthToken");
require(_fiatMinter != address(0), "Incorrect address for fiatMinter");
__Ownable_init(initialOwner);
__Pausable_init();
gnosisSafe = payable(_gnosisSafe);
fiatMinter = _fiatMinter;
admin = _admin;
eEthToken = _eEthToken;
baseURI = _baseURI;
uint32 totalCards = 0;
for (uint8 i = 0; i < tierConfigArray.length; i++) {
tiers[i] = TierData({
costWei: tierConfigArray[i].costWei,
maxSupply: tierConfigArray[i].maxSupply,
mintCount: 0,
startId: totalCards
});
totalCards += tierConfigArray[i].maxSupply;
}
// If we decide we want infinite of the last tier, we can just statically
// initialize to a giant number instead of doing this
assembly {
sstore(tokens.slot, totalCards)
}
}
//--------------------------------------------------------------------------------------
//-------------------------------- Public ---------------------------------------------
//--------------------------------------------------------------------------------------
// Mints a token with ETH as payment
function mint(uint8 _type, uint8 _tier, address _buyer) external payable whenNotPaused {
require(
tiers[_tier].mintCount < tiers[_tier].maxSupply,
"Tier sold out"
);
require(_type < 3, "Invalid type");
uint256 tokenId = tiers[_tier].startId + tiers[_tier].mintCount;
tiers[_tier].mintCount += 1;
if (_type != uint8(Type.FIAT_ORDER)){
require(msg.value == tiers[_tier].costWei, "Incorrect amount sent");
(bool success, ) = gnosisSafe.call{value: msg.value}("");
require(success, "Transfer failed");
if (_type == uint8(Type.PRE_ORDER))
emit PreOrderMint(_buyer, _tier, msg.value, tokenId);
if (_type == uint8(Type.CRYPTO_ORDER))
emit OrderCryptoMint(_buyer, _tier, msg.value, tokenId);
} else {
require(msg.sender == fiatMinter, "Not the fiatMinter");
emit OrderFiatMint(_buyer, _tier, 0, tokenId);
}
safeMint(_buyer, _tier, tokenId);
}
// Mints a token with eETH as payment
function MintWithPermit(
uint8 _type,
uint8 _tier,
address _buyer,
address _from,
uint256 _amount,
uint256 _deadline,
uint8 v,
bytes32 r,
bytes32 s
) external whenNotPaused {
require(
tiers[_tier].mintCount < tiers[_tier].maxSupply,
"Tier sold out"
);
require(_type < 3, "Invalid type");
uint256 tokenId = tiers[_tier].startId + tiers[_tier].mintCount;
tiers[_tier].mintCount += 1;
if (_type != uint8(Type.FIAT_ORDER)){
require(_amount == tiers[_tier].costWei, "Incorrect amount sent");
IERC20Permit(eEthToken).permit(
_from,
address(this),
_amount,
_deadline,
v,
r,
s
);
IERC20(eEthToken).transferFrom(_from, gnosisSafe, _amount);
if (_type == uint8(Type.PRE_ORDER)) {
emit PreOrderMint(_buyer, _tier, _amount, tokenId);
}
if (_type == uint8(Type.CRYPTO_ORDER)) {
emit OrderCryptoMint(_buyer, _tier, _amount, tokenId);
}
} else {
require(msg.sender == fiatMinter, "Not the fiatMinter");
emit OrderFiatMint(_buyer, _tier, 0, tokenId);
}
safeMint(_buyer, _tier, tokenId);
}
function maxSupply() external view returns (uint256) {
return tokens.length;
}
//--------------------------------------------------------------------------------------
//---------------------------------- ERC-1155 ----------------------------------------
//--------------------------------------------------------------------------------------
function uri(uint256 id) public view override returns (string memory) {
return string(abi.encodePacked(baseURI, Strings.toString(id), ".json"));
}
//--------------------------------------------------------------------------------------
//---------------------------------- Admin -------------------------------------------
//--------------------------------------------------------------------------------------
// Sets the mint price for a tier
function setTierData(uint8 _tier, uint128 _costWei) external onlyAdmin {
tiers[_tier].costWei = _costWei;
}
// Sets the uri
function setURI(string memory _uri) external onlyAdmin {
baseURI = _uri;
}
// Pauses the contract
function pauseContract() external onlyAdmin {
_pause();
}
// Unpauses the contract
function unPauseContract() external onlyAdmin {
_unpause();
}
// Updates the admin
function setAdmin(address _admin) external onlyOwner {
admin = _admin;
}
// Updates the fiatMinter
function setFiatMinter(address _fiatMinter) external onlyAdmin {
fiatMinter = _fiatMinter;
}
// Restricts the ability to upgrade the contract to the owner
function _authorizeUpgrade(
address newImplementation
) internal override onlyOwner {}
//--------------------------------------------------------------------------------------
//---------------------------------- Modifiers ---------------------------------------
//--------------------------------------------------------------------------------------
modifier onlyAdmin() {
require(msg.sender == admin, "Not the admin");
_;
}
receive() external payable {
revert("Direct transfers not allowed");
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = HEX_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
* representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Ownable
struct OwnableStorage {
address _owner;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;
function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
assembly {
$.slot := OwnableStorageLocation
}
}
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
function __Ownable_init(address initialOwner) internal onlyInitializing {
__Ownable_init_unchained(initialOwner);
}
function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @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) {
OwnableStorage storage $ = _getOwnableStorage();
return $._owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
OwnableStorage storage $ = _getOwnableStorage();
address oldOwner = $._owner;
$._owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.20;
import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
import {Initializable} from "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable __self = address(this);
/**
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
* during an upgrade.
*/
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
/**
* @dev The call is from an unauthorized context.
*/
error UUPSUnauthorizedCallContext();
/**
* @dev The storage `slot` is unsupported as a UUID.
*/
error UUPSUnsupportedProxiableUUID(bytes32 slot);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
_checkProxy();
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
_checkNotDelegated();
_;
}
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/**
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual notDelegated returns (bytes32) {
return ERC1967Utils.IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data);
}
/**
* @dev Reverts if the execution is not performed via delegatecall or the execution
* context is not of a proxy with an ERC1967-compliant implementation pointing to self.
* See {_onlyProxy}.
*/
function _checkProxy() internal view virtual {
if (
address(this) == __self || // Must be called through delegatecall
ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
) {
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Reverts if the execution is performed via delegatecall.
* See {notDelegated}.
*/
function _checkNotDelegated() internal view virtual {
if (address(this) != __self) {
// Must not be called through delegatecall
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
*
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
* is expected to be the implementation slot in ERC1967.
*
* Emits an {IERC1967-Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
revert UUPSUnsupportedProxiableUUID(slot);
}
ERC1967Utils.upgradeToAndCall(newImplementation, data);
} catch {
// The implementation is not UUPS
revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Pausable
struct PausableStorage {
bool _paused;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;
function _getPausableStorage() private pure returns (PausableStorage storage $) {
assembly {
$.slot := PausableStorageLocation
}
}
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
PausableStorage storage $ = _getPausableStorage();
$._paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
PausableStorage storage $ = _getPausableStorage();
return $._paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.24;
/// @notice Minimalist and gas efficient standard ERC1155 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol)
abstract contract CustomERC1155 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event TransferSingle(
address indexed operator, address indexed from, address indexed to, uint256 id, uint256 amount
);
event TransferBatch(
address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] amounts
);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
event URI(string value, uint256 indexed id);
/*//////////////////////////////////////////////////////////////
ERC1155 STORAGE
//////////////////////////////////////////////////////////////*/
struct TokenData {
address owner;
uint8 tokenTier;
}
TokenData[] public tokens;
mapping(address => mapping(address => bool)) public isApprovedForAll;
/*//////////////////////////////////////////////////////////////
METADATA LOGIC
//////////////////////////////////////////////////////////////*/
function uri(uint256 id) public view virtual returns (string memory);
/*//////////////////////////////////////////////////////////////
ERC1155 LOGIC
//////////////////////////////////////////////////////////////*/
function setApprovalForAll(address operator, bool approved) public virtual {
isApprovedForAll[msg.sender][operator] = approved;
emit ApprovalForAll(msg.sender, operator, approved);
}
function safeTransferFrom(
address, /*from*/
address, /*to*/
uint256, /*id*/
uint256, /*amount*/
bytes calldata /*data*/
) public virtual {
revert("TRANSFER_DISABLED");
}
function safeBatchTransferFrom(
address, /*from*/
address, /*to*/
uint256[] calldata, /*ids*/
uint256[] calldata, /*data*/
bytes calldata /*data*/
) public virtual {
revert("TRANSFER_DISABLED");
}
function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
require(account != address(0), "ERC1155: balance query for the zero address");
return tokens[id].owner == account ? 1 : 0;
}
function balanceOfBatch(address[] calldata owners, uint256[] calldata ids)
public
view
virtual
returns (uint256[] memory balances)
{
require(owners.length == ids.length, "LENGTH_MISMATCH");
balances = new uint256[](owners.length);
// Unchecked because the only math done is incrementing
// the array index counter which cannot possibly overflow.
unchecked {
for (uint256 i = 0; i < owners.length; ++i) {
balances[i] = balanceOf(owners[i], ids[i]);
}
}
}
// Scan for all tokens in the provided range (exclusive) for target user.
// This is intended to be called off-chain
function tokensForUser(address user, uint256 startIndex, uint256 endIndex) public view returns (uint256[] memory) {
require(startIndex < endIndex, "invalid range");
require(endIndex <= tokens.length, "invalid range");
uint256[] memory ownedTokens = new uint256[](tokens.length);
uint256 numOwned = 0;
for (uint256 idx = startIndex; idx < endIndex; ++idx) {
if (tokens[idx].owner == user) {
ownedTokens[numOwned++] = idx;
}
}
// truncate result
assembly {
mstore(ownedTokens, numOwned)
}
return ownedTokens;
}
/*//////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == 0x01ffc9a7 // ERC165 Interface ID for ERC165
|| interfaceId == 0xd9b67a26 // ERC165 Interface ID for ERC1155
|| interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function safeMint(address to, uint8 tier, uint256 tokenId) internal virtual {
tokens[tokenId] = TokenData(to, tier);
emit TransferSingle(msg.sender, address(0), to, tokenId, 1);
require(
to.code.length == 0
? to != address(0)
: ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), tokenId, 1, "")
== ERC1155TokenReceiver.onERC1155Received.selector,
"UNSAFE_RECIPIENT"
);
}
}
/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol)
abstract contract ERC1155TokenReceiver {
function onERC1155Received(address, address, uint256, uint256, bytes calldata) external virtual returns (bytes4) {
return ERC1155TokenReceiver.onERC1155Received.selector;
}
function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata)
external
virtual
returns (bytes4)
{
return ERC1155TokenReceiver.onERC1155BatchReceived.selector;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._initialized = 1;
if (isTopLevelCall) {
$._initializing = true;
}
_;
if (isTopLevelCall) {
$._initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._initialized = version;
$._initializing = true;
_;
$._initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
assembly {
$.slot := INITIALIZABLE_STORAGE
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.20;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822Proxiable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)
pragma solidity ^0.8.20;
import {IBeacon} from "../beacon/IBeacon.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*/
library ERC1967Utils {
// We re-declare ERC-1967 events here because they can't be used directly from IERC1967.
// This will be fixed in Solidity 0.8.21. At that point we should remove these events.
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev The `implementation` of the proxy is invalid.
*/
error ERC1967InvalidImplementation(address implementation);
/**
* @dev The `admin` of the proxy is invalid.
*/
error ERC1967InvalidAdmin(address admin);
/**
* @dev The `beacon` of the proxy is invalid.
*/
error ERC1967InvalidBeacon(address beacon);
/**
* @dev An upgrade function sees `msg.value > 0` that may be lost.
*/
error ERC1967NonPayable();
/**
* @dev Returns the current implementation address.
*/
function getImplementation() internal view returns (address) {
return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
if (newImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Performs implementation upgrade with additional setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
if (data.length > 0) {
Address.functionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function getAdmin() internal view returns (address) {
return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
if (newAdmin == address(0)) {
revert ERC1967InvalidAdmin(address(0));
}
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {IERC1967-AdminChanged} event.
*/
function changeAdmin(address newAdmin) internal {
emit AdminChanged(getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function getBeacon() internal view returns (address) {
return StorageSlot.getAddressSlot(BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
if (newBeacon.code.length == 0) {
revert ERC1967InvalidBeacon(newBeacon);
}
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;
address beaconImplementation = IBeacon(newBeacon).implementation();
if (beaconImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(beaconImplementation);
}
}
/**
* @dev Change the beacon and trigger a setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-BeaconUpgraded} event.
*
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
* efficiency.
*/
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
} else {
_checkNonPayable();
}
}
/**
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
* if an upgrade doesn't perform an initialization call.
*/
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.20;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeacon {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {UpgradeableBeacon} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}{
"remappings": [
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"@aave/=lib/aave-v3-core/contracts/",
"SmoothCryptoLib/=lib/crypto-lib/src/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@solidity/=lib/crypto-lib/src/",
"aave-v3-core/=lib/aave-v3-core/",
"crypto-lib/=lib/crypto-lib/",
"ds-test/=lib/solmate/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"solady/=lib/solady/src/",
"solmate/=lib/solmate/src/"
],
"optimizer": {
"enabled": true,
"runs": 10000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"OrderCryptoMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"OrderFiatMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PreOrderMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[{"internalType":"uint8","name":"_type","type":"uint8"},{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"MintWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"balances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eEthToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fiatMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gnosisSafe","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"address","name":"_gnosisSafe","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_eEthToken","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"},{"components":[{"internalType":"uint128","name":"costWei","type":"uint128"},{"internalType":"uint32","name":"maxSupply","type":"uint32"}],"internalType":"struct PreOrder.TierConfig[]","name":"tierConfigArray","type":"tuple[]"},{"internalType":"address","name":"_fiatMinter","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_type","type":"uint8"},{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"address","name":"_buyer","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"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":"safeBatchTransferFrom","outputs":[],"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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fiatMinter","type":"address"}],"name":"setFiatMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"uint128","name":"_costWei","type":"uint128"}],"name":"setTierData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setURI","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":"uint8","name":"","type":"uint8"}],"name":"tiers","outputs":[{"internalType":"uint128","name":"costWei","type":"uint128"},{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"mintCount","type":"uint32"},{"internalType":"uint32","name":"startId","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint8","name":"tokenTier","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"endIndex","type":"uint256"}],"name":"tokensForUser","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unPauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60a060405230608052348015610013575f80fd5b506080516137d061003a5f395f81816120dd0152818161210601526122d901526137d05ff3fe6080604052600436106101f7575f3560e01c8063715018a611610117578063bac15203116100ac578063d5abeb011161007c578063f242432a11610062578063f242432a14610737578063f2fde38b14610751578063f851a44014610770575f80fd5b8063d5abeb01146106eb578063e985e9c5146106fe575f80fd5b8063bac15203146105d2578063ca260270146105e6578063d1d7997414610605578063d20e4874146106d8575f80fd5b8063a84173ae116100e7578063a84173ae1461052d578063ad3cb1cc1461054c578063b32ebb4114610594578063ba4e955e146105b3575f80fd5b8063715018a61461049f5780638da5cb5b146104b3578063962fd643146104ef578063a22cb4651461050e575f80fd5b80634f64b2be1161018d5780635f00953b1161015d5780635f00953b1461042e578063615bc5e91461044d5780636c0360eb1461046c578063704b6c0214610480575f80fd5b80634f64b2be1461036d57806352d1902d146103ad57806355431928146103c15780635c975abb146103f8575f80fd5b80632eb2c2d6116101c85780632eb2c2d6146102fb578063439766ce1461031a5780634e1273f41461032e5780634f1ef2861461035a575f80fd5b8062fdd58e1461024d57806301ffc9a71461027f57806302fe5305146102ae5780630e89341c146102cf575f80fd5b366102495760405162461bcd60e51b815260206004820152601c60248201527f446972656374207472616e7366657273206e6f7420616c6c6f7765640000000060448201526064015b60405180910390fd5b5f80fd5b348015610258575f80fd5b5061026c610267366004612baa565b61078f565b6040519081526020015b60405180910390f35b34801561028a575f80fd5b5061029e610299366004612bff565b610854565b6040519015158152602001610276565b3480156102b9575f80fd5b506102cd6102c8366004612d50565b610938565b005b3480156102da575f80fd5b506102ee6102e9366004612d8a565b6109a2565b6040516102769190612dc3565b348015610306575f80fd5b506102cd610315366004612e99565b6109d6565b348015610325575f80fd5b506102cd610a1e565b348015610339575f80fd5b5061034d610348366004612f4c565b610a82565b6040516102769190612fb3565b6102cd610368366004612ff6565b610b98565b348015610378575f80fd5b5061038c610387366004612d8a565b610bb3565b604080516001600160a01b03909316835260ff909116602083015201610276565b3480156103b8575f80fd5b5061026c610bf6565b3480156103cc575f80fd5b506007546103e0906001600160a01b031681565b6040516001600160a01b039091168152602001610276565b348015610403575f80fd5b507fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1661029e565b348015610439575f80fd5b506102cd610448366004613083565b610c24565b348015610458575f80fd5b506005546103e0906001600160a01b031681565b348015610477575f80fd5b506102ee610cd1565b34801561048b575f80fd5b506102cd61049a3660046130b4565b610d5d565b3480156104aa575f80fd5b506102cd610d9f565b3480156104be575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166103e0565b3480156104fa575f80fd5b506102cd6105093660046130cd565b610db0565b348015610519575f80fd5b506102cd61052836600461322f565b61134d565b348015610538575f80fd5b506002546103e0906001600160a01b031681565b348015610557575f80fd5b506102ee6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b34801561059f575f80fd5b506102cd6105ae366004613264565b6113d6565b3480156105be575f80fd5b506102cd6105cd3660046130b4565b6118af565b3480156105dd575f80fd5b506102cd611943565b3480156105f1575f80fd5b5061034d6106003660046132ea565b6119a5565b348015610610575f80fd5b5061069961061f36600461331a565b60036020525f90815260409020546fffffffffffffffffffffffffffffffff81169063ffffffff700100000000000000000000000000000000820481169174010000000000000000000000000000000000000000810482169178010000000000000000000000000000000000000000000000009091041684565b604080516fffffffffffffffffffffffffffffffff909516855263ffffffff938416602086015291831691840191909152166060820152608001610276565b6102cd6106e6366004613333565b611b0e565b3480156106f6575f80fd5b505f5461026c565b348015610709575f80fd5b5061029e610718366004613373565b600160209081525f928352604080842090915290825290205460ff1681565b348015610742575f80fd5b506102cd61031536600461339b565b34801561075c575f80fd5b506102cd61076b3660046130b4565b611f4c565b34801561077b575f80fd5b506004546103e0906001600160a01b031681565b5f6001600160a01b03831661080c5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f20616464726573730000000000000000000000000000000000000000006064820152608401610240565b826001600160a01b03165f83815481106108285761082861340e565b5f918252602090912001546001600160a01b031614610847575f61084a565b60015b60ff169392505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806108e657507fd9b67a26000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061093257507f0e89341c000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6004546001600160a01b031633146109925760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b600661099e82826134d7565b5050565b606060066109af83611fa2565b6040516020016109c09291906135b5565b6040516020818303038152906040529050919050565b60405162461bcd60e51b815260206004820152601160248201527f5452414e534645525f44495341424c45440000000000000000000000000000006044820152606401610240565b6004546001600160a01b03163314610a785760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b610a8061203f565b565b6060838214610ad35760405162461bcd60e51b815260206004820152600f60248201527f4c454e4754485f4d49534d4154434800000000000000000000000000000000006044820152606401610240565b8367ffffffffffffffff811115610aec57610aec612c1a565b604051908082528060200260200182016040528015610b15578160200160208202803683370190505b5090505f5b84811015610b8f57610b6a868683818110610b3757610b3761340e565b9050602002016020810190610b4c91906130b4565b858584818110610b5e57610b5e61340e565b9050602002013561078f565b828281518110610b7c57610b7c61340e565b6020908102919091010152600101610b1a565b50949350505050565b610ba06120d2565b610ba9826121a2565b61099e82826121aa565b5f8181548110610bc1575f80fd5b5f918252602090912001546001600160a01b038116915074010000000000000000000000000000000000000000900460ff1682565b5f610bff6122ce565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6004546001600160a01b03163314610c7e5760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b60ff919091165f90815260036020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff909216919091179055565b60068054610cde9061343b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0a9061343b565b8015610d555780601f10610d2c57610100808354040283529160200191610d55565b820191905f5260205f20905b815481529060010190602001808311610d3857829003601f168201915b505050505081565b610d65612330565b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b610da7612330565b610a805f6123a4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f81158015610dfa5750825b90505f8267ffffffffffffffff166001148015610e165750303b155b905081158015610e24575080155b15610e5b576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610ebc5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b6001600160a01b038c16610f385760405162461bcd60e51b815260206004820152602260248201527f496e636f7272656374206164647265737320666f7220696e697469616c4f776e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152608401610240565b6001600160a01b038b16610f8e5760405162461bcd60e51b815260206004820181905260248201527f496e636f7272656374206164647265737320666f7220676e6f736973536166656044820152606401610240565b6001600160a01b038a16610fe45760405162461bcd60e51b815260206004820152601b60248201527f496e636f7272656374206164647265737320666f722061646d696e00000000006044820152606401610240565b6001600160a01b03891661103a5760405162461bcd60e51b815260206004820152601f60248201527f496e636f7272656374206164647265737320666f722065457468546f6b656e006044820152606401610240565b6001600160a01b0386166110905760405162461bcd60e51b815260206004820181905260248201527f496e636f7272656374206164647265737320666f7220666961744d696e7465726044820152606401610240565b6110998c61242c565b6110a161243d565b600280546001600160a01b03808e167fffffffffffffffffffffffff00000000000000000000000000000000000000009283161790925560078054898416908316179055600480548d841690831617905560058054928c1692909116919091179055600661110f89826134d7565b505f805b88518160ff1610156112db5760405180608001604052808a8360ff168151811061113f5761113f61340e565b60200260200101515f01516fffffffffffffffffffffffffffffffff1681526020018a8360ff16815181106111765761117661340e565b60209081029190910181015181015163ffffffff90811683525f83830181905286821660409485015260ff8616808252600384529084902085518154948701519587015160609097015184167801000000000000000000000000000000000000000000000000027fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff9785167401000000000000000000000000000000000000000002979097167fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff96909416700100000000000000000000000000000000027fffffffffffffffffffffffff00000000000000000000000000000000000000009095166fffffffffffffffffffffffffffffffff909116179390931793909316179290921790915589518a919081106112b0576112b061340e565b602002602001015160200151826112c791906136ab565b9150806112d3816136cf565b915050611113565b505f55831561133f5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050565b335f8181526001602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6113de61244d565b60ff88165f9081526003602052604090205463ffffffff700100000000000000000000000000000000820481167401000000000000000000000000000000000000000090920416106114725760405162461bcd60e51b815260206004820152600d60248201527f5469657220736f6c64206f7574000000000000000000000000000000000000006044820152606401610240565b60038960ff16106114c55760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964207479706500000000000000000000000000000000000000006044820152606401610240565b60ff88165f9081526003602052604081205461151d9063ffffffff74010000000000000000000000000000000000000000820481169178010000000000000000000000000000000000000000000000009004166136ab565b60ff8a165f908152600360205260409020805463ffffffff9283169350600192601491611564918591740100000000000000000000000000000000000000009004166136ab565b92506101000a81548163ffffffff021916908363ffffffff160217905550600280811115611594576115946136ed565b60ff168a60ff16146117f45760ff89165f908152600360205260409020546fffffffffffffffffffffffffffffffff1686146116125760405162461bcd60e51b815260206004820152601560248201527f496e636f727265637420616d6f756e742073656e7400000000000000000000006044820152606401610240565b6005546040517fd505accf0000000000000000000000000000000000000000000000000000000081526001600160a01b038981166004830152306024830152604482018990526064820188905260ff8716608483015260a4820186905260c482018590529091169063d505accf9060e4015f604051808303815f87803b15801561169a575f80fd5b505af11580156116ac573d5f803e3d5ffd5b50506005546002546040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529182166024820152604481018b9052911692506323b872dd91506064016020604051808303815f875af1158015611723573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611747919061371a565b5060ff8a1661179a57604080518781526020810183905260ff8b16916001600160a01b038b16917f1d9e33f32bdd0e038f110bb5561eb670349e743c446acc060e4f42fb38d14897910160405180910390a35b5f1960ff8b16016117ef57604080518781526020810183905260ff8b16916001600160a01b038b16917f75c8e8b10c317900d4024300a004d4e88d301ef70606e42dc8875d63f2560a0b910160405180910390a35b611898565b6007546001600160a01b0316331461184e5760405162461bcd60e51b815260206004820152601260248201527f4e6f742074686520666961744d696e74657200000000000000000000000000006044820152606401610240565b604080515f81526020810183905260ff8b16916001600160a01b038b16917f6f10e2b07d2ad8c96c5e20aaae1455d60050800bfcc0c29df8f2bc18024ee3ef910160405180910390a35b6118a3888a836124a9565b50505050505050505050565b6004546001600160a01b031633146119095760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6004546001600160a01b0316331461199d5760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b610a806126c0565b60608183106119f65760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642072616e6765000000000000000000000000000000000000006044820152606401610240565b5f54821115611a475760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642072616e6765000000000000000000000000000000000000006044820152606401610240565b5f805467ffffffffffffffff811115611a6257611a62612c1a565b604051908082528060200260200182016040528015611a8b578160200160208202803683370190505b5090505f845b84811015611b0157866001600160a01b03165f8281548110611ab557611ab561340e565b5f918252602090912001546001600160a01b031603611af957808383611ada81613735565b945081518110611aec57611aec61340e565b6020026020010181815250505b600101611a91565b50815290505b9392505050565b611b1661244d565b60ff82165f9081526003602052604090205463ffffffff70010000000000000000000000000000000082048116740100000000000000000000000000000000000000009092041610611baa5760405162461bcd60e51b815260206004820152600d60248201527f5469657220736f6c64206f7574000000000000000000000000000000000000006044820152606401610240565b60038360ff1610611bfd5760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964207479706500000000000000000000000000000000000000006044820152606401610240565b60ff82165f90815260036020526040812054611c559063ffffffff74010000000000000000000000000000000000000000820481169178010000000000000000000000000000000000000000000000009004166136ab565b60ff84165f908152600360205260409020805463ffffffff9283169350600192601491611c9c918591740100000000000000000000000000000000000000009004166136ab565b92506101000a81548163ffffffff021916908363ffffffff160217905550600280811115611ccc57611ccc6136ed565b60ff168460ff1614611e975760ff83165f908152600360205260409020546fffffffffffffffffffffffffffffffff163414611d4a5760405162461bcd60e51b815260206004820152601560248201527f496e636f727265637420616d6f756e742073656e7400000000000000000000006044820152606401610240565b6002546040515f916001600160a01b03169034908381818185875af1925050503d805f8114611d94576040519150601f19603f3d011682016040523d82523d5f602084013e611d99565b606091505b5050905080611dea5760405162461bcd60e51b815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610240565b60ff8516611e3c57604080513481526020810184905260ff8616916001600160a01b038616917f1d9e33f32bdd0e038f110bb5561eb670349e743c446acc060e4f42fb38d14897910160405180910390a35b5f1960ff861601611e9157604080513481526020810184905260ff8616916001600160a01b038616917f75c8e8b10c317900d4024300a004d4e88d301ef70606e42dc8875d63f2560a0b910160405180910390a35b50611f3b565b6007546001600160a01b03163314611ef15760405162461bcd60e51b815260206004820152601260248201527f4e6f742074686520666961744d696e74657200000000000000000000000000006044820152606401610240565b604080515f81526020810183905260ff8516916001600160a01b038516917f6f10e2b07d2ad8c96c5e20aaae1455d60050800bfcc0c29df8f2bc18024ee3ef910160405180910390a35b611f468284836124a9565b50505050565b611f54612330565b6001600160a01b038116611f96576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610240565b611f9f816123a4565b50565b60605f611fae83612736565b60010190505f8167ffffffffffffffff811115611fcd57611fcd612c1a565b6040519080825280601f01601f191660200182016040528015611ff7576020820181803683370190505b5090508181016020015b5f19017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461200157509392505050565b61204761244d565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a150565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061216b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661215f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b15610a80576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f9f612330565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612222575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261221f9181019061374d565b60015b612263576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610240565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146122bf576040517faa1d49a400000000000000000000000000000000000000000000000000000000815260048101829052602401610240565b6122c98383612817565b505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a80576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336123627f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614610a80576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610240565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff000000000000000000000000000000000000000081166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b61243461286c565b611f9f816128d3565b61244561286c565b610a806128db565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1615610a80576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060400160405280846001600160a01b031681526020018360ff168152505f82815481106124dc576124dc61340e565b5f9182526020808320845192018054949091015160ff1674010000000000000000000000000000000000000000027fffffffffffffffffffffff0000000000000000000000000000000000000000009094166001600160a01b0392831617939093179092556040519185169133907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290612583908690600190918252602082015260400190565b60405180910390a46001600160a01b0383163b15612667576040517ff23a6e61000000000000000000000000000000000000000000000000000000008082523360048301525f60248301819052604483018490526001606484015260a0608484015260a4830152906001600160a01b0385169063f23a6e619060c4016020604051808303815f875af115801561261b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061263f9190613764565b7fffffffff000000000000000000000000000000000000000000000000000000001614612674565b6001600160a01b03831615155b6122c95760405162461bcd60e51b815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610240565b6126c861292c565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336120b4565b5f807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061277e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106127aa576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106127c857662386f26fc10000830492506010015b6305f5e10083106127e0576305f5e100830492506008015b61271083106127f457612710830492506004015b60648310612806576064830492506002015b600a83106109325760010192915050565b61282082612987565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115612864576122c98282612a2e565b61099e612aa0565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16610a80576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f5461286c565b6128e361286c565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16610a80576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160a01b03163b5f036129d5576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610240565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60605f80846001600160a01b031684604051612a4a919061377f565b5f60405180830381855af49150503d805f8114612a82576040519150601f19603f3d011682016040523d82523d5f602084013e612a87565b606091505b5091509150612a97858383612ad8565b95945050505050565b3415610a80576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082612aed57612ae882612b4d565b611b07565b8151158015612b0457506001600160a01b0384163b155b15612b46576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610240565b5080611b07565b805115612b5d5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b0381168114612ba5575f80fd5b919050565b5f8060408385031215612bbb575f80fd5b612bc483612b8f565b946020939093013593505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611f9f575f80fd5b5f60208284031215612c0f575f80fd5b8135611b0781612bd2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715612c6a57612c6a612c1a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612cb757612cb7612c1a565b604052919050565b5f67ffffffffffffffff831115612cd857612cd8612c1a565b612d0960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601612c70565b9050828152838383011115612d1c575f80fd5b828260208301375f602084830101529392505050565b5f82601f830112612d41575f80fd5b611b0783833560208501612cbf565b5f60208284031215612d60575f80fd5b813567ffffffffffffffff811115612d76575f80fd5b612d8284828501612d32565b949350505050565b5f60208284031215612d9a575f80fd5b5035919050565b5f5b83811015612dbb578181015183820152602001612da3565b50505f910152565b602081525f8251806020840152612de1816040850160208701612da1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b5f8083601f840112612e23575f80fd5b50813567ffffffffffffffff811115612e3a575f80fd5b6020830191508360208260051b8501011115612e54575f80fd5b9250929050565b5f8083601f840112612e6b575f80fd5b50813567ffffffffffffffff811115612e82575f80fd5b602083019150836020828501011115612e54575f80fd5b5f805f805f805f8060a0898b031215612eb0575f80fd5b612eb989612b8f565b9750612ec760208a01612b8f565b9650604089013567ffffffffffffffff80821115612ee3575f80fd5b612eef8c838d01612e13565b909850965060608b0135915080821115612f07575f80fd5b612f138c838d01612e13565b909650945060808b0135915080821115612f2b575f80fd5b50612f388b828c01612e5b565b999c989b5096995094979396929594505050565b5f805f8060408587031215612f5f575f80fd5b843567ffffffffffffffff80821115612f76575f80fd5b612f8288838901612e13565b90965094506020870135915080821115612f9a575f80fd5b50612fa787828801612e13565b95989497509550505050565b602080825282518282018190525f9190848201906040850190845b81811015612fea57835183529284019291840191600101612fce565b50909695505050505050565b5f8060408385031215613007575f80fd5b61301083612b8f565b9150602083013567ffffffffffffffff81111561302b575f80fd5b8301601f8101851361303b575f80fd5b61304a85823560208401612cbf565b9150509250929050565b803560ff81168114612ba5575f80fd5b80356fffffffffffffffffffffffffffffffff81168114612ba5575f80fd5b5f8060408385031215613094575f80fd5b61309d83613054565b91506130ab60208401613064565b90509250929050565b5f602082840312156130c4575f80fd5b611b0782612b8f565b5f805f805f805f60e0888a0312156130e3575f80fd5b6130ec88612b8f565b965060206130fb818a01612b8f565b965061310960408a01612b8f565b955061311760608a01612b8f565b9450608089013567ffffffffffffffff80821115613133575f80fd5b61313f8c838d01612d32565b955060a08b0135915080821115613154575f80fd5b818b0191508b601f830112613167575f80fd5b81358181111561317957613179612c1a565b613187848260051b01612c70565b818152848101925060069190911b83018401908d8211156131a6575f80fd5b928401925b81841015613200576040848f0312156131c2575f80fd5b6131ca612c47565b6131d385613064565b81528585013563ffffffff811681146131ea575f80fd5b81870152835260409390930192918401916131ab565b809650505050505061321460c08901612b8f565b905092959891949750929550565b8015158114611f9f575f80fd5b5f8060408385031215613240575f80fd5b61324983612b8f565b9150602083013561325981613222565b809150509250929050565b5f805f805f805f805f6101208a8c03121561327d575f80fd5b6132868a613054565b985061329460208b01613054565b97506132a260408b01612b8f565b96506132b060608b01612b8f565b955060808a0135945060a08a013593506132cc60c08b01613054565b925060e08a013591506101008a013590509295985092959850929598565b5f805f606084860312156132fc575f80fd5b61330584612b8f565b95602085013595506040909401359392505050565b5f6020828403121561332a575f80fd5b611b0782613054565b5f805f60608486031215613345575f80fd5b61334e84613054565b925061335c60208501613054565b915061336a60408501612b8f565b90509250925092565b5f8060408385031215613384575f80fd5b61338d83612b8f565b91506130ab60208401612b8f565b5f805f805f8060a087890312156133b0575f80fd5b6133b987612b8f565b95506133c760208801612b8f565b94506040870135935060608701359250608087013567ffffffffffffffff8111156133f0575f80fd5b6133fc89828a01612e5b565b979a9699509497509295939492505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b600181811c9082168061344f57607f821691505b602082108103613486577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b601f8211156122c957805f5260205f20601f840160051c810160208510156134b15750805b601f840160051c820191505b818110156134d0575f81556001016134bd565b5050505050565b815167ffffffffffffffff8111156134f1576134f1612c1a565b613505816134ff845461343b565b8461348c565b602080601f831160018114613538575f84156135215750858301515b5f19600386901b1c1916600185901b1785556135ad565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561358457888601518255948401946001909101908401613565565b50858210156135a157878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f8084546135c28161343b565b600182811680156135da576001811461360d57613639565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450613639565b885f526020805f205f5b858110156136305781548a820152908401908201613617565b50505082870194505b50505050835161364d818360208801612da1565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b63ffffffff8181168382160190808211156136c8576136c861367e565b5092915050565b5f60ff821660ff81036136e4576136e461367e565b60010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f6020828403121561372a575f80fd5b8151611b0781613222565b5f5f1982036137465761374661367e565b5060010190565b5f6020828403121561375d575f80fd5b5051919050565b5f60208284031215613774575f80fd5b8151611b0781612bd2565b5f8251613790818460208701612da1565b919091019291505056fea2646970667358221220c76a77b2abfeb83078a2c19169afea5ae848e57a8e60b12670813b5ffa7e65b764736f6c63430008180033
Deployed Bytecode
0x6080604052600436106101f7575f3560e01c8063715018a611610117578063bac15203116100ac578063d5abeb011161007c578063f242432a11610062578063f242432a14610737578063f2fde38b14610751578063f851a44014610770575f80fd5b8063d5abeb01146106eb578063e985e9c5146106fe575f80fd5b8063bac15203146105d2578063ca260270146105e6578063d1d7997414610605578063d20e4874146106d8575f80fd5b8063a84173ae116100e7578063a84173ae1461052d578063ad3cb1cc1461054c578063b32ebb4114610594578063ba4e955e146105b3575f80fd5b8063715018a61461049f5780638da5cb5b146104b3578063962fd643146104ef578063a22cb4651461050e575f80fd5b80634f64b2be1161018d5780635f00953b1161015d5780635f00953b1461042e578063615bc5e91461044d5780636c0360eb1461046c578063704b6c0214610480575f80fd5b80634f64b2be1461036d57806352d1902d146103ad57806355431928146103c15780635c975abb146103f8575f80fd5b80632eb2c2d6116101c85780632eb2c2d6146102fb578063439766ce1461031a5780634e1273f41461032e5780634f1ef2861461035a575f80fd5b8062fdd58e1461024d57806301ffc9a71461027f57806302fe5305146102ae5780630e89341c146102cf575f80fd5b366102495760405162461bcd60e51b815260206004820152601c60248201527f446972656374207472616e7366657273206e6f7420616c6c6f7765640000000060448201526064015b60405180910390fd5b5f80fd5b348015610258575f80fd5b5061026c610267366004612baa565b61078f565b6040519081526020015b60405180910390f35b34801561028a575f80fd5b5061029e610299366004612bff565b610854565b6040519015158152602001610276565b3480156102b9575f80fd5b506102cd6102c8366004612d50565b610938565b005b3480156102da575f80fd5b506102ee6102e9366004612d8a565b6109a2565b6040516102769190612dc3565b348015610306575f80fd5b506102cd610315366004612e99565b6109d6565b348015610325575f80fd5b506102cd610a1e565b348015610339575f80fd5b5061034d610348366004612f4c565b610a82565b6040516102769190612fb3565b6102cd610368366004612ff6565b610b98565b348015610378575f80fd5b5061038c610387366004612d8a565b610bb3565b604080516001600160a01b03909316835260ff909116602083015201610276565b3480156103b8575f80fd5b5061026c610bf6565b3480156103cc575f80fd5b506007546103e0906001600160a01b031681565b6040516001600160a01b039091168152602001610276565b348015610403575f80fd5b507fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1661029e565b348015610439575f80fd5b506102cd610448366004613083565b610c24565b348015610458575f80fd5b506005546103e0906001600160a01b031681565b348015610477575f80fd5b506102ee610cd1565b34801561048b575f80fd5b506102cd61049a3660046130b4565b610d5d565b3480156104aa575f80fd5b506102cd610d9f565b3480156104be575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166103e0565b3480156104fa575f80fd5b506102cd6105093660046130cd565b610db0565b348015610519575f80fd5b506102cd61052836600461322f565b61134d565b348015610538575f80fd5b506002546103e0906001600160a01b031681565b348015610557575f80fd5b506102ee6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b34801561059f575f80fd5b506102cd6105ae366004613264565b6113d6565b3480156105be575f80fd5b506102cd6105cd3660046130b4565b6118af565b3480156105dd575f80fd5b506102cd611943565b3480156105f1575f80fd5b5061034d6106003660046132ea565b6119a5565b348015610610575f80fd5b5061069961061f36600461331a565b60036020525f90815260409020546fffffffffffffffffffffffffffffffff81169063ffffffff700100000000000000000000000000000000820481169174010000000000000000000000000000000000000000810482169178010000000000000000000000000000000000000000000000009091041684565b604080516fffffffffffffffffffffffffffffffff909516855263ffffffff938416602086015291831691840191909152166060820152608001610276565b6102cd6106e6366004613333565b611b0e565b3480156106f6575f80fd5b505f5461026c565b348015610709575f80fd5b5061029e610718366004613373565b600160209081525f928352604080842090915290825290205460ff1681565b348015610742575f80fd5b506102cd61031536600461339b565b34801561075c575f80fd5b506102cd61076b3660046130b4565b611f4c565b34801561077b575f80fd5b506004546103e0906001600160a01b031681565b5f6001600160a01b03831661080c5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f20616464726573730000000000000000000000000000000000000000006064820152608401610240565b826001600160a01b03165f83815481106108285761082861340e565b5f918252602090912001546001600160a01b031614610847575f61084a565b60015b60ff169392505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806108e657507fd9b67a26000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061093257507f0e89341c000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6004546001600160a01b031633146109925760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b600661099e82826134d7565b5050565b606060066109af83611fa2565b6040516020016109c09291906135b5565b6040516020818303038152906040529050919050565b60405162461bcd60e51b815260206004820152601160248201527f5452414e534645525f44495341424c45440000000000000000000000000000006044820152606401610240565b6004546001600160a01b03163314610a785760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b610a8061203f565b565b6060838214610ad35760405162461bcd60e51b815260206004820152600f60248201527f4c454e4754485f4d49534d4154434800000000000000000000000000000000006044820152606401610240565b8367ffffffffffffffff811115610aec57610aec612c1a565b604051908082528060200260200182016040528015610b15578160200160208202803683370190505b5090505f5b84811015610b8f57610b6a868683818110610b3757610b3761340e565b9050602002016020810190610b4c91906130b4565b858584818110610b5e57610b5e61340e565b9050602002013561078f565b828281518110610b7c57610b7c61340e565b6020908102919091010152600101610b1a565b50949350505050565b610ba06120d2565b610ba9826121a2565b61099e82826121aa565b5f8181548110610bc1575f80fd5b5f918252602090912001546001600160a01b038116915074010000000000000000000000000000000000000000900460ff1682565b5f610bff6122ce565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6004546001600160a01b03163314610c7e5760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b60ff919091165f90815260036020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff909216919091179055565b60068054610cde9061343b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0a9061343b565b8015610d555780601f10610d2c57610100808354040283529160200191610d55565b820191905f5260205f20905b815481529060010190602001808311610d3857829003601f168201915b505050505081565b610d65612330565b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b610da7612330565b610a805f6123a4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f81158015610dfa5750825b90505f8267ffffffffffffffff166001148015610e165750303b155b905081158015610e24575080155b15610e5b576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610ebc5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b6001600160a01b038c16610f385760405162461bcd60e51b815260206004820152602260248201527f496e636f7272656374206164647265737320666f7220696e697469616c4f776e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152608401610240565b6001600160a01b038b16610f8e5760405162461bcd60e51b815260206004820181905260248201527f496e636f7272656374206164647265737320666f7220676e6f736973536166656044820152606401610240565b6001600160a01b038a16610fe45760405162461bcd60e51b815260206004820152601b60248201527f496e636f7272656374206164647265737320666f722061646d696e00000000006044820152606401610240565b6001600160a01b03891661103a5760405162461bcd60e51b815260206004820152601f60248201527f496e636f7272656374206164647265737320666f722065457468546f6b656e006044820152606401610240565b6001600160a01b0386166110905760405162461bcd60e51b815260206004820181905260248201527f496e636f7272656374206164647265737320666f7220666961744d696e7465726044820152606401610240565b6110998c61242c565b6110a161243d565b600280546001600160a01b03808e167fffffffffffffffffffffffff00000000000000000000000000000000000000009283161790925560078054898416908316179055600480548d841690831617905560058054928c1692909116919091179055600661110f89826134d7565b505f805b88518160ff1610156112db5760405180608001604052808a8360ff168151811061113f5761113f61340e565b60200260200101515f01516fffffffffffffffffffffffffffffffff1681526020018a8360ff16815181106111765761117661340e565b60209081029190910181015181015163ffffffff90811683525f83830181905286821660409485015260ff8616808252600384529084902085518154948701519587015160609097015184167801000000000000000000000000000000000000000000000000027fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff9785167401000000000000000000000000000000000000000002979097167fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff96909416700100000000000000000000000000000000027fffffffffffffffffffffffff00000000000000000000000000000000000000009095166fffffffffffffffffffffffffffffffff909116179390931793909316179290921790915589518a919081106112b0576112b061340e565b602002602001015160200151826112c791906136ab565b9150806112d3816136cf565b915050611113565b505f55831561133f5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050565b335f8181526001602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6113de61244d565b60ff88165f9081526003602052604090205463ffffffff700100000000000000000000000000000000820481167401000000000000000000000000000000000000000090920416106114725760405162461bcd60e51b815260206004820152600d60248201527f5469657220736f6c64206f7574000000000000000000000000000000000000006044820152606401610240565b60038960ff16106114c55760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964207479706500000000000000000000000000000000000000006044820152606401610240565b60ff88165f9081526003602052604081205461151d9063ffffffff74010000000000000000000000000000000000000000820481169178010000000000000000000000000000000000000000000000009004166136ab565b60ff8a165f908152600360205260409020805463ffffffff9283169350600192601491611564918591740100000000000000000000000000000000000000009004166136ab565b92506101000a81548163ffffffff021916908363ffffffff160217905550600280811115611594576115946136ed565b60ff168a60ff16146117f45760ff89165f908152600360205260409020546fffffffffffffffffffffffffffffffff1686146116125760405162461bcd60e51b815260206004820152601560248201527f496e636f727265637420616d6f756e742073656e7400000000000000000000006044820152606401610240565b6005546040517fd505accf0000000000000000000000000000000000000000000000000000000081526001600160a01b038981166004830152306024830152604482018990526064820188905260ff8716608483015260a4820186905260c482018590529091169063d505accf9060e4015f604051808303815f87803b15801561169a575f80fd5b505af11580156116ac573d5f803e3d5ffd5b50506005546002546040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529182166024820152604481018b9052911692506323b872dd91506064016020604051808303815f875af1158015611723573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611747919061371a565b5060ff8a1661179a57604080518781526020810183905260ff8b16916001600160a01b038b16917f1d9e33f32bdd0e038f110bb5561eb670349e743c446acc060e4f42fb38d14897910160405180910390a35b5f1960ff8b16016117ef57604080518781526020810183905260ff8b16916001600160a01b038b16917f75c8e8b10c317900d4024300a004d4e88d301ef70606e42dc8875d63f2560a0b910160405180910390a35b611898565b6007546001600160a01b0316331461184e5760405162461bcd60e51b815260206004820152601260248201527f4e6f742074686520666961744d696e74657200000000000000000000000000006044820152606401610240565b604080515f81526020810183905260ff8b16916001600160a01b038b16917f6f10e2b07d2ad8c96c5e20aaae1455d60050800bfcc0c29df8f2bc18024ee3ef910160405180910390a35b6118a3888a836124a9565b50505050505050505050565b6004546001600160a01b031633146119095760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6004546001600160a01b0316331461199d5760405162461bcd60e51b815260206004820152600d60248201527f4e6f74207468652061646d696e000000000000000000000000000000000000006044820152606401610240565b610a806126c0565b60608183106119f65760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642072616e6765000000000000000000000000000000000000006044820152606401610240565b5f54821115611a475760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642072616e6765000000000000000000000000000000000000006044820152606401610240565b5f805467ffffffffffffffff811115611a6257611a62612c1a565b604051908082528060200260200182016040528015611a8b578160200160208202803683370190505b5090505f845b84811015611b0157866001600160a01b03165f8281548110611ab557611ab561340e565b5f918252602090912001546001600160a01b031603611af957808383611ada81613735565b945081518110611aec57611aec61340e565b6020026020010181815250505b600101611a91565b50815290505b9392505050565b611b1661244d565b60ff82165f9081526003602052604090205463ffffffff70010000000000000000000000000000000082048116740100000000000000000000000000000000000000009092041610611baa5760405162461bcd60e51b815260206004820152600d60248201527f5469657220736f6c64206f7574000000000000000000000000000000000000006044820152606401610240565b60038360ff1610611bfd5760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964207479706500000000000000000000000000000000000000006044820152606401610240565b60ff82165f90815260036020526040812054611c559063ffffffff74010000000000000000000000000000000000000000820481169178010000000000000000000000000000000000000000000000009004166136ab565b60ff84165f908152600360205260409020805463ffffffff9283169350600192601491611c9c918591740100000000000000000000000000000000000000009004166136ab565b92506101000a81548163ffffffff021916908363ffffffff160217905550600280811115611ccc57611ccc6136ed565b60ff168460ff1614611e975760ff83165f908152600360205260409020546fffffffffffffffffffffffffffffffff163414611d4a5760405162461bcd60e51b815260206004820152601560248201527f496e636f727265637420616d6f756e742073656e7400000000000000000000006044820152606401610240565b6002546040515f916001600160a01b03169034908381818185875af1925050503d805f8114611d94576040519150601f19603f3d011682016040523d82523d5f602084013e611d99565b606091505b5050905080611dea5760405162461bcd60e51b815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610240565b60ff8516611e3c57604080513481526020810184905260ff8616916001600160a01b038616917f1d9e33f32bdd0e038f110bb5561eb670349e743c446acc060e4f42fb38d14897910160405180910390a35b5f1960ff861601611e9157604080513481526020810184905260ff8616916001600160a01b038616917f75c8e8b10c317900d4024300a004d4e88d301ef70606e42dc8875d63f2560a0b910160405180910390a35b50611f3b565b6007546001600160a01b03163314611ef15760405162461bcd60e51b815260206004820152601260248201527f4e6f742074686520666961744d696e74657200000000000000000000000000006044820152606401610240565b604080515f81526020810183905260ff8516916001600160a01b038516917f6f10e2b07d2ad8c96c5e20aaae1455d60050800bfcc0c29df8f2bc18024ee3ef910160405180910390a35b611f468284836124a9565b50505050565b611f54612330565b6001600160a01b038116611f96576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610240565b611f9f816123a4565b50565b60605f611fae83612736565b60010190505f8167ffffffffffffffff811115611fcd57611fcd612c1a565b6040519080825280601f01601f191660200182016040528015611ff7576020820181803683370190505b5090508181016020015b5f19017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461200157509392505050565b61204761244d565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a150565b306001600160a01b037f0000000000000000000000008b7a14fc3a93c2d43ffd2d2089d4e84c0f97ff4416148061216b57507f0000000000000000000000008b7a14fc3a93c2d43ffd2d2089d4e84c0f97ff446001600160a01b031661215f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b15610a80576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f9f612330565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612222575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261221f9181019061374d565b60015b612263576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610240565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146122bf576040517faa1d49a400000000000000000000000000000000000000000000000000000000815260048101829052602401610240565b6122c98383612817565b505050565b306001600160a01b037f0000000000000000000000008b7a14fc3a93c2d43ffd2d2089d4e84c0f97ff441614610a80576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336123627f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b031614610a80576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610240565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff000000000000000000000000000000000000000081166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b61243461286c565b611f9f816128d3565b61244561286c565b610a806128db565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1615610a80576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060400160405280846001600160a01b031681526020018360ff168152505f82815481106124dc576124dc61340e565b5f9182526020808320845192018054949091015160ff1674010000000000000000000000000000000000000000027fffffffffffffffffffffff0000000000000000000000000000000000000000009094166001600160a01b0392831617939093179092556040519185169133907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290612583908690600190918252602082015260400190565b60405180910390a46001600160a01b0383163b15612667576040517ff23a6e61000000000000000000000000000000000000000000000000000000008082523360048301525f60248301819052604483018490526001606484015260a0608484015260a4830152906001600160a01b0385169063f23a6e619060c4016020604051808303815f875af115801561261b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061263f9190613764565b7fffffffff000000000000000000000000000000000000000000000000000000001614612674565b6001600160a01b03831615155b6122c95760405162461bcd60e51b815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610240565b6126c861292c565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336120b4565b5f807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061277e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106127aa576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106127c857662386f26fc10000830492506010015b6305f5e10083106127e0576305f5e100830492506008015b61271083106127f457612710830492506004015b60648310612806576064830492506002015b600a83106109325760010192915050565b61282082612987565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115612864576122c98282612a2e565b61099e612aa0565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16610a80576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f5461286c565b6128e361286c565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16610a80576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160a01b03163b5f036129d5576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610240565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60605f80846001600160a01b031684604051612a4a919061377f565b5f60405180830381855af49150503d805f8114612a82576040519150601f19603f3d011682016040523d82523d5f602084013e612a87565b606091505b5091509150612a97858383612ad8565b95945050505050565b3415610a80576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082612aed57612ae882612b4d565b611b07565b8151158015612b0457506001600160a01b0384163b155b15612b46576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610240565b5080611b07565b805115612b5d5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b0381168114612ba5575f80fd5b919050565b5f8060408385031215612bbb575f80fd5b612bc483612b8f565b946020939093013593505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611f9f575f80fd5b5f60208284031215612c0f575f80fd5b8135611b0781612bd2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715612c6a57612c6a612c1a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612cb757612cb7612c1a565b604052919050565b5f67ffffffffffffffff831115612cd857612cd8612c1a565b612d0960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601612c70565b9050828152838383011115612d1c575f80fd5b828260208301375f602084830101529392505050565b5f82601f830112612d41575f80fd5b611b0783833560208501612cbf565b5f60208284031215612d60575f80fd5b813567ffffffffffffffff811115612d76575f80fd5b612d8284828501612d32565b949350505050565b5f60208284031215612d9a575f80fd5b5035919050565b5f5b83811015612dbb578181015183820152602001612da3565b50505f910152565b602081525f8251806020840152612de1816040850160208701612da1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b5f8083601f840112612e23575f80fd5b50813567ffffffffffffffff811115612e3a575f80fd5b6020830191508360208260051b8501011115612e54575f80fd5b9250929050565b5f8083601f840112612e6b575f80fd5b50813567ffffffffffffffff811115612e82575f80fd5b602083019150836020828501011115612e54575f80fd5b5f805f805f805f8060a0898b031215612eb0575f80fd5b612eb989612b8f565b9750612ec760208a01612b8f565b9650604089013567ffffffffffffffff80821115612ee3575f80fd5b612eef8c838d01612e13565b909850965060608b0135915080821115612f07575f80fd5b612f138c838d01612e13565b909650945060808b0135915080821115612f2b575f80fd5b50612f388b828c01612e5b565b999c989b5096995094979396929594505050565b5f805f8060408587031215612f5f575f80fd5b843567ffffffffffffffff80821115612f76575f80fd5b612f8288838901612e13565b90965094506020870135915080821115612f9a575f80fd5b50612fa787828801612e13565b95989497509550505050565b602080825282518282018190525f9190848201906040850190845b81811015612fea57835183529284019291840191600101612fce565b50909695505050505050565b5f8060408385031215613007575f80fd5b61301083612b8f565b9150602083013567ffffffffffffffff81111561302b575f80fd5b8301601f8101851361303b575f80fd5b61304a85823560208401612cbf565b9150509250929050565b803560ff81168114612ba5575f80fd5b80356fffffffffffffffffffffffffffffffff81168114612ba5575f80fd5b5f8060408385031215613094575f80fd5b61309d83613054565b91506130ab60208401613064565b90509250929050565b5f602082840312156130c4575f80fd5b611b0782612b8f565b5f805f805f805f60e0888a0312156130e3575f80fd5b6130ec88612b8f565b965060206130fb818a01612b8f565b965061310960408a01612b8f565b955061311760608a01612b8f565b9450608089013567ffffffffffffffff80821115613133575f80fd5b61313f8c838d01612d32565b955060a08b0135915080821115613154575f80fd5b818b0191508b601f830112613167575f80fd5b81358181111561317957613179612c1a565b613187848260051b01612c70565b818152848101925060069190911b83018401908d8211156131a6575f80fd5b928401925b81841015613200576040848f0312156131c2575f80fd5b6131ca612c47565b6131d385613064565b81528585013563ffffffff811681146131ea575f80fd5b81870152835260409390930192918401916131ab565b809650505050505061321460c08901612b8f565b905092959891949750929550565b8015158114611f9f575f80fd5b5f8060408385031215613240575f80fd5b61324983612b8f565b9150602083013561325981613222565b809150509250929050565b5f805f805f805f805f6101208a8c03121561327d575f80fd5b6132868a613054565b985061329460208b01613054565b97506132a260408b01612b8f565b96506132b060608b01612b8f565b955060808a0135945060a08a013593506132cc60c08b01613054565b925060e08a013591506101008a013590509295985092959850929598565b5f805f606084860312156132fc575f80fd5b61330584612b8f565b95602085013595506040909401359392505050565b5f6020828403121561332a575f80fd5b611b0782613054565b5f805f60608486031215613345575f80fd5b61334e84613054565b925061335c60208501613054565b915061336a60408501612b8f565b90509250925092565b5f8060408385031215613384575f80fd5b61338d83612b8f565b91506130ab60208401612b8f565b5f805f805f8060a087890312156133b0575f80fd5b6133b987612b8f565b95506133c760208801612b8f565b94506040870135935060608701359250608087013567ffffffffffffffff8111156133f0575f80fd5b6133fc89828a01612e5b565b979a9699509497509295939492505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b600181811c9082168061344f57607f821691505b602082108103613486577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b601f8211156122c957805f5260205f20601f840160051c810160208510156134b15750805b601f840160051c820191505b818110156134d0575f81556001016134bd565b5050505050565b815167ffffffffffffffff8111156134f1576134f1612c1a565b613505816134ff845461343b565b8461348c565b602080601f831160018114613538575f84156135215750858301515b5f19600386901b1c1916600185901b1785556135ad565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561358457888601518255948401946001909101908401613565565b50858210156135a157878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f8084546135c28161343b565b600182811680156135da576001811461360d57613639565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450613639565b885f526020805f205f5b858110156136305781548a820152908401908201613617565b50505082870194505b50505050835161364d818360208801612da1565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b63ffffffff8181168382160190808211156136c8576136c861367e565b5092915050565b5f60ff821660ff81036136e4576136e461367e565b60010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f6020828403121561372a575f80fd5b8151611b0781613222565b5f5f1982036137465761374661367e565b5060010190565b5f6020828403121561375d575f80fd5b5051919050565b5f60208284031215613774575f80fd5b8151611b0781612bd2565b5f8251613790818460208701612da1565b919091019291505056fea2646970667358221220c76a77b2abfeb83078a2c19169afea5ae848e57a8e60b12670813b5ffa7e65b764736f6c63430008180033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.