ERC-721
Overview
Max Total Supply
5,000 Genesis
Holders
5,000
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 GenesisLoading...
Loading
Loading...
Loading
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
AviveNFTMinter
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import './AviveGenesisNFT.sol';
contract AviveNFTMinter is AviveGenesisNFT, ReentrancyGuard {
struct MintRound {
uint32 id;
uint64 startTime;
uint64 endTime;
uint64 fee;
uint64 total;
uint64 mintedCount;
uint256 startId;
uint256 reserve;
}
struct RewardRoud {
uint32 id;
uint64 startTime;
uint64 endTime;
uint64 winnerCount;
uint64 claimedCount;
uint256 prizePool;
}
address public verifier;
// used to generate random number
uint256 private recentMintTime;
uint32 public latestRoundId;
// roundRecords for each round, key is mintRoundId
mapping(uint32 => MintRound) public mintRounds;
mapping(uint32 => RewardRoud) public rewardRounds;
// mintHistory for each wallet, key is mintRoundId, then wallet address
mapping(uint32 => mapping(address => bool)) public mintWalletHistory;
// mintHistory for each wallet, key is mintRoundId, then aviveId
mapping(uint32 => mapping(uint256 => bool)) public mintAviveHistory;
// claimHistory for each winner, key is mintRoundId, then nft address
mapping(uint32 => mapping(uint256 => bool)) public claimHistory;
// winnerMap for each winner, key is mintRoundId, then nft address
mapping(uint32 => mapping(uint256 => bool)) public winnerMap;
// events
// setup mint round
event LogMintRoundSetup(
uint32 indexed roundId,
uint64 startTime,
uint64 endTime,
uint64 fee,
uint64 total,
uint256 startId
);
// setup reward round
event LogRewardRoundSetup(
uint32 indexed roundId,
uint64 startTime,
uint64 endTime,
uint32 winnerCount,
uint256 prizePool
);
// generate winnerNFT list
event LogWinnerGenerated(uint32 indexed roundId, uint256[] winnerList);
// user mint genesis nft
event LogGenesisMinted(
address indexed to,
uint256 indexed tokenId,
uint256 indexed aviveId
);
// genesis complete
event LogGenesisMintCompleted(uint32 indexed roundId);
// winner claim prize
event LogClaimed(
address indexed to,
uint32 indexed roundId,
uint256 indexed nftId,
uint256 prizeValue
);
// claim complete
event LogClaimCompleted(uint32 indexed roundId);
event LogVerifierChanged(address indexed verifier, address oldVerifier);
modifier isNFTOwner(uint nftID) {
require(ERC721.ownerOf(nftID) == msg.sender, 'not owner');
_;
}
constructor(
address verifier_,
string memory baseuri_
) AviveGenesisNFT(baseuri_) {
verifier = verifier_;
}
function setVerifier(address verifier_) external onlyOwner {
address oldVerifier = verifier;
verifier = verifier_;
emit LogVerifierChanged(verifier_, oldVerifier);
}
function verifySignature(
uint32 roundId,
uint256 aviveId,
bytes memory signature
) public view returns (bool) {
bytes32 message = ECDSA.toEthSignedMessageHash(
keccak256(abi.encodePacked(roundId, aviveId, verifier))
);
require(
ECDSA.recover(message, signature) == verifier,
'!INVALID_SIGNATURE!'
);
return true;
}
function isMintRoundEnded(uint32 roundId) public view returns (bool) {
require(roundId <= latestRoundId, 'roundId not setup');
return
mintRounds[roundId].endTime < block.timestamp ||
mintRounds[roundId].mintedCount >= mintRounds[roundId].total;
}
function isRewardRoundEnded(uint32 roundId) public view returns (bool) {
require(roundId <= latestRoundId, 'roundId not setup');
return
rewardRounds[roundId].endTime < block.timestamp ||
rewardRounds[roundId].claimedCount >=
rewardRounds[roundId].winnerCount;
}
function setupMintRound(
uint32 roundId,
uint64 startTime,
uint64 endTime,
uint64 fee,
uint64 total,
uint256 startId
) external onlyOwner {
if (latestRoundId != 0) {
// latest mint round must be ended
require(
isMintRoundEnded(latestRoundId) == true,
'last mint round not ended'
);
// latest reward round must be setup
require(
rewardRounds[latestRoundId].id != 0,
'last reward round not setup'
);
// latest reward round must be ended
require(
isRewardRoundEnded(latestRoundId) == true,
'last reward round not ended'
);
}
require(roundId == latestRoundId + 1, 'roundId not match');
require(startTime > block.timestamp, 'already started');
require(endTime > startTime, 'time invalid');
MintRound storage mintRound = mintRounds[roundId];
mintRound.id = roundId;
mintRound.startTime = startTime;
mintRound.endTime = endTime;
mintRound.fee = fee;
mintRound.total = total;
mintRound.startId = startId;
latestRoundId = roundId;
emit LogMintRoundSetup(
roundId,
startTime,
endTime,
fee,
total,
startId
);
}
function setupRewardRound(
uint32 roundId,
uint64 startTime,
uint64 endTime,
uint32 winnerCount,
uint256 prizePool
) external onlyOwner {
// require msg.sender is EOA, not smart contract. no robot, more fair
require(msg.sender == tx.origin, 'only EOA');
// roundId and latestRoundId must be matched
require(roundId == latestRoundId, 'roundId not match');
MintRound memory mintRound = mintRounds[roundId];
// mintRound must be ended
require(isMintRoundEnded(latestRoundId) == true, 'mintRound not ended');
require(startTime > block.timestamp, 'already started');
require(endTime > startTime, 'time invalid');
// winnerCount must be less than mintCount
require(
winnerCount > 0 && winnerCount <= mintRound.mintedCount,
'winnerCount invalid'
);
// prizePool must be less than reserve
require(prizePool <= mintRound.reserve, 'prizePool invalid');
RewardRoud storage rewardRound = rewardRounds[roundId];
require(rewardRound.id == 0, 'round already setup');
rewardRound.id = roundId;
rewardRound.startTime = startTime;
rewardRound.endTime = endTime;
rewardRound.winnerCount = winnerCount;
rewardRound.prizePool = prizePool;
emit LogRewardRoundSetup(
roundId,
startTime,
endTime,
winnerCount,
prizePool
);
// seed is secure because _shuffle is called by owner.
// and can't be called by smart contract
bytes32 seed = keccak256(
abi.encodePacked(blockhash(block.number - 1), recentMintTime)
);
uint256[] memory winnerList = shuffle(
mintRound.mintedCount,
rewardRound.winnerCount,
mintRound.startId,
seed
);
emit LogWinnerGenerated(roundId, winnerList);
for (uint256 i = 0; i < winnerList.length; i++) {
winnerMap[roundId][winnerList[i]] = true;
}
}
function shuffle(
uint64 mintCount,
uint64 winnerCount,
uint256 startId,
bytes32 seed
) public pure returns (uint256[] memory) {
uint256[] memory nftList = new uint256[](mintCount);
uint256[] memory shuffled = new uint256[](winnerCount);
for (uint256 i = 0; i < winnerCount; i++) {
uint256 j = uint256(keccak256(abi.encodePacked(seed, i))) %
(mintCount - i);
uint256 target = nftList[i + j];
uint256 current = nftList[i];
shuffled[i] = target != 0 ? target : startId + i + j;
nftList[i + j] = current != 0 ? current : startId + i;
}
return shuffled;
}
function genesisMint(
uint32 roundId,
uint256 aviveId,
bytes memory signature
) external payable nonReentrant {
// roundId and latestRoundId must be matched
require(roundId == latestRoundId, 'roundId not match');
verifySignature(roundId, aviveId, signature);
MintRound storage mintRound = mintRounds[roundId];
require(block.timestamp > mintRound.startTime, 'mint not started');
require(block.timestamp <= mintRound.endTime, 'mint ended');
require(msg.value >= mintRound.fee, 'not enough fee');
require(
mintWalletHistory[roundId][_msgSender()] == false &&
mintAviveHistory[roundId][aviveId] == false,
'already minted'
);
require(
mintRound.mintedCount < mintRound.total,
'reach max mint count'
);
uint256 nftId = mintRound.startId + mintRound.mintedCount;
_safeMint(_msgSender(), nftId);
mintRound.reserve += mintRound.fee;
mintRound.mintedCount += 1; // current round count
mintWalletHistory[roundId][_msgSender()] = true;
mintAviveHistory[roundId][aviveId] = true;
recentMintTime = block.timestamp;
emit LogGenesisMinted(msg.sender, nftId, aviveId);
if (mintRound.mintedCount == mintRound.total) {
emit LogGenesisMintCompleted(roundId);
}
}
function claim(
uint32 roundId,
uint256 nftId
) external nonReentrant isNFTOwner(nftId) {
RewardRoud storage rewardRound = rewardRounds[roundId];
require(block.timestamp > rewardRound.startTime, 'reward not started');
require(block.timestamp <= rewardRound.endTime, 'reward ended');
require(winnerMap[roundId][nftId] == true, 'not winner');
require(claimHistory[roundId][nftId] == false, 'already claimed');
uint prizeValue = rewardRound.prizePool / rewardRound.winnerCount;
claimHistory[roundId][nftId] = true;
rewardRound.claimedCount += 1;
payable(msg.sender).transfer(prizeValue);
emit LogClaimed(msg.sender, roundId, nftId, prizeValue);
if (rewardRound.claimedCount == rewardRound.winnerCount) {
emit LogClaimCompleted(roundId);
}
}
function withdraw(uint256 amount) external onlyOwner {
// mint round must be ended
require(
isMintRoundEnded(latestRoundId) == true,
'last mint round not ended'
);
// latest reward round must be ended
require(
isRewardRoundEnded(latestRoundId) == true,
'last reward round not ended'
);
uint256 balance = address(this).balance;
require(balance >= amount, 'not enough balance');
payable(msg.sender).transfer(amount);
}
function withdrawToken(
address token,
uint256 amount
) external nonReentrant onlyOwner {
uint256 balance = IERC20(token).balanceOf(address(this));
require(balance >= amount, 'not enough balance');
IERC20(token).transfer(msg.sender, amount);
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: address zero is not a valid owner");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _ownerOf(tokenId);
require(owner != address(0), "ERC721: invalid token ID");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
_requireMinted(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not token owner or approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
_requireMinted(tokenId);
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
_safeTransfer(from, to, tokenId, data);
}
/**
* @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.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
*/
function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
return _owners[tokenId];
}
/**
* @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 (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _ownerOf(tokenId) != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId, 1);
// Check that tokenId was not minted by `_beforeTokenTransfer` hook
require(!_exists(tokenId), "ERC721: token already minted");
unchecked {
// Will not overflow unless all 2**256 token ids are minted to the same owner.
// Given that tokens are minted one by one, it is impossible in practice that
// this ever happens. Might change if we allow batch minting.
// The ERC fails to describe this case.
_balances[to] += 1;
}
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId, 1);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
* This is an internal function that does not check if the sender is authorized to operate on the token.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId, 1);
// Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
owner = ERC721.ownerOf(tokenId);
// Clear approvals
delete _tokenApprovals[tokenId];
unchecked {
// Cannot overflow, as that would require more tokens to be burned/transferred
// out than the owner initially received through minting and transferring in.
_balances[owner] -= 1;
}
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId, 1);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId, 1);
// Check that tokenId was not transferred by `_beforeTokenTransfer` hook
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
// Clear approvals from the previous owner
delete _tokenApprovals[tokenId];
unchecked {
// `_balances[from]` cannot overflow for the same reason as described in `_burn`:
// `from`'s balance is the number of token held, which is at least one before the current
// transfer.
// `_balances[to]` could overflow in the conditions described in `_mint`. That would require
// all 2**256 token ids to be minted, which in practice is impossible.
_balances[from] -= 1;
_balances[to] += 1;
}
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId, 1);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` has not been minted yet.
*/
function _requireMinted(uint256 tokenId) internal view virtual {
require(_exists(tokenId), "ERC721: invalid token ID");
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
* used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
* - When `from` is zero, the tokens will be minted for `to`.
* - When `to` is zero, ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
* - `batchSize` is non-zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
/**
* @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
* used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
* - When `from` is zero, the tokens were minted for `to`.
* - When `to` is zero, ``from``'s tokens were burned.
* - `from` and `to` are never both zero.
* - `batchSize` is non-zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
/**
* @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
*
* WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
* being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
* that `ownerOf(tokenId)` is `a`.
*/
// solhint-disable-next-line func-name-mixedcase
function __unsafe_increaseBalance(address account, uint256 amount) internal {
_balances[account] += amount;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol)
pragma solidity ^0.8.0;
import "../ERC721.sol";
import "../../../utils/Context.sol";
/**
* @title ERC721 Burnable Token
* @dev ERC721 Token that can be burned (destroyed).
*/
abstract contract ERC721Burnable is Context, ERC721 {
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
function burn(uint256 tokenId) public virtual {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
_burn(tokenId);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 // Deprecated in v4.8
}
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");
}
}
/**
* @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) {
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.
/// @solidity memory-safe-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 {
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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 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 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 message) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32")
mstore(0x1c, hash)
message := keccak256(0x00, 0x3c)
}
}
/**
* @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 data) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, "\x19\x01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
data := keccak256(ptr, 0x42)
}
}
/**
* @dev Returns an Ethereum Signed Data with intended validator, created from a
* `validator` and `data` according to the version 0 of EIP-191.
*
* See {recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x00", validator, data));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
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] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
abstract contract AviveGenesisNFT is ERC721, ERC721Burnable, Ownable {
using Strings for uint256;
string private _baseuri;
uint256 public totalSupply = 0;
bool public TradingOpen = false;
constructor(string memory baseuri_) ERC721('Avive Genesis NFT', 'Genesis') {
_baseuri = baseuri_;
}
function setTradingOpen(bool open) external onlyOwner {
TradingOpen = open;
}
function setBaseURI(string memory uri) external onlyOwner {
require(bytes(uri).length > 0, 'wrong base uri');
_baseuri = uri;
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
_requireMinted(tokenId);
return string(abi.encodePacked(_baseuri, tokenId.toString(), '/'));
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId,
uint256 batchSize
) internal override(ERC721) {
super._beforeTokenTransfer(from, to, tokenId, batchSize);
if (from == address(0)) {
totalSupply += batchSize;
} else if (to != address(0)) {
require(TradingOpen, 'trading not open');
}
if (to == address(0)) {
totalSupply -= batchSize;
}
}
function supportsInterface(
bytes4 interfaceId
) public view override(ERC721) returns (bool) {
return super.supportsInterface(interfaceId);
}
}{
"optimizer": {
"enabled": true,
"runs": 800
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"verifier_","type":"address"},{"internalType":"string","name":"baseuri_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint32","name":"roundId","type":"uint32"}],"name":"LogClaimCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint32","name":"roundId","type":"uint32"},{"indexed":true,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"prizeValue","type":"uint256"}],"name":"LogClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"roundId","type":"uint32"}],"name":"LogGenesisMintCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"aviveId","type":"uint256"}],"name":"LogGenesisMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"roundId","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"startTime","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"endTime","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"fee","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"total","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"startId","type":"uint256"}],"name":"LogMintRoundSetup","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"roundId","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"startTime","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"endTime","type":"uint64"},{"indexed":false,"internalType":"uint32","name":"winnerCount","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"prizePool","type":"uint256"}],"name":"LogRewardRoundSetup","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"verifier","type":"address"},{"indexed":false,"internalType":"address","name":"oldVerifier","type":"address"}],"name":"LogVerifierChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"roundId","type":"uint32"},{"indexed":false,"internalType":"uint256[]","name":"winnerList","type":"uint256[]"}],"name":"LogWinnerGenerated","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":"TradingOpen","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":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"roundId","type":"uint32"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimHistory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"roundId","type":"uint32"},{"internalType":"uint256","name":"aviveId","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"genesisMint","outputs":[],"stateMutability":"payable","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":"uint32","name":"roundId","type":"uint32"}],"name":"isMintRoundEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"roundId","type":"uint32"}],"name":"isRewardRoundEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintAviveHistory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"mintRounds","outputs":[{"internalType":"uint32","name":"id","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint64","name":"fee","type":"uint64"},{"internalType":"uint64","name":"total","type":"uint64"},{"internalType":"uint64","name":"mintedCount","type":"uint64"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"reserve","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"address","name":"","type":"address"}],"name":"mintWalletHistory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"rewardRounds","outputs":[{"internalType":"uint32","name":"id","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint64","name":"winnerCount","type":"uint64"},{"internalType":"uint64","name":"claimedCount","type":"uint64"},{"internalType":"uint256","name":"prizePool","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":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"open","type":"bool"}],"name":"setTradingOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"verifier_","type":"address"}],"name":"setVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"roundId","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint64","name":"fee","type":"uint64"},{"internalType":"uint64","name":"total","type":"uint64"},{"internalType":"uint256","name":"startId","type":"uint256"}],"name":"setupMintRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"roundId","type":"uint32"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint32","name":"winnerCount","type":"uint32"},{"internalType":"uint256","name":"prizePool","type":"uint256"}],"name":"setupRewardRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"mintCount","type":"uint64"},{"internalType":"uint64","name":"winnerCount","type":"uint64"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"bytes32","name":"seed","type":"bytes32"}],"name":"shuffle","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"pure","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":[],"name":"verifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"roundId","type":"uint32"},{"internalType":"uint256","name":"aviveId","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verifySignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"winnerMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
608060405260006008556009805460ff191690553480156200002057600080fd5b506040516200437738038062004377833981016040819052620000439162000173565b8060405180604001604052806011815260200170105d9a5d994811d95b995cda5cc8139195607a1b8152506040518060400160405280600781526020016647656e6573697360c81b81525081600090816200009f9190620002f8565b506001620000ae8282620002f8565b505050620000cb620000c56200010760201b60201c565b6200010b565b6007620000d98282620002f8565b50506001600a5550600b80546001600160a01b0319166001600160a01b0392909216919091179055620003c4565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156200018757600080fd5b82516001600160a01b03811681146200019f57600080fd5b602084810151919350906001600160401b0380821115620001bf57600080fd5b818601915086601f830112620001d457600080fd5b815181811115620001e957620001e96200015d565b604051601f8201601f19908116603f011681019083821181831017156200021457620002146200015d565b8160405282815289868487010111156200022d57600080fd5b600093505b8284101562000251578484018601518185018701529285019262000232565b60008684830101528096505050505050509250929050565b600181811c908216806200027e57607f821691505b6020821081036200029f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002f357600081815260208120601f850160051c81016020861015620002ce5750805b601f850160051c820191505b81811015620002ef57828155600101620002da565b5050505b505050565b81516001600160401b038111156200031457620003146200015d565b6200032c8162000325845462000269565b84620002a5565b602080601f8311600181146200036457600084156200034b5750858301515b600019600386901b1c1916600185901b178555620002ef565b600085815260208120601f198616915b82811015620003955788860151825594840194600190910190840162000374565b5085821015620003b45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b613fa380620003d46000396000f3fe6080604052600436106102bf5760003560e01c80636e52396d1161016e578063c5c2e217116100cb578063e985e9c51161007f578063f2fde38b11610064578063f2fde38b1461097e578063f76505a21461099e578063f8e87506146109b157600080fd5b8063e985e9c514610915578063ea8dc2fd1461095e57600080fd5b8063d008f5dd116100b0578063d008f5dd146107e5578063dd12526214610820578063e6b82ab31461084057600080fd5b8063c5c2e217146107a5578063c87b56dd146107c557600080fd5b80639e281a9811610122578063b88d4fde11610107578063b88d4fde1461072a578063bf3672c21461074a578063c51743dc1461076a57600080fd5b80639e281a98146106ea578063a22cb4651461070a57600080fd5b8063715018a611610153578063715018a6146106a25780638da5cb5b146106b757806395d89b41146106d557600080fd5b80636e52396d146105cf57806370a082311461068257600080fd5b806323b872dd1161021c5780635437988d116101d0578063615781c7116101b5578063615781c7146105475780636352211e14610582578063644bf58f146105a257600080fd5b80635437988d1461050757806355f804b31461052757600080fd5b80632e1a7d4d116102015780632e1a7d4d146104a757806342842e0e146104c757806342966c68146104e757600080fd5b806323b872dd146104675780632b7ac3f31461048757600080fd5b806311a8f413116102735780631d02c651116102585780631d02c651146103ec5780631e8507161461042757806321c03a971461044757600080fd5b806311a8f4131461039657806318160ddd146103c857600080fd5b8063081812fc116102a4578063081812fc1461032257806308fd3d051461035a578063095ea7b31461037457600080fd5b806301ffc9a7146102cb57806306fdde031461030057600080fd5b366102c657005b600080fd5b3480156102d757600080fd5b506102eb6102e63660046136b2565b6109d1565b60405190151581526020015b60405180910390f35b34801561030c57600080fd5b506103156109e2565b6040516102f79190613726565b34801561032e57600080fd5b5061034261033d366004613739565b610a74565b6040516001600160a01b0390911681526020016102f7565b34801561036657600080fd5b506009546102eb9060ff1681565b34801561038057600080fd5b5061039461038f36600461376e565b610a9b565b005b3480156103a257600080fd5b50600d546103b39063ffffffff1681565b60405163ffffffff90911681526020016102f7565b3480156103d457600080fd5b506103de60085481565b6040519081526020016102f7565b3480156103f857600080fd5b506102eb6104073660046137ac565b601260209081526000928352604080842090915290825290205460ff1681565b34801561043357600080fd5b506103946104423660046137df565b610bd3565b34801561045357600080fd5b5061039461046236600461385a565b610f30565b34801561047357600080fd5b50610394610482366004613877565b610f4b565b34801561049357600080fd5b50600b54610342906001600160a01b031681565b3480156104b357600080fd5b506103946104c2366004613739565b610fc3565b3480156104d357600080fd5b506103946104e2366004613877565b61110f565b3480156104f357600080fd5b50610394610502366004613739565b61112a565b34801561051357600080fd5b506103946105223660046138b3565b6111a1565b34801561053357600080fd5b50610394610542366004613959565b611203565b34801561055357600080fd5b506102eb6105623660046139a1565b601060209081526000928352604080842090915290825290205460ff1681565b34801561058e57600080fd5b5061034261059d366004613739565b61126c565b3480156105ae57600080fd5b506105c26105bd3660046139d4565b6112d1565b6040516102f79190613a16565b3480156105db57600080fd5b5061063c6105ea366004613a5a565b600f6020526000908152604090208054600182015460029092015463ffffffff8216926001600160401b036401000000008404811693600160601b8104821693600160a01b9091048216929091169086565b6040805163ffffffff90971687526001600160401b03958616602088015293851693860193909352908316606085015291909116608083015260a082015260c0016102f7565b34801561068e57600080fd5b506103de61069d3660046138b3565b6114bd565b3480156106ae57600080fd5b50610394611557565b3480156106c357600080fd5b506006546001600160a01b0316610342565b3480156106e157600080fd5b5061031561156b565b3480156106f657600080fd5b5061039461070536600461376e565b61157a565b34801561071657600080fd5b50610394610725366004613a75565b6116c4565b34801561073657600080fd5b50610394610745366004613acc565b6116cf565b34801561075657600080fd5b506102eb610765366004613b33565b61174d565b34801561077657600080fd5b506102eb6107853660046137ac565b601360209081526000928352604080842090915290825290205460ff1681565b3480156107b157600080fd5b506102eb6107c0366004613a5a565b611857565b3480156107d157600080fd5b506103156107e0366004613739565b61191b565b3480156107f157600080fd5b506102eb6108003660046137ac565b601160209081526000928352604080842090915290825290205460ff1681565b34801561082c57600080fd5b5061039461083b366004613b89565b611958565b34801561084c57600080fd5b506108be61085b366004613a5a565b600e60205260009081526040902080546001820154600283015460039093015463ffffffff8316936001600160401b036401000000008504811694600160601b8104821694600160a01b90910482169381831693600160401b9092049092169188565b6040805163ffffffff90991689526001600160401b0397881660208a015295871695880195909552928516606087015290841660808601529290921660a084015260c083019190915260e0820152610100016102f7565b34801561092157600080fd5b506102eb610930366004613be5565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561096a57600080fd5b506103946109793660046137ac565b611eb6565b34801561098a57600080fd5b506103946109993660046138b3565b612258565b6103946109ac366004613b33565b6122e5565b3480156109bd57600080fd5b506102eb6109cc366004613a5a565b612732565b60006109dc826127f2565b92915050565b6060600080546109f190613c01565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1d90613c01565b8015610a6a5780601f10610a3f57610100808354040283529160200191610a6a565b820191906000526020600020905b815481529060010190602001808311610a4d57829003601f168201915b5050505050905090565b6000610a7f82612842565b506000908152600460205260409020546001600160a01b031690565b6000610aa68261126c565b9050806001600160a01b0316836001600160a01b031603610b185760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610b5257506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b610bc45760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610b0f565b610bce83836128a6565b505050565b610bdb612914565b600d5463ffffffff1615610d1a57600d54610bfb9063ffffffff16612732565b1515600114610c4c5760405162461bcd60e51b815260206004820152601960248201527f6c617374206d696e7420726f756e64206e6f7420656e646564000000000000006044820152606401610b0f565b600d5463ffffffff9081166000908152600f60205260408120549091169003610cb75760405162461bcd60e51b815260206004820152601b60248201527f6c6173742072657761726420726f756e64206e6f7420736574757000000000006044820152606401610b0f565b600d54610cc99063ffffffff16611857565b1515600114610d1a5760405162461bcd60e51b815260206004820152601b60248201527f6c6173742072657761726420726f756e64206e6f7420656e64656400000000006044820152606401610b0f565b600d54610d2e9063ffffffff166001613c51565b63ffffffff168663ffffffff1614610d7c5760405162461bcd60e51b81526020600482015260116024820152700e4deeadcc892c840dcdee840dac2e8c6d607b1b6044820152606401610b0f565b42856001600160401b031611610dc65760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b6044820152606401610b0f565b846001600160401b0316846001600160401b031611610e165760405162461bcd60e51b815260206004820152600c60248201526b1d1a5b59481a5b9d985b1a5960a21b6044820152606401610b0f565b63ffffffff86166000818152600e602090815260409182902080546bffffffffffffffffffffffff191684176401000000006001600160401b038b8116918202929092177fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b8b841690810267ffffffffffffffff60a01b191691909117600160a01b8b851690810291909117855560018501805467ffffffffffffffff1916948b16948517905560028501899055600d805463ffffffff1916891790558651928352948201529384019290925260608301919091526080820184905291907f3f18e6cd400b5b1925b08b48eac325331cd2bcc458cd62547c6fe1094571b0039060a00160405180910390a250505050505050565b610f38612914565b6009805460ff1916911515919091179055565b610f56335b8261296e565b610fb85760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610b0f565b610bce8383836129ec565b610fcb612914565b600d54610fdd9063ffffffff16612732565b151560011461102e5760405162461bcd60e51b815260206004820152601960248201527f6c617374206d696e7420726f756e64206e6f7420656e646564000000000000006044820152606401610b0f565b600d546110409063ffffffff16611857565b15156001146110915760405162461bcd60e51b815260206004820152601b60248201527f6c6173742072657761726420726f756e64206e6f7420656e64656400000000006044820152606401610b0f565b47818110156110e25760405162461bcd60e51b815260206004820152601260248201527f6e6f7420656e6f7567682062616c616e636500000000000000000000000000006044820152606401610b0f565b604051339083156108fc029084906000818181858888f19350505050158015610bce573d6000803e3d6000fd5b610bce838383604051806020016040528060008152506116cf565b61113333610f50565b6111955760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610b0f565b61119e81612bd9565b50565b6111a9612914565b600b80546001600160a01b038381166001600160a01b031983168117909355604051911680825291907fdd7148b4425757208eefaa368e1e9a00fd99d2260b0406c0e73aea9240af344e9060200160405180910390a25050565b61120b612914565b600081511161125c5760405162461bcd60e51b815260206004820152600e60248201527f77726f6e672062617365207572690000000000000000000000000000000000006044820152606401610b0f565b60076112688282613cc3565b5050565b6000818152600260205260408120546001600160a01b0316806109dc5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b0f565b60606000856001600160401b03166001600160401b038111156112f6576112f66138ce565b60405190808252806020026020018201604052801561131f578160200160208202803683370190505b5090506000856001600160401b03166001600160401b03811115611345576113456138ce565b60405190808252806020026020018201604052801561136e578160200160208202803683370190505b50905060005b866001600160401b03168110156114b057600061139a826001600160401b038b16613d82565b60408051602081018990529081018490526060016040516020818303038152906040528051906020012060001c6113d19190613dab565b90506000846113e08385613dbf565b815181106113f0576113f0613dd2565b60200260200101519050600085848151811061140e5761140e613dd2565b602002602001015190508160000361143a578261142b858b613dbf565b6114359190613dbf565b61143c565b815b85858151811061144e5761144e613dd2565b602002602001018181525050806000036114715761146c848a613dbf565b611473565b805b8661147e8587613dbf565b8151811061148e5761148e613dd2565b60200260200101818152505050505080806114a890613de8565b915050611374565b509150505b949350505050565b60006001600160a01b03821661153b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610b0f565b506001600160a01b031660009081526003602052604090205490565b61155f612914565b6115696000612c7c565b565b6060600180546109f190613c01565b611582612cce565b61158a612914565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156115d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f59190613e01565b9050818110156116475760405162461bcd60e51b815260206004820152601260248201527f6e6f7420656e6f7567682062616c616e636500000000000000000000000000006044820152606401610b0f565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0384169063a9059cbb906044016020604051808303816000875af1158015611694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b89190613e1a565b50506112686001600a55565b611268338383612d27565b6116d9338361296e565b61173b5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610b0f565b61174784848484612df5565b50505050565b600b5460405160e085901b6001600160e01b03191660208201526024810184905260609190911b6bffffffffffffffffffffffff1916604482015260009081906117dd90605801604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b600b549091506001600160a01b03166117f68285612e73565b6001600160a01b03161461184c5760405162461bcd60e51b815260206004820152601360248201527f21494e56414c49445f5349474e415455524521000000000000000000000000006044820152606401610b0f565b506001949350505050565b600d5460009063ffffffff90811690831611156118b65760405162461bcd60e51b815260206004820152601160248201527f726f756e644964206e6f742073657475700000000000000000000000000000006044820152606401610b0f565b63ffffffff82166000908152600f602052604090205442600160601b9091046001600160401b031610806109dc57505063ffffffff166000908152600f6020526040902080546001909101546001600160401b03600160a01b90920482169116101590565b606061192682612842565b600761193183612e97565b604051602001611942929190613e37565b6040516020818303038152906040529050919050565b611960612914565b3332146119af5760405162461bcd60e51b815260206004820152600860248201527f6f6e6c7920454f410000000000000000000000000000000000000000000000006044820152606401610b0f565b600d5463ffffffff8681169116146119fd5760405162461bcd60e51b81526020600482015260116024820152700e4deeadcc892c840dcdee840dac2e8c6d607b1b6044820152606401610b0f565b63ffffffff8086166000908152600e6020908152604091829020825161010081018452815480861682526001600160401b036401000000008204811694830194909452600160601b8104841694820194909452600160a01b9093048216606084015260018101548083166080850152600160401b900490911660a0830152600281015460c08301526003015460e0820152600d549091611a9d9116612732565b1515600114611aee5760405162461bcd60e51b815260206004820152601360248201527f6d696e74526f756e64206e6f7420656e646564000000000000000000000000006044820152606401610b0f565b42856001600160401b031611611b385760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b6044820152606401610b0f565b846001600160401b0316846001600160401b031611611b885760405162461bcd60e51b815260206004820152600c60248201526b1d1a5b59481a5b9d985b1a5960a21b6044820152606401610b0f565b60008363ffffffff16118015611bb157508060a001516001600160401b03168363ffffffff1611155b611bfd5760405162461bcd60e51b815260206004820152601360248201527f77696e6e6572436f756e7420696e76616c6964000000000000000000000000006044820152606401610b0f565b8060e00151821115611c515760405162461bcd60e51b815260206004820152601160248201527f7072697a65506f6f6c20696e76616c69640000000000000000000000000000006044820152606401610b0f565b63ffffffff8087166000908152600f60205260409020805490911615611cb95760405162461bcd60e51b815260206004820152601360248201527f726f756e6420616c7265616479207365747570000000000000000000000000006044820152606401610b0f565b805463ffffffff8881166bffffffffffffffffffffffff1990921682176401000000006001600160401b038a8116918202929092177fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b928a1692830267ffffffffffffffff60a01b191617928816600160a01b81029390931785556002850187905560408051918252602082019290925290810191909152606081018590527fdf6830ce6fb992f099a2e2de505566fe365d6546f92e2615f30c29183176dcc89060800160405180910390a26000611d98600143613d82565b600c5460408051924060208401528201526060016040516020818303038152906040528051906020012090506000611df18460a001518460000160149054906101000a90046001600160401b03168660c00151856112d1565b90508863ffffffff167f56d510592d67c157bf7017d05b541d78814d6fb73c74a1e609c006eb5276884782604051611e299190613a16565b60405180910390a260005b8151811015611eaa5763ffffffff8a166000908152601360205260408120835160019290859085908110611e6a57611e6a613dd2565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611ea290613de8565b915050611e34565b50505050505050505050565b611ebe612cce565b8033611ec98261126c565b6001600160a01b031614611f1f5760405162461bcd60e51b815260206004820152600960248201527f6e6f74206f776e657200000000000000000000000000000000000000000000006044820152606401610b0f565b63ffffffff83166000908152600f60205260409020805464010000000090046001600160401b03164211611f955760405162461bcd60e51b815260206004820152601260248201527f726577617264206e6f74207374617274656400000000000000000000000000006044820152606401610b0f565b8054600160601b90046001600160401b0316421115611ff65760405162461bcd60e51b815260206004820152600c60248201527f72657761726420656e64656400000000000000000000000000000000000000006044820152606401610b0f565b63ffffffff8416600090815260136020908152604080832086845290915290205460ff16151560011461206b5760405162461bcd60e51b815260206004820152600a60248201527f6e6f742077696e6e6572000000000000000000000000000000000000000000006044820152606401610b0f565b63ffffffff8416600090815260126020908152604080832086845290915290205460ff16156120dc5760405162461bcd60e51b815260206004820152600f60248201527f616c726561647920636c61696d656400000000000000000000000000000000006044820152606401610b0f565b8054600282015460009161210191600160a01b9091046001600160401b031690613eca565b63ffffffff861660009081526012602090815260408083208884529091528120805460ff19166001908117909155848101805493945090929091906121509084906001600160401b0316613ede565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550336001600160a01b03166108fc829081150290604051600060405180830381858888f193505050501580156121ad573d6000803e3d6000fd5b50838563ffffffff16336001600160a01b03167f89258171878eb0f47154eefb0322c34ac2d0b0be2732fc7ac38e94acd415ad24846040516121f191815260200190565b60405180910390a4815460018301546001600160401b03600160a01b909204821691160361224b5760405163ffffffff8616907f93745d2e61a8a8e50ce593f8f67f884ca319591fb6db74c9e266f365a32816d290600090a25b5050506112686001600a55565b612260612914565b6001600160a01b0381166122dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b0f565b61119e81612c7c565b6122ed612cce565b600d5463ffffffff84811691161461233b5760405162461bcd60e51b81526020600482015260116024820152700e4deeadcc892c840dcdee840dac2e8c6d607b1b6044820152606401610b0f565b61234683838361174d565b5063ffffffff83166000908152600e60205260409020805464010000000090046001600160401b031642116123bd5760405162461bcd60e51b815260206004820152601060248201527f6d696e74206e6f742073746172746564000000000000000000000000000000006044820152606401610b0f565b8054600160601b90046001600160401b031642111561241e5760405162461bcd60e51b815260206004820152600a60248201527f6d696e7420656e646564000000000000000000000000000000000000000000006044820152606401610b0f565b8054600160a01b90046001600160401b031634101561247f5760405162461bcd60e51b815260206004820152600e60248201527f6e6f7420656e6f756768206665650000000000000000000000000000000000006044820152606401610b0f565b63ffffffff8416600090815260106020908152604080832033845290915290205460ff161580156124d1575063ffffffff8416600090815260116020908152604080832086845290915290205460ff16155b61251d5760405162461bcd60e51b815260206004820152600e60248201527f616c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610b0f565b60018101546001600160401b03808216600160401b90920416106125835760405162461bcd60e51b815260206004820152601460248201527f7265616368206d6178206d696e7420636f756e740000000000000000000000006044820152606401610b0f565b600181015460028201546000916125ab91600160401b9091046001600160401b031690613dbf565b90506125b73382612f36565b8154600383018054600160a01b9092046001600160401b0316916000906125df908490613dbf565b909155505060018281018054600890612609908490600160401b90046001600160401b0316613ede565b92506101000a8154816001600160401b0302191690836001600160401b031602179055506001601060008763ffffffff1663ffffffff16815260200190815260200160002060006126573390565b6001600160a01b0316815260208082019290925260409081016000908120805494151560ff1995861617905563ffffffff8916815260118352818120888252909252808220805490931660011790925542600c5590518591839133917f946f0be4398c0ef536eb2444f624a18683941b0a555af44da2f411c042b70f1891a460018201546001600160401b03808216600160401b90920416036127265760405163ffffffff8616907f1b4c7df3209f75130cd90023b1b20ae1e2f5eb0a7a622b7459a01f20efb096d790600090a25b5050610bce6001600a55565b600d5460009063ffffffff90811690831611156127915760405162461bcd60e51b815260206004820152601160248201527f726f756e644964206e6f742073657475700000000000000000000000000000006044820152606401610b0f565b63ffffffff82166000908152600e602052604090205442600160601b9091046001600160401b031610806109dc57505063ffffffff166000908152600e60205260409020600101546001600160401b03808216600160401b90920416101590565b60006001600160e01b031982166380ac58cd60e01b148061282357506001600160e01b03198216635b5e139f60e01b145b806109dc57506301ffc9a760e01b6001600160e01b03198316146109dc565b6000818152600260205260409020546001600160a01b031661119e5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b0f565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906128db8261126c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6006546001600160a01b031633146115695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b0f565b60008061297a8361126c565b9050806001600160a01b0316846001600160a01b031614806129c157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806114b55750836001600160a01b03166129da84610a74565b6001600160a01b031614949350505050565b826001600160a01b03166129ff8261126c565b6001600160a01b031614612a635760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b0f565b6001600160a01b038216612ac55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b0f565b612ad28383836001612f50565b826001600160a01b0316612ae58261126c565b6001600160a01b031614612b495760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b0f565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612be48261126c565b9050612bf4816000846001612f50565b612bfd8261126c565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600a5403612d205760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b0f565b6002600a55565b816001600160a01b0316836001600160a01b031603612d885760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b0f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612e008484846129ec565b612e0c84848484613007565b6117475760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b0f565b6000806000612e828585613150565b91509150612e8f81613195565b509392505050565b60606000612ea4836132df565b60010190506000816001600160401b03811115612ec357612ec36138ce565b6040519080825280601f01601f191660200182016040528015612eed576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084612ef757509392505050565b6112688282604051806020016040528060008152506133c1565b6001600160a01b038416612f7b578060086000828254612f709190613dbf565b90915550612fdc9050565b6001600160a01b03831615612fdc5760095460ff16612fdc5760405162461bcd60e51b815260206004820152601060248201527f74726164696e67206e6f74206f70656e000000000000000000000000000000006044820152606401610b0f565b6001600160a01b038316611747578060086000828254612ffc9190613d82565b909155505050505050565b60006001600160a01b0384163b1561314857604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061304b903390899088908890600401613efe565b6020604051808303816000875af1925050508015613086575060408051601f3d908101601f1916820190925261308391810190613f3a565b60015b61312e573d8080156130b4576040519150601f19603f3d011682016040523d82523d6000602084013e6130b9565b606091505b5080516000036131265760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b0f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506114b5565b5060016114b5565b60008082516041036131865760208301516040840151606085015160001a61317a8782858561343f565b9450945050505061318e565b506000905060025b9250929050565b60008160048111156131a9576131a9613f57565b036131b15750565b60018160048111156131c5576131c5613f57565b036132125760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b0f565b600281600481111561322657613226613f57565b036132735760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b0f565b600381600481111561328757613287613f57565b0361119e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b0f565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613328577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613354576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061337257662386f26fc10000830492506010015b6305f5e100831061338a576305f5e100830492506008015b612710831061339e57612710830492506004015b606483106133b0576064830492506002015b600a83106109dc5760010192915050565b6133cb8383613503565b6133d86000848484613007565b610bce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b0f565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561347657506000905060036134fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156134ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166134f3576000600192509250506134fa565b9150600090505b94509492505050565b6001600160a01b0382166135595760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b0f565b6000818152600260205260409020546001600160a01b0316156135be5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b0f565b6135cc600083836001612f50565b6000818152600260205260409020546001600160a01b0316156136315760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b0f565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461119e57600080fd5b6000602082840312156136c457600080fd5b81356136cf8161369c565b9392505050565b60005b838110156136f15781810151838201526020016136d9565b50506000910152565b600081518084526137128160208601602086016136d6565b601f01601f19169290920160200192915050565b6020815260006136cf60208301846136fa565b60006020828403121561374b57600080fd5b5035919050565b80356001600160a01b038116811461376957600080fd5b919050565b6000806040838503121561378157600080fd5b61378a83613752565b946020939093013593505050565b803563ffffffff8116811461376957600080fd5b600080604083850312156137bf57600080fd5b61378a83613798565b80356001600160401b038116811461376957600080fd5b60008060008060008060c087890312156137f857600080fd5b61380187613798565b955061380f602088016137c8565b945061381d604088016137c8565b935061382b606088016137c8565b9250613839608088016137c8565b915060a087013590509295509295509295565b801515811461119e57600080fd5b60006020828403121561386c57600080fd5b81356136cf8161384c565b60008060006060848603121561388c57600080fd5b61389584613752565b92506138a360208501613752565b9150604084013590509250925092565b6000602082840312156138c557600080fd5b6136cf82613752565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156138fe576138fe6138ce565b604051601f8501601f19908116603f01168101908282118183101715613926576139266138ce565b8160405280935085815286868601111561393f57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561396b57600080fd5b81356001600160401b0381111561398157600080fd5b8201601f8101841361399257600080fd5b6114b5848235602084016138e4565b600080604083850312156139b457600080fd5b6139bd83613798565b91506139cb60208401613752565b90509250929050565b600080600080608085870312156139ea57600080fd5b6139f3856137c8565b9350613a01602086016137c8565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b81811015613a4e57835183529284019291840191600101613a32565b50909695505050505050565b600060208284031215613a6c57600080fd5b6136cf82613798565b60008060408385031215613a8857600080fd5b613a9183613752565b91506020830135613aa18161384c565b809150509250929050565b600082601f830112613abd57600080fd5b6136cf838335602085016138e4565b60008060008060808587031215613ae257600080fd5b613aeb85613752565b9350613af960208601613752565b92506040850135915060608501356001600160401b03811115613b1b57600080fd5b613b2787828801613aac565b91505092959194509250565b600080600060608486031215613b4857600080fd5b613b5184613798565b92506020840135915060408401356001600160401b03811115613b7357600080fd5b613b7f86828701613aac565b9150509250925092565b600080600080600060a08688031215613ba157600080fd5b613baa86613798565b9450613bb8602087016137c8565b9350613bc6604087016137c8565b9250613bd460608701613798565b949793965091946080013592915050565b60008060408385031215613bf857600080fd5b6139bd83613752565b600181811c90821680613c1557607f821691505b602082108103613c3557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b63ffffffff818116838216019080821115613c6e57613c6e613c3b565b5092915050565b601f821115610bce57600081815260208120601f850160051c81016020861015613c9c5750805b601f850160051c820191505b81811015613cbb57828155600101613ca8565b505050505050565b81516001600160401b03811115613cdc57613cdc6138ce565b613cf081613cea8454613c01565b84613c75565b602080601f831160018114613d255760008415613d0d5750858301515b600019600386901b1c1916600185901b178555613cbb565b600085815260208120601f198616915b82811015613d5457888601518255948401946001909101908401613d35565b5085821015613d725787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156109dc576109dc613c3b565b634e487b7160e01b600052601260045260246000fd5b600082613dba57613dba613d95565b500690565b808201808211156109dc576109dc613c3b565b634e487b7160e01b600052603260045260246000fd5b600060018201613dfa57613dfa613c3b565b5060010190565b600060208284031215613e1357600080fd5b5051919050565b600060208284031215613e2c57600080fd5b81516136cf8161384c565b6000808454613e4581613c01565b60018281168015613e5d5760018114613e7257613ea1565b60ff1984168752821515830287019450613ea1565b8860005260208060002060005b85811015613e985781548a820152908401908201613e7f565b50505082870194505b5086519250613eb4838560208a016136d6565b602f60f81b939092019283525001949350505050565b600082613ed957613ed9613d95565b500490565b6001600160401b03818116838216019080821115613c6e57613c6e613c3b565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f3060808301846136fa565b9695505050505050565b600060208284031215613f4c57600080fd5b81516136cf8161369c565b634e487b7160e01b600052602160045260246000fdfea26469706673582212201161461e6b5ff092c8ea50751aa0d46268505a63ac2cfd048591726fe5946cfd64736f6c6343000813003300000000000000000000000087582d1b6f368a1a0c9a82848c14ed10d89a0ac50000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002568747470733a2f2f6170692e61766976652e776f726c642f76312f6d696e742f6f70656e2f000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102bf5760003560e01c80636e52396d1161016e578063c5c2e217116100cb578063e985e9c51161007f578063f2fde38b11610064578063f2fde38b1461097e578063f76505a21461099e578063f8e87506146109b157600080fd5b8063e985e9c514610915578063ea8dc2fd1461095e57600080fd5b8063d008f5dd116100b0578063d008f5dd146107e5578063dd12526214610820578063e6b82ab31461084057600080fd5b8063c5c2e217146107a5578063c87b56dd146107c557600080fd5b80639e281a9811610122578063b88d4fde11610107578063b88d4fde1461072a578063bf3672c21461074a578063c51743dc1461076a57600080fd5b80639e281a98146106ea578063a22cb4651461070a57600080fd5b8063715018a611610153578063715018a6146106a25780638da5cb5b146106b757806395d89b41146106d557600080fd5b80636e52396d146105cf57806370a082311461068257600080fd5b806323b872dd1161021c5780635437988d116101d0578063615781c7116101b5578063615781c7146105475780636352211e14610582578063644bf58f146105a257600080fd5b80635437988d1461050757806355f804b31461052757600080fd5b80632e1a7d4d116102015780632e1a7d4d146104a757806342842e0e146104c757806342966c68146104e757600080fd5b806323b872dd146104675780632b7ac3f31461048757600080fd5b806311a8f413116102735780631d02c651116102585780631d02c651146103ec5780631e8507161461042757806321c03a971461044757600080fd5b806311a8f4131461039657806318160ddd146103c857600080fd5b8063081812fc116102a4578063081812fc1461032257806308fd3d051461035a578063095ea7b31461037457600080fd5b806301ffc9a7146102cb57806306fdde031461030057600080fd5b366102c657005b600080fd5b3480156102d757600080fd5b506102eb6102e63660046136b2565b6109d1565b60405190151581526020015b60405180910390f35b34801561030c57600080fd5b506103156109e2565b6040516102f79190613726565b34801561032e57600080fd5b5061034261033d366004613739565b610a74565b6040516001600160a01b0390911681526020016102f7565b34801561036657600080fd5b506009546102eb9060ff1681565b34801561038057600080fd5b5061039461038f36600461376e565b610a9b565b005b3480156103a257600080fd5b50600d546103b39063ffffffff1681565b60405163ffffffff90911681526020016102f7565b3480156103d457600080fd5b506103de60085481565b6040519081526020016102f7565b3480156103f857600080fd5b506102eb6104073660046137ac565b601260209081526000928352604080842090915290825290205460ff1681565b34801561043357600080fd5b506103946104423660046137df565b610bd3565b34801561045357600080fd5b5061039461046236600461385a565b610f30565b34801561047357600080fd5b50610394610482366004613877565b610f4b565b34801561049357600080fd5b50600b54610342906001600160a01b031681565b3480156104b357600080fd5b506103946104c2366004613739565b610fc3565b3480156104d357600080fd5b506103946104e2366004613877565b61110f565b3480156104f357600080fd5b50610394610502366004613739565b61112a565b34801561051357600080fd5b506103946105223660046138b3565b6111a1565b34801561053357600080fd5b50610394610542366004613959565b611203565b34801561055357600080fd5b506102eb6105623660046139a1565b601060209081526000928352604080842090915290825290205460ff1681565b34801561058e57600080fd5b5061034261059d366004613739565b61126c565b3480156105ae57600080fd5b506105c26105bd3660046139d4565b6112d1565b6040516102f79190613a16565b3480156105db57600080fd5b5061063c6105ea366004613a5a565b600f6020526000908152604090208054600182015460029092015463ffffffff8216926001600160401b036401000000008404811693600160601b8104821693600160a01b9091048216929091169086565b6040805163ffffffff90971687526001600160401b03958616602088015293851693860193909352908316606085015291909116608083015260a082015260c0016102f7565b34801561068e57600080fd5b506103de61069d3660046138b3565b6114bd565b3480156106ae57600080fd5b50610394611557565b3480156106c357600080fd5b506006546001600160a01b0316610342565b3480156106e157600080fd5b5061031561156b565b3480156106f657600080fd5b5061039461070536600461376e565b61157a565b34801561071657600080fd5b50610394610725366004613a75565b6116c4565b34801561073657600080fd5b50610394610745366004613acc565b6116cf565b34801561075657600080fd5b506102eb610765366004613b33565b61174d565b34801561077657600080fd5b506102eb6107853660046137ac565b601360209081526000928352604080842090915290825290205460ff1681565b3480156107b157600080fd5b506102eb6107c0366004613a5a565b611857565b3480156107d157600080fd5b506103156107e0366004613739565b61191b565b3480156107f157600080fd5b506102eb6108003660046137ac565b601160209081526000928352604080842090915290825290205460ff1681565b34801561082c57600080fd5b5061039461083b366004613b89565b611958565b34801561084c57600080fd5b506108be61085b366004613a5a565b600e60205260009081526040902080546001820154600283015460039093015463ffffffff8316936001600160401b036401000000008504811694600160601b8104821694600160a01b90910482169381831693600160401b9092049092169188565b6040805163ffffffff90991689526001600160401b0397881660208a015295871695880195909552928516606087015290841660808601529290921660a084015260c083019190915260e0820152610100016102f7565b34801561092157600080fd5b506102eb610930366004613be5565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561096a57600080fd5b506103946109793660046137ac565b611eb6565b34801561098a57600080fd5b506103946109993660046138b3565b612258565b6103946109ac366004613b33565b6122e5565b3480156109bd57600080fd5b506102eb6109cc366004613a5a565b612732565b60006109dc826127f2565b92915050565b6060600080546109f190613c01565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1d90613c01565b8015610a6a5780601f10610a3f57610100808354040283529160200191610a6a565b820191906000526020600020905b815481529060010190602001808311610a4d57829003601f168201915b5050505050905090565b6000610a7f82612842565b506000908152600460205260409020546001600160a01b031690565b6000610aa68261126c565b9050806001600160a01b0316836001600160a01b031603610b185760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610b5257506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b610bc45760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610b0f565b610bce83836128a6565b505050565b610bdb612914565b600d5463ffffffff1615610d1a57600d54610bfb9063ffffffff16612732565b1515600114610c4c5760405162461bcd60e51b815260206004820152601960248201527f6c617374206d696e7420726f756e64206e6f7420656e646564000000000000006044820152606401610b0f565b600d5463ffffffff9081166000908152600f60205260408120549091169003610cb75760405162461bcd60e51b815260206004820152601b60248201527f6c6173742072657761726420726f756e64206e6f7420736574757000000000006044820152606401610b0f565b600d54610cc99063ffffffff16611857565b1515600114610d1a5760405162461bcd60e51b815260206004820152601b60248201527f6c6173742072657761726420726f756e64206e6f7420656e64656400000000006044820152606401610b0f565b600d54610d2e9063ffffffff166001613c51565b63ffffffff168663ffffffff1614610d7c5760405162461bcd60e51b81526020600482015260116024820152700e4deeadcc892c840dcdee840dac2e8c6d607b1b6044820152606401610b0f565b42856001600160401b031611610dc65760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b6044820152606401610b0f565b846001600160401b0316846001600160401b031611610e165760405162461bcd60e51b815260206004820152600c60248201526b1d1a5b59481a5b9d985b1a5960a21b6044820152606401610b0f565b63ffffffff86166000818152600e602090815260409182902080546bffffffffffffffffffffffff191684176401000000006001600160401b038b8116918202929092177fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b8b841690810267ffffffffffffffff60a01b191691909117600160a01b8b851690810291909117855560018501805467ffffffffffffffff1916948b16948517905560028501899055600d805463ffffffff1916891790558651928352948201529384019290925260608301919091526080820184905291907f3f18e6cd400b5b1925b08b48eac325331cd2bcc458cd62547c6fe1094571b0039060a00160405180910390a250505050505050565b610f38612914565b6009805460ff1916911515919091179055565b610f56335b8261296e565b610fb85760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610b0f565b610bce8383836129ec565b610fcb612914565b600d54610fdd9063ffffffff16612732565b151560011461102e5760405162461bcd60e51b815260206004820152601960248201527f6c617374206d696e7420726f756e64206e6f7420656e646564000000000000006044820152606401610b0f565b600d546110409063ffffffff16611857565b15156001146110915760405162461bcd60e51b815260206004820152601b60248201527f6c6173742072657761726420726f756e64206e6f7420656e64656400000000006044820152606401610b0f565b47818110156110e25760405162461bcd60e51b815260206004820152601260248201527f6e6f7420656e6f7567682062616c616e636500000000000000000000000000006044820152606401610b0f565b604051339083156108fc029084906000818181858888f19350505050158015610bce573d6000803e3d6000fd5b610bce838383604051806020016040528060008152506116cf565b61113333610f50565b6111955760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610b0f565b61119e81612bd9565b50565b6111a9612914565b600b80546001600160a01b038381166001600160a01b031983168117909355604051911680825291907fdd7148b4425757208eefaa368e1e9a00fd99d2260b0406c0e73aea9240af344e9060200160405180910390a25050565b61120b612914565b600081511161125c5760405162461bcd60e51b815260206004820152600e60248201527f77726f6e672062617365207572690000000000000000000000000000000000006044820152606401610b0f565b60076112688282613cc3565b5050565b6000818152600260205260408120546001600160a01b0316806109dc5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b0f565b60606000856001600160401b03166001600160401b038111156112f6576112f66138ce565b60405190808252806020026020018201604052801561131f578160200160208202803683370190505b5090506000856001600160401b03166001600160401b03811115611345576113456138ce565b60405190808252806020026020018201604052801561136e578160200160208202803683370190505b50905060005b866001600160401b03168110156114b057600061139a826001600160401b038b16613d82565b60408051602081018990529081018490526060016040516020818303038152906040528051906020012060001c6113d19190613dab565b90506000846113e08385613dbf565b815181106113f0576113f0613dd2565b60200260200101519050600085848151811061140e5761140e613dd2565b602002602001015190508160000361143a578261142b858b613dbf565b6114359190613dbf565b61143c565b815b85858151811061144e5761144e613dd2565b602002602001018181525050806000036114715761146c848a613dbf565b611473565b805b8661147e8587613dbf565b8151811061148e5761148e613dd2565b60200260200101818152505050505080806114a890613de8565b915050611374565b509150505b949350505050565b60006001600160a01b03821661153b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610b0f565b506001600160a01b031660009081526003602052604090205490565b61155f612914565b6115696000612c7c565b565b6060600180546109f190613c01565b611582612cce565b61158a612914565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156115d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f59190613e01565b9050818110156116475760405162461bcd60e51b815260206004820152601260248201527f6e6f7420656e6f7567682062616c616e636500000000000000000000000000006044820152606401610b0f565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0384169063a9059cbb906044016020604051808303816000875af1158015611694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b89190613e1a565b50506112686001600a55565b611268338383612d27565b6116d9338361296e565b61173b5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610b0f565b61174784848484612df5565b50505050565b600b5460405160e085901b6001600160e01b03191660208201526024810184905260609190911b6bffffffffffffffffffffffff1916604482015260009081906117dd90605801604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b600b549091506001600160a01b03166117f68285612e73565b6001600160a01b03161461184c5760405162461bcd60e51b815260206004820152601360248201527f21494e56414c49445f5349474e415455524521000000000000000000000000006044820152606401610b0f565b506001949350505050565b600d5460009063ffffffff90811690831611156118b65760405162461bcd60e51b815260206004820152601160248201527f726f756e644964206e6f742073657475700000000000000000000000000000006044820152606401610b0f565b63ffffffff82166000908152600f602052604090205442600160601b9091046001600160401b031610806109dc57505063ffffffff166000908152600f6020526040902080546001909101546001600160401b03600160a01b90920482169116101590565b606061192682612842565b600761193183612e97565b604051602001611942929190613e37565b6040516020818303038152906040529050919050565b611960612914565b3332146119af5760405162461bcd60e51b815260206004820152600860248201527f6f6e6c7920454f410000000000000000000000000000000000000000000000006044820152606401610b0f565b600d5463ffffffff8681169116146119fd5760405162461bcd60e51b81526020600482015260116024820152700e4deeadcc892c840dcdee840dac2e8c6d607b1b6044820152606401610b0f565b63ffffffff8086166000908152600e6020908152604091829020825161010081018452815480861682526001600160401b036401000000008204811694830194909452600160601b8104841694820194909452600160a01b9093048216606084015260018101548083166080850152600160401b900490911660a0830152600281015460c08301526003015460e0820152600d549091611a9d9116612732565b1515600114611aee5760405162461bcd60e51b815260206004820152601360248201527f6d696e74526f756e64206e6f7420656e646564000000000000000000000000006044820152606401610b0f565b42856001600160401b031611611b385760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b6044820152606401610b0f565b846001600160401b0316846001600160401b031611611b885760405162461bcd60e51b815260206004820152600c60248201526b1d1a5b59481a5b9d985b1a5960a21b6044820152606401610b0f565b60008363ffffffff16118015611bb157508060a001516001600160401b03168363ffffffff1611155b611bfd5760405162461bcd60e51b815260206004820152601360248201527f77696e6e6572436f756e7420696e76616c6964000000000000000000000000006044820152606401610b0f565b8060e00151821115611c515760405162461bcd60e51b815260206004820152601160248201527f7072697a65506f6f6c20696e76616c69640000000000000000000000000000006044820152606401610b0f565b63ffffffff8087166000908152600f60205260409020805490911615611cb95760405162461bcd60e51b815260206004820152601360248201527f726f756e6420616c7265616479207365747570000000000000000000000000006044820152606401610b0f565b805463ffffffff8881166bffffffffffffffffffffffff1990921682176401000000006001600160401b038a8116918202929092177fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b928a1692830267ffffffffffffffff60a01b191617928816600160a01b81029390931785556002850187905560408051918252602082019290925290810191909152606081018590527fdf6830ce6fb992f099a2e2de505566fe365d6546f92e2615f30c29183176dcc89060800160405180910390a26000611d98600143613d82565b600c5460408051924060208401528201526060016040516020818303038152906040528051906020012090506000611df18460a001518460000160149054906101000a90046001600160401b03168660c00151856112d1565b90508863ffffffff167f56d510592d67c157bf7017d05b541d78814d6fb73c74a1e609c006eb5276884782604051611e299190613a16565b60405180910390a260005b8151811015611eaa5763ffffffff8a166000908152601360205260408120835160019290859085908110611e6a57611e6a613dd2565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611ea290613de8565b915050611e34565b50505050505050505050565b611ebe612cce565b8033611ec98261126c565b6001600160a01b031614611f1f5760405162461bcd60e51b815260206004820152600960248201527f6e6f74206f776e657200000000000000000000000000000000000000000000006044820152606401610b0f565b63ffffffff83166000908152600f60205260409020805464010000000090046001600160401b03164211611f955760405162461bcd60e51b815260206004820152601260248201527f726577617264206e6f74207374617274656400000000000000000000000000006044820152606401610b0f565b8054600160601b90046001600160401b0316421115611ff65760405162461bcd60e51b815260206004820152600c60248201527f72657761726420656e64656400000000000000000000000000000000000000006044820152606401610b0f565b63ffffffff8416600090815260136020908152604080832086845290915290205460ff16151560011461206b5760405162461bcd60e51b815260206004820152600a60248201527f6e6f742077696e6e6572000000000000000000000000000000000000000000006044820152606401610b0f565b63ffffffff8416600090815260126020908152604080832086845290915290205460ff16156120dc5760405162461bcd60e51b815260206004820152600f60248201527f616c726561647920636c61696d656400000000000000000000000000000000006044820152606401610b0f565b8054600282015460009161210191600160a01b9091046001600160401b031690613eca565b63ffffffff861660009081526012602090815260408083208884529091528120805460ff19166001908117909155848101805493945090929091906121509084906001600160401b0316613ede565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550336001600160a01b03166108fc829081150290604051600060405180830381858888f193505050501580156121ad573d6000803e3d6000fd5b50838563ffffffff16336001600160a01b03167f89258171878eb0f47154eefb0322c34ac2d0b0be2732fc7ac38e94acd415ad24846040516121f191815260200190565b60405180910390a4815460018301546001600160401b03600160a01b909204821691160361224b5760405163ffffffff8616907f93745d2e61a8a8e50ce593f8f67f884ca319591fb6db74c9e266f365a32816d290600090a25b5050506112686001600a55565b612260612914565b6001600160a01b0381166122dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b0f565b61119e81612c7c565b6122ed612cce565b600d5463ffffffff84811691161461233b5760405162461bcd60e51b81526020600482015260116024820152700e4deeadcc892c840dcdee840dac2e8c6d607b1b6044820152606401610b0f565b61234683838361174d565b5063ffffffff83166000908152600e60205260409020805464010000000090046001600160401b031642116123bd5760405162461bcd60e51b815260206004820152601060248201527f6d696e74206e6f742073746172746564000000000000000000000000000000006044820152606401610b0f565b8054600160601b90046001600160401b031642111561241e5760405162461bcd60e51b815260206004820152600a60248201527f6d696e7420656e646564000000000000000000000000000000000000000000006044820152606401610b0f565b8054600160a01b90046001600160401b031634101561247f5760405162461bcd60e51b815260206004820152600e60248201527f6e6f7420656e6f756768206665650000000000000000000000000000000000006044820152606401610b0f565b63ffffffff8416600090815260106020908152604080832033845290915290205460ff161580156124d1575063ffffffff8416600090815260116020908152604080832086845290915290205460ff16155b61251d5760405162461bcd60e51b815260206004820152600e60248201527f616c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610b0f565b60018101546001600160401b03808216600160401b90920416106125835760405162461bcd60e51b815260206004820152601460248201527f7265616368206d6178206d696e7420636f756e740000000000000000000000006044820152606401610b0f565b600181015460028201546000916125ab91600160401b9091046001600160401b031690613dbf565b90506125b73382612f36565b8154600383018054600160a01b9092046001600160401b0316916000906125df908490613dbf565b909155505060018281018054600890612609908490600160401b90046001600160401b0316613ede565b92506101000a8154816001600160401b0302191690836001600160401b031602179055506001601060008763ffffffff1663ffffffff16815260200190815260200160002060006126573390565b6001600160a01b0316815260208082019290925260409081016000908120805494151560ff1995861617905563ffffffff8916815260118352818120888252909252808220805490931660011790925542600c5590518591839133917f946f0be4398c0ef536eb2444f624a18683941b0a555af44da2f411c042b70f1891a460018201546001600160401b03808216600160401b90920416036127265760405163ffffffff8616907f1b4c7df3209f75130cd90023b1b20ae1e2f5eb0a7a622b7459a01f20efb096d790600090a25b5050610bce6001600a55565b600d5460009063ffffffff90811690831611156127915760405162461bcd60e51b815260206004820152601160248201527f726f756e644964206e6f742073657475700000000000000000000000000000006044820152606401610b0f565b63ffffffff82166000908152600e602052604090205442600160601b9091046001600160401b031610806109dc57505063ffffffff166000908152600e60205260409020600101546001600160401b03808216600160401b90920416101590565b60006001600160e01b031982166380ac58cd60e01b148061282357506001600160e01b03198216635b5e139f60e01b145b806109dc57506301ffc9a760e01b6001600160e01b03198316146109dc565b6000818152600260205260409020546001600160a01b031661119e5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b0f565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906128db8261126c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6006546001600160a01b031633146115695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b0f565b60008061297a8361126c565b9050806001600160a01b0316846001600160a01b031614806129c157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806114b55750836001600160a01b03166129da84610a74565b6001600160a01b031614949350505050565b826001600160a01b03166129ff8261126c565b6001600160a01b031614612a635760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b0f565b6001600160a01b038216612ac55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b0f565b612ad28383836001612f50565b826001600160a01b0316612ae58261126c565b6001600160a01b031614612b495760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b0f565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612be48261126c565b9050612bf4816000846001612f50565b612bfd8261126c565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600a5403612d205760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b0f565b6002600a55565b816001600160a01b0316836001600160a01b031603612d885760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b0f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612e008484846129ec565b612e0c84848484613007565b6117475760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b0f565b6000806000612e828585613150565b91509150612e8f81613195565b509392505050565b60606000612ea4836132df565b60010190506000816001600160401b03811115612ec357612ec36138ce565b6040519080825280601f01601f191660200182016040528015612eed576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084612ef757509392505050565b6112688282604051806020016040528060008152506133c1565b6001600160a01b038416612f7b578060086000828254612f709190613dbf565b90915550612fdc9050565b6001600160a01b03831615612fdc5760095460ff16612fdc5760405162461bcd60e51b815260206004820152601060248201527f74726164696e67206e6f74206f70656e000000000000000000000000000000006044820152606401610b0f565b6001600160a01b038316611747578060086000828254612ffc9190613d82565b909155505050505050565b60006001600160a01b0384163b1561314857604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061304b903390899088908890600401613efe565b6020604051808303816000875af1925050508015613086575060408051601f3d908101601f1916820190925261308391810190613f3a565b60015b61312e573d8080156130b4576040519150601f19603f3d011682016040523d82523d6000602084013e6130b9565b606091505b5080516000036131265760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b0f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506114b5565b5060016114b5565b60008082516041036131865760208301516040840151606085015160001a61317a8782858561343f565b9450945050505061318e565b506000905060025b9250929050565b60008160048111156131a9576131a9613f57565b036131b15750565b60018160048111156131c5576131c5613f57565b036132125760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b0f565b600281600481111561322657613226613f57565b036132735760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b0f565b600381600481111561328757613287613f57565b0361119e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b0f565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613328577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613354576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061337257662386f26fc10000830492506010015b6305f5e100831061338a576305f5e100830492506008015b612710831061339e57612710830492506004015b606483106133b0576064830492506002015b600a83106109dc5760010192915050565b6133cb8383613503565b6133d86000848484613007565b610bce5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b0f565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561347657506000905060036134fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156134ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166134f3576000600192509250506134fa565b9150600090505b94509492505050565b6001600160a01b0382166135595760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b0f565b6000818152600260205260409020546001600160a01b0316156135be5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b0f565b6135cc600083836001612f50565b6000818152600260205260409020546001600160a01b0316156136315760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b0f565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461119e57600080fd5b6000602082840312156136c457600080fd5b81356136cf8161369c565b9392505050565b60005b838110156136f15781810151838201526020016136d9565b50506000910152565b600081518084526137128160208601602086016136d6565b601f01601f19169290920160200192915050565b6020815260006136cf60208301846136fa565b60006020828403121561374b57600080fd5b5035919050565b80356001600160a01b038116811461376957600080fd5b919050565b6000806040838503121561378157600080fd5b61378a83613752565b946020939093013593505050565b803563ffffffff8116811461376957600080fd5b600080604083850312156137bf57600080fd5b61378a83613798565b80356001600160401b038116811461376957600080fd5b60008060008060008060c087890312156137f857600080fd5b61380187613798565b955061380f602088016137c8565b945061381d604088016137c8565b935061382b606088016137c8565b9250613839608088016137c8565b915060a087013590509295509295509295565b801515811461119e57600080fd5b60006020828403121561386c57600080fd5b81356136cf8161384c565b60008060006060848603121561388c57600080fd5b61389584613752565b92506138a360208501613752565b9150604084013590509250925092565b6000602082840312156138c557600080fd5b6136cf82613752565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156138fe576138fe6138ce565b604051601f8501601f19908116603f01168101908282118183101715613926576139266138ce565b8160405280935085815286868601111561393f57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561396b57600080fd5b81356001600160401b0381111561398157600080fd5b8201601f8101841361399257600080fd5b6114b5848235602084016138e4565b600080604083850312156139b457600080fd5b6139bd83613798565b91506139cb60208401613752565b90509250929050565b600080600080608085870312156139ea57600080fd5b6139f3856137c8565b9350613a01602086016137c8565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b81811015613a4e57835183529284019291840191600101613a32565b50909695505050505050565b600060208284031215613a6c57600080fd5b6136cf82613798565b60008060408385031215613a8857600080fd5b613a9183613752565b91506020830135613aa18161384c565b809150509250929050565b600082601f830112613abd57600080fd5b6136cf838335602085016138e4565b60008060008060808587031215613ae257600080fd5b613aeb85613752565b9350613af960208601613752565b92506040850135915060608501356001600160401b03811115613b1b57600080fd5b613b2787828801613aac565b91505092959194509250565b600080600060608486031215613b4857600080fd5b613b5184613798565b92506020840135915060408401356001600160401b03811115613b7357600080fd5b613b7f86828701613aac565b9150509250925092565b600080600080600060a08688031215613ba157600080fd5b613baa86613798565b9450613bb8602087016137c8565b9350613bc6604087016137c8565b9250613bd460608701613798565b949793965091946080013592915050565b60008060408385031215613bf857600080fd5b6139bd83613752565b600181811c90821680613c1557607f821691505b602082108103613c3557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b63ffffffff818116838216019080821115613c6e57613c6e613c3b565b5092915050565b601f821115610bce57600081815260208120601f850160051c81016020861015613c9c5750805b601f850160051c820191505b81811015613cbb57828155600101613ca8565b505050505050565b81516001600160401b03811115613cdc57613cdc6138ce565b613cf081613cea8454613c01565b84613c75565b602080601f831160018114613d255760008415613d0d5750858301515b600019600386901b1c1916600185901b178555613cbb565b600085815260208120601f198616915b82811015613d5457888601518255948401946001909101908401613d35565b5085821015613d725787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156109dc576109dc613c3b565b634e487b7160e01b600052601260045260246000fd5b600082613dba57613dba613d95565b500690565b808201808211156109dc576109dc613c3b565b634e487b7160e01b600052603260045260246000fd5b600060018201613dfa57613dfa613c3b565b5060010190565b600060208284031215613e1357600080fd5b5051919050565b600060208284031215613e2c57600080fd5b81516136cf8161384c565b6000808454613e4581613c01565b60018281168015613e5d5760018114613e7257613ea1565b60ff1984168752821515830287019450613ea1565b8860005260208060002060005b85811015613e985781548a820152908401908201613e7f565b50505082870194505b5086519250613eb4838560208a016136d6565b602f60f81b939092019283525001949350505050565b600082613ed957613ed9613d95565b500490565b6001600160401b03818116838216019080821115613c6e57613c6e613c3b565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f3060808301846136fa565b9695505050505050565b600060208284031215613f4c57600080fd5b81516136cf8161369c565b634e487b7160e01b600052602160045260246000fdfea26469706673582212201161461e6b5ff092c8ea50751aa0d46268505a63ac2cfd048591726fe5946cfd64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000087582d1b6f368a1a0c9a82848c14ed10d89a0ac50000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002568747470733a2f2f6170692e61766976652e776f726c642f76312f6d696e742f6f70656e2f000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : verifier_ (address): 0x87582d1B6f368A1a0c9A82848C14ed10D89a0Ac5
Arg [1] : baseuri_ (string): https://api.avive.world/v1/mint/open/
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000087582d1b6f368a1a0c9a82848c14ed10d89a0ac5
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000025
Arg [3] : 68747470733a2f2f6170692e61766976652e776f726c642f76312f6d696e742f
Arg [4] : 6f70656e2f000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.