ERC-721
Source Code
Overview
Max Total Supply
12 AZG
Holders
7
Transfers
-
0
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
AzuGoal
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "ERC721Psi.sol";
import "Ownable.sol";
import "Base64.sol";
import "ReentrancyGuard.sol";
import "SafeMath.sol";
import "MerkleProof.sol";
import "IVRFGenerator.sol";
import "IDDS.sol";
import "IAccessories.sol";
contract AzuGoal is ERC721Psi, Ownable, ReentrancyGuard {
using SafeMath for uint256;
string[32] _teamName = [
"Brazil",
"Portugal",
"Spain",
"Netherlands",
"England",
"U.S.",
"Iran",
"Wales",
"Ghana",
"Saudi Arabia",
"Mexico",
"Poland",
"France",
"Australia",
"Denmark",
"Tunisia",
"Senegal",
"Costa Rica",
"Germany",
"Japan",
"Belgium",
"Canada",
"Morocco",
"Croatia",
"Qatar",
"Serbia",
"Switzerland",
"Cameroon",
"Ecuador",
"Argentina",
"Uruguay",
"South Korea"
];
struct Publish {
uint8 winner;
address operator;
bool published;
}
uint256 public constant MAX_SUPPLY = 9600;
uint256 public constant FAR_FUTURE = type(uint256).max;
uint256 _whiteListSalesStart = FAR_FUTURE;
uint256 _publicSaleStart = FAR_FUTURE;
uint256 _showTimeStart = FAR_FUTURE;
string _baseTokenURI;
bytes32 private _merkleRoot;
uint256 private _mintPrice;
uint256 private _betPrice;
uint16 private _share;
mapping(uint8 => Publish) publish;
uint24[] nfts;
mapping(uint16 => uint8) airDrops;
uint16[] finalWinners;
uint16[] finalHolders;
uint16 winner1 = type(uint16).max;
uint16 winner2 = type(uint16).max;
mapping(uint16 => bool) cashReady;
bool[2] bigWinnerReady;
mapping(address => bool) operators;
mapping(address => uint8) whiteListSales;
uint16[] gamblers;
IAccessories aces;
IVRFGenerator vrf;
uint256 _vrfRequestId;
uint256 pool; // money to share for every one
uint256 paycash; // money for owner
event publicSaleStart(uint256 time);
event publicSalePaused(uint256 time);
event whiteListSalesStart(uint256 time);
event whiteListSalesPaused(uint256 time);
event baseUIRChanged(string uri);
event showTimeNotStart(uint256 time);
event showTimeStart(uint256 time);
event airDropped(address to, uint256 tokenId, uint8 amount);
event cashedOut(address to, uint256 tokenId, uint256 amount);
event winnerReleased(uint16 id, address currentOwner);
modifier onlyEOA() {
if (tx.origin != msg.sender)
revert("Only Externally Owned Accounts Allowed");
_;
}
modifier onlyOperator() {
if (!operators[tx.origin] && msg.sender != owner())
revert("Only Operator Accounts Allowed");
_;
}
constructor(
string memory baseURI,
uint256 mint_price,
uint256 bet_price,
uint16 share,
bytes32 root
) ERC721Psi("AzuGoal", "AZG") {
require(share >= 0 && share <= 1000, "share must between 0 and 1000");
_baseTokenURI = baseURI;
_mintPrice = mint_price;
_betPrice = bet_price;
_share = share;
_merkleRoot = root;
vrf = IVRFGenerator(
IDDS(BEE_DDS_ADDRESS).toAddress(
IDDS(BEE_DDS_ADDRESS).get("ISOTOP", "BEE_VRF_ADDRESS")
)
);
aces = IAccessories(
IDDS(BEE_DDS_ADDRESS).toAddress(
IDDS(BEE_DDS_ADDRESS).get("ISOTOP", "BEE_AZU_PROP_ADDRESS")
)
);
}
// publicSale
function isWhiteListSaleActive() public view returns (bool) {
return block.timestamp >= _whiteListSalesStart;
}
function isPublicSaleActive() public view returns (bool) {
return block.timestamp >= _publicSaleStart;
}
function isShowTimeStart() public view returns (bool) {
return block.timestamp >= _showTimeStart;
}
function getAirDrops(uint256 tokenId) external view returns (uint8) {
require(_exists(tokenId), "token not exists");
return airDrops[uint16(tokenId)];
}
function claimAirDrops(uint256 tokenId) external onlyEOA nonReentrant {
require(ownerOf(tokenId) == msg.sender, "Only owner");
uint8 value = airDrops[uint16(tokenId)];
if (value == 0) revert("no airdrops found");
// airdrop to msg.sender
aces.mint(msg.sender, value);
airDrops[uint16(tokenId)] = 0;
emit airDropped(msg.sender, tokenId, value);
}
function getCash(uint256 tokenId) external view returns (uint256 _cash) {
require(publish[64].published, "Final winner not released");
if (!cashReady[uint16(tokenId)]) return 0;
uint256 count = finalWinners.length;
// Do the math
for (uint256 i = 0; i < count; i++)
if (finalWinners[i] == tokenId) {
_cash += pool.mul(92).mul(40).div(10000).div(count);
break;
}
count = finalHolders.length;
for (uint256 i = 0; i < count; i++)
if (finalHolders[i] == tokenId) {
_cash += pool.mul(92).mul(10).div(10000).div(count);
break;
}
}
function claimCash(uint256 tokenId) external onlyEOA nonReentrant {
require(ownerOf(tokenId) == msg.sender, "Only owner");
require(publish[64].published, "Final winner not released");
if (!cashReady[uint16(tokenId)]) revert("no fund or cashed out");
uint256 _cash = 0;
uint256 count = finalWinners.length;
// Do the math
for (uint256 i = 0; i < count; i++)
if (finalWinners[i] == tokenId) {
_cash += pool.mul(92).mul(40).div(10000).div(count);
break;
}
count = finalHolders.length;
for (uint256 i = 0; i < count; i++)
if (finalHolders[i] == tokenId) {
_cash += pool.mul(92).mul(10).div(10000).div(count);
break;
}
// payable(msg.sender).transfer(_cash);
(bool success, ) = msg.sender.call{value: _cash}("");
require(success, "Claim transfer failed");
cashReady[uint16(tokenId)] = false;
emit cashedOut(msg.sender, tokenId, _cash);
}
function getBigWinnerCash(uint256 tokenId)
external
view
returns (uint256 _cash)
{
require(publish[64].published, "Final winner not released");
if (tokenId == winner1)
if (bigWinnerReady[0])
// you lucky buster
_cash += pool.mul(92).mul(50).div(10000).div(2);
if (tokenId == winner2)
if (bigWinnerReady[1])
// you lucky buster two
_cash += pool.mul(92).mul(50).div(10000).div(2);
}
function claimBigWinnerCash(uint256 tokenId) external onlyEOA nonReentrant {
require(ownerOf(tokenId) == msg.sender, "Only owner");
require(publish[64].published, "Final winner not released");
uint256 _cash = 0;
if (tokenId == winner1) {
if (!bigWinnerReady[0]) revert("no fund or cashed out");
// you lucky buster
_cash += pool.mul(92).mul(50).div(10000).div(2);
bigWinnerReady[0] = false;
}
if (tokenId == winner2) {
if (!bigWinnerReady[1]) revert("no fund or cashed out");
// you lucky buster two
_cash += pool.mul(92).mul(50).div(10000).div(2);
bigWinnerReady[1] = false;
}
// payable(msg.sender).transfer(_cash);
(bool success, ) = msg.sender.call{value: _cash}("");
require(success, "Claim transfer failed");
emit cashedOut(msg.sender, tokenId, _cash);
}
function getWhiteListMint(address _who) public view returns (uint8) {
return whiteListSales[_who];
}
function whitelistMint(bytes32[] calldata _merkleProof, uint8 quantity)
external
onlyEOA
nonReentrant
{
require(isWhiteListSaleActive(), "Whitelist Sales Not Started");
require(!isShowTimeStart(), "WhiteList Sales Finished");
// require(!isPublicSaleActive(), "Whitelist Sales Finished");
require(
whiteListSales[msg.sender] + quantity <= 2,
"max 2 NFT allowed"
);
require(nfts.length + quantity <= MAX_SUPPLY, "max nft sold");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
if (!MerkleProof.verify(_merkleProof, _merkleRoot, leaf))
revert("Not in white list");
_mint(msg.sender, quantity);
for (uint8 i = 0; i < quantity; i++) nfts.push(0);
whiteListSales[msg.sender] += quantity;
}
function publicSaleMint(uint8 quantity)
external
payable
onlyEOA
nonReentrant
{
require(isPublicSaleActive(), "Public Sales Not Started");
require(!isShowTimeStart(), "Public Sales Finished");
require(
balanceOf(msg.sender) + quantity <=
4 + getWhiteListMint(msg.sender),
"max 4 public sale NFT allowed"
);
require(nfts.length + quantity <= MAX_SUPPLY, "max nft sold");
uint256 cost = _mintPrice.mul(quantity);
require(msg.value >= cost, "Insufficient Payment");
paycash += cost;
_mint(msg.sender, quantity);
for (uint8 i = 0; i < quantity; i++) nfts.push(0);
// Refund overpayment
if (msg.value > cost) {
// payable(msg.sender).transfer(msg.value.sub(cost));
(bool success, ) = msg.sender.call{value: msg.value.sub(cost)}("");
require(success, "Public sales transfer failed");
}
}
function bet(uint16 tokenId, uint8 _team)
external
payable
onlyEOA
nonReentrant
{
require(isShowTimeStart(), "Public Sales not Finished");
require(_team < 32, "Only 32 teams support");
require(_exists(tokenId), "token not exists");
require(ownerOf(tokenId) == msg.sender, "Only owner");
require(nfts[tokenId] & 0x20 == 0, "Bet token");
require(msg.value >= _betPrice, "Insufficient Payment");
nfts[tokenId] += _team | 0x20;
gamblers.push(tokenId);
// Refund overpayment
if (msg.value > _betPrice) {
(bool success, ) = msg.sender.call{value: msg.value.sub(_betPrice)}(
""
);
require(success, "Bet transfer failed");
}
pool += _betPrice;
}
// METADATA
function _baseURI() internal view virtual override returns (string memory) {
return _baseTokenURI;
}
function tokensOf(address owner)
public
view
onlyEOA
returns (uint256[] memory)
{
uint256 count = balanceOf(owner);
uint256[] memory tokenIds = new uint256[](count);
for (uint256 i; i < count; i++) {
tokenIds[i] = tokenOfOwnerByIndex(owner, i);
}
return tokenIds;
}
// DISPLAY
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(_exists(tokenId), "nonexistent token");
if (!isShowTimeStart())
return string(abi.encodePacked(_baseURI(), "cover.json"));
else {
uint24 value = nfts[tokenId];
string memory team = _teamName[(value >> 15) & 0x1f];
string memory no = _toString(uint256((value >> 6) & 0x1ff));
string memory betTeam = "Not Bet";
uint256 _id = ((value >> 15) & 0x1f) * 300 + ((value >> 6) & 0x1ff);
string memory _name;
if (value & 0x20 > 0) {
betTeam = _teamName[value & 0x1f];
_name = string(
abi.encodePacked(
"AzuGoal NFT #",
_toString(_id),
// ⭐️ = "\xe2\xad\x90\xef\xb8\x8f"
"\xe2\xad\x90\xef\xb8\x8f",
betTeam
)
);
} else
_name = string(
abi.encodePacked("AzuGoal NFT #", _toString(_id))
);
bytes memory meta = abi.encodePacked(
'{"name": "',
_name,
'", "description": "AzuGoal WorldCup 2022", "image": "',
_baseURI(),
_toString(_id),
'.png", "designer": "isotop.top","attributes": [{"trait_type": "In-memory","value": "WorldCup 2022"}, {"trait_type": "Team","value": "',
team,
'"}, {"trait_type": "Number","value": "',
no,
'"}, {"trait_type": "Bet","value": "',
betTeam,
'"}]}'
);
return
string(
abi.encodePacked(
"data:application/json;base64,",
Base64.encode(meta)
)
);
}
}
function tokenInfo(uint256 tokenId)
external
view
returns (
uint256 _team,
uint256 _no,
uint256 _bet
)
{
require(_exists(tokenId), "nonexistent token");
uint24 value = nfts[tokenId];
if (value & 0x20 > 0) _bet = uint256(value & 0x1f);
else _bet = 32;
_team = uint256((value >> 15) & 0x1f);
_no = uint256((value >> 6) & 0x1ff);
}
function getRoundStatus(uint8 round)
external
view
returns (Publish memory)
{
return publish[round];
}
function getFinalHolders() external view returns (uint16[] memory) {
return finalHolders;
}
function getFinalWinners() external view returns (uint16[] memory) {
return finalWinners;
}
function getBigWinners() external view returns (uint16, uint16) {
return (winner1, winner2);
}
function getGamblers() external view returns (uint16[] memory) {
return gamblers;
}
// OPERATORS
function setWinner(uint8 round, uint8 _team) external onlyOperator {
require(round < 64, "max 64 matchs");
if (publish[round].published) revert("this round had published");
if (
publish[round].operator == ZERO ||
publish[round].operator == msg.sender
) {
publish[round] = Publish(_team, msg.sender, false);
return;
}
if (publish[round].winner != _team) {
publish[round].operator = msg.sender;
publish[round].winner = _team;
return;
}
for (uint16 i = 0; i < nfts.length; i++)
if (((nfts[i] >> 15) & 0x1f) == _team) airDrops[i] += 1;
publish[round].published = true;
}
function setFinalWinner(uint8 round, uint8 _team) external onlyOperator {
require(round == 64, "final round must be 64 matchs");
if (publish[round].published) revert("this round had published");
if (
publish[round].operator == ZERO ||
publish[round].operator == msg.sender
) {
publish[round] = Publish(_team, msg.sender, false);
return;
}
if (publish[round].winner != _team) {
publish[round].operator = msg.sender;
publish[round].winner = _team;
return;
}
uint256 length = nfts.length;
for (uint16 i = 0; i < length; i++) {
uint24 value = nfts[i];
if (((value >> 15) & 0x1f) == _team) {
airDrops[i] += 1;
finalHolders.push(i);
cashReady[i] = true;
}
if (value & 0x20 > 0 && (value & 0x1f == _team)) {
finalWinners.push(i);
cashReady[i] = true;
}
}
if (finalWinners.length == 0) {
publish[round].published = true;
return;
}
if (finalWinners.length == 1) {
winner1 = finalWinners[0];
winner2 = finalWinners[0];
} else if (finalWinners.length == 2) {
winner1 = finalWinners[0];
winner2 = finalWinners[1];
} else {
uint256 _random = block.timestamp;
if (_vrfRequestId != 0) {
(bool fulfilled, uint256[] memory randomWords) = vrf
.getRequestStatus(_vrfRequestId);
if (fulfilled) _random = randomWords[1];
}
uint16[] memory _winners = vrf.shuffle16(
uint16(finalWinners.length),
_random
);
winner1 = finalWinners[_winners[0]];
winner2 = finalWinners[_winners[1]];
}
bigWinnerReady[0] = true;
bigWinnerReady[1] = true;
emit winnerReleased(winner1, ownerOf(winner1));
emit winnerReleased(winner2, ownerOf(winner2));
publish[round].published = true;
}
function startWhiteListSale() external onlyOperator {
_whiteListSalesStart = block.timestamp;
// We need 2 shuffle random seeds
// 1: blind box
// 2: final winner
_vrfRequestId = vrf.requestRandomWords(2);
emit whiteListSalesStart(block.timestamp);
}
function pauseWhiteListSale() external onlyOperator {
_whiteListSalesStart = FAR_FUTURE;
emit whiteListSalesPaused(block.timestamp);
}
function startPublicSale() external onlyOperator {
_publicSaleStart = block.timestamp;
emit publicSaleStart(block.timestamp);
}
function pausePublicSale() external onlyOperator {
_publicSaleStart = FAR_FUTURE;
emit publicSalePaused(block.timestamp);
}
function startShowTime() external onlyOperator {
require(_showTimeStart == FAR_FUTURE, "Shuffle happened");
_showTimeStart = block.timestamp;
uint256 _random = block.timestamp;
if (_vrfRequestId != 0) {
(bool fulfilled, uint256[] memory randomWords) = vrf
.getRequestStatus(_vrfRequestId);
if (fulfilled) _random = randomWords[0];
}
uint16[] memory id = vrf.shuffle16(9600, _random);
unchecked {
for (uint256 i = 0; i < nfts.length; i++) {
uint24 _team = id[i] / 300;
uint24 _no = id[i] % 300;
// 0x3ff = '0b11111111111111' (14bit)
// save 5 bits for voting team, 1 bit for bet or not yet
nfts[i] = (_team << 15) + (_no << 6);
}
}
emit showTimeStart(block.timestamp);
}
// Team/Partnerships & Community
function marketingMint(uint16 quantity) external onlyOwner {
require(!isShowTimeStart(), "Sales Finished");
require(nfts.length + quantity <= MAX_SUPPLY, "max nft sold");
_mint(owner(), quantity);
for (uint8 i = 0; i < quantity; i++) nfts.push(0);
}
// OWNERS + HELPERS
function setOperators(address[] calldata _operators) external onlyOwner {
for (uint256 i = 0; i < _operators.length; i++)
operators[_operators[i]] = true;
}
function setURInew(string memory uri)
external
onlyOwner
returns (string memory)
{
_baseTokenURI = uri;
emit baseUIRChanged(uri);
return _baseTokenURI;
}
function setRoot(bytes32 root) external onlyOwner {
_merkleRoot = root;
}
function withdraw()
external
onlyOwner
returns (uint256 split1, uint256 split2)
{
require(publish[64].published, "final winner not revealed");
require(paycash > 0, "cashed out");
uint256 total = pool.mul(8).div(100) + paycash;
split1 = total.mul(_share).div(1000);
split2 = total - split1;
(bool success1, ) = address(0x7B0dc23E87febF1D053E7Df9aF4cce30F21fAe9C)
.call{value: split1}("");
(bool success2, ) = address(0x9da32F03cc23F9156DaA7442cADbE8366ddAc123)
.call{value: split2}("");
require(success1 && success2, "withdraw transfer failed");
paycash = 0;
}
function getPaycash() external view onlyOwner returns (uint256, uint256) {
return (pool, paycash);
}
function config()
external
view
onlyOwner
returns (
address,
address,
address,
bytes32
)
{
return (
address(BEE_DDS_ADDRESS),
address(vrf),
address(aces),
_merkleRoot
);
}
function reset() external onlyOwner {
require(paycash == 0, "not cashed out");
selfdestruct(payable(0x7B0dc23E87febF1D053E7Df9aF4cce30F21fAe9C));
}
/**
* @dev Converts a uint256 to its ASCII string decimal representation.
*/
function _toString(uint256 value)
internal
pure
virtual
returns (string memory str)
{
assembly {
// The maximum value of a uint256 contains 78 digits (1 byte per digit),
// but we allocate 0x80 bytes to keep the free memory pointer 32-byte word aligned.
// We will need 1 32-byte word to store the length,
// and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80.
str := add(mload(0x40), 0x80)
// Update the free memory pointer to allocate.
mstore(0x40, str)
// Cache the end of the memory to calculate the length later.
let end := str
// We write the string from rightmost digit to leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
// prettier-ignore
for { let temp := value } 1 {} {
str := sub(str, 1)
// Write the character to the pointer.
// The ASCII index of the '0' character is 48.
mstore8(str, add(48, mod(temp, 10)))
// Keep dividing `temp` until zero.
temp := div(temp, 10)
// prettier-ignore
if iszero(temp) { break }
}
let length := sub(end, str)
// Move the pointer 32 bytes leftwards to make room for the length.
str := sub(str, 0x20)
// Store the length.
mstore(str, length)
}
}
function shuffle(uint256 size, uint256 entropy)
public
pure
returns (uint256[] memory)
{
uint256[] memory result = new uint256[](size);
// Initialize array.
for (uint256 i = 0; i < size; i++) {
result[i] = i;
}
// Set the initial randomness based on the provided entropy.
bytes32 random = keccak256(abi.encodePacked(entropy));
// Set the last item of the array which will be swapped.
uint256 last_item = size - 1;
// We need to do `size - 1` iterations to completely shuffle the array.
for (uint256 i = 1; i < size - 1; i++) {
// Select a number based on the randomness.
uint256 selected_item = uint256(random) % last_item;
// Swap items `selected_item <> last_item`.
uint256 aux = result[last_item];
result[last_item] = result[selected_item];
result[selected_item] = aux;
// Decrease the size of the possible shuffle
// to preserve the already shuffled items.
// The already shuffled items are at the end of the array.
last_item--;
// Generate new randomness.
random = keccak256(abi.encodePacked(random));
}
return result;
}
}// SPDX-License-Identifier: MIT
/**
______ _____ _____ ______ ___ __ _ _ _
| ____| __ \ / ____|____ |__ \/_ | || || |
| |__ | |__) | | / / ) || | \| |/ |
| __| | _ /| | / / / / | |\_ _/
| |____| | \ \| |____ / / / /_ | | | |
|______|_| \_\\_____|/_/ |____||_| |_|
*/
pragma solidity ^0.8.0;
import "IERC721.sol";
import "IERC721Receiver.sol";
import "IERC721Metadata.sol";
import "IERC721Enumerable.sol";
import "Context.sol";
import "Strings.sol";
import "ERC165.sol";
import "Address.sol";
import "StorageSlot.sol";
import "BitMaps.sol";
contract ERC721Psi is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
using BitMaps for BitMaps.BitMap;
BitMaps.BitMap private _batchHead;
string private _name;
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) internal _owners;
uint256 internal _minted;
mapping(uint256 => address) private _tokenApprovals;
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 ||
interfaceId == type(IERC721Enumerable).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner)
public
view
virtual
override
returns (uint256)
{
require(
owner != address(0),
"ERC721Psi: balance query for the zero address"
);
uint256 count;
for (uint256 i; i < _minted; ++i) {
if (_exists(i)) {
if (owner == ownerOf(i)) {
++count;
}
}
}
return count;
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
(address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(
tokenId
);
return owner;
}
function _ownerAndBatchHeadOf(uint256 tokenId)
internal
view
returns (address owner, uint256 tokenIdBatchHead)
{
require(
_exists(tokenId),
"ERC721Psi: owner query for nonexistent token"
);
tokenIdBatchHead = _getBatchHead(tokenId);
owner = _owners[tokenIdBatchHead];
}
/**
* @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)
{
require(_exists(tokenId), "ERC721Psi: URI query for nonexistent token");
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 overriden 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 = ownerOf(tokenId);
require(to != owner, "ERC721Psi: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721Psi: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId)
public
view
virtual
override
returns (address)
{
require(
_exists(tokenId),
"ERC721Psi: approved query for nonexistent token"
);
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved)
public
virtual
override
{
require(operator != _msgSender(), "ERC721Psi: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_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),
"ERC721Psi: transfer caller is not owner nor 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),
"ERC721Psi: transfer caller is not owner nor 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, 1, _data),
"ERC721Psi: transfer to non ERC721Receiver implementer"
);
}
/**
* @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`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return tokenId < _minted;
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
virtual
returns (bool)
{
require(
_exists(tokenId),
"ERC721Psi: operator query for nonexistent token"
);
address owner = ownerOf(tokenId);
return (spender == owner ||
getApproved(tokenId) == spender ||
isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, "");
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal virtual {
uint256 startTokenId = _minted;
_mint(to, quantity);
require(
_checkOnERC721Received(
address(0),
to,
startTokenId,
quantity,
_data
),
"ERC721Psi: transfer to non ERC721Receiver implementer"
);
}
function _mint(address to, uint256 quantity) internal virtual {
uint256 tokenIdBatchHead = _minted;
require(quantity > 0, "ERC721Psi: quantity must be greater 0");
require(to != address(0), "ERC721Psi: mint to the zero address");
_beforeTokenTransfers(address(0), to, tokenIdBatchHead, quantity);
_minted += quantity;
_owners[tokenIdBatchHead] = to;
_batchHead.set(tokenIdBatchHead);
_afterTokenTransfers(address(0), to, tokenIdBatchHead, quantity);
// Emit events
for (
uint256 tokenId = tokenIdBatchHead;
tokenId < tokenIdBatchHead + quantity;
tokenId++
) {
emit Transfer(address(0), to, tokenId);
}
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
(address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(
tokenId
);
require(owner == from, "ERC721Psi: transfer of token that is not own");
require(to != address(0), "ERC721Psi: transfer to the zero address");
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
uint256 nextTokenId = tokenId + 1;
if (!_batchHead.get(nextTokenId) && nextTokenId < _minted) {
_owners[nextTokenId] = from;
_batchHead.set(nextTokenId);
}
_owners[tokenId] = to;
if (tokenId != tokenIdBatchHead) {
_batchHead.set(tokenId);
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ownerOf(tokenId), to, tokenId);
}
/**
* @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 startTokenId uint256 the first ID of the tokens to be transferred
* @param quantity uint256 amount of the tokens to be transfered.
* @param _data bytes optional data to send along with the call
* @return r bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 startTokenId,
uint256 quantity,
bytes memory _data
) private returns (bool r) {
if (to.isContract()) {
r = true;
for (
uint256 tokenId = startTokenId;
tokenId < startTokenId + quantity;
tokenId++
) {
try
IERC721Receiver(to).onERC721Received(
_msgSender(),
from,
tokenId,
_data
)
returns (bytes4 retval) {
r =
r &&
retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert(
"ERC721Psi: transfer to non ERC721Receiver implementer"
);
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
return r;
} else {
return true;
}
}
function _getBatchHead(uint256 tokenId)
internal
view
returns (uint256 tokenIdBatchHead)
{
tokenIdBatchHead = _batchHead.scanForward(tokenId);
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _minted;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index)
public
view
virtual
override
returns (uint256)
{
require(index < totalSupply(), "ERC721Psi: global index out of bounds");
uint256 count;
for (uint256 i; i < _minted; i++) {
if (_exists(i)) {
if (count == index) return i;
else count++;
}
}
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
virtual
override
returns (uint256 tokenId)
{
uint256 count;
for (uint256 i; i < _minted; i++) {
if (_exists(i) && owner == ownerOf(i)) {
if (count == index) return i;
else count++;
}
}
revert("ERC721Psi: owner index out of bounds");
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// 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.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/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.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts 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.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_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) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @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);
}
}// 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 (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "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");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(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) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(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) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason 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 {
// 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 (last updated v4.7.0) (utils/StorageSlot.sol)
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
}// SPDX-License-Identifier: MIT
/**
_____ ___ ___ __ ____ _ __
/ ___/____ / (_)___/ (_) /___ __ / __ )(_) /______
\__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/
___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ )
/____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/
/____/
- npm: https://www.npmjs.com/package/solidity-bits
- github: https://github.com/estarriolvetch/solidity-bits
*/
pragma solidity ^0.8.0;
import "BitScan.sol";
import "Popcount.sol";
/**
* @dev This Library is a modified version of Openzeppelin's BitMaps library with extra features.
*
* 1. Functions of finding the index of the closest set bit from a given index are added.
* The indexing of each bucket is modifed to count from the MSB to the LSB instead of from the LSB to the MSB.
* The modification of indexing makes finding the closest previous set bit more efficient in gas usage.
* 2. Setting and unsetting the bitmap consecutively.
* 3. Accounting number of set bits within a given range.
*
*/
/**
* @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.
* Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].
*/
library BitMaps {
using BitScan for uint256;
uint256 private constant MASK_INDEX_ZERO = (1 << 255);
uint256 private constant MASK_FULL = type(uint256).max;
struct BitMap {
mapping(uint256 => uint256) _data;
}
/**
* @dev Returns whether the bit at `index` is set.
*/
function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {
uint256 bucket = index >> 8;
uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
return bitmap._data[bucket] & mask != 0;
}
/**
* @dev Sets the bit at `index` to the boolean `value`.
*/
function setTo(
BitMap storage bitmap,
uint256 index,
bool value
) internal {
if (value) {
set(bitmap, index);
} else {
unset(bitmap, index);
}
}
/**
* @dev Sets the bit at `index`.
*/
function set(BitMap storage bitmap, uint256 index) internal {
uint256 bucket = index >> 8;
uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
bitmap._data[bucket] |= mask;
}
/**
* @dev Unsets the bit at `index`.
*/
function unset(BitMap storage bitmap, uint256 index) internal {
uint256 bucket = index >> 8;
uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
bitmap._data[bucket] &= ~mask;
}
/**
* @dev Consecutively sets `amount` of bits starting from the bit at `startIndex`.
*/
function setBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal {
uint256 bucket = startIndex >> 8;
uint256 bucketStartIndex = (startIndex & 0xff);
unchecked {
if(bucketStartIndex + amount < 256) {
bitmap._data[bucket] |= MASK_FULL << (256 - amount) >> bucketStartIndex;
} else {
bitmap._data[bucket] |= MASK_FULL >> bucketStartIndex;
amount -= (256 - bucketStartIndex);
bucket++;
while(amount > 256) {
bitmap._data[bucket] = MASK_FULL;
amount -= 256;
bucket++;
}
bitmap._data[bucket] |= MASK_FULL << (256 - amount);
}
}
}
/**
* @dev Consecutively unsets `amount` of bits starting from the bit at `startIndex`.
*/
function unsetBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal {
uint256 bucket = startIndex >> 8;
uint256 bucketStartIndex = (startIndex & 0xff);
unchecked {
if(bucketStartIndex + amount < 256) {
bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount) >> bucketStartIndex);
} else {
bitmap._data[bucket] &= ~(MASK_FULL >> bucketStartIndex);
amount -= (256 - bucketStartIndex);
bucket++;
while(amount > 256) {
bitmap._data[bucket] = 0;
amount -= 256;
bucket++;
}
bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount));
}
}
}
/**
* @dev Returns number of set bits within a range.
*/
function popcountA(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal view returns(uint256 count) {
uint256 bucket = startIndex >> 8;
uint256 bucketStartIndex = (startIndex & 0xff);
unchecked {
if(bucketStartIndex + amount < 256) {
count += Popcount.popcount256A(
bitmap._data[bucket] << bucketStartIndex >> (256 - amount)
);
} else {
count += Popcount.popcount256A(
bitmap._data[bucket] << bucketStartIndex
);
amount -= (256 - bucketStartIndex);
bucket++;
while(amount > 256) {
count += Popcount.popcount256A(bitmap._data[bucket]);
amount -= 256;
bucket++;
}
count += Popcount.popcount256A(
bitmap._data[bucket] >> (256 - amount)
);
}
}
}
/**
* @dev Returns number of set bits within a range.
*/
function popcountB(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal view returns(uint256 count) {
uint256 bucket = startIndex >> 8;
uint256 bucketStartIndex = (startIndex & 0xff);
unchecked {
if(bucketStartIndex + amount < 256) {
count += Popcount.popcount256B(
bitmap._data[bucket] << bucketStartIndex >> (256 - amount)
);
} else {
count += Popcount.popcount256B(
bitmap._data[bucket] << bucketStartIndex
);
amount -= (256 - bucketStartIndex);
bucket++;
while(amount > 256) {
count += Popcount.popcount256B(bitmap._data[bucket]);
amount -= 256;
bucket++;
}
count += Popcount.popcount256B(
bitmap._data[bucket] >> (256 - amount)
);
}
}
}
/**
* @dev Find the closest index of the set bit before `index`.
*/
function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256 setBitIndex) {
uint256 bucket = index >> 8;
// index within the bucket
uint256 bucketIndex = (index & 0xff);
// load a bitboard from the bitmap.
uint256 bb = bitmap._data[bucket];
// offset the bitboard to scan from `bucketIndex`.
bb = bb >> (0xff ^ bucketIndex); // bb >> (255 - bucketIndex)
if(bb > 0) {
unchecked {
setBitIndex = (bucket << 8) | (bucketIndex - bb.bitScanForward256());
}
} else {
while(true) {
require(bucket > 0, "BitMaps: The set bit before the index doesn't exist.");
unchecked {
bucket--;
}
// No offset. Always scan from the least significiant bit now.
bb = bitmap._data[bucket];
if(bb > 0) {
unchecked {
setBitIndex = (bucket << 8) | (255 - bb.bitScanForward256());
break;
}
}
}
}
}
function getBucket(BitMap storage bitmap, uint256 bucket) internal view returns (uint256) {
return bitmap._data[bucket];
}
}// SPDX-License-Identifier: MIT
/**
_____ ___ ___ __ ____ _ __
/ ___/____ / (_)___/ (_) /___ __ / __ )(_) /______
\__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/
___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ )
/____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/
/____/
- npm: https://www.npmjs.com/package/solidity-bits
- github: https://github.com/estarriolvetch/solidity-bits
*/
pragma solidity ^0.8.0;
library BitScan {
uint256 constant private DEBRUIJN_256 = 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff;
bytes constant private LOOKUP_TABLE_256 = hex"0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8";
/**
@dev Isolate the least significant set bit.
*/
function isolateLS1B256(uint256 bb) pure internal returns (uint256) {
require(bb > 0);
unchecked {
return bb & (0 - bb);
}
}
/**
@dev Isolate the most significant set bit.
*/
function isolateMS1B256(uint256 bb) pure internal returns (uint256) {
require(bb > 0);
unchecked {
bb |= bb >> 128;
bb |= bb >> 64;
bb |= bb >> 32;
bb |= bb >> 16;
bb |= bb >> 8;
bb |= bb >> 4;
bb |= bb >> 2;
bb |= bb >> 1;
return (bb >> 1) + 1;
}
}
/**
@dev Find the index of the lest significant set bit. (trailing zero count)
*/
function bitScanForward256(uint256 bb) pure internal returns (uint8) {
unchecked {
return uint8(LOOKUP_TABLE_256[(isolateLS1B256(bb) * DEBRUIJN_256) >> 248]);
}
}
/**
@dev Find the index of the most significant set bit.
*/
function bitScanReverse256(uint256 bb) pure internal returns (uint8) {
unchecked {
return 255 - uint8(LOOKUP_TABLE_256[((isolateMS1B256(bb) * DEBRUIJN_256) >> 248)]);
}
}
function log2(uint256 bb) pure internal returns (uint8) {
unchecked {
return uint8(LOOKUP_TABLE_256[(isolateMS1B256(bb) * DEBRUIJN_256) >> 248]);
}
}
}// SPDX-License-Identifier: MIT
/**
_____ ___ ___ __ ____ _ __
/ ___/____ / (_)___/ (_) /___ __ / __ )(_) /______
\__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/
___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ )
/____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/
/____/
- npm: https://www.npmjs.com/package/solidity-bits
- github: https://github.com/estarriolvetch/solidity-bits
*/
pragma solidity ^0.8.0;
library Popcount {
uint256 private constant m1 = 0x5555555555555555555555555555555555555555555555555555555555555555;
uint256 private constant m2 = 0x3333333333333333333333333333333333333333333333333333333333333333;
uint256 private constant m4 = 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f;
uint256 private constant h01 = 0x0101010101010101010101010101010101010101010101010101010101010101;
function popcount256A(uint256 x) internal pure returns (uint256 count) {
unchecked{
for (count=0; x!=0; count++)
x &= x - 1;
}
}
function popcount256B(uint256 x) internal pure returns (uint256) {
if (x == type(uint256).max) {
return 256;
}
unchecked {
x -= (x >> 1) & m1; //put count of each 2 bits into those 2 bits
x = (x & m2) + ((x >> 2) & m2); //put count of each 4 bits into those 4 bits
x = (x + (x >> 4)) & m4; //put count of each 8 bits into those 8 bits
x = (x * h01) >> 248; //returns left 8 bits of x + (x<<8) + (x<<16) + (x<<24) + ...
}
return x;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides a set of functions to operate with Base64 strings.
*
* _Available since v4.5._
*/
library Base64 {
/**
* @dev Base64 Encoding/Decoding Table
*/
string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/**
* @dev Converts a `bytes` to its Bytes64 `string` representation.
*/
function encode(bytes memory data) internal pure returns (string memory) {
/**
* Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
* https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
*/
if (data.length == 0) return "";
// Loads the table into memory
string memory table = _TABLE;
// Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
// and split into 4 numbers of 6 bits.
// The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
// - `data.length + 2` -> Round up
// - `/ 3` -> Number of 3-bytes chunks
// - `4 *` -> 4 characters for each chunk
string memory result = new string(4 * ((data.length + 2) / 3));
/// @solidity memory-safe-assembly
assembly {
// Prepare the lookup table (skip the first "length" byte)
let tablePtr := add(table, 1)
// Prepare result pointer, jump over length
let resultPtr := add(result, 32)
// Run over the input, 3 bytes at a time
for {
let dataPtr := data
let endPtr := add(data, mload(data))
} lt(dataPtr, endPtr) {
} {
// Advance 3 bytes
dataPtr := add(dataPtr, 3)
let input := mload(dataPtr)
// To write each character, shift the 3 bytes (18 bits) chunk
// 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
// and apply logical AND with 0x3F which is the number of
// the previous character in the ASCII table prior to the Base64 Table
// The result is then added to the table to get the character to write,
// and finally write it in the result pointer but with a left shift
// of 256 (1 byte) - 8 (1 ASCII char) = 248 bits
mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
resultPtr := add(resultPtr, 1) // Advance
mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
resultPtr := add(resultPtr, 1) // Advance
mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
resultPtr := add(resultPtr, 1) // Advance
mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
resultPtr := add(resultPtr, 1) // Advance
}
// When data `bytes` is not exactly 3 bytes long
// it is padded with `=` characters at the end
switch mod(mload(data), 3)
case 1 {
mstore8(sub(resultPtr, 1), 0x3d)
mstore8(sub(resultPtr, 2), 0x3d)
}
case 2 {
mstore8(sub(resultPtr, 1), 0x3d)
}
}
return result;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
* consuming from one or the other at each step according to the instructions given by
* `proofFlags`.
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
uint256 constant FOEVER = type(uint256).max;
address constant ZERO = 0x0000000000000000000000000000000000000000;
interface IVRFGenerator {
event RequestSent(uint256 requestId, uint32 numWords);
event RequestFulfilled(uint256 requestId, uint256[] randomWords);
// Assumes the subscription is funded sufficiently.
function requestRandomWords(uint32 numWords)
external
returns (uint256 requestId);
function getRequestStatus(uint256 _requestId)
external
view
returns (bool fulfilled, uint256[] memory randomWords);
function shuffle(uint256 size, uint256 entropy)
external
pure
returns (uint256[] memory);
function shuffle16(uint16 size, uint256 entropy)
external
pure
returns (uint16[] memory);
}// SPDX-License-Identifier: MIT
// IISOTOP version 0.10
// Creator: Dr. Zu team
pragma solidity ^0.8.4;
// mumbai
// address constant BEE_DDS_ADDRESS = 0x040E4c68d0B22C390C176515701D2B8dEcd17BEe;
// Mainnet
address constant BEE_DDS_ADDRESS = 0x8C0813590b65952197F5654ec953Ccc601725bEe;
/// @title PLAN-BEE IDDS Domain Data System 域名数据系统
/// @author Iwan Cao
/// @notice 开放使用合约,任何人可以存储自己的数据
/// @dev 每个domain可以存储一组key,每个key存储一个bytes数据. 默认的domain是公开的,任何人可读。如果需要私有化数据,选择DATATYPE 为PRIVATE。
/// @dev 数据的拥有者才能更改数据,更改为bytes(0)意味着删除这个key.
/// @dev 数据默认是msg.sender作为拥有者,如果需要个人账户tx.origin作为拥有者,请选择DATATYPE 为PERSONAL
/// @custom:planbee 这是一个PLAN-BEE计划认证的合约
interface IDDS {
enum DATATYPE {
PUBLIC_CONTRACT,
PUBLIC_PERSONAL,
PRIVATE_CONTRACT,
PRIVATE_PERSONAL
}
function put(
string calldata _domain,
string calldata _key,
bytes calldata _data,
DATATYPE _type
) external;
function put(
string calldata _domain,
string calldata _key,
bytes calldata _data
) external;
function getOwner(string calldata _domain) external view returns (address);
function get(string calldata _domain, string calldata _key)
external
view
returns (bytes memory);
function get(
string calldata _domain,
string calldata _key,
bool _personal
) external view returns (bytes memory);
function getKeys(string calldata _domain)
external
view
returns (string[] memory);
function getKeys(string calldata _domain, bool _personal)
external
view
returns (string[] memory);
function toAddress(bytes memory b) external pure returns (address addr);
function toInt(bytes calldata b) external pure returns (uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface IAccessories {
function mint(address _to, uint256 _amount) external;
function burn(uint256 tokenId) external;
}{
"evmVersion": "istanbul",
"optimizer": {
"enabled": true,
"runs": 200
},
"libraries": {
"AzuGoal.sol": {}
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"uint256","name":"mint_price","type":"uint256"},{"internalType":"uint256","name":"bet_price","type":"uint256"},{"internalType":"uint16","name":"share","type":"uint16"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"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":"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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"amount","type":"uint8"}],"name":"airDropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"baseUIRChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"cashedOut","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"publicSalePaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"publicSaleStart","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"showTimeNotStart","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"showTimeStart","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"whiteListSalesPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"whiteListSalesStart","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"id","type":"uint16"},{"indexed":false,"internalType":"address","name":"currentOwner","type":"address"}],"name":"winnerReleased","type":"event"},{"inputs":[],"name":"FAR_FUTURE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint8","name":"_team","type":"uint8"}],"name":"bet","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimAirDrops","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimBigWinnerCash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimCash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAirDrops","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBigWinnerCash","outputs":[{"internalType":"uint256","name":"_cash","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBigWinners","outputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCash","outputs":[{"internalType":"uint256","name":"_cash","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFinalHolders","outputs":[{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFinalWinners","outputs":[{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGamblers","outputs":[{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaycash","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"}],"name":"getRoundStatus","outputs":[{"components":[{"internalType":"uint8","name":"winner","type":"uint8"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"published","type":"bool"}],"internalType":"struct AzuGoal.Publish","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_who","type":"address"}],"name":"getWhiteListMint","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"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":[],"name":"isPublicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isShowTimeStart","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhiteListSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"quantity","type":"uint16"}],"name":"marketingMint","outputs":[],"stateMutability":"nonpayable","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":"pausePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseWhiteListSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"quantity","type":"uint8"}],"name":"publicSaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint8","name":"_team","type":"uint8"}],"name":"setFinalWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_operators","type":"address[]"}],"name":"setOperators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setURInew","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint8","name":"_team","type":"uint8"}],"name":"setWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"entropy","type":"uint256"}],"name":"shuffle","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"startPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startShowTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startWhiteListSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenInfo","outputs":[{"internalType":"uint256","name":"_team","type":"uint256"},{"internalType":"uint256","name":"_no","type":"uint256"},{"internalType":"uint256","name":"_bet","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint8","name":"quantity","type":"uint8"}],"name":"whitelistMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[{"internalType":"uint256","name":"split1","type":"uint256"},{"internalType":"uint256","name":"split2","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
600661048081815265109c985e9a5b60d21b6104a052608090815260086104c081815267141bdc9d1d59d85b60c21b6104e05260a05260056105008181526429b830b4b760d91b6105205260c052600b6105408181526a4e65746865726c616e647360a81b6105605260e052600761058081815266115b99db185b9960ca1b6105a0526101005260046105c0818152632a97299760e11b6105e052610120526106009081526324b930b760e11b61062052610140526106408381526457616c657360d81b6106605261016052610680838152644768616e6160d81b6106a05261018052600c6106c09081526b53617564692041726162696160a01b6106e0526101a052610700868152654d657869636f60d01b610720526101c05261074086815265141bdb185b9960d21b610760526101e052610780868152654672616e636560d01b6107a0526102005260096107c0818152684175737472616c696160b81b6107e052610220526108008281526644656e6d61726b60c81b61082052610240526108408281526654756e6973696160c81b61086052610260526108808281526614d95b9959d85b60ca1b6108a05261028052600a6108c090815269436f737461205269636160b01b6108e0526102a052610900828152664765726d616e7960c81b610920526102c052610940848152642530b830b760d91b610960526102e0526109808281526642656c6769756d60c81b6109a052610300526109c08781526543616e61646160d01b6109e05261032052610a00828152664d6f726f63636f60c81b610a205261034052610a408281526643726f6174696160c81b610a605261036052610a809384526428b0ba30b960d91b610aa05261038093909352610ac09586526553657262696160d01b610ae0526103a095909552610b008181526a14ddda5d1e995c9b185b9960aa1b610b20526103c052610b409283526721b0b6b2b937b7b760c11b610b60526103e092909252610b808481526622b1bab0b237b960c91b610ba05261040052610bc081815268417267656e74696e6160b81b610be05261042052610c00938452665572756775617960c81b610c205261044093909352610c80604052610c409081526a536f757468204b6f72656160a81b610c60526104605262000353919060206200072e565b506000196029819055602a819055602b556036805463ffffffff191663ffffffff1790553480156200038457600080fd5b5060405162006b0338038062006b03833981016040819052620003a7916200094f565b6040805180820182526007815266105e9d51dbd85b60ca1b602080830191825283518085019094526003845262415a4760e81b908401528151919291620003f19160019162000785565b5080516200040790600290602084019062000785565b505050620004246200041e620006d860201b60201c565b620006dc565b60016008556103e861ffff83161115620004845760405162461bcd60e51b815260206004820152601d60248201527f7368617265206d757374206265747765656e203020616e642031303030000000604482015260640160405180910390fd5b84516200049990602c90602088019062000785565b50602e849055602f8390556030805461ffff191661ffff8416179055602d819055604051633e10510b60e01b8152738c0813590b65952197f5654ec953ccc601725bee90632d888869908290633e10510b90620004f990600401620009de565b600060405180830381865afa15801562000517573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000541919081019062000a33565b6040518263ffffffff1660e01b81526004016200055f919062000a88565b602060405180830381865afa1580156200057d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005a3919062000abd565b603d80546001600160a01b0319166001600160a01b0392909216919091179055604051633e10510b60e01b8152738c0813590b65952197f5654ec953ccc601725bee90632d888869908290633e10510b90620006029060040162000aef565b600060405180830381865afa15801562000620573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200064a919081019062000a33565b6040518263ffffffff1660e01b815260040162000668919062000a88565b602060405180830381865afa15801562000686573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006ac919062000abd565b603c80546001600160a01b0319166001600160a01b03929092169190911790555062000b8e9350505050565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b826020810192821562000773579160200282015b828111156200077357825180516200076291849160209091019062000785565b509160200191906001019062000742565b506200078192915062000810565b5090565b828054620007939062000b52565b90600052602060002090601f016020900481019282620007b7576000855562000802565b82601f10620007d257805160ff191683800117855562000802565b8280016001018555821562000802579182015b8281111562000802578251825591602001919060010190620007e5565b506200078192915062000831565b808211156200078157600062000827828262000848565b5060010162000810565b5b8082111562000781576000815560010162000832565b508054620008569062000b52565b6000825580601f1062000867575050565b601f01602090049060005260206000209081019062000887919062000831565b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620008bd578181015183820152602001620008a3565b83811115620008cd576000848401525b50505050565b60006001600160401b0380841115620008f057620008f06200088a565b604051601f8501601f19908116603f011681019082821181831017156200091b576200091b6200088a565b816040528093508581528686860111156200093557600080fd5b62000945866020830187620008a0565b5050509392505050565b600080600080600060a086880312156200096857600080fd5b85516001600160401b038111156200097f57600080fd5b8601601f810188136200099157600080fd5b620009a288825160208401620008d3565b9550506020860151935060408601519250606086015161ffff81168114620009c957600080fd5b80925050608086015190509295509295909350565b60408152600062000a05604083016006815265049534f544f560d41b602082015260400190565b828103602093840152600f81526e4245455f5652465f4144445245535360881b928101929092525060400190565b60006020828403121562000a4657600080fd5b81516001600160401b0381111562000a5d57600080fd5b8201601f8101841362000a6f57600080fd5b62000a8084825160208401620008d3565b949350505050565b602081526000825180602084015262000aa9816040850160208701620008a0565b601f01601f19169190910160400192915050565b60006020828403121562000ad057600080fd5b81516001600160a01b038116811462000ae857600080fd5b9392505050565b60408152600062000b16604083016006815265049534f544f560d41b602082015260400190565b828103602093840152601481527f4245455f415a555f50524f505f41444452455353000000000000000000000000928101929092525060400190565b600181811c9082168062000b6757607f821691505b60208210810362000b8857634e487b7160e01b600052602260045260246000fd5b50919050565b615f658062000b9e6000396000f3fe6080604052600436106103765760003560e01c80636352211e116101d1578063be9a2d2311610102578063d58b83e3116100a0578063e985e9c51161006f578063e985e9c514610aa3578063ec427d4014610aec578063f2fde38b14610b25578063f54b70bf14610b4557600080fd5b8063d58b83e314610a36578063d826f88f14610a4e578063dab5f34014610a63578063ddf71cd514610a8357600080fd5b8063c87b56dd116100dc578063c87b56dd1461099b578063ca905dc0146109bb578063cc33c875146109db578063ce70cd8d14610a1657600080fd5b8063be9a2d2314610948578063c76df80e14610968578063c82b94251461097b57600080fd5b80638da5cb5b1161016f578063a22cb46511610149578063a22cb465146108d5578063a7d2161c146108f5578063b22fc0a014610908578063b88d4fde1461092857600080fd5b80638da5cb5b1461088d57806395d89b41146108ab578063a2155539146108c057600080fd5b806370a08231116101ab57806370a08231146107f9578063715018a614610819578063768a76741461082e57806379502c551461084357600080fd5b80636352211e146107a3578063644ae063146107c35780636b747d63146107e357600080fd5b806328b6b4f8116102ab578063422326f41161024957806345ecfb171161022357806345ecfb171461072b5780634f6ccce71461074357806355d5a012146107635780635a3f26721461078357600080fd5b8063422326f41461064957806342842e0e1461065e578063436ffa3f1461067e57600080fd5b80632f745c59116102855780632f745c59146105d457806332cb6b0c146105f4578063363e59991461060a5780633ccfd60b1461061f57600080fd5b806328b6b4f81461055557806329fa6d02146105755780632c09e7c1146105a257600080fd5b80630c41f4971161031857806318160ddd116102f257806318160ddd146104cd5780631845994d146104ec5780631e84c4131461051d57806323b872dd1461053557600080fd5b80630c41f4971461048357806313069dfd1461049857806314748994146104b857600080fd5b8063081812fc11610354578063081812fc146103f4578063095ea7b31461042c57806309eeebb01461044c5780630c1c972a1461046e57600080fd5b806301ffc9a71461037b57806302d179c8146103b057806306fdde03146103d2575b600080fd5b34801561038757600080fd5b5061039b610396366004614fc9565b610b5a565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103d06103cb366004615042565b610bc7565b005b3480156103de57600080fd5b506103e7610ed5565b6040516103a791906150ed565b34801561040057600080fd5b5061041461040f366004615100565b610f67565b6040516001600160a01b0390911681526020016103a7565b34801561043857600080fd5b506103d0610447366004615130565b610ff4565b34801561045857600080fd5b5061046161110b565b6040516103a7919061515a565b34801561047a57600080fd5b506103d061118a565b34801561048f57600080fd5b506103d061120e565b3480156104a457600080fd5b506103d06104b3366004615100565b61128c565b3480156104c457600080fd5b5061046161142a565b3480156104d957600080fd5b506004545b6040519081526020016103a7565b3480156104f857600080fd5b506036546040805161ffff8084168252620100009093049092166020830152016103a7565b34801561052957600080fd5b50602a5442101561039b565b34801561054157600080fd5b506103d06105503660046151a2565b611485565b34801561056157600080fd5b506104de610570366004615100565b6114b6565b34801561058157600080fd5b506105956105903660046151de565b6115a7565b6040516103a79190615200565b3480156105ae57600080fd5b506105c26105bd366004615100565b611758565b60405160ff90911681526020016103a7565b3480156105e057600080fd5b506104de6105ef366004615130565b6117be565b34801561060057600080fd5b506104de61258081565b34801561061657600080fd5b506103d0611888565b34801561062b57600080fd5b50610634611906565b604080519283526020830191909152016103a7565b34801561065557600080fd5b50610461611b37565b34801561066a57600080fd5b506103d06106793660046151a2565b611b92565b34801561068a57600080fd5b506106fb610699366004615238565b60408051606080820183526000808352602080840182905292840181905260ff9485168152603183528390208351918201845254808516825261010081046001600160a01b031692820192909252600160a81b90910490921615159082015290565b60408051825160ff1681526020808401516001600160a01b031690820152918101511515908201526060016103a7565b34801561073757600080fd5b5060295442101561039b565b34801561074f57600080fd5b506104de61075e366004615100565b611bad565b34801561076f57600080fd5b506104de61077e366004615100565b611c67565b34801561078f57600080fd5b5061059561079e366004615253565b611df0565b3480156107af57600080fd5b506104146107be366004615100565b611eb0565b3480156107cf57600080fd5b506103d06107de36600461526e565b611ec7565b3480156107ef57600080fd5b506104de60001981565b34801561080557600080fd5b506104de610814366004615253565b6121af565b34801561082557600080fd5b506103d061227f565b34801561083a57600080fd5b50610634612293565b34801561084f57600080fd5b506108586122aa565b6040516103a794939291906001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b34801561089957600080fd5b506007546001600160a01b0316610414565b3480156108b757600080fd5b506103e76122ee565b3480156108cc57600080fd5b506103d06122fd565b3480156108e157600080fd5b506103d06108f03660046152af565b6125da565b6103d06109033660046152f6565b61269e565b34801561091457600080fd5b506103d0610923366004615314565b612a46565b34801561093457600080fd5b506103d06109433660046153ce565b612b57565b34801561095457600080fd5b506103d0610963366004615100565b612b8f565b6103d0610976366004615238565b612e97565b34801561098757600080fd5b506103e7610996366004615449565b6131d8565b3480156109a757600080fd5b506103e76109b6366004615100565b6132bf565b3480156109c757600080fd5b506103d06109d636600461526e565b61361b565b3480156109e757600080fd5b506109fb6109f6366004615100565b613e2d565b604080519384526020840192909252908201526060016103a7565b348015610a2257600080fd5b506103d0610a31366004615100565b613ef6565b348015610a4257600080fd5b50602b5442101561039b565b348015610a5a57600080fd5b506103d061416e565b348015610a6f57600080fd5b506103d0610a7e366004615100565b6141ce565b348015610a8f57600080fd5b506103d0610a9e366004615491565b6141db565b348015610aaf57600080fd5b5061039b610abe3660046154d2565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610af857600080fd5b506105c2610b07366004615253565b6001600160a01b03166000908152603a602052604090205460ff1690565b348015610b3157600080fd5b506103d0610b40366004615253565b614255565b348015610b5157600080fd5b506103d06142ce565b60006001600160e01b031982166380ac58cd60e01b1480610b8b57506001600160e01b03198216635b5e139f60e01b145b80610ba657506001600160e01b0319821663780e9d6360e01b145b80610bc157506301ffc9a760e01b6001600160e01b03198316145b92915050565b323314610bef5760405162461bcd60e51b8152600401610be6906154fc565b60405180910390fd5b600260085403610c115760405162461bcd60e51b8152600401610be690615542565b6002600855602954421015610c685760405162461bcd60e51b815260206004820152601b60248201527f57686974656c6973742053616c6573204e6f74205374617274656400000000006044820152606401610be6565b602b544210610cb95760405162461bcd60e51b815260206004820152601860248201527f57686974654c6973742053616c65732046696e697368656400000000000000006044820152606401610be6565b336000908152603a6020526040902054600290610cda90839060ff1661558f565b60ff161115610d1f5760405162461bcd60e51b81526020600482015260116024820152701b585e080c8813919508185b1b1bddd959607a1b6044820152606401610be6565b60325461258090610d349060ff8416906155b4565b1115610d525760405162461bcd60e51b8152600401610be6906155cc565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610dcc84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050602d5491508490506143bc565b610e0c5760405162461bcd60e51b8152602060048201526011602482015270139bdd081a5b881dda1a5d19481b1a5cdd607a1b6044820152606401610be6565b610e19338360ff166143d2565b60005b8260ff168160ff161015610e8c57603280546001810182556000919091527f11df491316f14931039edfd4f8964c9a443b862f02d4c7611d18c2bc4e6ff697600a808304919091018054919092066003026101000a62ffffff021916905580610e84816155f2565b915050610e1c565b50336000908152603a602052604081208054849290610eaf90849060ff1661558f565b92506101000a81548160ff021916908360ff160217905550506001600881905550505050565b606060018054610ee490615611565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1090615611565b8015610f5d5780601f10610f3257610100808354040283529160200191610f5d565b820191906000526020600020905b815481529060010190602001808311610f4057829003601f168201915b5050505050905090565b6000610f74826004541190565b610fd85760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610be6565b506000908152600560205260409020546001600160a01b031690565b6000610fff82611eb0565b9050806001600160a01b0316836001600160a01b03160361106e5760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610be6565b336001600160a01b038216148061108a575061108a8133610abe565b6110fc5760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610be6565b6111068383614537565b505050565b6060603b805480602002602001604051908101604052809291908181526020018280548015610f5d57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116111485790505050505050905090565b3260009081526039602052604090205460ff161580156111b557506007546001600160a01b03163314155b156111d25760405162461bcd60e51b8152600401610be69061564b565b42602a8190556040519081527ff5873041cf54025a0d378efc70d90938908e7499c3f41d007dc37938ae92345d906020015b60405180910390a1565b3260009081526039602052604090205460ff1615801561123957506007546001600160a01b03163314155b156112565760405162461bcd60e51b8152600401610be69061564b565b600019602a556040514281527f1557f02db43c040d49a0619c1083e57b0c263e11d8dd388416ab9a6ce1a4380f90602001611204565b3233146112ab5760405162461bcd60e51b8152600401610be6906154fc565b6002600854036112cd5760405162461bcd60e51b8152600401610be690615542565b6002600855336112dc82611eb0565b6001600160a01b0316146113025760405162461bcd60e51b8152600401610be690615682565b61ffff811660009081526033602052604081205460ff169081900361135d5760405162461bcd60e51b81526020600482015260116024820152701b9bc8185a5c991c9bdc1cc8199bdd5b99607a1b6044820152606401610be6565b603c546040516340c10f1960e01b815233600482015260ff831660248201526001600160a01b03909116906340c10f1990604401600060405180830381600087803b1580156113ab57600080fd5b505af11580156113bf573d6000803e3d6000fd5b5050505061ffff8216600090815260336020908152604091829020805460ff19169055815133815290810184905260ff83168183015290517f2f977e68df69d63cdf91a6aa90360df2140f3e62de2b992f6152b00d3714d98e9181900360600190a150506001600855565b60606034805480602002602001604051908101604052809291908181526020018280548015610f5d576000918252602091829020805461ffff1684529082028301929091600291018084116111485790505050505050905090565b61148f33826145a5565b6114ab5760405162461bcd60e51b8152600401610be6906156a6565b611106838383614694565b604060009081526031602052600080516020615dd083398151915254600160a81b900460ff166114f85760405162461bcd60e51b8152600401610be6906156fa565b60365461ffff16820361154f5760385460ff161561154f57611542600261153c61271061153c6032611536605c603f5461488090919063ffffffff16565b90614880565b90614893565b61154c90826155b4565b90505b60365462010000900461ffff1682036115a257603854610100900460ff16156115a257611598600261153c61271061153c6032611536605c603f5461488090919063ffffffff16565b610bc190826155b4565b919050565b60606000836001600160401b038111156115c3576115c3615331565b6040519080825280602002602001820160405280156115ec578160200160208202803683370190505b50905060005b8481101561162a578082828151811061160d5761160d615731565b60209081029190910101528061162281615747565b9150506115f2565b5060008360405160200161164091815260200190565b60405160208183030381529060405280519060200120905060006001866116679190615760565b905060015b611677600188615760565b81101561174d57600061168a838561578d565b905060008584815181106116a0576116a0615731565b602002602001015190508582815181106116bc576116bc615731565b60200260200101518685815181106116d6576116d6615731565b602002602001018181525050808683815181106116f5576116f5615731565b60209081029190910101528361170a816157a1565b9450508460405160200161172091815260200190565b6040516020818303038152906040528051906020012094505050808061174590615747565b91505061166c565b509195945050505050565b6000611765826004541190565b6117a45760405162461bcd60e51b815260206004820152601060248201526f746f6b656e206e6f742065786973747360801b6044820152606401610be6565b5061ffff1660009081526033602052604090205460ff1690565b60008060005b600454811015611833576117d9816004541190565b80156117fe57506117e981611eb0565b6001600160a01b0316856001600160a01b0316145b1561182157838203611813579150610bc19050565b8161181d81615747565b9250505b8061182b81615747565b9150506117c4565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b6064820152608401610be6565b3260009081526039602052604090205460ff161580156118b357506007546001600160a01b03163314155b156118d05760405162461bcd60e51b8152600401610be69061564b565b6000196029556040514281527faa093fe79932fd0110de88ab16447933731a0bcda9d56d98bd30215ca118bdcb90602001611204565b60008061191161489f565b60406000526031602052600080516020615dd083398151915254600160a81b900460ff166119815760405162461bcd60e51b815260206004820152601960248201527f66696e616c2077696e6e6572206e6f742072657665616c6564000000000000006044820152606401610be6565b6000604054116119c05760405162461bcd60e51b815260206004820152600a60248201526918d85cda1959081bdd5d60b21b6044820152606401610be6565b60006040546119e0606461153c6008603f5461488090919063ffffffff16565b6119ea91906155b4565b603054909150611a07906103e89061153c90849061ffff16614880565b9250611a138382615760565b604051909250600090737b0dc23e87febf1d053e7df9af4cce30f21fae9c9085908381818185875af1925050503d8060008114611a6c576040519150601f19603f3d011682016040523d82523d6000602084013e611a71565b606091505b5050604051909150600090739da32f03cc23f9156daa7442cadbe8366ddac1239085908381818185875af1925050503d8060008114611acc576040519150601f19603f3d011682016040523d82523d6000602084013e611ad1565b606091505b50509050818015611adf5750805b611b2b5760405162461bcd60e51b815260206004820152601860248201527f7769746864726177207472616e73666572206661696c656400000000000000006044820152606401610be6565b50506000604055509091565b60606035805480602002602001604051908101604052809291908181526020018280548015610f5d576000918252602091829020805461ffff1684529082028301929091600291018084116111485790505050505050905090565b61110683838360405180602001604052806000815250612b57565b6000611bb860045490565b8210611c145760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f6620626044820152646f756e647360d81b6064820152608401610be6565b6000805b600454811015611c6057611c2d816004541190565b15611c4e57838203611c40579392505050565b81611c4a81615747565b9250505b80611c5881615747565b915050611c18565b5050919050565b604060009081526031602052600080516020615dd083398151915254600160a81b900460ff16611ca95760405162461bcd60e51b8152600401610be6906156fa565b61ffff821660009081526037602052604090205460ff16611ccc57506000919050565b60345460005b81811015611d5d578360348281548110611cee57611cee615731565b60009182526020909120601082040154600f9091166002026101000a900461ffff1603611d4b57611d3a8261153c61271061153c6028611536605c603f5461488090919063ffffffff16565b611d4490846155b4565b9250611d5d565b80611d5581615747565b915050611cd2565b505060355460005b81811015611c60578360358281548110611d8157611d81615731565b60009182526020909120601082040154600f9091166002026101000a900461ffff1603611dde57611dcd8261153c61271061153c600a611536605c603f5461488090919063ffffffff16565b611dd790846155b4565b9250611c60565b80611de881615747565b915050611d65565b6060323314611e115760405162461bcd60e51b8152600401610be6906154fc565b6000611e1c836121af565b90506000816001600160401b03811115611e3857611e38615331565b604051908082528060200260200182016040528015611e61578160200160208202803683370190505b50905060005b82811015611ea857611e7985826117be565b828281518110611e8b57611e8b615731565b602090810291909101015280611ea081615747565b915050611e67565b509392505050565b6000806000611ebe846148f9565b50949350505050565b3260009081526039602052604090205460ff16158015611ef257506007546001600160a01b03163314155b15611f0f5760405162461bcd60e51b8152600401610be69061564b565b60408260ff1610611f525760405162461bcd60e51b815260206004820152600d60248201526c6d6178203634206d617463687360981b6044820152606401610be6565b60ff808316600090815260316020526040902054600160a81b90041615611fb65760405162461bcd60e51b81526020600482015260186024820152771d1a1a5cc81c9bdd5b99081a1859081c1d589b1a5cda195960421b6044820152606401610be6565b60ff821660009081526031602052604090205461010090046001600160a01b03161580612002575060ff821660009081526031602052604090205461010090046001600160a01b031633145b1561207d576040805160608101825260ff80841682523360208084019182526000848601818152888516825260319092529490942092518354915194511515600160a81b0260ff60a81b196001600160a01b0396909616610100026001600160a81b0319909316919093161717929092169190911790555050565b60ff8281166000908152603160205260409020548116908216146120cd5760ff918216600090815260316020526040902080546001600160a81b031916336101000260ff19161791909216179055565b60005b60325461ffff82161015612186578160ff16600f60328361ffff16815481106120fb576120fb615731565b90600052602060002090600a91828204019190066003029054906101000a900462ffffff1662ffffff16901c601f1662ffffff16036121745761ffff8116600090815260336020526040812080546001929061215b90849060ff1661558f565b92506101000a81548160ff021916908360ff1602179055505b8061217e816157b8565b9150506120d0565b5060ff82166000908152603160205260409020805460ff60a81b1916600160a81b1790555b5050565b60006001600160a01b03821661221d5760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610be6565b6000805b60045481101561227857612236816004541190565b156122685761224481611eb0565b6001600160a01b0316846001600160a01b0316036122685761226582615747565b91505b61227181615747565b9050612221565b5092915050565b61228761489f565b6122916000614992565b565b60008061229e61489f565b5050603f546040549091565b6000806000806122b861489f565b5050603d54603c54602d54738c0813590b65952197f5654ec953ccc601725bee94506001600160a01b0392831693509116919293565b606060028054610ee490615611565b3260009081526039602052604090205460ff1615801561232857506007546001600160a01b03163314155b156123455760405162461bcd60e51b8152600401610be69061564b565b600019602b541461238b5760405162461bcd60e51b815260206004820152601060248201526f14da1d59999b19481a185c1c195b995960821b6044820152606401610be6565b42602b819055603e541561244357603d54603e5460405163d8a4676f60e01b815260009283926001600160a01b039091169163d8a4676f916123d39160040190815260200190565b600060405180830381865afa1580156123f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261241891908101906157fc565b915091508115612440578060008151811061243557612435615731565b602002602001015192505b50505b603d54604051634039d7e760e11b81526125806004820152602481018390526000916001600160a01b031690638073afce90604401600060405180830381865afa158015612495573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124bd91908101906158a8565b905060005b6032548110156125a257600061012c8383815181106124e3576124e3615731565b602002602001015161ffff16816124fc576124fc615777565b0461ffff169050600061012c84848151811061251a5761251a615731565b602002602001015161ffff168161253357612533615777565b0661ffff16905060068162ffffff16901b600f8362ffffff16901b016032848154811061256257612562615731565b90600052602060002090600a91828204019190066003026101000a81548162ffffff021916908362ffffff160217905550505080806001019150506124c2565b506040514281527f4e79c0a66a5bc111570353aa23cc02a57113c396631897691b3bcce74bc015f59060200160405180910390a15050565b336001600160a01b038316036126325760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610be6565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3233146126bd5760405162461bcd60e51b8152600401610be6906154fc565b6002600854036126df5760405162461bcd60e51b8152600401610be690615542565b6002600855602b544210156127365760405162461bcd60e51b815260206004820152601960248201527f5075626c69632053616c6573206e6f742046696e6973686564000000000000006044820152606401610be6565b60208160ff16106127815760405162461bcd60e51b815260206004820152601560248201527413db9b1e480ccc881d19585b5cc81cdd5c1c1bdc9d605a1b6044820152606401610be6565b6127908261ffff166004541190565b6127cf5760405162461bcd60e51b815260206004820152601060248201526f746f6b656e206e6f742065786973747360801b6044820152606401610be6565b336127dd61ffff8416611eb0565b6001600160a01b0316146128035760405162461bcd60e51b8152600401610be690615682565b60328261ffff168154811061281a5761281a615731565b6000918252602091829020600a8083049091015491066003026101000a900416156128735760405162461bcd60e51b81526020600482015260096024820152682132ba103a37b5b2b760b91b6044820152606401610be6565b602f543410156128bc5760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d0814185e5b595b9d60621b6044820152606401610be6565b8060201760ff1660328361ffff16815481106128da576128da615731565b90600052602060002090600a91828204019190066003028282829054906101000a900462ffffff1661290c9190615941565b825461010092830a62ffffff81810219909216929091160217909155603b80546001810182556000919091527fbbe3212124853f8b0084a66a2d057c2966e251e132af3691db153ab65f0d1a4d60108204018054600f90921660020290920a61ffff818102199092169186160217905550602f54341115612a2457602f54600090339061299a9034906149e4565b604051600081818185875af1925050503d80600081146129d6576040519150601f19603f3d011682016040523d82523d6000602084013e6129db565b606091505b5050905080612a225760405162461bcd60e51b815260206004820152601360248201527210995d081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610be6565b505b602f54603f6000828254612a3891906155b4565b909155505060016008555050565b612a4e61489f565b602b544210612a905760405162461bcd60e51b815260206004820152600e60248201526d14d85b195cc8119a5b9a5cda195960921b6044820152606401610be6565b60325461258090612aa69061ffff8416906155b4565b1115612ac45760405162461bcd60e51b8152600401610be6906155cc565b612ae3612ad96007546001600160a01b031690565b8261ffff166143d2565b60005b8161ffff168160ff1610156121ab57603280546001810182556000919091527f11df491316f14931039edfd4f8964c9a443b862f02d4c7611d18c2bc4e6ff697600a808304919091018054919092066003026101000a62ffffff021916905580612b4f816155f2565b915050612ae6565b612b6133836145a5565b612b7d5760405162461bcd60e51b8152600401610be6906156a6565b612b89848484846149f0565b50505050565b323314612bae5760405162461bcd60e51b8152600401610be6906154fc565b600260085403612bd05760405162461bcd60e51b8152600401610be690615542565b600260085533612bdf82611eb0565b6001600160a01b031614612c055760405162461bcd60e51b8152600401610be690615682565b60406000526031602052600080516020615dd083398151915254600160a81b900460ff16612c455760405162461bcd60e51b8152600401610be6906156fa565b61ffff811660009081526037602052604090205460ff16612c785760405162461bcd60e51b8152600401610be690615968565b603454600090815b81811015612d0b578360348281548110612c9c57612c9c615731565b60009182526020909120601082040154600f9091166002026101000a900461ffff1603612cf957612ce88261153c61271061153c6028611536605c603f5461488090919063ffffffff16565b612cf290846155b4565b9250612d0b565b80612d0381615747565b915050612c80565b505060355460005b81811015612d9e578360358281548110612d2f57612d2f615731565b60009182526020909120601082040154600f9091166002026101000a900461ffff1603612d8c57612d7b8261153c61271061153c600a611536605c603f5461488090919063ffffffff16565b612d8590846155b4565b9250612d9e565b80612d9681615747565b915050612d13565b50604051600090339084908381818185875af1925050503d8060008114612de1576040519150601f19603f3d011682016040523d82523d6000602084013e612de6565b606091505b5050905080612e2f5760405162461bcd60e51b815260206004820152601560248201527410db185a5b481d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610be6565b61ffff8416600090815260376020908152604091829020805460ff1916905581513381529081018690529081018490527fd08149829b4708b5a796078ac79020343425f5db94b97dfc5fe89f1e9caffb139060600160405180910390a1505060016008555050565b323314612eb65760405162461bcd60e51b8152600401610be6906154fc565b600260085403612ed85760405162461bcd60e51b8152600401610be690615542565b6002600855602a54421015612f2f5760405162461bcd60e51b815260206004820152601860248201527f5075626c69632053616c6573204e6f74205374617274656400000000000000006044820152606401610be6565b602b544210612f785760405162461bcd60e51b8152602060048201526015602482015274141d589b1a58c814d85b195cc8119a5b9a5cda1959605a1b6044820152606401610be6565b336000908152603a602052604090205460ff16612f9690600461558f565b60ff168160ff16612fa6336121af565b612fb091906155b4565b1115612ffe5760405162461bcd60e51b815260206004820152601d60248201527f6d61782034207075626c69632073616c65204e465420616c6c6f7765640000006044820152606401610be6565b603254612580906130139060ff8416906155b4565b11156130315760405162461bcd60e51b8152600401610be6906155cc565b602e546000906130449060ff8416614880565b90508034101561308d5760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d0814185e5b595b9d60621b6044820152606401610be6565b806040600082825461309f91906155b4565b909155506130b290503360ff84166143d2565b60005b8260ff168160ff16101561312557603280546001810182556000919091527f11df491316f14931039edfd4f8964c9a443b862f02d4c7611d18c2bc4e6ff697600a808304919091018054919092066003026101000a62ffffff02191690558061311d816155f2565b9150506130b5565b50803411156131cf5760003361313b34846149e4565b604051600081818185875af1925050503d8060008114613177576040519150601f19603f3d011682016040523d82523d6000602084013e61317c565b606091505b50509050806131cd5760405162461bcd60e51b815260206004820152601c60248201527f5075626c69632073616c6573207472616e73666572206661696c6564000000006044820152606401610be6565b505b50506001600855565b60606131e261489f565b81516131f590602c906020850190614f1a565b507fbd6f5dd2ce6bb9b156a79d476e3238d1b38751859176633c23f0a0f4f53b63c18260405161322591906150ed565b60405180910390a1602c805461323a90615611565b80601f016020809104026020016040519081016040528092919081815260200182805461326690615611565b80156132b35780601f10613288576101008083540402835291602001916132b3565b820191906000526020600020905b81548152906001019060200180831161329657829003601f168201915b50505050509050919050565b60606132cc826004541190565b61330c5760405162461bcd60e51b81526020600482015260116024820152703737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610be6565b602b544210156133445761331e614a25565b60405160200161332e91906159b3565b6040516020818303038152906040529050919050565b60006032838154811061335957613359615731565b90600052602060002090600a91828204019190066003029054906101000a900462ffffff16905060006009600f8362ffffff16901c601f1662ffffff16602081106133a6576133a6615731565b0180546133b290615611565b80601f01602080910402602001604051908101604052809291908181526020018280546133de90615611565b801561342b5780601f106134005761010080835404028352916020019161342b565b820191906000526020600020905b81548152906001019060200180831161340e57829003601f168201915b50505050509050600061344f60068462ffffff16901c6101ff1662ffffff16614a34565b604080518082019091526007815266139bdd0810995d60ca1b602082015290915060006101ff600686901c1661348e601f600f88901c1661012c6159e1565b6134989190615941565b62ffffff1690506060602086161561357d576009601f8716602081106134c0576134c0615731565b0180546134cc90615611565b80601f01602080910402602001604051908101604052809291908181526020018280546134f890615611565b80156135455780601f1061351a57610100808354040283529160200191613545565b820191906000526020600020905b81548152906001019060200180831161352857829003601f168201915b5050505050925061355582614a34565b83604051602001613567929190615a0c565b60405160208183030381529060405290506135a8565b61358682614a34565b6040516020016135969190615a66565b60405160208183030381529060405290505b6000816135b3614a25565b6135bc85614a34565b8888886040516020016135d496959493929190615a9b565b60405160208183030381529060405290506135ee81614a6c565b6040516020016135fe9190615c8f565b604051602081830303815290604052975050505050505050919050565b3260009081526039602052604090205460ff1615801561364657506007546001600160a01b03163314155b156136635760405162461bcd60e51b8152600401610be69061564b565b8160ff166040146136b65760405162461bcd60e51b815260206004820152601d60248201527f66696e616c20726f756e64206d757374206265203634206d61746368730000006044820152606401610be6565b60ff808316600090815260316020526040902054600160a81b9004161561371a5760405162461bcd60e51b81526020600482015260186024820152771d1a1a5cc81c9bdd5b99081a1859081c1d589b1a5cda195960421b6044820152606401610be6565b60ff821660009081526031602052604090205461010090046001600160a01b03161580613766575060ff821660009081526031602052604090205461010090046001600160a01b031633145b156137e1576040805160608101825260ff80841682523360208084019182526000848601818152888516825260319092529490942092518354915194511515600160a81b0260ff60a81b196001600160a01b0396909616610100026001600160a81b0319909316919093161717929092169190911790555050565b60ff8281166000908152603160205260409020548116908216146138315760ff918216600090815260316020526040902080546001600160a81b031916336101000260ff19161791909216179055565b60325460005b818161ffff1610156139ed57600060328261ffff168154811061385c5761385c615731565b90600052602060002090600a91828204019190066003029054906101000a900462ffffff1690508360ff16600f8262ffffff16901c601f1662ffffff160361394f5761ffff821660009081526033602052604081208054600192906138c590849060ff1661558f565b825460ff91821661010093840a9081029202191617909155603580546001818101909255601081047fcfa4bec1d3298408bb5afcfcd9c430549c5b31f8aa5c5848151c0a55f473c34d01805461ffff8089166002600f9095169490940290950a8381029502191693909317909255600091825260376020526040909120805460ff19169091179055505b60208116158015906139665750601f811660ff8516145b156139da57603480546001818101909255601081047f46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c101805461ffff8087166002600f909516949094026101000a8481029102199091161790556000908152603760205260409020805460ff191690911790555b50806139e5816157b8565b915050613837565b50603454600003613a20575060ff82166000908152603160205260409020805460ff60a81b1916600160a81b1790555050565b603454600103613ac9576034600081548110613a3e57613a3e615731565b60009182526020822060108204015460368054600f9093166002026101000a90910461ffff1661ffff1990921691909117905560348054909190613a8457613a84615731565b90600052602060002090601091828204019190066002029054906101000a900461ffff16603660026101000a81548161ffff021916908361ffff160217905550613d42565b603454600203613b30576034600081548110613ae757613ae7615731565b6000918252602090912060108204015460368054600f9093166002026101000a90910461ffff1661ffff19909216919091179055603480546001908110613a8457613a84615731565b603e54429015613be457603d54603e5460405163d8a4676f60e01b815260009283926001600160a01b039091169163d8a4676f91613b749160040190815260200190565b600060405180830381865afa158015613b91573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613bb991908101906157fc565b915091508115613be15780600181518110613bd657613bd6615731565b602002602001015192505b50505b603d54603454604051634039d7e760e11b815261ffff9091166004820152602481018390526000916001600160a01b031690638073afce90604401600060405180830381865afa158015613c3c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613c6491908101906158a8565b9050603481600081518110613c7b57613c7b615731565b602002602001015161ffff1681548110613c9757613c97615731565b6000918252602090912060108204015460368054600f9093166002026101000a90910461ffff1661ffff19909216919091179055805160349082906001908110613ce357613ce3615731565b602002602001015161ffff1681548110613cff57613cff615731565b90600052602060002090601091828204019190066002029054906101000a900461ffff16603660026101000a81548161ffff021916908361ffff16021790555050505b6038805461ffff19166101011790556036547f246071332ec3cecbddeebfd36569844838470b18b27bf4c8f06390c7ef630b0f9061ffff16613d8381611eb0565b6040805161ffff90931683526001600160a01b0390911660208301520160405180910390a16036547f246071332ec3cecbddeebfd36569844838470b18b27bf4c8f06390c7ef630b0f9062010000900461ffff16613de081611eb0565b6040805161ffff90931683526001600160a01b0390911660208301520160405180910390a15060ff82166000908152603160205260409020805460ff60a81b1916600160a81b1790555050565b6000806000613e3d846004541190565b613e7d5760405162461bcd60e51b81526020600482015260116024820152703737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610be6565b600060328581548110613e9257613e92615731565b90600052602060002090600a91828204019190066003029054906101000a900462ffffff16905060008160201662ffffff161115613ed557601f81169150613eda565b602091505b601f600f82901c169560069190911c6101ff1694509092509050565b323314613f155760405162461bcd60e51b8152600401610be6906154fc565b600260085403613f375760405162461bcd60e51b8152600401610be690615542565b600260085533613f4682611eb0565b6001600160a01b031614613f6c5760405162461bcd60e51b8152600401610be690615682565b60406000526031602052600080516020615dd083398151915254600160a81b900460ff16613fac5760405162461bcd60e51b8152600401610be6906156fa565b60365460009061ffff16820361401b5760385460ff16613fde5760405162461bcd60e51b8152600401610be690615968565b614004600261153c61271061153c6032611536605c603f5461488090919063ffffffff16565b61400e90826155b4565b6038805460ff1916905590505b60365462010000900461ffff16820361409357603854610100900460ff166140555760405162461bcd60e51b8152600401610be690615968565b61407b600261153c61271061153c6032611536605c603f5461488090919063ffffffff16565b61408590826155b4565b6038805461ff001916905590505b604051600090339083908381818185875af1925050503d80600081146140d5576040519150601f19603f3d011682016040523d82523d6000602084013e6140da565b606091505b50509050806141235760405162461bcd60e51b815260206004820152601560248201527410db185a5b481d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610be6565b60408051338152602081018590529081018390527fd08149829b4708b5a796078ac79020343425f5db94b97dfc5fe89f1e9caffb139060600160405180910390a15050600160085550565b61417661489f565b604054156141b75760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd0818d85cda1959081bdd5d60921b6044820152606401610be6565b737b0dc23e87febf1d053e7df9af4cce30f21fae9cff5b6141d661489f565b602d55565b6141e361489f565b60005b818110156111065760016039600085858581811061420657614206615731565b905060200201602081019061421b9190615253565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061424d81615747565b9150506141e6565b61425d61489f565b6001600160a01b0381166142c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610be6565b6142cb81614992565b50565b3260009081526039602052604090205460ff161580156142f957506007546001600160a01b03163314155b156143165760405162461bcd60e51b8152600401610be69061564b565b42602955603d5460405163e726f2e160e01b8152600260048201526001600160a01b039091169063e726f2e1906024016020604051808303816000875af1158015614365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143899190615cd4565b603e556040514281527f201eb77e0dc661d4553fd5be5afa01246d988c22e03ef68049761f7fe128647c90602001611204565b6000826143c98584614bbd565b14949350505050565b600454816144305760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610be6565b6001600160a01b0383166144925760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610be6565b81600460008282546144a491906155b4565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b0386161790556144da9082614c02565b805b6144e683836155b4565b811015612b895760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48061452f81615747565b9150506144dc565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061456c82611eb0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006145b2826004541190565b6146165760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610be6565b600061462183611eb0565b9050806001600160a01b0316846001600160a01b0316148061465c5750836001600160a01b031661465184610f67565b6001600160a01b0316145b8061468c57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b6000806146a0836148f9565b91509150846001600160a01b0316826001600160a01b03161461471a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610be6565b6001600160a01b0384166147805760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610be6565b61478b600084614537565b60006147988460016155b4565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c161580156147c8575060045481105b156147fe57600081815260036020526040812080546001600160a01b0319166001600160a01b0389161790556147fe9082614c02565b600084815260036020526040902080546001600160a01b0319166001600160a01b03871617905581841461483757614837600085614c02565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600061488c8284615ced565b9392505050565b600061488c8284615d0c565b6007546001600160a01b031633146122915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610be6565b600080614907836004541190565b6149685760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610be6565b61497183614c2e565b6000818152600360205260409020546001600160a01b031694909350915050565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061488c8284615760565b6149fb848484614694565b614a09848484600185614c3a565b612b895760405162461bcd60e51b8152600401610be690615d20565b6060602c8054610ee490615611565b604080516080019081905280825b600183039250600a81066030018353600a900480614a425750819003601f19909101908152919050565b60608151600003614a8b57505060408051602081019091526000815290565b6000604051806060016040528060408152602001615df06040913990506000600384516002614aba91906155b4565b614ac49190615d0c565b614acf906004615ced565b6001600160401b03811115614ae657614ae6615331565b6040519080825280601f01601f191660200182016040528015614b10576020820181803683370190505b509050600182016020820185865187015b80821015614b7c576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250614b21565b5050600386510660018114614b985760028114614bab5761174d565b603d6001830353603d600283035361174d565b603d6001830353509195945050505050565b600081815b8451811015611ea857614bee82868381518110614be157614be1615731565b6020026020010151614d71565b915080614bfa81615747565b915050614bc2565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b6000610bc18183614da0565b60006001600160a01b0385163b15614d6457506001835b614c5b84866155b4565b811015614d5e57604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290614c949033908b9086908990600401615d75565b6020604051808303816000875af1925050508015614ccf575060408051601f3d908101601f19168201909252614ccc91810190615db2565b60015b614d2c573d808015614cfd576040519150601f19603f3d011682016040523d82523d6000602084013e614d02565b606091505b508051600003614d245760405162461bcd60e51b8152600401610be690615d20565b805181602001fd5b828015614d4957506001600160e01b03198116630a85bd0160e11b145b92505080614d5681615747565b915050614c51565b50614d68565b5060015b95945050505050565b6000818310614d8d57600082815260208490526040902061488c565b600083815260208390526040902061488c565b600881901c60008181526020849052604081205490919060ff808516919082181c8015614de257614dd081614e98565b60ff168203600884901b179350614e8f565b60008311614e4f5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610be6565b506000199091016000818152602086905260409020549091908015614e8a57614e7781614e98565b60ff0360ff16600884901b179350614e8f565b614de2565b50505092915050565b60006040518061012001604052806101008152602001615e30610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff614ee185614f02565b02901c81518110614ef457614ef4615731565b016020015160f81c92915050565b6000808211614f1057600080fd5b5060008190031690565b828054614f2690615611565b90600052602060002090601f016020900481019282614f485760008555614f8e565b82601f10614f6157805160ff1916838001178555614f8e565b82800160010185558215614f8e579182015b82811115614f8e578251825591602001919060010190614f73565b50614f9a929150614f9e565b5090565b5b80821115614f9a5760008155600101614f9f565b6001600160e01b0319811681146142cb57600080fd5b600060208284031215614fdb57600080fd5b813561488c81614fb3565b60008083601f840112614ff857600080fd5b5081356001600160401b0381111561500f57600080fd5b6020830191508360208260051b850101111561502a57600080fd5b9250929050565b803560ff811681146115a257600080fd5b60008060006040848603121561505757600080fd5b83356001600160401b0381111561506d57600080fd5b61507986828701614fe6565b909450925061508c905060208501615031565b90509250925092565b60005b838110156150b0578181015183820152602001615098565b83811115612b895750506000910152565b600081518084526150d9816020860160208601615095565b601f01601f19169290920160200192915050565b60208152600061488c60208301846150c1565b60006020828403121561511257600080fd5b5035919050565b80356001600160a01b03811681146115a257600080fd5b6000806040838503121561514357600080fd5b61514c83615119565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b8181101561519657835161ffff1683529284019291840191600101615176565b50909695505050505050565b6000806000606084860312156151b757600080fd5b6151c084615119565b92506151ce60208501615119565b9150604084013590509250925092565b600080604083850312156151f157600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156151965783518352928401929184019160010161521c565b60006020828403121561524a57600080fd5b61488c82615031565b60006020828403121561526557600080fd5b61488c82615119565b6000806040838503121561528157600080fd5b61528a83615031565b915061529860208401615031565b90509250929050565b80151581146142cb57600080fd5b600080604083850312156152c257600080fd5b6152cb83615119565b915060208301356152db816152a1565b809150509250929050565b61ffff811681146142cb57600080fd5b6000806040838503121561530957600080fd5b823561528a816152e6565b60006020828403121561532657600080fd5b813561488c816152e6565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561536f5761536f615331565b604052919050565b60006001600160401b0383111561539057615390615331565b6153a3601f8401601f1916602001615347565b90508281528383830111156153b757600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156153e457600080fd5b6153ed85615119565b93506153fb60208601615119565b92506040850135915060608501356001600160401b0381111561541d57600080fd5b8501601f8101871361542e57600080fd5b61543d87823560208401615377565b91505092959194509250565b60006020828403121561545b57600080fd5b81356001600160401b0381111561547157600080fd5b8201601f8101841361548257600080fd5b61468c84823560208401615377565b600080602083850312156154a457600080fd5b82356001600160401b038111156154ba57600080fd5b6154c685828601614fe6565b90969095509350505050565b600080604083850312156154e557600080fd5b6154ee83615119565b915061529860208401615119565b60208082526026908201527f4f6e6c792045787465726e616c6c79204f776e6564204163636f756e747320416040820152651b1b1bddd95960d21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168060ff038211156155ac576155ac615579565b019392505050565b600082198211156155c7576155c7615579565b500190565b6020808252600c908201526b1b585e081b999d081cdbdb1960a21b604082015260600190565b600060ff821660ff810361560857615608615579565b60010192915050565b600181811c9082168061562557607f821691505b60208210810361564557634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601e908201527f4f6e6c79204f70657261746f72204163636f756e747320416c6c6f7765640000604082015260600190565b6020808252600a908201526927b7363c9037bbb732b960b11b604082015260600190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b60208082526019908201527f46696e616c2077696e6e6572206e6f742072656c656173656400000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006001820161575957615759615579565b5060010190565b60008282101561577257615772615579565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261579c5761579c615777565b500690565b6000816157b0576157b0615579565b506000190190565b600061ffff8083168181036157cf576157cf615579565b6001019392505050565b60006001600160401b038211156157f2576157f2615331565b5060051b60200190565b6000806040838503121561580f57600080fd5b825161581a816152a1565b809250506020808401516001600160401b0381111561583857600080fd5b8401601f8101861361584957600080fd5b805161585c615857826157d9565b615347565b81815260059190911b8201830190838101908883111561587b57600080fd5b928401925b8284101561589957835182529284019290840190615880565b80955050505050509250929050565b600060208083850312156158bb57600080fd5b82516001600160401b038111156158d157600080fd5b8301601f810185136158e257600080fd5b80516158f0615857826157d9565b81815260059190911b8201830190838101908783111561590f57600080fd5b928401925b82841015615936578351615927816152e6565b82529284019290840190615914565b979650505050505050565b600062ffffff80831681851680830382111561595f5761595f615579565b01949350505050565b6020808252601590820152741b9bc8199d5b99081bdc8818d85cda1959081bdd5d605a1b604082015260600190565b600081516159a9818560208601615095565b9290920192915050565b600082516159c5818460208701615095565b6931b7bb32b9173539b7b760b11b920191825250600a01919050565b600062ffffff80831681851681830481118215151615615a0357615a03615579565b02949350505050565b6c417a75476f616c204e4654202360981b815260008351615a3481600d850160208801615095565b65e2ad90efb88f60d01b600d918401918201528351615a5a816013840160208801615095565b01601301949350505050565b6c417a75476f616c204e4654202360981b815260008251615a8e81600d850160208701615095565b91909101600d0192915050565b693d913730b6b2911d101160b11b81528651600090615ac181600a850160208c01615095565b7f222c20226465736372697074696f6e223a2022417a75476f616c20576f726c64600a918401918201527421bab810191819191116101134b6b0b3b2911d101160591b602a8201528751615b1c81603f840160208c01615095565b8751910190615b3281603f840160208b01615095565b7f2e706e67222c202264657369676e6572223a202269736f746f702e746f70222c603f92909101918201527f2261747472696275746573223a205b7b2274726169745f74797065223a202249605f8201527f6e2d6d656d6f7279222c2276616c7565223a2022576f726c6443757020323032607f8201527f32227d2c207b2274726169745f74797065223a20225465616d222c2276616c75609f8201526432911d101160d91b60bf820152615c82615c72615c6c615c37615c31615bf960c487018c615997565b7f227d2c207b2274726169745f74797065223a20224e756d626572222c2276616c8152653ab2911d101160d11b602082015260260190565b89615997565b7f227d2c207b2274726169745f74797065223a2022426574222c2276616c7565228152621d101160e91b602082015260230190565b86615997565b63227d5d7d60e01b815260040190565b9998505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251615cc781601d850160208701615095565b91909101601d0192915050565b600060208284031215615ce657600080fd5b5051919050565b6000816000190483118215151615615d0757615d07615579565b500290565b600082615d1b57615d1b615777565b500490565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615da8908301846150c1565b9695505050505050565b600060208284031215615dc457600080fd5b815161488c81614fb356fe8725f80cbc582f2e06154d81f33b6d6c8c9c2ca7d6d8f4f7ea3edc00dc47ff6a4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212209277b2c31e93d291724f4c098098754cebf1d602dd86b295d8acf6a0effc96e064736f6c634300080d003300000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000177638f0a0edbdf497c33487e8a9cbdc6fe4a2e210f3b651a12664e7c0d3aa8fb080000000000000000000000000000000000000000000000000000000000000043697066733a2f2f6261667962656965366a7978796b69703334366f637869336b6c6d326b3234676b766f78376a6d7666706a76616d6a7673616c7934746f786771342f0000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103765760003560e01c80636352211e116101d1578063be9a2d2311610102578063d58b83e3116100a0578063e985e9c51161006f578063e985e9c514610aa3578063ec427d4014610aec578063f2fde38b14610b25578063f54b70bf14610b4557600080fd5b8063d58b83e314610a36578063d826f88f14610a4e578063dab5f34014610a63578063ddf71cd514610a8357600080fd5b8063c87b56dd116100dc578063c87b56dd1461099b578063ca905dc0146109bb578063cc33c875146109db578063ce70cd8d14610a1657600080fd5b8063be9a2d2314610948578063c76df80e14610968578063c82b94251461097b57600080fd5b80638da5cb5b1161016f578063a22cb46511610149578063a22cb465146108d5578063a7d2161c146108f5578063b22fc0a014610908578063b88d4fde1461092857600080fd5b80638da5cb5b1461088d57806395d89b41146108ab578063a2155539146108c057600080fd5b806370a08231116101ab57806370a08231146107f9578063715018a614610819578063768a76741461082e57806379502c551461084357600080fd5b80636352211e146107a3578063644ae063146107c35780636b747d63146107e357600080fd5b806328b6b4f8116102ab578063422326f41161024957806345ecfb171161022357806345ecfb171461072b5780634f6ccce71461074357806355d5a012146107635780635a3f26721461078357600080fd5b8063422326f41461064957806342842e0e1461065e578063436ffa3f1461067e57600080fd5b80632f745c59116102855780632f745c59146105d457806332cb6b0c146105f4578063363e59991461060a5780633ccfd60b1461061f57600080fd5b806328b6b4f81461055557806329fa6d02146105755780632c09e7c1146105a257600080fd5b80630c41f4971161031857806318160ddd116102f257806318160ddd146104cd5780631845994d146104ec5780631e84c4131461051d57806323b872dd1461053557600080fd5b80630c41f4971461048357806313069dfd1461049857806314748994146104b857600080fd5b8063081812fc11610354578063081812fc146103f4578063095ea7b31461042c57806309eeebb01461044c5780630c1c972a1461046e57600080fd5b806301ffc9a71461037b57806302d179c8146103b057806306fdde03146103d2575b600080fd5b34801561038757600080fd5b5061039b610396366004614fc9565b610b5a565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103d06103cb366004615042565b610bc7565b005b3480156103de57600080fd5b506103e7610ed5565b6040516103a791906150ed565b34801561040057600080fd5b5061041461040f366004615100565b610f67565b6040516001600160a01b0390911681526020016103a7565b34801561043857600080fd5b506103d0610447366004615130565b610ff4565b34801561045857600080fd5b5061046161110b565b6040516103a7919061515a565b34801561047a57600080fd5b506103d061118a565b34801561048f57600080fd5b506103d061120e565b3480156104a457600080fd5b506103d06104b3366004615100565b61128c565b3480156104c457600080fd5b5061046161142a565b3480156104d957600080fd5b506004545b6040519081526020016103a7565b3480156104f857600080fd5b506036546040805161ffff8084168252620100009093049092166020830152016103a7565b34801561052957600080fd5b50602a5442101561039b565b34801561054157600080fd5b506103d06105503660046151a2565b611485565b34801561056157600080fd5b506104de610570366004615100565b6114b6565b34801561058157600080fd5b506105956105903660046151de565b6115a7565b6040516103a79190615200565b3480156105ae57600080fd5b506105c26105bd366004615100565b611758565b60405160ff90911681526020016103a7565b3480156105e057600080fd5b506104de6105ef366004615130565b6117be565b34801561060057600080fd5b506104de61258081565b34801561061657600080fd5b506103d0611888565b34801561062b57600080fd5b50610634611906565b604080519283526020830191909152016103a7565b34801561065557600080fd5b50610461611b37565b34801561066a57600080fd5b506103d06106793660046151a2565b611b92565b34801561068a57600080fd5b506106fb610699366004615238565b60408051606080820183526000808352602080840182905292840181905260ff9485168152603183528390208351918201845254808516825261010081046001600160a01b031692820192909252600160a81b90910490921615159082015290565b60408051825160ff1681526020808401516001600160a01b031690820152918101511515908201526060016103a7565b34801561073757600080fd5b5060295442101561039b565b34801561074f57600080fd5b506104de61075e366004615100565b611bad565b34801561076f57600080fd5b506104de61077e366004615100565b611c67565b34801561078f57600080fd5b5061059561079e366004615253565b611df0565b3480156107af57600080fd5b506104146107be366004615100565b611eb0565b3480156107cf57600080fd5b506103d06107de36600461526e565b611ec7565b3480156107ef57600080fd5b506104de60001981565b34801561080557600080fd5b506104de610814366004615253565b6121af565b34801561082557600080fd5b506103d061227f565b34801561083a57600080fd5b50610634612293565b34801561084f57600080fd5b506108586122aa565b6040516103a794939291906001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b34801561089957600080fd5b506007546001600160a01b0316610414565b3480156108b757600080fd5b506103e76122ee565b3480156108cc57600080fd5b506103d06122fd565b3480156108e157600080fd5b506103d06108f03660046152af565b6125da565b6103d06109033660046152f6565b61269e565b34801561091457600080fd5b506103d0610923366004615314565b612a46565b34801561093457600080fd5b506103d06109433660046153ce565b612b57565b34801561095457600080fd5b506103d0610963366004615100565b612b8f565b6103d0610976366004615238565b612e97565b34801561098757600080fd5b506103e7610996366004615449565b6131d8565b3480156109a757600080fd5b506103e76109b6366004615100565b6132bf565b3480156109c757600080fd5b506103d06109d636600461526e565b61361b565b3480156109e757600080fd5b506109fb6109f6366004615100565b613e2d565b604080519384526020840192909252908201526060016103a7565b348015610a2257600080fd5b506103d0610a31366004615100565b613ef6565b348015610a4257600080fd5b50602b5442101561039b565b348015610a5a57600080fd5b506103d061416e565b348015610a6f57600080fd5b506103d0610a7e366004615100565b6141ce565b348015610a8f57600080fd5b506103d0610a9e366004615491565b6141db565b348015610aaf57600080fd5b5061039b610abe3660046154d2565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610af857600080fd5b506105c2610b07366004615253565b6001600160a01b03166000908152603a602052604090205460ff1690565b348015610b3157600080fd5b506103d0610b40366004615253565b614255565b348015610b5157600080fd5b506103d06142ce565b60006001600160e01b031982166380ac58cd60e01b1480610b8b57506001600160e01b03198216635b5e139f60e01b145b80610ba657506001600160e01b0319821663780e9d6360e01b145b80610bc157506301ffc9a760e01b6001600160e01b03198316145b92915050565b323314610bef5760405162461bcd60e51b8152600401610be6906154fc565b60405180910390fd5b600260085403610c115760405162461bcd60e51b8152600401610be690615542565b6002600855602954421015610c685760405162461bcd60e51b815260206004820152601b60248201527f57686974656c6973742053616c6573204e6f74205374617274656400000000006044820152606401610be6565b602b544210610cb95760405162461bcd60e51b815260206004820152601860248201527f57686974654c6973742053616c65732046696e697368656400000000000000006044820152606401610be6565b336000908152603a6020526040902054600290610cda90839060ff1661558f565b60ff161115610d1f5760405162461bcd60e51b81526020600482015260116024820152701b585e080c8813919508185b1b1bddd959607a1b6044820152606401610be6565b60325461258090610d349060ff8416906155b4565b1115610d525760405162461bcd60e51b8152600401610be6906155cc565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610dcc84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050602d5491508490506143bc565b610e0c5760405162461bcd60e51b8152602060048201526011602482015270139bdd081a5b881dda1a5d19481b1a5cdd607a1b6044820152606401610be6565b610e19338360ff166143d2565b60005b8260ff168160ff161015610e8c57603280546001810182556000919091527f11df491316f14931039edfd4f8964c9a443b862f02d4c7611d18c2bc4e6ff697600a808304919091018054919092066003026101000a62ffffff021916905580610e84816155f2565b915050610e1c565b50336000908152603a602052604081208054849290610eaf90849060ff1661558f565b92506101000a81548160ff021916908360ff160217905550506001600881905550505050565b606060018054610ee490615611565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1090615611565b8015610f5d5780601f10610f3257610100808354040283529160200191610f5d565b820191906000526020600020905b815481529060010190602001808311610f4057829003601f168201915b5050505050905090565b6000610f74826004541190565b610fd85760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610be6565b506000908152600560205260409020546001600160a01b031690565b6000610fff82611eb0565b9050806001600160a01b0316836001600160a01b03160361106e5760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610be6565b336001600160a01b038216148061108a575061108a8133610abe565b6110fc5760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610be6565b6111068383614537565b505050565b6060603b805480602002602001604051908101604052809291908181526020018280548015610f5d57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116111485790505050505050905090565b3260009081526039602052604090205460ff161580156111b557506007546001600160a01b03163314155b156111d25760405162461bcd60e51b8152600401610be69061564b565b42602a8190556040519081527ff5873041cf54025a0d378efc70d90938908e7499c3f41d007dc37938ae92345d906020015b60405180910390a1565b3260009081526039602052604090205460ff1615801561123957506007546001600160a01b03163314155b156112565760405162461bcd60e51b8152600401610be69061564b565b600019602a556040514281527f1557f02db43c040d49a0619c1083e57b0c263e11d8dd388416ab9a6ce1a4380f90602001611204565b3233146112ab5760405162461bcd60e51b8152600401610be6906154fc565b6002600854036112cd5760405162461bcd60e51b8152600401610be690615542565b6002600855336112dc82611eb0565b6001600160a01b0316146113025760405162461bcd60e51b8152600401610be690615682565b61ffff811660009081526033602052604081205460ff169081900361135d5760405162461bcd60e51b81526020600482015260116024820152701b9bc8185a5c991c9bdc1cc8199bdd5b99607a1b6044820152606401610be6565b603c546040516340c10f1960e01b815233600482015260ff831660248201526001600160a01b03909116906340c10f1990604401600060405180830381600087803b1580156113ab57600080fd5b505af11580156113bf573d6000803e3d6000fd5b5050505061ffff8216600090815260336020908152604091829020805460ff19169055815133815290810184905260ff83168183015290517f2f977e68df69d63cdf91a6aa90360df2140f3e62de2b992f6152b00d3714d98e9181900360600190a150506001600855565b60606034805480602002602001604051908101604052809291908181526020018280548015610f5d576000918252602091829020805461ffff1684529082028301929091600291018084116111485790505050505050905090565b61148f33826145a5565b6114ab5760405162461bcd60e51b8152600401610be6906156a6565b611106838383614694565b604060009081526031602052600080516020615dd083398151915254600160a81b900460ff166114f85760405162461bcd60e51b8152600401610be6906156fa565b60365461ffff16820361154f5760385460ff161561154f57611542600261153c61271061153c6032611536605c603f5461488090919063ffffffff16565b90614880565b90614893565b61154c90826155b4565b90505b60365462010000900461ffff1682036115a257603854610100900460ff16156115a257611598600261153c61271061153c6032611536605c603f5461488090919063ffffffff16565b610bc190826155b4565b919050565b60606000836001600160401b038111156115c3576115c3615331565b6040519080825280602002602001820160405280156115ec578160200160208202803683370190505b50905060005b8481101561162a578082828151811061160d5761160d615731565b60209081029190910101528061162281615747565b9150506115f2565b5060008360405160200161164091815260200190565b60405160208183030381529060405280519060200120905060006001866116679190615760565b905060015b611677600188615760565b81101561174d57600061168a838561578d565b905060008584815181106116a0576116a0615731565b602002602001015190508582815181106116bc576116bc615731565b60200260200101518685815181106116d6576116d6615731565b602002602001018181525050808683815181106116f5576116f5615731565b60209081029190910101528361170a816157a1565b9450508460405160200161172091815260200190565b6040516020818303038152906040528051906020012094505050808061174590615747565b91505061166c565b509195945050505050565b6000611765826004541190565b6117a45760405162461bcd60e51b815260206004820152601060248201526f746f6b656e206e6f742065786973747360801b6044820152606401610be6565b5061ffff1660009081526033602052604090205460ff1690565b60008060005b600454811015611833576117d9816004541190565b80156117fe57506117e981611eb0565b6001600160a01b0316856001600160a01b0316145b1561182157838203611813579150610bc19050565b8161181d81615747565b9250505b8061182b81615747565b9150506117c4565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b6064820152608401610be6565b3260009081526039602052604090205460ff161580156118b357506007546001600160a01b03163314155b156118d05760405162461bcd60e51b8152600401610be69061564b565b6000196029556040514281527faa093fe79932fd0110de88ab16447933731a0bcda9d56d98bd30215ca118bdcb90602001611204565b60008061191161489f565b60406000526031602052600080516020615dd083398151915254600160a81b900460ff166119815760405162461bcd60e51b815260206004820152601960248201527f66696e616c2077696e6e6572206e6f742072657665616c6564000000000000006044820152606401610be6565b6000604054116119c05760405162461bcd60e51b815260206004820152600a60248201526918d85cda1959081bdd5d60b21b6044820152606401610be6565b60006040546119e0606461153c6008603f5461488090919063ffffffff16565b6119ea91906155b4565b603054909150611a07906103e89061153c90849061ffff16614880565b9250611a138382615760565b604051909250600090737b0dc23e87febf1d053e7df9af4cce30f21fae9c9085908381818185875af1925050503d8060008114611a6c576040519150601f19603f3d011682016040523d82523d6000602084013e611a71565b606091505b5050604051909150600090739da32f03cc23f9156daa7442cadbe8366ddac1239085908381818185875af1925050503d8060008114611acc576040519150601f19603f3d011682016040523d82523d6000602084013e611ad1565b606091505b50509050818015611adf5750805b611b2b5760405162461bcd60e51b815260206004820152601860248201527f7769746864726177207472616e73666572206661696c656400000000000000006044820152606401610be6565b50506000604055509091565b60606035805480602002602001604051908101604052809291908181526020018280548015610f5d576000918252602091829020805461ffff1684529082028301929091600291018084116111485790505050505050905090565b61110683838360405180602001604052806000815250612b57565b6000611bb860045490565b8210611c145760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f6620626044820152646f756e647360d81b6064820152608401610be6565b6000805b600454811015611c6057611c2d816004541190565b15611c4e57838203611c40579392505050565b81611c4a81615747565b9250505b80611c5881615747565b915050611c18565b5050919050565b604060009081526031602052600080516020615dd083398151915254600160a81b900460ff16611ca95760405162461bcd60e51b8152600401610be6906156fa565b61ffff821660009081526037602052604090205460ff16611ccc57506000919050565b60345460005b81811015611d5d578360348281548110611cee57611cee615731565b60009182526020909120601082040154600f9091166002026101000a900461ffff1603611d4b57611d3a8261153c61271061153c6028611536605c603f5461488090919063ffffffff16565b611d4490846155b4565b9250611d5d565b80611d5581615747565b915050611cd2565b505060355460005b81811015611c60578360358281548110611d8157611d81615731565b60009182526020909120601082040154600f9091166002026101000a900461ffff1603611dde57611dcd8261153c61271061153c600a611536605c603f5461488090919063ffffffff16565b611dd790846155b4565b9250611c60565b80611de881615747565b915050611d65565b6060323314611e115760405162461bcd60e51b8152600401610be6906154fc565b6000611e1c836121af565b90506000816001600160401b03811115611e3857611e38615331565b604051908082528060200260200182016040528015611e61578160200160208202803683370190505b50905060005b82811015611ea857611e7985826117be565b828281518110611e8b57611e8b615731565b602090810291909101015280611ea081615747565b915050611e67565b509392505050565b6000806000611ebe846148f9565b50949350505050565b3260009081526039602052604090205460ff16158015611ef257506007546001600160a01b03163314155b15611f0f5760405162461bcd60e51b8152600401610be69061564b565b60408260ff1610611f525760405162461bcd60e51b815260206004820152600d60248201526c6d6178203634206d617463687360981b6044820152606401610be6565b60ff808316600090815260316020526040902054600160a81b90041615611fb65760405162461bcd60e51b81526020600482015260186024820152771d1a1a5cc81c9bdd5b99081a1859081c1d589b1a5cda195960421b6044820152606401610be6565b60ff821660009081526031602052604090205461010090046001600160a01b03161580612002575060ff821660009081526031602052604090205461010090046001600160a01b031633145b1561207d576040805160608101825260ff80841682523360208084019182526000848601818152888516825260319092529490942092518354915194511515600160a81b0260ff60a81b196001600160a01b0396909616610100026001600160a81b0319909316919093161717929092169190911790555050565b60ff8281166000908152603160205260409020548116908216146120cd5760ff918216600090815260316020526040902080546001600160a81b031916336101000260ff19161791909216179055565b60005b60325461ffff82161015612186578160ff16600f60328361ffff16815481106120fb576120fb615731565b90600052602060002090600a91828204019190066003029054906101000a900462ffffff1662ffffff16901c601f1662ffffff16036121745761ffff8116600090815260336020526040812080546001929061215b90849060ff1661558f565b92506101000a81548160ff021916908360ff1602179055505b8061217e816157b8565b9150506120d0565b5060ff82166000908152603160205260409020805460ff60a81b1916600160a81b1790555b5050565b60006001600160a01b03821661221d5760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610be6565b6000805b60045481101561227857612236816004541190565b156122685761224481611eb0565b6001600160a01b0316846001600160a01b0316036122685761226582615747565b91505b61227181615747565b9050612221565b5092915050565b61228761489f565b6122916000614992565b565b60008061229e61489f565b5050603f546040549091565b6000806000806122b861489f565b5050603d54603c54602d54738c0813590b65952197f5654ec953ccc601725bee94506001600160a01b0392831693509116919293565b606060028054610ee490615611565b3260009081526039602052604090205460ff1615801561232857506007546001600160a01b03163314155b156123455760405162461bcd60e51b8152600401610be69061564b565b600019602b541461238b5760405162461bcd60e51b815260206004820152601060248201526f14da1d59999b19481a185c1c195b995960821b6044820152606401610be6565b42602b819055603e541561244357603d54603e5460405163d8a4676f60e01b815260009283926001600160a01b039091169163d8a4676f916123d39160040190815260200190565b600060405180830381865afa1580156123f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261241891908101906157fc565b915091508115612440578060008151811061243557612435615731565b602002602001015192505b50505b603d54604051634039d7e760e11b81526125806004820152602481018390526000916001600160a01b031690638073afce90604401600060405180830381865afa158015612495573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124bd91908101906158a8565b905060005b6032548110156125a257600061012c8383815181106124e3576124e3615731565b602002602001015161ffff16816124fc576124fc615777565b0461ffff169050600061012c84848151811061251a5761251a615731565b602002602001015161ffff168161253357612533615777565b0661ffff16905060068162ffffff16901b600f8362ffffff16901b016032848154811061256257612562615731565b90600052602060002090600a91828204019190066003026101000a81548162ffffff021916908362ffffff160217905550505080806001019150506124c2565b506040514281527f4e79c0a66a5bc111570353aa23cc02a57113c396631897691b3bcce74bc015f59060200160405180910390a15050565b336001600160a01b038316036126325760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610be6565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3233146126bd5760405162461bcd60e51b8152600401610be6906154fc565b6002600854036126df5760405162461bcd60e51b8152600401610be690615542565b6002600855602b544210156127365760405162461bcd60e51b815260206004820152601960248201527f5075626c69632053616c6573206e6f742046696e6973686564000000000000006044820152606401610be6565b60208160ff16106127815760405162461bcd60e51b815260206004820152601560248201527413db9b1e480ccc881d19585b5cc81cdd5c1c1bdc9d605a1b6044820152606401610be6565b6127908261ffff166004541190565b6127cf5760405162461bcd60e51b815260206004820152601060248201526f746f6b656e206e6f742065786973747360801b6044820152606401610be6565b336127dd61ffff8416611eb0565b6001600160a01b0316146128035760405162461bcd60e51b8152600401610be690615682565b60328261ffff168154811061281a5761281a615731565b6000918252602091829020600a8083049091015491066003026101000a900416156128735760405162461bcd60e51b81526020600482015260096024820152682132ba103a37b5b2b760b91b6044820152606401610be6565b602f543410156128bc5760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d0814185e5b595b9d60621b6044820152606401610be6565b8060201760ff1660328361ffff16815481106128da576128da615731565b90600052602060002090600a91828204019190066003028282829054906101000a900462ffffff1661290c9190615941565b825461010092830a62ffffff81810219909216929091160217909155603b80546001810182556000919091527fbbe3212124853f8b0084a66a2d057c2966e251e132af3691db153ab65f0d1a4d60108204018054600f90921660020290920a61ffff818102199092169186160217905550602f54341115612a2457602f54600090339061299a9034906149e4565b604051600081818185875af1925050503d80600081146129d6576040519150601f19603f3d011682016040523d82523d6000602084013e6129db565b606091505b5050905080612a225760405162461bcd60e51b815260206004820152601360248201527210995d081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610be6565b505b602f54603f6000828254612a3891906155b4565b909155505060016008555050565b612a4e61489f565b602b544210612a905760405162461bcd60e51b815260206004820152600e60248201526d14d85b195cc8119a5b9a5cda195960921b6044820152606401610be6565b60325461258090612aa69061ffff8416906155b4565b1115612ac45760405162461bcd60e51b8152600401610be6906155cc565b612ae3612ad96007546001600160a01b031690565b8261ffff166143d2565b60005b8161ffff168160ff1610156121ab57603280546001810182556000919091527f11df491316f14931039edfd4f8964c9a443b862f02d4c7611d18c2bc4e6ff697600a808304919091018054919092066003026101000a62ffffff021916905580612b4f816155f2565b915050612ae6565b612b6133836145a5565b612b7d5760405162461bcd60e51b8152600401610be6906156a6565b612b89848484846149f0565b50505050565b323314612bae5760405162461bcd60e51b8152600401610be6906154fc565b600260085403612bd05760405162461bcd60e51b8152600401610be690615542565b600260085533612bdf82611eb0565b6001600160a01b031614612c055760405162461bcd60e51b8152600401610be690615682565b60406000526031602052600080516020615dd083398151915254600160a81b900460ff16612c455760405162461bcd60e51b8152600401610be6906156fa565b61ffff811660009081526037602052604090205460ff16612c785760405162461bcd60e51b8152600401610be690615968565b603454600090815b81811015612d0b578360348281548110612c9c57612c9c615731565b60009182526020909120601082040154600f9091166002026101000a900461ffff1603612cf957612ce88261153c61271061153c6028611536605c603f5461488090919063ffffffff16565b612cf290846155b4565b9250612d0b565b80612d0381615747565b915050612c80565b505060355460005b81811015612d9e578360358281548110612d2f57612d2f615731565b60009182526020909120601082040154600f9091166002026101000a900461ffff1603612d8c57612d7b8261153c61271061153c600a611536605c603f5461488090919063ffffffff16565b612d8590846155b4565b9250612d9e565b80612d9681615747565b915050612d13565b50604051600090339084908381818185875af1925050503d8060008114612de1576040519150601f19603f3d011682016040523d82523d6000602084013e612de6565b606091505b5050905080612e2f5760405162461bcd60e51b815260206004820152601560248201527410db185a5b481d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610be6565b61ffff8416600090815260376020908152604091829020805460ff1916905581513381529081018690529081018490527fd08149829b4708b5a796078ac79020343425f5db94b97dfc5fe89f1e9caffb139060600160405180910390a1505060016008555050565b323314612eb65760405162461bcd60e51b8152600401610be6906154fc565b600260085403612ed85760405162461bcd60e51b8152600401610be690615542565b6002600855602a54421015612f2f5760405162461bcd60e51b815260206004820152601860248201527f5075626c69632053616c6573204e6f74205374617274656400000000000000006044820152606401610be6565b602b544210612f785760405162461bcd60e51b8152602060048201526015602482015274141d589b1a58c814d85b195cc8119a5b9a5cda1959605a1b6044820152606401610be6565b336000908152603a602052604090205460ff16612f9690600461558f565b60ff168160ff16612fa6336121af565b612fb091906155b4565b1115612ffe5760405162461bcd60e51b815260206004820152601d60248201527f6d61782034207075626c69632073616c65204e465420616c6c6f7765640000006044820152606401610be6565b603254612580906130139060ff8416906155b4565b11156130315760405162461bcd60e51b8152600401610be6906155cc565b602e546000906130449060ff8416614880565b90508034101561308d5760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d0814185e5b595b9d60621b6044820152606401610be6565b806040600082825461309f91906155b4565b909155506130b290503360ff84166143d2565b60005b8260ff168160ff16101561312557603280546001810182556000919091527f11df491316f14931039edfd4f8964c9a443b862f02d4c7611d18c2bc4e6ff697600a808304919091018054919092066003026101000a62ffffff02191690558061311d816155f2565b9150506130b5565b50803411156131cf5760003361313b34846149e4565b604051600081818185875af1925050503d8060008114613177576040519150601f19603f3d011682016040523d82523d6000602084013e61317c565b606091505b50509050806131cd5760405162461bcd60e51b815260206004820152601c60248201527f5075626c69632073616c6573207472616e73666572206661696c6564000000006044820152606401610be6565b505b50506001600855565b60606131e261489f565b81516131f590602c906020850190614f1a565b507fbd6f5dd2ce6bb9b156a79d476e3238d1b38751859176633c23f0a0f4f53b63c18260405161322591906150ed565b60405180910390a1602c805461323a90615611565b80601f016020809104026020016040519081016040528092919081815260200182805461326690615611565b80156132b35780601f10613288576101008083540402835291602001916132b3565b820191906000526020600020905b81548152906001019060200180831161329657829003601f168201915b50505050509050919050565b60606132cc826004541190565b61330c5760405162461bcd60e51b81526020600482015260116024820152703737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610be6565b602b544210156133445761331e614a25565b60405160200161332e91906159b3565b6040516020818303038152906040529050919050565b60006032838154811061335957613359615731565b90600052602060002090600a91828204019190066003029054906101000a900462ffffff16905060006009600f8362ffffff16901c601f1662ffffff16602081106133a6576133a6615731565b0180546133b290615611565b80601f01602080910402602001604051908101604052809291908181526020018280546133de90615611565b801561342b5780601f106134005761010080835404028352916020019161342b565b820191906000526020600020905b81548152906001019060200180831161340e57829003601f168201915b50505050509050600061344f60068462ffffff16901c6101ff1662ffffff16614a34565b604080518082019091526007815266139bdd0810995d60ca1b602082015290915060006101ff600686901c1661348e601f600f88901c1661012c6159e1565b6134989190615941565b62ffffff1690506060602086161561357d576009601f8716602081106134c0576134c0615731565b0180546134cc90615611565b80601f01602080910402602001604051908101604052809291908181526020018280546134f890615611565b80156135455780601f1061351a57610100808354040283529160200191613545565b820191906000526020600020905b81548152906001019060200180831161352857829003601f168201915b5050505050925061355582614a34565b83604051602001613567929190615a0c565b60405160208183030381529060405290506135a8565b61358682614a34565b6040516020016135969190615a66565b60405160208183030381529060405290505b6000816135b3614a25565b6135bc85614a34565b8888886040516020016135d496959493929190615a9b565b60405160208183030381529060405290506135ee81614a6c565b6040516020016135fe9190615c8f565b604051602081830303815290604052975050505050505050919050565b3260009081526039602052604090205460ff1615801561364657506007546001600160a01b03163314155b156136635760405162461bcd60e51b8152600401610be69061564b565b8160ff166040146136b65760405162461bcd60e51b815260206004820152601d60248201527f66696e616c20726f756e64206d757374206265203634206d61746368730000006044820152606401610be6565b60ff808316600090815260316020526040902054600160a81b9004161561371a5760405162461bcd60e51b81526020600482015260186024820152771d1a1a5cc81c9bdd5b99081a1859081c1d589b1a5cda195960421b6044820152606401610be6565b60ff821660009081526031602052604090205461010090046001600160a01b03161580613766575060ff821660009081526031602052604090205461010090046001600160a01b031633145b156137e1576040805160608101825260ff80841682523360208084019182526000848601818152888516825260319092529490942092518354915194511515600160a81b0260ff60a81b196001600160a01b0396909616610100026001600160a81b0319909316919093161717929092169190911790555050565b60ff8281166000908152603160205260409020548116908216146138315760ff918216600090815260316020526040902080546001600160a81b031916336101000260ff19161791909216179055565b60325460005b818161ffff1610156139ed57600060328261ffff168154811061385c5761385c615731565b90600052602060002090600a91828204019190066003029054906101000a900462ffffff1690508360ff16600f8262ffffff16901c601f1662ffffff160361394f5761ffff821660009081526033602052604081208054600192906138c590849060ff1661558f565b825460ff91821661010093840a9081029202191617909155603580546001818101909255601081047fcfa4bec1d3298408bb5afcfcd9c430549c5b31f8aa5c5848151c0a55f473c34d01805461ffff8089166002600f9095169490940290950a8381029502191693909317909255600091825260376020526040909120805460ff19169091179055505b60208116158015906139665750601f811660ff8516145b156139da57603480546001818101909255601081047f46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c101805461ffff8087166002600f909516949094026101000a8481029102199091161790556000908152603760205260409020805460ff191690911790555b50806139e5816157b8565b915050613837565b50603454600003613a20575060ff82166000908152603160205260409020805460ff60a81b1916600160a81b1790555050565b603454600103613ac9576034600081548110613a3e57613a3e615731565b60009182526020822060108204015460368054600f9093166002026101000a90910461ffff1661ffff1990921691909117905560348054909190613a8457613a84615731565b90600052602060002090601091828204019190066002029054906101000a900461ffff16603660026101000a81548161ffff021916908361ffff160217905550613d42565b603454600203613b30576034600081548110613ae757613ae7615731565b6000918252602090912060108204015460368054600f9093166002026101000a90910461ffff1661ffff19909216919091179055603480546001908110613a8457613a84615731565b603e54429015613be457603d54603e5460405163d8a4676f60e01b815260009283926001600160a01b039091169163d8a4676f91613b749160040190815260200190565b600060405180830381865afa158015613b91573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613bb991908101906157fc565b915091508115613be15780600181518110613bd657613bd6615731565b602002602001015192505b50505b603d54603454604051634039d7e760e11b815261ffff9091166004820152602481018390526000916001600160a01b031690638073afce90604401600060405180830381865afa158015613c3c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613c6491908101906158a8565b9050603481600081518110613c7b57613c7b615731565b602002602001015161ffff1681548110613c9757613c97615731565b6000918252602090912060108204015460368054600f9093166002026101000a90910461ffff1661ffff19909216919091179055805160349082906001908110613ce357613ce3615731565b602002602001015161ffff1681548110613cff57613cff615731565b90600052602060002090601091828204019190066002029054906101000a900461ffff16603660026101000a81548161ffff021916908361ffff16021790555050505b6038805461ffff19166101011790556036547f246071332ec3cecbddeebfd36569844838470b18b27bf4c8f06390c7ef630b0f9061ffff16613d8381611eb0565b6040805161ffff90931683526001600160a01b0390911660208301520160405180910390a16036547f246071332ec3cecbddeebfd36569844838470b18b27bf4c8f06390c7ef630b0f9062010000900461ffff16613de081611eb0565b6040805161ffff90931683526001600160a01b0390911660208301520160405180910390a15060ff82166000908152603160205260409020805460ff60a81b1916600160a81b1790555050565b6000806000613e3d846004541190565b613e7d5760405162461bcd60e51b81526020600482015260116024820152703737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610be6565b600060328581548110613e9257613e92615731565b90600052602060002090600a91828204019190066003029054906101000a900462ffffff16905060008160201662ffffff161115613ed557601f81169150613eda565b602091505b601f600f82901c169560069190911c6101ff1694509092509050565b323314613f155760405162461bcd60e51b8152600401610be6906154fc565b600260085403613f375760405162461bcd60e51b8152600401610be690615542565b600260085533613f4682611eb0565b6001600160a01b031614613f6c5760405162461bcd60e51b8152600401610be690615682565b60406000526031602052600080516020615dd083398151915254600160a81b900460ff16613fac5760405162461bcd60e51b8152600401610be6906156fa565b60365460009061ffff16820361401b5760385460ff16613fde5760405162461bcd60e51b8152600401610be690615968565b614004600261153c61271061153c6032611536605c603f5461488090919063ffffffff16565b61400e90826155b4565b6038805460ff1916905590505b60365462010000900461ffff16820361409357603854610100900460ff166140555760405162461bcd60e51b8152600401610be690615968565b61407b600261153c61271061153c6032611536605c603f5461488090919063ffffffff16565b61408590826155b4565b6038805461ff001916905590505b604051600090339083908381818185875af1925050503d80600081146140d5576040519150601f19603f3d011682016040523d82523d6000602084013e6140da565b606091505b50509050806141235760405162461bcd60e51b815260206004820152601560248201527410db185a5b481d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610be6565b60408051338152602081018590529081018390527fd08149829b4708b5a796078ac79020343425f5db94b97dfc5fe89f1e9caffb139060600160405180910390a15050600160085550565b61417661489f565b604054156141b75760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd0818d85cda1959081bdd5d60921b6044820152606401610be6565b737b0dc23e87febf1d053e7df9af4cce30f21fae9cff5b6141d661489f565b602d55565b6141e361489f565b60005b818110156111065760016039600085858581811061420657614206615731565b905060200201602081019061421b9190615253565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061424d81615747565b9150506141e6565b61425d61489f565b6001600160a01b0381166142c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610be6565b6142cb81614992565b50565b3260009081526039602052604090205460ff161580156142f957506007546001600160a01b03163314155b156143165760405162461bcd60e51b8152600401610be69061564b565b42602955603d5460405163e726f2e160e01b8152600260048201526001600160a01b039091169063e726f2e1906024016020604051808303816000875af1158015614365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143899190615cd4565b603e556040514281527f201eb77e0dc661d4553fd5be5afa01246d988c22e03ef68049761f7fe128647c90602001611204565b6000826143c98584614bbd565b14949350505050565b600454816144305760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610be6565b6001600160a01b0383166144925760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610be6565b81600460008282546144a491906155b4565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b0386161790556144da9082614c02565b805b6144e683836155b4565b811015612b895760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48061452f81615747565b9150506144dc565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061456c82611eb0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006145b2826004541190565b6146165760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610be6565b600061462183611eb0565b9050806001600160a01b0316846001600160a01b0316148061465c5750836001600160a01b031661465184610f67565b6001600160a01b0316145b8061468c57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b6000806146a0836148f9565b91509150846001600160a01b0316826001600160a01b03161461471a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610be6565b6001600160a01b0384166147805760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610be6565b61478b600084614537565b60006147988460016155b4565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c161580156147c8575060045481105b156147fe57600081815260036020526040812080546001600160a01b0319166001600160a01b0389161790556147fe9082614c02565b600084815260036020526040902080546001600160a01b0319166001600160a01b03871617905581841461483757614837600085614c02565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600061488c8284615ced565b9392505050565b600061488c8284615d0c565b6007546001600160a01b031633146122915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610be6565b600080614907836004541190565b6149685760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610be6565b61497183614c2e565b6000818152600360205260409020546001600160a01b031694909350915050565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061488c8284615760565b6149fb848484614694565b614a09848484600185614c3a565b612b895760405162461bcd60e51b8152600401610be690615d20565b6060602c8054610ee490615611565b604080516080019081905280825b600183039250600a81066030018353600a900480614a425750819003601f19909101908152919050565b60608151600003614a8b57505060408051602081019091526000815290565b6000604051806060016040528060408152602001615df06040913990506000600384516002614aba91906155b4565b614ac49190615d0c565b614acf906004615ced565b6001600160401b03811115614ae657614ae6615331565b6040519080825280601f01601f191660200182016040528015614b10576020820181803683370190505b509050600182016020820185865187015b80821015614b7c576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250614b21565b5050600386510660018114614b985760028114614bab5761174d565b603d6001830353603d600283035361174d565b603d6001830353509195945050505050565b600081815b8451811015611ea857614bee82868381518110614be157614be1615731565b6020026020010151614d71565b915080614bfa81615747565b915050614bc2565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b6000610bc18183614da0565b60006001600160a01b0385163b15614d6457506001835b614c5b84866155b4565b811015614d5e57604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290614c949033908b9086908990600401615d75565b6020604051808303816000875af1925050508015614ccf575060408051601f3d908101601f19168201909252614ccc91810190615db2565b60015b614d2c573d808015614cfd576040519150601f19603f3d011682016040523d82523d6000602084013e614d02565b606091505b508051600003614d245760405162461bcd60e51b8152600401610be690615d20565b805181602001fd5b828015614d4957506001600160e01b03198116630a85bd0160e11b145b92505080614d5681615747565b915050614c51565b50614d68565b5060015b95945050505050565b6000818310614d8d57600082815260208490526040902061488c565b600083815260208390526040902061488c565b600881901c60008181526020849052604081205490919060ff808516919082181c8015614de257614dd081614e98565b60ff168203600884901b179350614e8f565b60008311614e4f5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610be6565b506000199091016000818152602086905260409020549091908015614e8a57614e7781614e98565b60ff0360ff16600884901b179350614e8f565b614de2565b50505092915050565b60006040518061012001604052806101008152602001615e30610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff614ee185614f02565b02901c81518110614ef457614ef4615731565b016020015160f81c92915050565b6000808211614f1057600080fd5b5060008190031690565b828054614f2690615611565b90600052602060002090601f016020900481019282614f485760008555614f8e565b82601f10614f6157805160ff1916838001178555614f8e565b82800160010185558215614f8e579182015b82811115614f8e578251825591602001919060010190614f73565b50614f9a929150614f9e565b5090565b5b80821115614f9a5760008155600101614f9f565b6001600160e01b0319811681146142cb57600080fd5b600060208284031215614fdb57600080fd5b813561488c81614fb3565b60008083601f840112614ff857600080fd5b5081356001600160401b0381111561500f57600080fd5b6020830191508360208260051b850101111561502a57600080fd5b9250929050565b803560ff811681146115a257600080fd5b60008060006040848603121561505757600080fd5b83356001600160401b0381111561506d57600080fd5b61507986828701614fe6565b909450925061508c905060208501615031565b90509250925092565b60005b838110156150b0578181015183820152602001615098565b83811115612b895750506000910152565b600081518084526150d9816020860160208601615095565b601f01601f19169290920160200192915050565b60208152600061488c60208301846150c1565b60006020828403121561511257600080fd5b5035919050565b80356001600160a01b03811681146115a257600080fd5b6000806040838503121561514357600080fd5b61514c83615119565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b8181101561519657835161ffff1683529284019291840191600101615176565b50909695505050505050565b6000806000606084860312156151b757600080fd5b6151c084615119565b92506151ce60208501615119565b9150604084013590509250925092565b600080604083850312156151f157600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156151965783518352928401929184019160010161521c565b60006020828403121561524a57600080fd5b61488c82615031565b60006020828403121561526557600080fd5b61488c82615119565b6000806040838503121561528157600080fd5b61528a83615031565b915061529860208401615031565b90509250929050565b80151581146142cb57600080fd5b600080604083850312156152c257600080fd5b6152cb83615119565b915060208301356152db816152a1565b809150509250929050565b61ffff811681146142cb57600080fd5b6000806040838503121561530957600080fd5b823561528a816152e6565b60006020828403121561532657600080fd5b813561488c816152e6565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561536f5761536f615331565b604052919050565b60006001600160401b0383111561539057615390615331565b6153a3601f8401601f1916602001615347565b90508281528383830111156153b757600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156153e457600080fd5b6153ed85615119565b93506153fb60208601615119565b92506040850135915060608501356001600160401b0381111561541d57600080fd5b8501601f8101871361542e57600080fd5b61543d87823560208401615377565b91505092959194509250565b60006020828403121561545b57600080fd5b81356001600160401b0381111561547157600080fd5b8201601f8101841361548257600080fd5b61468c84823560208401615377565b600080602083850312156154a457600080fd5b82356001600160401b038111156154ba57600080fd5b6154c685828601614fe6565b90969095509350505050565b600080604083850312156154e557600080fd5b6154ee83615119565b915061529860208401615119565b60208082526026908201527f4f6e6c792045787465726e616c6c79204f776e6564204163636f756e747320416040820152651b1b1bddd95960d21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168060ff038211156155ac576155ac615579565b019392505050565b600082198211156155c7576155c7615579565b500190565b6020808252600c908201526b1b585e081b999d081cdbdb1960a21b604082015260600190565b600060ff821660ff810361560857615608615579565b60010192915050565b600181811c9082168061562557607f821691505b60208210810361564557634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601e908201527f4f6e6c79204f70657261746f72204163636f756e747320416c6c6f7765640000604082015260600190565b6020808252600a908201526927b7363c9037bbb732b960b11b604082015260600190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b60208082526019908201527f46696e616c2077696e6e6572206e6f742072656c656173656400000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006001820161575957615759615579565b5060010190565b60008282101561577257615772615579565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261579c5761579c615777565b500690565b6000816157b0576157b0615579565b506000190190565b600061ffff8083168181036157cf576157cf615579565b6001019392505050565b60006001600160401b038211156157f2576157f2615331565b5060051b60200190565b6000806040838503121561580f57600080fd5b825161581a816152a1565b809250506020808401516001600160401b0381111561583857600080fd5b8401601f8101861361584957600080fd5b805161585c615857826157d9565b615347565b81815260059190911b8201830190838101908883111561587b57600080fd5b928401925b8284101561589957835182529284019290840190615880565b80955050505050509250929050565b600060208083850312156158bb57600080fd5b82516001600160401b038111156158d157600080fd5b8301601f810185136158e257600080fd5b80516158f0615857826157d9565b81815260059190911b8201830190838101908783111561590f57600080fd5b928401925b82841015615936578351615927816152e6565b82529284019290840190615914565b979650505050505050565b600062ffffff80831681851680830382111561595f5761595f615579565b01949350505050565b6020808252601590820152741b9bc8199d5b99081bdc8818d85cda1959081bdd5d605a1b604082015260600190565b600081516159a9818560208601615095565b9290920192915050565b600082516159c5818460208701615095565b6931b7bb32b9173539b7b760b11b920191825250600a01919050565b600062ffffff80831681851681830481118215151615615a0357615a03615579565b02949350505050565b6c417a75476f616c204e4654202360981b815260008351615a3481600d850160208801615095565b65e2ad90efb88f60d01b600d918401918201528351615a5a816013840160208801615095565b01601301949350505050565b6c417a75476f616c204e4654202360981b815260008251615a8e81600d850160208701615095565b91909101600d0192915050565b693d913730b6b2911d101160b11b81528651600090615ac181600a850160208c01615095565b7f222c20226465736372697074696f6e223a2022417a75476f616c20576f726c64600a918401918201527421bab810191819191116101134b6b0b3b2911d101160591b602a8201528751615b1c81603f840160208c01615095565b8751910190615b3281603f840160208b01615095565b7f2e706e67222c202264657369676e6572223a202269736f746f702e746f70222c603f92909101918201527f2261747472696275746573223a205b7b2274726169745f74797065223a202249605f8201527f6e2d6d656d6f7279222c2276616c7565223a2022576f726c6443757020323032607f8201527f32227d2c207b2274726169745f74797065223a20225465616d222c2276616c75609f8201526432911d101160d91b60bf820152615c82615c72615c6c615c37615c31615bf960c487018c615997565b7f227d2c207b2274726169745f74797065223a20224e756d626572222c2276616c8152653ab2911d101160d11b602082015260260190565b89615997565b7f227d2c207b2274726169745f74797065223a2022426574222c2276616c7565228152621d101160e91b602082015260230190565b86615997565b63227d5d7d60e01b815260040190565b9998505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251615cc781601d850160208701615095565b91909101601d0192915050565b600060208284031215615ce657600080fd5b5051919050565b6000816000190483118215151615615d0757615d07615579565b500290565b600082615d1b57615d1b615777565b500490565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615da8908301846150c1565b9695505050505050565b600060208284031215615dc457600080fd5b815161488c81614fb356fe8725f80cbc582f2e06154d81f33b6d6c8c9c2ca7d6d8f4f7ea3edc00dc47ff6a4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212209277b2c31e93d291724f4c098098754cebf1d602dd86b295d8acf6a0effc96e064736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000177638f0a0edbdf497c33487e8a9cbdc6fe4a2e210f3b651a12664e7c0d3aa8fb080000000000000000000000000000000000000000000000000000000000000043697066733a2f2f6261667962656965366a7978796b69703334366f637869336b6c6d326b3234676b766f78376a6d7666706a76616d6a7673616c7934746f786771342f0000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : baseURI (string): ipfs://bafybeie6jyxykip346ocxi3klm2k24gkvox7jmvfpjvamjvsaly4toxgq4/
Arg [1] : mint_price (uint256): 10000000000000000
Arg [2] : bet_price (uint256): 100000000000000000
Arg [3] : share (uint16): 375
Arg [4] : root (bytes32): 0x638f0a0edbdf497c33487e8a9cbdc6fe4a2e210f3b651a12664e7c0d3aa8fb08
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 000000000000000000000000000000000000000000000000002386f26fc10000
Arg [2] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000177
Arg [4] : 638f0a0edbdf497c33487e8a9cbdc6fe4a2e210f3b651a12664e7c0d3aa8fb08
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [6] : 697066733a2f2f6261667962656965366a7978796b69703334366f637869336b
Arg [7] : 6c6d326b3234676b766f78376a6d7666706a76616d6a7673616c7934746f7867
Arg [8] : 71342f0000000000000000000000000000000000000000000000000000000000
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.