More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 757 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Approval For... | 19744481 | 687 days ago | IN | 0 ETH | 0.00027303 | ||||
| Withdraw | 19264274 | 754 days ago | IN | 0 ETH | 0.00159299 | ||||
| Allowlist Mint | 18192377 | 904 days ago | IN | 0 ETH | 0.00148188 | ||||
| Allowlist Mint | 18020114 | 928 days ago | IN | 0 ETH | 0.00258166 | ||||
| Transfer From | 17997424 | 931 days ago | IN | 0 ETH | 0.00036431 | ||||
| Set Approval For... | 17770100 | 963 days ago | IN | 0 ETH | 0.00101799 | ||||
| Safe Transfer Fr... | 17758418 | 965 days ago | IN | 0 ETH | 0.00072802 | ||||
| Set Approval For... | 17758235 | 965 days ago | IN | 0 ETH | 0.00106161 | ||||
| Transfer From | 17733556 | 968 days ago | IN | 0 ETH | 0.00076408 | ||||
| Transfer From | 17733533 | 968 days ago | IN | 0 ETH | 0.000614 | ||||
| Set Approval For... | 17584901 | 989 days ago | IN | 0 ETH | 0.00117225 | ||||
| Allowlist Mint | 17506683 | 1000 days ago | IN | 0 ETH | 0.0018664 | ||||
| Safe Transfer Fr... | 17072809 | 1061 days ago | IN | 0 ETH | 0.001101 | ||||
| Allowlist Mint | 17068349 | 1062 days ago | IN | 0 ETH | 0.00365331 | ||||
| Allowlist Mint | 17059526 | 1063 days ago | IN | 0 ETH | 0.00256136 | ||||
| Allowlist Mint | 17044562 | 1065 days ago | IN | 0 ETH | 0.00280643 | ||||
| Allowlist Mint | 16935056 | 1081 days ago | IN | 0 ETH | 0.00409411 | ||||
| Allowlist Mint | 16903438 | 1085 days ago | IN | 0 ETH | 0.00155392 | ||||
| Allowlist Mint | 16869369 | 1090 days ago | IN | 0 ETH | 0.00447178 | ||||
| Allowlist Mint | 16865084 | 1091 days ago | IN | 0 ETH | 0.00206438 | ||||
| Allowlist Mint | 16861641 | 1091 days ago | IN | 0 ETH | 0.00143459 | ||||
| Set Approval For... | 16856826 | 1092 days ago | IN | 0 ETH | 0.00064251 | ||||
| Allowlist Mint | 16839352 | 1094 days ago | IN | 0 ETH | 0.00215866 | ||||
| Allowlist Mint | 16839078 | 1094 days ago | IN | 0 ETH | 0.00179269 | ||||
| Allowlist Mint | 16835974 | 1095 days ago | IN | 0 ETH | 0.0028569 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 19264274 | 754 days ago | 3.66682422 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Alphafounder
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "./ERC721A/ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./chainlink/AggregatorV3Interface.sol";
import "./ERC2981/ERC2981.sol";
import "./MintPass/MintpassValidator.sol";
import "./MintPass/LibMintpass.sol";
/**
* @dev Learn more about this project on alphafounders.xyz
*
* _ _ ___ _
* | | | | / __) | |
* _____ | | ____ | |__ _____ _| |__ ___ _ _ ____ __| | _____ ____ ___
* (____ || | | _ \ | _ \ (____ |(_ __)/ _ \ | | | || _ \ / _ || ___ | / ___)/___)
* / ___ || | | |_| || | | |/ ___ | | | | |_| || |_| || | | |( (_| || ____|| | |___ |
* \_____| \_)| __/ |_| |_|\_____| |_| \___/ |____/ |_| |_| \____||_____)|_| (___/
* |_|
*
**/
contract Alphafounder is MintpassValidator, ERC721A, ERC2981, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
AggregatorV3Interface internal ethUsdPriceFeed;
AggregatorV3Interface internal eurUsdPriceFeed;
// Token Limit and Mint Limits
uint256 public TOKEN_LIMIT = 1000;
uint256 public MAX_TOKEN_PER_WALLET = 1;
// Transfer Permissions
mapping(uint256 => bool) public membershipTransferPermit;
// Signatures Dictionary
mapping(bytes => bool) public usedSignatures;
// Sale Stages Enabled / Disabled
bool public allowlistMintEnabled = true;
bool public publicMintEnabled = true;
// Mint Price
int256 public mintEURPrice = 500000000000; // = 500 EUR
string public _baseTokenURI;
/**
* @dev ERC721A Constructor
*/
constructor(string memory name, string memory symbol)
ERC721A(name, symbol)
{
_setDefaultRoyalty(msg.sender, 500);
ethUsdPriceFeed = AggregatorV3Interface(
0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
);
// Chainlink Mainnet ETH/USD 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
eurUsdPriceFeed = AggregatorV3Interface(
0xb49f677943BC038e9857d61E7d053CaA2C1734C1
);
// Chainlink Mainnet EUR/USD 0xb49f677943BC038e9857d61E7d053CaA2C1734C1
SIGNER_WALLET = 0xa4Daf00b6ca5ce4136269c68Db35288072844f2a;
}
/**
* @dev Withrawal all Funds sent to the contract to Owner
*
* Requirements:
* - `msg.sender` needs to be Beneficiary and payable
*/
function withdraw() external onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}
/**
* @dev Overwrite Token ID Start to skip Token with ID 0
*
*/
function _startTokenId() internal view virtual override returns (uint256) {
return 1;
}
/**
* @dev Public Mint Function.
*
* @param minter amount of tokens to be minted
*
* Requirements:
* - `minter` user that should receive the token
* - `quantity` user that should receive the token
*/
function mint(address minter, uint256 quantity) public payable {
require(
publicMintEnabled == true,
"Alphafounder: Public Minting is not Enabled"
);
require(
msg.value >= (mintPrice() * quantity * 199) / 200, // 0.5% treshold due to conversion rate swings
"Alphafounder: Insufficient Amount"
);
require(
TOKEN_LIMIT >= _nextTokenId(),
"Alphafounder: Token Limit reached"
);
_mint(minter, quantity);
}
/**
* @dev Function to mint Tokens during Allowlist Sale. This function is
* should only be called on minting app to ensure signature validity.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by the minting app
* @param mintpassSignature issued by minting app and signed by SIGNER_WALLET
*
* Requirements:
* - `quantity` can't be higher than {mintLimitPerWallet}
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from minting app and
* signed by SIGNER_WALLET
*/
function allowlistMint(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public {
require(
allowlistMintEnabled == true,
"Alphafounder: Allowlist Minting is not Enabled"
);
require(
TOKEN_LIMIT >= _nextTokenId(),
"Alphafounder: All Tokens minted"
);
require(
!usedSignatures[mintpassSignature],
"Alphafounder: Signature already used"
);
validateMintpass(mintpass, mintpassSignature);
_mint(mintpass.wallet, quantity);
usedSignatures[mintpassSignature] = true;
}
function mintPrice() public view returns (uint256) {
return convertFiatToEth(mintEURPrice);
}
/**
* Returns the latest price
*/
function convertFiatToEth(int256 fiatPrice)
internal
view
returns (uint256)
{
(
,
/*uint80 roundID*/
int256 ethConversionRate, /*uint startedAt*/ /*uint timeStamp*/ /*uint80 answeredInRound*/
,
,
) = ethUsdPriceFeed.latestRoundData();
(
,
/*uint80 roundID*/
int256 eurConversionRate, /*uint startedAt*/ /*uint timeStamp*/ /*uint80 answeredInRound*/
,
,
) = eurUsdPriceFeed.latestRoundData();
return
uint256(
(((fiatPrice * eurConversionRate) / ethConversionRate) *
1000000000) * (1 wei)
);
}
/**
* @dev Function to be called by contract owner to enable / disable
* different mint stages
*
* @param _allowlistMintEnabled true/false
* @param _publicMintEnabled true/false
*/
function setMintingEnabled(
bool _allowlistMintEnabled,
bool _publicMintEnabled
) public virtual onlyOwner {
allowlistMintEnabled = _allowlistMintEnabled;
publicMintEnabled = _publicMintEnabled;
}
/**
* @dev Function to be called by contract owner to change mintEURPrice
*
* @param _mintEURPrice 500000000000 = 500 EUR
*/
function setMintEURPrice(int256 _mintEURPrice) public virtual onlyOwner {
mintEURPrice = _mintEURPrice;
}
/**
* @dev Function to be called by contract owner change the available token amount
*
* @param _tokenLimit max amount of tokens available
* @param _maxTokenPerWallet how many tokens can be in one wallet
*/
function setLimits(uint256 _tokenLimit, uint256 _maxTokenPerWallet)
public
virtual
onlyOwner
{
require(
_tokenLimit >= totalSupply(),
"Alphafounder: New Token Limit is smaller than already available tokens"
);
TOKEN_LIMIT = _tokenLimit;
MAX_TOKEN_PER_WALLET = _maxTokenPerWallet;
}
/**
* @dev Function to change the signer Wallet
*
* @param _signerWallet address
*/
function setSignerWallet(address _signerWallet) public virtual onlyOwner {
SIGNER_WALLET = _signerWallet;
}
/**
* @dev Helper to replace _baseURI
*/
function _baseURI() internal view virtual override returns (string memory) {
if (bytes(_baseTokenURI).length > 0) {
return _baseTokenURI;
}
return
string(
abi.encodePacked(
"https://meta.bowline.app/",
Strings.toHexString(uint256(uint160(address(this))), 20),
"/"
)
);
}
/**
* @dev Can be called by owner to change base URI. This is recommend to be used
* after tokens are revealed to freeze metadata on IPFS or similar.
*
* @param permanentBaseURI URI to be prefixed before tokenId
*/
function setBaseURI(string memory permanentBaseURI)
public
virtual
onlyOwner
{
_baseTokenURI = permanentBaseURI;
}
/**
* @dev This NFT is the membership to a game. Token Transfers during
* a season are only allowed if an admin approves it. Also we need to
* enforce only one token per wallet.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 _tokenId,
uint256 quantity
) internal view override {
if (address(0) != from) {
for (uint256 i; i < quantity; i++) {
require(
(membershipTransferPermit[_tokenId + i]),
"Alphafounder: Transfer has to be permitted by council"
);
}
}
require(
balanceOf(to) + quantity <= MAX_TOKEN_PER_WALLET,
"Alphafounder: Max Memberships per Wallet"
);
}
/**
* @dev After a Token Transfer we invalidate the membershipTransferPermit
*/
function _afterTokenTransfers(
address from,
address,
uint256 _tokenId,
uint256 quantity
) internal virtual override {
if (address(0) != from) {
for (uint256 i; i < quantity; i++) {
membershipTransferPermit[_tokenId + i] = false;
}
}
}
/**
* @dev Function to permit a Token Transfer this only allows a transfer for one token
*
* @param _tokenId Token ID that should have a one transfer permit
* @param transferPermitted true/false
*/
function permitMembershipTransfer(uint256 _tokenId, bool transferPermitted)
public
virtual
onlyOwner
{
membershipTransferPermit[_tokenId] = transferPermitted;
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
virtual
onlyOwner
{
_setDefaultRoyalty(receiver, feeNumerator);
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
// Supports the following `interfaceId`s:
// - IERC165: 0x01ffc9a7
// - IERC721: 0x80ac58cd
// - IERC721Metadata: 0x5b5e139f
// - IERC2981: 0x2a55205a
return
ERC721A.supportsInterface(interfaceId) ||
ERC2981.supportsInterface(interfaceId);
}
}
/** created with bowline.app **/// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
function getRoundData(uint80 _roundId)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "./LibMintpass.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
/**
* @dev EIP712 based contract module which validates a Mintpass Issued by
* Bowline. The signer is {SIGNER_WALLET} and checks for integrity of
* minterCategory, amount and Address. {mintpass} is struct defined in
* LibMintpass.
*
*/
abstract contract MintpassValidator is EIP712 {
constructor() EIP712("Alphafounder", "1") {}
// Wallet that signs our mintpasses
address public SIGNER_WALLET;
/**
* @dev Validates if {mintpass} was signed by {SIGNER_WALLET} and created {signature}.
*
* @param mintpass Struct with mintpass properties
* @param signature Signature to decode and compare
*/
function validateMintpass(LibMintpass.Mintpass memory mintpass, bytes memory signature)
internal
view
{
bytes32 mintpassHash = LibMintpass.mintpassHash(mintpass);
bytes32 digest = _hashTypedDataV4(mintpassHash);
address signer = ECDSA.recover(digest, signature);
require(
signer == SIGNER_WALLET,
"MintpassValidator: Mintpass signature verification error"
);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
/**
* @dev Mintpass Struct definition used to validate EIP712.
*
* {minterAddress} is the mintpass owner (It's reommenced to
* check if it matches msg.sender in your call function)
* {minterCategory} determines what type of minter is calling:
* (1, default) AllowList
*/
library LibMintpass {
bytes32 private constant MINTPASS_TYPE =
keccak256(
"Mintpass(address wallet,uint256 tier)"
);
struct Mintpass {
address wallet;
uint256 tier;
}
function mintpassHash(Mintpass memory mintpass) internal pure returns (bytes32) {
return
keccak256(
abi.encode(
MINTPASS_TYPE,
mintpass.wallet,
mintpass.tier
)
);
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.2
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* The caller cannot approve to their own address.
*/
error ApproveToCaller();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the
* ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
// =============================================================
// STRUCTS
// =============================================================
struct TokenOwnership {
// The address of the owner.
address addr;
// Stores the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
uint24 extraData;
}
// =============================================================
// TOKEN COUNTERS
// =============================================================
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() external view returns (uint256);
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// =============================================================
// IERC721
// =============================================================
/**
* @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`,
* checking first that contract recipients are aware of the ERC721 protocol
* to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be 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,
bytes calldata data
) external;
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom}
* whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token
* by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the
* zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @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);
// =============================================================
// IERC2309
// =============================================================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId`
* (inclusive) is transferred from `from` to `to`, as defined in the
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
*
* See {_mintERC2309} for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.2
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721A.sol';
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Reference type for token approval.
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() public view virtual override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than `_currentIndex - _startTokenId()` times.
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256) {
// Counter underflow is impossible as `_currentIndex` does not decrement,
// and it is initialized to `_startTokenId()`.
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
// =============================================================
// ADDRESS DATA OPERATIONS
// =============================================================
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes
// of the XOR of all function selectors in the interface.
// See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
// (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @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, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
// =============================================================
// OWNERSHIPS OPERATIONS
// =============================================================
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// Invariant:
// There will always be an initialized ownership slot
// (i.e. `ownership.addr != address(0) && ownership.burned == false`)
// before an unintialized ownership slot
// (i.e. `ownership.addr == address(0) && ownership.burned == false`)
// Hence, `curr` will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed will be zero.
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* @dev Returns the unpacked `TokenOwnership` struct from `packed`.
*/
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
ownership.addr = address(uint160(packed));
ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
ownership.burned = packed & _BITMASK_BURNED != 0;
ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
}
/**
* @dev Packs ownership data into a single uint256.
*/
function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
}
}
/**
* @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
*/
function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
// For branchless setting of the `nextInitialized` flag.
assembly {
// `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
}
}
// =============================================================
// APPROVAL OPERATIONS
// =============================================================
/**
* @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) public virtual override {
address owner = ownerOf(tokenId);
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId].value;
}
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
if (operator == _msgSenderERC721A()) revert ApproveToCaller();
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted. See {_mint}.
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex && // If within bounds,
_packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
}
/**
* @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
*/
function _isSenderApprovedOrOwner(
address approvedAddress,
address owner,
address msgSender
) private pure returns (bool result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
msgSender := and(msgSender, _BITMASK_ADDRESS)
// `msgSender == owner || msgSender == approvedAddress`.
result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
}
}
/**
* @dev Returns the storage slot and value for the approved address of `tokenId`.
*/
function _getApprovedSlotAndAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
// The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
assembly {
approvedAddressSlot := tokenApproval.slot
approvedAddress := sload(approvedAddressSlot)
}
}
// =============================================================
// TRANSFER OPERATIONS
// =============================================================
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* 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
) public virtual override {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// We can directly increment and decrement the balances.
--_packedAddressData[from]; // Updates: `balance -= 1`.
++_packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
to,
_BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, '');
}
/**
* @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 memory _data
) public virtual override {
transferFrom(from, to, tokenId);
if (to.code.length != 0)
if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @dev Hook that is called before a set of serially-ordered token IDs
* are about to be transferred. This includes minting.
* And also called before burning one token.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token IDs
* have been transferred. This includes minting.
* And also called after one token has been burned.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* `from` - Previous owner of the given token ID.
* `to` - Target address that will receive the token.
* `tokenId` - Token ID to be transferred.
* `_data` - Optional data to send along with the call.
*
* Returns whether the call correctly returned the expected magic value.
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
bytes4 retval
) {
return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
// =============================================================
// MINT OPERATIONS
// =============================================================
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event for each mint.
*/
function _mint(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// `balance` and `numberMinted` have a maximum limit of 2**64.
// `tokenId` has a maximum limit of 2**256.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
uint256 toMasked;
uint256 end = startTokenId + quantity;
// Use assembly to loop and emit the `Transfer` event for gas savings.
// The duplicated `log4` removes an extra check and reduces stack juggling.
// The assembly, together with the surrounding Solidity code, have been
// delicately arranged to nudge the compiler into producing optimized opcodes.
assembly {
// Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
toMasked := and(to, _BITMASK_ADDRESS)
// Emit the `Transfer` event.
log4(
0, // Start of data (0, since no data).
0, // End of data (0, since no data).
_TRANSFER_EVENT_SIGNATURE, // Signature.
0, // `address(0)`.
toMasked, // `to`.
startTokenId // `tokenId`.
)
for {
let tokenId := add(startTokenId, 1)
} iszero(eq(tokenId, end)) {
tokenId := add(tokenId, 1)
} {
// Emit the `Transfer` event. Similar to above.
log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
}
}
if (toMasked == 0) revert MintToZeroAddress();
_currentIndex = end;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* This function is intended for efficient minting only during contract creation.
*
* It emits only one {ConsecutiveTransfer} as defined in
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
* instead of a sequence of {Transfer} event(s).
*
* Calling this function outside of contract creation WILL make your contract
* non-compliant with the ERC721 standard.
* For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
* {ConsecutiveTransfer} event is only permissible during contract creation.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {ConsecutiveTransfer} event.
*/
function _mintERC2309(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are unrealistic due to the above check for `quantity` to be below the limit.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);
_currentIndex = startTokenId + quantity;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* See {_mint}.
*
* Emits a {Transfer} event for each mint.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal virtual {
_mint(to, quantity);
unchecked {
if (to.code.length != 0) {
uint256 end = _currentIndex;
uint256 index = end - quantity;
do {
if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (index < end);
// Reentrancy protection.
if (_currentIndex != end) revert();
}
}
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, '');
}
// =============================================================
// BURN OPERATIONS
// =============================================================
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
address from = address(uint160(prevOwnershipPacked));
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
if (approvalCheck) {
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// Updates:
// - `balance -= 1`.
// - `numberBurned += 1`.
//
// We can directly decrement the balance, and increment the number burned.
// This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
_packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;
// Updates:
// - `address` to the last owner.
// - `startTimestamp` to the timestamp of burning.
// - `burned` to `true`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
from,
(_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
// Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
unchecked {
_burnCounter++;
}
}
// =============================================================
// EXTRA DATA OPERATIONS
// =============================================================
/**
* @dev Directly sets the extra data for the ownership data `index`.
*/
function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
uint256 packed = _packedOwnerships[index];
if (packed == 0) revert OwnershipNotInitializedForExtraData();
uint256 extraDataCasted;
// Cast `extraData` with assembly to avoid redundant masking.
assembly {
extraDataCasted := extraData
}
packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
_packedOwnerships[index] = packed;
}
/**
* @dev Called during each token transfer to set the 24bit `extraData` field.
* Intended to be overridden by the cosumer contract.
*
* `previousExtraData` - the value of `extraData` before transfer.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual returns (uint24) {}
/**
* @dev Returns the next extra data for the packed ownership data.
* The returned result is shifted into position.
*/
function _nextExtraData(
address from,
address to,
uint256 prevOwnershipPacked
) private view returns (uint256) {
uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
}
// =============================================================
// OTHER OPERATIONS
// =============================================================
/**
* @dev Returns the message sender (defaults to `msg.sender`).
*
* If you are writing GSN compatible contracts, you need to override this function.
*/
function _msgSenderERC721A() internal view virtual returns (address) {
return msg.sender;
}
/**
* @dev Converts a uint256 to its ASCII string decimal representation.
*/
function _toString(uint256 value) internal pure virtual returns (string memory str) {
assembly {
// The maximum value of a uint256 contains 78 digits (1 byte per digit),
// but we allocate 0x80 bytes to keep the free memory pointer 32-byte word aligned.
// We will need 1 32-byte word to store the length,
// and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80.
str := add(mload(0x40), 0x80)
// Update the free memory pointer to allocate.
mstore(0x40, str)
// Cache the end of the memory to calculate the length later.
let end := str
// We write the string from rightmost digit to leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
// prettier-ignore
for { let temp := value } 1 {} {
str := sub(str, 1)
// Write the character to the pointer.
// The ASCII index of the '0' character is 48.
mstore8(str, add(48, mod(temp, 10)))
// Keep dividing `temp` until zero.
temp := div(temp, 10)
// prettier-ignore
if iszero(temp) { break }
}
let length := sub(end, str)
// Move the pointer 32 bytes leftwards to make room for the length.
str := sub(str, 0x20)
// Store the length.
mstore(str, length)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/common/ERC2981.sol)
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
/**
* @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
*
* Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
* specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
*
* Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
* fee is specified in basis points by default.
*
* _Available since v4.5._
*/
abstract contract ERC2981 is IERC2981, ERC165 {
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
RoyaltyInfo private _defaultRoyaltyInfo;
mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
external
view
virtual
override
returns (address, uint256)
{
RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];
if (royalty.receiver == address(0)) {
royalty = _defaultRoyaltyInfo;
}
uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();
return (royalty.receiver, royaltyAmount);
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
return 10000;
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: invalid receiver");
_defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Sets the royalty information for a specific token id, overriding the global default.
*
* Requirements:
*
* - `tokenId` must be already minted.
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setTokenRoyalty(
uint256 tokenId,
address receiver,
uint96 feeNumerator
) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: Invalid parameters");
_tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Resets royalty information for the token id back to the global default.
*/
function _resetTokenRoyalty(uint256 tokenId) internal virtual {
delete _tokenRoyaltyInfo[tokenId];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/draft-EIP712.sol)
pragma solidity ^0.8.0;
import "./ECDSA.sol";
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
*
* The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
* thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
* they need in their contracts using a combination of `abi.encode` and `keccak256`.
*
* This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
* ({_hashTypedDataV4}).
*
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating
* the chain id to protect against replay attacks on an eventual fork of the chain.
*
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
*
* _Available since v3.4._
*/
abstract contract EIP712 {
/* solhint-disable var-name-mixedcase */
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
uint256 private immutable _CACHED_CHAIN_ID;
address private immutable _CACHED_THIS;
bytes32 private immutable _HASHED_NAME;
bytes32 private immutable _HASHED_VERSION;
bytes32 private immutable _TYPE_HASH;
/* solhint-enable var-name-mixedcase */
/**
* @dev Initializes the domain separator and parameter caches.
*
* The meaning of `name` and `version` is specified in
* https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
*
* - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
* - `version`: the current major version of the signing domain.
*
* NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
* contract upgrade].
*/
constructor(string memory name, string memory version) {
bytes32 hashedName = keccak256(bytes(name));
bytes32 hashedVersion = keccak256(bytes(version));
bytes32 typeHash = keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
);
_HASHED_NAME = hashedName;
_HASHED_VERSION = hashedVersion;
_CACHED_CHAIN_ID = block.chainid;
_CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
_CACHED_THIS = address(this);
_TYPE_HASH = typeHash;
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
return _CACHED_DOMAIN_SEPARATOR;
} else {
return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
}
}
function _buildDomainSeparator(
bytes32 typeHash,
bytes32 nameHash,
bytes32 versionHash
) private view returns (bytes32) {
return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
}
/**
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
* function returns the hash of the fully encoded EIP712 message for this domain.
*
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
*
* ```solidity
* bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
* keccak256("Mail(address to,string contents)"),
* mailTo,
* keccak256(bytes(mailContents))
* )));
* address signer = ECDSA.recover(digest, signature);
* ```
*/
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else if (signature.length == 64) {
bytes32 r;
bytes32 vs;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s;
uint8 v;
assembly {
s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
v := add(shr(255, vs), 27)
}
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
if (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
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_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (interfaces/IERC2981.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Interface for the NFT Royalty Standard
*/
interface IERC2981 is IERC165 {
/**
* @dev Called with the sale price to determine how much royalty is owed and to whom.
* @param tokenId - the NFT asset queried for royalty information
* @param salePrice - the sale price of the NFT asset specified by `tokenId`
* @return receiver - address of who should be sent the royalty payment
* @return royaltyAmount - the royalty payment amount for `salePrice`
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
returns (address receiver, uint256 royaltyAmount);
}// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}{
"remappings": [],
"optimizer": {
"enabled": true,
"runs": 1000
},
"evmVersion": "london",
"libraries": {},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","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":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":[],"name":"MAX_TOKEN_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNER_WALLET","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"tier","type":"uint256"}],"internalType":"struct LibMintpass.Mintpass","name":"mintpass","type":"tuple"},{"internalType":"bytes","name":"mintpassSignature","type":"bytes"}],"name":"allowlistMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowlistMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"uint256","name":"","type":"uint256"}],"name":"membershipTransferPermit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintEURPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","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":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bool","name":"transferPermitted","type":"bool"}],"name":"permitMembershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"publicMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"permanentBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenLimit","type":"uint256"},{"internalType":"uint256","name":"_maxTokenPerWallet","type":"uint256"}],"name":"setLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"_mintEURPrice","type":"int256"}],"name":"setMintEURPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_allowlistMintEnabled","type":"bool"},{"internalType":"bool","name":"_publicMintEnabled","type":"bool"}],"name":"setMintingEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signerWallet","type":"address"}],"name":"setSignerWallet","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":"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"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"usedSignatures","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6101406040526103e8600e556001600f556012805461ffff191661010117905564746a5288006013553480156200003557600080fd5b50604051620036f5380380620036f58339810160408190526200005891620004ba565b604080518082018252600c81526b20b6383430b337bab73232b960a11b60208083019182528351808501855260018152603160f81b908201529151902060e08190527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66101008190524660a081815285517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818701819052818801959095526060810193909352608080840192909252308382018190528651808503909201825260c0938401909652805190850120905292909252610120919091528251839183916200014c916003919085019062000347565b5080516200016290600490602084019062000347565b505060018055506200017433620001f0565b62000182336101f462000242565b5050600c80546001600160a01b0319908116735f4ec3df9cbd43714fe2740f5e3616155c5b841917909155600d8054821673b49f677943bc038e9857d61e7d053caa2c1734c11790556000805490911673a4daf00b6ca5ce4136269c68db35288072844f2a17905562000561565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620002b65760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b0382166200030e5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620002ad565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b828054620003559062000524565b90600052602060002090601f016020900481019282620003795760008555620003c4565b82601f106200039457805160ff1916838001178555620003c4565b82800160010185558215620003c4579182015b82811115620003c4578251825591602001919060010190620003a7565b50620003d2929150620003d6565b5090565b5b80821115620003d25760008155600101620003d7565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200041557600080fd5b81516001600160401b0380821115620004325762000432620003ed565b604051601f8301601f19908116603f011681019082821181831017156200045d576200045d620003ed565b816040528381526020925086838588010111156200047a57600080fd5b600091505b838210156200049e57858201830151818301840152908201906200047f565b83821115620004b05760008385830101525b9695505050505050565b60008060408385031215620004ce57600080fd5b82516001600160401b0380821115620004e657600080fd5b620004f48683870162000403565b935060208501519150808211156200050b57600080fd5b506200051a8582860162000403565b9150509250929050565b600181811c908216806200053957607f821691505b602082108114156200055b57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e0516101005161012051613144620005b1600039600061248c015260006124db015260006124b60152600061240f015260006124390152600061246301526131446000f3fe6080604052600436106102855760003560e01c80636352211e11610153578063b88d4fde116100cb578063d0f55c231161007f578063e949580e11610064578063e949580e146106ea578063e985e9c514610725578063f2fde38b1461076e57600080fd5b8063d0f55c23146106b4578063d2039bf3146106ca57600080fd5b8063c87b56dd116100b0578063c87b56dd14610669578063c9e4823314610689578063cfc86f7b1461069f57600080fd5b8063b88d4fde14610629578063c4590d3f1461064957600080fd5b8063715018a6116101225780638da5cb5b116101075780638da5cb5b146105d657806395d89b41146105f4578063a22cb4651461060957600080fd5b8063715018a6146105a757806379de186a146105bc57600080fd5b80636352211e146105325780636817c76c1461055257806370a08231146105675780637103ad031461058757600080fd5b806323b872dd1161020157806340c10f19116101b55780634ee7b7f51161019a5780634ee7b7f5146104d257806355f804b3146104f25780635b2ba2ac1461051257600080fd5b806340c10f191461049f57806342842e0e146104b257600080fd5b806331c515b8116101e657806331c515b81461044a5780633ccfd60b1461046a5780633fa7e1a11461047f57600080fd5b806323b872dd146103eb5780632a55205a1461040b57600080fd5b8063081812fc116102585780630967b1911161023d5780630967b1911461037f5780630f4161aa146103af57806318160ddd146103ce57600080fd5b8063081812fc14610327578063095ea7b31461035f57600080fd5b806301ffc9a71461028a578063031bd4c4146102bf57806304634d8d146102e357806306fdde0314610305575b600080fd5b34801561029657600080fd5b506102aa6102a5366004612935565b61078e565b60405190151581526020015b60405180910390f35b3480156102cb57600080fd5b506102d5600e5481565b6040519081526020016102b6565b3480156102ef57600080fd5b506103036102fe36600461296e565b6107ae565b005b34801561031157600080fd5b5061031a61081b565b6040516102b69190612a0e565b34801561033357600080fd5b50610347610342366004612a21565b6108ad565b6040516001600160a01b0390911681526020016102b6565b34801561036b57600080fd5b5061030361037a366004612a3a565b61090a565b34801561038b57600080fd5b506102aa61039a366004612a21565b60106020526000908152604090205460ff1681565b3480156103bb57600080fd5b506012546102aa90610100900460ff1681565b3480156103da57600080fd5b5060025460015403600019016102d5565b3480156103f757600080fd5b50610303610406366004612a64565b6109d0565b34801561041757600080fd5b5061042b610426366004612aa0565b610bc7565b604080516001600160a01b0390931683526020830191909152016102b6565b34801561045657600080fd5b50610303610465366004612ad2565b610c84565b34801561047657600080fd5b50610303610d02565b34801561048b57600080fd5b5061030361049a366004612a21565b610d82565b6103036104ad366004612a3a565b610de1565b3480156104be57600080fd5b506103036104cd366004612a64565b610f87565b3480156104de57600080fd5b506103036104ed366004612bb1565b610fa7565b3480156104fe57600080fd5b5061030361050d366004612c4c565b61115a565b34801561051e57600080fd5b50600054610347906001600160a01b031681565b34801561053e57600080fd5b5061034761054d366004612a21565b6111c7565b34801561055e57600080fd5b506102d56111d2565b34801561057357600080fd5b506102d5610582366004612c95565b6111e4565b34801561059357600080fd5b506103036105a2366004612cb0565b61124c565b3480156105b357600080fd5b506103036112c6565b3480156105c857600080fd5b506012546102aa9060ff1681565b3480156105e257600080fd5b50600b546001600160a01b0316610347565b34801561060057600080fd5b5061031a61132a565b34801561061557600080fd5b50610303610624366004612cd3565b611339565b34801561063557600080fd5b50610303610644366004612cef565b6113e8565b34801561065557600080fd5b50610303610664366004612aa0565b611432565b34801561067557600080fd5b5061031a610684366004612a21565b61153d565b34801561069557600080fd5b506102d5600f5481565b3480156106ab57600080fd5b5061031a6115db565b3480156106c057600080fd5b506102d560135481565b3480156106d657600080fd5b506103036106e5366004612c95565b611669565b3480156106f657600080fd5b506102aa610705366004612d57565b805160208183018101805160118252928201919093012091525460ff1681565b34801561073157600080fd5b506102aa610740366004612d8c565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b34801561077a57600080fd5b50610303610789366004612c95565b6116f2565b6000610799826117d4565b806107a857506107a882611854565b92915050565b600b546001600160a01b0316331461080d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61081782826118a2565b5050565b60606003805461082a90612db6565b80601f016020809104026020016040519081016040528092919081815260200182805461085690612db6565b80156108a35780601f10610878576101008083540402835291602001916108a3565b820191906000526020600020905b81548152906001019060200180831161088657829003601f168201915b5050505050905090565b60006108b8826119bc565b6108ee576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610915826111c7565b9050336001600160a01b03821614610967576109318133610740565b610967576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006109db826119f1565b9050836001600160a01b0316816001600160a01b031614610a28576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b03881690911417610a8e57610a588633610740565b610a8e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610ace576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610adb8686866001611a73565b8015610ae657600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b8316610b715760018401600081815260056020526040902054610b6f576001548114610b6f5760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610bbf8686866001611bc0565b505050505050565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff16928201929092528291610c465750604080518082019091526009546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c6a906bffffffffffffffffffffffff1687612e07565b610c749190612e3c565b91519350909150505b9250929050565b600b546001600160a01b03163314610cde5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b6012805461ffff191692151561ff0019169290921761010091151591909102179055565b600b546001600160a01b03163314610d5c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b60405133904780156108fc02916000818181858888f19350505050610d8057600080fd5b565b600b546001600160a01b03163314610ddc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b601355565b60125460ff610100909104161515600114610e645760405162461bcd60e51b815260206004820152602b60248201527f416c706861666f756e6465723a205075626c6963204d696e74696e672069732060448201527f6e6f7420456e61626c65640000000000000000000000000000000000000000006064820152608401610804565b60c881610e6f6111d2565b610e799190612e07565b610e849060c7612e07565b610e8e9190612e3c565b341015610f035760405162461bcd60e51b815260206004820152602160248201527f416c706861666f756e6465723a20496e73756666696369656e7420416d6f756e60448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610804565b600154600e541015610f7d5760405162461bcd60e51b815260206004820152602160248201527f416c706861666f756e6465723a20546f6b656e204c696d69742072656163686560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610804565b6108178282611c21565b610fa2838383604051806020016040528060008152506113e8565b505050565b60125460ff1615156001146110245760405162461bcd60e51b815260206004820152602e60248201527f416c706861666f756e6465723a20416c6c6f776c697374204d696e74696e672060448201527f6973206e6f7420456e61626c65640000000000000000000000000000000000006064820152608401610804565b600154600e5410156110785760405162461bcd60e51b815260206004820152601f60248201527f416c706861666f756e6465723a20416c6c20546f6b656e73206d696e746564006044820152606401610804565b6011816040516110889190612e50565b9081526040519081900360200190205460ff161561110d5760405162461bcd60e51b8152602060048201526024808201527f416c706861666f756e6465723a205369676e617475726520616c72656164792060448201527f75736564000000000000000000000000000000000000000000000000000000006064820152608401610804565b6111178282611d60565b81516111239084611c21565b60016011826040516111359190612e50565b908152604051908190036020019020805491151560ff19909216919091179055505050565b600b546001600160a01b031633146111b45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b8051610817906014906020840190612886565b60006107a8826119f1565b60006111df601354611e0c565b905090565b60006001600160a01b038216611226576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b600b546001600160a01b031633146112a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b600091825260106020526040909120805460ff1916911515919091179055565b600b546001600160a01b031633146113205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b610d806000611f43565b60606004805461082a90612db6565b6001600160a01b03821633141561137c576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6113f38484846109d0565b6001600160a01b0383163b1561142c5761140f84848484611fa2565b61142c576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600b546001600160a01b0316331461148c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b60025460015403600019018210156115325760405162461bcd60e51b815260206004820152604660248201527f416c706861666f756e6465723a204e657720546f6b656e204c696d697420697360448201527f20736d616c6c6572207468616e20616c726561647920617661696c61626c652060648201527f746f6b656e730000000000000000000000000000000000000000000000000000608482015260a401610804565b600e91909155600f55565b6060611548826119bc565b61157e576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061158861208a565b90508051600014156115a957604051806020016040528060008152506115d4565b806115b3846120df565b6040516020016115c4929190612e6c565b6040516020818303038152906040525b9392505050565b601480546115e890612db6565b80601f016020809104026020016040519081016040528092919081815260200182805461161490612db6565b80156116615780601f1061163657610100808354040283529160200191611661565b820191906000526020600020905b81548152906001019060200180831161164457829003601f168201915b505050505081565b600b546001600160a01b031633146116c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600b546001600160a01b0316331461174c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b6001600160a01b0381166117c85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610804565b6117d181611f43565b50565b60006301ffc9a760e01b6001600160e01b03198316148061181e57507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806107a85750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60006001600160e01b031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806107a857506301ffc9a760e01b6001600160e01b03198316146107a8565b6127106bffffffffffffffffffffffff821611156119285760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610804565b6001600160a01b03821661197e5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610804565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600955565b6000816001111580156119d0575060015482105b80156107a8575050600090815260056020526040902054600160e01b161590565b60008180600111611a4157600154811015611a4157600081815260056020526040902054600160e01b8116611a3f575b806115d4575060001901600081815260056020526040902054611a21565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841615611b355760005b81811015611b335760106000611a9b8386612e9b565b815260208101919091526040016000205460ff16611b215760405162461bcd60e51b815260206004820152603560248201527f416c706861666f756e6465723a205472616e736665722068617320746f20626560448201527f207065726d697474656420627920636f756e63696c00000000000000000000006064820152608401610804565b80611b2b81612eb3565b915050611a85565b505b600f5481611b42856111e4565b611b4c9190612e9b565b111561142c5760405162461bcd60e51b815260206004820152602860248201527f416c706861666f756e6465723a204d6178204d656d626572736869707320706560448201527f722057616c6c65740000000000000000000000000000000000000000000000006064820152608401610804565b6001600160a01b0384161561142c5760005b81811015611c1a576000601081611be98487612e9b565b81526020810191909152604001600020805460ff191691151591909117905580611c1281612eb3565b915050611bd2565b5050505050565b60015481611c5b576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c686000848385611a73565b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611d1757808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611cdf565b5081611d4f576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015550610fa26000848385611bc0565b6000611d6b83612121565b90506000611d7882612194565b90506000611d8682856121fd565b6000549091506001600160a01b03808316911614611c1a5760405162461bcd60e51b815260206004820152603860248201527f4d696e747061737356616c696461746f723a204d696e7470617373207369676e60448201527f617475726520766572696669636174696f6e206572726f7200000000000000006064820152608401610804565b600080600c60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e869190612ee8565b5050509150506000600d60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611ee1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f059190612ee8565b505050915050818185611f189190612f38565b611f229190612fd8565b611f3090633b9aca00612f38565b611f3b906001612f38565b949350505050565b600b80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611fd7903390899088908890600401613006565b6020604051808303816000875af1925050508015612012575060408051601f3d908101601f1916820190925261200f91810190613042565b60015b61206d573d808015612040576040519150601f19603f3d011682016040523d82523d6000602084013e612045565b606091505b508051612065576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060006014805461209b90612db6565b905011156120b0576014805461082a90612db6565b6120bb306014612221565b6040516020016120cb919061305f565b604051602081830303815290604052905090565b604080516080019081905280825b600183039250600a81066030018353600a90048061210a5761210f565b6120ed565b50819003601f19909101908152919050565b8051602080830151604051600093612177937f981d5b43c373d93722e3bc49845c5e666a67bf8faef06370b7808b92ec8087fa939192019283526001600160a01b03919091166020830152604082015260600190565b604051602081830303815290604052805190602001209050919050565b60006107a86121a1612402565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061220c8585612529565b9150915061221981612596565b509392505050565b60606000612230836002612e07565b61223b906002612e9b565b67ffffffffffffffff81111561225357612253612b05565b6040519080825280601f01601f19166020018201604052801561227d576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106122b4576122b46130cb565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106122ff576122ff6130cb565b60200101906001600160f81b031916908160001a9053506000612323846002612e07565b61232e906001612e9b565b90505b60018111156123b3577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061236f5761236f6130cb565b1a60f81b828281518110612385576123856130cb565b60200101906001600160f81b031916908160001a90535060049490941c936123ac816130e1565b9050612331565b5083156115d45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610804565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561245b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561248557507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000808251604114156125605760208301516040840151606085015160001a61255487828585612751565b94509450505050610c7d565b82516040141561258a576020830151604084015161257f86838361283e565b935093505050610c7d565b50600090506002610c7d565b60008160048111156125aa576125aa6130f8565b14156125b35750565b60018160048111156125c7576125c76130f8565b14156126155760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610804565b6002816004811115612629576126296130f8565b14156126775760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610804565b600381600481111561268b5761268b6130f8565b14156126e45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610804565b60048160048111156126f8576126f86130f8565b14156117d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610804565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156127885750600090506003612835565b8460ff16601b141580156127a057508460ff16601c14155b156127b15750600090506004612835565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612805573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661282e57600060019250925050612835565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161287887828885612751565b935093505050935093915050565b82805461289290612db6565b90600052602060002090601f0160209004810192826128b457600085556128fa565b82601f106128cd57805160ff19168380011785556128fa565b828001600101855582156128fa579182015b828111156128fa5782518255916020019190600101906128df565b5061290692915061290a565b5090565b5b80821115612906576000815560010161290b565b6001600160e01b0319811681146117d157600080fd5b60006020828403121561294757600080fd5b81356115d48161291f565b80356001600160a01b038116811461296957600080fd5b919050565b6000806040838503121561298157600080fd5b61298a83612952565b915060208301356bffffffffffffffffffffffff811681146129ab57600080fd5b809150509250929050565b60005b838110156129d15781810151838201526020016129b9565b8381111561142c5750506000910152565b600081518084526129fa8160208601602086016129b6565b601f01601f19169290920160200192915050565b6020815260006115d460208301846129e2565b600060208284031215612a3357600080fd5b5035919050565b60008060408385031215612a4d57600080fd5b612a5683612952565b946020939093013593505050565b600080600060608486031215612a7957600080fd5b612a8284612952565b9250612a9060208501612952565b9150604084013590509250925092565b60008060408385031215612ab357600080fd5b50508035926020909101359150565b8035801515811461296957600080fd5b60008060408385031215612ae557600080fd5b612aee83612ac2565b9150612afc60208401612ac2565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612b3657612b36612b05565b604051601f8501601f19908116603f01168101908282118183101715612b5e57612b5e612b05565b81604052809350858152868686011115612b7757600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612ba257600080fd5b6115d483833560208501612b1b565b60008060008385036080811215612bc757600080fd5b843593506040601f1982011215612bdd57600080fd5b506040516040810167ffffffffffffffff8282108183111715612c0257612c02612b05565b81604052612c1260208801612952565b83526040870135602084015291935060608601359180831115612c3457600080fd5b5050612c4286828701612b91565b9150509250925092565b600060208284031215612c5e57600080fd5b813567ffffffffffffffff811115612c7557600080fd5b8201601f81018413612c8657600080fd5b611f3b84823560208401612b1b565b600060208284031215612ca757600080fd5b6115d482612952565b60008060408385031215612cc357600080fd5b82359150612afc60208401612ac2565b60008060408385031215612ce657600080fd5b612aee83612952565b60008060008060808587031215612d0557600080fd5b612d0e85612952565b9350612d1c60208601612952565b925060408501359150606085013567ffffffffffffffff811115612d3f57600080fd5b612d4b87828801612b91565b91505092959194509250565b600060208284031215612d6957600080fd5b813567ffffffffffffffff811115612d8057600080fd5b611f3b84828501612b91565b60008060408385031215612d9f57600080fd5b612da883612952565b9150612afc60208401612952565b600181811c90821680612dca57607f821691505b60208210811415612deb57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612e2157612e21612df1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612e4b57612e4b612e26565b500490565b60008251612e628184602087016129b6565b9190910192915050565b60008351612e7e8184602088016129b6565b835190830190612e928183602088016129b6565b01949350505050565b60008219821115612eae57612eae612df1565b500190565b6000600019821415612ec757612ec7612df1565b5060010190565b805169ffffffffffffffffffff8116811461296957600080fd5b600080600080600060a08688031215612f0057600080fd5b612f0986612ece565b9450602086015193506040860151925060608601519150612f2c60808701612ece565b90509295509295909350565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615612f7957612f79612df1565b600160ff1b6000871286820588128184161615612f9857612f98612df1565b60008712925087820587128484161615612fb457612fb4612df1565b87850587128184161615612fca57612fca612df1565b505050929093029392505050565b600082612fe757612fe7612e26565b600160ff1b82146000198414161561300157613001612df1565b500590565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261303860808301846129e2565b9695505050505050565b60006020828403121561305457600080fd5b81516115d48161291f565b7f68747470733a2f2f6d6574612e626f776c696e652e6170702f000000000000008152600082516130978160198501602087016129b6565b7f2f000000000000000000000000000000000000000000000000000000000000006019939091019283015250601a01919050565b634e487b7160e01b600052603260045260246000fd5b6000816130f0576130f0612df1565b506000190190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c2b6bfa8bb0ebf6bb2c81033d8b1f5f1d6a1db83bcd08d081b741c16e9bacf5c64736f6c634300080a003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c416c706861666f756e64657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005414c504841000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102855760003560e01c80636352211e11610153578063b88d4fde116100cb578063d0f55c231161007f578063e949580e11610064578063e949580e146106ea578063e985e9c514610725578063f2fde38b1461076e57600080fd5b8063d0f55c23146106b4578063d2039bf3146106ca57600080fd5b8063c87b56dd116100b0578063c87b56dd14610669578063c9e4823314610689578063cfc86f7b1461069f57600080fd5b8063b88d4fde14610629578063c4590d3f1461064957600080fd5b8063715018a6116101225780638da5cb5b116101075780638da5cb5b146105d657806395d89b41146105f4578063a22cb4651461060957600080fd5b8063715018a6146105a757806379de186a146105bc57600080fd5b80636352211e146105325780636817c76c1461055257806370a08231146105675780637103ad031461058757600080fd5b806323b872dd1161020157806340c10f19116101b55780634ee7b7f51161019a5780634ee7b7f5146104d257806355f804b3146104f25780635b2ba2ac1461051257600080fd5b806340c10f191461049f57806342842e0e146104b257600080fd5b806331c515b8116101e657806331c515b81461044a5780633ccfd60b1461046a5780633fa7e1a11461047f57600080fd5b806323b872dd146103eb5780632a55205a1461040b57600080fd5b8063081812fc116102585780630967b1911161023d5780630967b1911461037f5780630f4161aa146103af57806318160ddd146103ce57600080fd5b8063081812fc14610327578063095ea7b31461035f57600080fd5b806301ffc9a71461028a578063031bd4c4146102bf57806304634d8d146102e357806306fdde0314610305575b600080fd5b34801561029657600080fd5b506102aa6102a5366004612935565b61078e565b60405190151581526020015b60405180910390f35b3480156102cb57600080fd5b506102d5600e5481565b6040519081526020016102b6565b3480156102ef57600080fd5b506103036102fe36600461296e565b6107ae565b005b34801561031157600080fd5b5061031a61081b565b6040516102b69190612a0e565b34801561033357600080fd5b50610347610342366004612a21565b6108ad565b6040516001600160a01b0390911681526020016102b6565b34801561036b57600080fd5b5061030361037a366004612a3a565b61090a565b34801561038b57600080fd5b506102aa61039a366004612a21565b60106020526000908152604090205460ff1681565b3480156103bb57600080fd5b506012546102aa90610100900460ff1681565b3480156103da57600080fd5b5060025460015403600019016102d5565b3480156103f757600080fd5b50610303610406366004612a64565b6109d0565b34801561041757600080fd5b5061042b610426366004612aa0565b610bc7565b604080516001600160a01b0390931683526020830191909152016102b6565b34801561045657600080fd5b50610303610465366004612ad2565b610c84565b34801561047657600080fd5b50610303610d02565b34801561048b57600080fd5b5061030361049a366004612a21565b610d82565b6103036104ad366004612a3a565b610de1565b3480156104be57600080fd5b506103036104cd366004612a64565b610f87565b3480156104de57600080fd5b506103036104ed366004612bb1565b610fa7565b3480156104fe57600080fd5b5061030361050d366004612c4c565b61115a565b34801561051e57600080fd5b50600054610347906001600160a01b031681565b34801561053e57600080fd5b5061034761054d366004612a21565b6111c7565b34801561055e57600080fd5b506102d56111d2565b34801561057357600080fd5b506102d5610582366004612c95565b6111e4565b34801561059357600080fd5b506103036105a2366004612cb0565b61124c565b3480156105b357600080fd5b506103036112c6565b3480156105c857600080fd5b506012546102aa9060ff1681565b3480156105e257600080fd5b50600b546001600160a01b0316610347565b34801561060057600080fd5b5061031a61132a565b34801561061557600080fd5b50610303610624366004612cd3565b611339565b34801561063557600080fd5b50610303610644366004612cef565b6113e8565b34801561065557600080fd5b50610303610664366004612aa0565b611432565b34801561067557600080fd5b5061031a610684366004612a21565b61153d565b34801561069557600080fd5b506102d5600f5481565b3480156106ab57600080fd5b5061031a6115db565b3480156106c057600080fd5b506102d560135481565b3480156106d657600080fd5b506103036106e5366004612c95565b611669565b3480156106f657600080fd5b506102aa610705366004612d57565b805160208183018101805160118252928201919093012091525460ff1681565b34801561073157600080fd5b506102aa610740366004612d8c565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b34801561077a57600080fd5b50610303610789366004612c95565b6116f2565b6000610799826117d4565b806107a857506107a882611854565b92915050565b600b546001600160a01b0316331461080d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61081782826118a2565b5050565b60606003805461082a90612db6565b80601f016020809104026020016040519081016040528092919081815260200182805461085690612db6565b80156108a35780601f10610878576101008083540402835291602001916108a3565b820191906000526020600020905b81548152906001019060200180831161088657829003601f168201915b5050505050905090565b60006108b8826119bc565b6108ee576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610915826111c7565b9050336001600160a01b03821614610967576109318133610740565b610967576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006109db826119f1565b9050836001600160a01b0316816001600160a01b031614610a28576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b03881690911417610a8e57610a588633610740565b610a8e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610ace576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610adb8686866001611a73565b8015610ae657600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b8316610b715760018401600081815260056020526040902054610b6f576001548114610b6f5760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610bbf8686866001611bc0565b505050505050565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff16928201929092528291610c465750604080518082019091526009546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c6a906bffffffffffffffffffffffff1687612e07565b610c749190612e3c565b91519350909150505b9250929050565b600b546001600160a01b03163314610cde5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b6012805461ffff191692151561ff0019169290921761010091151591909102179055565b600b546001600160a01b03163314610d5c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b60405133904780156108fc02916000818181858888f19350505050610d8057600080fd5b565b600b546001600160a01b03163314610ddc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b601355565b60125460ff610100909104161515600114610e645760405162461bcd60e51b815260206004820152602b60248201527f416c706861666f756e6465723a205075626c6963204d696e74696e672069732060448201527f6e6f7420456e61626c65640000000000000000000000000000000000000000006064820152608401610804565b60c881610e6f6111d2565b610e799190612e07565b610e849060c7612e07565b610e8e9190612e3c565b341015610f035760405162461bcd60e51b815260206004820152602160248201527f416c706861666f756e6465723a20496e73756666696369656e7420416d6f756e60448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610804565b600154600e541015610f7d5760405162461bcd60e51b815260206004820152602160248201527f416c706861666f756e6465723a20546f6b656e204c696d69742072656163686560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610804565b6108178282611c21565b610fa2838383604051806020016040528060008152506113e8565b505050565b60125460ff1615156001146110245760405162461bcd60e51b815260206004820152602e60248201527f416c706861666f756e6465723a20416c6c6f776c697374204d696e74696e672060448201527f6973206e6f7420456e61626c65640000000000000000000000000000000000006064820152608401610804565b600154600e5410156110785760405162461bcd60e51b815260206004820152601f60248201527f416c706861666f756e6465723a20416c6c20546f6b656e73206d696e746564006044820152606401610804565b6011816040516110889190612e50565b9081526040519081900360200190205460ff161561110d5760405162461bcd60e51b8152602060048201526024808201527f416c706861666f756e6465723a205369676e617475726520616c72656164792060448201527f75736564000000000000000000000000000000000000000000000000000000006064820152608401610804565b6111178282611d60565b81516111239084611c21565b60016011826040516111359190612e50565b908152604051908190036020019020805491151560ff19909216919091179055505050565b600b546001600160a01b031633146111b45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b8051610817906014906020840190612886565b60006107a8826119f1565b60006111df601354611e0c565b905090565b60006001600160a01b038216611226576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b600b546001600160a01b031633146112a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b600091825260106020526040909120805460ff1916911515919091179055565b600b546001600160a01b031633146113205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b610d806000611f43565b60606004805461082a90612db6565b6001600160a01b03821633141561137c576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6113f38484846109d0565b6001600160a01b0383163b1561142c5761140f84848484611fa2565b61142c576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600b546001600160a01b0316331461148c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b60025460015403600019018210156115325760405162461bcd60e51b815260206004820152604660248201527f416c706861666f756e6465723a204e657720546f6b656e204c696d697420697360448201527f20736d616c6c6572207468616e20616c726561647920617661696c61626c652060648201527f746f6b656e730000000000000000000000000000000000000000000000000000608482015260a401610804565b600e91909155600f55565b6060611548826119bc565b61157e576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061158861208a565b90508051600014156115a957604051806020016040528060008152506115d4565b806115b3846120df565b6040516020016115c4929190612e6c565b6040516020818303038152906040525b9392505050565b601480546115e890612db6565b80601f016020809104026020016040519081016040528092919081815260200182805461161490612db6565b80156116615780601f1061163657610100808354040283529160200191611661565b820191906000526020600020905b81548152906001019060200180831161164457829003601f168201915b505050505081565b600b546001600160a01b031633146116c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600b546001600160a01b0316331461174c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610804565b6001600160a01b0381166117c85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610804565b6117d181611f43565b50565b60006301ffc9a760e01b6001600160e01b03198316148061181e57507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806107a85750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60006001600160e01b031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806107a857506301ffc9a760e01b6001600160e01b03198316146107a8565b6127106bffffffffffffffffffffffff821611156119285760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610804565b6001600160a01b03821661197e5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610804565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600955565b6000816001111580156119d0575060015482105b80156107a8575050600090815260056020526040902054600160e01b161590565b60008180600111611a4157600154811015611a4157600081815260056020526040902054600160e01b8116611a3f575b806115d4575060001901600081815260056020526040902054611a21565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841615611b355760005b81811015611b335760106000611a9b8386612e9b565b815260208101919091526040016000205460ff16611b215760405162461bcd60e51b815260206004820152603560248201527f416c706861666f756e6465723a205472616e736665722068617320746f20626560448201527f207065726d697474656420627920636f756e63696c00000000000000000000006064820152608401610804565b80611b2b81612eb3565b915050611a85565b505b600f5481611b42856111e4565b611b4c9190612e9b565b111561142c5760405162461bcd60e51b815260206004820152602860248201527f416c706861666f756e6465723a204d6178204d656d626572736869707320706560448201527f722057616c6c65740000000000000000000000000000000000000000000000006064820152608401610804565b6001600160a01b0384161561142c5760005b81811015611c1a576000601081611be98487612e9b565b81526020810191909152604001600020805460ff191691151591909117905580611c1281612eb3565b915050611bd2565b5050505050565b60015481611c5b576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c686000848385611a73565b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611d1757808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611cdf565b5081611d4f576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015550610fa26000848385611bc0565b6000611d6b83612121565b90506000611d7882612194565b90506000611d8682856121fd565b6000549091506001600160a01b03808316911614611c1a5760405162461bcd60e51b815260206004820152603860248201527f4d696e747061737356616c696461746f723a204d696e7470617373207369676e60448201527f617475726520766572696669636174696f6e206572726f7200000000000000006064820152608401610804565b600080600c60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e869190612ee8565b5050509150506000600d60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611ee1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f059190612ee8565b505050915050818185611f189190612f38565b611f229190612fd8565b611f3090633b9aca00612f38565b611f3b906001612f38565b949350505050565b600b80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611fd7903390899088908890600401613006565b6020604051808303816000875af1925050508015612012575060408051601f3d908101601f1916820190925261200f91810190613042565b60015b61206d573d808015612040576040519150601f19603f3d011682016040523d82523d6000602084013e612045565b606091505b508051612065576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060006014805461209b90612db6565b905011156120b0576014805461082a90612db6565b6120bb306014612221565b6040516020016120cb919061305f565b604051602081830303815290604052905090565b604080516080019081905280825b600183039250600a81066030018353600a90048061210a5761210f565b6120ed565b50819003601f19909101908152919050565b8051602080830151604051600093612177937f981d5b43c373d93722e3bc49845c5e666a67bf8faef06370b7808b92ec8087fa939192019283526001600160a01b03919091166020830152604082015260600190565b604051602081830303815290604052805190602001209050919050565b60006107a86121a1612402565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061220c8585612529565b9150915061221981612596565b509392505050565b60606000612230836002612e07565b61223b906002612e9b565b67ffffffffffffffff81111561225357612253612b05565b6040519080825280601f01601f19166020018201604052801561227d576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106122b4576122b46130cb565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106122ff576122ff6130cb565b60200101906001600160f81b031916908160001a9053506000612323846002612e07565b61232e906001612e9b565b90505b60018111156123b3577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061236f5761236f6130cb565b1a60f81b828281518110612385576123856130cb565b60200101906001600160f81b031916908160001a90535060049490941c936123ac816130e1565b9050612331565b5083156115d45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610804565b6000306001600160a01b037f00000000000000000000000055755bfa2b380ebbb6348da425a35c77baa0dfd81614801561245b57507f000000000000000000000000000000000000000000000000000000000000000146145b1561248557507ff951c73efe6f8bb1624be01bb8f71f0592e09577d9bbc83bc6ce1c366241c6fe90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f1fa062b8d1c6e38feed05dd84e149ea6a0cf3612dd72531d43a5c202bea52797828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000808251604114156125605760208301516040840151606085015160001a61255487828585612751565b94509450505050610c7d565b82516040141561258a576020830151604084015161257f86838361283e565b935093505050610c7d565b50600090506002610c7d565b60008160048111156125aa576125aa6130f8565b14156125b35750565b60018160048111156125c7576125c76130f8565b14156126155760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610804565b6002816004811115612629576126296130f8565b14156126775760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610804565b600381600481111561268b5761268b6130f8565b14156126e45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610804565b60048160048111156126f8576126f86130f8565b14156117d15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610804565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156127885750600090506003612835565b8460ff16601b141580156127a057508460ff16601c14155b156127b15750600090506004612835565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612805573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661282e57600060019250925050612835565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161287887828885612751565b935093505050935093915050565b82805461289290612db6565b90600052602060002090601f0160209004810192826128b457600085556128fa565b82601f106128cd57805160ff19168380011785556128fa565b828001600101855582156128fa579182015b828111156128fa5782518255916020019190600101906128df565b5061290692915061290a565b5090565b5b80821115612906576000815560010161290b565b6001600160e01b0319811681146117d157600080fd5b60006020828403121561294757600080fd5b81356115d48161291f565b80356001600160a01b038116811461296957600080fd5b919050565b6000806040838503121561298157600080fd5b61298a83612952565b915060208301356bffffffffffffffffffffffff811681146129ab57600080fd5b809150509250929050565b60005b838110156129d15781810151838201526020016129b9565b8381111561142c5750506000910152565b600081518084526129fa8160208601602086016129b6565b601f01601f19169290920160200192915050565b6020815260006115d460208301846129e2565b600060208284031215612a3357600080fd5b5035919050565b60008060408385031215612a4d57600080fd5b612a5683612952565b946020939093013593505050565b600080600060608486031215612a7957600080fd5b612a8284612952565b9250612a9060208501612952565b9150604084013590509250925092565b60008060408385031215612ab357600080fd5b50508035926020909101359150565b8035801515811461296957600080fd5b60008060408385031215612ae557600080fd5b612aee83612ac2565b9150612afc60208401612ac2565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612b3657612b36612b05565b604051601f8501601f19908116603f01168101908282118183101715612b5e57612b5e612b05565b81604052809350858152868686011115612b7757600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612ba257600080fd5b6115d483833560208501612b1b565b60008060008385036080811215612bc757600080fd5b843593506040601f1982011215612bdd57600080fd5b506040516040810167ffffffffffffffff8282108183111715612c0257612c02612b05565b81604052612c1260208801612952565b83526040870135602084015291935060608601359180831115612c3457600080fd5b5050612c4286828701612b91565b9150509250925092565b600060208284031215612c5e57600080fd5b813567ffffffffffffffff811115612c7557600080fd5b8201601f81018413612c8657600080fd5b611f3b84823560208401612b1b565b600060208284031215612ca757600080fd5b6115d482612952565b60008060408385031215612cc357600080fd5b82359150612afc60208401612ac2565b60008060408385031215612ce657600080fd5b612aee83612952565b60008060008060808587031215612d0557600080fd5b612d0e85612952565b9350612d1c60208601612952565b925060408501359150606085013567ffffffffffffffff811115612d3f57600080fd5b612d4b87828801612b91565b91505092959194509250565b600060208284031215612d6957600080fd5b813567ffffffffffffffff811115612d8057600080fd5b611f3b84828501612b91565b60008060408385031215612d9f57600080fd5b612da883612952565b9150612afc60208401612952565b600181811c90821680612dca57607f821691505b60208210811415612deb57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612e2157612e21612df1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612e4b57612e4b612e26565b500490565b60008251612e628184602087016129b6565b9190910192915050565b60008351612e7e8184602088016129b6565b835190830190612e928183602088016129b6565b01949350505050565b60008219821115612eae57612eae612df1565b500190565b6000600019821415612ec757612ec7612df1565b5060010190565b805169ffffffffffffffffffff8116811461296957600080fd5b600080600080600060a08688031215612f0057600080fd5b612f0986612ece565b9450602086015193506040860151925060608601519150612f2c60808701612ece565b90509295509295909350565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615612f7957612f79612df1565b600160ff1b6000871286820588128184161615612f9857612f98612df1565b60008712925087820587128484161615612fb457612fb4612df1565b87850587128184161615612fca57612fca612df1565b505050929093029392505050565b600082612fe757612fe7612e26565b600160ff1b82146000198414161561300157613001612df1565b500590565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261303860808301846129e2565b9695505050505050565b60006020828403121561305457600080fd5b81516115d48161291f565b7f68747470733a2f2f6d6574612e626f776c696e652e6170702f000000000000008152600082516130978160198501602087016129b6565b7f2f000000000000000000000000000000000000000000000000000000000000006019939091019283015250601a01919050565b634e487b7160e01b600052603260045260246000fd5b6000816130f0576130f0612df1565b506000190190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c2b6bfa8bb0ebf6bb2c81033d8b1f5f1d6a1db83bcd08d081b741c16e9bacf5c64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c416c706861666f756e64657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005414c504841000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): Alphafounder
Arg [1] : symbol (string): ALPHA
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [3] : 416c706861666f756e6465720000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 414c504841000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
OVERVIEW
Alphafounders is a token gated community for web3 builders - not for grifters.Our mission: To foster a collaborative, inclusive, and innovative community of the best web3 builders who are dedicated to advancing the decentralized web and empowering individuals and organizatio...Net Worth in USD
$0.18
Net Worth in ETH
0.000087
Token Allocations
POL
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| POL | 100.00% | $0.096338 | 1.899 | $0.182951 |
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.