Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
Showing the last 4 transactions (View Advanced Filter)
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Mint30 | 18817188 | 723 days ago | IN | 1.23 ETH | 0.16825797 | ||||
| Mint30 | 18816304 | 724 days ago | IN | 1.23 ETH | 0.18100997 | ||||
| Mint50 | 18815609 | 724 days ago | IN | 1.95 ETH | 0.39495297 | ||||
| Mint50 | 18815478 | 724 days ago | IN | 1.95 ETH | 0.47851848 |
Showing the last 1 internal transaction (View Advanced Filter)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 18901023 | 712 days ago | 18.33402 ETH |
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
StickerMilady
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity >=0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
contract StickerMilady is ERC721Enumerable, Ownable {
string private __baseURI;
function _baseURI() internal view virtual override returns (string memory) {
return __baseURI;
}
function _setBaseURI(string memory baseURI_) internal virtual {
__baseURI = baseURI_;
}
function setBaseURI(string memory baseURI) public onlyOwner {
_setBaseURI(baseURI);
}
string private __contractURI;
function _contractURI() internal view virtual returns (string memory) {
return __contractURI;
}
function _setContractURI(string memory contractURI_) internal virtual {
__contractURI = contractURI_;
}
function setContractURI(string memory contractURI) public onlyOwner {
_setContractURI(contractURI);
}
bool private started = false;
uint256 private mask = 0x000000000000000000000000000000000000000000000000ffffffffffffffff;
uint8[] private shift = [
8 * 0,
8 * 8,
8 * 16,
8 * 24
];
// Hardcode into a literal in one tx if possible?
uint256[] private packed;
function CheckPacked( uint256 user, uint256 i, uint8 j ) public view returns ( bool ) {
return ( ( packed[i] >> shift[j] ) & mask ) == ( user & mask );
}
function ErasePacked( uint256 i, uint8 j ) private {
packed[i] = packed[i] & ( ~( mask << shift[j] ) );
}
function Withdraw() public onlyOwner {
payable( msg.sender ).transfer( address( this ).balance );
}
function StartMint() public onlyOwner {
require( !started, "You've already started the minting." );
started = true;
}
function AddWhitelist( uint256[] memory wl_add ) public onlyOwner {
for(uint256 i = 0; i < wl_add.length; i++){
packed.push(wl_add[i]);
}
}
uint256 private price_adj = 100;
function AdjustPrices(uint256 percent) public onlyOwner {
price_adj = percent;
}
mapping( address => uint256 ) public mintCounter;
uint256 constant price = 49 ether / 1000;
uint256 constant bulk_10_price = 46 ether / 1000;
uint256 constant bulk_30_price = 41 ether / 1000;
uint256 constant bulk_50_price = 39 ether / 1000;
uint256 constant supply = 8888;
uint256 constant reserve = 500;
uint256 constant max_whitelist_mints = 1;
uint256 ct_supply = supply - reserve;
uint256 ct_reserve = reserve;
mapping( address => uint256 ) public mintCounterAuxWhitelist;
function AddAuxWhitelist( address[] memory wl_add ) public onlyOwner {
for(uint256 i = 0; i < wl_add.length; i++){
mintCounterAuxWhitelist[ wl_add[i] ] = 1;
}
}
function CheckAuxWhitelist() public view returns (bool) {
return mintCounterAuxWhitelist[ msg.sender ] != 0;
}
function MintAuxWhitelist() public {
uint256 n = totalSupply();
require( started, "Minting has not started yet." );
require( mintCounterAuxWhitelist[ msg.sender ] == 1, "Not on whitelist.");
require( n < supply, "No more supply!" );
require( ct_supply != 0, "No more supply!" );
_safeMint( msg.sender, n + 1 );
ct_supply = ct_supply - 1;
mintCounterAuxWhitelist[ msg.sender ] = 0;
}
function MintWhitelist( uint256 i, uint8 j ) public payable {
uint256 n = totalSupply();
require( started, "Minting has not started yet." );
require( mintCounter[ msg.sender ] < max_whitelist_mints, "Maximum whitelist discount mints reached." );
require( n < supply, "No more supply!" );
require( ct_supply != 0, "No more supply!" );
require( CheckPacked( uint256( uint160( msg.sender ) ), i, j ), "Not found on whitelist." );
_safeMint( msg.sender, n + 1 );
ct_supply = ct_supply - 1;
mintCounter[ msg.sender ] = mintCounter[ msg.sender ] + 1;
}
function MintMain() public payable {
uint256 pay = (price * price_adj) / 100;
uint256 n = totalSupply();
require( started, "Minting has not started yet." );
require( n < supply, "No more supply!" );
require( ct_supply != 0, "No more supply!" );
require( msg.value == pay, "Incorrect amount of wei sent." );
_safeMint( msg.sender, n + 1 );
ct_supply = ct_supply - 1;
}
function MintBulk(uint256 num_mint, uint256 discount_price) private {
uint256 pay = (discount_price * num_mint * price_adj) / 100;
uint256 n = totalSupply();
require( started, "Minting has not started yet." );
require( (n + num_mint) < supply, "No more supply!" );
require( ct_supply >= num_mint, "No more supply!" );
require( msg.value == pay, "Incorrect amount of wei sent." );
for(uint256 i = 0; i < num_mint; i++){
_safeMint( msg.sender, n + i + 1);
}
ct_supply = ct_supply - num_mint;
}
function Mint10() public payable {
MintBulk(10, bulk_10_price);
}
function Mint30() public payable {
MintBulk(30, bulk_30_price);
}
function Mint50() public payable {
MintBulk(50, bulk_50_price);
}
function MintReserve() public onlyOwner {
uint256 n = totalSupply();
uint256 reserve_mint_inc = 10;
require( started, "Minting has not started yet." );
require( (n + reserve_mint_inc) < supply, "No more supply!" );
require( ct_reserve >= reserve_mint_inc, "No more supply!" );
//mint 10 at once
for(uint256 i = 0; i < reserve_mint_inc; i++){
_safeMint( msg.sender, n + i + 1);
}
ct_reserve = ct_reserve - reserve_mint_inc;
}
constructor() ERC721("Sticker Milady","STCKR") Ownable(msg.sender) { }
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* 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 Ownable is Context {
address private _owner;
/**
* @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.
*/
constructor(address initialOwner) {
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) {
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 {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// 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) (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.20;
import {ERC721} from "../ERC721.sol";
import {IERC721Enumerable} from "./IERC721Enumerable.sol";
import {IERC165} from "../../../utils/introspection/ERC165.sol";
/**
* @dev This implements an optional extension of {ERC721} defined in the ERC that adds enumerability
* of all the token ids in the contract as well as all token ids owned by each account.
*
* CAUTION: {ERC721} extensions that implement custom `balanceOf` logic, such as {ERC721Consecutive},
* interfere with enumerability and should not be used together with {ERC721Enumerable}.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
mapping(address owner => mapping(uint256 index => uint256)) private _ownedTokens;
mapping(uint256 tokenId => uint256) private _ownedTokensIndex;
uint256[] private _allTokens;
mapping(uint256 tokenId => uint256) private _allTokensIndex;
/**
* @dev An `owner`'s token query was out of bounds for `index`.
*
* NOTE: The owner being `address(0)` indicates a global out of bounds index.
*/
error ERC721OutOfBoundsIndex(address owner, uint256 index);
/**
* @dev Batch mint is not allowed.
*/
error ERC721EnumerableForbiddenBatchMint();
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual returns (uint256) {
if (index >= balanceOf(owner)) {
revert ERC721OutOfBoundsIndex(owner, index);
}
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual returns (uint256) {
if (index >= totalSupply()) {
revert ERC721OutOfBoundsIndex(address(0), index);
}
return _allTokens[index];
}
/**
* @dev See {ERC721-_update}.
*/
function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) {
address previousOwner = super._update(to, tokenId, auth);
if (previousOwner == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (previousOwner != to) {
_removeTokenFromOwnerEnumeration(previousOwner, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (previousOwner != to) {
_addTokenToOwnerEnumeration(to, tokenId);
}
return previousOwner;
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = balanceOf(to) - 1;
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = balanceOf(from);
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
/**
* See {ERC721-_increaseBalance}. We need that to account tokens that were minted in batch
*/
function _increaseBalance(address account, uint128 amount) internal virtual override {
if (amount > 0) {
revert ERC721EnumerableForbiddenBatchMint();
}
super._increaseBalance(account, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.20;
import {IERC721} from "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// 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 success flag (no overflow).
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow).
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow).
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
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 success flag (no division by zero).
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
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;
}
// The following calculation ensures accurate ceiling division without overflow.
// Since a is non-zero, (a - 1) / b will not overflow.
// The largest possible result occurs when (a - 1) / b is type(uint256).max,
// but the largest value we can obtain is type(uint256).max - 1, which happens
// when a = type(uint256).max and b = 1.
unchecked {
return a == 0 ? 0 : (a - 1) / b + 1;
}
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.20;
import {IERC721} from "./IERC721.sol";
import {IERC721Receiver} from "./IERC721Receiver.sol";
import {IERC721Metadata} from "./extensions/IERC721Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {Strings} from "../../utils/Strings.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
mapping(uint256 tokenId => address) private _owners;
mapping(address owner => uint256) private _balances;
mapping(uint256 tokenId => address) private _tokenApprovals;
mapping(address owner => mapping(address operator => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual returns (uint256) {
if (owner == address(0)) {
revert ERC721InvalidOwner(address(0));
}
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual returns (address) {
return _requireOwned(tokenId);
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
_requireOwned(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual {
_approve(to, tokenId, _msgSender());
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual returns (address) {
_requireOwned(tokenId);
return _getApproved(tokenId);
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
// Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
// (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
address previousOwner = _update(to, tokenId, _msgSender());
if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
transferFrom(from, to, tokenId);
_checkOnERC721Received(from, to, tokenId, data);
}
/**
* @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
*
* IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
* core ERC-721 logic MUST be matched with the use of {_increaseBalance} to keep balances
* consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
* `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
*/
function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
return _owners[tokenId];
}
/**
* @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
*/
function _getApproved(uint256 tokenId) internal view virtual returns (address) {
return _tokenApprovals[tokenId];
}
/**
* @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
* particular (ignoring whether it is owned by `owner`).
*
* WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
* assumption.
*/
function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {
return
spender != address(0) &&
(owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);
}
/**
* @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
* Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
* the `spender` for the specific `tokenId`.
*
* WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
* assumption.
*/
function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {
if (!_isAuthorized(owner, spender, tokenId)) {
if (owner == address(0)) {
revert ERC721NonexistentToken(tokenId);
} else {
revert ERC721InsufficientApproval(spender, tokenId);
}
}
}
/**
* @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
*
* NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
* a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
*
* WARNING: Increasing an account's balance using this function tends to be paired with an override of the
* {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
* remain consistent with one another.
*/
function _increaseBalance(address account, uint128 value) internal virtual {
unchecked {
_balances[account] += value;
}
}
/**
* @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
* (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
*
* The `auth` argument is optional. If the value passed is non 0, then this function will check that
* `auth` is either the owner of the token, or approved to operate on the token (by the owner).
*
* Emits a {Transfer} event.
*
* NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
*/
function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {
address from = _ownerOf(tokenId);
// Perform (optional) operator check
if (auth != address(0)) {
_checkAuthorized(from, auth, tokenId);
}
// Execute the update
if (from != address(0)) {
// Clear approval. No need to re-authorize or emit the Approval event
_approve(address(0), tokenId, address(0), false);
unchecked {
_balances[from] -= 1;
}
}
if (to != address(0)) {
unchecked {
_balances[to] += 1;
}
}
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
return from;
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
address previousOwner = _update(to, tokenId, address(0));
if (previousOwner != address(0)) {
revert ERC721InvalidSender(address(0));
}
}
/**
* @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
_mint(to, tokenId);
_checkOnERC721Received(address(0), to, tokenId, data);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
* This is an internal function that does not check if the sender is authorized to operate on the token.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal {
address previousOwner = _update(address(0), tokenId, address(0));
if (previousOwner == address(0)) {
revert ERC721NonexistentToken(tokenId);
}
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
address previousOwner = _update(to, tokenId, address(0));
if (previousOwner == address(0)) {
revert ERC721NonexistentToken(tokenId);
} else if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients
* are aware of the ERC-721 standard to prevent tokens from being forever locked.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is like {safeTransferFrom} in the sense that it invokes
* {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `tokenId` token must exist and be owned by `from`.
* - `to` cannot be the zero address.
* - `from` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(address from, address to, uint256 tokenId) internal {
_safeTransfer(from, to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
_transfer(from, to, tokenId);
_checkOnERC721Received(from, to, tokenId, data);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
* either the owner of the token, or approved to operate on all tokens held by this owner.
*
* Emits an {Approval} event.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address to, uint256 tokenId, address auth) internal {
_approve(to, tokenId, auth, true);
}
/**
* @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
* emitted in the context of transfers.
*/
function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
// Avoid reading the owner unless necessary
if (emitEvent || auth != address(0)) {
address owner = _requireOwned(tokenId);
// We do not use _isAuthorized because single-token approvals should not be able to call approve
if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
revert ERC721InvalidApprover(auth);
}
if (emitEvent) {
emit Approval(owner, to, tokenId);
}
}
_tokenApprovals[tokenId] = to;
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Requirements:
* - operator can't be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
if (operator == address(0)) {
revert ERC721InvalidOperator(operator);
}
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
* Returns the owner.
*
* Overrides to ownership logic should be done to {_ownerOf}.
*/
function _requireOwned(uint256 tokenId) internal view returns (address) {
address owner = _ownerOf(tokenId);
if (owner == address(0)) {
revert ERC721NonexistentToken(tokenId);
}
return owner;
}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the
* recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param data bytes optional data to send along with the call
*/
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {
if (to.code.length > 0) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
if (retval != IERC721Receiver.onERC721Received.selector) {
revert ERC721InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
revert ERC721InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC-721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC-721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
* {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.20;
/**
* @title ERC-721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC-721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be
* reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.20;
import {IERC721} from "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": true,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ERC721EnumerableForbiddenBatchMint","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"ERC721OutOfBoundsIndex","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address[]","name":"wl_add","type":"address[]"}],"name":"AddAuxWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"wl_add","type":"uint256[]"}],"name":"AddWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"AdjustPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"CheckAuxWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"user","type":"uint256"},{"internalType":"uint256","name":"i","type":"uint256"},{"internalType":"uint8","name":"j","type":"uint8"}],"name":"CheckPacked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Mint10","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"Mint30","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"Mint50","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"MintAuxWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"MintMain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"MintReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"},{"internalType":"uint8","name":"j","type":"uint8"}],"name":"MintWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"StartMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintCounterAuxWhitelist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","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":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI","type":"string"}],"name":"setContractURI","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
604060808152346200040e576200001562000413565b600e815260206d537469636b6572204d696c61647960901b818301526200003b62000413565b60058082526429aa21a5a960d91b8383015283519193916001600160401b0390818111620003f8576000958654916001958684811c94168015620003ed575b8885101462000311578190601f94858111620003b4575b50889085831160011462000350578a9262000344575b5050600019600383901b1c191690861b1787555b805190838211620003305785548681811c9116801562000325575b888210146200031157908184849311620002d8575b5087908483116001146200027457899262000268575b5050600019600383901b1c191690851b1784555b33156200025057600a8054336001600160a01b0319821681179092556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08880a360ff19600d5416600d5581600e558651916080830190838210908211176200023c578752858252868583015260808783015260c06060830152600f54846004946004600f55826004106200020e575b505050509190600f855283852093855b828110620001e8578787875560646011556120c46013556101f4601455516123fa90816200044d8239f35b845160ff600383901b81811b19909916911690971b9690961795938101938301620001bd565b6200023293600f8a52888a2093845463ffffffff16855501901c8201910162000433565b38808481620001ad565b634e487b7160e01b87526041600452602487fd5b8651631e4fbdf760e01b815260048101879052602490fd5b01519050388062000101565b878a52888a208894509190601f1984168b5b8b828210620002c15750508411620002a7575b505050811b01845562000115565b015160001960f88460031b161c1916905538808062000299565b8385015186558b9790950194938401930162000286565b6200030090888b52898b20868086018a1c8201928c871062000307575b01891c019062000433565b38620000eb565b92508192620002f5565b634e487b7160e01b89526022600452602489fd5b90607f1690620000d6565b634e487b7160e01b88526041600452602488fd5b015190503880620000a7565b8a8052898b208994509190601f1984168c5b8c8282106200039d575050841162000383575b505050811b018755620000bb565b015160001960f88460031b161c1916905538808062000375565b8385015186558c9790950194938401930162000362565b620003dc908b80528a8c20878086018b1c8201928d8710620003e3575b018a1c019062000433565b3862000091565b92508192620003d1565b93607f16936200007a565b634e487b7160e01b600052604160045260246000fd5b600080fd5b60408051919082016001600160401b03811183821017620003f857604052565b8181106200043f575050565b600081556001016200043356fe60806040908082526004908136101561001757600080fd5b600092833560e01c91826301ffc9a7146117c05750816306fdde0314611710578163081812fc146116d3578163095ea7b3146115f757816309c243011461154557816318160ddd146115265781631cdce9fe146114ee57816323b872dd146114d65781632cf3eeeb1461140a5781632f745c591461138557816330be911114611211578163326baed8146111d957816342842e0e146111aa5781634f6ccce71461115457816355f804b314610ff357816357ea89b614610fad5781636352211e14610f7b57816370a0823114610f4e578163715018a614610ef15781638da5cb5b14610ec85781639378ff6f14610ea6578163938e3d7b14610d3257816395d89b4114610c575781639f402f3b14610bd2578163a22cb46514610b31578163ae890bbf14610b09578163afde90c214610acc578163b88d4fde14610a5e578163b984c60b14610941578163c87b56dd14610685578163c9db64e0146105bf578163e4a0e308146104ec578163e985e9c51461049e578163ef44aa55146103ec578163f2fde38b1461035757508063fd3bb04e146102c45763ff9e8920146101bd57600080fd5b816003193601126102c0576011805490671b0fcaab2003000091808302928304036102ad576008546101f360ff600d5416611ce5565b6032926032820180831161029a5761022b916102146122b860649310611d31565b61022360326013541015611d31565b043414611eb4565b845b83811061026057858560135490603119820191821161024d575060135580f35b634e487b7160e01b835260119052602482fd5b61026a8183611d6f565b60018101809111610288579061028260019233611f67565b0161022d565b634e487b7160e01b8752838652602487fd5b634e487b7160e01b875260118652602487fd5b634e487b7160e01b845260118352602484fd5b5080fd5b50816003193601126102c05760115466ae153d89fe80009080820291820403610344576103186064600854926102fe60ff600d5416611ce5565b61030b6122b88510611d31565b6102236013541515611d31565b600181018091116103445761032d9033611f67565b60135460001981019190821161024d575060135580f35b634e487b7160e01b835260118252602483fd5b919050346103e85760203660031901126103e85761037361188e565b9061037c611f3b565b6001600160a01b039182169283156103d2575050600a54826bffffffffffffffffffffffff60a01b821617600a55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b5050816003193601126102c0576011805490671111d67bb1bb000091808302928304036102ad5760085461042460ff600d5416611ce5565b601e92601e820180831161029a57610454916104456122b860649310611d31565b610223601e6013541015611d31565b845b83811061047657858560135490601d19820191821161024d575060135580f35b6104808183611d6f565b60018101809111610288579061049860019233611f67565b01610456565b8390346102c057806003193601126102c05760ff816020936104be61188e565b6104c66118a9565b6001600160a01b0391821683526005875283832091168252855220549151911615158152f35b839150346102c057816003193601126102c05760085461051060ff600d5416611ce5565b338352601560205260018284205403610588576105306122b88210611d31565b61053d6013541515611d31565b60018101809111610575576105529033611f67565b601354600019810190811161057557829350601355338252601560205281205580f35b634e487b7160e01b835260118452602483fd5b815162461bcd60e51b815260208186015260116024820152702737ba1037b7103bb434ba32b634b9ba1760791b6044820152606490fd5b5050346102c057816003193601126102c0576105d9611f3b565b6008546105ea60ff600d5416611ce5565b600a90600a8101808211610672576122b86106059110611d31565b610614600a6014541015611d31565b835b8281106106375750506014546009198101929150821161024d575060145580f35b6106418183611d6f565b6001810180911161065f579061065960019233611f67565b01610616565b634e487b7160e01b865260118552602486fd5b634e487b7160e01b855260118452602485fd5b8383346102c0576020918260031936011261093e5782908483356106a881611f00565b508151948391600b54876106bb826119f2565b94858252888201956001938a6001821691826000146109215750506001146108c8575b50906106eb910389611926565b8751156108a95781809387917a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000908181101561089c575b5050886d04ee2d6d415b85acef81000000008087101561088d575b5050662386f26fc100008086101561087e575b506305f5e1008086101561086f575b5061271080861015610863575b50506064841015610855575b602190600a8095101561084d575b90816107aa600185969594016107a261079982611960565b9a519a8b611926565b808a52611960565b888b019990601f1901368b3750870101905b610817575b5050505093610802926107e794926107f6610813978a5197889551809288880190611846565b84019151809386840190611846565b01038084520182611926565b925b51928284938452830190611869565b0390f35b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215610848579190826107bc565b6107c1565b600101610781565b606490930492600201610773565b90940493018b80610767565b6008919295049401908c61075a565b6010919295049401908c61074b565b9091929504940190888d610738565b0494508691508c8061071d565b50505050909150610813925051906108c0826118f4565b815292610804565b600b89528891507f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db95b818310610906575050810188016106eb6106de565b8054838d018c01528c9a8e99508c94509092019184016108f1565b60ff1916895291151560051b840190910191506106eb90506106de565b80fd5b9050823461093e5760209260206003193601126102c05780359367ffffffffffffffff85116103e857366023860112156103e8576024948281013561099161098882611948565b96519687611926565b8086526024602087019160051b83010191368311610a5a57602401905b828210610a4b57505050506109c1611f3b565b815b8351811015610a47576109d68185611cbb565b516010805490600160401b821015610a355760018201808255821015610a235785527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae67201556001016109c3565b634e487b7160e01b8652603285528786fd5b634e487b7160e01b8652604185528786fd5b8280f35b813581529083019083016109ae565b8580fd5b5050346102c05760803660031901126102c057610a7961188e565b610a816118a9565b6044359060643567ffffffffffffffff8111610a5a5736602382011215610a5a57610ac994816024610ab89336930135910161197c565b92610ac4838383611a2c565b612280565b80f35b919050346103e85760603660031901126103e8576044359260ff8416840361093e5750602092610b00916024359035611e02565b90519015158152f35b8390346102c057816003193601126102c0578060209233815260158452205415159051908152f35b9050346103e857806003193601126103e857610b4b61188e565b9060243591821515809303610bce576001600160a01b0316928315610bb95750338452600560205280842083855260205280842060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b836024925191630b61174360e31b8352820152fd5b8480fd5b919050346103e857826003193601126103e857610bed611f3b565b600d549160ff8316610c085760ff198316600117600d558380f35b906020608492519162461bcd60e51b8352820152602360248201527f596f7527766520616c7265616479207374617274656420746865206d696e746960448201526237339760e91b6064820152fd5b833461093e578060031936011261093e57815191828260019360015494610c7d866119f2565b9182855260209687600182169182600014610d0b575050600114610caf575b5050506108139291610804910385611926565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610cf35750505082010181610804610813610c9c565b8054848a018601528895508794909301928101610cda565b60ff19168782015293151560051b8601909301935084925061080491506108139050610c9c565b82843461093e57610d42366119b3565b91610d4b611f3b565b82519067ffffffffffffffff8211610e935750610d69600c546119f2565b601f8111610e30575b50602080601f8311600114610daf57508293829392610da4575b50508160011b916000199060031b1c191617600c5580f35b015190508380610d8c565b600c8452601f198316947fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7929185905b878210610e18575050836001959610610dff575b505050811b01600c5580f35b015160001960f88460031b161c19169055838080610df3565b80600185968294968601518155019501930190610ddf565b600c83527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7601f830160051c81019160208410610e89575b601f0160051c01905b818110610e7e5750610d72565b838155600101610e71565b9091508190610e68565b634e487b7160e01b835260419052602482fd5b5050346102c05760203660031901126102c057610ec1611f3b565b3560115580f35b8390346102c057816003193601126102c057600a5490516001600160a01b039091168152602090f35b833461093e578060031936011261093e57610f0a611f3b565b600a80546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b8390346102c05760203660031901126102c057602090610f74610f6f61188e565b611dc9565b9051908152f35b9050823461093e57602036600319011261093e5750610f9c60209235611f00565b90516001600160a01b039091168152f35b8390346102c057816003193601126102c057610fc7611f3b565b8180808047818115610fea575b3390f115610fe0575080f35b51903d90823e3d90fd5b506108fc610fd4565b82843461093e57611003366119b3565b9161100c611f3b565b82519067ffffffffffffffff8211610e93575061102a600b546119f2565b601f81116110f1575b50602080601f831160011461107057508293829392611065575b50508160011b916000199060031b1c191617600b5580f35b01519050838061104d565b600b8452601f198316947f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9929185905b8782106110d95750508360019596106110c0575b505050811b01600b5580f35b015160001960f88460031b161c191690558380806110b4565b806001859682949686015181550195019301906110a0565b600b83527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9601f830160051c8101916020841061114a575b601f0160051c01905b81811061113f5750611033565b838155600101611132565b9091508190611129565b919050346103e85760203660031901126103e85780359260085484101561118f5760208361118186611d92565b91905490519160031b1c8152f35b6044939192519263295f44f760e21b84528301526024820152fd5b8390346102c057610ac9906111be366118bf565b919251926111cb846118f4565b858452610ac4838383611a2c565b8390346102c05760203660031901126102c05760209181906001600160a01b0361120161188e565b1681526015845220549051908152f35b8091506003193601126103e8576024803560ff81168103610bce576008549061123e60ff600d5416611ce5565b3386526012602052600184872054101561133157611278906112636122b88410611d31565b6112706013541515611d31565b853533611e02565b156112ef57600181018091116112dd576112929033611f67565b60135460001981019081116112dd5760135533845260126020528184205492600184018094116112cc575050338352601260205282205580f35b634e487b7160e01b85526011905283fd5b50634e487b7160e01b84526011835283fd5b825162461bcd60e51b81526020818601526017818401527f4e6f7420666f756e64206f6e2077686974656c6973742e0000000000000000006044820152606490fd5b835162461bcd60e51b81526020818701526029818501527f4d6178696d756d2077686974656c69737420646973636f756e74206d696e7473604482015268103932b0b1b432b21760b91b6064820152608490fd5b9050823461093e578160031936011261093e576113a061188e565b92602435906113ae85611dc9565b8210156113de57506001600160a01b03909316815260066020908152828220938252928352819020549051908152f35b925163295f44f760e21b81526001600160a01b0390941692840192835260208301525081906040010390fd5b82843461093e576020806003193601126102c05782359267ffffffffffffffff84116103e857366023850112156103e8578301359261144884611948565b9361145586519586611926565b8085526024602086019160051b83010191368311610bce57602401905b8282106114b757505050611484611f3b565b815b8351811015610a47576001906001600160a01b036114a48287611cbb565b5116845260158352818685205501611486565b81356001600160a01b0381168103610a5a578152908301908301611472565b833461093e57610ac96114e8366118bf565b91611a2c565b8390346102c05760203660031901126102c05760209181906001600160a01b0361151661188e565b1681526012845220549051908152f35b8390346102c057816003193601126102c0576020906008549051908152f35b5050816003193601126102c05760118054906706623f9014ae000091808302928304036102ad5760085461157d60ff600d5416611ce5565b600a92600a820180831161029a576115ad9161159e6122b860649310611d31565b610223600a6013541015611d31565b845b8381106115cf57858560135490600919820191821161024d575060135580f35b6115d98183611d6f565b6001810180911161028857906115f160019233611f67565b016115af565b9050346103e857806003193601126103e85761161161188e565b9160243561161e81611f00565b331515806116c0575b80611697575b611681576001600160a01b039485169482918691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a48452602052822080546001600160a01b031916909117905580f35b835163a9fbf51f60e01b81523381850152602490fd5b506001600160a01b03811686526005602090815284872033885290528386205460ff161561162d565b506001600160a01b038116331415611627565b919050346103e85760203660031901126103e8579182602093356116f681611f00565b50825283528190205490516001600160a01b039091168152f35b833461093e578060031936011261093e5781519182828354611731816119f2565b9081845260209560019187600182169182600014610d0b575050600114611765575050506108139291610804910385611926565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106117a85750505082010181610804610813610c9c565b8054848a01860152889550879490930192810161178f565b849084346103e85760203660031901126103e8573563ffffffff60e01b81168091036103e8576020925063780e9d6360e01b8114908115611803575b5015158152f35b6380ac58cd60e01b811491508115611835575b8115611824575b50836117fc565b6301ffc9a760e01b1490508361181d565b635b5e139f60e01b81149150611816565b60005b8381106118595750506000910152565b8181015183820152602001611849565b9060209161188281518092818552858086019101611846565b601f01601f1916010190565b600435906001600160a01b03821682036118a457565b600080fd5b602435906001600160a01b03821682036118a457565b60609060031901126118a4576001600160a01b039060043582811681036118a4579160243590811681036118a4579060443590565b6020810190811067ffffffffffffffff82111761191057604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761191057604052565b67ffffffffffffffff81116119105760051b60200190565b67ffffffffffffffff811161191057601f01601f191660200190565b92919261198882611960565b916119966040519384611926565b8294818452818301116118a4578281602093846000960137010152565b60206003198201126118a4576004359067ffffffffffffffff82116118a457806023830112156118a4578160246119ef9360040135910161197c565b90565b90600182811c92168015611a22575b6020831014611a0c57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611a01565b6001600160a01b0382811693918415611ca257600094838652602095600287526040968488832054169633151580611c14575b5087158015611be1575b84845260038352898420805460010190558784526002835289842080546001600160a01b0319168617905587858a7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a415611b65576008548784526009835289842055611ad787611e7d565b838803611b13575b505050501692838303611af25750505050565b6064945051926364283d7b60e01b8452600484015260248301526044820152fd5b611b1c90611dc9565b600019810193908411611b515782916007918a9452600681528383208584528152878484205587835252205538808080611adf565b634e487b7160e01b83526011600452602483fd5b878414611ad757611b7588611dc9565b8784526007835289842054818103611baa575b50878452838a8120558884526006835289842090845282528289812055611ad7565b898552600684528a852082865284528a8520548a8652600685528b86208287528552808c8720558552600784528a85205538611b88565b600088815260046020526040902080546001600160a01b0319169055888452600383528984208054600019019055611a69565b80611c61575b15611c255738611a5f565b888789611c42576024915190637e27328960e01b82526004820152fd5b905163177e802f60e01b81523360048201526024810191909152604490fd5b503388148015611c86575b80611c1a57508683526004825233868a8520541614611c1a565b5087835260058252888320338452825260ff8984205416611c6c565b604051633250574960e11b815260006004820152602490fd5b8051821015611ccf5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b15611cec57565b60405162461bcd60e51b815260206004820152601c60248201527f4d696e74696e6720686173206e6f742073746172746564207965742e000000006044820152606490fd5b15611d3857565b60405162461bcd60e51b815260206004820152600f60248201526e4e6f206d6f726520737570706c792160881b6044820152606490fd5b91908201809211611d7c57565b634e487b7160e01b600052601160045260246000fd5b600854811015611ccf5760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b6001600160a01b03168015611de957600052600360205260406000205490565b6040516322718ad960e21b815260006004820152602490fd5b90601054811015611ccf577f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720154600f54831015611ccf57600f60005260ff8360051c7f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802015460f8600e548095169560031b161c161c161490565b600854600160401b81101561191057806001611e9c9201600855611d92565b819291549060031b91821b91600019901b1916179055565b15611ebb57565b60405162461bcd60e51b815260206004820152601d60248201527f496e636f727265637420616d6f756e74206f66207765692073656e742e0000006044820152606490fd5b6000818152600260205260409020546001600160a01b0316908115611f23575090565b60249060405190637e27328960e01b82526004820152fd5b600a546001600160a01b03163303611f4f57565b60405163118cdaa760e01b8152336004820152602490fd5b6040805192611f75846118f4565b60008085526001600160a01b0394848616949192918515612268578284526020966002885285852054168681159182159283612235575b82885260038b528888208054600101905586885260028b5288882080546001600160a01b031916841790558683837fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8b80a4156121b95760085486885260098b528888205561201a86611e7d565b0361216c575b612154573b612032575b505050505050565b85612070918596979894955180938192630a85bd0160e11b968784523360048501528960248501526044840152608060648401526084830190611869565b0381878a5af1849181612114575b506120dd575050503d6000146120d5573d61209881611960565b906120a584519283611926565b81528091853d92013e5b805193846120cf578251633250574960e11b815260048101859052602490fd5b84925001fd5b5060606120af565b919550915063ffffffff60e01b16036120fd57505038808080808061202a565b602492505190633250574960e11b82526004820152fd5b9091508781813d831161214d575b61212c8183611926565b81010312610bce57516001600160e01b031981168103610bce57903861207e565b503d612122565b84516339e3563760e11b815260048101859052602490fd5b61217582611dc9565b60001981019081116121a55787865260068952868620818752895284878720558486526007895286862055612020565b634e487b7160e01b86526011600452602486fd5b80821461201a576121c981611dc9565b86885260078b52888820548181036121fe575b50868852878981205581885260068b528888209088528a52868881205561201a565b82895260068c52898920828a528c5289892054838a5260068d528a8a20828b528d52808b8b2055895260078c5289892055386121dc565b600087815260046020526040902080546001600160a01b031916905581885260038b528888208054600019019055611fac565b8451633250574960e11b815260048101859052602490fd5b813b61228d575b50505050565b604051630a85bd0160e11b8082523360048301526001600160a01b039283166024830152604482019490945260806064820152602095929091169390929083906122db906084830190611869565b039285816000958187895af1849181612384575b5061234f575050503d600014612347573d61230981611960565b906123176040519283611926565b81528091843d92013e5b8051928361234257604051633250574960e11b815260048101849052602490fd5b019050fd5b506060612321565b919450915063ffffffff60e01b160361236c575038808080612287565b60249060405190633250574960e11b82526004820152fd5b9091508681813d83116123bd575b61239c8183611926565b81010312610bce57516001600160e01b031981168103610bce5790386122ef565b503d61239256fea2646970667358221220bdedcd60c1545685dada7851b9f7b9fc28f13d978f39d0eb18a8c7e8e2c067fd64736f6c63430008170033
Deployed Bytecode
0x60806040908082526004908136101561001757600080fd5b600092833560e01c91826301ffc9a7146117c05750816306fdde0314611710578163081812fc146116d3578163095ea7b3146115f757816309c243011461154557816318160ddd146115265781631cdce9fe146114ee57816323b872dd146114d65781632cf3eeeb1461140a5781632f745c591461138557816330be911114611211578163326baed8146111d957816342842e0e146111aa5781634f6ccce71461115457816355f804b314610ff357816357ea89b614610fad5781636352211e14610f7b57816370a0823114610f4e578163715018a614610ef15781638da5cb5b14610ec85781639378ff6f14610ea6578163938e3d7b14610d3257816395d89b4114610c575781639f402f3b14610bd2578163a22cb46514610b31578163ae890bbf14610b09578163afde90c214610acc578163b88d4fde14610a5e578163b984c60b14610941578163c87b56dd14610685578163c9db64e0146105bf578163e4a0e308146104ec578163e985e9c51461049e578163ef44aa55146103ec578163f2fde38b1461035757508063fd3bb04e146102c45763ff9e8920146101bd57600080fd5b816003193601126102c0576011805490671b0fcaab2003000091808302928304036102ad576008546101f360ff600d5416611ce5565b6032926032820180831161029a5761022b916102146122b860649310611d31565b61022360326013541015611d31565b043414611eb4565b845b83811061026057858560135490603119820191821161024d575060135580f35b634e487b7160e01b835260119052602482fd5b61026a8183611d6f565b60018101809111610288579061028260019233611f67565b0161022d565b634e487b7160e01b8752838652602487fd5b634e487b7160e01b875260118652602487fd5b634e487b7160e01b845260118352602484fd5b5080fd5b50816003193601126102c05760115466ae153d89fe80009080820291820403610344576103186064600854926102fe60ff600d5416611ce5565b61030b6122b88510611d31565b6102236013541515611d31565b600181018091116103445761032d9033611f67565b60135460001981019190821161024d575060135580f35b634e487b7160e01b835260118252602483fd5b919050346103e85760203660031901126103e85761037361188e565b9061037c611f3b565b6001600160a01b039182169283156103d2575050600a54826bffffffffffffffffffffffff60a01b821617600a55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b5050816003193601126102c0576011805490671111d67bb1bb000091808302928304036102ad5760085461042460ff600d5416611ce5565b601e92601e820180831161029a57610454916104456122b860649310611d31565b610223601e6013541015611d31565b845b83811061047657858560135490601d19820191821161024d575060135580f35b6104808183611d6f565b60018101809111610288579061049860019233611f67565b01610456565b8390346102c057806003193601126102c05760ff816020936104be61188e565b6104c66118a9565b6001600160a01b0391821683526005875283832091168252855220549151911615158152f35b839150346102c057816003193601126102c05760085461051060ff600d5416611ce5565b338352601560205260018284205403610588576105306122b88210611d31565b61053d6013541515611d31565b60018101809111610575576105529033611f67565b601354600019810190811161057557829350601355338252601560205281205580f35b634e487b7160e01b835260118452602483fd5b815162461bcd60e51b815260208186015260116024820152702737ba1037b7103bb434ba32b634b9ba1760791b6044820152606490fd5b5050346102c057816003193601126102c0576105d9611f3b565b6008546105ea60ff600d5416611ce5565b600a90600a8101808211610672576122b86106059110611d31565b610614600a6014541015611d31565b835b8281106106375750506014546009198101929150821161024d575060145580f35b6106418183611d6f565b6001810180911161065f579061065960019233611f67565b01610616565b634e487b7160e01b865260118552602486fd5b634e487b7160e01b855260118452602485fd5b8383346102c0576020918260031936011261093e5782908483356106a881611f00565b508151948391600b54876106bb826119f2565b94858252888201956001938a6001821691826000146109215750506001146108c8575b50906106eb910389611926565b8751156108a95781809387917a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000908181101561089c575b5050886d04ee2d6d415b85acef81000000008087101561088d575b5050662386f26fc100008086101561087e575b506305f5e1008086101561086f575b5061271080861015610863575b50506064841015610855575b602190600a8095101561084d575b90816107aa600185969594016107a261079982611960565b9a519a8b611926565b808a52611960565b888b019990601f1901368b3750870101905b610817575b5050505093610802926107e794926107f6610813978a5197889551809288880190611846565b84019151809386840190611846565b01038084520182611926565b925b51928284938452830190611869565b0390f35b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215610848579190826107bc565b6107c1565b600101610781565b606490930492600201610773565b90940493018b80610767565b6008919295049401908c61075a565b6010919295049401908c61074b565b9091929504940190888d610738565b0494508691508c8061071d565b50505050909150610813925051906108c0826118f4565b815292610804565b600b89528891507f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db95b818310610906575050810188016106eb6106de565b8054838d018c01528c9a8e99508c94509092019184016108f1565b60ff1916895291151560051b840190910191506106eb90506106de565b80fd5b9050823461093e5760209260206003193601126102c05780359367ffffffffffffffff85116103e857366023860112156103e8576024948281013561099161098882611948565b96519687611926565b8086526024602087019160051b83010191368311610a5a57602401905b828210610a4b57505050506109c1611f3b565b815b8351811015610a47576109d68185611cbb565b516010805490600160401b821015610a355760018201808255821015610a235785527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae67201556001016109c3565b634e487b7160e01b8652603285528786fd5b634e487b7160e01b8652604185528786fd5b8280f35b813581529083019083016109ae565b8580fd5b5050346102c05760803660031901126102c057610a7961188e565b610a816118a9565b6044359060643567ffffffffffffffff8111610a5a5736602382011215610a5a57610ac994816024610ab89336930135910161197c565b92610ac4838383611a2c565b612280565b80f35b919050346103e85760603660031901126103e8576044359260ff8416840361093e5750602092610b00916024359035611e02565b90519015158152f35b8390346102c057816003193601126102c0578060209233815260158452205415159051908152f35b9050346103e857806003193601126103e857610b4b61188e565b9060243591821515809303610bce576001600160a01b0316928315610bb95750338452600560205280842083855260205280842060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b836024925191630b61174360e31b8352820152fd5b8480fd5b919050346103e857826003193601126103e857610bed611f3b565b600d549160ff8316610c085760ff198316600117600d558380f35b906020608492519162461bcd60e51b8352820152602360248201527f596f7527766520616c7265616479207374617274656420746865206d696e746960448201526237339760e91b6064820152fd5b833461093e578060031936011261093e57815191828260019360015494610c7d866119f2565b9182855260209687600182169182600014610d0b575050600114610caf575b5050506108139291610804910385611926565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610cf35750505082010181610804610813610c9c565b8054848a018601528895508794909301928101610cda565b60ff19168782015293151560051b8601909301935084925061080491506108139050610c9c565b82843461093e57610d42366119b3565b91610d4b611f3b565b82519067ffffffffffffffff8211610e935750610d69600c546119f2565b601f8111610e30575b50602080601f8311600114610daf57508293829392610da4575b50508160011b916000199060031b1c191617600c5580f35b015190508380610d8c565b600c8452601f198316947fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7929185905b878210610e18575050836001959610610dff575b505050811b01600c5580f35b015160001960f88460031b161c19169055838080610df3565b80600185968294968601518155019501930190610ddf565b600c83527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7601f830160051c81019160208410610e89575b601f0160051c01905b818110610e7e5750610d72565b838155600101610e71565b9091508190610e68565b634e487b7160e01b835260419052602482fd5b5050346102c05760203660031901126102c057610ec1611f3b565b3560115580f35b8390346102c057816003193601126102c057600a5490516001600160a01b039091168152602090f35b833461093e578060031936011261093e57610f0a611f3b565b600a80546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b8390346102c05760203660031901126102c057602090610f74610f6f61188e565b611dc9565b9051908152f35b9050823461093e57602036600319011261093e5750610f9c60209235611f00565b90516001600160a01b039091168152f35b8390346102c057816003193601126102c057610fc7611f3b565b8180808047818115610fea575b3390f115610fe0575080f35b51903d90823e3d90fd5b506108fc610fd4565b82843461093e57611003366119b3565b9161100c611f3b565b82519067ffffffffffffffff8211610e93575061102a600b546119f2565b601f81116110f1575b50602080601f831160011461107057508293829392611065575b50508160011b916000199060031b1c191617600b5580f35b01519050838061104d565b600b8452601f198316947f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9929185905b8782106110d95750508360019596106110c0575b505050811b01600b5580f35b015160001960f88460031b161c191690558380806110b4565b806001859682949686015181550195019301906110a0565b600b83527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9601f830160051c8101916020841061114a575b601f0160051c01905b81811061113f5750611033565b838155600101611132565b9091508190611129565b919050346103e85760203660031901126103e85780359260085484101561118f5760208361118186611d92565b91905490519160031b1c8152f35b6044939192519263295f44f760e21b84528301526024820152fd5b8390346102c057610ac9906111be366118bf565b919251926111cb846118f4565b858452610ac4838383611a2c565b8390346102c05760203660031901126102c05760209181906001600160a01b0361120161188e565b1681526015845220549051908152f35b8091506003193601126103e8576024803560ff81168103610bce576008549061123e60ff600d5416611ce5565b3386526012602052600184872054101561133157611278906112636122b88410611d31565b6112706013541515611d31565b853533611e02565b156112ef57600181018091116112dd576112929033611f67565b60135460001981019081116112dd5760135533845260126020528184205492600184018094116112cc575050338352601260205282205580f35b634e487b7160e01b85526011905283fd5b50634e487b7160e01b84526011835283fd5b825162461bcd60e51b81526020818601526017818401527f4e6f7420666f756e64206f6e2077686974656c6973742e0000000000000000006044820152606490fd5b835162461bcd60e51b81526020818701526029818501527f4d6178696d756d2077686974656c69737420646973636f756e74206d696e7473604482015268103932b0b1b432b21760b91b6064820152608490fd5b9050823461093e578160031936011261093e576113a061188e565b92602435906113ae85611dc9565b8210156113de57506001600160a01b03909316815260066020908152828220938252928352819020549051908152f35b925163295f44f760e21b81526001600160a01b0390941692840192835260208301525081906040010390fd5b82843461093e576020806003193601126102c05782359267ffffffffffffffff84116103e857366023850112156103e8578301359261144884611948565b9361145586519586611926565b8085526024602086019160051b83010191368311610bce57602401905b8282106114b757505050611484611f3b565b815b8351811015610a47576001906001600160a01b036114a48287611cbb565b5116845260158352818685205501611486565b81356001600160a01b0381168103610a5a578152908301908301611472565b833461093e57610ac96114e8366118bf565b91611a2c565b8390346102c05760203660031901126102c05760209181906001600160a01b0361151661188e565b1681526012845220549051908152f35b8390346102c057816003193601126102c0576020906008549051908152f35b5050816003193601126102c05760118054906706623f9014ae000091808302928304036102ad5760085461157d60ff600d5416611ce5565b600a92600a820180831161029a576115ad9161159e6122b860649310611d31565b610223600a6013541015611d31565b845b8381106115cf57858560135490600919820191821161024d575060135580f35b6115d98183611d6f565b6001810180911161028857906115f160019233611f67565b016115af565b9050346103e857806003193601126103e85761161161188e565b9160243561161e81611f00565b331515806116c0575b80611697575b611681576001600160a01b039485169482918691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a48452602052822080546001600160a01b031916909117905580f35b835163a9fbf51f60e01b81523381850152602490fd5b506001600160a01b03811686526005602090815284872033885290528386205460ff161561162d565b506001600160a01b038116331415611627565b919050346103e85760203660031901126103e8579182602093356116f681611f00565b50825283528190205490516001600160a01b039091168152f35b833461093e578060031936011261093e5781519182828354611731816119f2565b9081845260209560019187600182169182600014610d0b575050600114611765575050506108139291610804910385611926565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106117a85750505082010181610804610813610c9c565b8054848a01860152889550879490930192810161178f565b849084346103e85760203660031901126103e8573563ffffffff60e01b81168091036103e8576020925063780e9d6360e01b8114908115611803575b5015158152f35b6380ac58cd60e01b811491508115611835575b8115611824575b50836117fc565b6301ffc9a760e01b1490508361181d565b635b5e139f60e01b81149150611816565b60005b8381106118595750506000910152565b8181015183820152602001611849565b9060209161188281518092818552858086019101611846565b601f01601f1916010190565b600435906001600160a01b03821682036118a457565b600080fd5b602435906001600160a01b03821682036118a457565b60609060031901126118a4576001600160a01b039060043582811681036118a4579160243590811681036118a4579060443590565b6020810190811067ffffffffffffffff82111761191057604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761191057604052565b67ffffffffffffffff81116119105760051b60200190565b67ffffffffffffffff811161191057601f01601f191660200190565b92919261198882611960565b916119966040519384611926565b8294818452818301116118a4578281602093846000960137010152565b60206003198201126118a4576004359067ffffffffffffffff82116118a457806023830112156118a4578160246119ef9360040135910161197c565b90565b90600182811c92168015611a22575b6020831014611a0c57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611a01565b6001600160a01b0382811693918415611ca257600094838652602095600287526040968488832054169633151580611c14575b5087158015611be1575b84845260038352898420805460010190558784526002835289842080546001600160a01b0319168617905587858a7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a415611b65576008548784526009835289842055611ad787611e7d565b838803611b13575b505050501692838303611af25750505050565b6064945051926364283d7b60e01b8452600484015260248301526044820152fd5b611b1c90611dc9565b600019810193908411611b515782916007918a9452600681528383208584528152878484205587835252205538808080611adf565b634e487b7160e01b83526011600452602483fd5b878414611ad757611b7588611dc9565b8784526007835289842054818103611baa575b50878452838a8120558884526006835289842090845282528289812055611ad7565b898552600684528a852082865284528a8520548a8652600685528b86208287528552808c8720558552600784528a85205538611b88565b600088815260046020526040902080546001600160a01b0319169055888452600383528984208054600019019055611a69565b80611c61575b15611c255738611a5f565b888789611c42576024915190637e27328960e01b82526004820152fd5b905163177e802f60e01b81523360048201526024810191909152604490fd5b503388148015611c86575b80611c1a57508683526004825233868a8520541614611c1a565b5087835260058252888320338452825260ff8984205416611c6c565b604051633250574960e11b815260006004820152602490fd5b8051821015611ccf5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b15611cec57565b60405162461bcd60e51b815260206004820152601c60248201527f4d696e74696e6720686173206e6f742073746172746564207965742e000000006044820152606490fd5b15611d3857565b60405162461bcd60e51b815260206004820152600f60248201526e4e6f206d6f726520737570706c792160881b6044820152606490fd5b91908201809211611d7c57565b634e487b7160e01b600052601160045260246000fd5b600854811015611ccf5760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b6001600160a01b03168015611de957600052600360205260406000205490565b6040516322718ad960e21b815260006004820152602490fd5b90601054811015611ccf577f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720154600f54831015611ccf57600f60005260ff8360051c7f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802015460f8600e548095169560031b161c161c161490565b600854600160401b81101561191057806001611e9c9201600855611d92565b819291549060031b91821b91600019901b1916179055565b15611ebb57565b60405162461bcd60e51b815260206004820152601d60248201527f496e636f727265637420616d6f756e74206f66207765692073656e742e0000006044820152606490fd5b6000818152600260205260409020546001600160a01b0316908115611f23575090565b60249060405190637e27328960e01b82526004820152fd5b600a546001600160a01b03163303611f4f57565b60405163118cdaa760e01b8152336004820152602490fd5b6040805192611f75846118f4565b60008085526001600160a01b0394848616949192918515612268578284526020966002885285852054168681159182159283612235575b82885260038b528888208054600101905586885260028b5288882080546001600160a01b031916841790558683837fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8b80a4156121b95760085486885260098b528888205561201a86611e7d565b0361216c575b612154573b612032575b505050505050565b85612070918596979894955180938192630a85bd0160e11b968784523360048501528960248501526044840152608060648401526084830190611869565b0381878a5af1849181612114575b506120dd575050503d6000146120d5573d61209881611960565b906120a584519283611926565b81528091853d92013e5b805193846120cf578251633250574960e11b815260048101859052602490fd5b84925001fd5b5060606120af565b919550915063ffffffff60e01b16036120fd57505038808080808061202a565b602492505190633250574960e11b82526004820152fd5b9091508781813d831161214d575b61212c8183611926565b81010312610bce57516001600160e01b031981168103610bce57903861207e565b503d612122565b84516339e3563760e11b815260048101859052602490fd5b61217582611dc9565b60001981019081116121a55787865260068952868620818752895284878720558486526007895286862055612020565b634e487b7160e01b86526011600452602486fd5b80821461201a576121c981611dc9565b86885260078b52888820548181036121fe575b50868852878981205581885260068b528888209088528a52868881205561201a565b82895260068c52898920828a528c5289892054838a5260068d528a8a20828b528d52808b8b2055895260078c5289892055386121dc565b600087815260046020526040902080546001600160a01b031916905581885260038b528888208054600019019055611fac565b8451633250574960e11b815260048101859052602490fd5b813b61228d575b50505050565b604051630a85bd0160e11b8082523360048301526001600160a01b039283166024830152604482019490945260806064820152602095929091169390929083906122db906084830190611869565b039285816000958187895af1849181612384575b5061234f575050503d600014612347573d61230981611960565b906123176040519283611926565b81528091843d92013e5b8051928361234257604051633250574960e11b815260048101849052602490fd5b019050fd5b506060612321565b919450915063ffffffff60e01b160361236c575038808080612287565b60249060405190633250574960e11b82526004820152fd5b9091508681813d83116123bd575b61239c8183611926565b81010312610bce57516001600160e01b031981168103610bce5790386122ef565b503d61239256fea2646970667358221220bdedcd60c1545685dada7851b9f7b9fc28f13d978f39d0eb18a8c7e8e2c067fd64736f6c63430008170033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.